@itwin/appui-abstract 5.0.0-dev.6 → 5.0.0-dev.61
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 +38 -1
- package/lib/cjs/appui-abstract/UiAdmin.js +4 -5
- 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 +91 -91
- package/lib/cjs/appui-abstract/content/StandardContentLayouts.js.map +1 -1
- package/lib/cjs/appui-abstract/dialogs/DialogItem.d.ts +1 -5
- package/lib/cjs/appui-abstract/dialogs/DialogItem.d.ts.map +1 -1
- package/lib/cjs/appui-abstract/dialogs/DialogItem.js +4 -0
- package/lib/cjs/appui-abstract/dialogs/DialogItem.js.map +1 -1
- package/lib/cjs/appui-abstract/dialogs/UiDataProvider.js +3 -5
- package/lib/cjs/appui-abstract/dialogs/UiDataProvider.js.map +1 -1
- package/lib/cjs/appui-abstract/dialogs/UiLayoutDataProvider.js +15 -19
- 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 +3 -0
- package/lib/cjs/appui-abstract/items/ConditionalBooleanValue.js.map +1 -1
- package/lib/cjs/appui-abstract/items/ConditionalStringValue.js +3 -0
- 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 +18 -0
- 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 +10 -6
- package/lib/cjs/appui-abstract/quantity/BaseQuantityDescription.js.map +1 -1
- package/lib/cjs/appui-abstract/toolbars/ToolbarItem.d.ts +3 -27
- package/lib/cjs/appui-abstract/toolbars/ToolbarItem.d.ts.map +1 -1
- package/lib/cjs/appui-abstract/toolbars/ToolbarItem.js +15 -37
- package/lib/cjs/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
- package/lib/cjs/appui-abstract/utils/IconSpecUtilities.d.ts +0 -10
- package/lib/cjs/appui-abstract/utils/IconSpecUtilities.d.ts.map +1 -1
- package/lib/cjs/appui-abstract/utils/IconSpecUtilities.js +3 -20
- 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 +1 -0
- 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 +7 -0
- 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.d.ts +1 -28
- package/lib/cjs/appui-abstract.d.ts.map +1 -1
- package/lib/cjs/appui-abstract.js +1 -28
- package/lib/cjs/appui-abstract.js.map +1 -1
- package/lib/esm/appui-abstract/UiAdmin.js +4 -5
- 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 +91 -91
- package/lib/esm/appui-abstract/content/StandardContentLayouts.js.map +1 -1
- package/lib/esm/appui-abstract/dialogs/DialogItem.d.ts +1 -5
- package/lib/esm/appui-abstract/dialogs/DialogItem.d.ts.map +1 -1
- package/lib/esm/appui-abstract/dialogs/DialogItem.js +4 -0
- package/lib/esm/appui-abstract/dialogs/DialogItem.js.map +1 -1
- package/lib/esm/appui-abstract/dialogs/UiDataProvider.js +3 -5
- package/lib/esm/appui-abstract/dialogs/UiDataProvider.js.map +1 -1
- package/lib/esm/appui-abstract/dialogs/UiLayoutDataProvider.js +15 -19
- 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 +3 -0
- package/lib/esm/appui-abstract/items/ConditionalBooleanValue.js.map +1 -1
- package/lib/esm/appui-abstract/items/ConditionalStringValue.js +3 -0
- 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 +18 -0
- 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 +10 -6
- package/lib/esm/appui-abstract/quantity/BaseQuantityDescription.js.map +1 -1
- package/lib/esm/appui-abstract/toolbars/ToolbarItem.d.ts +3 -27
- package/lib/esm/appui-abstract/toolbars/ToolbarItem.d.ts.map +1 -1
- package/lib/esm/appui-abstract/toolbars/ToolbarItem.js +14 -36
- package/lib/esm/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
- package/lib/esm/appui-abstract/utils/IconSpecUtilities.d.ts +0 -10
- package/lib/esm/appui-abstract/utils/IconSpecUtilities.d.ts.map +1 -1
- package/lib/esm/appui-abstract/utils/IconSpecUtilities.js +3 -20
- 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 +1 -0
- 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 +7 -0
- 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.d.ts +1 -28
- package/lib/esm/appui-abstract.d.ts.map +1 -1
- package/lib/esm/appui-abstract.js +1 -28
- package/lib/esm/appui-abstract.js.map +1 -1
- package/package.json +7 -7
- package/lib/cjs/appui-abstract/BaseUiItemsProvider.d.ts +0 -31
- package/lib/cjs/appui-abstract/BaseUiItemsProvider.d.ts.map +0 -1
- package/lib/cjs/appui-abstract/BaseUiItemsProvider.js +0 -80
- package/lib/cjs/appui-abstract/BaseUiItemsProvider.js.map +0 -1
- package/lib/cjs/appui-abstract/UiItemsManager.d.ts +0 -111
- package/lib/cjs/appui-abstract/UiItemsManager.d.ts.map +0 -1
- package/lib/cjs/appui-abstract/UiItemsManager.js +0 -194
- package/lib/cjs/appui-abstract/UiItemsManager.js.map +0 -1
- package/lib/cjs/appui-abstract/UiItemsProvider.d.ts +0 -30
- package/lib/cjs/appui-abstract/UiItemsProvider.d.ts.map +0 -1
- package/lib/cjs/appui-abstract/UiItemsProvider.js +0 -10
- package/lib/cjs/appui-abstract/UiItemsProvider.js.map +0 -1
- package/lib/cjs/appui-abstract/backstage/BackstageItem.d.ts +0 -92
- package/lib/cjs/appui-abstract/backstage/BackstageItem.d.ts.map +0 -1
- package/lib/cjs/appui-abstract/backstage/BackstageItem.js +0 -69
- package/lib/cjs/appui-abstract/backstage/BackstageItem.js.map +0 -1
- package/lib/cjs/appui-abstract/backstage/BackstageItemsManager.d.ts +0 -43
- package/lib/cjs/appui-abstract/backstage/BackstageItemsManager.d.ts.map +0 -1
- package/lib/cjs/appui-abstract/backstage/BackstageItemsManager.js +0 -136
- package/lib/cjs/appui-abstract/backstage/BackstageItemsManager.js.map +0 -1
- package/lib/cjs/appui-abstract/items/ProvidedItem.d.ts +0 -12
- package/lib/cjs/appui-abstract/items/ProvidedItem.d.ts.map +0 -1
- package/lib/cjs/appui-abstract/items/ProvidedItem.js +0 -10
- package/lib/cjs/appui-abstract/items/ProvidedItem.js.map +0 -1
- package/lib/cjs/appui-abstract/items/StageUsage.d.ts +0 -17
- package/lib/cjs/appui-abstract/items/StageUsage.d.ts.map +0 -1
- package/lib/cjs/appui-abstract/items/StageUsage.js +0 -25
- package/lib/cjs/appui-abstract/items/StageUsage.js.map +0 -1
- package/lib/cjs/appui-abstract/statusbar/StatusBarItem.d.ts +0 -129
- package/lib/cjs/appui-abstract/statusbar/StatusBarItem.d.ts.map +0 -1
- package/lib/cjs/appui-abstract/statusbar/StatusBarItem.js +0 -88
- package/lib/cjs/appui-abstract/statusbar/StatusBarItem.js.map +0 -1
- package/lib/cjs/appui-abstract/statusbar/StatusBarItemsManager.d.ts +0 -40
- package/lib/cjs/appui-abstract/statusbar/StatusBarItemsManager.d.ts.map +0 -1
- package/lib/cjs/appui-abstract/statusbar/StatusBarItemsManager.js +0 -136
- package/lib/cjs/appui-abstract/statusbar/StatusBarItemsManager.js.map +0 -1
- package/lib/cjs/appui-abstract/toolbars/ToolbarItemsManager.d.ts +0 -46
- package/lib/cjs/appui-abstract/toolbars/ToolbarItemsManager.d.ts.map +0 -1
- package/lib/cjs/appui-abstract/toolbars/ToolbarItemsManager.js +0 -236
- package/lib/cjs/appui-abstract/toolbars/ToolbarItemsManager.js.map +0 -1
- package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.d.ts +0 -87
- package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.d.ts.map +0 -1
- package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.js +0 -10
- package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.js.map +0 -1
- package/lib/cjs/appui-abstract/widget/StagePanel.d.ts +0 -37
- package/lib/cjs/appui-abstract/widget/StagePanel.d.ts.map +0 -1
- package/lib/cjs/appui-abstract/widget/StagePanel.js +0 -47
- package/lib/cjs/appui-abstract/widget/StagePanel.js.map +0 -1
- package/lib/cjs/appui-abstract/widget/WidgetState.d.ts +0 -20
- package/lib/cjs/appui-abstract/widget/WidgetState.d.ts.map +0 -1
- package/lib/cjs/appui-abstract/widget/WidgetState.js +0 -28
- package/lib/cjs/appui-abstract/widget/WidgetState.js.map +0 -1
- package/lib/esm/appui-abstract/BaseUiItemsProvider.d.ts +0 -31
- package/lib/esm/appui-abstract/BaseUiItemsProvider.d.ts.map +0 -1
- package/lib/esm/appui-abstract/BaseUiItemsProvider.js +0 -76
- package/lib/esm/appui-abstract/BaseUiItemsProvider.js.map +0 -1
- package/lib/esm/appui-abstract/UiItemsManager.d.ts +0 -111
- package/lib/esm/appui-abstract/UiItemsManager.d.ts.map +0 -1
- package/lib/esm/appui-abstract/UiItemsManager.js +0 -190
- package/lib/esm/appui-abstract/UiItemsManager.js.map +0 -1
- package/lib/esm/appui-abstract/UiItemsProvider.d.ts +0 -30
- package/lib/esm/appui-abstract/UiItemsProvider.d.ts.map +0 -1
- package/lib/esm/appui-abstract/UiItemsProvider.js +0 -9
- package/lib/esm/appui-abstract/UiItemsProvider.js.map +0 -1
- package/lib/esm/appui-abstract/backstage/BackstageItem.d.ts +0 -92
- package/lib/esm/appui-abstract/backstage/BackstageItem.d.ts.map +0 -1
- package/lib/esm/appui-abstract/backstage/BackstageItem.js +0 -63
- package/lib/esm/appui-abstract/backstage/BackstageItem.js.map +0 -1
- package/lib/esm/appui-abstract/backstage/BackstageItemsManager.d.ts +0 -43
- package/lib/esm/appui-abstract/backstage/BackstageItemsManager.d.ts.map +0 -1
- package/lib/esm/appui-abstract/backstage/BackstageItemsManager.js +0 -132
- package/lib/esm/appui-abstract/backstage/BackstageItemsManager.js.map +0 -1
- package/lib/esm/appui-abstract/items/ProvidedItem.d.ts +0 -12
- package/lib/esm/appui-abstract/items/ProvidedItem.d.ts.map +0 -1
- package/lib/esm/appui-abstract/items/ProvidedItem.js +0 -9
- package/lib/esm/appui-abstract/items/ProvidedItem.js.map +0 -1
- package/lib/esm/appui-abstract/items/StageUsage.d.ts +0 -17
- package/lib/esm/appui-abstract/items/StageUsage.d.ts.map +0 -1
- package/lib/esm/appui-abstract/items/StageUsage.js +0 -22
- package/lib/esm/appui-abstract/items/StageUsage.js.map +0 -1
- package/lib/esm/appui-abstract/statusbar/StatusBarItem.d.ts +0 -129
- package/lib/esm/appui-abstract/statusbar/StatusBarItem.d.ts.map +0 -1
- package/lib/esm/appui-abstract/statusbar/StatusBarItem.js +0 -81
- package/lib/esm/appui-abstract/statusbar/StatusBarItem.js.map +0 -1
- package/lib/esm/appui-abstract/statusbar/StatusBarItemsManager.d.ts +0 -40
- package/lib/esm/appui-abstract/statusbar/StatusBarItemsManager.d.ts.map +0 -1
- package/lib/esm/appui-abstract/statusbar/StatusBarItemsManager.js +0 -132
- package/lib/esm/appui-abstract/statusbar/StatusBarItemsManager.js.map +0 -1
- package/lib/esm/appui-abstract/toolbars/ToolbarItemsManager.d.ts +0 -46
- package/lib/esm/appui-abstract/toolbars/ToolbarItemsManager.d.ts.map +0 -1
- package/lib/esm/appui-abstract/toolbars/ToolbarItemsManager.js +0 -232
- package/lib/esm/appui-abstract/toolbars/ToolbarItemsManager.js.map +0 -1
- package/lib/esm/appui-abstract/widget/AbstractWidgetProps.d.ts +0 -87
- package/lib/esm/appui-abstract/widget/AbstractWidgetProps.d.ts.map +0 -1
- package/lib/esm/appui-abstract/widget/AbstractWidgetProps.js +0 -9
- package/lib/esm/appui-abstract/widget/AbstractWidgetProps.js.map +0 -1
- package/lib/esm/appui-abstract/widget/StagePanel.d.ts +0 -37
- package/lib/esm/appui-abstract/widget/StagePanel.d.ts.map +0 -1
- package/lib/esm/appui-abstract/widget/StagePanel.js +0 -44
- package/lib/esm/appui-abstract/widget/StagePanel.js.map +0 -1
- package/lib/esm/appui-abstract/widget/WidgetState.d.ts +0 -20
- package/lib/esm/appui-abstract/widget/WidgetState.d.ts.map +0 -1
- package/lib/esm/appui-abstract/widget/WidgetState.js +0 -25
- package/lib/esm/appui-abstract/widget/WidgetState.js.map +0 -1
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"UiItemsManager.js","sourceRoot":"","sources":["../../../src/appui-abstract/UiItemsManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,qDAAqD;AACrD;;GAEG;;;AAEH,sDAAoE;AAQpE,MAAM,cAAc,GAAG,+BAA+B,CAA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C,MAAM,CAAC,EAAE,KAAK,YAAY,CAAC,EAAE,CAAC;wBAC3E,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;gBAC5C,CAAC,CAAC,CAAC;YACP,CAAC;QACH,CAAC,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACjB,CAAC;;AA/LH,wCAiMC;AAhMgB,0CAA2B,GAAqC,IAAI,GAAG,EAA+B,CAAC;AAQtH,wEAAwE;AACjD,0CAA2B,GAAG,IAAI,sBAAO,EAAmD,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/* eslint-disable @typescript-eslint/no-deprecated */\r\n/** @packageDocumentation\r\n * @module UiItemsProvider\r\n */\r\n\r\nimport { BeEvent, Logger, MarkRequired } from \"@itwin/core-bentley\";\r\nimport { BackstageItem } from \"./backstage/BackstageItem\";\r\nimport { CommonStatusBarItem } from \"./statusbar/StatusBarItem\";\r\nimport { CommonToolbarItem, ToolbarOrientation, ToolbarUsage } from \"./toolbars/ToolbarItem\";\r\nimport { AbstractWidgetProps } from \"./widget/AbstractWidgetProps\";\r\nimport { AbstractZoneLocation, StagePanelLocation, StagePanelSection } from \"./widget/StagePanel\";\r\nimport { UiItemsProvider } from \"./UiItemsProvider\";\r\n\r\nconst loggerCategory = \"appui-abstract.UiItemsManager\";\r\n/** Action taken by the application on item provided by a UiItemsProvider\r\n * @public @deprecated in 3.2. This was only used by the previously removed UiItemsArbiter.\r\n */\r\nexport enum UiItemsApplicationAction {\r\n /** Allow the change to the item */\r\n Allow,\r\n /** Disallow the change to the item */\r\n Disallow,\r\n /** Update the item during the change */\r\n Update,\r\n}\r\n\r\n/** UIProvider Registered Event Args interface.\r\n * @deprecated in 3.6. Use [UiItemsProviderRegisteredEventArgs]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface UiItemProviderRegisteredEventArgs {\r\n providerId: string;\r\n}\r\n\r\n/** UiItemProviderOverrides allows the application that registers a provider to limit when it is allowed to provide items\r\n * @deprecated in 3.6. Use [AllowedUiItemsProviderOverrides]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface AllowedUiItemProviderOverrides {\r\n /** allows providerId to be overridden in the items manager for cases where the same provider needs to provide different content to different stages\r\n * @beta\r\n */\r\n providerId?: string;\r\n /** if specified then the current stage's Usage will be compared before allowing any items to be provided\r\n * @beta\r\n */\r\n stageUsages?: string[];\r\n /** if specified then the current stage's Id will be compared before allowing any items to be provided\r\n * @beta\r\n */\r\n stageIds?: string[];\r\n}\r\n\r\n/** Allowed overrides applied to a UiItemsProvider the application that registers a provider to limit when it is allowed to provide items.\r\n * Note that if an override `providerId` is specified then either `stageIds` or `stageUsages` must be defined to limit when the provider's\r\n * items are allowed.\r\n * @deprecated in 3.6. Use [UiItemsProviderOverrides]($appui-react) instead.\r\n * @public\r\n */\r\nexport type UiItemProviderOverrides = MarkRequired<AllowedUiItemProviderOverrides, \"providerId\" | \"stageUsages\"> |\r\n MarkRequired<AllowedUiItemProviderOverrides, \"providerId\" | \"stageIds\"> |\r\n MarkRequired<AllowedUiItemProviderOverrides, \"stageIds\"> |\r\n MarkRequired<AllowedUiItemProviderOverrides, \"stageUsages\"> |\r\n MarkRequired<AllowedUiItemProviderOverrides, \"providerId\" | \"stageUsages\" | \"stageIds\">;\r\n\r\n/** Interface that defines an instance of a UiItemsProvider and its application specified overrides. */\r\ninterface UiItemProviderEntry {\r\n provider: UiItemsProvider;\r\n overrides?: UiItemProviderOverrides;\r\n}\r\n\r\n/** Controls registering of UiItemsProviders and calls the provider's methods when populating different parts of the User Interface.\r\n * @deprecated in 3.6. Use [UiItemsManager]($appui-react) instead.\r\n * @public\r\n */\r\nexport class UiItemsManager {\r\n private static _registeredUiItemsProviders: Map<string, UiItemProviderEntry> = new Map<string, UiItemProviderEntry>();\r\n\r\n /** For use in unit testing\r\n * @internal */\r\n public static clearAllProviders() {\r\n UiItemsManager._registeredUiItemsProviders.clear();\r\n }\r\n\r\n /** Event raised any time a UiProvider is registered or unregistered. */\r\n public static readonly onUiProviderRegisteredEvent = new BeEvent<(ev: UiItemProviderRegisteredEventArgs) => void>();\r\n\r\n /** Return number of registered UiProvider. */\r\n public static get registeredProviderIds() {\r\n const ids = [...UiItemsManager._registeredUiItemsProviders.keys()];\r\n return ids;\r\n }\r\n\r\n /** Return true if there is any registered UiProvider. */\r\n public static get hasRegisteredProviders(): boolean {\r\n return this._registeredUiItemsProviders.size > 0;\r\n }\r\n\r\n /**\r\n * Retrieves a previously loaded UiItemsProvider.\r\n * @param providerId id of the UiItemsProvider to get\r\n */\r\n public static getUiItemsProvider(providerId: string): UiItemsProvider | undefined {\r\n return UiItemsManager._registeredUiItemsProviders.get(providerId)?.provider;\r\n }\r\n\r\n private static sendRegisteredEvent(ev: UiItemProviderRegisteredEventArgs) {\r\n UiItemsManager.onUiProviderRegisteredEvent.raiseEvent(ev);\r\n }\r\n\r\n /**\r\n * Registers a UiItemsProvider with the UiItemsManager.\r\n * @param uiProvider the UI items provider to register.\r\n */\r\n public static register(uiProvider: UiItemsProvider, overrides?: UiItemProviderOverrides): void {\r\n const providerId = overrides?.providerId ?? uiProvider.id;\r\n\r\n if (UiItemsManager.getUiItemsProvider(providerId)) {\r\n Logger.logInfo(loggerCategory, `UiItemsProvider (${providerId}) is already loaded`);\r\n } else {\r\n UiItemsManager._registeredUiItemsProviders.set(providerId, { provider: uiProvider, overrides });\r\n Logger.logInfo(loggerCategory, `UiItemsProvider ${uiProvider.id} registered as ${providerId} `);\r\n\r\n UiItemsManager.sendRegisteredEvent({ providerId } as UiItemProviderRegisteredEventArgs);\r\n }\r\n }\r\n\r\n /** Remove a specific UiItemsProvider from the list of available providers. */\r\n public static unregister(uiProviderId: string): void {\r\n const provider = UiItemsManager.getUiItemsProvider(uiProviderId);\r\n if (!provider)\r\n return;\r\n\r\n provider.onUnregister && provider.onUnregister();\r\n\r\n UiItemsManager._registeredUiItemsProviders.delete(uiProviderId);\r\n Logger.logInfo(loggerCategory, `UiItemsProvider (${uiProviderId}) unloaded`);\r\n\r\n // trigger a refresh of the ui\r\n UiItemsManager.sendRegisteredEvent({ providerId: uiProviderId } as UiItemProviderRegisteredEventArgs);\r\n }\r\n\r\n private static allowItemsFromProvider(entry: UiItemProviderEntry, stageId?: string, stageUsage?: string) {\r\n // istanbul ignore else\r\n const overrides = entry.overrides;\r\n if (undefined !== stageId && overrides?.stageIds && !(overrides.stageIds.some((value: string) => value === stageId)))\r\n return false;\r\n if (undefined !== stageUsage && overrides?.stageUsages && !(overrides.stageUsages.some((value: string) => value === stageUsage)))\r\n return false;\r\n return true;\r\n }\r\n\r\n /** Called when the application is populating a toolbar so that any registered UiItemsProvider can add tool buttons that either either execute\r\n * an action or specify a registered ToolId into toolbar.\r\n * @param stageId a string identifier the active stage.\r\n * @param stageUsage the StageUsage of the active stage.\r\n * @param toolbarUsage usage of the toolbar\r\n * @param toolbarOrientation orientation of the toolbar\r\n * @returns an array of error messages. The array will be empty if the load is successful, otherwise it is a list of one or more problems.\r\n */\r\n public static getToolbarButtonItems(stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage,\r\n toolbarOrientation: ToolbarOrientation, stageAppData?: any): CommonToolbarItem[] {\r\n const buttonItems: CommonToolbarItem[] = [];\r\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\r\n return buttonItems;\r\n\r\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\r\n const uiProvider = entry.provider;\r\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\r\n // istanbul ignore else\r\n if (uiProvider.provideToolbarButtonItems && this.allowItemsFromProvider(entry, stageId, stageUsage)) {\r\n uiProvider.provideToolbarButtonItems(stageId, stageUsage, toolbarUsage, toolbarOrientation, stageAppData)\r\n .forEach((spec: CommonToolbarItem) => {\r\n // ignore duplicate ids\r\n if (-1 === buttonItems.findIndex((existingItem) => spec.id === existingItem.id))\r\n buttonItems.push({ ...spec, providerId });\r\n });\r\n }\r\n });\r\n\r\n return buttonItems;\r\n }\r\n\r\n /** Called when the application is populating the statusbar so that any registered UiItemsProvider can add status fields\r\n * @param stageId a string identifier the active stage.\r\n * @param stageUsage the StageUsage of the active stage.\r\n * @returns An array of CommonStatusBarItem that will be used to create controls for the status bar.\r\n */\r\n public static getStatusBarItems(stageId: string, stageUsage: string, stageAppData?: any): CommonStatusBarItem[] {\r\n const statusBarItems: CommonStatusBarItem[] = [];\r\n\r\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\r\n return statusBarItems;\r\n\r\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\r\n const uiProvider = entry.provider;\r\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\r\n\r\n // istanbul ignore else\r\n if (uiProvider.provideStatusBarItems && this.allowItemsFromProvider(entry, stageId, stageUsage)) {\r\n uiProvider.provideStatusBarItems(stageId, stageUsage, stageAppData)\r\n .forEach((item: CommonStatusBarItem) => {\r\n // ignore duplicate ids\r\n if (-1 === statusBarItems.findIndex((existingItem) => item.id === existingItem.id))\r\n statusBarItems.push({ ...item, providerId });\r\n });\r\n }\r\n });\r\n\r\n return statusBarItems;\r\n }\r\n\r\n /** Called when the application is populating the statusbar so that any registered UiItemsProvider can add status fields\r\n * @returns An array of BackstageItem that will be used to create controls for the backstage menu.\r\n */\r\n public static getBackstageItems(): BackstageItem[] {\r\n const backstageItems: BackstageItem[] = [];\r\n\r\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\r\n return backstageItems;\r\n\r\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\r\n const uiProvider = entry.provider;\r\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\r\n\r\n // istanbul ignore else\r\n if (uiProvider.provideBackstageItems) { // Note: We do not call this.allowItemsFromProvider here as backstage items\r\n uiProvider.provideBackstageItems() // should not be considered stage specific. If they need to be hidden\r\n .forEach((item: BackstageItem) => { // the isHidden property should be set to a ConditionalBooleanValue\r\n // ignore duplicate ids\r\n if (-1 === backstageItems.findIndex((existingItem) => item.id === existingItem.id))\r\n backstageItems.push({ ...item, providerId });\r\n });\r\n }\r\n });\r\n return backstageItems;\r\n }\r\n\r\n /** Called when the application is populating the Stage Panels so that any registered UiItemsProvider can add widgets\r\n * @param stageId a string identifier the active stage.\r\n * @param stageUsage the StageUsage of the active stage.\r\n * @param location the location within the stage.\r\n * @param section the section within location.\r\n * @returns An array of AbstractWidgetProps that will be used to create widgets.\r\n */\r\n public static getWidgets(stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection, zoneLocation?: AbstractZoneLocation, stageAppData?: any): ReadonlyArray<AbstractWidgetProps> {\r\n const widgets: AbstractWidgetProps[] = [];\r\n\r\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\r\n return widgets;\r\n\r\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\r\n const uiProvider = entry.provider;\r\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\r\n\r\n // istanbul ignore else\r\n if (uiProvider.provideWidgets && this.allowItemsFromProvider(entry, stageId, stageUsage)) {\r\n uiProvider.provideWidgets(stageId, stageUsage, location, section, zoneLocation, stageAppData)\r\n .forEach((widget: AbstractWidgetProps) => {\r\n // ignore duplicate ids\r\n if (-1 === widgets.findIndex((existingItem) => widget.id === existingItem.id))\r\n widgets.push({ ...widget, providerId });\r\n });\r\n }\r\n });\r\n return widgets;\r\n }\r\n\r\n}\r\n"]}
|
@@ -1,30 +0,0 @@
|
|
1
|
-
/** @packageDocumentation
|
2
|
-
* @module UiItemsProvider
|
3
|
-
*/
|
4
|
-
import { BackstageItem } from "./backstage/BackstageItem";
|
5
|
-
import { CommonStatusBarItem } from "./statusbar/StatusBarItem";
|
6
|
-
import { CommonToolbarItem, ToolbarOrientation, ToolbarUsage } from "./toolbars/ToolbarItem";
|
7
|
-
import { AbstractWidgetProps } from "./widget/AbstractWidgetProps";
|
8
|
-
import { AbstractZoneLocation, StagePanelLocation, StagePanelSection } from "./widget/StagePanel";
|
9
|
-
/** Describes interface of objects that want to provide UI component to the running IModelApp.
|
10
|
-
* @deprecated in 3.6. Use [UiItemsProvider]($appui-react) instead.
|
11
|
-
* @public
|
12
|
-
*/
|
13
|
-
export interface UiItemsProvider {
|
14
|
-
/** id of provider */
|
15
|
-
readonly id: string;
|
16
|
-
/** UiItemsManager calls following method to get items to populate specific toolbars */
|
17
|
-
provideToolbarButtonItems?: (stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage, toolbarOrientation: ToolbarOrientation, stageAppData?: any) => CommonToolbarItem[];
|
18
|
-
/** UiItemsManager calls following method to augment base statusbar for stages that allow it. */
|
19
|
-
provideStatusBarItems?: (stageId: string, stageUsage: string, stageAppData?: any) => CommonStatusBarItem[];
|
20
|
-
/** UiItemsManager calls following method to augment backstage items. */
|
21
|
-
provideBackstageItems?: () => BackstageItem[];
|
22
|
-
/** UiItemsManager calls following method to augment Widget lists.
|
23
|
-
* @note Returned widgets must provide unique `AbstractWidgetProps["id"]` to correctly save/restore App layout.
|
24
|
-
*/
|
25
|
-
provideWidgets?: (stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection, // eslint-disable-line @typescript-eslint/no-deprecated
|
26
|
-
zoneLocation?: AbstractZoneLocation, stageAppData?: any) => ReadonlyArray<AbstractWidgetProps>;
|
27
|
-
/** Function called when the provider is unregistered via `ItemsManager.unregister` to allow provider to do cleanup. */
|
28
|
-
onUnregister?: () => void;
|
29
|
-
}
|
30
|
-
//# sourceMappingURL=UiItemsProvider.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"UiItemsProvider.d.ts","sourceRoot":"","sources":["../../../src/appui-abstract/UiItemsProvider.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,aAAa,EAAE,MAAM,2BAA2B,CAAC;AAC1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC7F,OAAO,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AACnE,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAElG;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,qBAAqB;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IAEpB,uFAAuF;IACvF,yBAAyB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,YAAY,CAAC,EAAE,GAAG,KAAK,iBAAiB,EAAE,CAAC;IACjL,gGAAgG;IAChG,qBAAqB,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,YAAY,CAAC,EAAE,GAAG,KAAK,mBAAmB,EAAE,CAAC;IAC3G,wEAAwE;IACxE,qBAAqB,CAAC,EAAE,MAAM,aAAa,EAAE,CAAC;IAC9C;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,EAAE,OAAO,CAAC,EAAE,iBAAiB,EAAE,uDAAuD;IACvK,YAAY,CAAC,EAAE,oBAAoB,EAAE,YAAY,CAAC,EAAE,GAAG,KAAK,aAAa,CAAC,mBAAmB,CAAC,CAAC;IACjG,uHAAuH;IACvH,YAAY,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3B"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
6
|
-
/** @packageDocumentation
|
7
|
-
* @module UiItemsProvider
|
8
|
-
*/
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
//# sourceMappingURL=UiItemsProvider.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"UiItemsProvider.js","sourceRoot":"","sources":["../../../src/appui-abstract/UiItemsProvider.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 UiItemsProvider\r\n */\r\n\r\nimport { BackstageItem } from \"./backstage/BackstageItem\";\r\nimport { CommonStatusBarItem } from \"./statusbar/StatusBarItem\";\r\nimport { CommonToolbarItem, ToolbarOrientation, ToolbarUsage } from \"./toolbars/ToolbarItem\";\r\nimport { AbstractWidgetProps } from \"./widget/AbstractWidgetProps\";\r\nimport { AbstractZoneLocation, StagePanelLocation, StagePanelSection } from \"./widget/StagePanel\";\r\n\r\n/** Describes interface of objects that want to provide UI component to the running IModelApp.\r\n * @deprecated in 3.6. Use [UiItemsProvider]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface UiItemsProvider {\r\n /** id of provider */\r\n readonly id: string;\r\n\r\n /** UiItemsManager calls following method to get items to populate specific toolbars */\r\n provideToolbarButtonItems?: (stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage, toolbarOrientation: ToolbarOrientation, stageAppData?: any) => CommonToolbarItem[]; // eslint-disable-line @typescript-eslint/no-deprecated\r\n /** UiItemsManager calls following method to augment base statusbar for stages that allow it. */\r\n provideStatusBarItems?: (stageId: string, stageUsage: string, stageAppData?: any) => CommonStatusBarItem[]; // eslint-disable-line @typescript-eslint/no-deprecated\r\n /** UiItemsManager calls following method to augment backstage items. */\r\n provideBackstageItems?: () => BackstageItem[]; // eslint-disable-line @typescript-eslint/no-deprecated\r\n /** UiItemsManager calls following method to augment Widget lists.\r\n * @note Returned widgets must provide unique `AbstractWidgetProps[\"id\"]` to correctly save/restore App layout.\r\n */\r\n provideWidgets?: (stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection, // eslint-disable-line @typescript-eslint/no-deprecated\r\n zoneLocation?: AbstractZoneLocation, stageAppData?: any) => ReadonlyArray<AbstractWidgetProps>; // eslint-disable-line @typescript-eslint/no-deprecated\r\n /** Function called when the provider is unregistered via `ItemsManager.unregister` to allow provider to do cleanup. */\r\n onUnregister?: () => void;\r\n}\r\n"]}
|
@@ -1,92 +0,0 @@
|
|
1
|
-
/** @packageDocumentation
|
2
|
-
* @module Backstage
|
3
|
-
*/
|
4
|
-
import { BadgeType } from "../items/BadgeType";
|
5
|
-
import { ConditionalBooleanValue } from "../items/ConditionalBooleanValue";
|
6
|
-
import { ConditionalStringValue } from "../items/ConditionalStringValue";
|
7
|
-
import { ProvidedItem } from "../items/ProvidedItem";
|
8
|
-
/** Used to specify the item type added to the backstage menu.
|
9
|
-
* @deprecated in 3.6. Use type guards instead.
|
10
|
-
* @public
|
11
|
-
*/
|
12
|
-
export declare enum BackstageItemType {
|
13
|
-
/** Item that executes an action function */
|
14
|
-
ActionItem = 1,
|
15
|
-
/** Item that activate a stage. */
|
16
|
-
StageLauncher = 2
|
17
|
-
}
|
18
|
-
/** Describes the data needed to insert a button into the backstage menu.
|
19
|
-
* @deprecated in 3.6. Use [CommonBackstageItem]($appui-react) instead.
|
20
|
-
* @public
|
21
|
-
*/
|
22
|
-
export interface CommonBackstageItem extends ProvidedItem {
|
23
|
-
/** can be used by application to store miscellaneous data. */
|
24
|
-
applicationData?: any;
|
25
|
-
/** Describes badge. Renders no badge if not specified. */
|
26
|
-
readonly badgeType?: BadgeType;
|
27
|
-
/** Specifies the item's grouping value. Items are sorted by group and then item priority. When
|
28
|
-
* group priority changes a separator is inserted. It is recommended using values 10 through 100, incrementing by 10. This
|
29
|
-
* allows extensions enough gaps to insert their own groups.
|
30
|
-
*/
|
31
|
-
readonly groupPriority: number;
|
32
|
-
/** Name of icon WebFont entry or if specifying an imported SVG symbol use "webSvg:" prefix to imported symbol Id. */
|
33
|
-
readonly icon?: string | ConditionalStringValue;
|
34
|
-
/** Required unique id of the item. To ensure uniqueness it is suggested that a namespace prefix of the extension name be used. */
|
35
|
-
readonly id: string;
|
36
|
-
/** optional data to be used by item implementor. */
|
37
|
-
readonly internalData?: Map<string, any>;
|
38
|
-
/** Describes if the item is visible or hidden. The default is for the item to be visible. */
|
39
|
-
readonly isHidden?: boolean | ConditionalBooleanValue;
|
40
|
-
/** Describes if the item is enabled or disabled. The default is for the item to be enabled. */
|
41
|
-
readonly isDisabled?: boolean | ConditionalBooleanValue;
|
42
|
-
/** Priority within a group (recommend using values 1 through 100). */
|
43
|
-
readonly itemPriority: number;
|
44
|
-
/** Label. */
|
45
|
-
readonly label: string | ConditionalStringValue;
|
46
|
-
/** Subtitle. */
|
47
|
-
readonly subtitle?: string | ConditionalStringValue;
|
48
|
-
/** Tooltip. */
|
49
|
-
readonly tooltip?: string | ConditionalStringValue;
|
50
|
-
/** Describes if the item is active. The default is for the item to be active if stageId matches activeFrontstageId */
|
51
|
-
readonly isActive?: boolean | ConditionalBooleanValue;
|
52
|
-
}
|
53
|
-
/** Describes the data needed to insert an action button into the backstage menu.
|
54
|
-
* @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.
|
55
|
-
* @public
|
56
|
-
*/
|
57
|
-
export interface BackstageActionItem extends CommonBackstageItem {
|
58
|
-
readonly execute: () => void;
|
59
|
-
}
|
60
|
-
/** Describes the data needed to insert an action button into the backstage menu.
|
61
|
-
* @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.
|
62
|
-
* @public
|
63
|
-
*/
|
64
|
-
export interface BackstageStageLauncher extends CommonBackstageItem {
|
65
|
-
readonly stageId: string;
|
66
|
-
}
|
67
|
-
/** Describes the data needed to insert a button into the backstage menu.
|
68
|
-
* @deprecated in 3.6. Use [BackstageItem]($appui-react) instead.
|
69
|
-
* @public
|
70
|
-
*/
|
71
|
-
export type BackstageItem = BackstageActionItem | BackstageStageLauncher;
|
72
|
-
/** BackstageActionItem type guard.
|
73
|
-
* @deprecated in 3.6. Use [isBackstageActionItem]($appui-react) instead.
|
74
|
-
* @public
|
75
|
-
*/
|
76
|
-
export declare const isActionItem: (item: BackstageItem) => item is BackstageActionItem;
|
77
|
-
/** BackstageStageLauncher type guard.
|
78
|
-
* @deprecated in 3.6. Use [isBackstageStageLauncher]($appui-react) instead.
|
79
|
-
* @public
|
80
|
-
*/
|
81
|
-
export declare const isStageLauncher: (item: BackstageItem) => item is BackstageStageLauncher;
|
82
|
-
/** Utilities for creating and maintaining backstage items
|
83
|
-
* @deprecated in 3.6. Use [BackstageItemUtilities]($appui-react) instead.
|
84
|
-
* @public
|
85
|
-
*/
|
86
|
-
export declare class BackstageItemUtilities {
|
87
|
-
/** Creates a stage launcher backstage item */
|
88
|
-
static createStageLauncher: (frontstageId: string, groupPriority: number, itemPriority: number, label: string | ConditionalStringValue, subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageStageLauncher>) => BackstageStageLauncher;
|
89
|
-
/** Creates an action backstage item */
|
90
|
-
static createActionItem: (itemId: string, groupPriority: number, itemPriority: number, execute: () => void, label: string | ConditionalStringValue, subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageActionItem>) => BackstageActionItem;
|
91
|
-
}
|
92
|
-
//# sourceMappingURL=BackstageItem.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"BackstageItem.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/backstage/BackstageItem.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MA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AE,OAAO,GAAG,uBAAuB,CAAC;CACvD;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,sBAAsB,CAAC;AAEzE;;;GAGG;AACH,eAAO,MAAM,YAAY,SAAU,aAAa,KAAG,IAAI,IAAI,mBAE1D,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,SAAU,aAAa,KAAG,IAAI,IAAI,sBAE7D,CAAC;AAEF;;;GAGG;AACH,qBAAa,sBAAsB;IACjC,8CAA8C;IAC9C,OAAc,mBAAmB,iBACjB,MAAM,iBAAiB,MAAM,gBAAgB,MAAM,SAAS,MAAM,GAAG,sBAAsB,aAC9F,MAAM,GAAG,sBAAsB,SAAS,MAAM,GAAG,sBAAsB,cAAc,OAAO,CAAC,sBAAsB,CAAC,KAC9H,sBAAsB,CAUtB;IAEH,uCAAuC;IACvC,OAAc,gBAAgB,WACpB,MAAM,iBAAiB,MAAM,gBAAgB,MAAM,WAAW,MAAM,IAAI,SAAS,MAAM,GAAG,sBAAsB,aAC7G,MAAM,GAAG,sBAAsB,SAAS,MAAM,GAAG,sBAAsB,cAAc,OAAO,CAAC,mBAAmB,CAAC,KAC3H,mBAAmB,CAUnB;CACJ"}
|
@@ -1,69 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
6
|
-
/** @packageDocumentation
|
7
|
-
* @module Backstage
|
8
|
-
*/
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.BackstageItemUtilities = exports.isStageLauncher = exports.isActionItem = exports.BackstageItemType = void 0;
|
11
|
-
/** Used to specify the item type added to the backstage menu.
|
12
|
-
* @deprecated in 3.6. Use type guards instead.
|
13
|
-
* @public
|
14
|
-
*/
|
15
|
-
var BackstageItemType;
|
16
|
-
(function (BackstageItemType) {
|
17
|
-
/** Item that executes an action function */
|
18
|
-
BackstageItemType[BackstageItemType["ActionItem"] = 1] = "ActionItem";
|
19
|
-
/** Item that activate a stage. */
|
20
|
-
BackstageItemType[BackstageItemType["StageLauncher"] = 2] = "StageLauncher";
|
21
|
-
})(BackstageItemType || (exports.BackstageItemType = BackstageItemType = {}));
|
22
|
-
/** BackstageActionItem type guard.
|
23
|
-
* @deprecated in 3.6. Use [isBackstageActionItem]($appui-react) instead.
|
24
|
-
* @public
|
25
|
-
*/
|
26
|
-
const isActionItem = (item) => {
|
27
|
-
return item.execute !== undefined; // eslint-disable-line @typescript-eslint/no-deprecated
|
28
|
-
};
|
29
|
-
exports.isActionItem = isActionItem;
|
30
|
-
/** BackstageStageLauncher type guard.
|
31
|
-
* @deprecated in 3.6. Use [isBackstageStageLauncher]($appui-react) instead.
|
32
|
-
* @public
|
33
|
-
*/
|
34
|
-
const isStageLauncher = (item) => {
|
35
|
-
return item.stageId !== undefined; // eslint-disable-line @typescript-eslint/no-deprecated
|
36
|
-
};
|
37
|
-
exports.isStageLauncher = isStageLauncher;
|
38
|
-
/** Utilities for creating and maintaining backstage items
|
39
|
-
* @deprecated in 3.6. Use [BackstageItemUtilities]($appui-react) instead.
|
40
|
-
* @public
|
41
|
-
*/
|
42
|
-
class BackstageItemUtilities {
|
43
|
-
}
|
44
|
-
exports.BackstageItemUtilities = BackstageItemUtilities;
|
45
|
-
/** Creates a stage launcher backstage item */
|
46
|
-
BackstageItemUtilities.createStageLauncher = (frontstageId, groupPriority, itemPriority, label, subtitle, icon, overrides) => ({
|
47
|
-
groupPriority,
|
48
|
-
icon,
|
49
|
-
internalData: overrides?.internalData,
|
50
|
-
id: frontstageId,
|
51
|
-
itemPriority,
|
52
|
-
label,
|
53
|
-
stageId: frontstageId,
|
54
|
-
subtitle,
|
55
|
-
...overrides,
|
56
|
-
});
|
57
|
-
/** Creates an action backstage item */
|
58
|
-
BackstageItemUtilities.createActionItem = (itemId, groupPriority, itemPriority, execute, label, subtitle, icon, overrides) => ({
|
59
|
-
execute,
|
60
|
-
groupPriority,
|
61
|
-
icon,
|
62
|
-
internalData: overrides?.internalData,
|
63
|
-
id: itemId,
|
64
|
-
itemPriority,
|
65
|
-
label,
|
66
|
-
subtitle,
|
67
|
-
...overrides,
|
68
|
-
});
|
69
|
-
//# sourceMappingURL=BackstageItem.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"BackstageItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/backstage/BackstageItem.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAOH;;;GAGG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,4CAA4C;IAC5C,qEAAc,CAAA;IACd,kCAAkC;IAClC,2EAAiB,CAAA;AACnB,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B;AA4DD;;;GAGG;AACI,MAAM,YAAY,GAAG,CAAC,IAAmB,EAA+B,EAAE;IAC/E,OAAQ,IAA4B,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,uDAAuD;AACrH,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB;AAEF;;;GAGG;AACI,MAAM,eAAe,GAAG,CAAC,IAAmB,EAAkC,EAAE;IACrF,OAAQ,IAA+B,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,uDAAuD;AACxH,CAAC,CAAC;AAFW,QAAA,eAAe,mBAE1B;AAEF;;;GAGG;AACH,MAAa,sBAAsB;;AAAnC,wDAgCC;AA/BC,8CAA8C;AAChC,0CAAmB,GAAG,CAClC,YAAoB,EAAE,aAAqB,EAAE,YAAoB,EAAE,KAAsC,EACzG,QAA0C,EAAE,IAAsC,EAAE,SAA2C,EACvG,EAAE,CAAC,CAAC;IAC5B,aAAa;IACb,IAAI;IACJ,YAAY,EAAE,SAAS,EAAE,YAAY;IACrC,EAAE,EAAE,YAAY;IAChB,YAAY;IACZ,KAAK;IACL,OAAO,EAAE,YAAY;IACrB,QAAQ;IACR,GAAG,SAAS;CACb,CAAC,CAAC;AAEH,uCAAuC;AACzB,uCAAgB,GAAG,CAC/B,MAAc,EAAE,aAAqB,EAAE,YAAoB,EAAE,OAAmB,EAAE,KAAsC,EACxH,QAA0C,EAAE,IAAsC,EAAE,SAAwC,EACvG,EAAE,CAAC,CAAC;IACzB,OAAO;IACP,aAAa;IACb,IAAI;IACJ,YAAY,EAAE,SAAS,EAAE,YAAY;IACrC,EAAE,EAAE,MAAM;IACV,YAAY;IACZ,KAAK;IACL,QAAQ;IACR,GAAG,SAAS;CACb,CAAC,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 Backstage\r\n */\r\n\r\nimport { BadgeType } from \"../items/BadgeType\";\r\nimport { ConditionalBooleanValue } from \"../items/ConditionalBooleanValue\";\r\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\r\nimport { ProvidedItem } from \"../items/ProvidedItem\";\r\n\r\n/** Used to specify the item type added to the backstage menu.\r\n * @deprecated in 3.6. Use type guards instead.\r\n * @public\r\n */\r\nexport enum BackstageItemType {\r\n /** Item that executes an action function */\r\n ActionItem = 1,\r\n /** Item that activate a stage. */\r\n StageLauncher = 2,\r\n}\r\n\r\n/** Describes the data needed to insert a button into the backstage menu.\r\n * @deprecated in 3.6. Use [CommonBackstageItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface CommonBackstageItem extends ProvidedItem { // eslint-disable-line @typescript-eslint/no-deprecated\r\n /** can be used by application to store miscellaneous data. */\r\n applicationData?: any;\r\n /** Describes badge. Renders no badge if not specified. */\r\n readonly badgeType?: BadgeType;\r\n /** Specifies the item's grouping value. Items are sorted by group and then item priority. When\r\n * group priority changes a separator is inserted. It is recommended using values 10 through 100, incrementing by 10. This\r\n * allows extensions enough gaps to insert their own groups.\r\n */\r\n readonly groupPriority: number;\r\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\r\n readonly icon?: string | ConditionalStringValue;\r\n /** Required unique id of the item. To ensure uniqueness it is suggested that a namespace prefix of the extension name be used. */\r\n readonly id: string;\r\n /** optional data to be used by item implementor. */\r\n readonly internalData?: Map<string, any>;\r\n /** Describes if the item is visible or hidden. The default is for the item to be visible. */\r\n readonly isHidden?: boolean | ConditionalBooleanValue;\r\n /** Describes if the item is enabled or disabled. The default is for the item to be enabled. */\r\n readonly isDisabled?: boolean | ConditionalBooleanValue;\r\n /** Priority within a group (recommend using values 1 through 100). */\r\n readonly itemPriority: number;\r\n /** Label. */\r\n readonly label: string | ConditionalStringValue;\r\n /** Subtitle. */\r\n readonly subtitle?: string | ConditionalStringValue;\r\n /** Tooltip. */\r\n readonly tooltip?: string | ConditionalStringValue;\r\n /** Describes if the item is active. The default is for the item to be active if stageId matches activeFrontstageId */\r\n readonly isActive?: boolean | ConditionalBooleanValue;\r\n}\r\n\r\n/** Describes the data needed to insert an action button into the backstage menu.\r\n * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface BackstageActionItem extends CommonBackstageItem { // eslint-disable-line @typescript-eslint/no-deprecated\r\n readonly execute: () => void;\r\n}\r\n\r\n/** Describes the data needed to insert an action button into the backstage menu.\r\n * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface BackstageStageLauncher extends CommonBackstageItem { // eslint-disable-line @typescript-eslint/no-deprecated\r\n readonly stageId: string;\r\n}\r\n\r\n/** Describes the data needed to insert a button into the backstage menu.\r\n * @deprecated in 3.6. Use [BackstageItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport type BackstageItem = BackstageActionItem | BackstageStageLauncher; // eslint-disable-line @typescript-eslint/no-deprecated\r\n\r\n/** BackstageActionItem type guard.\r\n * @deprecated in 3.6. Use [isBackstageActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport const isActionItem = (item: BackstageItem): item is BackstageActionItem => { // eslint-disable-line @typescript-eslint/no-deprecated\r\n return (item as BackstageActionItem).execute !== undefined; // eslint-disable-line @typescript-eslint/no-deprecated\r\n};\r\n\r\n/** BackstageStageLauncher type guard.\r\n * @deprecated in 3.6. Use [isBackstageStageLauncher]($appui-react) instead.\r\n * @public\r\n */\r\nexport const isStageLauncher = (item: BackstageItem): item is BackstageStageLauncher => { // eslint-disable-line @typescript-eslint/no-deprecated\r\n return (item as BackstageStageLauncher).stageId !== undefined; // eslint-disable-line @typescript-eslint/no-deprecated\r\n};\r\n\r\n/** Utilities for creating and maintaining backstage items\r\n * @deprecated in 3.6. Use [BackstageItemUtilities]($appui-react) instead.\r\n * @public\r\n */\r\nexport class BackstageItemUtilities {\r\n /** Creates a stage launcher backstage item */\r\n public static createStageLauncher = (\r\n frontstageId: string, groupPriority: number, itemPriority: number, label: string | ConditionalStringValue,\r\n subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageStageLauncher>, // eslint-disable-line @typescript-eslint/no-deprecated\r\n ): BackstageStageLauncher => ({ // eslint-disable-line @typescript-eslint/no-deprecated\r\n groupPriority,\r\n icon,\r\n internalData: overrides?.internalData,\r\n id: frontstageId,\r\n itemPriority,\r\n label,\r\n stageId: frontstageId,\r\n subtitle,\r\n ...overrides,\r\n });\r\n\r\n /** Creates an action backstage item */\r\n public static createActionItem = (\r\n itemId: string, groupPriority: number, itemPriority: number, execute: () => void, label: string | ConditionalStringValue,\r\n subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageActionItem>, // eslint-disable-line @typescript-eslint/no-deprecated\r\n ): BackstageActionItem => ({ // eslint-disable-line @typescript-eslint/no-deprecated\r\n execute,\r\n groupPriority,\r\n icon,\r\n internalData: overrides?.internalData,\r\n id: itemId,\r\n itemPriority,\r\n label,\r\n subtitle,\r\n ...overrides,\r\n });\r\n}\r\n"]}
|
@@ -1,43 +0,0 @@
|
|
1
|
-
/** @packageDocumentation
|
2
|
-
* @module Backstage
|
3
|
-
*/
|
4
|
-
import { BeEvent } from "@itwin/core-bentley";
|
5
|
-
import { BackstageItem } from "./BackstageItem";
|
6
|
-
/** Arguments of [[BackstageItemsManager.onChanged]] event.
|
7
|
-
* @internal
|
8
|
-
* @deprecated in 4.10.x. Used internally by `@itwin/appui-react`.
|
9
|
-
* Please note: this internal API will be removed in 5.0.0.
|
10
|
-
*/
|
11
|
-
export interface BackstageItemsChangedArgs {
|
12
|
-
readonly items: ReadonlyArray<BackstageItem>;
|
13
|
-
}
|
14
|
-
/**
|
15
|
-
* Controls backstage items.
|
16
|
-
* @internal
|
17
|
-
* @deprecated in 4.10.x. Use `UiFramework.backstage` from `@itwin/appui-react`.
|
18
|
-
* Please note: this internal API will be removed in 5.0.0.
|
19
|
-
*/
|
20
|
-
export declare class BackstageItemsManager {
|
21
|
-
private _items;
|
22
|
-
constructor(items?: ReadonlyArray<BackstageItem>);
|
23
|
-
private loadItemsInternal;
|
24
|
-
/** load items but do not fire onItemsChanged
|
25
|
-
* @internal
|
26
|
-
*/
|
27
|
-
loadItems(items: ReadonlyArray<BackstageItem>): void;
|
28
|
-
/** Event raised when backstage items are changed.
|
29
|
-
* @internal
|
30
|
-
*/
|
31
|
-
readonly onItemsChanged: BeEvent<(args: BackstageItemsChangedArgs) => void>;
|
32
|
-
get items(): ReadonlyArray<BackstageItem>;
|
33
|
-
set items(items: ReadonlyArray<BackstageItem>);
|
34
|
-
/** @internal */
|
35
|
-
add(itemOrItems: BackstageItem | ReadonlyArray<BackstageItem>): void;
|
36
|
-
/** @internal */
|
37
|
-
remove(itemIdOrItemIds: BackstageItem["id"] | ReadonlyArray<BackstageItem["id"]>): void;
|
38
|
-
/** @internal */
|
39
|
-
static getSyncIdsOfInterest(items: readonly BackstageItem[]): string[];
|
40
|
-
private internalRefreshAffectedItems;
|
41
|
-
refreshAffectedItems(eventIds: Set<string>): void;
|
42
|
-
}
|
43
|
-
//# sourceMappingURL=BackstageItemsManager.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"BackstageItemsManager.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/backstage/BackstageItemsManager.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAG9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAIhD;;;;GAIG;AACH,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC,CAAC;CAC9C;AAQD;;;;;GAKG;AACH,qBAAa,qBAAqB;IAChC,OAAO,CAAC,MAAM,CAAoC;gBAEtC,KAAK,CAAC,EAAE,aAAa,CAAC,aAAa,CAAC;IAMhD,OAAO,CAAC,iBAAiB;IAiBzB;;OAEG;IACI,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC;IAIpD;;OAEG;IACH,SAAgB,cAAc,iBAAsB,yBAAyB,KAAK,IAAI,EAAI;IAE1F,IAAW,KAAK,IAAI,aAAa,CAAC,aAAa,CAAC,CAE/C;IAED,IAAW,KAAK,CAAC,KAAK,EAAE,aAAa,CAAC,aAAa,CAAC,EAInD;IAED,gBAAgB;IACT,GAAG,CAAC,WAAW,EAAE,aAAa,GAAG,aAAa,CAAC,aAAa,CAAC;IAiBpE,gBAAgB;IACT,MAAM,CAAC,eAAe,EAAE,aAAa,CAAC,IAAI,CAAC,GAAG,aAAa,CAAC,aAAa,CAAC,IAAI,CAAC,CAAC;IAOvF,gBAAgB;WACF,oBAAoB,CAAC,KAAK,EAAE,SAAS,aAAa,EAAE,GAAG,MAAM,EAAE;IAc7E,OAAO,CAAC,4BAA4B;IA6B7B,oBAAoB,CAAC,QAAQ,EAAE,GAAG,CAAC,MAAM,CAAC;CAYlD"}
|
@@ -1,136 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
6
|
-
/** @packageDocumentation
|
7
|
-
* @module Backstage
|
8
|
-
*/
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.BackstageItemsManager = void 0;
|
11
|
-
const core_bentley_1 = require("@itwin/core-bentley");
|
12
|
-
const ConditionalBooleanValue_1 = require("../items/ConditionalBooleanValue");
|
13
|
-
const ConditionalStringValue_1 = require("../items/ConditionalStringValue");
|
14
|
-
const isInstance = (args) => {
|
15
|
-
return !Array.isArray(args);
|
16
|
-
};
|
17
|
-
/**
|
18
|
-
* Controls backstage items.
|
19
|
-
* @internal
|
20
|
-
* @deprecated in 4.10.x. Use `UiFramework.backstage` from `@itwin/appui-react`.
|
21
|
-
* Please note: this internal API will be removed in 5.0.0.
|
22
|
-
*/
|
23
|
-
class BackstageItemsManager {
|
24
|
-
constructor(items) {
|
25
|
-
this._items = [];
|
26
|
-
/** Event raised when backstage items are changed.
|
27
|
-
* @internal
|
28
|
-
*/
|
29
|
-
this.onItemsChanged = new core_bentley_1.BeEvent();
|
30
|
-
// istanbul ignore else
|
31
|
-
if (items)
|
32
|
-
this.loadItemsInternal(items, true, false);
|
33
|
-
}
|
34
|
-
loadItemsInternal(items, processConditions, sendItemChanged) {
|
35
|
-
if (processConditions && items) {
|
36
|
-
const eventIds = BackstageItemsManager.getSyncIdsOfInterest(items);
|
37
|
-
if (0 !== eventIds.length) {
|
38
|
-
const { itemsUpdated, updatedItems } = this.internalRefreshAffectedItems(items, new Set(eventIds));
|
39
|
-
// istanbul ignore else
|
40
|
-
if (itemsUpdated)
|
41
|
-
items = updatedItems;
|
42
|
-
}
|
43
|
-
}
|
44
|
-
this._items = items;
|
45
|
-
if (sendItemChanged)
|
46
|
-
this.onItemsChanged.raiseEvent({ items });
|
47
|
-
}
|
48
|
-
/** load items but do not fire onItemsChanged
|
49
|
-
* @internal
|
50
|
-
*/
|
51
|
-
loadItems(items) {
|
52
|
-
this.loadItemsInternal(items, true, false);
|
53
|
-
}
|
54
|
-
get items() {
|
55
|
-
return this._items;
|
56
|
-
}
|
57
|
-
set items(items) {
|
58
|
-
// istanbul ignore else
|
59
|
-
if (items !== this._items)
|
60
|
-
this.loadItemsInternal(items, true, true);
|
61
|
-
}
|
62
|
-
/** @internal */
|
63
|
-
add(itemOrItems) {
|
64
|
-
let itemsToAdd;
|
65
|
-
if (isInstance(itemOrItems))
|
66
|
-
itemsToAdd = [itemOrItems];
|
67
|
-
else {
|
68
|
-
itemsToAdd = itemOrItems.filter((itemToAdd, index) => itemOrItems.findIndex((item) => item.id === itemToAdd.id) === index);
|
69
|
-
}
|
70
|
-
itemsToAdd = itemsToAdd.filter((itemToAdd) => this._items.find((item) => item.id === itemToAdd.id) === undefined);
|
71
|
-
if (itemsToAdd.length === 0)
|
72
|
-
return;
|
73
|
-
const items = [
|
74
|
-
...this._items,
|
75
|
-
...itemsToAdd,
|
76
|
-
];
|
77
|
-
this.items = items;
|
78
|
-
}
|
79
|
-
/** @internal */
|
80
|
-
remove(itemIdOrItemIds) {
|
81
|
-
const items = this._items.filter((item) => {
|
82
|
-
return isInstance(itemIdOrItemIds) ? item.id !== itemIdOrItemIds : !itemIdOrItemIds.find((itemId) => itemId === item.id);
|
83
|
-
});
|
84
|
-
this.items = items;
|
85
|
-
}
|
86
|
-
/** @internal */
|
87
|
-
static getSyncIdsOfInterest(items) {
|
88
|
-
const eventIds = new Set();
|
89
|
-
items.forEach((item) => {
|
90
|
-
for (const [, entry] of Object.entries(item)) {
|
91
|
-
if (entry instanceof ConditionalBooleanValue_1.ConditionalBooleanValue) {
|
92
|
-
entry.syncEventIds.forEach((eventId) => eventIds.add(eventId.toLowerCase()));
|
93
|
-
}
|
94
|
-
else /* istanbul ignore else */ if (entry instanceof ConditionalStringValue_1.ConditionalStringValue) {
|
95
|
-
entry.syncEventIds.forEach((eventId) => eventIds.add(eventId.toLowerCase()));
|
96
|
-
}
|
97
|
-
}
|
98
|
-
});
|
99
|
-
return [...eventIds.values()];
|
100
|
-
}
|
101
|
-
internalRefreshAffectedItems(items, eventIds) {
|
102
|
-
// istanbul ignore next
|
103
|
-
if (0 === eventIds.size)
|
104
|
-
return { itemsUpdated: false, updatedItems: [] };
|
105
|
-
let updateRequired = false;
|
106
|
-
const newItems = [];
|
107
|
-
for (const item of items) {
|
108
|
-
const updatedItem = { ...item };
|
109
|
-
for (const [, entry] of Object.entries(updatedItem)) {
|
110
|
-
if (entry instanceof ConditionalBooleanValue_1.ConditionalBooleanValue) {
|
111
|
-
// istanbul ignore else
|
112
|
-
if (ConditionalBooleanValue_1.ConditionalBooleanValue.refreshValue(entry, eventIds))
|
113
|
-
updateRequired = true;
|
114
|
-
}
|
115
|
-
else /* istanbul ignore else */ if (entry instanceof ConditionalStringValue_1.ConditionalStringValue) {
|
116
|
-
// istanbul ignore else
|
117
|
-
if (ConditionalStringValue_1.ConditionalStringValue.refreshValue(entry, eventIds))
|
118
|
-
updateRequired = true;
|
119
|
-
}
|
120
|
-
}
|
121
|
-
newItems.push(updatedItem);
|
122
|
-
}
|
123
|
-
return { itemsUpdated: updateRequired, updatedItems: newItems };
|
124
|
-
}
|
125
|
-
refreshAffectedItems(eventIds) {
|
126
|
-
// istanbul ignore next
|
127
|
-
if (0 === eventIds.size)
|
128
|
-
return;
|
129
|
-
const { itemsUpdated, updatedItems } = this.internalRefreshAffectedItems(this.items, eventIds);
|
130
|
-
// istanbul ignore else
|
131
|
-
if (itemsUpdated)
|
132
|
-
this.loadItemsInternal(updatedItems, false, true);
|
133
|
-
}
|
134
|
-
}
|
135
|
-
exports.BackstageItemsManager = BackstageItemsManager;
|
136
|
-
//# sourceMappingURL=BackstageItemsManager.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"BackstageItemsManager.js","sourceRoot":"","sources":["../../../../src/appui-abstract/backstage/BackstageItemsManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA8C;AAC9C,8EAA2E;AAC3E,4EAAyE;AAgBzE,MAAM,UAAU,GAAG,CAAI,IAAwB,EAAa,EAAE;IAC5D,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAa,qBAAqB;IAGhC,YAAY,KAAoC;QAFxC,WAAM,GAAiC,EAAE,CAAC;QAgClD;;WAEG;QACa,mBAAc,GAAG,IAAI,sBAAO,EAA6C,CAAC;QAhCxF,uBAAuB;QACvB,IAAI,KAAK;YACP,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAEO,iBAAiB,CAAC,KAAmC,EAAE,iBAA0B,EAAE,eAAwB;QACjH,IAAI,iBAAiB,IAAI,KAAK,EAAE,CAAC;YAC/B,MAAM,QAAQ,GAAG,qBAAqB,CAAC,oBAAoB,CAAC,KAAK,CAAC,CAAC;YACnE,IAAI,CAAC,KAAK,QAAQ,CAAC,MAAM,EAAE,CAAC;gBAC1B,MAAM,EAAE,YAAY,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC,4BAA4B,CAAC,KAAK,EAAE,IAAI,GAAG,CAAC,QAAQ,CAAC,CAAC,CAAC;gBAEnG,uBAAuB;gBACvB,IAAI,YAAY;oBACd,KAAK,GAAG,YAAY,CAA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;YACd,IAAI,CAAC,iBAAiB,CAAC,YAAY,EAAE,KAAK,EAAE,IAAI,CAAC,CAAC;IACtD,CAAC;CAEF;AAlID,sDAkIC","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 Backstage\r\n */\r\n\r\nimport { BeEvent } from \"@itwin/core-bentley\";\r\nimport { ConditionalBooleanValue } from \"../items/ConditionalBooleanValue\";\r\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\r\nimport { BackstageItem } from \"./BackstageItem\";\r\n\r\n/* eslint-disable @typescript-eslint/no-deprecated */\r\n\r\n/** Arguments of [[BackstageItemsManager.onChanged]] event.\r\n * @internal\r\n * @deprecated in 4.10.x. Used internally by `@itwin/appui-react`.\r\n * Please note: this internal API will be removed in 5.0.0.\r\n */\r\nexport interface BackstageItemsChangedArgs {\r\n readonly items: ReadonlyArray<BackstageItem>;\r\n}\r\n\r\ntype InstanceOrArray<T> = T | ReadonlyArray<T>;\r\n\r\nconst isInstance = <T>(args: InstanceOrArray<T>): args is T => {\r\n return !Array.isArray(args);\r\n};\r\n\r\n/**\r\n * Controls backstage items.\r\n * @internal\r\n * @deprecated in 4.10.x. Use `UiFramework.backstage` from `@itwin/appui-react`.\r\n * Please note: this internal API will be removed in 5.0.0.\r\n */\r\nexport class BackstageItemsManager {\r\n private _items: ReadonlyArray<BackstageItem> = [];\r\n\r\n constructor(items?: ReadonlyArray<BackstageItem>) {\r\n // istanbul ignore else\r\n if (items)\r\n this.loadItemsInternal(items, true, false);\r\n }\r\n\r\n private loadItemsInternal(items: ReadonlyArray<BackstageItem>, processConditions: boolean, sendItemChanged: boolean) {\r\n if (processConditions && items) {\r\n const eventIds = BackstageItemsManager.getSyncIdsOfInterest(items);\r\n if (0 !== eventIds.length) {\r\n const { itemsUpdated, updatedItems } = this.internalRefreshAffectedItems(items, new Set(eventIds));\r\n\r\n // istanbul ignore else\r\n if (itemsUpdated)\r\n items = updatedItems;\r\n }\r\n }\r\n\r\n this._items = items;\r\n if (sendItemChanged)\r\n this.onItemsChanged.raiseEvent({ items });\r\n }\r\n\r\n /** load items but do not fire onItemsChanged\r\n * @internal\r\n */\r\n public loadItems(items: ReadonlyArray<BackstageItem>) {\r\n this.loadItemsInternal(items, true, false);\r\n }\r\n\r\n /** Event raised when backstage items are changed.\r\n * @internal\r\n */\r\n public readonly onItemsChanged = new BeEvent<(args: BackstageItemsChangedArgs) => void>();\r\n\r\n public get items(): ReadonlyArray<BackstageItem> {\r\n return this._items;\r\n }\r\n\r\n public set items(items: ReadonlyArray<BackstageItem>) {\r\n // istanbul ignore else\r\n if (items !== this._items)\r\n this.loadItemsInternal(items, true, true);\r\n }\r\n\r\n /** @internal */\r\n public add(itemOrItems: BackstageItem | ReadonlyArray<BackstageItem>) {\r\n let itemsToAdd;\r\n if (isInstance(itemOrItems))\r\n itemsToAdd = [itemOrItems];\r\n else {\r\n itemsToAdd = itemOrItems.filter((itemToAdd, index) => itemOrItems.findIndex((item) => item.id === itemToAdd.id) === index);\r\n }\r\n itemsToAdd = itemsToAdd.filter((itemToAdd) => this._items.find((item) => item.id === itemToAdd.id) === undefined);\r\n if (itemsToAdd.length === 0)\r\n return;\r\n const items = [\r\n ...this._items,\r\n ...itemsToAdd,\r\n ];\r\n this.items = items;\r\n }\r\n\r\n /** @internal */\r\n public remove(itemIdOrItemIds: BackstageItem[\"id\"] | ReadonlyArray<BackstageItem[\"id\"]>) {\r\n const items = this._items.filter((item) => {\r\n return isInstance(itemIdOrItemIds) ? item.id !== itemIdOrItemIds : !itemIdOrItemIds.find((itemId) => itemId === item.id);\r\n });\r\n this.items = items;\r\n }\r\n\r\n /** @internal */\r\n public static getSyncIdsOfInterest(items: readonly BackstageItem[]): string[] {\r\n const eventIds = new Set<string>();\r\n items.forEach((item) => {\r\n for (const [, entry] of Object.entries(item)) {\r\n if (entry instanceof ConditionalBooleanValue) {\r\n entry.syncEventIds.forEach((eventId: string) => eventIds.add(eventId.toLowerCase()));\r\n } else /* istanbul ignore else */ if (entry instanceof ConditionalStringValue) {\r\n entry.syncEventIds.forEach((eventId: string) => eventIds.add(eventId.toLowerCase()));\r\n }\r\n }\r\n });\r\n return [...eventIds.values()];\r\n }\r\n\r\n private internalRefreshAffectedItems(items: readonly BackstageItem[], eventIds: Set<string>): { itemsUpdated: boolean, updatedItems: BackstageItem[] } {\r\n // istanbul ignore next\r\n if (0 === eventIds.size)\r\n return { itemsUpdated: false, updatedItems: [] };\r\n\r\n let updateRequired = false;\r\n\r\n const newItems: BackstageItem[] = [];\r\n for (const item of items) {\r\n const updatedItem = { ...item };\r\n\r\n for (const [, entry] of Object.entries(updatedItem)) {\r\n if (entry instanceof ConditionalBooleanValue) {\r\n // istanbul ignore else\r\n if (ConditionalBooleanValue.refreshValue(entry, eventIds))\r\n updateRequired = true;\r\n } else /* istanbul ignore else */ if (entry instanceof ConditionalStringValue) {\r\n // istanbul ignore else\r\n if (ConditionalStringValue.refreshValue(entry, eventIds))\r\n updateRequired = true;\r\n }\r\n }\r\n\r\n newItems.push(updatedItem);\r\n }\r\n\r\n return { itemsUpdated: updateRequired, updatedItems: newItems };\r\n }\r\n\r\n public refreshAffectedItems(eventIds: Set<string>) {\r\n // istanbul ignore next\r\n if (0 === eventIds.size)\r\n return;\r\n\r\n const { itemsUpdated, updatedItems } = this.internalRefreshAffectedItems(this.items, eventIds);\r\n\r\n // istanbul ignore else\r\n if (itemsUpdated)\r\n this.loadItemsInternal(updatedItems, false, true);\r\n }\r\n\r\n}\r\n"]}
|
@@ -1,12 +0,0 @@
|
|
1
|
-
/** @packageDocumentation
|
2
|
-
* @module Item
|
3
|
-
*/
|
4
|
-
/** Properties for an item provided by UiItemsProvider
|
5
|
-
* @deprecated in 3.6. Use [ProviderItem]($appui-react) instead.
|
6
|
-
* @public
|
7
|
-
*/
|
8
|
-
export interface ProvidedItem {
|
9
|
-
/** id of UiItemsProvider */
|
10
|
-
readonly providerId?: string;
|
11
|
-
}
|
12
|
-
//# sourceMappingURL=ProvidedItem.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ProvidedItem.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/items/ProvidedItem.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;GAGG;AACH,MAAM,WAAW,YAAY;IAC3B,4BAA4B;IAC5B,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B"}
|
@@ -1,10 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
6
|
-
/** @packageDocumentation
|
7
|
-
* @module Item
|
8
|
-
*/
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
//# sourceMappingURL=ProvidedItem.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"ProvidedItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/ProvidedItem.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\n/** Properties for an item provided by UiItemsProvider\r\n * @deprecated in 3.6. Use [ProviderItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface ProvidedItem {\r\n /** id of UiItemsProvider */\r\n readonly providerId?: string;\r\n}\r\n"]}
|
@@ -1,17 +0,0 @@
|
|
1
|
-
/** @packageDocumentation
|
2
|
-
* @module Item
|
3
|
-
*/
|
4
|
-
/** Standard stage uses. Allows extension to target ui item to include on a stage without
|
5
|
-
* knowing the stage name defined in the host application.
|
6
|
-
* @deprecated in 3.6. Use [StageUsage]($appui-react) instead.
|
7
|
-
* @public
|
8
|
-
*/
|
9
|
-
export declare enum StageUsage {
|
10
|
-
Private = "Private",
|
11
|
-
General = "General",
|
12
|
-
Redline = "Redline",
|
13
|
-
ViewOnly = "ViewOnly",
|
14
|
-
Edit = "Edit",
|
15
|
-
Settings = "Settings"
|
16
|
-
}
|
17
|
-
//# sourceMappingURL=StageUsage.d.ts.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"StageUsage.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/items/StageUsage.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH;;;;GAIG;AACH,oBAAY,UAAU;IACpB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,QAAQ,aAAa;IACrB,IAAI,SAAS;IACb,QAAQ,aAAa;CACtB"}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
/*---------------------------------------------------------------------------------------------
|
3
|
-
* Copyright (c) Bentley Systems, Incorporated. All rights reserved.
|
4
|
-
* See LICENSE.md in the project root for license terms and full copyright notice.
|
5
|
-
*--------------------------------------------------------------------------------------------*/
|
6
|
-
/** @packageDocumentation
|
7
|
-
* @module Item
|
8
|
-
*/
|
9
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
10
|
-
exports.StageUsage = void 0;
|
11
|
-
/** Standard stage uses. Allows extension to target ui item to include on a stage without
|
12
|
-
* knowing the stage name defined in the host application.
|
13
|
-
* @deprecated in 3.6. Use [StageUsage]($appui-react) instead.
|
14
|
-
* @public
|
15
|
-
*/
|
16
|
-
var StageUsage;
|
17
|
-
(function (StageUsage) {
|
18
|
-
StageUsage["Private"] = "Private";
|
19
|
-
StageUsage["General"] = "General";
|
20
|
-
StageUsage["Redline"] = "Redline";
|
21
|
-
StageUsage["ViewOnly"] = "ViewOnly";
|
22
|
-
StageUsage["Edit"] = "Edit";
|
23
|
-
StageUsage["Settings"] = "Settings";
|
24
|
-
})(StageUsage || (exports.StageUsage = StageUsage = {}));
|
25
|
-
//# sourceMappingURL=StageUsage.js.map
|
@@ -1 +0,0 @@
|
|
1
|
-
{"version":3,"file":"StageUsage.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/StageUsage.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;;GAIG;AACH,IAAY,UAOX;AAPD,WAAY,UAAU;IACpB,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;IACnB,mCAAqB,CAAA;IACrB,2BAAa,CAAA;IACb,mCAAqB,CAAA;AACvB,CAAC,EAPW,UAAU,0BAAV,UAAU,QAOrB","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/** Standard stage uses. Allows extension to target ui item to include on a stage without\r\n * knowing the stage name defined in the host application.\r\n * @deprecated in 3.6. Use [StageUsage]($appui-react) instead.\r\n * @public\r\n */\r\nexport enum StageUsage {\r\n Private = \"Private\",\r\n General = \"General\",\r\n Redline = \"Redline\",\r\n ViewOnly = \"ViewOnly\",\r\n Edit = \"Edit\",\r\n Settings = \"Settings\",\r\n}\r\n"]}
|