@itwin/appui-abstract 5.0.0-dev.40 → 5.0.0-dev.41

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.
Files changed (95) hide show
  1. package/lib/cjs/appui-abstract/BaseUiItemsProvider.js.map +1 -1
  2. package/lib/cjs/appui-abstract/UiAdmin.js.map +1 -1
  3. package/lib/cjs/appui-abstract/UiItemsManager.js.map +1 -1
  4. package/lib/cjs/appui-abstract/UiItemsProvider.js.map +1 -1
  5. package/lib/cjs/appui-abstract/backstage/BackstageItem.js.map +1 -1
  6. package/lib/cjs/appui-abstract/backstage/BackstageItemsManager.js.map +1 -1
  7. package/lib/cjs/appui-abstract/common/KeyboardKey.js.map +1 -1
  8. package/lib/cjs/appui-abstract/content/ContentLayoutProps.js.map +1 -1
  9. package/lib/cjs/appui-abstract/content/StandardContentLayouts.js.map +1 -1
  10. package/lib/cjs/appui-abstract/dialogs/DialogItem.js.map +1 -1
  11. package/lib/cjs/appui-abstract/dialogs/UiDataProvider.js.map +1 -1
  12. package/lib/cjs/appui-abstract/dialogs/UiLayoutDataProvider.js.map +1 -1
  13. package/lib/cjs/appui-abstract/items/AbstractItemProps.js.map +1 -1
  14. package/lib/cjs/appui-abstract/items/AbstractMenuItemProps.js.map +1 -1
  15. package/lib/cjs/appui-abstract/items/AbstractToolbarProps.js.map +1 -1
  16. package/lib/cjs/appui-abstract/items/BadgeType.js.map +1 -1
  17. package/lib/cjs/appui-abstract/items/ConditionalBooleanValue.js.map +1 -1
  18. package/lib/cjs/appui-abstract/items/ConditionalStringValue.js.map +1 -1
  19. package/lib/cjs/appui-abstract/items/ProvidedItem.js.map +1 -1
  20. package/lib/cjs/appui-abstract/items/RelativePosition.js.map +1 -1
  21. package/lib/cjs/appui-abstract/items/StageUsage.js.map +1 -1
  22. package/lib/cjs/appui-abstract/notification/MessagePresenter.js.map +1 -1
  23. package/lib/cjs/appui-abstract/notification/MessageSeverity.js.map +1 -1
  24. package/lib/cjs/appui-abstract/properties/Description.js.map +1 -1
  25. package/lib/cjs/appui-abstract/properties/EditorParams.js.map +1 -1
  26. package/lib/cjs/appui-abstract/properties/PrimitiveTypes.js.map +1 -1
  27. package/lib/cjs/appui-abstract/properties/Record.js.map +1 -1
  28. package/lib/cjs/appui-abstract/properties/StandardEditorNames.js.map +1 -1
  29. package/lib/cjs/appui-abstract/properties/StandardTypeNames.js.map +1 -1
  30. package/lib/cjs/appui-abstract/properties/Value.js.map +1 -1
  31. package/lib/cjs/appui-abstract/quantity/BaseQuantityDescription.js.map +1 -1
  32. package/lib/cjs/appui-abstract/statusbar/StatusBarItem.js.map +1 -1
  33. package/lib/cjs/appui-abstract/statusbar/StatusBarItemsManager.js.map +1 -1
  34. package/lib/cjs/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
  35. package/lib/cjs/appui-abstract/toolbars/ToolbarItemsManager.js.map +1 -1
  36. package/lib/cjs/appui-abstract/utils/IconSpecUtilities.js.map +1 -1
  37. package/lib/cjs/appui-abstract/utils/PointProps.js.map +1 -1
  38. package/lib/cjs/appui-abstract/utils/UiError.js.map +1 -1
  39. package/lib/cjs/appui-abstract/utils/UiEvent.js.map +1 -1
  40. package/lib/cjs/appui-abstract/utils/UiEventDispatcher.js.map +1 -1
  41. package/lib/cjs/appui-abstract/utils/callbacks.js.map +1 -1
  42. package/lib/cjs/appui-abstract/utils/filter/filters.js.map +1 -1
  43. package/lib/cjs/appui-abstract/utils/misc.js.map +1 -1
  44. package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.js.map +1 -1
  45. package/lib/cjs/appui-abstract/widget/StagePanel.js.map +1 -1
  46. package/lib/cjs/appui-abstract/widget/WidgetState.js.map +1 -1
  47. package/lib/cjs/appui-abstract.js.map +1 -1
  48. package/lib/esm/appui-abstract/BaseUiItemsProvider.js.map +1 -1
  49. package/lib/esm/appui-abstract/UiAdmin.js.map +1 -1
  50. package/lib/esm/appui-abstract/UiItemsManager.js.map +1 -1
  51. package/lib/esm/appui-abstract/UiItemsProvider.js.map +1 -1
  52. package/lib/esm/appui-abstract/backstage/BackstageItem.js.map +1 -1
  53. package/lib/esm/appui-abstract/backstage/BackstageItemsManager.js.map +1 -1
  54. package/lib/esm/appui-abstract/common/KeyboardKey.js.map +1 -1
  55. package/lib/esm/appui-abstract/content/ContentLayoutProps.js.map +1 -1
  56. package/lib/esm/appui-abstract/content/StandardContentLayouts.js.map +1 -1
  57. package/lib/esm/appui-abstract/dialogs/DialogItem.js.map +1 -1
  58. package/lib/esm/appui-abstract/dialogs/UiDataProvider.js.map +1 -1
  59. package/lib/esm/appui-abstract/dialogs/UiLayoutDataProvider.js.map +1 -1
  60. package/lib/esm/appui-abstract/items/AbstractItemProps.js.map +1 -1
  61. package/lib/esm/appui-abstract/items/AbstractMenuItemProps.js.map +1 -1
  62. package/lib/esm/appui-abstract/items/AbstractToolbarProps.js.map +1 -1
  63. package/lib/esm/appui-abstract/items/BadgeType.js.map +1 -1
  64. package/lib/esm/appui-abstract/items/ConditionalBooleanValue.js.map +1 -1
  65. package/lib/esm/appui-abstract/items/ConditionalStringValue.js.map +1 -1
  66. package/lib/esm/appui-abstract/items/ProvidedItem.js.map +1 -1
  67. package/lib/esm/appui-abstract/items/RelativePosition.js.map +1 -1
  68. package/lib/esm/appui-abstract/items/StageUsage.js.map +1 -1
  69. package/lib/esm/appui-abstract/notification/MessagePresenter.js.map +1 -1
  70. package/lib/esm/appui-abstract/notification/MessageSeverity.js.map +1 -1
  71. package/lib/esm/appui-abstract/properties/Description.js.map +1 -1
  72. package/lib/esm/appui-abstract/properties/EditorParams.js.map +1 -1
  73. package/lib/esm/appui-abstract/properties/PrimitiveTypes.js.map +1 -1
  74. package/lib/esm/appui-abstract/properties/Record.js.map +1 -1
  75. package/lib/esm/appui-abstract/properties/StandardEditorNames.js.map +1 -1
  76. package/lib/esm/appui-abstract/properties/StandardTypeNames.js.map +1 -1
  77. package/lib/esm/appui-abstract/properties/Value.js.map +1 -1
  78. package/lib/esm/appui-abstract/quantity/BaseQuantityDescription.js.map +1 -1
  79. package/lib/esm/appui-abstract/statusbar/StatusBarItem.js.map +1 -1
  80. package/lib/esm/appui-abstract/statusbar/StatusBarItemsManager.js.map +1 -1
  81. package/lib/esm/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
  82. package/lib/esm/appui-abstract/toolbars/ToolbarItemsManager.js.map +1 -1
  83. package/lib/esm/appui-abstract/utils/IconSpecUtilities.js.map +1 -1
  84. package/lib/esm/appui-abstract/utils/PointProps.js.map +1 -1
  85. package/lib/esm/appui-abstract/utils/UiError.js.map +1 -1
  86. package/lib/esm/appui-abstract/utils/UiEvent.js.map +1 -1
  87. package/lib/esm/appui-abstract/utils/UiEventDispatcher.js.map +1 -1
  88. package/lib/esm/appui-abstract/utils/callbacks.js.map +1 -1
  89. package/lib/esm/appui-abstract/utils/filter/filters.js.map +1 -1
  90. package/lib/esm/appui-abstract/utils/misc.js.map +1 -1
  91. package/lib/esm/appui-abstract/widget/AbstractWidgetProps.js.map +1 -1
  92. package/lib/esm/appui-abstract/widget/StagePanel.js.map +1 -1
  93. package/lib/esm/appui-abstract/widget/WidgetState.js.map +1 -1
  94. package/lib/esm/appui-abstract.js.map +1 -1
  95. package/package.json +5 -5
@@ -1 +1 @@
1
- {"version":3,"file":"ToolbarItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/toolbars/ToolbarItem.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAOH;;;GAGG;AACH,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,4GAA4G;IAC5G,6EAAuB,CAAA;IACvB,iFAAiF;IACjF,mEAAkB,CAAA;AACpB,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AAED;;;GAGG;AACH,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,0BAA0B;IAC1B,uEAAc,CAAA;IACd,wBAAwB;IACxB,mEAAY,CAAA;AACd,CAAC,EALW,kBAAkB,kCAAlB,kBAAkB,QAK7B;AAuFD;;GAEG;AACH,MAAa,oBAAoB;IAC/B,+BAA+B;aACjB,uBAAkB,GAAG,CAAC,EAAU,EAAE,YAAoB,EAAE,IAAqC,EAAE,KAAsC,EAAE,OAAmB,EAAE,SAAiC,EAAgB,EAAE,CAAC,CAAC;QAC7N,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,KAAK;QACX,OAAO;QACP,GAAG,SAAS;KACb,CAAC,CAAC;IAEH,8BAA8B;aAChB,sBAAiB,GAAG,CAAC,EAAU,EAAE,YAAoB,EAAE,IAAqC,EAAE,KAAsC,EAAE,KAAgD,EAAE,SAAgC,EAAe,EAAE,CAAC,CAAC;QACvP,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,KAAK;QACX,KAAK;QACL,GAAG,SAAS;KACb,CAAC,CAAC;IAEH,+BAA+B;IACxB,MAAM,CAAC,cAAc,CAAC,IAAuB;QAClD,OAAQ,IAAqB,CAAC,OAAO,KAAK,SAAS,CAAC;IACtD,CAAC;IAED,8BAA8B;IACvB,MAAM,CAAC,aAAa,CAAC,IAAuB;QACjD,OAAQ,IAAoB,CAAC,KAAK,KAAK,SAAS,CAAC;IACnD,CAAC;IAED,yCAAyC;IAClC,MAAM,CAAC,kBAAkB,CAAC,IAAuB;QACtD,OAAO,CAAC,CAAE,IAA+B,CAAC,QAAQ,CAAC;IACrD,CAAC;;AA9BH,oDA+BC","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 Toolbar\n */\n\nimport { BadgeType } from \"../items/BadgeType\";\nimport { ConditionalBooleanValue } from \"../items/ConditionalBooleanValue\";\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\nimport { ProvidedItem } from \"../items/ProvidedItem\";\n\n/** Used to specify the usage of the toolbar which determine the toolbar position.\n * @deprecated in 3.6. Use [ToolbarUsage]($appui-react) instead.\n * @public\n */\nexport enum ToolbarUsage {\n /** Contains tools to Create Update and Delete content - in ninezone this is in top left of content area. */\n ContentManipulation = 0,\n /** Manipulate view/camera - in ninezone this is in top right of content area. */\n ViewNavigation = 1,\n}\n\n/** Used to specify the orientation of the toolbar.\n * @deprecated in 3.6. Use [ToolbarOrientation]($appui-react) instead.\n * @public\n */\nexport enum ToolbarOrientation {\n /** Horizontal toolbar. */\n Horizontal = 0,\n /** Vertical toolbar. */\n Vertical = 1,\n}\n\n/** Describes the data needed to insert a UI items into an existing set of UI items.\n * @public\n */\nexport interface ToolbarItem extends ProvidedItem { // eslint-disable-line @typescript-eslint/no-deprecated\n /** can be used by application to store miscellaneous data. */\n readonly applicationData?: any;\n /** Describes badge. Renders no badge if not specified. */\n readonly badgeType?: BadgeType;\n /** Optional description */\n readonly description?: string | ConditionalStringValue;\n /** Require uniqueId for the item. To ensure uniqueness it is suggested that a namespace prefix of the extension name be used. */\n readonly id: string;\n /** optional data to used by item implementor. */\n readonly internalData?: Map<string, any>;\n /** Defines if the item is active (shown with an active stripe/bar). */\n readonly isActive?: boolean;\n /** Describes if the item is visible or hidden. The default is for the item to be visible. */\n readonly isHidden?: boolean | ConditionalBooleanValue;\n /** Describes if the item is enabled or disabled. The default is for the item to be enabled. */\n readonly isDisabled?: boolean | ConditionalBooleanValue;\n /** Describes if the item should appear pressed (used for displaying toggle state). This property is NOT used by Toolbars\n * constructed using the `ToolbarWithOverflow` component, which are used in AppUi 2.0 and later. For these later toolbars\n * the icon is usually changed to denote the state of a toggle.\n */\n readonly isPressed?: boolean;\n /** Specifies the item's grouping value. Items are sorted by group and then item priority. When\n * group priority changes a separator is inserted. It is recommended using values 10 through 100, incrementing by 10. This\n * allows extensions enough gaps to insert their own groups. If the value is not specified a groupPriority of 0 is used.\n */\n readonly groupPriority?: number;\n /** Priority within a toolbar or group. */\n readonly itemPriority: number;\n /** Optional parent tool group to add tool. */\n readonly parentToolGroupId?: string;\n}\n\n/** Describes the data needed to insert an action button into a toolbar.\n * @public\n */\nexport interface ActionButton extends ToolbarItem {\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\n readonly icon: string | ConditionalStringValue;\n /** label, shown as tool tip on a button or an item label in a group. */\n readonly label: string | ConditionalStringValue;\n /** function to run when the button is pressed. */\n readonly execute: () => void;\n}\n\n/** Describes the data needed to insert a group button into a toolbar.\n * @public\n */\nexport interface GroupButton extends ToolbarItem {\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\n readonly icon: string | ConditionalStringValue;\n /** label, shown as tool tip on group button or a group button label in a group panel. */\n readonly label: string | ConditionalStringValue;\n /** label shown as the title in at top of group panel. */\n readonly panelLabel?: string | ConditionalStringValue;\n /** children of the group */\n readonly items: ReadonlyArray<ActionButton | GroupButton>;\n}\n\n/** Describes the data needed to insert a custom button into a toolbar.\n * @public\n */\nexport interface CustomButtonDefinition extends ToolbarItem {\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\n readonly icon?: string | ConditionalStringValue;\n /** label, shown as tool tip on group button or a group button label in a group panel. */\n readonly label?: string | ConditionalStringValue;\n /** parameter that marks data as being a custom definition. */\n readonly isCustom: true;\n}\n\n/** Any Button Type that can be inserted into a toolbar.\n * @public\n */\nexport type CommonToolbarItem = ActionButton | GroupButton | CustomButtonDefinition;\n\n/** Type for Toolbar Item Id\n * @deprecated in 3.6. Please use `ToolbarItem[\"id\"]` from @itwin/appui-react.\n * @public\n */\nexport type ToolbarItemId = CommonToolbarItem[\"id\"];\n\n/** Helper class to create Abstract StatusBar Item definitions.\n * @public\n */\nexport class ToolbarItemUtilities {\n /** Creates an Action Button */\n public static createActionButton = (id: string, itemPriority: number, icon: string | ConditionalStringValue, label: string | ConditionalStringValue, execute: () => void, overrides?: Partial<ActionButton>): ActionButton => ({\n id, itemPriority,\n icon, label,\n execute,\n ...overrides,\n });\n\n /** Creates a Group button. */\n public static createGroupButton = (id: string, itemPriority: number, icon: string | ConditionalStringValue, label: string | ConditionalStringValue, items: ReadonlyArray<ActionButton | GroupButton>, overrides?: Partial<GroupButton>): GroupButton => ({\n id, itemPriority,\n icon, label,\n items,\n ...overrides,\n });\n\n /** ActionButton type guard. */\n public static isActionButton(item: CommonToolbarItem): item is ActionButton {\n return (item as ActionButton).execute !== undefined;\n }\n\n /** GroupButton type guard. */\n public static isGroupButton(item: CommonToolbarItem): item is GroupButton {\n return (item as GroupButton).items !== undefined;\n }\n\n /** CustomButtonDefinition type guard. */\n public static isCustomDefinition(item: CommonToolbarItem): item is CustomButtonDefinition {\n return !!(item as CustomButtonDefinition).isCustom;\n }\n}\n"]}
1
+ {"version":3,"file":"ToolbarItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/toolbars/ToolbarItem.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAOH;;;GAGG;AACH,IAAY,YAKX;AALD,WAAY,YAAY;IACtB,4GAA4G;IAC5G,6EAAuB,CAAA;IACvB,iFAAiF;IACjF,mEAAkB,CAAA;AACpB,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AAED;;;GAGG;AACH,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC5B,0BAA0B;IAC1B,uEAAc,CAAA;IACd,wBAAwB;IACxB,mEAAY,CAAA;AACd,CAAC,EALW,kBAAkB,kCAAlB,kBAAkB,QAK7B;AAuFD;;GAEG;AACH,MAAa,oBAAoB;IAC/B,+BAA+B;aACjB,uBAAkB,GAAG,CAAC,EAAU,EAAE,YAAoB,EAAE,IAAqC,EAAE,KAAsC,EAAE,OAAmB,EAAE,SAAiC,EAAgB,EAAE,CAAC,CAAC;QAC7N,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,KAAK;QACX,OAAO;QACP,GAAG,SAAS;KACb,CAAC,CAAC;IAEH,8BAA8B;aAChB,sBAAiB,GAAG,CAAC,EAAU,EAAE,YAAoB,EAAE,IAAqC,EAAE,KAAsC,EAAE,KAAgD,EAAE,SAAgC,EAAe,EAAE,CAAC,CAAC;QACvP,EAAE,EAAE,YAAY;QAChB,IAAI,EAAE,KAAK;QACX,KAAK;QACL,GAAG,SAAS;KACb,CAAC,CAAC;IAEH,+BAA+B;IACxB,MAAM,CAAC,cAAc,CAAC,IAAuB;QAClD,OAAQ,IAAqB,CAAC,OAAO,KAAK,SAAS,CAAC;IACtD,CAAC;IAED,8BAA8B;IACvB,MAAM,CAAC,aAAa,CAAC,IAAuB;QACjD,OAAQ,IAAoB,CAAC,KAAK,KAAK,SAAS,CAAC;IACnD,CAAC;IAED,yCAAyC;IAClC,MAAM,CAAC,kBAAkB,CAAC,IAAuB;QACtD,OAAO,CAAC,CAAE,IAA+B,CAAC,QAAQ,CAAC;IACrD,CAAC;;AA9BH,oDA+BC","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 Toolbar\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 usage of the toolbar which determine the toolbar position.\r\n * @deprecated in 3.6. Use [ToolbarUsage]($appui-react) instead.\r\n * @public\r\n */\r\nexport enum ToolbarUsage {\r\n /** Contains tools to Create Update and Delete content - in ninezone this is in top left of content area. */\r\n ContentManipulation = 0,\r\n /** Manipulate view/camera - in ninezone this is in top right of content area. */\r\n ViewNavigation = 1,\r\n}\r\n\r\n/** Used to specify the orientation of the toolbar.\r\n * @deprecated in 3.6. Use [ToolbarOrientation]($appui-react) instead.\r\n * @public\r\n */\r\nexport enum ToolbarOrientation {\r\n /** Horizontal toolbar. */\r\n Horizontal = 0,\r\n /** Vertical toolbar. */\r\n Vertical = 1,\r\n}\r\n\r\n/** Describes the data needed to insert a UI items into an existing set of UI items.\r\n * @public\r\n */\r\nexport interface ToolbarItem extends ProvidedItem { // eslint-disable-line @typescript-eslint/no-deprecated\r\n /** can be used by application to store miscellaneous data. */\r\n readonly applicationData?: any;\r\n /** Describes badge. Renders no badge if not specified. */\r\n readonly badgeType?: BadgeType;\r\n /** Optional description */\r\n readonly description?: string | ConditionalStringValue;\r\n /** Require uniqueId for 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 used by item implementor. */\r\n readonly internalData?: Map<string, any>;\r\n /** Defines if the item is active (shown with an active stripe/bar). */\r\n readonly isActive?: boolean;\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 /** Describes if the item should appear pressed (used for displaying toggle state). This property is NOT used by Toolbars\r\n * constructed using the `ToolbarWithOverflow` component, which are used in AppUi 2.0 and later. For these later toolbars\r\n * the icon is usually changed to denote the state of a toggle.\r\n */\r\n readonly isPressed?: boolean;\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. If the value is not specified a groupPriority of 0 is used.\r\n */\r\n readonly groupPriority?: number;\r\n /** Priority within a toolbar or group. */\r\n readonly itemPriority: number;\r\n /** Optional parent tool group to add tool. */\r\n readonly parentToolGroupId?: string;\r\n}\r\n\r\n/** Describes the data needed to insert an action button into a toolbar.\r\n * @public\r\n */\r\nexport interface ActionButton extends ToolbarItem {\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 /** label, shown as tool tip on a button or an item label in a group. */\r\n readonly label: string | ConditionalStringValue;\r\n /** function to run when the button is pressed. */\r\n readonly execute: () => void;\r\n}\r\n\r\n/** Describes the data needed to insert a group button into a toolbar.\r\n * @public\r\n */\r\nexport interface GroupButton extends ToolbarItem {\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 /** label, shown as tool tip on group button or a group button label in a group panel. */\r\n readonly label: string | ConditionalStringValue;\r\n /** label shown as the title in at top of group panel. */\r\n readonly panelLabel?: string | ConditionalStringValue;\r\n /** children of the group */\r\n readonly items: ReadonlyArray<ActionButton | GroupButton>;\r\n}\r\n\r\n/** Describes the data needed to insert a custom button into a toolbar.\r\n * @public\r\n */\r\nexport interface CustomButtonDefinition extends ToolbarItem {\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 /** label, shown as tool tip on group button or a group button label in a group panel. */\r\n readonly label?: string | ConditionalStringValue;\r\n /** parameter that marks data as being a custom definition. */\r\n readonly isCustom: true;\r\n}\r\n\r\n/** Any Button Type that can be inserted into a toolbar.\r\n * @public\r\n */\r\nexport type CommonToolbarItem = ActionButton | GroupButton | CustomButtonDefinition;\r\n\r\n/** Type for Toolbar Item Id\r\n * @deprecated in 3.6. Please use `ToolbarItem[\"id\"]` from @itwin/appui-react.\r\n * @public\r\n */\r\nexport type ToolbarItemId = CommonToolbarItem[\"id\"];\r\n\r\n/** Helper class to create Abstract StatusBar Item definitions.\r\n * @public\r\n */\r\nexport class ToolbarItemUtilities {\r\n /** Creates an Action Button */\r\n public static createActionButton = (id: string, itemPriority: number, icon: string | ConditionalStringValue, label: string | ConditionalStringValue, execute: () => void, overrides?: Partial<ActionButton>): ActionButton => ({\r\n id, itemPriority,\r\n icon, label,\r\n execute,\r\n ...overrides,\r\n });\r\n\r\n /** Creates a Group button. */\r\n public static createGroupButton = (id: string, itemPriority: number, icon: string | ConditionalStringValue, label: string | ConditionalStringValue, items: ReadonlyArray<ActionButton | GroupButton>, overrides?: Partial<GroupButton>): GroupButton => ({\r\n id, itemPriority,\r\n icon, label,\r\n items,\r\n ...overrides,\r\n });\r\n\r\n /** ActionButton type guard. */\r\n public static isActionButton(item: CommonToolbarItem): item is ActionButton {\r\n return (item as ActionButton).execute !== undefined;\r\n }\r\n\r\n /** GroupButton type guard. */\r\n public static isGroupButton(item: CommonToolbarItem): item is GroupButton {\r\n return (item as GroupButton).items !== undefined;\r\n }\r\n\r\n /** CustomButtonDefinition type guard. */\r\n public static isCustomDefinition(item: CommonToolbarItem): item is CustomButtonDefinition {\r\n return !!(item as CustomButtonDefinition).isCustom;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ToolbarItemsManager.js","sourceRoot":"","sources":["../../../../src/appui-abstract/toolbars/ToolbarItemsManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA8C;AAC9C,8EAA2E;AAC3E,4EAAyE;AACzE,+CAAkH;AAMlH,MAAM,UAAU,GAAG,CAAI,IAAwB,EAAa,EAAE;IAC5D,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC,CAAC;AASF;;;GAGG;AACH,MAAa,mBAAmB;IAG9B,YAAY,KAAwC;QAF1C,WAAM,GAAqC,EAAE,CAAC;QAOxD;;WAEG;QACa,mBAAc,GAAG,IAAI,sBAAO,EAA2C,CAAC;QAPtF,IAAI,KAAK;YACP,IAAI,CAAC,iBAAiB,CAAC,KAAK,EAAE,IAAI,EAAE,KAAK,CAAC,CAAC;IAC/C,CAAC;IAOO,iBAAiB,CAAC,KAAuC,EAAE,iBAA0B,EAAE,eAAwB;QACrH,IAAI,iBAAiB,IAAI,KAAK,EAAE,CAAC;YAC/B,MAAM,QAAQ,GAAG,mBAAmB,CA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CAAC;YAED,WAAW,CAAC,QAAQ,GAAG,CAAC,WAAW,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC;YACnD,WAAW,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAChC,CAAC;QACD,OAAO,WAAW,CAAC;IACrB,CAAC;IAEM,eAAe,CAAC,MAAc;QACnC,gDAAgD;QAChD,IAAI,CAAC,IAAI,CAAC,6BAA6B,CAAC,MAAM,CAAC;YAC7C,OAAO;QAET,MAAM,QAAQ,GAAwB,EAAE,CAAC;QACzC,KAAK,MAAM,IAAI,IAAI,IAAI,CAAC,KAAK,EAAE,CAAC;YAC9B,MAAM,WAAW,GAAG,EAAE,GAAG,IAAI,EAAE,CAAC;YAEhC,IAAI,kCAAoB,CAAC,aAAa,CAAC,WAAW,CAAC,EAAE,CAAC;gBACpD,WAAW,CAAC,KAAK,GAAG,mBAAmB,CAAC,+BAA+B,CAAC,WAAW,EAAE,MAAM,CAAC,CAAC;YAC/F,CAAC;YAED,WAAW,CAAC,QAAQ,GAAG,CAAC,WAAW,CAAC,EAAE,KAAK,MAAM,CAAC,CAAC;YACnD,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;QAC7B,CAAC;QAED,IAAI,CAAC,KAAK,GAAG,QAAQ,CAAC;IACxB,CAAC;CAEF;AAzPD,kDAyPC","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 Toolbar\n */\n\nimport { BeEvent } from \"@itwin/core-bentley\";\nimport { ConditionalBooleanValue } from \"../items/ConditionalBooleanValue\";\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\nimport { ActionButton, CommonToolbarItem, GroupButton, ToolbarItemId, ToolbarItemUtilities } from \"./ToolbarItem\";\n\n/* eslint-disable @typescript-eslint/no-deprecated */\n\ntype InstanceOrArray<T> = T | ReadonlyArray<T>;\n\nconst isInstance = <T>(args: InstanceOrArray<T>): args is T => {\n return !Array.isArray(args);\n};\n\n/** Arguments of [[ToolbarItemsManager.onChanged]] event.\n * @internal\n */\nexport interface ToolbarItemsChangedArgs {\n readonly items: ReadonlyArray<CommonToolbarItem>;\n}\n\n/**\n * Controls status bar items.\n * @internal\n */\nexport class ToolbarItemsManager {\n protected _items: ReadonlyArray<CommonToolbarItem> = [];\n\n constructor(items?: ReadonlyArray<CommonToolbarItem>) {\n if (items)\n this.loadItemsInternal(items, true, false);\n }\n\n /** Event raised when Toolbar items are changed.\n * @internal\n */\n public readonly onItemsChanged = new BeEvent<(args: ToolbarItemsChangedArgs) => void>();\n\n private loadItemsInternal(items: ReadonlyArray<CommonToolbarItem>, processConditions: boolean, sendItemChanged: boolean) {\n if (processConditions && items) {\n const eventIds = ToolbarItemsManager.getSyncIdsOfInterest(items);\n if (0 !== eventIds.length) {\n const { itemsUpdated, updatedItems } = this.internalRefreshAffectedItems(items, new Set(eventIds));\n\n // istanbul ignore else\n if (itemsUpdated)\n items = updatedItems;\n }\n }\n\n this._items = items;\n if (sendItemChanged)\n this.onItemsChanged.raiseEvent({ items });\n }\n\n /** load items but do not fire onItemsChanged\n * @internal\n */\n public loadItems(items: ReadonlyArray<CommonToolbarItem>) {\n this.loadItemsInternal(items, true, false);\n }\n\n /** Get an array of the Toolbar items */\n public get items(): ReadonlyArray<CommonToolbarItem> {\n return this._items;\n }\n\n public set items(items: ReadonlyArray<CommonToolbarItem>) {\n // istanbul ignore else\n if (items !== this._items)\n this.loadItemsInternal(items, true, true);\n }\n\n public add(itemOrItems: CommonToolbarItem | ReadonlyArray<CommonToolbarItem>) {\n let itemsToAdd;\n if (isInstance(itemOrItems))\n itemsToAdd = [itemOrItems];\n else {\n itemsToAdd = itemOrItems.filter((itemToAdd, index) => itemOrItems.findIndex((item) => item.id === itemToAdd.id) === index);\n }\n itemsToAdd = itemsToAdd.filter((itemToAdd) => this._items.find((item) => item.id === itemToAdd.id) === undefined);\n if (itemsToAdd.length === 0)\n return;\n const items = [\n ...this._items,\n ...itemsToAdd,\n ];\n this.items = items;\n }\n\n /** Remove Toolbar items based on id */\n public remove(itemIdOrItemIds: ToolbarItemId | ReadonlyArray<ToolbarItemId\n >) {\n const items = this._items.filter((item) => {\n return isInstance(itemIdOrItemIds) ? item.id !== itemIdOrItemIds : !itemIdOrItemIds.find((itemId) => itemId === item.id);\n });\n this.items = items;\n }\n\n /** @internal */\n public removeAll() {\n this._items = [];\n }\n\n private static gatherSyncIds(eventIds: Set<string>, items: readonly CommonToolbarItem[]) {\n for (const item of items) {\n for (const [, entry] of Object.entries(item)) {\n if (entry instanceof ConditionalBooleanValue) {\n entry.syncEventIds.forEach((eventId: string) => eventIds.add(eventId.toLowerCase()));\n } else /* istanbul ignore else */ if (entry instanceof ConditionalStringValue) {\n entry.syncEventIds.forEach((eventId: string) => eventIds.add(eventId.toLowerCase()));\n }\n }\n\n // istanbul ignore else\n if (ToolbarItemUtilities.isGroupButton(item)) {\n this.gatherSyncIds(eventIds, item.items);\n }\n }\n }\n\n public static getSyncIdsOfInterest(items: readonly CommonToolbarItem[]): string[] {\n const eventIds = new Set<string>();\n this.gatherSyncIds(eventIds, items);\n return [...eventIds.values()];\n }\n\n private static refreshChildItems(parentItem: GroupButton, eventIds: Set<string>): { childrenUpdated: boolean, childItems: ReadonlyArray<ActionButton | GroupButton> } {\n const updatedItems: Array<ActionButton | GroupButton> = [];\n let itemsUpdated = false;\n\n for (const item of parentItem.items) {\n const updatedItem = { ...item };\n\n if (ToolbarItemUtilities.isGroupButton(updatedItem)) {\n const { childrenUpdated, childItems } = this.refreshChildItems(updatedItem, eventIds);\n // istanbul ignore else\n if (childrenUpdated) {\n updatedItem.items = childItems;\n itemsUpdated = true;\n }\n }\n\n for (const [, entry] of Object.entries(updatedItem)) {\n if (entry instanceof ConditionalBooleanValue) {\n // istanbul ignore else\n if (ConditionalBooleanValue.refreshValue(entry, eventIds))\n itemsUpdated = true;\n } else /* istanbul ignore else */ if (entry instanceof ConditionalStringValue) {\n // istanbul ignore else\n if (ConditionalStringValue.refreshValue(entry, eventIds))\n itemsUpdated = true;\n }\n }\n\n updatedItems.push(updatedItem);\n }\n return { childrenUpdated: itemsUpdated, childItems: updatedItems };\n }\n\n private internalRefreshAffectedItems(items: readonly CommonToolbarItem[], eventIds: Set<string>): { itemsUpdated: boolean, updatedItems: CommonToolbarItem[] } {\n // istanbul ignore next\n if (0 === eventIds.size)\n return { itemsUpdated: false, updatedItems: [] };\n\n let updateRequired = false;\n\n const newItems: CommonToolbarItem[] = [];\n for (const item of items) {\n const updatedItem = { ...item };\n\n if (ToolbarItemUtilities.isGroupButton(updatedItem)) {\n const { childrenUpdated, childItems } = ToolbarItemsManager.refreshChildItems(updatedItem, eventIds);\n // istanbul ignore else\n if (childrenUpdated) {\n updatedItem.items = childItems;\n updateRequired = true;\n }\n }\n\n for (const [, entry] of Object.entries(updatedItem)) {\n if (entry instanceof ConditionalBooleanValue) {\n // istanbul ignore else\n if (ConditionalBooleanValue.refreshValue(entry, eventIds))\n updateRequired = true;\n } else /* istanbul ignore else */ if (entry instanceof ConditionalStringValue) {\n // istanbul ignore else\n if (ConditionalStringValue.refreshValue(entry, eventIds))\n updateRequired = true;\n }\n }\n\n newItems.push(updatedItem);\n }\n\n return { itemsUpdated: updateRequired, updatedItems: newItems };\n }\n\n public refreshAffectedItems(eventIds: Set<string>) {\n // istanbul ignore next\n if (0 === eventIds.size)\n return;\n\n const { itemsUpdated, updatedItems } = this.internalRefreshAffectedItems(this.items, eventIds);\n\n // istanbul ignore else\n if (itemsUpdated)\n this.loadItemsInternal(updatedItems, false, true);\n }\n\n private static isActiveToolIdRefreshRequiredForChildren(children: ReadonlyArray<ActionButton | GroupButton>, toolId: string): boolean {\n for (const item of children) {\n if (ToolbarItemUtilities.isGroupButton(item)) {\n if (this.isActiveToolIdRefreshRequiredForChildren(item.items, toolId))\n return true;\n } else {\n const isActive = !!item.isActive;\n if ((isActive && item.id !== toolId) || (!isActive && item.id === toolId))\n return true;\n }\n }\n return false;\n }\n\n private isActiveToolIdRefreshRequired(toolId: string): boolean {\n for (const item of this.items) {\n if (ToolbarItemUtilities.isGroupButton(item)) {\n if (ToolbarItemsManager.isActiveToolIdRefreshRequiredForChildren(item.items, toolId))\n return true;\n } else {\n const isActive = !!item.isActive;\n if ((isActive && item.id !== toolId) || (!isActive && item.id === toolId))\n return true;\n }\n }\n\n return false;\n }\n\n private static refreshActiveToolIdInChildItems(parentItem: GroupButton, toolId: string): Array<ActionButton | GroupButton> {\n const newChildren: Array<ActionButton | GroupButton> = [];\n for (const item of parentItem.items) {\n const updatedItem = { ...item };\n\n if (ToolbarItemUtilities.isGroupButton(updatedItem)) {\n updatedItem.items = ToolbarItemsManager.refreshActiveToolIdInChildItems(updatedItem, toolId);\n }\n\n updatedItem.isActive = (updatedItem.id === toolId);\n newChildren.push(updatedItem);\n }\n return newChildren;\n }\n\n public setActiveToolId(toolId: string) {\n // first see if any updates are really necessary\n if (!this.isActiveToolIdRefreshRequired(toolId))\n return;\n\n const newItems: CommonToolbarItem[] = [];\n for (const item of this.items) {\n const updatedItem = { ...item };\n\n if (ToolbarItemUtilities.isGroupButton(updatedItem)) {\n updatedItem.items = ToolbarItemsManager.refreshActiveToolIdInChildItems(updatedItem, toolId);\n }\n\n updatedItem.isActive = (updatedItem.id === toolId);\n newItems.push(updatedItem);\n }\n\n this.items = newItems;\n }\n\n}\n"]}
1
+ {"version":3,"file":"ToolbarItemsManager.js","sourceRoot":"","sources":["../../../../src/appui-abstract/toolbars/ToolbarItemsManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAA8C;AAC9C,8EAA2E;AAC3E,4EAAyE;AACzE,+CAAkH;AAMlH,MAAM,UAAU,GAAG,CAAI,IAAwB,EAAa,EAAE;IAC5D,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC,CA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------------------------------------------------------------------------\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 Toolbar\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 { ActionButton, CommonToolbarItem, GroupButton, ToolbarItemId, ToolbarItemUtilities } from \"./ToolbarItem\";\r\n\r\n/* eslint-disable @typescript-eslint/no-deprecated */\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/** Arguments of [[ToolbarItemsManager.onChanged]] event.\r\n * @internal\r\n */\r\nexport interface ToolbarItemsChangedArgs {\r\n readonly items: ReadonlyArray<CommonToolbarItem>;\r\n}\r\n\r\n/**\r\n * Controls status bar items.\r\n * @internal\r\n */\r\nexport class ToolbarItemsManager {\r\n protected _items: ReadonlyArray<CommonToolbarItem> = [];\r\n\r\n constructor(items?: ReadonlyArray<CommonToolbarItem>) {\r\n if (items)\r\n this.loadItemsInternal(items, true, false);\r\n }\r\n\r\n /** Event raised when Toolbar items are changed.\r\n * @internal\r\n */\r\n public readonly onItemsChanged = new BeEvent<(args: ToolbarItemsChangedArgs) => void>();\r\n\r\n private loadItemsInternal(items: ReadonlyArray<CommonToolbarItem>, processConditions: boolean, sendItemChanged: boolean) {\r\n if (processConditions && items) {\r\n const eventIds = ToolbarItemsManager.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<CommonToolbarItem>) {\r\n this.loadItemsInternal(items, true, false);\r\n }\r\n\r\n /** Get an array of the Toolbar items */\r\n public get items(): ReadonlyArray<CommonToolbarItem> {\r\n return this._items;\r\n }\r\n\r\n public set items(items: ReadonlyArray<CommonToolbarItem>) {\r\n // istanbul ignore else\r\n if (items !== this._items)\r\n this.loadItemsInternal(items, true, true);\r\n }\r\n\r\n public add(itemOrItems: CommonToolbarItem | ReadonlyArray<CommonToolbarItem>) {\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 /** Remove Toolbar items based on id */\r\n public remove(itemIdOrItemIds: ToolbarItemId | ReadonlyArray<ToolbarItemId\r\n >) {\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 removeAll() {\r\n this._items = [];\r\n }\r\n\r\n private static gatherSyncIds(eventIds: Set<string>, items: readonly CommonToolbarItem[]) {\r\n for (const item of items) {\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 // istanbul ignore else\r\n if (ToolbarItemUtilities.isGroupButton(item)) {\r\n this.gatherSyncIds(eventIds, item.items);\r\n }\r\n }\r\n }\r\n\r\n public static getSyncIdsOfInterest(items: readonly CommonToolbarItem[]): string[] {\r\n const eventIds = new Set<string>();\r\n this.gatherSyncIds(eventIds, items);\r\n return [...eventIds.values()];\r\n }\r\n\r\n private static refreshChildItems(parentItem: GroupButton, eventIds: Set<string>): { childrenUpdated: boolean, childItems: ReadonlyArray<ActionButton | GroupButton> } {\r\n const updatedItems: Array<ActionButton | GroupButton> = [];\r\n let itemsUpdated = false;\r\n\r\n for (const item of parentItem.items) {\r\n const updatedItem = { ...item };\r\n\r\n if (ToolbarItemUtilities.isGroupButton(updatedItem)) {\r\n const { childrenUpdated, childItems } = this.refreshChildItems(updatedItem, eventIds);\r\n // istanbul ignore else\r\n if (childrenUpdated) {\r\n updatedItem.items = childItems;\r\n itemsUpdated = true;\r\n }\r\n }\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 itemsUpdated = 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 itemsUpdated = true;\r\n }\r\n }\r\n\r\n updatedItems.push(updatedItem);\r\n }\r\n return { childrenUpdated: itemsUpdated, childItems: updatedItems };\r\n }\r\n\r\n private internalRefreshAffectedItems(items: readonly CommonToolbarItem[], eventIds: Set<string>): { itemsUpdated: boolean, updatedItems: CommonToolbarItem[] } {\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: CommonToolbarItem[] = [];\r\n for (const item of items) {\r\n const updatedItem = { ...item };\r\n\r\n if (ToolbarItemUtilities.isGroupButton(updatedItem)) {\r\n const { childrenUpdated, childItems } = ToolbarItemsManager.refreshChildItems(updatedItem, eventIds);\r\n // istanbul ignore else\r\n if (childrenUpdated) {\r\n updatedItem.items = childItems;\r\n updateRequired = true;\r\n }\r\n }\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 private static isActiveToolIdRefreshRequiredForChildren(children: ReadonlyArray<ActionButton | GroupButton>, toolId: string): boolean {\r\n for (const item of children) {\r\n if (ToolbarItemUtilities.isGroupButton(item)) {\r\n if (this.isActiveToolIdRefreshRequiredForChildren(item.items, toolId))\r\n return true;\r\n } else {\r\n const isActive = !!item.isActive;\r\n if ((isActive && item.id !== toolId) || (!isActive && item.id === toolId))\r\n return true;\r\n }\r\n }\r\n return false;\r\n }\r\n\r\n private isActiveToolIdRefreshRequired(toolId: string): boolean {\r\n for (const item of this.items) {\r\n if (ToolbarItemUtilities.isGroupButton(item)) {\r\n if (ToolbarItemsManager.isActiveToolIdRefreshRequiredForChildren(item.items, toolId))\r\n return true;\r\n } else {\r\n const isActive = !!item.isActive;\r\n if ((isActive && item.id !== toolId) || (!isActive && item.id === toolId))\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n }\r\n\r\n private static refreshActiveToolIdInChildItems(parentItem: GroupButton, toolId: string): Array<ActionButton | GroupButton> {\r\n const newChildren: Array<ActionButton | GroupButton> = [];\r\n for (const item of parentItem.items) {\r\n const updatedItem = { ...item };\r\n\r\n if (ToolbarItemUtilities.isGroupButton(updatedItem)) {\r\n updatedItem.items = ToolbarItemsManager.refreshActiveToolIdInChildItems(updatedItem, toolId);\r\n }\r\n\r\n updatedItem.isActive = (updatedItem.id === toolId);\r\n newChildren.push(updatedItem);\r\n }\r\n return newChildren;\r\n }\r\n\r\n public setActiveToolId(toolId: string) {\r\n // first see if any updates are really necessary\r\n if (!this.isActiveToolIdRefreshRequired(toolId))\r\n return;\r\n\r\n const newItems: CommonToolbarItem[] = [];\r\n for (const item of this.items) {\r\n const updatedItem = { ...item };\r\n\r\n if (ToolbarItemUtilities.isGroupButton(updatedItem)) {\r\n updatedItem.items = ToolbarItemsManager.refreshActiveToolIdInChildItems(updatedItem, toolId);\r\n }\r\n\r\n updatedItem.isActive = (updatedItem.id === toolId);\r\n newItems.push(updatedItem);\r\n }\r\n\r\n this.items = newItems;\r\n }\r\n\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"IconSpecUtilities.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/IconSpecUtilities.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,qDAAqD;AAErD;;GAEG;AACH,MAAa,iBAAiB;IAC5B,+DAA+D;aACxC,eAAU,GAAG,MAAM,CAAC;aACpB,yBAAoB,GAAG,SAAS,CAAC;IAExD;;;MAGE;IACK,MAAM,CAAC,iBAAiB,CAAC,MAAc;QAC5C,OAAO,GAAG,iBAAiB,CAAC,UAAU,GAAG,MAAM,EAAE,CAAC;IACpD,CAAC;IACD;;MAEE;IACK,MAAM,CAAC,0BAA0B,CAAC,SAAiB;QACxD,OAAO,GAAG,iBAAiB,CAAC,oBAAoB,GAAG,SAAS,EAAE,CAAC;IACjE,CAAC;IAED;;;MAGE;IACK,MAAM,CAAC,YAAY,CAAC,QAAgB;QACzC,IAAI,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,UAAU,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7E,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC3B,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;MAEE;IAEK,MAAM,CAAC,qBAAqB,CAAC,QAAgB;QAClD,IAAI,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvF,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC3B,CAAC;QAED,OAAO,SAAS,CAAC;IAEnB,CAAC;;AAzCH,8CA0CC","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/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** Creates an IconSpec with an SVG source and gets the SVG source from an IconSpec.\n * @public @deprecated in 4.3. AppUI libraries >= 4.7.x support loading SVGs sources without prefixes, eliminating the need for these utilities.\n */\nexport class IconSpecUtilities {\n /** Prefix for an SVG IconSpec loaded with the Sprite loader */\n public static readonly SVG_PREFIX = \"svg:\";\n public static readonly WEB_COMPONENT_PREFIX = \"webSvg:\";\n\n /** Create an IconSpec for an SVG loaded into web component with sprite loader\n * This method is deprecated -- use createWebComponentIconSpec()\n * @public @deprecated in 3.2. Please avoid using the Sprite loader and use IconSpecUtilities.createWebComponentIconSpec() instead.\n */\n public static createSvgIconSpec(svgSrc: string): string {\n return `${IconSpecUtilities.SVG_PREFIX}${svgSrc}`;\n }\n /** Create an IconSpec for an SVG loaded into web component with svg-loader\n * @public @deprecated in 4.3. AppUI libraries > 4.7.x support loading SVGs sources without prefixes, eliminating the need for this utility.\n */\n public static createWebComponentIconSpec(srcString: string): string {\n return `${IconSpecUtilities.WEB_COMPONENT_PREFIX}${srcString}`;\n }\n\n /** Get the SVG Source from an sprite IconSpec\n * This method is deprecated -- use getWebComponentSource()\n * @public @deprecated in 3.2. avoid using the Sprite loader and use IconSpecUtilities.getWebComponentSource() instead.\n */\n public static getSvgSource(iconSpec: string): string | undefined {\n if (iconSpec.startsWith(IconSpecUtilities.SVG_PREFIX) && iconSpec.length > 4) {\n return iconSpec.slice(4);\n }\n\n return undefined;\n }\n /** Get the SVG Source from an svg-loader IconSpec\n * @public @deprecated in 4.3. AppUI libraries > 4.7.x support loading SVGs sources without prefixes, eliminating the need for this utility.\n */\n\n public static getWebComponentSource(iconSpec: string): string | undefined {\n if (iconSpec.startsWith(IconSpecUtilities.WEB_COMPONENT_PREFIX) && iconSpec.length > 7) {\n return iconSpec.slice(7);\n }\n\n return undefined;\n\n }\n}\n"]}
1
+ {"version":3,"file":"IconSpecUtilities.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/IconSpecUtilities.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,qDAAqD;AAErD;;GAEG;AACH,MAAa,iBAAiB;IAC5B,+DAA+D;aACxC,eAAU,GAAG,MAAM,CAAC;aACpB,yBAAoB,GAAG,SAAS,CAAC;IAExD;;;MAGE;IACK,MAAM,CAAC,iBAAiB,CAAC,MAAc;QAC5C,OAAO,GAAG,iBAAiB,CAAC,UAAU,GAAG,MAAM,EAAE,CAAC;IACpD,CAAC;IACD;;MAEE;IACK,MAAM,CAAC,0BAA0B,CAAC,SAAiB;QACxD,OAAO,GAAG,iBAAiB,CAAC,oBAAoB,GAAG,SAAS,EAAE,CAAC;IACjE,CAAC;IAED;;;MAGE;IACK,MAAM,CAAC,YAAY,CAAC,QAAgB;QACzC,IAAI,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,UAAU,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YAC7E,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC3B,CAAC;QAED,OAAO,SAAS,CAAC;IACnB,CAAC;IACD;;MAEE;IAEK,MAAM,CAAC,qBAAqB,CAAC,QAAgB;QAClD,IAAI,QAAQ,CAAC,UAAU,CAAC,iBAAiB,CAAC,oBAAoB,CAAC,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;YACvF,OAAO,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;QAC3B,CAAC;QAED,OAAO,SAAS,CAAC;IAEnB,CAAC;;AAzCH,8CA0CC","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/* eslint-disable @typescript-eslint/no-deprecated */\r\n\r\n/** Creates an IconSpec with an SVG source and gets the SVG source from an IconSpec.\r\n * @public @deprecated in 4.3. AppUI libraries >= 4.7.x support loading SVGs sources without prefixes, eliminating the need for these utilities.\r\n */\r\nexport class IconSpecUtilities {\r\n /** Prefix for an SVG IconSpec loaded with the Sprite loader */\r\n public static readonly SVG_PREFIX = \"svg:\";\r\n public static readonly WEB_COMPONENT_PREFIX = \"webSvg:\";\r\n\r\n /** Create an IconSpec for an SVG loaded into web component with sprite loader\r\n * This method is deprecated -- use createWebComponentIconSpec()\r\n * @public @deprecated in 3.2. Please avoid using the Sprite loader and use IconSpecUtilities.createWebComponentIconSpec() instead.\r\n */\r\n public static createSvgIconSpec(svgSrc: string): string {\r\n return `${IconSpecUtilities.SVG_PREFIX}${svgSrc}`;\r\n }\r\n /** Create an IconSpec for an SVG loaded into web component with svg-loader\r\n * @public @deprecated in 4.3. AppUI libraries > 4.7.x support loading SVGs sources without prefixes, eliminating the need for this utility.\r\n */\r\n public static createWebComponentIconSpec(srcString: string): string {\r\n return `${IconSpecUtilities.WEB_COMPONENT_PREFIX}${srcString}`;\r\n }\r\n\r\n /** Get the SVG Source from an sprite IconSpec\r\n * This method is deprecated -- use getWebComponentSource()\r\n * @public @deprecated in 3.2. avoid using the Sprite loader and use IconSpecUtilities.getWebComponentSource() instead.\r\n */\r\n public static getSvgSource(iconSpec: string): string | undefined {\r\n if (iconSpec.startsWith(IconSpecUtilities.SVG_PREFIX) && iconSpec.length > 4) {\r\n return iconSpec.slice(4);\r\n }\r\n\r\n return undefined;\r\n }\r\n /** Get the SVG Source from an svg-loader IconSpec\r\n * @public @deprecated in 4.3. AppUI libraries > 4.7.x support loading SVGs sources without prefixes, eliminating the need for this utility.\r\n */\r\n\r\n public static getWebComponentSource(iconSpec: string): string | undefined {\r\n if (iconSpec.startsWith(IconSpecUtilities.WEB_COMPONENT_PREFIX) && iconSpec.length > 7) {\r\n return iconSpec.slice(7);\r\n }\r\n\r\n return undefined;\r\n\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"PointProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/PointProps.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 Utilities\n */\n\n/** Describes 2d points.\n * @public @deprecated in 4.2.x. Use @core/geometry [[Geometry.XAndY]] or your own custom type.\n */\nexport interface PointProps {\n readonly x: number;\n readonly y: number;\n}\n"]}
1
+ {"version":3,"file":"PointProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/PointProps.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 Utilities\r\n */\r\n\r\n/** Describes 2d points.\r\n * @public @deprecated in 4.2.x. Use @core/geometry [[Geometry.XAndY]] or your own custom type.\r\n */\r\nexport interface PointProps {\r\n readonly x: number;\r\n readonly y: number;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"UiError.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/UiError.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuF;AAEvF;;GAEG;AACH,MAAa,OAAQ,SAAQ,2BAAY;IAEvC,6CAA6C;IAC7C,YAA0B,QAAgB,EAAE,OAAe,EAAE,cAAsB,4BAAa,CAAC,KAAK,EAAE,WAAiC;QACvI,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QADjB,aAAQ,GAAR,QAAQ,CAAQ;IAE1C,CAAC;CACF;AAND,0BAMC","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\nimport { BentleyError, BentleyStatus, GetMetaDataFunction } from \"@itwin/core-bentley\";\n\n/** iTwin.js UI UiError class is a subclass of BentleyError. Errors are logged.\n * @public @deprecated in 4.3. Use [[Bentley.BentleyError]] instead.\n */\nexport class UiError extends BentleyError {\n\n /** Constructs UiError using BentleyError. */\n public constructor(public category: string, message: string, errorNumber: number = BentleyStatus.ERROR, getMetaData?: GetMetaDataFunction) {\n super(errorNumber, message, getMetaData);\n }\n}\n"]}
1
+ {"version":3,"file":"UiError.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/UiError.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAuF;AAEvF;;GAEG;AACH,MAAa,OAAQ,SAAQ,2BAAY;IAEvC,6CAA6C;IAC7C,YAA0B,QAAgB,EAAE,OAAe,EAAE,cAAsB,4BAAa,CAAC,KAAK,EAAE,WAAiC;QACvI,KAAK,CAAC,WAAW,EAAE,OAAO,EAAE,WAAW,CAAC,CAAC;QADjB,aAAQ,GAAR,QAAQ,CAAQ;IAE1C,CAAC;CACF;AAND,0BAMC","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\nimport { BentleyError, BentleyStatus, GetMetaDataFunction } from \"@itwin/core-bentley\";\r\n\r\n/** iTwin.js UI UiError class is a subclass of BentleyError. Errors are logged.\r\n * @public @deprecated in 4.3. Use [[Bentley.BentleyError]] instead.\r\n */\r\nexport class UiError extends BentleyError {\r\n\r\n /** Constructs UiError using BentleyError. */\r\n public constructor(public category: string, message: string, errorNumber: number = BentleyStatus.ERROR, getMetaData?: GetMetaDataFunction) {\r\n super(errorNumber, message, getMetaData);\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"UiEvent.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/UiEvent.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAEhD;;;GAGG;AACH,MAAa,OAAoB,SAAQ,wBAAqB;CAAI;AAAlE,0BAAkE","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\nimport { BeUiEvent } from \"@itwin/core-bentley\";\n\n/** iTwin.js UI UiEvent class is a subclass of BeEvent with argument type safety.\n * @public\n * @deprecated in 4.2. This type is a duplicate of [[BeUiEvent]], which should be used instead.\n */\nexport class UiEvent<TEventArgs> extends BeUiEvent<TEventArgs> { }\n"]}
1
+ {"version":3,"file":"UiEvent.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/UiEvent.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAEhD;;;GAGG;AACH,MAAa,OAAoB,SAAQ,wBAAqB;CAAI;AAAlE,0BAAkE","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\nimport { BeUiEvent } from \"@itwin/core-bentley\";\r\n\r\n/** iTwin.js UI UiEvent class is a subclass of BeEvent with argument type safety.\r\n * @public\r\n * @deprecated in 4.2. This type is a duplicate of [[BeUiEvent]], which should be used instead.\r\n */\r\nexport class UiEvent<TEventArgs> extends BeUiEvent<TEventArgs> { }\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"UiEventDispatcher.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/UiEventDispatcher.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAUhD;;;GAGG;AACH,MAAa,WAAY,SAAQ,wBAA0B;CAAI;AAA/D,kCAA+D;AAE/D;;;;GAIG;AACH,MAAa,iBAAiB;IAS5B;QACE,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,EAAU,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC3B,4DAA4D;QAC5D,IAAI,CAAC,YAAY,GAAG,IAAI,WAAW,EAAE,CAAC;QACtC,IAAI,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,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;YACjH,OAAO,IAAI,CAAC;QACd,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AA/HD,8CA+HC","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\nimport { BeUiEvent } from \"@itwin/core-bentley\";\n\n/** UiSync Event arguments. Contains a set of lower case event Ids.\n * @public\n * @deprecated in 4.2.x Please use [[UiSyncEventArgs]] in @itwin/appui-react\n */\nexport interface UiSyncEventArgs {\n eventIds: Set<string>;\n}\n\n/** UiSync Event class.\n * @public\n * @deprecated in 4.2.x Use [[UiSyncEvent]] from @itwin/appui-react.\n */\nexport class UiSyncEvent extends BeUiEvent<UiSyncEventArgs> { }\n\n/** This class is used to send eventIds to interested UI components so the component can determine if it needs\n * to refresh its display by calling setState on itself.\n * @public\n * @deprecated in 4.2.x Use [[SyncUiEventDispatcher]] from @itwin/appui-react.\n */\nexport class UiEventDispatcher {\n private _syncEventTimerId: number | undefined;\n private _eventIds: Set<string>;\n private _eventIdAdded;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n private _uiSyncEvent: UiSyncEvent;\n private _timeoutPeriod;\n private _secondaryTimeoutPeriod;\n\n constructor() {\n this._eventIds = new Set<string>();\n this._eventIdAdded = false;\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n this._uiSyncEvent = new UiSyncEvent();\n this._timeoutPeriod = 100;\n this._secondaryTimeoutPeriod = this._timeoutPeriod / 2;\n }\n\n /** @internal - used for testing only */\n /* istanbul ignore next */\n public setTimeoutPeriod(period: number): void {\n this._timeoutPeriod = period;\n this._secondaryTimeoutPeriod = Math.floor(this._timeoutPeriod / 2);\n if (this._secondaryTimeoutPeriod < 1)\n this._secondaryTimeoutPeriod = 1;\n if (this._syncEventTimerId) {\n window.clearTimeout(this._syncEventTimerId);\n this._syncEventTimerId = undefined;\n }\n if (this._eventIds)\n this._eventIds.clear();\n\n this._eventIdAdded = false;\n }\n\n /** The current timeout period */\n public get timeoutPeriod(): number {\n return this._timeoutPeriod;\n }\n /** Return set of event ids that will be sent to listeners/. */\n public get syncEventIds(): Set<string> {\n return this._eventIds;\n }\n\n /** Return UiSyncEvent so callers can register an event callback. */\n // eslint-disable-next-line @typescript-eslint/no-deprecated\n public get onSyncUiEvent(): UiSyncEvent {\n return this._uiSyncEvent;\n }\n\n /** Immediately trigger sync event processing. */\n public dispatchImmediateSyncUiEvent(eventId: string): void {\n const eventIds = new Set<string>();\n eventIds.add(eventId.toLowerCase());\n this.onSyncUiEvent.emit({ eventIds });\n }\n\n /** Save eventId in Set for processing. */\n public dispatchSyncUiEvent(eventId: string): void {\n // istanbul ignore if\n if (0 === this._timeoutPeriod) {\n return;\n }\n\n this.syncEventIds.add(eventId.toLowerCase());\n if (!this._syncEventTimerId) { // if there is not a timer active, create one\n this._syncEventTimerId = window.setTimeout(() => { this.checkForAdditionalIds(); }, this._timeoutPeriod);\n } else {\n this._eventIdAdded = true;\n }\n }\n\n /** Save multiple eventIds in Set for processing. */\n public dispatchSyncUiEvents(eventIds: string[]): void {\n // istanbul ignore if\n if (0 === this._timeoutPeriod) {\n return;\n }\n\n eventIds.forEach((id) => this.syncEventIds.add(id.toLowerCase()));\n // istanbul ignore else\n if (!this._syncEventTimerId) { // if there is not a timer active, create one\n this._syncEventTimerId = window.setTimeout(() => { this.checkForAdditionalIds(); }, this._timeoutPeriod);\n } else {\n this._eventIdAdded = true;\n }\n }\n\n /** Trigger registered event processing when timer has expired and no addition eventId are added. */\n public checkForAdditionalIds() {\n /* istanbul ignore else */\n if (!this._eventIdAdded) {\n // istanbul ignore else\n if (this._syncEventTimerId) {\n window.clearTimeout(this._syncEventTimerId);\n this._syncEventTimerId = undefined;\n }\n this._eventIdAdded = false;\n // istanbul ignore else\n if (this.syncEventIds.size > 0) {\n const eventIds = new Set<string>();\n this.syncEventIds.forEach((value) => eventIds.add(value));\n this._eventIds.clear();\n this.onSyncUiEvent.emit({ eventIds });\n }\n return;\n }\n\n // istanbul ignore next\n if (this._syncEventTimerId) {\n window.clearTimeout(this._syncEventTimerId);\n this._syncEventTimerId = undefined;\n }\n // istanbul ignore next\n this._eventIdAdded = false;\n // if events have been added before the initial timer expired wait half that time to see if events are still being added.\n // istanbul ignore next\n this._syncEventTimerId = window.setTimeout(() => { this.checkForAdditionalIds(); }, this._secondaryTimeoutPeriod);\n }\n\n /** Checks to see if an eventId of interest is contained in the set of eventIds */\n public hasEventOfInterest(eventIds: Set<string>, idsOfInterest: string[]) {\n /* istanbul ignore else */\n if ((idsOfInterest.length > 0) && idsOfInterest.some((value: string): boolean => eventIds.has(value.toLowerCase())))\n return true;\n return false;\n }\n}\n"]}
1
+ {"version":3,"file":"UiEventDispatcher.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/UiEventDispatcher.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAUhD;;;GAGG;AACH,MAAa,WAAY,SAAQ,wBAA0B;CAAI;AAA/D,kCAA+D;AAE/D;;;;GAIG;AACH,MAAa,iBAAiB;IAS5B;QACE,IAAI,CAAC,SAAS,GAAG,IAAI,GAAG,EAAU,CAAC;QACnC,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC3B,4DAA4D;QAC5D,IAAI,CAAC,YAAY,GAAG,IAAI,WAAW,EAAE,CAAC;QACtC,IAAI,CAAC,cAAc,GAAG,GAAG,CAAC;QAC1B,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,cAAc,GAAG,CAAC,CAAC;IACzD,CAAC;IAED,wCAAwC;IACxC,0BAA0B;IACnB,gBAAgB,CAAC,MAAc;QACpC,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC;QAC7B,IAAI,CAAC,uBAAuB,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CA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,GAAG,IAAI,GAAG,EAAU,CAAC;gBACnC,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC;gBAC1D,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAC;gBACvB,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,EAAE,QAAQ,EAAE,CAAC,CAAC;YACxC,CAAC;YACD,OAAO;QACT,CAAC;QAED,uBAAuB;QACvB,IAAI,IAAI,CAAC,iBAAiB,EAAE,CAAC;YAC3B,MAAM,CAAC,YAAY,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAC;YAC5C,IAAI,CAAC,iBAAiB,GAAG,SAAS,CAAC;QACrC,CAAC;QACD,uBAAuB;QACvB,IAAI,CAAC,aAAa,GAAG,KAAK,CAAC;QAC3B,yHAAyH;QACzH,uBAAuB;QACvB,IAAI,CAAC,iBAAiB,GAAG,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC,qBAAqB,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,uBAAuB,CAAC,CAAC;IACpH,CAAC;IAED,kFAAkF;IAC3E,kBAAkB,CAAC,QAAqB,EAAE,aAAuB;QACtE,0BAA0B;QAC1B,IAAI,CAAC,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,IAAI,aAAa,CAAC,IAAI,CAAC,CAAC,KAAa,EAAW,EAAE,CAAC,QAAQ,CAAC,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,CAAC,CAAC;YACjH,OAAO,IAAI,CAAC;QACd,OAAO,KAAK,CAAC;IACf,CAAC;CACF;AA/HD,8CA+HC","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\nimport { BeUiEvent } from \"@itwin/core-bentley\";\r\n\r\n/** UiSync Event arguments. Contains a set of lower case event Ids.\r\n * @public\r\n * @deprecated in 4.2.x Please use [[UiSyncEventArgs]] in @itwin/appui-react\r\n */\r\nexport interface UiSyncEventArgs {\r\n eventIds: Set<string>;\r\n}\r\n\r\n/** UiSync Event class.\r\n * @public\r\n * @deprecated in 4.2.x Use [[UiSyncEvent]] from @itwin/appui-react.\r\n */\r\nexport class UiSyncEvent extends BeUiEvent<UiSyncEventArgs> { }\r\n\r\n/** This class is used to send eventIds to interested UI components so the component can determine if it needs\r\n * to refresh its display by calling setState on itself.\r\n * @public\r\n * @deprecated in 4.2.x Use [[SyncUiEventDispatcher]] from @itwin/appui-react.\r\n */\r\nexport class UiEventDispatcher {\r\n private _syncEventTimerId: number | undefined;\r\n private _eventIds: Set<string>;\r\n private _eventIdAdded;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n private _uiSyncEvent: UiSyncEvent;\r\n private _timeoutPeriod;\r\n private _secondaryTimeoutPeriod;\r\n\r\n constructor() {\r\n this._eventIds = new Set<string>();\r\n this._eventIdAdded = false;\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n this._uiSyncEvent = new UiSyncEvent();\r\n this._timeoutPeriod = 100;\r\n this._secondaryTimeoutPeriod = this._timeoutPeriod / 2;\r\n }\r\n\r\n /** @internal - used for testing only */\r\n /* istanbul ignore next */\r\n public setTimeoutPeriod(period: number): void {\r\n this._timeoutPeriod = period;\r\n this._secondaryTimeoutPeriod = Math.floor(this._timeoutPeriod / 2);\r\n if (this._secondaryTimeoutPeriod < 1)\r\n this._secondaryTimeoutPeriod = 1;\r\n if (this._syncEventTimerId) {\r\n window.clearTimeout(this._syncEventTimerId);\r\n this._syncEventTimerId = undefined;\r\n }\r\n if (this._eventIds)\r\n this._eventIds.clear();\r\n\r\n this._eventIdAdded = false;\r\n }\r\n\r\n /** The current timeout period */\r\n public get timeoutPeriod(): number {\r\n return this._timeoutPeriod;\r\n }\r\n /** Return set of event ids that will be sent to listeners/. */\r\n public get syncEventIds(): Set<string> {\r\n return this._eventIds;\r\n }\r\n\r\n /** Return UiSyncEvent so callers can register an event callback. */\r\n // eslint-disable-next-line @typescript-eslint/no-deprecated\r\n public get onSyncUiEvent(): UiSyncEvent {\r\n return this._uiSyncEvent;\r\n }\r\n\r\n /** Immediately trigger sync event processing. */\r\n public dispatchImmediateSyncUiEvent(eventId: string): void {\r\n const eventIds = new Set<string>();\r\n eventIds.add(eventId.toLowerCase());\r\n this.onSyncUiEvent.emit({ eventIds });\r\n }\r\n\r\n /** Save eventId in Set for processing. */\r\n public dispatchSyncUiEvent(eventId: string): void {\r\n // istanbul ignore if\r\n if (0 === this._timeoutPeriod) {\r\n return;\r\n }\r\n\r\n this.syncEventIds.add(eventId.toLowerCase());\r\n if (!this._syncEventTimerId) { // if there is not a timer active, create one\r\n this._syncEventTimerId = window.setTimeout(() => { this.checkForAdditionalIds(); }, this._timeoutPeriod);\r\n } else {\r\n this._eventIdAdded = true;\r\n }\r\n }\r\n\r\n /** Save multiple eventIds in Set for processing. */\r\n public dispatchSyncUiEvents(eventIds: string[]): void {\r\n // istanbul ignore if\r\n if (0 === this._timeoutPeriod) {\r\n return;\r\n }\r\n\r\n eventIds.forEach((id) => this.syncEventIds.add(id.toLowerCase()));\r\n // istanbul ignore else\r\n if (!this._syncEventTimerId) { // if there is not a timer active, create one\r\n this._syncEventTimerId = window.setTimeout(() => { this.checkForAdditionalIds(); }, this._timeoutPeriod);\r\n } else {\r\n this._eventIdAdded = true;\r\n }\r\n }\r\n\r\n /** Trigger registered event processing when timer has expired and no addition eventId are added. */\r\n public checkForAdditionalIds() {\r\n /* istanbul ignore else */\r\n if (!this._eventIdAdded) {\r\n // istanbul ignore else\r\n if (this._syncEventTimerId) {\r\n window.clearTimeout(this._syncEventTimerId);\r\n this._syncEventTimerId = undefined;\r\n }\r\n this._eventIdAdded = false;\r\n // istanbul ignore else\r\n if (this.syncEventIds.size > 0) {\r\n const eventIds = new Set<string>();\r\n this.syncEventIds.forEach((value) => eventIds.add(value));\r\n this._eventIds.clear();\r\n this.onSyncUiEvent.emit({ eventIds });\r\n }\r\n return;\r\n }\r\n\r\n // istanbul ignore next\r\n if (this._syncEventTimerId) {\r\n window.clearTimeout(this._syncEventTimerId);\r\n this._syncEventTimerId = undefined;\r\n }\r\n // istanbul ignore next\r\n this._eventIdAdded = false;\r\n // if events have been added before the initial timer expired wait half that time to see if events are still being added.\r\n // istanbul ignore next\r\n this._syncEventTimerId = window.setTimeout(() => { this.checkForAdditionalIds(); }, this._secondaryTimeoutPeriod);\r\n }\r\n\r\n /** Checks to see if an eventId of interest is contained in the set of eventIds */\r\n public hasEventOfInterest(eventIds: Set<string>, idsOfInterest: string[]) {\r\n /* istanbul ignore else */\r\n if ((idsOfInterest.length > 0) && idsOfInterest.some((value: string): boolean => eventIds.has(value.toLowerCase())))\r\n return true;\r\n return false;\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"callbacks.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/callbacks.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 Utilities\n */\n\nimport { Primitives } from \"../properties/PrimitiveTypes\";\n\n/** Signature for number onCommit function.\n * @public\n */\nexport type OnNumberCommitFunc = (value: number) => void;\n\n/** Signature for value onCommit function.\n * @public\n */\nexport type OnValueCommitFunc = (value: Primitives.Value) => void;\n\n/** Signature for onCancel function.\n * @public\n */\nexport type OnCancelFunc = () => void;\n\n/** Signature for onItemExecuted function.\n * @public\n */\nexport type OnItemExecutedFunc = (item: any) => void;\n"]}
1
+ {"version":3,"file":"callbacks.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/callbacks.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 Utilities\r\n */\r\n\r\nimport { Primitives } from \"../properties/PrimitiveTypes\";\r\n\r\n/** Signature for number onCommit function.\r\n * @public\r\n */\r\nexport type OnNumberCommitFunc = (value: number) => void;\r\n\r\n/** Signature for value onCommit function.\r\n * @public\r\n */\r\nexport type OnValueCommitFunc = (value: Primitives.Value) => void;\r\n\r\n/** Signature for onCancel function.\r\n * @public\r\n */\r\nexport type OnCancelFunc = () => void;\r\n\r\n/** Signature for onItemExecuted function.\r\n * @public\r\n */\r\nexport type OnItemExecutedFunc = (item: any) => void;\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../src/appui-abstract/utils/filter/filters.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AA6DH,oCAeC;AA/DD,IAAK,QAKJ;AALD,WAAK,QAAQ;IACX,0CAAU,CAAA;IACV,qCAAO,CAAA;IACP,gDAAa,CAAA;IACb,4DAAmB,CAAA;AACrB,CAAC,EALI,QAAQ,KAAR,QAAQ,QAKZ;AAED,SAAS,YAAY,CAAC,IAAY;IAChC,OAAO,CACL,IAAI,KAAK,QAAQ,CAAC,KAAK;WACpB,IAAI,KAAK,QAAQ,CAAC,GAAG;WACrB,IAAI,KAAK,QAAQ,CAAC,QAAQ;WAC1B,IAAI,KAAK,QAAQ,CAAC,cAAc,CACpC,CAAC;AACJ,CAAC;AACD,MAAM,cAAc,GAAG,IAAI,GAAG,EAAU,CAAC;AACzC,mCAAmC;KAChC,KAAK,CAAC,EAAE,CAAC;KACT,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,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AAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IACzE,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,IAAY,EAAE,KAAa;IAC3C,KAAK,IAAI,CAAC,GAAG,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,CAAC;QACzC,IAAI,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC;YACrC,CAAC,CAAC,GAAG,CAAC,IAAI,eAAe,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;YACrD,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC,MAAM,CAAC;AACrB,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// file copied from https://github.com/microsoft/vscode/blob/master/src/vs/base/common/filters.ts\n/* eslint-disable @typescript-eslint/no-deprecated */\n\n/** Interface that returns indices of matches\n * @public @deprecated in 4.3.x. A rarely used interface. If needed, please add a custom implementation.\n */\nexport interface IMatch {\n start: number;\n end: number;\n}\n\nenum CharCode {\n Space = 32,\n Tab = 9,\n LineFeed = 10,\n CarriageReturn = 13\n}\n\nfunction isWhitespace(code: number): boolean {\n return (\n code === CharCode.Space\n || code === CharCode.Tab\n || code === CharCode.LineFeed\n || code === CharCode.CarriageReturn\n );\n}\nconst wordSeparators = new Set<number>();\n'`~!@#$%^&*()-=+[{]}\\\\|;:\\'\",.<>/?'\n .split(\"\")\n .forEach((s) => wordSeparators.add(s.charCodeAt(0)));\n\nfunction isWordSeparator(code: number): boolean {\n return isWhitespace(code) || wordSeparators.has(code);\n}\n\nfunction charactersMatch(codeA: number, codeB: number): boolean {\n return (codeA === codeB) || (isWordSeparator(codeA) && isWordSeparator(codeB));\n}\n\nfunction join(head: IMatch, tail: IMatch[]): IMatch[] {\n if (tail.length === 0) {\n tail = [head];\n } else if (head.end === tail[0].start) {\n tail[0].start = head.start;\n } else {\n tail.unshift(head);\n }\n return tail;\n}\n\n/**\n * Matches beginning of words supporting non-ASCII languages.\n * @param word Filter string\n * @param target String being searched\n * @param contiguous - If true the filter string must be found \"contiguous\" in the searched string (E.g. \"pul\" will match \"Git: Pull\").\n * Otherwise also matches sub string of the word with beginnings of the words in the target (e.g. \"gp\" or \"g p\" will match \"Git: Pull\").\n * Useful in cases where the target is words (e.g. command labels)\n * @internal @deprecated in 4.3. Use `matchesWords` from @itwin/core-react instead. Though internal, this requires deprecation due to known public usage in @itwin/core-react.\n */\nexport function matchesWords(word: string, target: string, contiguous: boolean = false): IMatch[] | null {\n if (!target || target.length === 0) {\n return null;\n }\n\n let result: IMatch[] | null = null;\n let i = 0;\n\n word = word.toLowerCase();\n target = target.toLowerCase();\n while (i < target.length && (result = _matchesWords(word, target, 0, i, contiguous)) === null) {\n i = nextWord(target, i + 1);\n }\n\n return result;\n}\n\nfunction _matchesWords(word: string, target: string, i: number, j: number, contiguous: boolean): IMatch[] | null {\n if (i === word.length) {\n return [];\n } else if (j === target.length) {\n return null;\n } else if (!charactersMatch(word.charCodeAt(i), target.charCodeAt(j))) {\n return null;\n } else {\n let result: IMatch[] | null = null;\n let nextWordIndex = j + 1;\n result = _matchesWords(word, target, i + 1, j + 1, contiguous);\n // istanbul ignore else\n if (!contiguous) {\n while (!result && (nextWordIndex = nextWord(target, nextWordIndex)) < target.length) {\n result = _matchesWords(word, target, i + 1, nextWordIndex, contiguous);\n nextWordIndex++;\n }\n }\n return result === null ? null : join({ start: j, end: j + 1 }, result);\n }\n}\n\nfunction nextWord(word: string, start: number): number {\n for (let i = start; i < word.length; i++) {\n if (isWordSeparator(word.charCodeAt(i)) ||\n (i > 0 && isWordSeparator(word.charCodeAt(i - 1)))) {\n return i;\n }\n }\n return word.length;\n}\n"]}
1
+ {"version":3,"file":"filters.js","sourceRoot":"","sources":["../../../../../src/appui-abstract/utils/filter/filters.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;AA6DH,oCAeC;AA/DD,IAAK,QAKJ;AALD,WAAK,QAAQ;IACX,0CAAU,CAAA;IACV,qCAAO,CAAA;IACP,gDAAa,CAAA;IACb,4DAAmB,CAAA;AACrB,CAAC,EALI,QAAQ,KAAR,QAAQ,QAKZ;AAED,SAAS,YAAY,CAAC,IAAY;IAChC,OAAO,CACL,IAAI,KAAK,QAAQ,CAAC,KAAK;WACpB,IAAI,KAAK,QAAQ,CAAC,GAAG;WACrB,IAAI,KAAK,QAAQ,CAAC,QAAQ;WAC1B,IAAI,KAAK,QAAQ,CAAC,cAAc,CACpC,CAAC;AACJ,CAAC;AACD,MAAM,cAAc,GAAG,IAAI,GAAG,EAAU,CAAC;AACzC,mCAAmC;KAChC,KAAK,CAAC,EAAE,CAAC;KACT,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,cAAc,CAAC,GAAG,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAEvD,SAAS,eAAe,CAAC,IAAY;IACnC,OAAO,YAAY,CAAC,IAAI,CAAC,IAAI,cAAc,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;AACxD,CAAC;AAED,SAAS,eAAe,CAAC,KAAa,EAAE,KAAa;IACnD,OAAO,CAAC,KAAK,KAAK,KAAK,CAAC,IAAI,CAAC,eAAe,CAAC,KAAK,CAAC,IAAI,eAAe,CAAC,KAAK,CAAC,CAAC,CAAC;AACjF,CAAC;AAED,SAAS,IAAI,CAAC,IAAY,EAAE,IAAc;IACxC,IAAI,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE,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CAAC,CAAC,EAAE,CAAC;YACrD,OAAO,CAAC,CAAC;QACX,CAAC;IACH,CAAC;IACD,OAAO,IAAI,CAAC,MAAM,CAAC;AACrB,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// file copied from https://github.com/microsoft/vscode/blob/master/src/vs/base/common/filters.ts\r\n/* eslint-disable @typescript-eslint/no-deprecated */\r\n\r\n/** Interface that returns indices of matches\r\n * @public @deprecated in 4.3.x. A rarely used interface. If needed, please add a custom implementation.\r\n */\r\nexport interface IMatch {\r\n start: number;\r\n end: number;\r\n}\r\n\r\nenum CharCode {\r\n Space = 32,\r\n Tab = 9,\r\n LineFeed = 10,\r\n CarriageReturn = 13\r\n}\r\n\r\nfunction isWhitespace(code: number): boolean {\r\n return (\r\n code === CharCode.Space\r\n || code === CharCode.Tab\r\n || code === CharCode.LineFeed\r\n || code === CharCode.CarriageReturn\r\n );\r\n}\r\nconst wordSeparators = new Set<number>();\r\n'`~!@#$%^&*()-=+[{]}\\\\|;:\\'\",.<>/?'\r\n .split(\"\")\r\n .forEach((s) => wordSeparators.add(s.charCodeAt(0)));\r\n\r\nfunction isWordSeparator(code: number): boolean {\r\n return isWhitespace(code) || wordSeparators.has(code);\r\n}\r\n\r\nfunction charactersMatch(codeA: number, codeB: number): boolean {\r\n return (codeA === codeB) || (isWordSeparator(codeA) && isWordSeparator(codeB));\r\n}\r\n\r\nfunction join(head: IMatch, tail: IMatch[]): IMatch[] {\r\n if (tail.length === 0) {\r\n tail = [head];\r\n } else if (head.end === tail[0].start) {\r\n tail[0].start = head.start;\r\n } else {\r\n tail.unshift(head);\r\n }\r\n return tail;\r\n}\r\n\r\n/**\r\n * Matches beginning of words supporting non-ASCII languages.\r\n * @param word Filter string\r\n * @param target String being searched\r\n * @param contiguous - If true the filter string must be found \"contiguous\" in the searched string (E.g. \"pul\" will match \"Git: Pull\").\r\n * Otherwise also matches sub string of the word with beginnings of the words in the target (e.g. \"gp\" or \"g p\" will match \"Git: Pull\").\r\n * Useful in cases where the target is words (e.g. command labels)\r\n * @internal @deprecated in 4.3. Use `matchesWords` from @itwin/core-react instead. Though internal, this requires deprecation due to known public usage in @itwin/core-react.\r\n */\r\nexport function matchesWords(word: string, target: string, contiguous: boolean = false): IMatch[] | null {\r\n if (!target || target.length === 0) {\r\n return null;\r\n }\r\n\r\n let result: IMatch[] | null = null;\r\n let i = 0;\r\n\r\n word = word.toLowerCase();\r\n target = target.toLowerCase();\r\n while (i < target.length && (result = _matchesWords(word, target, 0, i, contiguous)) === null) {\r\n i = nextWord(target, i + 1);\r\n }\r\n\r\n return result;\r\n}\r\n\r\nfunction _matchesWords(word: string, target: string, i: number, j: number, contiguous: boolean): IMatch[] | null {\r\n if (i === word.length) {\r\n return [];\r\n } else if (j === target.length) {\r\n return null;\r\n } else if (!charactersMatch(word.charCodeAt(i), target.charCodeAt(j))) {\r\n return null;\r\n } else {\r\n let result: IMatch[] | null = null;\r\n let nextWordIndex = j + 1;\r\n result = _matchesWords(word, target, i + 1, j + 1, contiguous);\r\n // istanbul ignore else\r\n if (!contiguous) {\r\n while (!result && (nextWordIndex = nextWord(target, nextWordIndex)) < target.length) {\r\n result = _matchesWords(word, target, i + 1, nextWordIndex, contiguous);\r\n nextWordIndex++;\r\n }\r\n }\r\n return result === null ? null : join({ start: j, end: j + 1 }, result);\r\n }\r\n}\r\n\r\nfunction nextWord(word: string, start: number): number {\r\n for (let i = start; i < word.length; i++) {\r\n if (isWordSeparator(word.charCodeAt(i)) ||\r\n (i > 0 && isWordSeparator(word.charCodeAt(i - 1)))) {\r\n return i;\r\n }\r\n }\r\n return word.length;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"misc.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/misc.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;GAGG;AACI,MAAM,YAAY,GAAG,CAAC,GAAQ,EAAU,EAAE;IAC/C,IAAI,SAAS,GAAG,EAAE,CAAC;IAEnB,IAAI,GAAG,EAAE,CAAC;QACR,IAAI,GAAG,CAAC,IAAI;YACV,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC;aAClB,CAAC;YACJ,uBAAuB;YACvB,IAAI,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,WAAW,CAAC,IAAI;gBACzC,SAAS,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC;QACrC,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAdW,QAAA,YAAY,gBAcvB","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/** Gets the class name for an object.\n * @internal\n * @deprecated in 4.3. Please use your own implementation in the future. Though internal, this requires deprecation due to known public usage in @itwin/core-react.\n */\nexport const getClassName = (obj: any): string => {\n let className = \"\";\n\n if (obj) {\n if (obj.name)\n className = obj.name;\n else {\n // istanbul ignore else\n if (obj.constructor && obj.constructor.name)\n className = obj.constructor.name;\n }\n }\n\n return className;\n};\n\n"]}
1
+ {"version":3,"file":"misc.js","sourceRoot":"","sources":["../../../../src/appui-abstract/utils/misc.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;GAGG;AACI,MAAM,YAAY,GAAG,CAAC,GAAQ,EAAU,EAAE;IAC/C,IAAI,SAAS,GAAG,EAAE,CAAC;IAEnB,IAAI,GAAG,EAAE,CAAC;QACR,IAAI,GAAG,CAAC,IAAI;YACV,SAAS,GAAG,GAAG,CAAC,IAAI,CAAC;aAClB,CAAC;YACJ,uBAAuB;YACvB,IAAI,GAAG,CAAC,WAAW,IAAI,GAAG,CAAC,WAAW,CAAC,IAAI;gBACzC,SAAS,GAAG,GAAG,CAAC,WAAW,CAAC,IAAI,CAAC;QACrC,CAAC;IACH,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC,CAAC;AAdW,QAAA,YAAY,gBAcvB","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/** Gets the class name for an object.\r\n * @internal\r\n * @deprecated in 4.3. Please use your own implementation in the future. Though internal, this requires deprecation due to known public usage in @itwin/core-react.\r\n */\r\nexport const getClassName = (obj: any): string => {\r\n let className = \"\";\r\n\r\n if (obj) {\r\n if (obj.name)\r\n className = obj.name;\r\n else {\r\n // istanbul ignore else\r\n if (obj.constructor && obj.constructor.name)\r\n className = obj.constructor.name;\r\n }\r\n }\r\n\r\n return className;\r\n};\r\n\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractWidgetProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/AbstractWidgetProps.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 Widget\n */\n\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\nimport { BadgeType } from \"../items/BadgeType\";\nimport { ProvidedItem } from \"../items/ProvidedItem\";\nimport { WidgetState } from \"./WidgetState\";\n\n/** Properties for a Widget.\n * @deprecated in 3.6. Use [Widget]($appui-react) instead.\n * @public\n */\nexport interface AbstractWidgetProps extends ProvidedItem { // eslint-disable-line @typescript-eslint/no-deprecated\n /** Gets the widget content. */\n readonly getWidgetContent: () => any;\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\n readonly icon?: string | ConditionalStringValue;\n /** Id used to uniquely identify the widget.\n * @note It is recommended to provide unique widget id to correctly save/restore App layout.\n */\n readonly id?: string;\n /** Default Widget state. Controls how the Widget is initially displayed. Defaults to WidgetState.Unloaded. */\n readonly defaultState?: WidgetState; // eslint-disable-line @typescript-eslint/no-deprecated\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 readonly label?: string | ConditionalStringValue;\n /** used to explicitly set the tooltip shown by a component. */\n readonly tooltip?: string | ConditionalStringValue;\n /** Indicates whether the Widget is free-form or rectangular. Defaults to false for rectangular. The default is false.\n * @deprecated in 3.0. Free-form widgets are obsolete.\n * */\n readonly isFreeform?: boolean;\n /** Application data attached to the Widget. */\n readonly applicationData?: any;\n /** optional data to used by item implementor. */\n readonly internalData?: Map<string, any>;\n /** Indicates whether this Widget is for the Tool Settings. */\n readonly isToolSettings?: boolean;\n /** Indicates whether this Widget is for the Status Bar. */\n readonly isStatusBar?: boolean;\n /** Indicates whether this Widget should fill the available space in the Zone. */\n readonly fillZone?: boolean;\n /** Indicates if widget can be popped out to a child window. Defaults to false. */\n readonly canPopout?: boolean;\n /** If the widget state is changed to `floating` and the floatingContainerId is defined, the widget will be added to a\n * floating panel by that name. If no name is specified, a GUID is used. */\n readonly floatingContainerId?: string;\n /** Indicates if widget can be in floating state, default to true. */\n readonly isFloatingStateSupported?: boolean;\n /** Indicates if floating widget is resizable, defaults to false which caused the widget to be auto-sized.. */\n readonly isFloatingStateWindowResizable?: boolean;\n /** Defines that default Top Left position when widget is floated via API calls */\n readonly defaultFloatingPosition?: { x: number, y: number };\n /** Widget priority */\n readonly priority?: number;\n /** Defines the SyncUi event Ids that will trigger the stateFunc to run to determine the state of the widget. */\n readonly syncEventIds?: string[];\n /** Function executed to determine the state of the widget.\n * Used by UI 1.0 widgets ONLY.\n * @deprecated in 3.3. UI 1.0 support will be removed in AppUi 4.0.\n */\n readonly stateFunc?: (state: Readonly<WidgetState>) => WidgetState; // eslint-disable-line @typescript-eslint/no-deprecated\n /** Badge to be overlaid on the widget tab. */\n readonly badgeType?: BadgeType;\n /** Handler for widget state changed event */\n readonly onWidgetStateChanged?: () => void;\n /** Save transient DOM state (i.e. scroll offset). */\n readonly saveTransientState?: () => void;\n /** Restore transient DOM state.\n * @note Return true if the state is restored or the Widget will remount.\n */\n readonly restoreTransientState?: () => boolean;\n /** Optional default size to use when floating a widget. If not specified then the default is to size to content if possible.\n * Certain widget can't be intrinsically sized and must specify a content. These are typically ones that use a canvas element\n * internally. */\n defaultFloatingSize?: { width: number, height: number };\n /** Optional prop that tells the widget system to fade this widget out with the rest of the UI when it is in floating state */\n hideWithUiWhenFloating?: boolean;\n /** Optional prop specifying which Panel sides can be docking targets for this widget. If this prop is not specified, all sides are allowed.\n * An empty array is treated the same as an undefined prop, allowing all targets. */\n readonly allowedPanelTargets?: ReadonlyArray<\"left\"|\"right\"|\"bottom\"|\"top\">;\n}\n"]}
1
+ {"version":3,"file":"AbstractWidgetProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/AbstractWidgetProps.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 Widget\r\n */\r\n\r\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\r\nimport { BadgeType } from \"../items/BadgeType\";\r\nimport { ProvidedItem } from \"../items/ProvidedItem\";\r\nimport { WidgetState } from \"./WidgetState\";\r\n\r\n/** Properties for a Widget.\r\n * @deprecated in 3.6. Use [Widget]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface AbstractWidgetProps extends ProvidedItem { // eslint-disable-line @typescript-eslint/no-deprecated\r\n /** Gets the widget content. */\r\n readonly getWidgetContent: () => any;\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 /** Id used to uniquely identify the widget.\r\n * @note It is recommended to provide unique widget id to correctly save/restore App layout.\r\n */\r\n readonly id?: string;\r\n /** Default Widget state. Controls how the Widget is initially displayed. Defaults to WidgetState.Unloaded. */\r\n readonly defaultState?: WidgetState; // eslint-disable-line @typescript-eslint/no-deprecated\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 readonly label?: string | ConditionalStringValue;\r\n /** used to explicitly set the tooltip shown by a component. */\r\n readonly tooltip?: string | ConditionalStringValue;\r\n /** Indicates whether the Widget is free-form or rectangular. Defaults to false for rectangular. The default is false.\r\n * @deprecated in 3.0. Free-form widgets are obsolete.\r\n * */\r\n readonly isFreeform?: boolean;\r\n /** Application data attached to the Widget. */\r\n readonly applicationData?: any;\r\n /** optional data to used by item implementor. */\r\n readonly internalData?: Map<string, any>;\r\n /** Indicates whether this Widget is for the Tool Settings. */\r\n readonly isToolSettings?: boolean;\r\n /** Indicates whether this Widget is for the Status Bar. */\r\n readonly isStatusBar?: boolean;\r\n /** Indicates whether this Widget should fill the available space in the Zone. */\r\n readonly fillZone?: boolean;\r\n /** Indicates if widget can be popped out to a child window. Defaults to false. */\r\n readonly canPopout?: boolean;\r\n /** If the widget state is changed to `floating` and the floatingContainerId is defined, the widget will be added to a\r\n * floating panel by that name. If no name is specified, a GUID is used. */\r\n readonly floatingContainerId?: string;\r\n /** Indicates if widget can be in floating state, default to true. */\r\n readonly isFloatingStateSupported?: boolean;\r\n /** Indicates if floating widget is resizable, defaults to false which caused the widget to be auto-sized.. */\r\n readonly isFloatingStateWindowResizable?: boolean;\r\n /** Defines that default Top Left position when widget is floated via API calls */\r\n readonly defaultFloatingPosition?: { x: number, y: number };\r\n /** Widget priority */\r\n readonly priority?: number;\r\n /** Defines the SyncUi event Ids that will trigger the stateFunc to run to determine the state of the widget. */\r\n readonly syncEventIds?: string[];\r\n /** Function executed to determine the state of the widget.\r\n * Used by UI 1.0 widgets ONLY.\r\n * @deprecated in 3.3. UI 1.0 support will be removed in AppUi 4.0.\r\n */\r\n readonly stateFunc?: (state: Readonly<WidgetState>) => WidgetState; // eslint-disable-line @typescript-eslint/no-deprecated\r\n /** Badge to be overlaid on the widget tab. */\r\n readonly badgeType?: BadgeType;\r\n /** Handler for widget state changed event */\r\n readonly onWidgetStateChanged?: () => void;\r\n /** Save transient DOM state (i.e. scroll offset). */\r\n readonly saveTransientState?: () => void;\r\n /** Restore transient DOM state.\r\n * @note Return true if the state is restored or the Widget will remount.\r\n */\r\n readonly restoreTransientState?: () => boolean;\r\n /** Optional default size to use when floating a widget. If not specified then the default is to size to content if possible.\r\n * Certain widget can't be intrinsically sized and must specify a content. These are typically ones that use a canvas element\r\n * internally. */\r\n defaultFloatingSize?: { width: number, height: number };\r\n /** Optional prop that tells the widget system to fade this widget out with the rest of the UI when it is in floating state */\r\n hideWithUiWhenFloating?: boolean;\r\n /** Optional prop specifying which Panel sides can be docking targets for this widget. If this prop is not specified, all sides are allowed.\r\n * An empty array is treated the same as an undefined prop, allowing all targets. */\r\n readonly allowedPanelTargets?: ReadonlyArray<\"left\"|\"right\"|\"bottom\"|\"top\">;\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"StagePanel.js","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/StagePanel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,2EAAc,CAAA;IACd,6EAAe,CAAA;IACf,2EAAc,CAAA;IACd,6EAAe,CAAA;AACjB,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B;AAED;;;GAGG;AACH,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,2DAAS,CAAA;IACT,sEAAsE;IACtE,mEAAO,CAAA;IACP,6DAAI,CAAA;IACJ,+DAAK,CAAA;IACL,iEAAM,CAAA;IACN,sEAAsE;IACtE,yEAAU,CAAA;AACZ,CAAC,EATW,kBAAkB,kCAAlB,kBAAkB,QAS7B;AAED;;;GAGG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,2DAAK,CAAA;IACL,mGAAmG;IACnG,6DAAM,CAAA;IACN,uDAAG,CAAA;AACL,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B","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 Widget\n */\n\n/** Enum for AppUi 1 `Zone` locations that can have widgets added to them at run-time via [[UiItemsProvider]].\n * @public @deprecated in 3.0. UI 1.0 support will be removed in AppUi 4.0.\n */\nexport enum AbstractZoneLocation {\n CenterLeft = 4,\n CenterRight = 6,\n BottomLeft = 7,\n BottomRight = 9,\n}\n\n/** Available Stage Panel locations.\n * @deprecated in 3.6. Use [StagePanelLocation]($appui-react) instead.\n * @public\n */\nexport enum StagePanelLocation {\n Top = 101,\n /** @deprecated in 3.6 UI 1.0 support will be removed in AppUi 4.0. */\n TopMost,\n Left,\n Right,\n Bottom,\n /** @deprecated in 3.6 UI 1.0 support will be removed in AppUi 4.0. */\n BottomMost,\n}\n\n/** Enum for Stage Panel Sections\n * @deprecated in 3.6. Use [StagePanelSection]($appui-react) instead.\n * @public\n */\nexport enum StagePanelSection {\n Start,\n /** @deprecated in 3.2. - all widgets that a targeted for Middle will be placed in `End` section */\n Middle,\n End,\n}\n"]}
1
+ {"version":3,"file":"StagePanel.js","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/StagePanel.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;GAEG;AACH,IAAY,oBAKX;AALD,WAAY,oBAAoB;IAC9B,2EAAc,CAAA;IACd,6EAAe,CAAA;IACf,2EAAc,CAAA;IACd,6EAAe,CAAA;AACjB,CAAC,EALW,oBAAoB,oCAApB,oBAAoB,QAK/B;AAED;;;GAGG;AACH,IAAY,kBASX;AATD,WAAY,kBAAkB;IAC5B,2DAAS,CAAA;IACT,sEAAsE;IACtE,mEAAO,CAAA;IACP,6DAAI,CAAA;IACJ,+DAAK,CAAA;IACL,iEAAM,CAAA;IACN,sEAAsE;IACtE,yEAAU,CAAA;AACZ,CAAC,EATW,kBAAkB,kCAAlB,kBAAkB,QAS7B;AAED;;;GAGG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,2DAAK,CAAA;IACL,mGAAmG;IACnG,6DAAM,CAAA;IACN,uDAAG,CAAA;AACL,CAAC,EALW,iBAAiB,iCAAjB,iBAAiB,QAK5B","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 Widget\r\n */\r\n\r\n/** Enum for AppUi 1 `Zone` locations that can have widgets added to them at run-time via [[UiItemsProvider]].\r\n * @public @deprecated in 3.0. UI 1.0 support will be removed in AppUi 4.0.\r\n */\r\nexport enum AbstractZoneLocation {\r\n CenterLeft = 4,\r\n CenterRight = 6,\r\n BottomLeft = 7,\r\n BottomRight = 9,\r\n}\r\n\r\n/** Available Stage Panel locations.\r\n * @deprecated in 3.6. Use [StagePanelLocation]($appui-react) instead.\r\n * @public\r\n */\r\nexport enum StagePanelLocation {\r\n Top = 101,\r\n /** @deprecated in 3.6 UI 1.0 support will be removed in AppUi 4.0. */\r\n TopMost,\r\n Left,\r\n Right,\r\n Bottom,\r\n /** @deprecated in 3.6 UI 1.0 support will be removed in AppUi 4.0. */\r\n BottomMost,\r\n}\r\n\r\n/** Enum for Stage Panel Sections\r\n * @deprecated in 3.6. Use [StagePanelSection]($appui-react) instead.\r\n * @public\r\n */\r\nexport enum StagePanelSection {\r\n Start,\r\n /** @deprecated in 3.2. - all widgets that a targeted for Middle will be placed in `End` section */\r\n Middle,\r\n End,\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"WidgetState.js","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/WidgetState.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;GAGG;AACH,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,oEAAoE;IACpE,6CAAI,CAAA;IACJ,6DAA6D;IAC7D,iDAAM,CAAA;IACN,8CAA8C;IAC9C,iDAAM,CAAA;IACN,gFAAgF;IAChF,qDAAQ,CAAA;IACR,4DAA4D;IAC5D,qDAAQ,CAAA;AACV,CAAC,EAXW,WAAW,2BAAX,WAAW,QAWtB","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 Widget\n */\n\n/** Widget state enum.\n * @deprecated in 3.6. Use [WidgetState]($appui-react) instead.\n * @public\n */\nexport enum WidgetState {\n /** Widget tab is visible and active and its contents are visible */\n Open,\n /** Widget tab is visible but its contents are not visible */\n Closed,\n /** Widget tab nor its contents are visible */\n Hidden,\n /** Widget tab is in a 'floating' state and is not docked in zone's tab stack */\n Floating,\n /** Widget tab is visible but its contents are not loaded */\n Unloaded,\n}\n"]}
1
+ {"version":3,"file":"WidgetState.js","sourceRoot":"","sources":["../../../../src/appui-abstract/widget/WidgetState.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH;;;GAGG;AACH,IAAY,WAWX;AAXD,WAAY,WAAW;IACrB,oEAAoE;IACpE,6CAAI,CAAA;IACJ,6DAA6D;IAC7D,iDAAM,CAAA;IACN,8CAA8C;IAC9C,iDAAM,CAAA;IACN,gFAAgF;IAChF,qDAAQ,CAAA;IACR,4DAA4D;IAC5D,qDAAQ,CAAA;AACV,CAAC,EAXW,WAAW,2BAAX,WAAW,QAWtB","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 Widget\r\n */\r\n\r\n/** Widget state enum.\r\n * @deprecated in 3.6. Use [WidgetState]($appui-react) instead.\r\n * @public\r\n */\r\nexport enum WidgetState {\r\n /** Widget tab is visible and active and its contents are visible */\r\n Open,\r\n /** Widget tab is visible but its contents are not visible */\r\n Closed,\r\n /** Widget tab nor its contents are visible */\r\n Hidden,\r\n /** Widget tab is in a 'floating' state and is not docked in zone's tab stack */\r\n Floating,\r\n /** Widget tab is visible but its contents are not loaded */\r\n Unloaded,\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"appui-abstract.js","sourceRoot":"","sources":["../../src/appui-abstract.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;AAE/F,uEAAqD;AACrD,2DAAyC;AACzC,kEAAgD;AAChD,mEAAiD;AAEjD,2EAAyD;AACzD,mFAAiE;AAEjE,sEAAoD;AAEpD,8EAA4D;AAC5D,kFAAgE;AAEhE,sEAAoD;AACpD,gFAA8D;AAC9D,0EAAwD;AAExD,2EAAyD;AACzD,+EAA6D;AAC7D,8EAA4D;AAC5D,mEAAiD;AACjD,iFAA+D;AAC/D,gFAA8D;AAC9D,sEAAoD;AACpD,0EAAwD;AACxD,oEAAkD;AAElD,iFAA+D;AAC/D,gFAA8D;AAE9D,0EAAwD;AACxD,2EAAyD;AACzD,6EAA2D;AAC3D,qEAAmD;AACnD,kFAAgE;AAChE,gFAA8D;AAC9D,oEAAkD;AAElD,oFAAkE;AAClE,2EAAyD;AACzD,mFAAiE;AAEjE,wEAAsD;AACtD,gFAA8D;AAE9D,2EAAyD;AACzD,mFAAiE;AAEjE,mEAAiD;AACjD,8DAA4C;AAC5C,2EAAyD;AACzD,oEAAkD;AAClD,iEAA+C;AAC/C,2EAAyD;AACzD,iEAA+C;AAC/C,wEAAsD;AAEtD,8EAA4D;AAC5D,qEAAmD;AACnD,sEAAoD;AAEpD;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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\nexport * from \"./appui-abstract/BaseUiItemsProvider\";\nexport * from \"./appui-abstract/UiAdmin\";\nexport * from \"./appui-abstract/UiItemsManager\";\nexport * from \"./appui-abstract/UiItemsProvider\";\n\nexport * from \"./appui-abstract/backstage/BackstageItem\";\nexport * from \"./appui-abstract/backstage/BackstageItemsManager\";\n\nexport * from \"./appui-abstract/common/KeyboardKey\";\n\nexport * from \"./appui-abstract/content/ContentLayoutProps\";\nexport * from \"./appui-abstract/content/StandardContentLayouts\";\n\nexport * from \"./appui-abstract/dialogs/DialogItem\";\nexport * from \"./appui-abstract/dialogs/UiLayoutDataProvider\";\nexport * from \"./appui-abstract/dialogs/UiDataProvider\";\n\nexport * from \"./appui-abstract/items/AbstractItemProps\";\nexport * from \"./appui-abstract/items/AbstractMenuItemProps\";\nexport * from \"./appui-abstract/items/AbstractToolbarProps\";\nexport * from \"./appui-abstract/items/BadgeType\";\nexport * from \"./appui-abstract/items/ConditionalBooleanValue\";\nexport * from \"./appui-abstract/items/ConditionalStringValue\";\nexport * from \"./appui-abstract/items/ProvidedItem\";\nexport * from \"./appui-abstract/items/RelativePosition\";\nexport * from \"./appui-abstract/items/StageUsage\";\n\nexport * from \"./appui-abstract/notification/MessagePresenter\";\nexport * from \"./appui-abstract/notification/MessageSeverity\";\n\nexport * from \"./appui-abstract/properties/Description\";\nexport * from \"./appui-abstract/properties/EditorParams\";\nexport * from \"./appui-abstract/properties/PrimitiveTypes\";\nexport * from \"./appui-abstract/properties/Record\";\nexport * from \"./appui-abstract/properties/StandardEditorNames\";\nexport * from \"./appui-abstract/properties/StandardTypeNames\";\nexport * from \"./appui-abstract/properties/Value\";\n\nexport * from \"./appui-abstract/quantity/BaseQuantityDescription\";\nexport * from \"./appui-abstract/statusbar/StatusBarItem\";\nexport * from \"./appui-abstract/statusbar/StatusBarItemsManager\";\n\nexport * from \"./appui-abstract/toolbars/ToolbarItem\";\nexport * from \"./appui-abstract/toolbars/ToolbarItemsManager\";\n\nexport * from \"./appui-abstract/statusbar/StatusBarItem\";\nexport * from \"./appui-abstract/statusbar/StatusBarItemsManager\";\n\nexport * from \"./appui-abstract/utils/callbacks\";\nexport * from \"./appui-abstract/utils/misc\";\nexport * from \"./appui-abstract/utils/IconSpecUtilities\";\nexport * from \"./appui-abstract/utils/PointProps\";\nexport * from \"./appui-abstract/utils/UiError\";\nexport * from \"./appui-abstract/utils/UiEventDispatcher\";\nexport * from \"./appui-abstract/utils/UiEvent\";\nexport * from \"./appui-abstract/utils/filter/filters\";\n\nexport * from \"./appui-abstract/widget/AbstractWidgetProps\";\nexport * from \"./appui-abstract/widget/StagePanel\";\nexport * from \"./appui-abstract/widget/WidgetState\";\n\n/** @docs-package-description\n * The appui-abstract package contains abstractions for UI controls, such as toolbars, buttons and menus.\n * For more information, see [UI]($docs/ui/index.md).\n */\n/**\n * @docs-group-description Backstage\n * Abstractions used by appui-react package to create and manage the display Backstage menu items.\n */\n/**\n * @docs-group-description ContentView\n * Classes and interfaces used with Content Layouts.\n */\n/**\n * @docs-group-description Dialog\n * Interfaces and classes for generating UI items for Dialogs.\n */\n/**\n * @docs-group-description Item\n * Classes for working with an Item in a Toolbar, Widget, Backstage or Context Menu\n */\n/**\n * @docs-group-description Notification\n * Interfaces and enums for working with a message\n */\n/**\n * @docs-group-description Properties\n * Properties system for data input and formatting.\n */\n/**\n * @docs-group-description StatusBar\n * Classes for creating and managing items in the status bar.\n */\n/**\n * @docs-group-description Toolbar\n * Classes for creating and managing items in a toolbar.\n */\n/**\n * @docs-group-description UiAdmin\n * Abstractions for UI controls, such as toolbars, buttons and menus and are callable from IModelApp.uiAdmin in core-frontend.\n */\n/**\n * @docs-group-description UiItemsProvider\n * Interface for specifying UI items to be inserted at runtime.\n */\n/**\n * @docs-group-description Utilities\n * Various utility classes for working with a UI.\n */\n/**\n * @docs-group-description Widget\n * Classes for creating and providing Widgets.\n */\n"]}
1
+ {"version":3,"file":"appui-abstract.js","sourceRoot":"","sources":["../../src/appui-abstract.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;;;;;;;;;;;;;;;;AAE/F,uEAAqD;AACrD,2DAAyC;AACzC,kEAAgD;AAChD,mEAAiD;AAEjD,2EAAyD;AACzD,mFAAiE;AAEjE,sEAAoD;AAEpD,8EAA4D;AAC5D,kFAAgE;AAEhE,sEAAoD;AACpD,gFAA8D;AAC9D,0EAAwD;AAExD,2EAAyD;AACzD,+EAA6D;AAC7D,8EAA4D;AAC5D,mEAAiD;AACjD,iFAA+D;AAC/D,gFAA8D;AAC9D,sEAAoD;AACpD,0EAAwD;AACxD,oEAAkD;AAElD,iFAA+D;AAC/D,gFAA8D;AAE9D,0EAAwD;AACxD,2EAAyD;AACzD,6EAA2D;AAC3D,qEAAmD;AACnD,kFAAgE;AAChE,gFAA8D;AAC9D,oEAAkD;AAElD,oFAAkE;AAClE,2EAAyD;AACzD,mFAAiE;AAEjE,wEAAsD;AACtD,gFAA8D;AAE9D,2EAAyD;AACzD,mFAAiE;AAEjE,mEAAiD;AACjD,8DAA4C;AAC5C,2EAAyD;AACzD,oEAAkD;AAClD,iEAA+C;AAC/C,2EAAyD;AACzD,iEAA+C;AAC/C,wEAAsD;AAEtD,8EAA4D;AAC5D,qEAAmD;AACnD,sEAAoD;AAEpD;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG;AACH;;;GAGG","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\r\nexport * from \"./appui-abstract/BaseUiItemsProvider\";\r\nexport * from \"./appui-abstract/UiAdmin\";\r\nexport * from \"./appui-abstract/UiItemsManager\";\r\nexport * from \"./appui-abstract/UiItemsProvider\";\r\n\r\nexport * from \"./appui-abstract/backstage/BackstageItem\";\r\nexport * from \"./appui-abstract/backstage/BackstageItemsManager\";\r\n\r\nexport * from \"./appui-abstract/common/KeyboardKey\";\r\n\r\nexport * from \"./appui-abstract/content/ContentLayoutProps\";\r\nexport * from \"./appui-abstract/content/StandardContentLayouts\";\r\n\r\nexport * from \"./appui-abstract/dialogs/DialogItem\";\r\nexport * from \"./appui-abstract/dialogs/UiLayoutDataProvider\";\r\nexport * from \"./appui-abstract/dialogs/UiDataProvider\";\r\n\r\nexport * from \"./appui-abstract/items/AbstractItemProps\";\r\nexport * from \"./appui-abstract/items/AbstractMenuItemProps\";\r\nexport * from \"./appui-abstract/items/AbstractToolbarProps\";\r\nexport * from \"./appui-abstract/items/BadgeType\";\r\nexport * from \"./appui-abstract/items/ConditionalBooleanValue\";\r\nexport * from \"./appui-abstract/items/ConditionalStringValue\";\r\nexport * from \"./appui-abstract/items/ProvidedItem\";\r\nexport * from \"./appui-abstract/items/RelativePosition\";\r\nexport * from \"./appui-abstract/items/StageUsage\";\r\n\r\nexport * from \"./appui-abstract/notification/MessagePresenter\";\r\nexport * from \"./appui-abstract/notification/MessageSeverity\";\r\n\r\nexport * from \"./appui-abstract/properties/Description\";\r\nexport * from \"./appui-abstract/properties/EditorParams\";\r\nexport * from \"./appui-abstract/properties/PrimitiveTypes\";\r\nexport * from \"./appui-abstract/properties/Record\";\r\nexport * from \"./appui-abstract/properties/StandardEditorNames\";\r\nexport * from \"./appui-abstract/properties/StandardTypeNames\";\r\nexport * from \"./appui-abstract/properties/Value\";\r\n\r\nexport * from \"./appui-abstract/quantity/BaseQuantityDescription\";\r\nexport * from \"./appui-abstract/statusbar/StatusBarItem\";\r\nexport * from \"./appui-abstract/statusbar/StatusBarItemsManager\";\r\n\r\nexport * from \"./appui-abstract/toolbars/ToolbarItem\";\r\nexport * from \"./appui-abstract/toolbars/ToolbarItemsManager\";\r\n\r\nexport * from \"./appui-abstract/statusbar/StatusBarItem\";\r\nexport * from \"./appui-abstract/statusbar/StatusBarItemsManager\";\r\n\r\nexport * from \"./appui-abstract/utils/callbacks\";\r\nexport * from \"./appui-abstract/utils/misc\";\r\nexport * from \"./appui-abstract/utils/IconSpecUtilities\";\r\nexport * from \"./appui-abstract/utils/PointProps\";\r\nexport * from \"./appui-abstract/utils/UiError\";\r\nexport * from \"./appui-abstract/utils/UiEventDispatcher\";\r\nexport * from \"./appui-abstract/utils/UiEvent\";\r\nexport * from \"./appui-abstract/utils/filter/filters\";\r\n\r\nexport * from \"./appui-abstract/widget/AbstractWidgetProps\";\r\nexport * from \"./appui-abstract/widget/StagePanel\";\r\nexport * from \"./appui-abstract/widget/WidgetState\";\r\n\r\n/** @docs-package-description\r\n * The appui-abstract package contains abstractions for UI controls, such as toolbars, buttons and menus.\r\n * For more information, see [UI]($docs/ui/index.md).\r\n */\r\n/**\r\n * @docs-group-description Backstage\r\n * Abstractions used by appui-react package to create and manage the display Backstage menu items.\r\n */\r\n/**\r\n * @docs-group-description ContentView\r\n * Classes and interfaces used with Content Layouts.\r\n */\r\n/**\r\n * @docs-group-description Dialog\r\n * Interfaces and classes for generating UI items for Dialogs.\r\n */\r\n/**\r\n * @docs-group-description Item\r\n * Classes for working with an Item in a Toolbar, Widget, Backstage or Context Menu\r\n */\r\n/**\r\n * @docs-group-description Notification\r\n * Interfaces and enums for working with a message\r\n */\r\n/**\r\n * @docs-group-description Properties\r\n * Properties system for data input and formatting.\r\n */\r\n/**\r\n * @docs-group-description StatusBar\r\n * Classes for creating and managing items in the status bar.\r\n */\r\n/**\r\n * @docs-group-description Toolbar\r\n * Classes for creating and managing items in a toolbar.\r\n */\r\n/**\r\n * @docs-group-description UiAdmin\r\n * Abstractions for UI controls, such as toolbars, buttons and menus and are callable from IModelApp.uiAdmin in core-frontend.\r\n */\r\n/**\r\n * @docs-group-description UiItemsProvider\r\n * Interface for specifying UI items to be inserted at runtime.\r\n */\r\n/**\r\n * @docs-group-description Utilities\r\n * Various utility classes for working with a UI.\r\n */\r\n/**\r\n * @docs-group-description Widget\r\n * Classes for creating and providing Widgets.\r\n */\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"BaseUiItemsProvider.js","sourceRoot":"","sources":["../../../src/appui-abstract/BaseUiItemsProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,qDAAqD;AACrD;;GAEG;AAOH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;GAIG;AACH,MAAM,OAAO,mBAAmB;IAC9B;;;;;OAKG;IACH,YAAsB,WAAmB,EAAS,gBAAmH;QAA/I,gBAAW,GAAX,WAAW,CAAQ;QAAS,qBAAgB,GAAhB,gBAAgB,CAAmG;IAAI,CAAC;IAE1K,IAAW,EAAE,KAAa,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAC7C,YAAY,KAAW,CAAC;IAExB,UAAU;QACf,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAA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AE,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IACrG,CAAC;IAEM,sBAAsB,CAAC,QAAgB,EAAE,WAAmB,EAAE,SAA6B,EAAE,QAA4B,EAAE,aAAoC,EAAE,aAAmB;QACzL,OAAO,EAAE,CAAC;IACZ,CAAC;IAEM,cAAc,CAAC,OAAe,EAAE,UAAkB,EAAE,QAA4B,EAAE,OAA2B,EAClH,aAAoC,EAAE,YAAkB;QACxD,IAAI,cAAc,GAAG,KAAK,CAAC;QAE3B,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,cAAc,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;QAClF,CAAC;aAAM,CAAC;YACN,cAAc,GAAG,CAAC,UAAU,KAAK,UAAU,CAAC,OAAO,CAAC,CAAC;QACvD,CAAC;QAED,OAAO,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAChI,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/* eslint-disable @typescript-eslint/no-deprecated */\n/** @packageDocumentation\n * @module UiItemsProvider\n */\n\nimport { BackstageItem } from \"./backstage/BackstageItem\";\nimport { CommonStatusBarItem } from \"./statusbar/StatusBarItem\";\nimport { CommonToolbarItem, ToolbarOrientation, ToolbarUsage } from \"./toolbars/ToolbarItem\";\nimport { AbstractWidgetProps } from \"./widget/AbstractWidgetProps\";\nimport { AbstractZoneLocation, StagePanelLocation, StagePanelSection } from \"./widget/StagePanel\";\nimport { StageUsage } from \"./items/StageUsage\";\nimport { UiItemsProvider } from \"./UiItemsProvider\";\nimport { UiItemsManager } from \"./UiItemsManager\";\n\n/** Base implementation of a UiItemsProvider. The base class allows the user to pass in a function that is used to determine if the\n * active stage should be provided items. Derived provider classes should override the `xxxInternal` methods to provide items.\n * @deprecated in 3.6. Use [BaseUiItemsProvider]($appui-react) instead.\n * @public\n */\nexport class BaseUiItemsProvider implements UiItemsProvider {\n /*\n * @param providerId - unique identifier for this instance of the provider. This is required in case separate packages want\n * to set up custom stage with their own subset of standard tools.\n * @param isSupportedStage - optional function that will be called to determine if tools should be added to current stage. If not set and\n * the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.\n */\n constructor(protected _providerId: string, public isSupportedStage?: (stageId: string, stageUsage: string, stageAppData?: any, provider?: UiItemsProvider) => boolean) { }\n\n public get id(): string { return this._providerId; }\n public onUnregister(): void { }\n\n public unregister() {\n UiItemsManager.unregister(this._providerId);\n }\n\n /** Backstage items are not stage specific so no callback is used */\n public provideBackstageItems(): BackstageItem[] {\n return [];\n }\n\n public provideToolbarButtonItemsInternal(_stageId: string, _stageUsage: string, _toolbarUsage: ToolbarUsage, _toolbarOrientation: ToolbarOrientation, _stageAppData?: any): CommonToolbarItem[] {\n return [];\n }\n public provideToolbarButtonItems(stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage, toolbarOrientation: ToolbarOrientation, stageAppData?: any): CommonToolbarItem[] {\n let provideToStage = false;\n\n if (this.isSupportedStage) {\n provideToStage = this.isSupportedStage(stageId, stageUsage, stageAppData, this);\n } else {\n provideToStage = (stageUsage === StageUsage.General);\n }\n\n return provideToStage ? this.provideToolbarButtonItemsInternal(stageId, stageUsage, toolbarUsage, toolbarOrientation, stageAppData) : [];\n }\n\n public provideStatusBarItemsInternal(_stageId: string, _stageUsage: string, _stageAppData?: any): CommonStatusBarItem[] {\n return [];\n }\n public provideStatusBarItems(stageId: string, stageUsage: string, stageAppData?: any): CommonStatusBarItem[] {\n let provideToStage = false;\n\n if (this.isSupportedStage) {\n provideToStage = this.isSupportedStage(stageId, stageUsage, stageAppData, this);\n } else {\n provideToStage = (stageUsage === StageUsage.General);\n }\n\n return provideToStage ? this.provideStatusBarItemsInternal(stageId, stageUsage, stageAppData) : [];\n }\n\n public provideWidgetsInternal(_stageId: string, _stageUsage: string, _location: StagePanelLocation, _section?: StagePanelSection, _zoneLocation?: AbstractZoneLocation, _stageAppData?: any): AbstractWidgetProps[] {\n return [];\n }\n\n public provideWidgets(stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection,\n _zoneLocation?: AbstractZoneLocation, stageAppData?: any): ReadonlyArray<AbstractWidgetProps> {\n let provideToStage = false;\n\n if (this.isSupportedStage) {\n provideToStage = this.isSupportedStage(stageId, stageUsage, stageAppData, this);\n } else {\n provideToStage = (stageUsage === StageUsage.General);\n }\n\n return provideToStage ? this.provideWidgetsInternal(stageId, stageUsage, location, section, _zoneLocation, stageAppData) : [];\n }\n}\n"]}
1
+ {"version":3,"file":"BaseUiItemsProvider.js","sourceRoot":"","sources":["../../../src/appui-abstract/BaseUiItemsProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F,qDAAqD;AACrD;;GAEG;AAOH,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAEhD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD;;;;GAIG;AACH,MAAM,OAAO,mBAAmB;IAC9B;;;;;OAKG;IACH,YAAsB,WAAmB,EAAS,gBAAmH;QAA/I,gBAAW,GAAX,WAAW,CAAQ;QAAS,qBAAgB,GAAhB,gBAAgB,CAAmG;IAAI,CAAC;IAE1K,IAAW,EAAE,KAAa,OAAO,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;IAC7C,YAAY,KAAW,CAAC;IAExB,UAAU;QACf,cAAc,CAAC,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;IAC9C,CAAC;IAED,oEAAoE;IAC7D,qBAAqB;QAC1B,OAAO,EAAE,CAAC;IACZ,CA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CAAC,QAAgB,EAAE,WAAmB,EAAE,SAA6B,EAAE,QAA4B,EAAE,aAAoC,EAAE,aAAmB;QACzL,OAAO,EAAE,CAAC;IACZ,CAAC;IAEM,cAAc,CAAC,OAAe,EAAE,UAAkB,EAAE,QAA4B,EAAE,OAA2B,EAClH,aAAoC,EAAE,YAAkB;QACxD,IAAI,cAAc,GAAG,KAAK,CAAC;QAE3B,IAAI,IAAI,CAAC,gBAAgB,EAAE,CAAC;YAC1B,cAAc,GAAG,IAAI,CAAC,gBAAgB,CAAC,OAAO,EAAE,UAAU,EAAE,YAAY,EAAE,IAAI,CAAC,CAAC;QAClF,CAAC;aAAM,CAAC;YACN,cAAc,GAAG,CAAC,UAAU,KAAK,UAAU,CAAC,OAAO,CAAC,CAAC;QACvD,CAAC;QAED,OAAO,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,sBAAsB,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC;IAChI,CAAC;CACF","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 { 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 { StageUsage } from \"./items/StageUsage\";\r\nimport { UiItemsProvider } from \"./UiItemsProvider\";\r\nimport { UiItemsManager } from \"./UiItemsManager\";\r\n\r\n/** Base implementation of a UiItemsProvider. The base class allows the user to pass in a function that is used to determine if the\r\n * active stage should be provided items. Derived provider classes should override the `xxxInternal` methods to provide items.\r\n * @deprecated in 3.6. Use [BaseUiItemsProvider]($appui-react) instead.\r\n * @public\r\n */\r\nexport class BaseUiItemsProvider implements UiItemsProvider {\r\n /*\r\n * @param providerId - unique identifier for this instance of the provider. This is required in case separate packages want\r\n * to set up custom stage with their own subset of standard tools.\r\n * @param isSupportedStage - optional function that will be called to determine if tools should be added to current stage. If not set and\r\n * the current stage's `usage` is set to `StageUsage.General` then the provider will add items to frontstage.\r\n */\r\n constructor(protected _providerId: string, public isSupportedStage?: (stageId: string, stageUsage: string, stageAppData?: any, provider?: UiItemsProvider) => boolean) { }\r\n\r\n public get id(): string { return this._providerId; }\r\n public onUnregister(): void { }\r\n\r\n public unregister() {\r\n UiItemsManager.unregister(this._providerId);\r\n }\r\n\r\n /** Backstage items are not stage specific so no callback is used */\r\n public provideBackstageItems(): BackstageItem[] {\r\n return [];\r\n }\r\n\r\n public provideToolbarButtonItemsInternal(_stageId: string, _stageUsage: string, _toolbarUsage: ToolbarUsage, _toolbarOrientation: ToolbarOrientation, _stageAppData?: any): CommonToolbarItem[] {\r\n return [];\r\n }\r\n public provideToolbarButtonItems(stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage, toolbarOrientation: ToolbarOrientation, stageAppData?: any): CommonToolbarItem[] {\r\n let provideToStage = false;\r\n\r\n if (this.isSupportedStage) {\r\n provideToStage = this.isSupportedStage(stageId, stageUsage, stageAppData, this);\r\n } else {\r\n provideToStage = (stageUsage === StageUsage.General);\r\n }\r\n\r\n return provideToStage ? this.provideToolbarButtonItemsInternal(stageId, stageUsage, toolbarUsage, toolbarOrientation, stageAppData) : [];\r\n }\r\n\r\n public provideStatusBarItemsInternal(_stageId: string, _stageUsage: string, _stageAppData?: any): CommonStatusBarItem[] {\r\n return [];\r\n }\r\n public provideStatusBarItems(stageId: string, stageUsage: string, stageAppData?: any): CommonStatusBarItem[] {\r\n let provideToStage = false;\r\n\r\n if (this.isSupportedStage) {\r\n provideToStage = this.isSupportedStage(stageId, stageUsage, stageAppData, this);\r\n } else {\r\n provideToStage = (stageUsage === StageUsage.General);\r\n }\r\n\r\n return provideToStage ? this.provideStatusBarItemsInternal(stageId, stageUsage, stageAppData) : [];\r\n }\r\n\r\n public provideWidgetsInternal(_stageId: string, _stageUsage: string, _location: StagePanelLocation, _section?: StagePanelSection, _zoneLocation?: AbstractZoneLocation, _stageAppData?: any): AbstractWidgetProps[] {\r\n return [];\r\n }\r\n\r\n public provideWidgets(stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection,\r\n _zoneLocation?: AbstractZoneLocation, stageAppData?: any): ReadonlyArray<AbstractWidgetProps> {\r\n let provideToStage = false;\r\n\r\n if (this.isSupportedStage) {\r\n provideToStage = this.isSupportedStage(stageId, stageUsage, stageAppData, this);\r\n } else {\r\n provideToStage = (stageUsage === StageUsage.General);\r\n }\r\n\r\n return provideToStage ? this.provideWidgetsInternal(stageId, stageUsage, location, section, _zoneLocation, stageAppData) : [];\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"UiAdmin.js","sourceRoot":"","sources":["../../../src/appui-abstract/UiAdmin.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AA+C7E;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,SAA6B;CAAI;AAUrE;;GAEG;AACH,MAAM,OAAO,OAAO;IAApB;QACU,kBAAa,GAAY,EAAE,CAAC;IAqPtC,CAAC;IAlPC,qDAAqD;IAC9C,MAAM,KAAK,gBAAgB;QAChC,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC;YAC/B,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,aAAa,CAAC,KAAK,EAAE,kCAAkC,CAA6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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;aACC,qBAAgB,GAAG,IAAI,cAAc,EAAE,AAAvB,CAAwB;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","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,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AA+C7E;;GAEG;AACH,MAAM,OAAO,cAAe,SAAQ,SAA6B;CAAI;AAUrE;;GAEG;AACH,MAAM,OAAO,OAAO;IAApB;QACU,kBAAa,GAAY,EAAE,CAAC;IAqPtC,CAAC;IAlPC,qDAAqD;IAC9C,MAAM,KAAK,gBAAgB;QAChC,IAAI,CAAC,OAAO,CAAC,iBAAiB,EAAE,CAAC;YAC/B,MAAM,KAAK,GAAG,IAAI,YAAY,CAAC,aAAa,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,aAAa,KAAK,CAAC;IAE1B,uCAAuC;IACvC,IAAW,cAAc,KAAY,OAAO,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAE7D;;MAEE;IACK,WAAW,CAAC,CAAS,EAAE,CAAS,IAAW,OAAO,EAAE,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Ac,EAAE,AAAvB,CAAwB;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","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"]}