@itwin/appui-abstract 5.0.0-dev.99 → 5.1.0-dev.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 +6 -1
- package/lib/cjs/appui-abstract/UiAdmin.js.map +1 -1
- package/lib/cjs/appui-abstract/common/KeyboardKey.js.map +1 -1
- package/lib/cjs/appui-abstract/content/ContentLayoutProps.js.map +1 -1
- package/lib/cjs/appui-abstract/content/StandardContentLayouts.js.map +1 -1
- package/lib/cjs/appui-abstract/dialogs/DialogItem.js.map +1 -1
- package/lib/cjs/appui-abstract/dialogs/UiDataProvider.js.map +1 -1
- package/lib/cjs/appui-abstract/dialogs/UiLayoutDataProvider.js.map +1 -1
- package/lib/cjs/appui-abstract/items/AbstractItemProps.js.map +1 -1
- package/lib/cjs/appui-abstract/items/AbstractMenuItemProps.js.map +1 -1
- package/lib/cjs/appui-abstract/items/AbstractToolbarProps.js.map +1 -1
- package/lib/cjs/appui-abstract/items/BadgeType.js.map +1 -1
- package/lib/cjs/appui-abstract/items/ConditionalBooleanValue.js.map +1 -1
- package/lib/cjs/appui-abstract/items/ConditionalStringValue.js.map +1 -1
- package/lib/cjs/appui-abstract/items/RelativePosition.js.map +1 -1
- package/lib/cjs/appui-abstract/notification/MessagePresenter.js.map +1 -1
- package/lib/cjs/appui-abstract/notification/MessageSeverity.js.map +1 -1
- package/lib/cjs/appui-abstract/properties/Description.js.map +1 -1
- package/lib/cjs/appui-abstract/properties/EditorParams.js.map +1 -1
- package/lib/cjs/appui-abstract/properties/PrimitiveTypes.js.map +1 -1
- package/lib/cjs/appui-abstract/properties/Record.js.map +1 -1
- package/lib/cjs/appui-abstract/properties/StandardEditorNames.js.map +1 -1
- package/lib/cjs/appui-abstract/properties/StandardTypeNames.js.map +1 -1
- package/lib/cjs/appui-abstract/properties/Value.js.map +1 -1
- package/lib/cjs/appui-abstract/quantity/BaseQuantityDescription.js.map +1 -1
- package/lib/cjs/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/IconSpecUtilities.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/PointProps.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/UiError.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/UiEvent.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/UiEventDispatcher.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/callbacks.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/filter/filters.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/misc.js.map +1 -1
- package/lib/cjs/appui-abstract.js.map +1 -1
- package/lib/esm/appui-abstract/UiAdmin.js.map +1 -1
- package/lib/esm/appui-abstract/common/KeyboardKey.js.map +1 -1
- package/lib/esm/appui-abstract/content/ContentLayoutProps.js.map +1 -1
- package/lib/esm/appui-abstract/content/StandardContentLayouts.js.map +1 -1
- package/lib/esm/appui-abstract/dialogs/DialogItem.js.map +1 -1
- package/lib/esm/appui-abstract/dialogs/UiDataProvider.js.map +1 -1
- package/lib/esm/appui-abstract/dialogs/UiLayoutDataProvider.js.map +1 -1
- package/lib/esm/appui-abstract/items/AbstractItemProps.js.map +1 -1
- package/lib/esm/appui-abstract/items/AbstractMenuItemProps.js.map +1 -1
- package/lib/esm/appui-abstract/items/AbstractToolbarProps.js.map +1 -1
- package/lib/esm/appui-abstract/items/BadgeType.js.map +1 -1
- package/lib/esm/appui-abstract/items/ConditionalBooleanValue.js.map +1 -1
- package/lib/esm/appui-abstract/items/ConditionalStringValue.js.map +1 -1
- package/lib/esm/appui-abstract/items/RelativePosition.js.map +1 -1
- package/lib/esm/appui-abstract/notification/MessagePresenter.js.map +1 -1
- package/lib/esm/appui-abstract/notification/MessageSeverity.js.map +1 -1
- package/lib/esm/appui-abstract/properties/Description.js.map +1 -1
- package/lib/esm/appui-abstract/properties/EditorParams.js.map +1 -1
- package/lib/esm/appui-abstract/properties/PrimitiveTypes.js.map +1 -1
- package/lib/esm/appui-abstract/properties/Record.js.map +1 -1
- package/lib/esm/appui-abstract/properties/StandardEditorNames.js.map +1 -1
- package/lib/esm/appui-abstract/properties/StandardTypeNames.js.map +1 -1
- package/lib/esm/appui-abstract/properties/Value.js.map +1 -1
- package/lib/esm/appui-abstract/quantity/BaseQuantityDescription.js.map +1 -1
- package/lib/esm/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
- package/lib/esm/appui-abstract/utils/IconSpecUtilities.js.map +1 -1
- package/lib/esm/appui-abstract/utils/PointProps.js.map +1 -1
- package/lib/esm/appui-abstract/utils/UiError.js.map +1 -1
- package/lib/esm/appui-abstract/utils/UiEvent.js.map +1 -1
- package/lib/esm/appui-abstract/utils/UiEventDispatcher.js.map +1 -1
- package/lib/esm/appui-abstract/utils/callbacks.js.map +1 -1
- package/lib/esm/appui-abstract/utils/filter/filters.js.map +1 -1
- package/lib/esm/appui-abstract/utils/misc.js.map +1 -1
- package/lib/esm/appui-abstract.js.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
@@ -1,6 +1,11 @@
|
|
1
1
|
# Change Log - @itwin/appui-abstract
|
2
2
|
|
3
|
-
This log was last generated on
|
3
|
+
This log was last generated on Thu, 10 Apr 2025 17:50:15 GMT and should not be manually modified.
|
4
|
+
|
5
|
+
## 4.10.13
|
6
|
+
Thu, 10 Apr 2025 17:47:21 GMT
|
7
|
+
|
8
|
+
_Version update only_
|
4
9
|
|
5
10
|
## 4.10.12
|
6
11
|
Wed, 02 Apr 2025 19:35:47 GMT
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"UiAdmin.js","sourceRoot":"","sources":["../../../src/appui-abstract/UiAdmin.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6E;AA+C7E;;GAEG;AACH,MAAa,cAAe,SAAQ,wBAA6B;CAAI;AAArE,wCAAqE;AAUrE;;GAEG;AACH,MAAa,OAAO;IACV,aAAa,GAAY,EAAE,CA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F,iBAAoC,EAAE,cAA4B;QAClE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,8BAA8B;IACvB,eAAe,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAEnD;;;;;;;;;;;OAWG;IACI,QAAQ,CACb,QAAqB,EAAE,MAA2C,EAAE,aAA+C,EACnH,SAAgB,EAAE,OAAc,EAAE,eAAmC,EAAE,SAAuB,EAC9F,iBAAoC,EAAE,cAA4B;QAClE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,sBAAsB;IACf,QAAQ,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAE5C;;;;;;;;OAQG;IACI,qBAAqB,CAC1B,aAA6B,EAAE,SAAgB,EAAE,OAAc,EAAE,SAAuB,EACxF,iBAAoC,EAAE,cAA4B;QAClE,OAAO,KAAK,CAAC;IACf,CAAC;IAED,yCAAyC;IAClC,sBAAsB,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAE1D;;;OAGG;IACI,gBAAgB,CAAC,YAA0B,IAAa,OAAO,KAAK,CAAC,CAAC,CAAC;IAE9E,+BAA+B;IACxB,gBAAgB,KAAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAEpD,sBAAsB;IACf,MAAM,CAAC,WAAW,CAAC,IAAwB;QAChD,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACD,sBAAsB;IACf,MAAM,CAAU,gBAAgB,GAAG,IAAI,cAAc,EAAE,CAAC;IAE/D;;;;;;;OAOG;IACI,UAAU,CAAC,eAAyC,EAAE,MAAc,EAAE,QAAiB,EAAE,GAAW,EACzG,cAA4B;QAC5B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,yCAAyC;IAClC,WAAW,CAAC,SAAiB,IAAa,OAAO,KAAK,CAAC,CAAC,CAAC;;AArPlE,0BAsPC","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 UiAdmin\n */\n\nimport { BentleyError, BentleyStatus, BeUiEvent } from \"@itwin/core-bentley\";\nimport { AbstractMenuItemProps } from \"./items/AbstractMenuItemProps\";\nimport { AbstractToolbarProps } from \"./items/AbstractToolbarProps\";\nimport { RelativePosition } from \"./items/RelativePosition\";\nimport { PropertyDescription } from \"./properties/Description\";\nimport { Primitives } from \"./properties/PrimitiveTypes\";\nimport { OnCancelFunc, OnItemExecutedFunc, OnNumberCommitFunc, OnValueCommitFunc } from \"./utils/callbacks\";\nimport { PropertyRecord } from \"./properties/Record\";\nimport { UiDataProvider } from \"./dialogs/UiDataProvider\";\nimport { DialogLayoutDataProvider } from \"./dialogs/UiLayoutDataProvider\";\nimport { MessagePresenter } from \"./notification/MessagePresenter\";\n\ninterface XAndY { readonly x: number, readonly y: number }\n\ninterface BentleyErrorWithCategory extends BentleyError {\n category: string;\n}\n\n/** The Generic UI Event args contains information useful for any UI message\n * @public\n */\nexport interface GenericUiEventArgs {\n uiComponentId: string;\n}\n\n/** Optional props to pass to the Dialog control that is generated.\n * @public\n */\nexport interface DialogProps {\n /** Indicates whether the user can resize dialog with cursor. */\n resizable?: boolean;\n /** Indicates whether the user can move dialog with cursor.*/\n movable?: boolean;\n /** Initial width of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\n width?: string | number;\n /** Initial height of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\n height?: string | number;\n /** Minimum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\n minWidth?: string | number;\n /** Minimum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\n minHeight?: string | number;\n /** Maximum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\n maxWidth?: string | number;\n /** Maximum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\n maxHeight?: string | number;\n}\n\n/** The GenericUiEvent is the base event class for UI events that target a specific component, as identified in uiComponentId.\n * @public\n */\nexport class GenericUiEvent extends BeUiEvent<GenericUiEventArgs> { }\n\n/** Flags that control enabling/disabling certain UI features\n * @public\n */\nexport interface UiFlags {\n /** if true then Ctrl+F2 will show popup key-in palette */\n allowKeyinPalette?: boolean;\n}\n\n/** The UiAdmin controls various UI components and is callable from IModelApp.uiAdmin in the core-frontend package.\n * @public\n */\nexport class UiAdmin {\n private _featureFlags: UiFlags = {};\n private static _messagePresenter?: MessagePresenter;\n\n /** The MessagePresenter used to display messages. */\n public static get messagePresenter(): MessagePresenter {\n if (!UiAdmin._messagePresenter) {\n const error = new BentleyError(BentleyStatus.ERROR, \"UiAdmin.messagePresenter not set\") as BentleyErrorWithCategory;\n error.category = \"messagePresenter\";\n throw error;\n }\n\n return UiAdmin._messagePresenter;\n }\n public static set messagePresenter(mp: MessagePresenter) {\n UiAdmin._messagePresenter = mp;\n }\n\n public get featureFlags(): UiFlags {\n return { ...this._featureFlags }; // return copy so no direct access to modify value\n }\n\n public updateFeatureFlags(uiFlags: UiFlags) {\n this._featureFlags = { ...this._featureFlags, ...uiFlags };\n }\n\n /** @internal */\n public onInitialized() { }\n\n /** Get the cursor X and Y position. */\n public get cursorPosition(): XAndY { return { x: 0, y: 0 }; }\n\n /** Create a PointProps object.\n * @deprecated in 4.2.x. Please use @core/geometry [[XAndY]] or a custom implementation.\n */\n public createXAndY(x: number, y: number): XAndY { return { x, y }; }\n\n /** Determines if focus is set to Home */\n public get isFocusOnHome(): boolean { return false; }\n\n /** Sets focus to Home */\n public setFocusToHome(): void { }\n\n /** Show a context menu at a particular location.\n * @param _menuItemsProps Properties of the menu items to display.\n * @param _location Location of the context menu, relative to the origin of htmlElement or the window.\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the menu was displayed, false if the menu could not be displayed.\n */\n public showContextMenu(_menuItemsProps: AbstractMenuItemProps[], _location: XAndY, _htmlElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Show a Toolbar at a particular location.\n * @param _toolbarProps Properties of the Toolbar to display.\n * @param _location Location of the Toolbar, relative to the origin of htmlElement or the window.\n * @param _offset Offset of the Toolbar from the location.\n * @param _onItemExecuted Function invoked after a Toolbar item is executed\n * @param _onCancel Function invoked when the Escape key is pressed or a click occurs outside the Toolbar\n * @param _relativePosition Position relative to the given location. Defaults to TopRight.\n * @param _htmlElement The HTMLElement that anchors the Toolbar. If undefined, the location is relative to the overall window.\n * @return true if the Toolbar was displayed, false if the Toolbar could not be displayed.\n */\n public showToolbar(\n _toolbarProps: AbstractToolbarProps, _location: XAndY, _offset: XAndY, _onItemExecuted: OnItemExecutedFunc, _onCancel: OnCancelFunc,\n _relativePosition?: RelativePosition, _htmlElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Hides the toolbar. */\n public hideToolbar(): boolean { return false; }\n\n /** Show a menu button at a particular location. A menu button opens a context menu.\n * @param _id Id of the menu button. Multiple menu buttons may be displayed.\n * @param _menuItemsProps Properties of the menu items to display.\n * @param _location Location of the context menu, relative to the origin of htmlElement or the window.\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the button was displayed, false if the button could not be displayed.\n */\n public showMenuButton(_id: string, _menuItemsProps: AbstractMenuItemProps[], _location: XAndY, _htmlElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Hides a menu button.\n * @param _id Id of the menu button. Multiple menu buttons may be displayed.\n * @return true if the menu was hidden, false if the menu could not be hidden.\n */\n public hideMenuButton(_id: string): boolean { return false; }\n\n /** Show a calculator at a particular location.\n * @param _initialValue Value initially displayed in the calculator.\n * @param _resultIcon Icon displayed to the left of the value.\n * @param _location Location of the calculator, relative to the origin of htmlElement or the window.\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the calculator was displayed, false if the calculator could not be displayed.\n */\n public showCalculator(_initialValue: number, _resultIcon: string, _location: XAndY, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Hides the calculator. */\n public hideCalculator(): boolean { return false; }\n\n /** Show an input editor for an angle value at a particular location.\n * @param _initialValue Value initially displayed in the editor.\n * @param _location Location of the editor, relative to the origin of htmlElement or the window.\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the editor was displayed, false if the editor could not be displayed.\n */\n public showAngleEditor(_initialValue: number, _location: XAndY, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Show an input editor for a length value at a particular location.\n * @param _initialValue Value initially displayed in the editor.\n * @param _location Location of the editor, relative to the origin of htmlElement or the window.\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the editor was displayed, false if the editor could not be displayed.\n */\n public showLengthEditor(_initialValue: number, _location: XAndY, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Show an input editor for a height value at a particular location.\n * @param _initialValue Value initially displayed in the editor.\n * @param _location Location of the editor, relative to the origin of htmlElement or the window.\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the editor was displayed, false if the editor could not be displayed.\n */\n public showHeightEditor(_initialValue: number, _location: XAndY, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Show an input editor for a primitive value at a particular location.\n * @param _initialValue Value initially displayed in the editor.\n * @param _propertyDescription Description of the primitive value property.\n * @param _location Location of the editor, relative to the origin of htmlElement or the window.\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\n * @return true if the editor was displayed, false if the editor could not be displayed.\n */\n public showInputEditor(_initialValue: Primitives.Value, _propertyDescription: PropertyDescription, _location: XAndY, _onCommit: OnValueCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Hides the input editor. */\n public hideInputEditor(): boolean { return false; }\n\n /** Show an HTML element at a particular location.\n * @param _displayElement The HTMLElement to display\n * @param _location Location of the tool settings, relative to the origin of anchorElement or the window\n * @param _offset Offset of the display element from the location\n * @param _onCancel Function invoked when the Escape key is pressed or a click occurs outside the display element\n * @param _relativePosition Position relative to the given location. Defaults to TopRight.\n * @param _anchorElement The HTMLElement that anchors the display element. If undefined, the location is relative to the overall window.\n * @return true if the display element was displayed, false if the display element could not be displayed.\n */\n public showHTMLElement(\n _displayElement: HTMLElement, _location: XAndY, _offset: XAndY, _onCancel: OnCancelFunc,\n _relativePosition?: RelativePosition, _anchorElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Hides the HTML Element. */\n public hideHTMLElement(): boolean { return false; }\n\n /** Show a Card containing content, a title and a toolbar at a particular location.\n * @param _content The HTMLElement of the content to display\n * @param _title Title to display at the top of the card.\n * @param _toolbarProps Properties of the Toolbar to display.\n * @param _location Location of the Card, relative to the origin of anchorElement or the window.\n * @param _offset Offset of the Card from the location.\n * @param _onItemExecuted Function invoked after a Toolbar item is executed\n * @param _onCancel Function invoked when the Escape key is pressed or a click occurs outside the Card\n * @param _relativePosition Position relative to the given location. Defaults to TopRight.\n * @param _anchorElement The HTMLElement that anchors the Card. If undefined, the location is relative to the overall window.\n * @return true if the Card was displayed, false if the Card could not be displayed.\n */\n public showCard(\n _content: HTMLElement, _title: string | PropertyRecord | undefined, _toolbarProps: AbstractToolbarProps | undefined,\n _location: XAndY, _offset: XAndY, _onItemExecuted: OnItemExecutedFunc, _onCancel: OnCancelFunc,\n _relativePosition?: RelativePosition, _anchorElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Hides the Card. */\n public hideCard(): boolean { return false; }\n\n /** Opens a Tool Settings Ui popup at a particular location.\n * @param _dataProvider The UiDataProvider for the tool settings\n * @param _location Location of the tool settings, relative to the origin of anchorElement or the window\n * @param _offset Offset of the tool settings from the location\n * @param _onCancel Function invoked when the Escape key is pressed or a click occurs outside the tool settings\n * @param _relativePosition Position relative to the given location. Defaults to TopRight.\n * @param _anchorElement The HTMLElement that anchors the tool settings. If undefined, the location is relative to the overall window.\n * @return true if the tool settings were displayed, false if the tool settings could not be displayed.\n */\n public openToolSettingsPopup(\n _dataProvider: UiDataProvider, _location: XAndY, _offset: XAndY, _onCancel: OnCancelFunc,\n _relativePosition?: RelativePosition, _anchorElement?: HTMLElement): boolean {\n return false;\n }\n\n /** Closes the Tool Settings Ui popup. */\n public closeToolSettingsPopup(): boolean { return false; }\n\n /** Show the Keyin Palette to display all support Tool key-ins.\n * @param _htmlElement The HTMLElement that anchors the Keyin Palette. If undefined, the location is relative to the overall window.\n * @return true if the Keyin Palette was displayed, false if it could not be displayed.\n */\n public showKeyinPalette(_htmlElement?: HTMLElement): boolean { return false; }\n\n /** Hides the Keyin Palette. */\n public hideKeyinPalette(): boolean { return false; }\n\n /** Send a UI event */\n public static sendUiEvent(args: GenericUiEventArgs) {\n UiAdmin.onGenericUiEvent.emit(args);\n }\n /** GenericUiEvent */\n public static readonly onGenericUiEvent = new GenericUiEvent();\n\n /** Opens a Dialog and automatically populates it using the properties defined by the UiDataProvider.\n * @param _uiDataProvider The DialogLayoutDataProvider for the dialog\n * @param _title Specify title for dialog.\n * @param _isModal Specify if the dialog is opened as a modal or modeless.\n * @param _id Id of the dialog that is used to close it.\n * @param _optionalProps Optional props for Dialog construction.\n * @return true if the tool settings were displayed, false if the tool settings could not be displayed.\n */\n public openDialog(_uiDataProvider: DialogLayoutDataProvider, _title: string, _isModal: boolean, _id: string,\n _optionalProps?: DialogProps): boolean {\n return false;\n }\n\n /** Closes the Dialog with a given Id. */\n public closeDialog(_dialogId: string): boolean { return false; }\n}\n"]}
|
1
|
+
{"version":3,"file":"UiAdmin.js","sourceRoot":"","sources":["../../../src/appui-abstract/UiAdmin.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA6E;AA+C7E;;GAEG;AACH,MAAa,cAAe,SAAQ,wBAA6B;CAAI;AAArE,wCAAqE;AAUrE;;GAEG;AACH,MAAa,OAAO;IACV,aAAa,GAAY,EAAE,CAAC;IAC5B,MAAM,CAAC,iBAAiB,CAAoB;IAEpD,qDAAqD;IAC9C,MAAM,KAAK,gBAAgB;QAChC,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC;YAC/B,MAAM,KAAK,GAAG,IAAI,2BAAY,CAAC,4BAAa,CAAC,KAAK,EAAE,kCAAkC,CAA6B,CAAC;YACpH,KAAK,CAAC,QAAQ,GAAG,kBAAkB,CAAC;YACpC,MAAM,KAAK,CAAC;QACd,CAAC;QAED,OAAO,OAAO,CAAC,iBAAiB,CAAC;IACnC,CAAC;IACM,MAAM,KAAK,gBAAgB,CAAC,EAAoB;QACrD,OAAO,CAAC,iBAAiB,GAAG,EAAE,CAAC;IACjC,CAAC;IAED,IAAW,YAAY;QACrB,OAAO,EAAE,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC,CAAC,kDAAkD;IACtF,CAAC;IAEM,kBAAkB,CAAC,OAAgB;QACxC,IAAI,CAAC,aAAa,GAAG,EAAE,GAAG,IAAI,CAAC,aAAa,EAAE,GAAG,OAAO,EAAE,CAAC;IAC7D,CAAC;IAED,gBAAgB;IACT,a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AAc,OAAO,KAAK,CAAC,CAAC,CAAC;IAEpD,sBAAsB;IACf,MAAM,CAAC,WAAW,CAAC,IAAwB;QAChD,OAAO,CAAC,gBAAgB,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IACtC,CAAC;IACD,sBAAsB;IACf,MAAM,CAAU,gBAAgB,GAAG,IAAI,cAAc,EAAE,CAAC;IAE/D;;;;;;;OAOG;IACI,UAAU,CAAC,eAAyC,EAAE,MAAc,EAAE,QAAiB,EAAE,GAAW,EACzG,cAA4B;QAC5B,OAAO,KAAK,CAAC;IACf,CAAC;IAED,yCAAyC;IAClC,WAAW,CAAC,SAAiB,IAAa,OAAO,KAAK,CAAC,CAAC,CAAC;;AArPlE,0BAsPC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module UiAdmin\r\n */\r\n\r\nimport { BentleyError, BentleyStatus, BeUiEvent } from \"@itwin/core-bentley\";\r\nimport { AbstractMenuItemProps } from \"./items/AbstractMenuItemProps\";\r\nimport { AbstractToolbarProps } from \"./items/AbstractToolbarProps\";\r\nimport { RelativePosition } from \"./items/RelativePosition\";\r\nimport { PropertyDescription } from \"./properties/Description\";\r\nimport { Primitives } from \"./properties/PrimitiveTypes\";\r\nimport { OnCancelFunc, OnItemExecutedFunc, OnNumberCommitFunc, OnValueCommitFunc } from \"./utils/callbacks\";\r\nimport { PropertyRecord } from \"./properties/Record\";\r\nimport { UiDataProvider } from \"./dialogs/UiDataProvider\";\r\nimport { DialogLayoutDataProvider } from \"./dialogs/UiLayoutDataProvider\";\r\nimport { MessagePresenter } from \"./notification/MessagePresenter\";\r\n\r\ninterface XAndY { readonly x: number, readonly y: number }\r\n\r\ninterface BentleyErrorWithCategory extends BentleyError {\r\n category: string;\r\n}\r\n\r\n/** The Generic UI Event args contains information useful for any UI message\r\n * @public\r\n */\r\nexport interface GenericUiEventArgs {\r\n uiComponentId: string;\r\n}\r\n\r\n/** Optional props to pass to the Dialog control that is generated.\r\n * @public\r\n */\r\nexport interface DialogProps {\r\n /** Indicates whether the user can resize dialog with cursor. */\r\n resizable?: boolean;\r\n /** Indicates whether the user can move dialog with cursor.*/\r\n movable?: boolean;\r\n /** Initial width of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n width?: string | number;\r\n /** Initial height of dialog. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n height?: string | number;\r\n /** Minimum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n minWidth?: string | number;\r\n /** Minimum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n minHeight?: string | number;\r\n /** Maximum width that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n maxWidth?: string | number;\r\n /** Maximum height that the dialog may be resized to. Displayed in px if value is a number; otherwise, displayed in specified CSS unit. */\r\n maxHeight?: string | number;\r\n}\r\n\r\n/** The GenericUiEvent is the base event class for UI events that target a specific component, as identified in uiComponentId.\r\n * @public\r\n */\r\nexport class GenericUiEvent extends BeUiEvent<GenericUiEventArgs> { }\r\n\r\n/** Flags that control enabling/disabling certain UI features\r\n * @public\r\n */\r\nexport interface UiFlags {\r\n /** if true then Ctrl+F2 will show popup key-in palette */\r\n allowKeyinPalette?: boolean;\r\n}\r\n\r\n/** The UiAdmin controls various UI components and is callable from IModelApp.uiAdmin in the core-frontend package.\r\n * @public\r\n */\r\nexport class UiAdmin {\r\n private _featureFlags: UiFlags = {};\r\n private static _messagePresenter?: MessagePresenter;\r\n\r\n /** The MessagePresenter used to display messages. */\r\n public static get messagePresenter(): MessagePresenter {\r\n if (!UiAdmin._messagePresenter) {\r\n const error = new BentleyError(BentleyStatus.ERROR, \"UiAdmin.messagePresenter not set\") as BentleyErrorWithCategory;\r\n error.category = \"messagePresenter\";\r\n throw error;\r\n }\r\n\r\n return UiAdmin._messagePresenter;\r\n }\r\n public static set messagePresenter(mp: MessagePresenter) {\r\n UiAdmin._messagePresenter = mp;\r\n }\r\n\r\n public get featureFlags(): UiFlags {\r\n return { ...this._featureFlags }; // return copy so no direct access to modify value\r\n }\r\n\r\n public updateFeatureFlags(uiFlags: UiFlags) {\r\n this._featureFlags = { ...this._featureFlags, ...uiFlags };\r\n }\r\n\r\n /** @internal */\r\n public onInitialized() { }\r\n\r\n /** Get the cursor X and Y position. */\r\n public get cursorPosition(): XAndY { return { x: 0, y: 0 }; }\r\n\r\n /** Create a PointProps object.\r\n * @deprecated in 4.2.x. Please use @core/geometry [[XAndY]] or a custom implementation.\r\n */\r\n public createXAndY(x: number, y: number): XAndY { return { x, y }; }\r\n\r\n /** Determines if focus is set to Home */\r\n public get isFocusOnHome(): boolean { return false; }\r\n\r\n /** Sets focus to Home */\r\n public setFocusToHome(): void { }\r\n\r\n /** Show a context menu at a particular location.\r\n * @param _menuItemsProps Properties of the menu items to display.\r\n * @param _location Location of the context menu, relative to the origin of htmlElement or the window.\r\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\r\n * @return true if the menu was displayed, false if the menu could not be displayed.\r\n */\r\n public showContextMenu(_menuItemsProps: AbstractMenuItemProps[], _location: XAndY, _htmlElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Show a Toolbar at a particular location.\r\n * @param _toolbarProps Properties of the Toolbar to display.\r\n * @param _location Location of the Toolbar, relative to the origin of htmlElement or the window.\r\n * @param _offset Offset of the Toolbar from the location.\r\n * @param _onItemExecuted Function invoked after a Toolbar item is executed\r\n * @param _onCancel Function invoked when the Escape key is pressed or a click occurs outside the Toolbar\r\n * @param _relativePosition Position relative to the given location. Defaults to TopRight.\r\n * @param _htmlElement The HTMLElement that anchors the Toolbar. If undefined, the location is relative to the overall window.\r\n * @return true if the Toolbar was displayed, false if the Toolbar could not be displayed.\r\n */\r\n public showToolbar(\r\n _toolbarProps: AbstractToolbarProps, _location: XAndY, _offset: XAndY, _onItemExecuted: OnItemExecutedFunc, _onCancel: OnCancelFunc,\r\n _relativePosition?: RelativePosition, _htmlElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Hides the toolbar. */\r\n public hideToolbar(): boolean { return false; }\r\n\r\n /** Show a menu button at a particular location. A menu button opens a context menu.\r\n * @param _id Id of the menu button. Multiple menu buttons may be displayed.\r\n * @param _menuItemsProps Properties of the menu items to display.\r\n * @param _location Location of the context menu, relative to the origin of htmlElement or the window.\r\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\r\n * @return true if the button was displayed, false if the button could not be displayed.\r\n */\r\n public showMenuButton(_id: string, _menuItemsProps: AbstractMenuItemProps[], _location: XAndY, _htmlElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Hides a menu button.\r\n * @param _id Id of the menu button. Multiple menu buttons may be displayed.\r\n * @return true if the menu was hidden, false if the menu could not be hidden.\r\n */\r\n public hideMenuButton(_id: string): boolean { return false; }\r\n\r\n /** Show a calculator at a particular location.\r\n * @param _initialValue Value initially displayed in the calculator.\r\n * @param _resultIcon Icon displayed to the left of the value.\r\n * @param _location Location of the calculator, relative to the origin of htmlElement or the window.\r\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\r\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\r\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\r\n * @return true if the calculator was displayed, false if the calculator could not be displayed.\r\n */\r\n public showCalculator(_initialValue: number, _resultIcon: string, _location: XAndY, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Hides the calculator. */\r\n public hideCalculator(): boolean { return false; }\r\n\r\n /** Show an input editor for an angle value at a particular location.\r\n * @param _initialValue Value initially displayed in the editor.\r\n * @param _location Location of the editor, relative to the origin of htmlElement or the window.\r\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\r\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\r\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\r\n * @return true if the editor was displayed, false if the editor could not be displayed.\r\n */\r\n public showAngleEditor(_initialValue: number, _location: XAndY, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Show an input editor for a length value at a particular location.\r\n * @param _initialValue Value initially displayed in the editor.\r\n * @param _location Location of the editor, relative to the origin of htmlElement or the window.\r\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\r\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\r\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\r\n * @return true if the editor was displayed, false if the editor could not be displayed.\r\n */\r\n public showLengthEditor(_initialValue: number, _location: XAndY, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Show an input editor for a height value at a particular location.\r\n * @param _initialValue Value initially displayed in the editor.\r\n * @param _location Location of the editor, relative to the origin of htmlElement or the window.\r\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\r\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\r\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\r\n * @return true if the editor was displayed, false if the editor could not be displayed.\r\n */\r\n public showHeightEditor(_initialValue: number, _location: XAndY, _onCommit: OnNumberCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Show an input editor for a primitive value at a particular location.\r\n * @param _initialValue Value initially displayed in the editor.\r\n * @param _propertyDescription Description of the primitive value property.\r\n * @param _location Location of the editor, relative to the origin of htmlElement or the window.\r\n * @param _onCommit Function called when the OK button or the Enter key is pressed.\r\n * @param _onCancel Function called when the Cancel button or the Escape key is pressed.\r\n * @param _htmlElement The HTMLElement that anchors the context menu. If undefined, the location is relative to the overall window.\r\n * @return true if the editor was displayed, false if the editor could not be displayed.\r\n */\r\n public showInputEditor(_initialValue: Primitives.Value, _propertyDescription: PropertyDescription, _location: XAndY, _onCommit: OnValueCommitFunc, _onCancel: OnCancelFunc, _htmlElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Hides the input editor. */\r\n public hideInputEditor(): boolean { return false; }\r\n\r\n /** Show an HTML element at a particular location.\r\n * @param _displayElement The HTMLElement to display\r\n * @param _location Location of the tool settings, relative to the origin of anchorElement or the window\r\n * @param _offset Offset of the display element from the location\r\n * @param _onCancel Function invoked when the Escape key is pressed or a click occurs outside the display element\r\n * @param _relativePosition Position relative to the given location. Defaults to TopRight.\r\n * @param _anchorElement The HTMLElement that anchors the display element. If undefined, the location is relative to the overall window.\r\n * @return true if the display element was displayed, false if the display element could not be displayed.\r\n */\r\n public showHTMLElement(\r\n _displayElement: HTMLElement, _location: XAndY, _offset: XAndY, _onCancel: OnCancelFunc,\r\n _relativePosition?: RelativePosition, _anchorElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Hides the HTML Element. */\r\n public hideHTMLElement(): boolean { return false; }\r\n\r\n /** Show a Card containing content, a title and a toolbar at a particular location.\r\n * @param _content The HTMLElement of the content to display\r\n * @param _title Title to display at the top of the card.\r\n * @param _toolbarProps Properties of the Toolbar to display.\r\n * @param _location Location of the Card, relative to the origin of anchorElement or the window.\r\n * @param _offset Offset of the Card from the location.\r\n * @param _onItemExecuted Function invoked after a Toolbar item is executed\r\n * @param _onCancel Function invoked when the Escape key is pressed or a click occurs outside the Card\r\n * @param _relativePosition Position relative to the given location. Defaults to TopRight.\r\n * @param _anchorElement The HTMLElement that anchors the Card. If undefined, the location is relative to the overall window.\r\n * @return true if the Card was displayed, false if the Card could not be displayed.\r\n */\r\n public showCard(\r\n _content: HTMLElement, _title: string | PropertyRecord | undefined, _toolbarProps: AbstractToolbarProps | undefined,\r\n _location: XAndY, _offset: XAndY, _onItemExecuted: OnItemExecutedFunc, _onCancel: OnCancelFunc,\r\n _relativePosition?: RelativePosition, _anchorElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Hides the Card. */\r\n public hideCard(): boolean { return false; }\r\n\r\n /** Opens a Tool Settings Ui popup at a particular location.\r\n * @param _dataProvider The UiDataProvider for the tool settings\r\n * @param _location Location of the tool settings, relative to the origin of anchorElement or the window\r\n * @param _offset Offset of the tool settings from the location\r\n * @param _onCancel Function invoked when the Escape key is pressed or a click occurs outside the tool settings\r\n * @param _relativePosition Position relative to the given location. Defaults to TopRight.\r\n * @param _anchorElement The HTMLElement that anchors the tool settings. If undefined, the location is relative to the overall window.\r\n * @return true if the tool settings were displayed, false if the tool settings could not be displayed.\r\n */\r\n public openToolSettingsPopup(\r\n _dataProvider: UiDataProvider, _location: XAndY, _offset: XAndY, _onCancel: OnCancelFunc,\r\n _relativePosition?: RelativePosition, _anchorElement?: HTMLElement): boolean {\r\n return false;\r\n }\r\n\r\n /** Closes the Tool Settings Ui popup. */\r\n public closeToolSettingsPopup(): boolean { return false; }\r\n\r\n /** Show the Keyin Palette to display all support Tool key-ins.\r\n * @param _htmlElement The HTMLElement that anchors the Keyin Palette. If undefined, the location is relative to the overall window.\r\n * @return true if the Keyin Palette was displayed, false if it could not be displayed.\r\n */\r\n public showKeyinPalette(_htmlElement?: HTMLElement): boolean { return false; }\r\n\r\n /** Hides the Keyin Palette. */\r\n public hideKeyinPalette(): boolean { return false; }\r\n\r\n /** Send a UI event */\r\n public static sendUiEvent(args: GenericUiEventArgs) {\r\n UiAdmin.onGenericUiEvent.emit(args);\r\n }\r\n /** GenericUiEvent */\r\n public static readonly onGenericUiEvent = new GenericUiEvent();\r\n\r\n /** Opens a Dialog and automatically populates it using the properties defined by the UiDataProvider.\r\n * @param _uiDataProvider The DialogLayoutDataProvider for the dialog\r\n * @param _title Specify title for dialog.\r\n * @param _isModal Specify if the dialog is opened as a modal or modeless.\r\n * @param _id Id of the dialog that is used to close it.\r\n * @param _optionalProps Optional props for Dialog construction.\r\n * @return true if the tool settings were displayed, false if the tool settings could not be displayed.\r\n */\r\n public openDialog(_uiDataProvider: DialogLayoutDataProvider, _title: string, _isModal: boolean, _id: string,\r\n _optionalProps?: DialogProps): boolean {\r\n return false;\r\n }\r\n\r\n /** Closes the Dialog with a given Id. */\r\n public closeDialog(_dialogId: string): boolean { return false; }\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"KeyboardKey.js","sourceRoot":"","sources":["../../../../src/appui-abstract/common/KeyboardKey.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAoDH,gCAGC;AArDD;;GAEG;AACH,IAAY,WAaX;AAbD,WAAY,WAAW;IACrB,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,0BAAW,CAAA;IACX,0BAAW,CAAA;IACX,0BAAW,CAAA;AACb,CAAC,EAbW,WAAW,2BAAX,WAAW,QAatB;AAED;;GAEG;AACH,IAAY,UAwBX;AAxBD,WAAY,UAAU;IACpB,2BAAa,CAAA;IACb,yBAAW,CAAA;IACX,+BAAiB,CAAA;IACjB,mCAAqB,CAAA;IACrB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,yBAAW,CAAA;IACX,qCAAuB,CAAA;IACvB,uCAAyB,CAAA;IACzB,iCAAmB,CAAA;IACnB,qCAAuB,CAAA;IACvB,6BAAe,CAAA;IACf,uEAAuE;IACvE,8BAAgB,CAAA;IAChB,yBAAW,CAAA;IACX,qCAAuB,CAAA;IACvB,6BAAe,CAAA;IACf,+BAAiB,CAAA;IACjB,mCAAqB,CAAA;IACrB,mCAAqB,CAAA;IACrB,yBAAW,CAAA;IACX,iCAAmB,CAAA;AACrB,CAAC,EAxBW,UAAU,0BAAV,UAAU,QAwBrB;AAED;;GAEG;AACH,SAAgB,UAAU,CAAC,GAAW;IACpC,4DAA4D;IAC5D,OAAO,CAAC,GAAG,KAAK,UAAU,CAAC,SAAS,IAAI,GAAG,KAAK,UAAU,CAAC,UAAU,IAAI,GAAG,KAAK,UAAU,CAAC,OAAO,IAAI,GAAG,KAAK,UAAU,CAAC,SAAS,CAAC,CAAC;AACvI,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 Utilities\n */\n\n/** Enumeration for Function Keys\n * @public @deprecated in 4.3. Please use the `ts-key-enum` npm package or string literals.\n */\nexport enum FunctionKey {\n F1 = \"F1\",\n F2 = \"F2\",\n F3 = \"F3\",\n F4 = \"F4\",\n F5 = \"F5\",\n F6 = \"F6\",\n F7 = \"F7\",\n F8 = \"F8\",\n F9 = \"F9\",\n F10 = \"F10\",\n F11 = \"F11\",\n F12 = \"F12\",\n}\n\n/** Enumeration for Special Keys\n * @public @deprecated in 4.3. Please use the `ts-key-enum` npm package or string literals.\n */\nexport enum SpecialKey {\n Home = \"Home\",\n End = \"End\",\n PageUp = \"PageUp\",\n PageDown = \"PageDown\",\n Escape = \"Escape\",\n Delete = \"Delete\",\n Insert = \"Insert\",\n Tab = \"Tab\",\n ArrowLeft = \"ArrowLeft\",\n ArrowRight = \"ArrowRight\",\n ArrowUp = \"ArrowUp\",\n ArrowDown = \"ArrowDown\",\n Enter = \"Enter\",\n // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values\n Return = \"Enter\",\n Space = \" \",\n Backspace = \"Backspace\",\n Clear = \"Clear\",\n Divide = \"Divide\",\n Multiply = \"Multiply\",\n Subtract = \"Subtract\",\n Add = \"Add\",\n Decimal = \"Decimal\",\n}\n\n/** Determines if a KeyboardEvent.key is an Arrow key\n * @public @deprecated in 4.3. Please use a custom implementation moving forward.\n */\nexport function isArrowKey(key: string): boolean {\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n return (key === SpecialKey.ArrowLeft || key === SpecialKey.ArrowRight || key === SpecialKey.ArrowUp || key === SpecialKey.ArrowDown);\n}\n"]}
|
1
|
+
{"version":3,"file":"KeyboardKey.js","sourceRoot":"","sources":["../../../../src/appui-abstract/common/KeyboardKey.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAoDH,gCAGC;AArDD;;GAEG;AACH,IAAY,WAaX;AAbD,WAAY,WAAW;IACrB,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,wBAAS,CAAA;IACT,0BAAW,CAAA;IACX,0BAAW,CAAA;IACX,0BAAW,CAAA;AACb,CAAC,EAbW,WAAW,2BAAX,WAAW,QAatB;AAED;;GAEG;AACH,IAAY,UAwBX;AAxBD,WAAY,UAAU;IACpB,2BAAa,CAAA;IACb,yBAAW,CAAA;IACX,+BAAiB,CAAA;IACjB,mCAAqB,CAAA;IACrB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,+BAAiB,CAAA;IACjB,yBAAW,CAAA;IACX,qCAAuB,CAAA;IACvB,uCAAyB,CAAA;IACzB,iCAAmB,CAAA;IACnB,qCAAuB,CAAA;IACvB,6BAAe,CAAA;IACf,uEAAuE;IACvE,8BAAgB,CAAA;IAChB,yBAAW,CAAA;IACX,qCAAuB,CAAA;IACvB,6BAAe,CAAA;IACf,+BAAiB,CAAA;IACjB,mCAAqB,CAAA;IACrB,mCAAqB,CAAA;IACrB,yBAAW,CAAA;IACX,iCAAmB,CAAA;AACrB,CAAC,EAxBW,UAAU,0BAAV,UAAU,QAwBrB;AAED;;GAEG;AACH,SAAgB,UAAU,CAAC,GAAW;IACpC,4DAA4D;IAC5D,OAAO,CAAC,GAAG,KAAK,UAAU,CAAC,SAAS,IAAI,GAAG,KAAK,UAAU,CAAC,UAAU,IAAI,GAAG,KAAK,UAAU,CAAC,OAAO,IAAI,GAAG,KAAK,UAAU,CAAC,SAAS,CAAC,CAAC;AACvI,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Utilities\r\n */\r\n\r\n/** Enumeration for Function Keys\r\n * @public @deprecated in 4.3. Please use the `ts-key-enum` npm package or string literals.\r\n */\r\nexport enum FunctionKey {\r\n F1 = \"F1\",\r\n F2 = \"F2\",\r\n F3 = \"F3\",\r\n F4 = \"F4\",\r\n F5 = \"F5\",\r\n F6 = \"F6\",\r\n F7 = \"F7\",\r\n F8 = \"F8\",\r\n F9 = \"F9\",\r\n F10 = \"F10\",\r\n F11 = \"F11\",\r\n F12 = \"F12\",\r\n}\r\n\r\n/** Enumeration for Special Keys\r\n * @public @deprecated in 4.3. Please use the `ts-key-enum` npm package or string literals.\r\n */\r\nexport enum SpecialKey {\r\n Home = \"Home\",\r\n End = \"End\",\r\n PageUp = \"PageUp\",\r\n PageDown = \"PageDown\",\r\n Escape = \"Escape\",\r\n Delete = \"Delete\",\r\n Insert = \"Insert\",\r\n Tab = \"Tab\",\r\n ArrowLeft = \"ArrowLeft\",\r\n ArrowRight = \"ArrowRight\",\r\n ArrowUp = \"ArrowUp\",\r\n ArrowDown = \"ArrowDown\",\r\n Enter = \"Enter\",\r\n // eslint-disable-next-line @typescript-eslint/no-duplicate-enum-values\r\n Return = \"Enter\",\r\n Space = \" \",\r\n Backspace = \"Backspace\",\r\n Clear = \"Clear\",\r\n Divide = \"Divide\",\r\n Multiply = \"Multiply\",\r\n Subtract = \"Subtract\",\r\n Add = \"Add\",\r\n Decimal = \"Decimal\",\r\n}\r\n\r\n/** Determines if a KeyboardEvent.key is an Arrow key\r\n * @public @deprecated in 4.3. Please use a custom implementation moving forward.\r\n */\r\nexport function isArrowKey(key: string): boolean {\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n return (key === SpecialKey.ArrowLeft || key === SpecialKey.ArrowRight || key === SpecialKey.ArrowUp || key === SpecialKey.ArrowDown);\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ContentLayoutProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/content/ContentLayoutProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 ContentView\n */\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** Base interface for layout split properties\n * @public\n * @deprecated in 4.10.x. Use `LayoutSplitPropsBase` from `@itwin/appui-react`.\n */\nexport interface LayoutSplitPropsBase {\n /** The id used to save the current state of the splitter */\n id: string;\n /** The percentage of this layout that should be occupied by the top/left fragment by default */\n percentage: number;\n /** Used to lock splitter into fixed position. Defaults to false. */\n lock?: boolean;\n}\n\n/** Properties for a layout fragment\n * @public\n * @deprecated in 4.10.x. Use `LayoutFragmentProps` from `@itwin/appui-react`.\n */\nexport interface LayoutFragmentProps {\n /** Vertical split layout properties */\n verticalSplit?: LayoutVerticalSplitProps;\n /** Horizontal split layout properties */\n horizontalSplit?: LayoutHorizontalSplitProps;\n}\n\n/** Properties for a vertical layout split.\n * When a member is a [[LayoutFragmentProps]], it creates a nested split pane.\n * When a number, it represents an index into a [[ContentGroup]].\n * @public\n * @deprecated in 4.10.x. Use `LayoutVerticalSplitProps` from `@itwin/appui-react`.\n */\nexport interface LayoutVerticalSplitProps extends LayoutSplitPropsBase {\n /** Left layout fragment properties. */\n left: LayoutFragmentProps | number;\n /** Right layout fragment properties. */\n right: LayoutFragmentProps | number;\n\n /** Minimum size of the left fragment. */\n minSizeLeft?: number;\n /** Minimum size of the right fragment. */\n minSizeRight?: number;\n}\n\n/** Properties for a horizontal layout split\n * When a member is a [[LayoutFragmentProps]], it creates a nested split pane.\n * When a number, it represents an index into a [[ContentGroup]].\n * @public\n * @deprecated in 4.10.x. Use `LayoutHorizontalSplitProps` from `@itwin/appui-react`.\n */\nexport interface LayoutHorizontalSplitProps extends LayoutSplitPropsBase {\n /** Top layout fragment properties. */\n top: LayoutFragmentProps | number;\n /** Bottom layout fragment properties. */\n bottom: LayoutFragmentProps | number;\n\n /** Minimum size of the top fragment. */\n minSizeTop?: number;\n /** Minimum size of the bottom fragment. */\n minSizeBottom?: number;\n}\n\n/** Properties for a [[ContentLayoutDef]]\n * @public\n * @deprecated in 4.10.x. Use `ContentLayoutProps` from `@itwin/appui-react`.\n */\nexport interface ContentLayoutProps extends LayoutFragmentProps {\n /** ID for this Content Layout */\n id: string;\n /** Description of the layout*/\n description?: string;\n}\n"]}
|
1
|
+
{"version":3,"file":"ContentLayoutProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/content/ContentLayoutProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContentView\r\n */\r\n\r\n/* eslint-disable @typescript-eslint/no-deprecated */\r\n\r\n/** Base interface for layout split properties\r\n * @public\r\n * @deprecated in 4.10.x. Use `LayoutSplitPropsBase` from `@itwin/appui-react`.\r\n */\r\nexport interface LayoutSplitPropsBase {\r\n /** The id used to save the current state of the splitter */\r\n id: string;\r\n /** The percentage of this layout that should be occupied by the top/left fragment by default */\r\n percentage: number;\r\n /** Used to lock splitter into fixed position. Defaults to false. */\r\n lock?: boolean;\r\n}\r\n\r\n/** Properties for a layout fragment\r\n * @public\r\n * @deprecated in 4.10.x. Use `LayoutFragmentProps` from `@itwin/appui-react`.\r\n */\r\nexport interface LayoutFragmentProps {\r\n /** Vertical split layout properties */\r\n verticalSplit?: LayoutVerticalSplitProps;\r\n /** Horizontal split layout properties */\r\n horizontalSplit?: LayoutHorizontalSplitProps;\r\n}\r\n\r\n/** Properties for a vertical layout split.\r\n * When a member is a [[LayoutFragmentProps]], it creates a nested split pane.\r\n * When a number, it represents an index into a [[ContentGroup]].\r\n * @public\r\n * @deprecated in 4.10.x. Use `LayoutVerticalSplitProps` from `@itwin/appui-react`.\r\n */\r\nexport interface LayoutVerticalSplitProps extends LayoutSplitPropsBase {\r\n /** Left layout fragment properties. */\r\n left: LayoutFragmentProps | number;\r\n /** Right layout fragment properties. */\r\n right: LayoutFragmentProps | number;\r\n\r\n /** Minimum size of the left fragment. */\r\n minSizeLeft?: number;\r\n /** Minimum size of the right fragment. */\r\n minSizeRight?: number;\r\n}\r\n\r\n/** Properties for a horizontal layout split\r\n * When a member is a [[LayoutFragmentProps]], it creates a nested split pane.\r\n * When a number, it represents an index into a [[ContentGroup]].\r\n * @public\r\n * @deprecated in 4.10.x. Use `LayoutHorizontalSplitProps` from `@itwin/appui-react`.\r\n */\r\nexport interface LayoutHorizontalSplitProps extends LayoutSplitPropsBase {\r\n /** Top layout fragment properties. */\r\n top: LayoutFragmentProps | number;\r\n /** Bottom layout fragment properties. */\r\n bottom: LayoutFragmentProps | number;\r\n\r\n /** Minimum size of the top fragment. */\r\n minSizeTop?: number;\r\n /** Minimum size of the bottom fragment. */\r\n minSizeBottom?: number;\r\n}\r\n\r\n/** Properties for a [[ContentLayoutDef]]\r\n * @public\r\n * @deprecated in 4.10.x. Use `ContentLayoutProps` from `@itwin/appui-react`.\r\n */\r\nexport interface ContentLayoutProps extends LayoutFragmentProps {\r\n /** ID for this Content Layout */\r\n id: string;\r\n /** Description of the layout*/\r\n description?: string;\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"StandardContentLayouts.js","sourceRoot":"","sources":["../../../../src/appui-abstract/content/StandardContentLayouts.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH,qDAAqD;AAErD;;;;GAIG;AACH,MAAa,sBAAsB;IAC1B,MAAM,CAAU,UAAU,GAAuB;QACtD,EAAE,EAAE,gBAAgB;QACpB,WAAW,EAAE,qBAAqB;KACnC,CAAC;IAEK,MAAM,CAAU,aAAa,GAAuB;QACzD,EAAE,EAAE,mBAAmB;QACvB,WAAW,EAAE,+DAA+D;QAC5E,aAAa,EAAE;YACb,EAAE,EAAE,+BAA+B;YACnC,UAAU,EAAE,IAAI;YAChB,IAAI,EAAE,KAAK;YACX,WAAW,EAAE,GAAG;YAChB,YAAY,EAAE,GAAG;YACjB,IAAI,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,EAAE,iCAAiC,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE;YACzJ,KAAK,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,EAAE,kCAAkC,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE;SAC5J;KACF,CAAC;IAEK,MAAM,CAAU,gBAAgB,GAAuB;QAC5D,EAAE,EAAE,sBAAsB;QAC1B,WAAW,EAAE,yBAAyB;QACtC,aAAa,EAAE;YACb,EAAE,EAAE,2BAA2B;Y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W,EAAE,4DAA4D;QACzE,eAAe,EAAE;YACf,EAAE,EAAE,qCAAqC;YACzC,UAAU,EAAE,IAAI;YAChB,IAAI,EAAE,KAAK;YACX,GAAG,EAAE,CAAC;YACN,MAAM,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE,8BAA8B,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,EAAE;SACvJ;KACF,CAAC;IAEK,MAAM,CAAU,kBAAkB,GAAuB;QAC9D,EAAE,EAAE,wBAAwB;QAC5B,WAAW,EAAE,4DAA4D;QACzE,eAAe,EAAE;YACf,EAAE,EAAE,6BAA6B;YACjC,UAAU,EAAE,IAAI;YAChB,IAAI,EAAE,KAAK;YACX,GAAG,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE,2BAA2B,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,EAAE;YAChJ,MAAM,EAAE,CAAC;SACV;KACF,CAAC;IAEF,yDAAyD;IAClD,MAAM,CAAU,gBAAgB,GAAyB;QAC9D,sBAAsB,CAAC,UAAU;QACjC,sBAAsB,CAAC,aAAa;QACpC,sBAAsB,CAAC,gBAAgB;QACvC,sBAAsB,CAAC,kBAAkB;QACzC,sBAAsB,CAAC,mBAAmB;QAC1C,sBAAsB,CAAC,oBAAoB;QAC3C,sBAAsB,CAAC,qBAAqB;QAC5C,sBAAsB,CAAC,kBAAkB;KAC1C,CAAC;;AAlGJ,wDAoGC","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 ContentView\n */\n\nimport { ContentLayoutProps } from \"./ContentLayoutProps\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/**\n * Class that define Standard Content Layouts that can be used to specify how the content is arranged in a frontstage.\n * @public\n * @deprecated in 4.10.x. Use `StandardContentLayouts` from `@itwin/appui-react`.\n */\nexport class StandardContentLayouts {\n public static readonly singleView: ContentLayoutProps = {\n id: \"uia:singleView\",\n description: \"Single Content View\",\n };\n\n public static readonly fourQuadrants: ContentLayoutProps = {\n id: \"uia:fourQuadrants\",\n description: \"Four Views, two stacked on the left, two stacked on the right\",\n verticalSplit: {\n id: \"uia:fourQuadrantVerticalSplit\",\n percentage: 0.50,\n lock: false,\n minSizeLeft: 100,\n minSizeRight: 100,\n left: { horizontalSplit: { id: \"uia:fourQuadrantsLeftHorizontal\", percentage: 0.50, top: 0, bottom: 1, lock: false, minSizeTop: 50, minSizeBottom: 50 } },\n right: { horizontalSplit: { id: \"uia:fourQuadrantsRightHorizontal\", percentage: 0.50, top: 2, bottom: 3, lock: false, minSizeTop: 50, minSizeBottom: 50 } },\n },\n };\n\n public static readonly twoVerticalSplit: ContentLayoutProps = {\n id: \"uia:twoVerticalSplit\",\n description: \"Two Views, side by side\",\n verticalSplit: {\n id: \"uia:twoViewsVerticalSplit\",\n percentage: 0.50,\n left: 0,\n right: 1,\n },\n };\n public static readonly twoHorizontalSplit: ContentLayoutProps = {\n id: \"uia:twoHorizontalSplit\",\n description: \"Two views, stack one on top of the other\",\n horizontalSplit: {\n id: \"uia:twoViewsHorizontalSplit\",\n percentage: 0.50,\n lock: false,\n top: 0,\n bottom: 1,\n },\n };\n\n public static readonly threeViewsTwoOnLeft: ContentLayoutProps = {\n id: \"uia:threeViewsTwoOnLeft\",\n description: \"Three views, one on the right with the two on the left stacked one of top of the other\",\n verticalSplit: {\n id: \"uia:twoViewsOnLeftSplit\",\n percentage: 0.50,\n left: { horizontalSplit: { id: \"uia:twoViewsOnLeftHorizontal\", percentage: 0.50, top: 0, bottom: 1, lock: false, minSizeTop: 50, minSizeBottom: 50 } },\n right: 2,\n },\n };\n\n public static readonly threeViewsTwoOnRight: ContentLayoutProps = {\n id: \"uia:threeViewsTwoOnRight\",\n description: \"Three views, one on the left with the two on the right stacked one of top of the other\",\n verticalSplit: {\n id: \"uia:twoViewsOnRightSplit\",\n percentage: 0.50,\n left: 0,\n right: { horizontalSplit: { id: \"uia:twoViewsOnRightHorizontal\", percentage: 0.50, top: 1, bottom: 2, lock: false, minSizeTop: 50, minSizeBottom: 50 } },\n },\n };\n\n public static readonly threeViewsTwoOnBottom: ContentLayoutProps = {\n id: \"uia:threeViewsTwoOnBottom\",\n description: \"Three Views, one on top and two side by side on the bottom\",\n horizontalSplit: {\n id: \"uia:threeViewsTwoOnBottomHorizontal\",\n percentage: 0.50,\n lock: false,\n top: 0,\n bottom: { verticalSplit: { id: \"uia:twoViewsOnBottomVertical\", percentage: 0.50, left: 1, right: 2, lock: false, minSizeLeft: 50, minSizeRight: 50 } },\n },\n };\n\n public static readonly threeViewsTwoOnTop: ContentLayoutProps = {\n id: \"uia:threeViewsTwoOnTop\",\n description: \"Three Views, two side by side on top and one on the bottom\",\n horizontalSplit: {\n id: \"uia:twoViewsOnTopHorizontal\",\n percentage: 0.50,\n lock: false,\n top: { verticalSplit: { id: \"uia:twoViewsOnTopVertical\", percentage: 0.50, left: 0, right: 1, lock: false, minSizeLeft: 50, minSizeRight: 50 } },\n bottom: 2,\n },\n };\n\n // provides and iterable list of standard content layouts\n public static readonly availableLayouts: ContentLayoutProps[] = [\n StandardContentLayouts.singleView,\n StandardContentLayouts.fourQuadrants,\n StandardContentLayouts.twoVerticalSplit,\n StandardContentLayouts.twoHorizontalSplit,\n StandardContentLayouts.threeViewsTwoOnLeft,\n StandardContentLayouts.threeViewsTwoOnRight,\n StandardContentLayouts.threeViewsTwoOnBottom,\n StandardContentLayouts.threeViewsTwoOnTop,\n ];\n\n}\n"]}
|
1
|
+
{"version":3,"file":"StandardContentLayouts.js","sourceRoot":"","sources":["../../../../src/appui-abstract/content/StandardContentLayouts.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH,qDAAqD;AAErD;;;;GAIG;AACH,MAAa,sBAAsB;IAC1B,MAAM,CAAU,UAAU,GAAuB;QACtD,EAAE,EAAE,gBAAgB;QACpB,WAAW,EAAE,qBAAqB;KACnC,CAAC;IAEK,MAAM,CAAU,aAAa,GAAuB;QACzD,EAAE,EAAE,mBAAmB;QACvB,WAAW,EAAE,+DAA+D;QAC5E,aAAa,EAAE;YACb,EAAE,EAAE,+BAA+B;YACnC,UAAU,EAAE,IAAI;YAChB,IAAI,EAAE,KAAK;YACX,WAAW,EAAE,GAAG;YAChB,YAAY,EAAE,GAAG;YACjB,IAAI,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,EAAE,iCAAiC,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE;YACzJ,KAAK,EAAE,EAAE,eAAe,EAAE,EAAE,EAAE,EAAE,kCAAkC,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,UAAU,EAAE,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE;SAC5J;KACF,CAAC;IAEK,MAAM,CAAU,gBAAgB,GAAuB;QAC5D,EAAE,EAAE,sBAAsB;QAC1B,WAAW,EAAE,yBAAyB;QACtC,aAAa,EAAE;YACb,EAAE,EAAE,2BAA2B;YAC/B,UAAU,EAAE,IAAI;YAChB,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,CAAC;SACT;KACF,CAAC;IACK,MAAM,CAAU,kBAAkB,GAAuB;QAC9D,EAAE,EAAE,wBAAwB;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,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE,8BAA8B,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,EAAE;SACvJ;KACF,CAAC;IAEK,MAAM,CAAU,kBAAkB,GAAuB;QAC9D,EAAE,EAAE,wBAAwB;QAC5B,WAAW,EAAE,4DAA4D;QACzE,eAAe,EAAE;YACf,EAAE,EAAE,6BAA6B;YACjC,UAAU,EAAE,IAAI;YAChB,IAAI,EAAE,KAAK;YACX,GAAG,EAAE,EAAE,aAAa,EAAE,EAAE,EAAE,EAAE,2BAA2B,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,EAAE;YAChJ,MAAM,EAAE,CAAC;SACV;KACF,CAAC;IAEF,yDAAyD;IAClD,MAAM,CAAU,gBAAgB,GAAyB;QAC9D,sBAAsB,CAAC,UAAU;QACjC,sBAAsB,CAAC,aAAa;QACpC,sBAAsB,CAAC,gBAAgB;QACvC,sBAAsB,CAAC,kBAAkB;QACzC,sBAAsB,CAAC,mBAAmB;QAC1C,sBAAsB,CAAC,oBAAoB;QAC3C,sBAAsB,CAAC,qBAAqB;QAC5C,sBAAsB,CAAC,kBAAkB;KAC1C,CAAC;;AAlGJ,wDAoGC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module ContentView\r\n */\r\n\r\nimport { ContentLayoutProps } from \"./ContentLayoutProps\";\r\n\r\n/* eslint-disable @typescript-eslint/no-deprecated */\r\n\r\n/**\r\n * Class that define Standard Content Layouts that can be used to specify how the content is arranged in a frontstage.\r\n * @public\r\n * @deprecated in 4.10.x. Use `StandardContentLayouts` from `@itwin/appui-react`.\r\n */\r\nexport class StandardContentLayouts {\r\n public static readonly singleView: ContentLayoutProps = {\r\n id: \"uia:singleView\",\r\n description: \"Single Content View\",\r\n };\r\n\r\n public static readonly fourQuadrants: ContentLayoutProps = {\r\n id: \"uia:fourQuadrants\",\r\n description: \"Four Views, two stacked on the left, two stacked on the right\",\r\n verticalSplit: {\r\n id: \"uia:fourQuadrantVerticalSplit\",\r\n percentage: 0.50,\r\n lock: false,\r\n minSizeLeft: 100,\r\n minSizeRight: 100,\r\n left: { horizontalSplit: { id: \"uia:fourQuadrantsLeftHorizontal\", percentage: 0.50, top: 0, bottom: 1, lock: false, minSizeTop: 50, minSizeBottom: 50 } },\r\n right: { horizontalSplit: { id: \"uia:fourQuadrantsRightHorizontal\", percentage: 0.50, top: 2, bottom: 3, lock: false, minSizeTop: 50, minSizeBottom: 50 } },\r\n },\r\n };\r\n\r\n public static readonly twoVerticalSplit: ContentLayoutProps = {\r\n id: \"uia:twoVerticalSplit\",\r\n description: \"Two Views, side by side\",\r\n verticalSplit: {\r\n id: \"uia:twoViewsVerticalSplit\",\r\n percentage: 0.50,\r\n left: 0,\r\n right: 1,\r\n },\r\n };\r\n public static readonly twoHorizontalSplit: ContentLayoutProps = {\r\n id: \"uia:twoHorizontalSplit\",\r\n description: \"Two views, stack one on top of the other\",\r\n horizontalSplit: {\r\n id: \"uia:twoViewsHorizontalSplit\",\r\n percentage: 0.50,\r\n lock: false,\r\n top: 0,\r\n bottom: 1,\r\n },\r\n };\r\n\r\n public static readonly threeViewsTwoOnLeft: ContentLayoutProps = {\r\n id: \"uia:threeViewsTwoOnLeft\",\r\n description: \"Three views, one on the right with the two on the left stacked one of top of the other\",\r\n verticalSplit: {\r\n id: \"uia:twoViewsOnLeftSplit\",\r\n percentage: 0.50,\r\n left: { horizontalSplit: { id: \"uia:twoViewsOnLeftHorizontal\", percentage: 0.50, top: 0, bottom: 1, lock: false, minSizeTop: 50, minSizeBottom: 50 } },\r\n right: 2,\r\n },\r\n };\r\n\r\n public static readonly threeViewsTwoOnRight: ContentLayoutProps = {\r\n id: \"uia:threeViewsTwoOnRight\",\r\n description: \"Three views, one on the left with the two on the right stacked one of top of the other\",\r\n verticalSplit: {\r\n id: \"uia:twoViewsOnRightSplit\",\r\n percentage: 0.50,\r\n left: 0,\r\n right: { horizontalSplit: { id: \"uia:twoViewsOnRightHorizontal\", percentage: 0.50, top: 1, bottom: 2, lock: false, minSizeTop: 50, minSizeBottom: 50 } },\r\n },\r\n };\r\n\r\n public static readonly threeViewsTwoOnBottom: ContentLayoutProps = {\r\n id: \"uia:threeViewsTwoOnBottom\",\r\n description: \"Three Views, one on top and two side by side on the bottom\",\r\n horizontalSplit: {\r\n id: \"uia:threeViewsTwoOnBottomHorizontal\",\r\n percentage: 0.50,\r\n lock: false,\r\n top: 0,\r\n bottom: { verticalSplit: { id: \"uia:twoViewsOnBottomVertical\", percentage: 0.50, left: 1, right: 2, lock: false, minSizeLeft: 50, minSizeRight: 50 } },\r\n },\r\n };\r\n\r\n public static readonly threeViewsTwoOnTop: ContentLayoutProps = {\r\n id: \"uia:threeViewsTwoOnTop\",\r\n description: \"Three Views, two side by side on top and one on the bottom\",\r\n horizontalSplit: {\r\n id: \"uia:twoViewsOnTopHorizontal\",\r\n percentage: 0.50,\r\n lock: false,\r\n top: { verticalSplit: { id: \"uia:twoViewsOnTopVertical\", percentage: 0.50, left: 0, right: 1, lock: false, minSizeLeft: 50, minSizeRight: 50 } },\r\n bottom: 2,\r\n },\r\n };\r\n\r\n // provides and iterable list of standard content layouts\r\n public static readonly availableLayouts: ContentLayoutProps[] = [\r\n StandardContentLayouts.singleView,\r\n StandardContentLayouts.fourQuadrants,\r\n StandardContentLayouts.twoVerticalSplit,\r\n StandardContentLayouts.twoHorizontalSplit,\r\n StandardContentLayouts.threeViewsTwoOnLeft,\r\n StandardContentLayouts.threeViewsTwoOnRight,\r\n StandardContentLayouts.threeViewsTwoOnBottom,\r\n StandardContentLayouts.threeViewsTwoOnTop,\r\n ];\r\n\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"DialogItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/dialogs/DialogItem.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAqDH;;GAEG;AACH,MAAa,cAAc;IACN;IAA0C;IAAmB;IAAgC;IAAhH,YAAmB,WAAgC,EAAU,MAAS,EAAU,aAAsB,EAAU,WAAqB;QAAlH,gBAAW,GAAX,WAAW,CAAqB;QAAU,WAAM,GAAN,MAAM,CAAG;QAAU,kBAAa,GAAb,aAAa,CAAS;QAAU,gBAAW,GAAX,WAAW,CAAU;IAAI,CAAC;IAE1I,IAAW,UAAU;QACnB,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,IAAW,UAAU,CAAC,GAAY;QAChC,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC;IACzB,CAAC;IAED,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,IAAW,KAAK,CAAC,GAAM;QACrB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;IACpB,CAAC;IAED,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IAC/B,CAAC;IAED,IAAW,YAAY,CAAC,GAAuB;QAC7C,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC;IAC3B,CAAC;IAED,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,IAAW,eAAe;QACxB,uBAAuB;QACvB,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,WAAW,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,YAAY,IAAI;YAC7K,OAAO;gBACL,KAAK,EAAE,IAAI,CAAC,MAAM;gBAClB,YAAY,EAAE,IAAI,CAAC,aAAa;aACd,CAAC;QACvB,uBAAuB;QACvB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAC9C,CAAC;IAED,IAAW,eAAe,CAAC,GAAoB;QAC7C,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,KAAqB,CAAC;QACxC,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC,YAAY,CAAC;IACxC,CAAC;IAED,IAAW,QAAQ;QACjB,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,EAAE,CAAC;IAC9E,CAAC;IAED,IAAW,IAAI;QACb,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC;IAClE,CAAC;IAEM,YAAY,CAAC,cAA8B,EAAE,YAAyB;QAC3E,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,CAAC;IACjI,CAAC;CACF;AA3DD,wCA2DC","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 Dialog\n */\n\nimport { PropertyDescription } from \"../properties/Description\";\n\n/** [[DialogItemValue]] Interface of PrimitiveValue types that have type editor support for use in dialogs.\n * @public\n */\nexport interface DialogItemValue {\n value?: number | string | boolean | Date;\n displayValue?: string;\n}\n/** [[EditorPosition]] Interface used to identify the location of the item a DialogItem property value.\n * @public\n */\nexport interface EditorPosition {\n /** Determine the order the row is shown in UI */\n rowPriority: number;\n /** Determines the column position for the type editor */\n columnIndex: number;\n}\n\n/** [[BaseDialogItem]] contains only the members necessary to create a PropertyRecord.\n * @public\n */\nexport interface BaseDialogItem {\n readonly value: DialogItemValue;\n readonly property: PropertyDescription;\n readonly isDisabled?: boolean;\n}\n/** [[DialogItem]] is the specification that the display engine turns into a UI item.\n * @public\n */\nexport interface DialogItem extends BaseDialogItem {\n readonly editorPosition: EditorPosition;\n readonly lockProperty?: BaseDialogItem;\n}\n\n/** [[DialogPropertyItem]] is the specification to use if you are defining the components directly, e.g., in React\n * @public\n */\nexport interface DialogPropertyItem {\n readonly value: DialogItemValue;\n readonly propertyName: string;\n}\n\n/** [[DialogPropertySyncItem]] is used to pass sync messages for DialogPropertyItems\n * @public\n */\nexport interface DialogPropertySyncItem extends DialogPropertyItem {\n readonly isDisabled?: boolean;\n readonly property?: PropertyDescription;\n}\n\n/** [[DialogProperty]] is a generic helper class that assists working with properties used by UiLayoutDataProvider implementations (i.e. Tool Settings and Dynamic Dialogs).\n * @public\n */\nexport class DialogProperty<T> {\n constructor(public description: PropertyDescription, private _value: T, private _displayValue?: string, private _isDisabled?: boolean) { }\n\n public get isDisabled() {\n return !!this._isDisabled;\n }\n\n public set isDisabled(val: boolean) {\n this._isDisabled = val;\n }\n\n public get value() {\n return this._value;\n }\n\n public set value(val: T) {\n this._value = val;\n }\n\n public get name() {\n return this.description.name;\n }\n\n public set displayValue(val: string | undefined) {\n this._displayValue = val;\n }\n\n public get displayValue() {\n return this._displayValue;\n }\n\n public get dialogItemValue() {\n // istanbul ignore else\n if (typeof this._value === \"string\" || typeof this._value === \"number\" || typeof this._value === \"undefined\" || typeof this._value === \"boolean\" || this._value instanceof Date)\n return {\n value: this._value,\n displayValue: this._displayValue,\n } as DialogItemValue;\n // istanbul ignore next\n throw new Error(\"Not valid primitive type\");\n }\n\n public set dialogItemValue(val: DialogItemValue) {\n this._value = val.value as unknown as T;\n this._displayValue = val.displayValue;\n }\n\n public get syncItem(): DialogPropertySyncItem {\n const isDisabled = this._isDisabled;\n return { propertyName: this.name, value: this.dialogItemValue, isDisabled };\n }\n\n public get item(): DialogPropertyItem {\n return { propertyName: this.name, value: this.dialogItemValue };\n }\n\n public toDialogItem(editorPosition: EditorPosition, lockProperty?: DialogItem): DialogItem {\n return { value: this.dialogItemValue, property: this.description, editorPosition, isDisabled: this._isDisabled, lockProperty };\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"DialogItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/dialogs/DialogItem.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAqDH;;GAEG;AACH,MAAa,cAAc;IACN;IAA0C;IAAmB;IAAgC;IAAhH,YAAmB,WAAgC,EAAU,MAAS,EAAU,aAAsB,EAAU,WAAqB;QAAlH,gBAAW,GAAX,WAAW,CAAqB;QAAU,WAAM,GAAN,MAAM,CAAG;QAAU,kBAAa,GAAb,aAAa,CAAS;QAAU,gBAAW,GAAX,WAAW,CAAU;IAAI,CAAC;IAE1I,IAAW,UAAU;QACnB,OAAO,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC;IAC5B,CAAC;IAED,IAAW,UAAU,CAAC,GAAY;QAChC,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC;IACzB,CAAC;IAED,IAAW,KAAK;QACd,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,IAAW,KAAK,CAAC,GAAM;QACrB,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC;IACpB,CAAC;IAED,IAAW,IAAI;QACb,OAAO,IAAI,CAAC,WAAW,CAAC,IAAI,CAAC;IAC/B,CAAC;IAED,IAAW,YAAY,CAAC,GAAuB;QAC7C,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC;IAC3B,CAAC;IAED,IAAW,YAAY;QACrB,OAAO,IAAI,CAAC,aAAa,CAAC;IAC5B,CAAC;IAED,IAAW,eAAe;QACxB,uBAAuB;QACvB,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,QAAQ,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,WAAW,IAAI,OAAO,IAAI,CAAC,MAAM,KAAK,SAAS,IAAI,IAAI,CAAC,MAAM,YAAY,IAAI;YAC7K,OAAO;gBACL,KAAK,EAAE,IAAI,CAAC,MAAM;gBAClB,YAAY,EAAE,IAAI,CAAC,aAAa;aACd,CAAC;QACvB,uBAAuB;QACvB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAC9C,CAAC;IAED,IAAW,eAAe,CAAC,GAAoB;QAC7C,IAAI,CAAC,MAAM,GAAG,GAAG,CAAC,KAAqB,CAAC;QACxC,IAAI,CAAC,aAAa,GAAG,GAAG,CAAC,YAAY,CAAC;IACxC,CAAC;IAED,IAAW,QAAQ;QACjB,MAAM,UAAU,GAAG,IAAI,CAAC,WAAW,CAAC;QACpC,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,UAAU,EAAE,CAAC;IAC9E,CAAC;IAED,IAAW,IAAI;QACb,OAAO,EAAE,YAAY,EAAE,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,CAAC;IAClE,CAAC;IAEM,YAAY,CAAC,cAA8B,EAAE,YAAyB;QAC3E,OAAO,EAAE,KAAK,EAAE,IAAI,CAAC,eAAe,EAAE,QAAQ,EAAE,IAAI,CAAC,WAAW,EAAE,cAAc,EAAE,UAAU,EAAE,IAAI,CAAC,WAAW,EAAE,YAAY,EAAE,CAAC;IACjI,CAAC;CACF;AA3DD,wCA2DC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\nimport { PropertyDescription } from \"../properties/Description\";\r\n\r\n/** [[DialogItemValue]] Interface of PrimitiveValue types that have type editor support for use in dialogs.\r\n * @public\r\n */\r\nexport interface DialogItemValue {\r\n value?: number | string | boolean | Date;\r\n displayValue?: string;\r\n}\r\n/** [[EditorPosition]] Interface used to identify the location of the item a DialogItem property value.\r\n * @public\r\n */\r\nexport interface EditorPosition {\r\n /** Determine the order the row is shown in UI */\r\n rowPriority: number;\r\n /** Determines the column position for the type editor */\r\n columnIndex: number;\r\n}\r\n\r\n/** [[BaseDialogItem]] contains only the members necessary to create a PropertyRecord.\r\n * @public\r\n */\r\nexport interface BaseDialogItem {\r\n readonly value: DialogItemValue;\r\n readonly property: PropertyDescription;\r\n readonly isDisabled?: boolean;\r\n}\r\n/** [[DialogItem]] is the specification that the display engine turns into a UI item.\r\n * @public\r\n */\r\nexport interface DialogItem extends BaseDialogItem {\r\n readonly editorPosition: EditorPosition;\r\n readonly lockProperty?: BaseDialogItem;\r\n}\r\n\r\n/** [[DialogPropertyItem]] is the specification to use if you are defining the components directly, e.g., in React\r\n * @public\r\n */\r\nexport interface DialogPropertyItem {\r\n readonly value: DialogItemValue;\r\n readonly propertyName: string;\r\n}\r\n\r\n/** [[DialogPropertySyncItem]] is used to pass sync messages for DialogPropertyItems\r\n * @public\r\n */\r\nexport interface DialogPropertySyncItem extends DialogPropertyItem {\r\n readonly isDisabled?: boolean;\r\n readonly property?: PropertyDescription;\r\n}\r\n\r\n/** [[DialogProperty]] is a generic helper class that assists working with properties used by UiLayoutDataProvider implementations (i.e. Tool Settings and Dynamic Dialogs).\r\n * @public\r\n */\r\nexport class DialogProperty<T> {\r\n constructor(public description: PropertyDescription, private _value: T, private _displayValue?: string, private _isDisabled?: boolean) { }\r\n\r\n public get isDisabled() {\r\n return !!this._isDisabled;\r\n }\r\n\r\n public set isDisabled(val: boolean) {\r\n this._isDisabled = val;\r\n }\r\n\r\n public get value() {\r\n return this._value;\r\n }\r\n\r\n public set value(val: T) {\r\n this._value = val;\r\n }\r\n\r\n public get name() {\r\n return this.description.name;\r\n }\r\n\r\n public set displayValue(val: string | undefined) {\r\n this._displayValue = val;\r\n }\r\n\r\n public get displayValue() {\r\n return this._displayValue;\r\n }\r\n\r\n public get dialogItemValue() {\r\n // istanbul ignore else\r\n if (typeof this._value === \"string\" || typeof this._value === \"number\" || typeof this._value === \"undefined\" || typeof this._value === \"boolean\" || this._value instanceof Date)\r\n return {\r\n value: this._value,\r\n displayValue: this._displayValue,\r\n } as DialogItemValue;\r\n // istanbul ignore next\r\n throw new Error(\"Not valid primitive type\");\r\n }\r\n\r\n public set dialogItemValue(val: DialogItemValue) {\r\n this._value = val.value as unknown as T;\r\n this._displayValue = val.displayValue;\r\n }\r\n\r\n public get syncItem(): DialogPropertySyncItem {\r\n const isDisabled = this._isDisabled;\r\n return { propertyName: this.name, value: this.dialogItemValue, isDisabled };\r\n }\r\n\r\n public get item(): DialogPropertyItem {\r\n return { propertyName: this.name, value: this.dialogItemValue };\r\n }\r\n\r\n public toDialogItem(editorPosition: EditorPosition, lockProperty?: DialogItem): DialogItem {\r\n return { value: this.dialogItemValue, property: this.description, editorPosition, isDisabled: this._isDisabled, lockProperty };\r\n }\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"UiDataProvider.js","sourceRoot":"","sources":["../../../../src/appui-abstract/dialogs/UiDataProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAGhD;;GAEG;AACH,MAAa,yBAA0B,SAAQ,wBAAwC;CAAI;AAA3F,8DAA2F;AAE3F;;GAEG;AACH,uBAAuB;AACvB,MAAsB,cAAc;IAClC,uDAAuD;IAChD,kBAAkB,CAAC,WAAiC;QACzD,MAAM,CAAC,IAAI,KAAK,CAAC,iGAAiG,CAAC,CAAC,CAAC;IACvH,CAAC;IAED,2CAA2C;IACpC,2BAA2B,GAAG,IAAI,yBAAyB,EAAE,CAAC;IAE9D,oBAAoB,GAAG,IAAI,wBAAS,EAAQ,CAAC;IAEpD,gDAAgD;IACzC,gBAAgB,CAAC,KAAyB;QAC/C,OAAO,EAAE,MAAM,EAAE,oBAAoB,CAAC,OAAO,EAAE,CAAC;IAClD,CAAC;IAED,uFAAuF;IAChF,cAAc,CAAC,cAAwC;QAC5D,IAAI,CAAC,uBAAuB,CAAC,cAAc,CAAC,CAAC;IAC/C,CAAC;IAED,sFAAsF;IAC/E,uBAAuB,CAAC,cAAwC;QACrE,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;OACG;IACI,sBAAsB;QAC3B,IAAI,CAAC,oBAAoB,CAAC,IAAI,EAAE,CAAC;IACnC,CAAC;IAED;;OAEG;IACI,yBAAyB;QAC9B,MAAM,CAAC,IAAI,KAAK,CAAC,+HAA+H,CAAC,CAAC,CAAC;IACrJ,CAAC;CACF;AAtCD,wCAsCC;AASD;;GAEG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,mCAAmC;IACnC,qEAAW,CAAA;IACX,0CAA0C;IAC1C,iEAAS,CAAA;AACX,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B","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 Dialog\n */\n\nimport { BeUiEvent } from \"@itwin/core-bentley\";\nimport { DialogPropertyItem, DialogPropertySyncItem } from \"./DialogItem\";\n\n/** Sync UI Control Properties Event class.\n * @public\n */\nexport class SyncPropertiesChangeEvent extends BeUiEvent<SyncPropertiesChangeEventArgs> { }\n\n/** [[UiDataProvider]] Abstract class that allows property values to be passed between hosting API and UI.\n * @public\n */\n// istanbul ignore next\nexport abstract class UiDataProvider {\n /** Called by UI to inform data provider of changes. */\n public processChangesInUi(_properties: DialogPropertyItem[]): PropertyChangeResult {\n throw (new Error(\"Derived UiDataProvider must implement this method to apply changes to a bulk set of properties.\"));\n }\n\n /** Get Sync UI Control Properties Event */\n public onSyncPropertiesChangeEvent = new SyncPropertiesChangeEvent();\n\n public onItemsReloadedEvent = new BeUiEvent<void>();\n\n /** Called by UI to validate a property value */\n public validateProperty(_item: DialogPropertyItem): PropertyChangeResult {\n return { status: PropertyChangeStatus.Success };\n }\n\n /** Called to sync properties synchronously if a UiDataProvider is active for the UI */\n public syncProperties(syncProperties: DialogPropertySyncItem[]) {\n this.fireSyncPropertiesEvent(syncProperties);\n }\n\n /** Called to inform listener that the UiDataProvider has updated values for the UI */\n public fireSyncPropertiesEvent(syncProperties: DialogPropertySyncItem[]) {\n this.onSyncPropertiesChangeEvent.emit({ properties: syncProperties });\n }\n\n /** Called to inform listeners that new properties are ready for display in UI.\n */\n public fireItemsReloadedEvent() {\n this.onItemsReloadedEvent.emit();\n }\n\n /** Used to pass properties between a tool and an explicity defined UI dialog. See method supplyDialogItems in [[UiLayoutDataProvider]] for supplying\n * properties that will be used to dynamically create and layout control in a Dialog or Widget.\n */\n public supplyAvailableProperties(): DialogPropertyItem[] {\n throw (new Error(\"Derived UiDataProvider that want to use DialogPropertyItems must implement this method. Not for use with dynamic UI controls.\"));\n }\n}\n\n/** Sync UI Control Properties Event Args interface.\n * @public\n */\nexport interface SyncPropertiesChangeEventArgs {\n properties: DialogPropertySyncItem[];\n}\n\n/** Status of Proposed property changes from UI to UiDataProvider\n * @public\n */\nexport enum PropertyChangeStatus {\n /** Property Change(s) Succeeded */\n Success = 0,\n /** Error Processing Property Change(s) */\n Error = 2,\n}\n\n/** Interface used by UiDataProvider to report change status (validation) to UI.\n * @public\n */\nexport interface PropertyChangeResult {\n errorMsg?: string;\n status: PropertyChangeStatus;\n}\n"]}
|
1
|
+
{"version":3,"file":"UiDataProvider.js","sourceRoot":"","sources":["../../../../src/appui-abstract/dialogs/UiDataProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAGhD;;GAEG;AACH,MAAa,yBAA0B,SAAQ,wBAAwC;CAAI;AAA3F,8DAA2F;AAE3F;;GAEG;AACH,uBAAuB;AACvB,MAAsB,cAAc;IAClC,uDAAuD;IAChD,kBAAkB,CAAC,WAAiC;QACzD,MAAM,CAAC,IAAI,KAAK,CAAC,iGAAiG,CAAC,CAAC,CAAC;IACvH,CAAC;IAED,2CAA2C;IACpC,2BAA2B,GAAG,IAAI,yBAAyB,EAAE,CAAC;IAE9D,oBAAoB,GAAG,IAAI,wBAAS,EAAQ,CAAC;IAEpD,gDAAgD;IACzC,gBAAgB,CAAC,KAAyB;QAC/C,OAAO,EAAE,MAAM,EAAE,oBAAoB,CAAC,OAAO,EAAE,CAAC;IAClD,CAAC;IAED,uFAAuF;IAChF,cAAc,CAAC,cAAwC;QAC5D,IAAI,CAAC,uBAAuB,CAAC,cAAc,CAAC,CAAC;IAC/C,CAAC;IAED,sFAAsF;IAC/E,uBAAuB,CAAC,cAAwC;QACrE,IAAI,CAAC,2BAA2B,CAAC,IAAI,CAAC,EAAE,UAAU,EAAE,cAAc,EAAE,CAAC,CAAC;IACxE,CAAC;IAED;OACG;IACI,sBAAsB;QAC3B,IAAI,CAAC,oBAAoB,CAAC,IAAI,EAAE,CAAC;IACnC,CAAC;IAED;;OAEG;IACI,yBAAyB;QAC9B,MAAM,CAAC,IAAI,KAAK,CAAC,+HAA+H,CAAC,CAAC,CAAC;IACrJ,CAAC;CACF;AAtCD,wCAsCC;AASD;;GAEG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,mCAAmC;IACnC,qEAAW,CAAA;IACX,0CAA0C;IAC1C,iEAAS,CAAA;AACX,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\nimport { BeUiEvent } from \"@itwin/core-bentley\";\r\nimport { DialogPropertyItem, DialogPropertySyncItem } from \"./DialogItem\";\r\n\r\n/** Sync UI Control Properties Event class.\r\n * @public\r\n */\r\nexport class SyncPropertiesChangeEvent extends BeUiEvent<SyncPropertiesChangeEventArgs> { }\r\n\r\n/** [[UiDataProvider]] Abstract class that allows property values to be passed between hosting API and UI.\r\n * @public\r\n */\r\n// istanbul ignore next\r\nexport abstract class UiDataProvider {\r\n /** Called by UI to inform data provider of changes. */\r\n public processChangesInUi(_properties: DialogPropertyItem[]): PropertyChangeResult {\r\n throw (new Error(\"Derived UiDataProvider must implement this method to apply changes to a bulk set of properties.\"));\r\n }\r\n\r\n /** Get Sync UI Control Properties Event */\r\n public onSyncPropertiesChangeEvent = new SyncPropertiesChangeEvent();\r\n\r\n public onItemsReloadedEvent = new BeUiEvent<void>();\r\n\r\n /** Called by UI to validate a property value */\r\n public validateProperty(_item: DialogPropertyItem): PropertyChangeResult {\r\n return { status: PropertyChangeStatus.Success };\r\n }\r\n\r\n /** Called to sync properties synchronously if a UiDataProvider is active for the UI */\r\n public syncProperties(syncProperties: DialogPropertySyncItem[]) {\r\n this.fireSyncPropertiesEvent(syncProperties);\r\n }\r\n\r\n /** Called to inform listener that the UiDataProvider has updated values for the UI */\r\n public fireSyncPropertiesEvent(syncProperties: DialogPropertySyncItem[]) {\r\n this.onSyncPropertiesChangeEvent.emit({ properties: syncProperties });\r\n }\r\n\r\n /** Called to inform listeners that new properties are ready for display in UI.\r\n */\r\n public fireItemsReloadedEvent() {\r\n this.onItemsReloadedEvent.emit();\r\n }\r\n\r\n /** Used to pass properties between a tool and an explicity defined UI dialog. See method supplyDialogItems in [[UiLayoutDataProvider]] for supplying\r\n * properties that will be used to dynamically create and layout control in a Dialog or Widget.\r\n */\r\n public supplyAvailableProperties(): DialogPropertyItem[] {\r\n throw (new Error(\"Derived UiDataProvider that want to use DialogPropertyItems must implement this method. Not for use with dynamic UI controls.\"));\r\n }\r\n}\r\n\r\n/** Sync UI Control Properties Event Args interface.\r\n * @public\r\n */\r\nexport interface SyncPropertiesChangeEventArgs {\r\n properties: DialogPropertySyncItem[];\r\n}\r\n\r\n/** Status of Proposed property changes from UI to UiDataProvider\r\n * @public\r\n */\r\nexport enum PropertyChangeStatus {\r\n /** Property Change(s) Succeeded */\r\n Success = 0,\r\n /** Error Processing Property Change(s) */\r\n Error = 2,\r\n}\r\n\r\n/** Interface used by UiDataProvider to report change status (validation) to UI.\r\n * @public\r\n */\r\nexport interface PropertyChangeResult {\r\n errorMsg?: string;\r\n status: PropertyChangeStatus;\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"UiLayoutDataProvider.js","sourceRoot":"","sources":["../../../../src/appui-abstract/dialogs/UiLayoutDataProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAChD,6DAAuH;AACvH,iDAAsD;AACtD,+CAA0E;AAE1E,qDAA8F;AAE9F;;GAEG;AACH,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,6BAAS,CAAA;IACT,qCAAiB,CAAA;IACjB,+BAAW,CAAA;IACX,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,iCAAa,CAAA;IACb,yCAAqB,CAAA;AACvB,CAAC,EAVW,gBAAgB,gCAAhB,gBAAgB,QAU3B;AAED;;GAEG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,8BAAS,CAAA;IACT,wCAAmB,CAAA;IACnB,2CAAsB,CAAA;IACtB,iDAA4B,CAAA;AAC9B,C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C,aAA+B,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;QACxF,MAAM,CAAC,UAAU,GAAG,oBAAoB,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;QAC1E,OAAO,MAAM,CAAC;IAChB,CAAC,CAAC;IAEF,oEAAoE;IAC7D,MAAM,CAAC,6BAA6B,CAAC,GAAc;QACxD,KAAK,MAAM,IAAI,IAAI,GAAG,CAAC,KAAK,EAAE,CAAC;YAC7B,uBAAuB;YACvB,IAAI,oBAAoB,CAAC,yBAAyB,CAAC,IAAI,CAAC,IAAI,SAAS,KAAK,IAAI,CAAC,QAAQ,CAAC,MAAM,IAAI,kBAAkB,KAAK,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,oBAAoB,CAAC,gBAAgB,CAAC,IAAI,CAAC;gBAC/L,OAAO,KAAK,CAAC;QACjB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;;AAxHH,oDAyHC;AAED;;;GAGG;AACH,MAAsB,wBAAyB,SAAQ,oBAAoB;IAClE,sBAAsB,GAAG,IAAI,wBAAS,EAAQ,CAAC;IAEtD,sFAAsF;IAC/E,4BAA4B;QACjC,IAAI,CAAC,sBAAsB,CAAC,IAAI,EAAE,CAAC;IACrC,CAAC;IAEM,gBAAgB;QACrB,gCAAgC;QAChC,MAAM,OAAO,GAAsB,EAAE,CAAC;QACtC,uBAAuB;QACvB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QAChE,uBAAuB;QACvB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QACpE,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAjBD,4DAiBC","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 Dialog\n */\n\nimport { BeUiEvent } from \"@itwin/core-bentley\";\nimport { PropertyEditorParams, PropertyEditorParamTypes, SuppressLabelEditorParams } from \"../properties/EditorParams\";\nimport { PropertyRecord } from \"../properties/Record\";\nimport { PrimitiveValue, PropertyValueFormat } from \"../properties/Value\";\nimport { BaseDialogItem, DialogItem, DialogPropertyItem, DialogPropertySyncItem } from \"./DialogItem\";\nimport { PropertyChangeResult, PropertyChangeStatus, UiDataProvider } from \"./UiDataProvider\";\n\n/** Enum for button types. Determines button label, and default button style.\n * @public\n */\nexport enum DialogButtonType {\n None = \"\",\n Close = \"close\",\n OK = \"ok\",\n Cancel = \"cancel\",\n Yes = \"yes\",\n No = \"no\",\n Retry = \"retry\",\n Next = \"next\",\n Previous = \"previous\"\n}\n\n/** Enum for button style.\n * @public\n */\nexport enum DialogButtonStyle {\n None = \"\",\n Primary = \"iui-cta\",\n Hollow = \"iui-default\",\n Blue = \"iui-high-visibility\",\n}\n\n/** Interface for a dialog button in a button cluster\n * @public\n */\nexport interface DialogButtonDef {\n /** type of button */\n type: DialogButtonType;\n /** Triggered on button click */\n onClick: () => void;\n /** Which button style to decorate button width */\n buttonStyle?: DialogButtonStyle;\n /** Disable the button */\n disabled?: boolean;\n /** Custom label */\n label?: string;\n /** Custom CSS class */\n className?: string;\n}\n\n/** [[DialogRow]] is the interface that groups dialog items into rows for building UI\n * @public\n */\nexport interface DialogRow {\n priority: number;\n items: DialogItem[];\n}\n\n/**\n * @public\n */\nexport abstract class UiLayoutDataProvider extends UiDataProvider {\n private _items: ReadonlyArray<DialogItem> | undefined;\n\n /** Applies changes from one or more properties - some dialogs will use this to send a bulk set of changes back to the provider */\n public override processChangesInUi(properties: DialogPropertyItem[]): PropertyChangeResult {\n // Default implementation is to just pass each property to applyUiPropertyChange\n properties.forEach((property) => this.applyUiPropertyChange(property));\n return { status: PropertyChangeStatus.Success };\n }\n\n /** Applies change of a single property - this is the default method used when property editors are dynamically generated. */\n // istanbul ignore next\n public applyUiPropertyChange = (_updatedValue: DialogPropertySyncItem): void => {\n throw (new Error(\"Derived UiDataProvider should implement this to apply change to a single property.\"));\n };\n\n private _rows: DialogRow[] | undefined;\n\n /** Array of dialog rows */\n public get rows(): DialogRow[] {\n if (!this._rows) {\n this._rows = this.layoutDialogRows();\n }\n return this._rows;\n }\n\n protected loadItemsInternal(items: ReadonlyArray<DialogItem> | undefined) {\n this._items = items ? items : [];\n this._rows = this.layoutDialogRows();\n }\n\n /** Called by UI to request available properties that can be bound to user supplied UI components (See Tool1UiProvider for example). */\n // istanbul ignore next\n public supplyDialogItems(): DialogItem[] | undefined {\n throw (new Error(\"Derived UiDataProvider must implement this method to supply set of properties.\"));\n }\n\n public get items(): ReadonlyArray<DialogItem> {\n if (undefined === this._items) {\n this.loadItemsInternal(this.supplyDialogItems());\n }\n return this._items!;\n }\n\n /** Called to inform listeners that new properties are ready for display in UI. */\n public reloadDialogItems(emitEvent = true) {\n this.loadItemsInternal(this.supplyDialogItems());\n // istanbul ignore else\n if (emitEvent)\n this.fireItemsReloadedEvent();\n }\n\n /**\n * @internal\n */\n public layoutDialogRows(): DialogRow[] {\n const rows: DialogRow[] = [];\n\n this.items.forEach((item) => {\n const row = rows.find((value) => value.priority === item.editorPosition.rowPriority);\n if (row) {\n row.items.push(item);\n } else {\n rows.push({ priority: item.editorPosition.rowPriority, items: [item] });\n }\n });\n\n // sort rows\n rows.sort((a: DialogRow, b: DialogRow) => a.priority - b.priority);\n // sort records\n rows.forEach((row: DialogRow) => row.items.sort((a: DialogItem, b: DialogItem) => a.editorPosition.columnIndex - b.editorPosition.columnIndex));\n return rows;\n }\n\n /** Determines if a dialog item editor wants a label */\n public static editorWantsLabel(item: DialogItem): boolean {\n if (item.property.editor && item.property.editor.params) {\n const params = item.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.SuppressEditorLabel) as SuppressLabelEditorParams;\n // istanbul ignore else\n if (params)\n return false;\n }\n return true;\n }\n\n /** Determines if a dialog items has an associated lock property */\n public static hasAssociatedLockProperty(item: DialogItem): boolean {\n return !!item.lockProperty;\n }\n\n /** Gets the disabled state for a given dialog item */\n public static getItemDisabledState(baseDialogItem: BaseDialogItem): boolean {\n const dialogItem = baseDialogItem as DialogItem;\n // istanbul ignore else\n if (dialogItem === undefined || dialogItem.lockProperty === undefined)\n return !!baseDialogItem.isDisabled;\n const value = dialogItem.lockProperty.value;\n // istanbul ignore next\n if (value === undefined)\n return !!baseDialogItem.isDisabled;\n\n return !value.value;\n }\n\n /** Gets a property record for a given dialog item */\n public static getPropertyRecord = (dialogItem: BaseDialogItem): PropertyRecord => {\n const propertyValue = { valueFormat: PropertyValueFormat.Primitive, value: dialogItem.value.value, displayValue: dialogItem.value.displayValue };\n const record = new PropertyRecord(propertyValue as PrimitiveValue, dialogItem.property);\n record.isDisabled = UiLayoutDataProvider.getItemDisabledState(dialogItem);\n return record;\n };\n\n /** Determines if a dialog row only contains button group editors */\n public static onlyContainButtonGroupEditors(row: DialogRow): boolean {\n for (const item of row.items) {\n // istanbul ignore else\n if (UiLayoutDataProvider.hasAssociatedLockProperty(item) || undefined === item.property.editor || \"enum-buttongroup\" !== item.property.editor.name || UiLayoutDataProvider.editorWantsLabel(item))\n return false;\n }\n return true;\n }\n}\n\n/** [[DialogLayoutDataProvider]] Abstract class that allows property values to be passed between hosting API and Dialog that generates and arranges components dynamically\n * including the buttons at the bottom of the dialog.\n * @public\n */\nexport abstract class DialogLayoutDataProvider extends UiLayoutDataProvider {\n public onButtonsReloadedEvent = new BeUiEvent<void>();\n\n /** Called to inform listeners that modal dialog button data needs to be refreshed. */\n public fireDialogButtonsReloadEvent() {\n this.onButtonsReloadedEvent.emit();\n }\n\n public supplyButtonData(): DialogButtonDef[] | undefined {\n // Derived class should override\n const buttons: DialogButtonDef[] = [];\n // istanbul ignore next\n buttons.push({ type: DialogButtonType.OK, onClick: () => { } });\n // istanbul ignore next\n buttons.push({ type: DialogButtonType.Cancel, onClick: () => { } });\n return buttons;\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"UiLayoutDataProvider.js","sourceRoot":"","sources":["../../../../src/appui-abstract/dialogs/UiLayoutDataProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAChD,6DAAuH;AACvH,iDAAsD;AACtD,+CAA0E;AAE1E,qDAA8F;AAE9F;;GAEG;AACH,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,6BAAS,CAAA;IACT,qCAAiB,CAAA;IACjB,+BAAW,CAAA;IACX,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,iCAAa,CAAA;IACb,yCAAqB,CAAA;AACvB,CAAC,EAVW,gBAAgB,gCAAhB,gBAAgB,QAU3B;AAED;;GAEG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,8BAAS,CAAA;IACT,wCAAmB,CAAA;IACnB,2CAAsB,CAAA;IACtB,iDAA4B,CAAA;AAC9B,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B;AA4BD;;GAEG;AACH,MAAsB,oBAAqB,SAAQ,+BAAc;IACvD,MAAM,CAAwC;IAEtD,kIAAkI;IAClH,kBAAkB,CAAC,UAAgC;QACjE,gFAAgF;QAChF,UAAU,CAAC,OAAO,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,CAAC,qBAAqB,CAAC,QAAQ,CAAC,CAAC,CAAC;QACvE,OAAO,EAAE,MAAM,EAAE,qCAAoB,CAAC,OAAO,EAAE,CAAC;IAClD,CAAC;IAED,6HAA6H;IAC7H,uBAAuB;IAChB,qBAAqB,GAAG,CAAC,aAAqC,EAAQ,EAAE;QAC7E,MAAM,CAAC,IAAI,KAAK,CAAC,oFAAoF,CAAC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,gBAAgB,CAAC,IAAI,CAAC;gBAC/L,OAAO,KAAK,CAAC;QACjB,CAAC;QACD,OAAO,IAAI,CAAC;IACd,CAAC;;AAxHH,oDAyHC;AAED;;;GAGG;AACH,MAAsB,wBAAyB,SAAQ,oBAAoB;IAClE,sBAAsB,GAAG,IAAI,wBAAS,EAAQ,CAAC;IAEtD,sFAAsF;IAC/E,4BAA4B;QACjC,IAAI,CAAC,sBAAsB,CAAC,IAAI,EAAE,CAAC;IACrC,CAAC;IAEM,gBAAgB;QACrB,gCAAgC;QAChC,MAAM,OAAO,GAAsB,EAAE,CAAC;QACtC,uBAAuB;QACvB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QAChE,uBAAuB;QACvB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QACpE,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAjBD,4DAiBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\nimport { BeUiEvent } from \"@itwin/core-bentley\";\r\nimport { PropertyEditorParams, PropertyEditorParamTypes, SuppressLabelEditorParams } from \"../properties/EditorParams\";\r\nimport { PropertyRecord } from \"../properties/Record\";\r\nimport { PrimitiveValue, PropertyValueFormat } from \"../properties/Value\";\r\nimport { BaseDialogItem, DialogItem, DialogPropertyItem, DialogPropertySyncItem } from \"./DialogItem\";\r\nimport { PropertyChangeResult, PropertyChangeStatus, UiDataProvider } from \"./UiDataProvider\";\r\n\r\n/** Enum for button types. Determines button label, and default button style.\r\n * @public\r\n */\r\nexport enum DialogButtonType {\r\n None = \"\",\r\n Close = \"close\",\r\n OK = \"ok\",\r\n Cancel = \"cancel\",\r\n Yes = \"yes\",\r\n No = \"no\",\r\n Retry = \"retry\",\r\n Next = \"next\",\r\n Previous = \"previous\"\r\n}\r\n\r\n/** Enum for button style.\r\n * @public\r\n */\r\nexport enum DialogButtonStyle {\r\n None = \"\",\r\n Primary = \"iui-cta\",\r\n Hollow = \"iui-default\",\r\n Blue = \"iui-high-visibility\",\r\n}\r\n\r\n/** Interface for a dialog button in a button cluster\r\n * @public\r\n */\r\nexport interface DialogButtonDef {\r\n /** type of button */\r\n type: DialogButtonType;\r\n /** Triggered on button click */\r\n onClick: () => void;\r\n /** Which button style to decorate button width */\r\n buttonStyle?: DialogButtonStyle;\r\n /** Disable the button */\r\n disabled?: boolean;\r\n /** Custom label */\r\n label?: string;\r\n /** Custom CSS class */\r\n className?: string;\r\n}\r\n\r\n/** [[DialogRow]] is the interface that groups dialog items into rows for building UI\r\n * @public\r\n */\r\nexport interface DialogRow {\r\n priority: number;\r\n items: DialogItem[];\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport abstract class UiLayoutDataProvider extends UiDataProvider {\r\n private _items: ReadonlyArray<DialogItem> | undefined;\r\n\r\n /** Applies changes from one or more properties - some dialogs will use this to send a bulk set of changes back to the provider */\r\n public override processChangesInUi(properties: DialogPropertyItem[]): PropertyChangeResult {\r\n // Default implementation is to just pass each property to applyUiPropertyChange\r\n properties.forEach((property) => this.applyUiPropertyChange(property));\r\n return { status: PropertyChangeStatus.Success };\r\n }\r\n\r\n /** Applies change of a single property - this is the default method used when property editors are dynamically generated. */\r\n // istanbul ignore next\r\n public applyUiPropertyChange = (_updatedValue: DialogPropertySyncItem): void => {\r\n throw (new Error(\"Derived UiDataProvider should implement this to apply change to a single property.\"));\r\n };\r\n\r\n private _rows: DialogRow[] | undefined;\r\n\r\n /** Array of dialog rows */\r\n public get rows(): DialogRow[] {\r\n if (!this._rows) {\r\n this._rows = this.layoutDialogRows();\r\n }\r\n return this._rows;\r\n }\r\n\r\n protected loadItemsInternal(items: ReadonlyArray<DialogItem> | undefined) {\r\n this._items = items ? items : [];\r\n this._rows = this.layoutDialogRows();\r\n }\r\n\r\n /** Called by UI to request available properties that can be bound to user supplied UI components (See Tool1UiProvider for example). */\r\n // istanbul ignore next\r\n public supplyDialogItems(): DialogItem[] | undefined {\r\n throw (new Error(\"Derived UiDataProvider must implement this method to supply set of properties.\"));\r\n }\r\n\r\n public get items(): ReadonlyArray<DialogItem> {\r\n if (undefined === this._items) {\r\n this.loadItemsInternal(this.supplyDialogItems());\r\n }\r\n return this._items!;\r\n }\r\n\r\n /** Called to inform listeners that new properties are ready for display in UI. */\r\n public reloadDialogItems(emitEvent = true) {\r\n this.loadItemsInternal(this.supplyDialogItems());\r\n // istanbul ignore else\r\n if (emitEvent)\r\n this.fireItemsReloadedEvent();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public layoutDialogRows(): DialogRow[] {\r\n const rows: DialogRow[] = [];\r\n\r\n this.items.forEach((item) => {\r\n const row = rows.find((value) => value.priority === item.editorPosition.rowPriority);\r\n if (row) {\r\n row.items.push(item);\r\n } else {\r\n rows.push({ priority: item.editorPosition.rowPriority, items: [item] });\r\n }\r\n });\r\n\r\n // sort rows\r\n rows.sort((a: DialogRow, b: DialogRow) => a.priority - b.priority);\r\n // sort records\r\n rows.forEach((row: DialogRow) => row.items.sort((a: DialogItem, b: DialogItem) => a.editorPosition.columnIndex - b.editorPosition.columnIndex));\r\n return rows;\r\n }\r\n\r\n /** Determines if a dialog item editor wants a label */\r\n public static editorWantsLabel(item: DialogItem): boolean {\r\n if (item.property.editor && item.property.editor.params) {\r\n const params = item.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.SuppressEditorLabel) as SuppressLabelEditorParams;\r\n // istanbul ignore else\r\n if (params)\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n /** Determines if a dialog items has an associated lock property */\r\n public static hasAssociatedLockProperty(item: DialogItem): boolean {\r\n return !!item.lockProperty;\r\n }\r\n\r\n /** Gets the disabled state for a given dialog item */\r\n public static getItemDisabledState(baseDialogItem: BaseDialogItem): boolean {\r\n const dialogItem = baseDialogItem as DialogItem;\r\n // istanbul ignore else\r\n if (dialogItem === undefined || dialogItem.lockProperty === undefined)\r\n return !!baseDialogItem.isDisabled;\r\n const value = dialogItem.lockProperty.value;\r\n // istanbul ignore next\r\n if (value === undefined)\r\n return !!baseDialogItem.isDisabled;\r\n\r\n return !value.value;\r\n }\r\n\r\n /** Gets a property record for a given dialog item */\r\n public static getPropertyRecord = (dialogItem: BaseDialogItem): PropertyRecord => {\r\n const propertyValue = { valueFormat: PropertyValueFormat.Primitive, value: dialogItem.value.value, displayValue: dialogItem.value.displayValue };\r\n const record = new PropertyRecord(propertyValue as PrimitiveValue, dialogItem.property);\r\n record.isDisabled = UiLayoutDataProvider.getItemDisabledState(dialogItem);\r\n return record;\r\n };\r\n\r\n /** Determines if a dialog row only contains button group editors */\r\n public static onlyContainButtonGroupEditors(row: DialogRow): boolean {\r\n for (const item of row.items) {\r\n // istanbul ignore else\r\n if (UiLayoutDataProvider.hasAssociatedLockProperty(item) || undefined === item.property.editor || \"enum-buttongroup\" !== item.property.editor.name || UiLayoutDataProvider.editorWantsLabel(item))\r\n return false;\r\n }\r\n return true;\r\n }\r\n}\r\n\r\n/** [[DialogLayoutDataProvider]] Abstract class that allows property values to be passed between hosting API and Dialog that generates and arranges components dynamically\r\n * including the buttons at the bottom of the dialog.\r\n * @public\r\n */\r\nexport abstract class DialogLayoutDataProvider extends UiLayoutDataProvider {\r\n public onButtonsReloadedEvent = new BeUiEvent<void>();\r\n\r\n /** Called to inform listeners that modal dialog button data needs to be refreshed. */\r\n public fireDialogButtonsReloadEvent() {\r\n this.onButtonsReloadedEvent.emit();\r\n }\r\n\r\n public supplyButtonData(): DialogButtonDef[] | undefined {\r\n // Derived class should override\r\n const buttons: DialogButtonDef[] = [];\r\n // istanbul ignore next\r\n buttons.push({ type: DialogButtonType.OK, onClick: () => { } });\r\n // istanbul ignore next\r\n buttons.push({ type: DialogButtonType.Cancel, onClick: () => { } });\r\n return buttons;\r\n }\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AbstractItemProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/AbstractItemProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 Item\n */\n\nimport { BadgeType } from \"./BadgeType\";\nimport { ConditionalBooleanValue } from \"./ConditionalBooleanValue\";\nimport { ConditionalStringValue } from \"./ConditionalStringValue\";\n\n/** Prototype for string getter function.\n * @public\n */\nexport type StringGetter = () => string;\n\n/** Definition that specifies properties shared between many ConfigurableUi components.\n * @public\n */\nexport interface CommonItemProps {\n /** can be used by application to store miscellaneous data. */\n applicationData?: any;\n /** Badge to be overlaid on the item. */\n badgeType?: BadgeType;\n /** if set, it is used to explicitly set the description shown by components that support a description. */\n description?: string | ConditionalStringValue;\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\n icon?: string | ConditionalStringValue;\n /** optional data to be used by item implementor. */\n readonly internalData?: Map<string, any>;\n\n /** if true component will be hidden - defaults to false */\n isHidden?: boolean | ConditionalBooleanValue;\n /** if true component will be disabled - defaults to false */\n isDisabled?: boolean | ConditionalBooleanValue;\n /** if set, component will be considered \"active\" an will display an \"active stripe\" - defaults to false */\n isActive?: boolean;\n /** if set, component will be considered selected but will NOT display an \"active stripe\" - defaults to false. Typically used by buttons that toggle between two states. */\n isPressed?: boolean;\n /** if set, it is used to explicitly set the label shown by a component. */\n label?: string | ConditionalStringValue;\n /** used to explicitly set the tooltip shown by a component. */\n tooltip?: string | ConditionalStringValue;\n}\n\n/** Definition for a command handler.\n * @public\n */\nexport interface CommandHandler {\n /** Function to execute */\n execute?: (args?: any) => any;\n /** Parameters passed to the function */\n parameters?: any;\n /** Function to get the parameters passed to the function */\n getCommandArgs?: () => any[];\n}\n\n/** Definition for an item that executes and action.\n * @public\n */\nexport interface AbstractActionItemProps extends CommonItemProps, CommandHandler {\n}\n"]}
|
1
|
+
{"version":3,"file":"AbstractItemProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/AbstractItemProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Item\r\n */\r\n\r\nimport { BadgeType } from \"./BadgeType\";\r\nimport { ConditionalBooleanValue } from \"./ConditionalBooleanValue\";\r\nimport { ConditionalStringValue } from \"./ConditionalStringValue\";\r\n\r\n/** Prototype for string getter function.\r\n * @public\r\n */\r\nexport type StringGetter = () => string;\r\n\r\n/** Definition that specifies properties shared between many ConfigurableUi components.\r\n * @public\r\n */\r\nexport interface CommonItemProps {\r\n /** can be used by application to store miscellaneous data. */\r\n applicationData?: any;\r\n /** Badge to be overlaid on the item. */\r\n badgeType?: BadgeType;\r\n /** if set, it is used to explicitly set the description shown by components that support a description. */\r\n description?: string | ConditionalStringValue;\r\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\r\n icon?: string | ConditionalStringValue;\r\n /** optional data to be used by item implementor. */\r\n readonly internalData?: Map<string, any>;\r\n\r\n /** if true component will be hidden - defaults to false */\r\n isHidden?: boolean | ConditionalBooleanValue;\r\n /** if true component will be disabled - defaults to false */\r\n isDisabled?: boolean | ConditionalBooleanValue;\r\n /** if set, component will be considered \"active\" an will display an \"active stripe\" - defaults to false */\r\n isActive?: boolean;\r\n /** if set, component will be considered selected but will NOT display an \"active stripe\" - defaults to false. Typically used by buttons that toggle between two states. */\r\n isPressed?: boolean;\r\n /** if set, it is used to explicitly set the label shown by a component. */\r\n label?: string | ConditionalStringValue;\r\n /** used to explicitly set the tooltip shown by a component. */\r\n tooltip?: string | ConditionalStringValue;\r\n}\r\n\r\n/** Definition for a command handler.\r\n * @public\r\n */\r\nexport interface CommandHandler {\r\n /** Function to execute */\r\n execute?: (args?: any) => any;\r\n /** Parameters passed to the function */\r\n parameters?: any;\r\n /** Function to get the parameters passed to the function */\r\n getCommandArgs?: () => any[];\r\n}\r\n\r\n/** Definition for an item that executes and action.\r\n * @public\r\n */\r\nexport interface AbstractActionItemProps extends CommonItemProps, CommandHandler {\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AbstractMenuItemProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/AbstractMenuItemProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 Item\n */\n\nimport { AbstractActionItemProps, CommonItemProps } from \"./AbstractItemProps\";\nimport { ConditionalStringValue } from \"./ConditionalStringValue\";\n\n/** Properties for a Menu item\n * @public\n */\nexport interface AbstractMenuItemProps extends CommonItemProps {\n /** The id for the menu item. */\n id: string;\n /** The item to execute when this item is invoked. Either 'item' or 'submenu' must be specified. */\n item?: AbstractActionItemProps;\n /** Nested array of item props. Either 'item' or 'submenu' must be specified. */\n submenu?: AbstractMenuItemProps[];\n /** Icon to display on right side of the menu item.\n * Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id.\n */\n iconRight?: string | ConditionalStringValue;\n}\n"]}
|
1
|
+
{"version":3,"file":"AbstractMenuItemProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/AbstractMenuItemProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Item\r\n */\r\n\r\nimport { AbstractActionItemProps, CommonItemProps } from \"./AbstractItemProps\";\r\nimport { ConditionalStringValue } from \"./ConditionalStringValue\";\r\n\r\n/** Properties for a Menu item\r\n * @public\r\n */\r\nexport interface AbstractMenuItemProps extends CommonItemProps {\r\n /** The id for the menu item. */\r\n id: string;\r\n /** The item to execute when this item is invoked. Either 'item' or 'submenu' must be specified. */\r\n item?: AbstractActionItemProps;\r\n /** Nested array of item props. Either 'item' or 'submenu' must be specified. */\r\n submenu?: AbstractMenuItemProps[];\r\n /** Icon to display on right side of the menu item.\r\n * Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id.\r\n */\r\n iconRight?: string | ConditionalStringValue;\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"AbstractToolbarProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/AbstractToolbarProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","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 Item\n */\n\nimport { CommonToolbarItem } from \"../toolbars/ToolbarItem\";\n\n/** Definition for a Toolbar.\n * @public\n */\nexport interface AbstractToolbarProps {\n /** Id of Toolbar */\n toolbarId?: string;\n /** Items shown in the Toolbar */\n items: CommonToolbarItem[];\n}\n"]}
|
1
|
+
{"version":3,"file":"AbstractToolbarProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/AbstractToolbarProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Item\r\n */\r\n\r\nimport { CommonToolbarItem } from \"../toolbars/ToolbarItem\";\r\n\r\n/** Definition for a Toolbar.\r\n * @public\r\n */\r\nexport interface AbstractToolbarProps {\r\n /** Id of Toolbar */\r\n toolbarId?: string;\r\n /** Items shown in the Toolbar */\r\n items: CommonToolbarItem[];\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"BadgeType.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/BadgeType.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACH,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,gBAAgB;IAChB,yCAAQ,CAAA;IACR,wCAAwC;IACxC,iEAAoB,CAAA;IACpB,kCAAkC;IAClC,uCAAO,CAAA;AACT,CAAC,EAPW,SAAS,yBAAT,SAAS,QAOpB","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 Item\n */\n\n/** Specifies type of badge, if any, that should be overlaid on UI component.\n * @public\n */\nexport enum BadgeType {\n /** No badge. */\n None = 0,\n /** Standard Technical Preview badge. */\n TechnicalPreview = 1,\n /** Standard New Feature badge. */\n New = 2,\n}\n"]}
|
1
|
+
{"version":3,"file":"BadgeType.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/BadgeType.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACH,IAAY,SAOX;AAPD,WAAY,SAAS;IACnB,gBAAgB;IAChB,yCAAQ,CAAA;IACR,wCAAwC;IACxC,iEAAoB,CAAA;IACpB,kCAAkC;IAClC,uCAAO,CAAA;AACT,CAAC,EAPW,SAAS,yBAAT,SAAS,QAOpB","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Item\r\n */\r\n\r\n/** Specifies type of badge, if any, that should be overlaid on UI component.\r\n * @public\r\n */\r\nexport enum BadgeType {\r\n /** No badge. */\r\n None = 0,\r\n /** Standard Technical Preview badge. */\r\n TechnicalPreview = 1,\r\n /** Standard New Feature badge. */\r\n New = 2,\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConditionalBooleanValue.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/ConditionalBooleanValue.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;GAGG;AACH,MAAa,uBAAuB;IASN;IAAyC;IAR7D,MAAM,CAAW;IAEzB;;;;;OAKG;IACH,YAA4B,QAAuB,EAAkB,YAAsB,EAAE,KAAe;QAAhF,aAAQ,GAAR,QAAQ,CAAe;QAAkB,iBAAY,GAAZ,YAAY,CAAU;QACzF,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,oDAAoD;IACpD,IAAW,KAAK;QACd,IAAI,SAAS,KAAK,IAAI,CAAC,MAAM;YAC3B,OAAO,IAAI,CAAC,MAAM,CAAC;QAErB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,yDAAyD;IAClD,OAAO;QACZ,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QACjC,IAAI,QAAQ,KAAK,IAAI,CAAC,MAAM,EAAE,CAAC;YAC7B,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;YACvB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,0GAA0G;IACnG,MAAM,CAAC,YAAY,CAAC,gBAA+D,EAAE,QAAqB;QAC/G,IAAI,SAAS,KAAK,gBAAgB,IAAI,CAAC,CAAC,gBAAgB,YAAY,uBAAuB,CAAC;YAC1F,OAAO,KAAK,CAAC;QAEf,IAAI,gBAAgB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,KAAa,EAAW,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;YACnG,OAAO,gBAAgB,CAAC,OAAO,EAAE,CAAC;QAEpC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,0FAA0F;IACnF,MAAM,CAAC,QAAQ,CAAC,gBAA+D;QACpF,IAAI,SAAS,KAAK,gBAAgB;YAChC,OAAO,KAAK,CAAC;QAEf,IAAI,gBAAgB,YAAY,uBAAuB;YACrD,OAAO,gBAAgB,CAAC,KAAK,CAAC;QAEhC,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF;AArDD,0DAqDC","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 Item\n */\n\n/** Class used to return a boolean value. The boolean value is refreshed by using the specified function. The syncEventIds define one or more\n * eventIds that would require the testFunc to be rerun.\n * @public\n */\nexport class ConditionalBooleanValue {\n private _value?: boolean;\n\n /**\n * Constructor for ConditionalBooleanValue. It is important that the same ConditionalBooleanValue instance is not used by multiple UI item definitions in order that the control's state is always rendered correctly.\n * @param testFunc Function to run to retrieve the value for the conditional. This function is run when refresh method is called or if the value is not defined in the constructor.\n * @param syncEventIds An array of eventId that should be monitored to determine when to run the refresh method.\n * @param value The default value for the conditional value. If not specified then the function is run to set the value when the value is retrieved.\n */\n constructor(public readonly testFunc: () => boolean, public readonly syncEventIds: string[], value?: boolean) {\n this._value = value;\n }\n\n /** The current boolean value of the conditional. */\n public get value(): boolean {\n if (undefined !== this._value)\n return this._value;\n\n this._value = this.testFunc();\n return this._value;\n }\n\n /** Called to update the value by running the testFunc */\n public refresh(): boolean {\n const newValue = this.testFunc();\n if (newValue !== this._value) {\n this._value = newValue;\n return true;\n }\n return false;\n }\n\n /** helper function to process properties defined as type ConditionalBooleanValue | boolean | undefined */\n public static refreshValue(conditionalValue: ConditionalBooleanValue | boolean | undefined, eventIds: Set<string>): boolean {\n if (undefined === conditionalValue || !(conditionalValue instanceof ConditionalBooleanValue))\n return false;\n\n if (conditionalValue.syncEventIds.some((value: string): boolean => eventIds.has(value.toLowerCase())))\n return conditionalValue.refresh();\n\n return false;\n }\n\n /** helper function to get boolean from a ConditionalBooleanValue | boolean | undefined */\n public static getValue(conditionalValue: ConditionalBooleanValue | boolean | undefined): boolean {\n if (undefined === conditionalValue)\n return false;\n\n if (conditionalValue instanceof ConditionalBooleanValue)\n return conditionalValue.value;\n\n return conditionalValue;\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"ConditionalBooleanValue.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/ConditionalBooleanValue.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;GAGG;AACH,MAAa,uBAAuB;IASN;IAAyC;IAR7D,MAAM,CAAW;IAEzB;;;;;OAKG;IACH,YAA4B,QAAuB,EAAkB,YAAsB,EAAE,KAAe;QAAhF,aAAQ,GAAR,QAAQ,CAAe;QAAkB,iBAAY,GAAZ,YAAY,CAAU;QACzF,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,oDAAoD;IACpD,IAAW,KAAK;QACd,IAAI,SAAS,KAAK,IAAI,CAAC,MAAM;YAC3B,OAAO,IAAI,CAAC,MAAM,CAAC;QAErB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QAC9B,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,yDAAyD;IAClD,OAAO;QACZ,MAAM,QAAQ,GAAG,IAAI,CAAC,QAAQ,EAAE,CAAC;QACjC,IAAI,QAAQ,KAAK,IAAI,CAAC,MAAM,EAAE,CAAC;YAC7B,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;YACvB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED,0GAA0G;IACnG,MAAM,CAAC,YAAY,CAAC,gBAA+D,EAAE,QAAqB;QAC/G,IAAI,SAAS,KAAK,gBAAgB,IAAI,CAAC,CAAC,gBAAgB,YAAY,uBAAuB,CAAC;YAC1F,OAAO,KAAK,CAAC;QAEf,IAAI,gBAAgB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,KAAa,EAAW,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;YACnG,OAAO,gBAAgB,CAAC,OAAO,EAAE,CAAC;QAEpC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,0FAA0F;IACnF,MAAM,CAAC,QAAQ,CAAC,gBAA+D;QACpF,IAAI,SAAS,KAAK,gBAAgB;YAChC,OAAO,KAAK,CAAC;QAEf,IAAI,gBAAgB,YAAY,uBAAuB;YACrD,OAAO,gBAAgB,CAAC,KAAK,CAAC;QAEhC,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF;AArDD,0DAqDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Item\r\n */\r\n\r\n/** Class used to return a boolean value. The boolean value is refreshed by using the specified function. The syncEventIds define one or more\r\n * eventIds that would require the testFunc to be rerun.\r\n * @public\r\n */\r\nexport class ConditionalBooleanValue {\r\n private _value?: boolean;\r\n\r\n /**\r\n * Constructor for ConditionalBooleanValue. It is important that the same ConditionalBooleanValue instance is not used by multiple UI item definitions in order that the control's state is always rendered correctly.\r\n * @param testFunc Function to run to retrieve the value for the conditional. This function is run when refresh method is called or if the value is not defined in the constructor.\r\n * @param syncEventIds An array of eventId that should be monitored to determine when to run the refresh method.\r\n * @param value The default value for the conditional value. If not specified then the function is run to set the value when the value is retrieved.\r\n */\r\n constructor(public readonly testFunc: () => boolean, public readonly syncEventIds: string[], value?: boolean) {\r\n this._value = value;\r\n }\r\n\r\n /** The current boolean value of the conditional. */\r\n public get value(): boolean {\r\n if (undefined !== this._value)\r\n return this._value;\r\n\r\n this._value = this.testFunc();\r\n return this._value;\r\n }\r\n\r\n /** Called to update the value by running the testFunc */\r\n public refresh(): boolean {\r\n const newValue = this.testFunc();\r\n if (newValue !== this._value) {\r\n this._value = newValue;\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /** helper function to process properties defined as type ConditionalBooleanValue | boolean | undefined */\r\n public static refreshValue(conditionalValue: ConditionalBooleanValue | boolean | undefined, eventIds: Set<string>): boolean {\r\n if (undefined === conditionalValue || !(conditionalValue instanceof ConditionalBooleanValue))\r\n return false;\r\n\r\n if (conditionalValue.syncEventIds.some((value: string): boolean => eventIds.has(value.toLowerCase())))\r\n return conditionalValue.refresh();\r\n\r\n return false;\r\n }\r\n\r\n /** helper function to get boolean from a ConditionalBooleanValue | boolean | undefined */\r\n public static getValue(conditionalValue: ConditionalBooleanValue | boolean | undefined): boolean {\r\n if (undefined === conditionalValue)\r\n return false;\r\n\r\n if (conditionalValue instanceof ConditionalBooleanValue)\r\n return conditionalValue.value;\r\n\r\n return conditionalValue;\r\n }\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"ConditionalStringValue.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/ConditionalStringValue.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;GAGG;AACH,MAAa,sBAAsB;IASL;IAA4C;IARhE,MAAM,CAAU;IAExB;;;;;OAKG;IACH,YAA4B,YAA0B,EAAkB,YAAsB,EAAE,KAAc;QAAlF,iBAAY,GAAZ,YAAY,CAAc;QAAkB,iBAAY,GAAZ,YAAY,CAAU;QAC5F,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,oDAAoD;IACpD,IAAW,KAAK;QACd,IAAI,SAAS,KAAK,IAAI,CAAC,MAAM;YAC3B,OAAO,IAAI,CAAC,MAAM,CAAC;QAErB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,6DAA6D;IACtD,OAAO;QACZ,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACrC,IAAI,QAAQ,KAAK,IAAI,CAAC,MAAM,EAAE,CAAC;YAC7B,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;YACvB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,YAAY,CAAC,gBAA6D,EAAE,QAAqB;QAC7G,IAAI,SAAS,KAAK,gBAAgB,IAAI,CAAC,CAAC,gBAAgB,YAAY,sBAAsB,CAAC;YACzF,OAAO,KAAK,CAAC;QAEf,IAAI,gBAAgB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,KAAa,EAAW,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;YACnG,OAAO,gBAAgB,CAAC,OAAO,EAAE,CAAC;QAEpC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,uFAAuF;IAChF,MAAM,CAAC,QAAQ,CAAC,gBAA6D;QAClF,IAAI,SAAS,KAAK,gBAAgB;YAChC,OAAO,SAAS,CAAC;QAEnB,IAAI,gBAAgB,YAAY,sBAAsB;YACpD,OAAO,gBAAgB,CAAC,KAAK,CAAC;QAEhC,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF;AAvDD,wDAuDC","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 Item\n */\n\n/** Class used to return a string value. The string value is refreshed by using the specified function. The syncEventIds define one or more\n * eventIds that would require the stringGetter function to be rerun.\n * @public\n */\nexport class ConditionalStringValue {\n private _value?: string;\n\n /**\n * Constructor for ConditionalStringValue. It is important that the same ConditionalStringValue instance is not used by multiple UI item definitions in order that the control's state is always rendered correctly.\n * @param stringGetter Function to run to retrieve the value for the conditional. This function is run when refresh method is called or if the value is not defined in the constructor.\n * @param syncEventIds An array of eventId that should be monitored to determine when to run the refresh method.\n * @param value The default value for the conditional value. If not specified then the function is run to set the value when the value is retrieved.\n */\n constructor(public readonly stringGetter: () => string, public readonly syncEventIds: string[], value?: string) {\n this._value = value;\n }\n\n /** The current boolean value of the conditional. */\n public get value(): string {\n if (undefined !== this._value)\n return this._value;\n\n this._value = this.stringGetter();\n return this._value;\n }\n\n /** Called to update the value by running the stringGetter */\n public refresh(): boolean {\n const newValue = this.stringGetter();\n if (newValue !== this._value) {\n this._value = newValue;\n return true;\n }\n return false;\n }\n\n /** helper function to process properties defined as type ConditionalStringValue | string | undefined\n * Return true if the value was updated.\n */\n public static refreshValue(conditionalValue: ConditionalStringValue | string | undefined, eventIds: Set<string>): boolean {\n if (undefined === conditionalValue || !(conditionalValue instanceof ConditionalStringValue))\n return false;\n\n if (conditionalValue.syncEventIds.some((value: string): boolean => eventIds.has(value.toLowerCase())))\n return conditionalValue.refresh();\n\n return false;\n }\n\n /** helper function to get string from a ConditionalStringValue | string | undefined */\n public static getValue(conditionalValue: ConditionalStringValue | string | undefined): string | undefined {\n if (undefined === conditionalValue)\n return undefined;\n\n if (conditionalValue instanceof ConditionalStringValue)\n return conditionalValue.value;\n\n return conditionalValue;\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"ConditionalStringValue.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/ConditionalStringValue.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;GAGG;AACH,MAAa,sBAAsB;IASL;IAA4C;IARhE,MAAM,CAAU;IAExB;;;;;OAKG;IACH,YAA4B,YAA0B,EAAkB,YAAsB,EAAE,KAAc;QAAlF,iBAAY,GAAZ,YAAY,CAAc;QAAkB,iBAAY,GAAZ,YAAY,CAAU;QAC5F,IAAI,CAAC,MAAM,GAAG,KAAK,CAAC;IACtB,CAAC;IAED,oDAAoD;IACpD,IAAW,KAAK;QACd,IAAI,SAAS,KAAK,IAAI,CAAC,MAAM;YAC3B,OAAO,IAAI,CAAC,MAAM,CAAC;QAErB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QAClC,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;IAED,6DAA6D;IACtD,OAAO;QACZ,MAAM,QAAQ,GAAG,IAAI,CAAC,YAAY,EAAE,CAAC;QACrC,IAAI,QAAQ,KAAK,IAAI,CAAC,MAAM,EAAE,CAAC;YAC7B,IAAI,CAAC,MAAM,GAAG,QAAQ,CAAC;YACvB,OAAO,IAAI,CAAC;QACd,CAAC;QACD,OAAO,KAAK,CAAC;IACf,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,YAAY,CAAC,gBAA6D,EAAE,QAAqB;QAC7G,IAAI,SAAS,KAAK,gBAAgB,IAAI,CAAC,CAAC,gBAAgB,YAAY,sBAAsB,CAAC;YACzF,OAAO,KAAK,CAAC;QAEf,IAAI,gBAAgB,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC,KAAa,EAAW,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;YACnG,OAAO,gBAAgB,CAAC,OAAO,EAAE,CAAC;QAEpC,OAAO,KAAK,CAAC;IACf,CAAC;IAED,uFAAuF;IAChF,MAAM,CAAC,QAAQ,CAAC,gBAA6D;QAClF,IAAI,SAAS,KAAK,gBAAgB;YAChC,OAAO,SAAS,CAAC;QAEnB,IAAI,gBAAgB,YAAY,sBAAsB;YACpD,OAAO,gBAAgB,CAAC,KAAK,CAAC;QAEhC,OAAO,gBAAgB,CAAC;IAC1B,CAAC;CACF;AAvDD,wDAuDC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Item\r\n */\r\n\r\n/** Class used to return a string value. The string value is refreshed by using the specified function. The syncEventIds define one or more\r\n * eventIds that would require the stringGetter function to be rerun.\r\n * @public\r\n */\r\nexport class ConditionalStringValue {\r\n private _value?: string;\r\n\r\n /**\r\n * Constructor for ConditionalStringValue. It is important that the same ConditionalStringValue instance is not used by multiple UI item definitions in order that the control's state is always rendered correctly.\r\n * @param stringGetter Function to run to retrieve the value for the conditional. This function is run when refresh method is called or if the value is not defined in the constructor.\r\n * @param syncEventIds An array of eventId that should be monitored to determine when to run the refresh method.\r\n * @param value The default value for the conditional value. If not specified then the function is run to set the value when the value is retrieved.\r\n */\r\n constructor(public readonly stringGetter: () => string, public readonly syncEventIds: string[], value?: string) {\r\n this._value = value;\r\n }\r\n\r\n /** The current boolean value of the conditional. */\r\n public get value(): string {\r\n if (undefined !== this._value)\r\n return this._value;\r\n\r\n this._value = this.stringGetter();\r\n return this._value;\r\n }\r\n\r\n /** Called to update the value by running the stringGetter */\r\n public refresh(): boolean {\r\n const newValue = this.stringGetter();\r\n if (newValue !== this._value) {\r\n this._value = newValue;\r\n return true;\r\n }\r\n return false;\r\n }\r\n\r\n /** helper function to process properties defined as type ConditionalStringValue | string | undefined\r\n * Return true if the value was updated.\r\n */\r\n public static refreshValue(conditionalValue: ConditionalStringValue | string | undefined, eventIds: Set<string>): boolean {\r\n if (undefined === conditionalValue || !(conditionalValue instanceof ConditionalStringValue))\r\n return false;\r\n\r\n if (conditionalValue.syncEventIds.some((value: string): boolean => eventIds.has(value.toLowerCase())))\r\n return conditionalValue.refresh();\r\n\r\n return false;\r\n }\r\n\r\n /** helper function to get string from a ConditionalStringValue | string | undefined */\r\n public static getValue(conditionalValue: ConditionalStringValue | string | undefined): string | undefined {\r\n if (undefined === conditionalValue)\r\n return undefined;\r\n\r\n if (conditionalValue instanceof ConditionalStringValue)\r\n return conditionalValue.value;\r\n\r\n return conditionalValue;\r\n }\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"RelativePosition.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/RelativePosition.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACH,IAAY,gBAWX;AAXD,WAAY,gBAAgB;IAC1B,uDAAQ,CAAA;IACR,qDAAO,CAAA;IACP,yDAAS,CAAA;IACT,2DAAU,CAAA;IACV,6DAAW,CAAA;IACX,+DAAY,CAAA;IACZ,mEAAc,CAAA;IACd,qEAAe,CAAA;IACf,+DAAY,CAAA;IACZ,6DAAW,CAAA;AACb,CAAC,EAXW,gBAAgB,gCAAhB,gBAAgB,QAW3B","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 Item\n */\n\n/** Relative Position for popups\n * @public\n */\nexport enum RelativePosition {\n Left = 0,\n Top = 1,\n Right = 2,\n Bottom = 3,\n TopLeft = 4,\n TopRight = 5,\n BottomLeft = 6,\n BottomRight = 7,\n RightTop = 8,\n LeftTop = 9,\n}\n"]}
|
1
|
+
{"version":3,"file":"RelativePosition.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/RelativePosition.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACH,IAAY,gBAWX;AAXD,WAAY,gBAAgB;IAC1B,uDAAQ,CAAA;IACR,qDAAO,CAAA;IACP,yDAAS,CAAA;IACT,2DAAU,CAAA;IACV,6DAAW,CAAA;IACX,+DAAY,CAAA;IACZ,mEAAc,CAAA;IACd,qEAAe,CAAA;IACf,+DAAY,CAAA;IACZ,6DAAW,CAAA;AACb,CAAC,EAXW,gBAAgB,gCAAhB,gBAAgB,QAW3B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Item\r\n */\r\n\r\n/** Relative Position for popups\r\n * @public\r\n */\r\nexport enum RelativePosition {\r\n Left = 0,\r\n Top = 1,\r\n Right = 2,\r\n Bottom = 3,\r\n TopLeft = 4,\r\n TopRight = 5,\r\n BottomLeft = 6,\r\n BottomRight = 7,\r\n RightTop = 8,\r\n LeftTop = 9,\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MessagePresenter.js","sourceRoot":"","sources":["../../../../src/appui-abstract/notification/MessagePresenter.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;GAEG;AACH,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,mEAAmE;IACnE,6DAAS,CAAA;IACT,6EAA6E;IAC7E,+DAAU,CAAA;IACV,2DAA2D;IAC3D,uEAAc,CAAA;IACd,yBAAyB;IACzB,6DAAS,CAAA;AACX,CAAC,EATW,kBAAkB,kCAAlB,kBAAkB,QAS7B","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 { MessageSeverity } from \"./MessageSeverity\";\n\n/** Describes the type and behavior of a display message.\n * @public\n */\nexport enum DisplayMessageType {\n /** Temporary message that displays at the bottom of the screen. */\n Toast = 0,\n /** Message with a close button that displays at the bottom of the screen. */\n Sticky = 2,\n /** Message that displays near a specified HTML element. */\n InputField = 3,\n /** Modal message box. */\n Alert = 4,\n}\n\n/** MessagePresenter interface functions display messages.\n * @public\n */\nexport interface MessagePresenter {\n /**\n * Displays a message.\n * @param severity The severity of the message.\n * @param briefMessage A short message that conveys the simplest explanation of the issue.\n * @param detailedMessage An optional comprehensive message that explains the issue in detail and potentially offers a solution.\n * @param messageType The type of message. Defaults to Toast.\n */\n displayMessage(severity: MessageSeverity, briefMessage: HTMLElement | string, detailedMessage?: HTMLElement | string, messageType?: DisplayMessageType): void;\n\n /**\n * Displays an input field message.\n * @param inputField Input field to which the message pertains. The message will be shown just below this input field element.\n * @param severity The severity of the message.\n * @param briefMessage A short message that conveys the simplest explanation of the issue.\n * @param detailedMessage An optional comprehensive message that explains the issue in detail and potentially offers a solution.\n */\n displayInputFieldMessage(inputField: HTMLElement, severity: MessageSeverity, briefMessage: HTMLElement | string, detailedMessage?: HTMLElement | string): void;\n\n /**\n * Close message created with `displayInputFieldMessage`.\n */\n closeInputFieldMessage(): void;\n}\n"]}
|
1
|
+
{"version":3,"file":"MessagePresenter.js","sourceRoot":"","sources":["../../../../src/appui-abstract/notification/MessagePresenter.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAIH;;GAEG;AACH,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,mEAAmE;IACnE,6DAAS,CAAA;IACT,6EAA6E;IAC7E,+DAAU,CAAA;IACV,2DAA2D;IAC3D,uEAAc,CAAA;IACd,yBAAyB;IACzB,6DAAS,CAAA;AACX,CAAC,EATW,kBAAkB,kCAAlB,kBAAkB,QAS7B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Notification\r\n */\r\n\r\nimport { MessageSeverity } from \"./MessageSeverity\";\r\n\r\n/** Describes the type and behavior of a display message.\r\n * @public\r\n */\r\nexport enum DisplayMessageType {\r\n /** Temporary message that displays at the bottom of the screen. */\r\n Toast = 0,\r\n /** Message with a close button that displays at the bottom of the screen. */\r\n Sticky = 2,\r\n /** Message that displays near a specified HTML element. */\r\n InputField = 3,\r\n /** Modal message box. */\r\n Alert = 4,\r\n}\r\n\r\n/** MessagePresenter interface functions display messages.\r\n * @public\r\n */\r\nexport interface MessagePresenter {\r\n /**\r\n * Displays a message.\r\n * @param severity The severity of the message.\r\n * @param briefMessage A short message that conveys the simplest explanation of the issue.\r\n * @param detailedMessage An optional comprehensive message that explains the issue in detail and potentially offers a solution.\r\n * @param messageType The type of message. Defaults to Toast.\r\n */\r\n displayMessage(severity: MessageSeverity, briefMessage: HTMLElement | string, detailedMessage?: HTMLElement | string, messageType?: DisplayMessageType): void;\r\n\r\n /**\r\n * Displays an input field message.\r\n * @param inputField Input field to which the message pertains. The message will be shown just below this input field element.\r\n * @param severity The severity of the message.\r\n * @param briefMessage A short message that conveys the simplest explanation of the issue.\r\n * @param detailedMessage An optional comprehensive message that explains the issue in detail and potentially offers a solution.\r\n */\r\n displayInputFieldMessage(inputField: HTMLElement, severity: MessageSeverity, briefMessage: HTMLElement | string, detailedMessage?: HTMLElement | string): void;\r\n\r\n /**\r\n * Close message created with `displayInputFieldMessage`.\r\n */\r\n closeInputFieldMessage(): void;\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"MessageSeverity.js","sourceRoot":"","sources":["../../../../src/appui-abstract/notification/MessageSeverity.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;IAEI;AACJ,IAAY,eAQX;AARD,WAAY,eAAe;IACzB,qDAAQ,CAAA;IACR,mEAAe,CAAA;IACf,6DAAY,CAAA;IACZ,2DAAW,CAAA;IACX,uDAAS,CAAA;IACT,uDAAS,CAAA;IACT,2DAAW,CAAA;AACb,CAAC,EARW,eAAe,+BAAf,eAAe,QAQ1B","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\n/** Message Severity enum for display messages.\n * @public\n */\nexport enum MessageSeverity {\n None = 0,\n Information = 1,\n Question = 2,\n Warning = 3,\n Error = 4,\n Fatal = 5,\n Success = 6,\n}\n"]}
|
1
|
+
{"version":3,"file":"MessageSeverity.js","sourceRoot":"","sources":["../../../../src/appui-abstract/notification/MessageSeverity.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;IAEI;AACJ,IAAY,eAQX;AARD,WAAY,eAAe;IACzB,qDAAQ,CAAA;IACR,mEAAe,CAAA;IACf,6DAAY,CAAA;IACZ,2DAAW,CAAA;IACX,uDAAS,CAAA;IACT,uDAAS,CAAA;IACT,2DAAW,CAAA;AACb,CAAC,EARW,eAAe,+BAAf,eAAe,QAQ1B","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Notification\r\n */\r\n\r\n/** Message Severity enum for display messages.\r\n * @public\r\n */\r\nexport enum MessageSeverity {\r\n None = 0,\r\n Information = 1,\r\n Question = 2,\r\n Warning = 3,\r\n Error = 4,\r\n Fatal = 5,\r\n Success = 6,\r\n}\r\n"]}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"Description.js","sourceRoot":"","sources":["../../../../src/appui-abstract/properties/Description.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,iDAGwB;AACxB,+DAA4D;AAC5D,2DAAwD;AAmFxD;;GAEG;AACH,MAAa,yBAAyB;IACpC;;OAEG;IACI,MAAM,CAAC,4BAA4B,CAAC,IAAY,EAAE,KAAa,EAAE,mBAA+C,EAAE;QACvH,OAAO;YACL,IAAI;YACJ,YAAY,EAAE,KAAK;YACnB,QAAQ,EAAE,qCAAiB,CAAC,MAAM;YAClC,MAAM,EAAE;gBACN,IAAI,EAAE,yCAAmB,CAAC,YAAY;gBACtC,MAAM,EAAE,gBAAgB;aACzB;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,4BAA4B,CAAC,IAAY,EAAE,KAAa,EAAE,cAAkC,EAAE,mBAA+C,EAAE;QAC3J,MAAM,YAAY,GAAG,CAAC;gBACpB,IAAI,EAAE,uCAAwB,CAAC,KAAK;gBACpC,IAAI,EAAE,CAAC;gBACP,SAAS,EAAE,CAAC;gBACZ,GAAG,cAAc;aACG,EAAE,GAAG,gBAAgB,CAAC,CAAC;QAE7C,MAAM,MAAM,GAAG;YACb,IAAI,EAAE,yCAAmB,CAAC,YAAY;YACtC,MAAM,EAAE,YAAY;SACrB,CAAC;QAEF,OAAO;YACL,IAAI;YACJ,YAAY,EAAE,KAAK;YACnB,QAAQ,EAAE,qCAAiB,CAAC,MAAM;YAClC,MAAM;SACP,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,0BAA0B,CAAC,IAAY,EAAE,KAAa,EAAE,mB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AC3F,IAAI,OAAwC,CAAC;QAE7C,IAAI,WAAW,CAAC,IAAI,EAAE,CAAC;YACrB,IAAI,WAAW,CAAC,IAAI,CAAC,OAAO,YAAY,OAAO,EAAE,CAAC;gBAChD,OAAO,GAAG,MAAM,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC;YAC3C,CAAC;iBAAM,CAAC;gBACN,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC;YACrC,CAAC;QACH,CAAC;QAED,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAClC,OAAO,KAAK,CAAC;QAEf,IAAI,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;QACxE,IAAI,WAAW,GAAG,CAAC;YACjB,OAAO,KAAK,CAAC;QAEf,WAAW,EAAE,CAAC;QACd,IAAI,WAAW,IAAI,OAAO,CAAC,MAAM;YAC/B,WAAW,GAAG,CAAC,CAAC;QAElB,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC;QAC5C,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AA3MD,8DA2MC","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 Properties\n */\n\nimport {\n BasePropertyEditorParams, ColorEditorParams, ImageCheckBoxParams, PropertyEditorParams, PropertyEditorParamTypes, RangeEditorParams,\n SuppressLabelEditorParams,\n} from \"./EditorParams\";\nimport { StandardEditorNames } from \"./StandardEditorNames\";\nimport { StandardTypeNames } from \"./StandardTypeNames\";\n\n// cSpell:ignore Picklist\n\n/**\n * Information about an enumeration choice\n * @public\n */\nexport interface EnumerationChoice {\n label: string;\n value: string | number;\n}\n\n/**\n * Information about a set of enumeration choices\n * @public\n */\nexport interface EnumerationChoicesInfo {\n choices: Promise<EnumerationChoice[]> | EnumerationChoice[];\n isStrict?: boolean;\n maxDisplayedRows?: number;\n}\n\n/**\n * Property renderer identification and customization attributes\n * @public\n */\nexport interface PropertyRendererInfo {\n name: string;\n}\n\n/**\n * Information about a Property Editor\n * @public\n */\nexport interface PropertyEditorInfo {\n /** Editor name used in addition to the typename to find the registered property editor */\n name?: string;\n /** Editor params provided to the property editor */\n params?: PropertyEditorParams[];\n}\n\n/**\n * Information about a Property Converter\n * @public\n */\nexport interface PropertyConverterInfo {\n /** Converter name used in addition to the typename to find the registered property converter */\n name?: string;\n /** map of options for type converter */\n options?: { [key: string]: any };\n}\n\n/**\n * [[PropertyDescription]] contains metadata about a Property\n * @public\n */\nexport interface PropertyDescription {\n /** Name of the property description */\n name: string;\n /** Display label for the property description */\n displayLabel: string;\n /** Type name used to determine applicable Type Converter and Property Editor */\n typename: string;\n /** Additional information for enumerations */\n enum?: EnumerationChoicesInfo;\n /** Information for property renderer customization */\n renderer?: PropertyRendererInfo;\n /** Information for a property editor */\n editor?: PropertyEditorInfo;\n /** Information for a property converter */\n converter?: PropertyConverterInfo;\n /** Quantity type key used to look up formatting and parsing specs. This is typically either the name of a quantity type used by a tool\n * or the full name of a KOQ (schema:koq).\n * @alpha\n */\n quantityType?: string;\n /** Get the custom DataController by this name and register it with the property editor */\n dataController?: string;\n /** Should property label for composite (struct & array) properties be rendered. */\n hideCompositePropertyLabel?: boolean;\n}\n\n/** Helper class that builds property descriptions for specific PropertyEditors and processes descriptions.\n * @public\n */\nexport class PropertyDescriptionHelper {\n /** Builds a number description with a \"weight-picker\" editor name\n * @public\n */\n public static buildWeightPickerDescription(name: string, label: string, additionalParams: BasePropertyEditorParams[] = []): PropertyDescription {\n return {\n name,\n displayLabel: label,\n typename: StandardTypeNames.Number,\n editor: {\n name: StandardEditorNames.WeightPicker,\n params: additionalParams,\n },\n };\n }\n\n /** Builds an editor that uses [NumberInput]($core-react) control\n * @public\n */\n public static buildNumberEditorDescription(name: string, label: string, overrideParams?: RangeEditorParams, additionalParams: BasePropertyEditorParams[] = []): PropertyDescription {\n const editorParams = [{\n type: PropertyEditorParamTypes.Range,\n step: 1,\n precision: 0,\n ...overrideParams,\n } as RangeEditorParams, ...additionalParams];\n\n const editor = {\n name: StandardEditorNames.NumericInput,\n params: editorParams,\n };\n\n return {\n name,\n displayLabel: label,\n typename: StandardTypeNames.Number,\n editor,\n };\n }\n\n /** Builds a string description\n * @public\n */\n public static buildTextEditorDescription(name: string, label: string, additionalParams: BasePropertyEditorParams[] = []): PropertyDescription {\n const editor = {\n params: additionalParams,\n };\n\n return {\n name,\n displayLabel: label,\n typename: StandardTypeNames.String,\n editor,\n };\n }\n\n /** Builds an enum description\n * @public\n */\n public static buildEnumPicklistEditorDescription(name: string, label: string,\n choices: Promise<EnumerationChoice[]> | EnumerationChoice[],\n additionalParams: BasePropertyEditorParams[] = []): PropertyDescription {\n const editor = additionalParams.length ? {\n params: additionalParams,\n } : undefined;\n\n return {\n name,\n displayLabel: label,\n typename: StandardTypeNames.Enum,\n editor,\n enum: {\n choices,\n },\n };\n }\n\n /** Builds a number description for a tool settings or dialog property that will display a \"color-picker\" control.\n * @public\n */\n public static buildColorPickerDescription(name: string, label: string, colorValues: number[], numColumns: number,\n additionalParams: BasePropertyEditorParams[] = []): PropertyDescription {\n const editorParams = [\n {\n type: PropertyEditorParamTypes.ColorData,\n colorValues,\n numColumns,\n } as ColorEditorParams,\n ...additionalParams,\n ];\n\n return {\n name,\n displayLabel: label,\n typename: StandardTypeNames.Number,\n editor: {\n name: StandardEditorNames.ColorPicker,\n params: editorParams,\n },\n };\n }\n\n /** Builds a boolean description for a tool settings or dialog property that will display a \"toggle\" control.\n * @public\n */\n public static buildToggleDescription(name: string, label: string, additionalParams: BasePropertyEditorParams[] = []): PropertyDescription {\n return {\n name,\n displayLabel: label,\n typename: StandardTypeNames.Boolean,\n editor: {\n name: StandardEditorNames.Toggle,\n params: additionalParams,\n },\n };\n }\n\n /** Builds a boolean description for a tool settings or dialog property that will display a \"image-check-box\" control.\n * @public\n */\n public static buildImageCheckBoxDescription(name: string, label: string, imageOff: string, imageOn: string, additionalParams: BasePropertyEditorParams[] = []): PropertyDescription {\n const editorParams = [{\n type: PropertyEditorParamTypes.CheckBoxImages,\n imageOff,\n imageOn,\n } as ImageCheckBoxParams, ...additionalParams];\n\n return {\n name,\n displayLabel: label,\n typename: StandardTypeNames.Boolean,\n editor: {\n name: StandardEditorNames.ImageCheckBox,\n params: editorParams,\n },\n };\n }\n\n /** Builds a boolean description for a tool settings or dialog property that will display a checkbox control.\n * @public\n */\n public static buildCheckboxDescription(name: string, label: string, additionalParams: BasePropertyEditorParams[] = []): PropertyDescription {\n const editor = {\n params: additionalParams,\n };\n\n return {\n name,\n displayLabel: label,\n typename: StandardTypeNames.Boolean,\n editor,\n };\n }\n\n /** Builds a property description for a tool settings or dialog `lock` property. This will create a checkbox control with no label.\n * @public\n */\n public static buildLockPropertyDescription(name: string, additionalParams: BasePropertyEditorParams[] = []): PropertyDescription {\n const defaultParams = {\n type: PropertyEditorParamTypes.SuppressEditorLabel,\n suppressLabelPlaceholder: true,\n } as SuppressLabelEditorParams;\n\n const editor = {\n params: [defaultParams, ...additionalParams],\n };\n\n return {\n name,\n displayLabel: \"\",\n typename: StandardTypeNames.Boolean,\n editor,\n };\n }\n\n /** Bumps an enum property description value\n * @public\n */\n public static async bumpEnumProperty(description: PropertyDescription, value: string | number): Promise<string | number> {\n let choices: EnumerationChoice[] | undefined;\n\n if (description.enum) {\n if (description.enum.choices instanceof Promise) {\n choices = await description.enum.choices;\n } else {\n choices = description.enum.choices;\n }\n }\n\n if (!choices || choices.length === 0)\n return value;\n\n let choiceIndex = choices.findIndex((choice) => choice.value === value);\n if (choiceIndex < 0)\n return value;\n\n choiceIndex++;\n if (choiceIndex >= choices.length)\n choiceIndex = 0;\n\n const newValue = choices[choiceIndex].value;\n return newValue;\n }\n}\n"]}
|
1
|
+
{"version":3,"file":"Description.js","sourceRoot":"","sources":["../../../../src/appui-abstract/properties/Description.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,iDAGwB;AACxB,+DAA4D;AAC5D,2DAAwD;AAmFxD;;GAEG;AACH,MAAa,yBAAyB;IACpC;;OAEG;IACI,MAAM,CAAC,4BAA4B,CAAC,IAAY,EAAE,KAAa,EAAE,mBAA+C,EAAE;QACvH,OAAO;YACL,IAAI;YACJ,YAAY,EAAE,KAAK;YACnB,QAAQ,EAAE,qCAAiB,CAAC,MAAM;YAClC,MAAM,EAAE;gBACN,IAAI,EAAE,yCAAmB,CAAC,YAAY;gBACtC,MAAM,EAAE,gBAAgB;aACzB;SACF,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,4BAA4B,CAAC,IAAY,EAAE,KAAa,EAAE,cAAkC,EAAE,mBAA+C,EAAE;QAC3J,MAAM,YAAY,GAAG,CAAC;gBACpB,IAAI,EAAE,uCAAwB,CAAC,KAAK;gBACpC,IAAI,EAAE,CAAC;gBACP,SAAS,EAAE,CAAC;gBACZ,GAAG,cAAc;aACG,EAAE,GAAG,gBAAgB,CAAC,CAAC;QAE7C,MAAM,MAAM,GAAG;YACb,IAAI,EAAE,yCAAmB,CAAC,YAAY;YACtC,MAAM,EAAE,YAAY;SACrB,CAAC;QAEF,OAAO;YACL,IAAI;YACJ,YAAY,EAAE,KAAK;YACnB,QAAQ,EAAE,qCAAiB,CAAC,MAAM;YAClC,MAAM;SACP,CAAC;IACJ,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,0BAA0B,CAAC,IAAY,EAAE,KAAa,EAAE,mBAA+C,EAAE;QACrH,MAAM,MAAM,GAAG;YACb,MAAM,EAAE,gBAAgB;SACzB,CAAC;QAEF,OAAO;YACL,IAAI;YACJ,YAAY,EAAE,KAAK;YACnB,QAAQ,EAAE,qCAAiB,CAAC,MAAM;YAClC,MAAM;SACP,CAAC;IAC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AAO,CAAC;YAC3C,CAAC;iBAAM,CAAC;gBACN,OAAO,GAAG,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC;YACrC,CAAC;QACH,CAAC;QAED,IAAI,CAAC,OAAO,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC;YAClC,OAAO,KAAK,CAAC;QAEf,IAAI,WAAW,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,MAAM,CAAC,KAAK,KAAK,KAAK,CAAC,CAAC;QACxE,IAAI,WAAW,GAAG,CAAC;YACjB,OAAO,KAAK,CAAC;QAEf,WAAW,EAAE,CAAC;QACd,IAAI,WAAW,IAAI,OAAO,CAAC,MAAM;YAC/B,WAAW,GAAG,CAAC,CAAC;QAElB,MAAM,QAAQ,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC,KAAK,CAAC;QAC5C,OAAO,QAAQ,CAAC;IAClB,CAAC;CACF;AA3MD,8DA2MC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Properties\r\n */\r\n\r\nimport {\r\n BasePropertyEditorParams, ColorEditorParams, ImageCheckBoxParams, PropertyEditorParams, PropertyEditorParamTypes, RangeEditorParams,\r\n SuppressLabelEditorParams,\r\n} from \"./EditorParams\";\r\nimport { StandardEditorNames } from \"./StandardEditorNames\";\r\nimport { StandardTypeNames } from \"./StandardTypeNames\";\r\n\r\n// cSpell:ignore Picklist\r\n\r\n/**\r\n * Information about an enumeration choice\r\n * @public\r\n */\r\nexport interface EnumerationChoice {\r\n label: string;\r\n value: string | number;\r\n}\r\n\r\n/**\r\n * Information about a set of enumeration choices\r\n * @public\r\n */\r\nexport interface EnumerationChoicesInfo {\r\n choices: Promise<EnumerationChoice[]> | EnumerationChoice[];\r\n isStrict?: boolean;\r\n maxDisplayedRows?: number;\r\n}\r\n\r\n/**\r\n * Property renderer identification and customization attributes\r\n * @public\r\n */\r\nexport interface PropertyRendererInfo {\r\n name: string;\r\n}\r\n\r\n/**\r\n * Information about a Property Editor\r\n * @public\r\n */\r\nexport interface PropertyEditorInfo {\r\n /** Editor name used in addition to the typename to find the registered property editor */\r\n name?: string;\r\n /** Editor params provided to the property editor */\r\n params?: PropertyEditorParams[];\r\n}\r\n\r\n/**\r\n * Information about a Property Converter\r\n * @public\r\n */\r\nexport interface PropertyConverterInfo {\r\n /** Converter name used in addition to the typename to find the registered property converter */\r\n name?: string;\r\n /** map of options for type converter */\r\n options?: { [key: string]: any };\r\n}\r\n\r\n/**\r\n * [[PropertyDescription]] contains metadata about a Property\r\n * @public\r\n */\r\nexport interface PropertyDescription {\r\n /** Name of the property description */\r\n name: string;\r\n /** Display label for the property description */\r\n displayLabel: string;\r\n /** Type name used to determine applicable Type Converter and Property Editor */\r\n typename: string;\r\n /** Additional information for enumerations */\r\n enum?: EnumerationChoicesInfo;\r\n /** Information for property renderer customization */\r\n renderer?: PropertyRendererInfo;\r\n /** Information for a property editor */\r\n editor?: PropertyEditorInfo;\r\n /** Information for a property converter */\r\n converter?: PropertyConverterInfo;\r\n /** Quantity type key used to look up formatting and parsing specs. This is typically either the name of a quantity type used by a tool\r\n * or the full name of a KOQ (schema:koq).\r\n * @alpha\r\n */\r\n quantityType?: string;\r\n /** Get the custom DataController by this name and register it with the property editor */\r\n dataController?: string;\r\n /** Should property label for composite (struct & array) properties be rendered. */\r\n hideCompositePropertyLabel?: boolean;\r\n}\r\n\r\n/** Helper class that builds property descriptions for specific PropertyEditors and processes descriptions.\r\n * @public\r\n */\r\nexport class PropertyDescriptionHelper {\r\n /** Builds a number description with a \"weight-picker\" editor name\r\n * @public\r\n */\r\n public static buildWeightPickerDescription(name: string, label: string, additionalParams: BasePropertyEditorParams[] = []): PropertyDescription {\r\n return {\r\n name,\r\n displayLabel: label,\r\n typename: StandardTypeNames.Number,\r\n editor: {\r\n name: StandardEditorNames.WeightPicker,\r\n params: additionalParams,\r\n },\r\n };\r\n }\r\n\r\n /** Builds an editor that uses [NumberInput]($core-react) control\r\n * @public\r\n */\r\n public static buildNumberEditorDescription(name: string, label: string, overrideParams?: RangeEditorParams, additionalParams: BasePropertyEditorParams[] = []): PropertyDescription {\r\n const editorParams = [{\r\n type: PropertyEditorParamTypes.Range,\r\n step: 1,\r\n precision: 0,\r\n ...overrideParams,\r\n } as RangeEditorParams, ...additionalParams];\r\n\r\n const editor = {\r\n name: StandardEditorNames.NumericInput,\r\n params: editorParams,\r\n };\r\n\r\n return {\r\n name,\r\n displayLabel: label,\r\n typename: StandardTypeNames.Number,\r\n editor,\r\n };\r\n }\r\n\r\n /** Builds a string description\r\n * @public\r\n */\r\n public static buildTextEditorDescription(name: string, label: string, additionalParams: BasePropertyEditorParams[] = []): PropertyDescription {\r\n const editor = {\r\n params: additionalParams,\r\n };\r\n\r\n return {\r\n name,\r\n displayLabel: label,\r\n typename: StandardTypeNames.String,\r\n editor,\r\n };\r\n }\r\n\r\n /** Builds an enum description\r\n * @public\r\n */\r\n public static buildEnumPicklistEditorDescription(name: string, label: string,\r\n choices: Promise<EnumerationChoice[]> | EnumerationChoice[],\r\n additionalParams: BasePropertyEditorParams[] = []): PropertyDescription {\r\n const editor = additionalParams.length ? {\r\n params: additionalParams,\r\n } : undefined;\r\n\r\n return {\r\n name,\r\n displayLabel: label,\r\n typename: StandardTypeNames.Enum,\r\n editor,\r\n enum: {\r\n choices,\r\n },\r\n };\r\n }\r\n\r\n /** Builds a number description for a tool settings or dialog property that will display a \"color-picker\" control.\r\n * @public\r\n */\r\n public static buildColorPickerDescription(name: string, label: string, colorValues: number[], numColumns: number,\r\n additionalParams: BasePropertyEditorParams[] = []): PropertyDescription {\r\n const editorParams = [\r\n {\r\n type: PropertyEditorParamTypes.ColorData,\r\n colorValues,\r\n numColumns,\r\n } as ColorEditorParams,\r\n ...additionalParams,\r\n ];\r\n\r\n return {\r\n name,\r\n displayLabel: label,\r\n typename: StandardTypeNames.Number,\r\n editor: {\r\n name: StandardEditorNames.ColorPicker,\r\n params: editorParams,\r\n },\r\n };\r\n }\r\n\r\n /** Builds a boolean description for a tool settings or dialog property that will display a \"toggle\" control.\r\n * @public\r\n */\r\n public static buildToggleDescription(name: string, label: string, additionalParams: BasePropertyEditorParams[] = []): PropertyDescription {\r\n return {\r\n name,\r\n displayLabel: label,\r\n typename: StandardTypeNames.Boolean,\r\n editor: {\r\n name: StandardEditorNames.Toggle,\r\n params: additionalParams,\r\n },\r\n };\r\n }\r\n\r\n /** Builds a boolean description for a tool settings or dialog property that will display a \"image-check-box\" control.\r\n * @public\r\n */\r\n public static buildImageCheckBoxDescription(name: string, label: string, imageOff: string, imageOn: string, additionalParams: BasePropertyEditorParams[] = []): PropertyDescription {\r\n const editorParams = [{\r\n type: PropertyEditorParamTypes.CheckBoxImages,\r\n imageOff,\r\n imageOn,\r\n } as ImageCheckBoxParams, ...additionalParams];\r\n\r\n return {\r\n name,\r\n displayLabel: label,\r\n typename: StandardTypeNames.Boolean,\r\n editor: {\r\n name: StandardEditorNames.ImageCheckBox,\r\n params: editorParams,\r\n },\r\n };\r\n }\r\n\r\n /** Builds a boolean description for a tool settings or dialog property that will display a checkbox control.\r\n * @public\r\n */\r\n public static buildCheckboxDescription(name: string, label: string, additionalParams: BasePropertyEditorParams[] = []): PropertyDescription {\r\n const editor = {\r\n params: additionalParams,\r\n };\r\n\r\n return {\r\n name,\r\n displayLabel: label,\r\n typename: StandardTypeNames.Boolean,\r\n editor,\r\n };\r\n }\r\n\r\n /** Builds a property description for a tool settings or dialog `lock` property. This will create a checkbox control with no label.\r\n * @public\r\n */\r\n public static buildLockPropertyDescription(name: string, additionalParams: BasePropertyEditorParams[] = []): PropertyDescription {\r\n const defaultParams = {\r\n type: PropertyEditorParamTypes.SuppressEditorLabel,\r\n suppressLabelPlaceholder: true,\r\n } as SuppressLabelEditorParams;\r\n\r\n const editor = {\r\n params: [defaultParams, ...additionalParams],\r\n };\r\n\r\n return {\r\n name,\r\n displayLabel: \"\",\r\n typename: StandardTypeNames.Boolean,\r\n editor,\r\n };\r\n }\r\n\r\n /** Bumps an enum property description value\r\n * @public\r\n */\r\n public static async bumpEnumProperty(description: PropertyDescription, value: string | number): Promise<string | number> {\r\n let choices: EnumerationChoice[] | undefined;\r\n\r\n if (description.enum) {\r\n if (description.enum.choices instanceof Promise) {\r\n choices = await description.enum.choices;\r\n } else {\r\n choices = description.enum.choices;\r\n }\r\n }\r\n\r\n if (!choices || choices.length === 0)\r\n return value;\r\n\r\n let choiceIndex = choices.findIndex((choice) => choice.value === value);\r\n if (choiceIndex < 0)\r\n return value;\r\n\r\n choiceIndex++;\r\n if (choiceIndex >= choices.length)\r\n choiceIndex = 0;\r\n\r\n const newValue = choices[choiceIndex].value;\r\n return newValue;\r\n }\r\n}\r\n"]}
|