@itwin/appui-abstract 4.0.0-dev.52 → 4.0.0-dev.54

Sign up to get free protection for your applications and to get access to all the features.
Files changed (327) hide show
  1. package/lib/cjs/appui-abstract/BaseUiItemsProvider.d.ts +30 -30
  2. package/lib/cjs/appui-abstract/BaseUiItemsProvider.d.ts.map +1 -1
  3. package/lib/cjs/appui-abstract/BaseUiItemsProvider.js +79 -79
  4. package/lib/cjs/appui-abstract/BaseUiItemsProvider.js.map +1 -1
  5. package/lib/cjs/appui-abstract/UiAdmin.d.ts +221 -221
  6. package/lib/cjs/appui-abstract/UiAdmin.js +224 -224
  7. package/lib/cjs/appui-abstract/UiAdmin.js.map +1 -1
  8. package/lib/cjs/appui-abstract/UiItemsManager.d.ts +113 -113
  9. package/lib/cjs/appui-abstract/UiItemsManager.d.ts.map +1 -1
  10. package/lib/cjs/appui-abstract/UiItemsManager.js +193 -193
  11. package/lib/cjs/appui-abstract/UiItemsManager.js.map +1 -1
  12. package/lib/cjs/appui-abstract/UiItemsProvider.d.ts +29 -29
  13. package/lib/cjs/appui-abstract/UiItemsProvider.js +9 -9
  14. package/lib/cjs/appui-abstract/UiItemsProvider.js.map +1 -1
  15. package/lib/cjs/appui-abstract/backstage/BackstageItem.d.ts +91 -91
  16. package/lib/cjs/appui-abstract/backstage/BackstageItem.d.ts.map +1 -1
  17. package/lib/cjs/appui-abstract/backstage/BackstageItem.js +70 -70
  18. package/lib/cjs/appui-abstract/backstage/BackstageItem.js.map +1 -1
  19. package/lib/cjs/appui-abstract/backstage/BackstageItemsManager.d.ts +38 -38
  20. package/lib/cjs/appui-abstract/backstage/BackstageItemsManager.js +133 -133
  21. package/lib/cjs/appui-abstract/backstage/BackstageItemsManager.js.map +1 -1
  22. package/lib/cjs/appui-abstract/common/KeyboardKey.d.ts +51 -51
  23. package/lib/cjs/appui-abstract/common/KeyboardKey.js +63 -63
  24. package/lib/cjs/appui-abstract/common/KeyboardKey.js.map +1 -1
  25. package/lib/cjs/appui-abstract/content/ContentLayoutProps.d.ts +62 -62
  26. package/lib/cjs/appui-abstract/content/ContentLayoutProps.js +9 -9
  27. package/lib/cjs/appui-abstract/content/ContentLayoutProps.js.map +1 -1
  28. package/lib/cjs/appui-abstract/content/StandardContentLayouts.d.ts +19 -19
  29. package/lib/cjs/appui-abstract/content/StandardContentLayouts.js +108 -108
  30. package/lib/cjs/appui-abstract/content/StandardContentLayouts.js.map +1 -1
  31. package/lib/cjs/appui-abstract/dialogs/DialogItem.d.ts +76 -76
  32. package/lib/cjs/appui-abstract/dialogs/DialogItem.js +67 -67
  33. package/lib/cjs/appui-abstract/dialogs/DialogItem.js.map +1 -1
  34. package/lib/cjs/appui-abstract/dialogs/UiDataProvider.d.ts +55 -55
  35. package/lib/cjs/appui-abstract/dialogs/UiDataProvider.js +66 -66
  36. package/lib/cjs/appui-abstract/dialogs/UiDataProvider.js.map +1 -1
  37. package/lib/cjs/appui-abstract/dialogs/UiLayoutDataProvider.d.ts +97 -97
  38. package/lib/cjs/appui-abstract/dialogs/UiLayoutDataProvider.js +175 -175
  39. package/lib/cjs/appui-abstract/dialogs/UiLayoutDataProvider.js.map +1 -1
  40. package/lib/cjs/appui-abstract/items/AbstractItemProps.d.ts +53 -53
  41. package/lib/cjs/appui-abstract/items/AbstractItemProps.d.ts.map +1 -1
  42. package/lib/cjs/appui-abstract/items/AbstractItemProps.js +9 -9
  43. package/lib/cjs/appui-abstract/items/AbstractItemProps.js.map +1 -1
  44. package/lib/cjs/appui-abstract/items/AbstractMenuItemProps.d.ts +20 -20
  45. package/lib/cjs/appui-abstract/items/AbstractMenuItemProps.js +9 -9
  46. package/lib/cjs/appui-abstract/items/AbstractMenuItemProps.js.map +1 -1
  47. package/lib/cjs/appui-abstract/items/AbstractToolbarProps.d.ts +13 -13
  48. package/lib/cjs/appui-abstract/items/AbstractToolbarProps.js +9 -9
  49. package/lib/cjs/appui-abstract/items/AbstractToolbarProps.js.map +1 -1
  50. package/lib/cjs/appui-abstract/items/BadgeType.d.ts +14 -14
  51. package/lib/cjs/appui-abstract/items/BadgeType.js +22 -22
  52. package/lib/cjs/appui-abstract/items/BadgeType.js.map +1 -1
  53. package/lib/cjs/appui-abstract/items/ConditionalBooleanValue.d.ts +27 -27
  54. package/lib/cjs/appui-abstract/items/ConditionalBooleanValue.js +60 -60
  55. package/lib/cjs/appui-abstract/items/ConditionalBooleanValue.js.map +1 -1
  56. package/lib/cjs/appui-abstract/items/ConditionalStringValue.d.ts +29 -29
  57. package/lib/cjs/appui-abstract/items/ConditionalStringValue.js +62 -62
  58. package/lib/cjs/appui-abstract/items/ConditionalStringValue.js.map +1 -1
  59. package/lib/cjs/appui-abstract/items/ProvidedItem.d.ts +11 -11
  60. package/lib/cjs/appui-abstract/items/ProvidedItem.js +9 -9
  61. package/lib/cjs/appui-abstract/items/ProvidedItem.js.map +1 -1
  62. package/lib/cjs/appui-abstract/items/RelativePosition.d.ts +18 -18
  63. package/lib/cjs/appui-abstract/items/RelativePosition.js +26 -26
  64. package/lib/cjs/appui-abstract/items/RelativePosition.js.map +1 -1
  65. package/lib/cjs/appui-abstract/items/StageUsage.d.ts +16 -16
  66. package/lib/cjs/appui-abstract/items/StageUsage.js +24 -24
  67. package/lib/cjs/appui-abstract/items/StageUsage.js.map +1 -1
  68. package/lib/cjs/appui-abstract/notification/MessagePresenter.d.ts +42 -42
  69. package/lib/cjs/appui-abstract/notification/MessagePresenter.js +24 -24
  70. package/lib/cjs/appui-abstract/notification/MessagePresenter.js.map +1 -1
  71. package/lib/cjs/appui-abstract/notification/MessageSeverity.d.ts +15 -15
  72. package/lib/cjs/appui-abstract/notification/MessageSeverity.js +23 -23
  73. package/lib/cjs/appui-abstract/notification/MessageSeverity.js.map +1 -1
  74. package/lib/cjs/appui-abstract/properties/Description.d.ts +127 -127
  75. package/lib/cjs/appui-abstract/properties/Description.js +196 -196
  76. package/lib/cjs/appui-abstract/properties/Description.js.map +1 -1
  77. package/lib/cjs/appui-abstract/properties/EditorParams.d.ts +260 -260
  78. package/lib/cjs/appui-abstract/properties/EditorParams.d.ts.map +1 -1
  79. package/lib/cjs/appui-abstract/properties/EditorParams.js +106 -106
  80. package/lib/cjs/appui-abstract/properties/EditorParams.js.map +1 -1
  81. package/lib/cjs/appui-abstract/properties/PrimitiveTypes.d.ts +60 -60
  82. package/lib/cjs/appui-abstract/properties/PrimitiveTypes.js +9 -9
  83. package/lib/cjs/appui-abstract/properties/PrimitiveTypes.js.map +1 -1
  84. package/lib/cjs/appui-abstract/properties/Record.d.ts +57 -57
  85. package/lib/cjs/appui-abstract/properties/Record.js +78 -78
  86. package/lib/cjs/appui-abstract/properties/Record.js.map +1 -1
  87. package/lib/cjs/appui-abstract/properties/StandardEditorNames.d.ts +22 -22
  88. package/lib/cjs/appui-abstract/properties/StandardEditorNames.js +30 -30
  89. package/lib/cjs/appui-abstract/properties/StandardEditorNames.js.map +1 -1
  90. package/lib/cjs/appui-abstract/properties/StandardTypeNames.d.ts +30 -30
  91. package/lib/cjs/appui-abstract/properties/StandardTypeNames.js +39 -39
  92. package/lib/cjs/appui-abstract/properties/StandardTypeNames.js.map +1 -1
  93. package/lib/cjs/appui-abstract/properties/Value.d.ts +49 -49
  94. package/lib/cjs/appui-abstract/properties/Value.d.ts.map +1 -1
  95. package/lib/cjs/appui-abstract/properties/Value.js +20 -20
  96. package/lib/cjs/appui-abstract/properties/Value.js.map +1 -1
  97. package/lib/cjs/appui-abstract/quantity/BaseQuantityDescription.d.ts +22 -22
  98. package/lib/cjs/appui-abstract/quantity/BaseQuantityDescription.js +48 -48
  99. package/lib/cjs/appui-abstract/quantity/BaseQuantityDescription.js.map +1 -1
  100. package/lib/cjs/appui-abstract/statusbar/StatusBarItem.d.ts +128 -128
  101. package/lib/cjs/appui-abstract/statusbar/StatusBarItem.d.ts.map +1 -1
  102. package/lib/cjs/appui-abstract/statusbar/StatusBarItem.js +87 -87
  103. package/lib/cjs/appui-abstract/statusbar/StatusBarItem.js.map +1 -1
  104. package/lib/cjs/appui-abstract/statusbar/StatusBarItemsManager.d.ts +39 -39
  105. package/lib/cjs/appui-abstract/statusbar/StatusBarItemsManager.js +135 -135
  106. package/lib/cjs/appui-abstract/statusbar/StatusBarItemsManager.js.map +1 -1
  107. package/lib/cjs/appui-abstract/toolbars/ToolbarItem.d.ts +121 -121
  108. package/lib/cjs/appui-abstract/toolbars/ToolbarItem.d.ts.map +1 -1
  109. package/lib/cjs/appui-abstract/toolbars/ToolbarItem.js +64 -64
  110. package/lib/cjs/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
  111. package/lib/cjs/appui-abstract/toolbars/ToolbarItemsManager.d.ts +45 -45
  112. package/lib/cjs/appui-abstract/toolbars/ToolbarItemsManager.js +235 -235
  113. package/lib/cjs/appui-abstract/toolbars/ToolbarItemsManager.js.map +1 -1
  114. package/lib/cjs/appui-abstract/utils/IconSpecUtilities.d.ts +29 -29
  115. package/lib/cjs/appui-abstract/utils/IconSpecUtilities.js +51 -51
  116. package/lib/cjs/appui-abstract/utils/IconSpecUtilities.js.map +1 -1
  117. package/lib/cjs/appui-abstract/utils/PointProps.d.ts +10 -10
  118. package/lib/cjs/appui-abstract/utils/PointProps.js +9 -9
  119. package/lib/cjs/appui-abstract/utils/PointProps.js.map +1 -1
  120. package/lib/cjs/appui-abstract/utils/UiError.d.ts +12 -12
  121. package/lib/cjs/appui-abstract/utils/UiError.js +22 -22
  122. package/lib/cjs/appui-abstract/utils/UiError.js.map +1 -1
  123. package/lib/cjs/appui-abstract/utils/UiEvent.d.ts +9 -9
  124. package/lib/cjs/appui-abstract/utils/UiEvent.js +17 -17
  125. package/lib/cjs/appui-abstract/utils/UiEvent.js.map +1 -1
  126. package/lib/cjs/appui-abstract/utils/UiEventDispatcher.d.ts +46 -46
  127. package/lib/cjs/appui-abstract/utils/UiEventDispatcher.js +131 -131
  128. package/lib/cjs/appui-abstract/utils/UiEventDispatcher.js.map +1 -1
  129. package/lib/cjs/appui-abstract/utils/callbacks.d.ts +20 -20
  130. package/lib/cjs/appui-abstract/utils/callbacks.d.ts.map +1 -1
  131. package/lib/cjs/appui-abstract/utils/callbacks.js +9 -9
  132. package/lib/cjs/appui-abstract/utils/callbacks.js.map +1 -1
  133. package/lib/cjs/appui-abstract/utils/filter/charCode.d.ts +416 -416
  134. package/lib/cjs/appui-abstract/utils/filter/charCode.js +6 -6
  135. package/lib/cjs/appui-abstract/utils/filter/charCode.js.map +1 -1
  136. package/lib/cjs/appui-abstract/utils/filter/filters.d.ts +98 -98
  137. package/lib/cjs/appui-abstract/utils/filter/filters.d.ts.map +1 -1
  138. package/lib/cjs/appui-abstract/utils/filter/filters.js +709 -709
  139. package/lib/cjs/appui-abstract/utils/filter/filters.js.map +1 -1
  140. package/lib/cjs/appui-abstract/utils/filter/map.d.ts +59 -59
  141. package/lib/cjs/appui-abstract/utils/filter/map.js +402 -402
  142. package/lib/cjs/appui-abstract/utils/filter/map.js.map +1 -1
  143. package/lib/cjs/appui-abstract/utils/filter/strings.d.ts +20 -20
  144. package/lib/cjs/appui-abstract/utils/filter/strings.js +78 -78
  145. package/lib/cjs/appui-abstract/utils/filter/strings.js.map +1 -1
  146. package/lib/cjs/appui-abstract/utils/isLetter.d.ts +9 -9
  147. package/lib/cjs/appui-abstract/utils/isLetter.js +19 -19
  148. package/lib/cjs/appui-abstract/utils/isLetter.js.map +1 -1
  149. package/lib/cjs/appui-abstract/utils/misc.d.ts +11 -11
  150. package/lib/cjs/appui-abstract/utils/misc.js +36 -36
  151. package/lib/cjs/appui-abstract/utils/misc.js.map +1 -1
  152. package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.d.ts +86 -86
  153. package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.js +9 -9
  154. package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.js.map +1 -1
  155. package/lib/cjs/appui-abstract/widget/StagePanel.d.ts +36 -36
  156. package/lib/cjs/appui-abstract/widget/StagePanel.js +46 -46
  157. package/lib/cjs/appui-abstract/widget/StagePanel.js.map +1 -1
  158. package/lib/cjs/appui-abstract/widget/WidgetState.d.ts +19 -19
  159. package/lib/cjs/appui-abstract/widget/WidgetState.js +27 -27
  160. package/lib/cjs/appui-abstract/widget/WidgetState.js.map +1 -1
  161. package/lib/cjs/appui-abstract.d.ts +103 -103
  162. package/lib/cjs/appui-abstract.js +123 -119
  163. package/lib/cjs/appui-abstract.js.map +1 -1
  164. package/lib/esm/appui-abstract/BaseUiItemsProvider.d.ts +30 -30
  165. package/lib/esm/appui-abstract/BaseUiItemsProvider.d.ts.map +1 -1
  166. package/lib/esm/appui-abstract/BaseUiItemsProvider.js +75 -75
  167. package/lib/esm/appui-abstract/BaseUiItemsProvider.js.map +1 -1
  168. package/lib/esm/appui-abstract/UiAdmin.d.ts +221 -221
  169. package/lib/esm/appui-abstract/UiAdmin.js +220 -219
  170. package/lib/esm/appui-abstract/UiAdmin.js.map +1 -1
  171. package/lib/esm/appui-abstract/UiItemsManager.d.ts +113 -113
  172. package/lib/esm/appui-abstract/UiItemsManager.d.ts.map +1 -1
  173. package/lib/esm/appui-abstract/UiItemsManager.js +190 -189
  174. package/lib/esm/appui-abstract/UiItemsManager.js.map +1 -1
  175. package/lib/esm/appui-abstract/UiItemsProvider.d.ts +29 -29
  176. package/lib/esm/appui-abstract/UiItemsProvider.js +8 -8
  177. package/lib/esm/appui-abstract/UiItemsProvider.js.map +1 -1
  178. package/lib/esm/appui-abstract/backstage/BackstageItem.d.ts +91 -91
  179. package/lib/esm/appui-abstract/backstage/BackstageItem.d.ts.map +1 -1
  180. package/lib/esm/appui-abstract/backstage/BackstageItem.js +65 -64
  181. package/lib/esm/appui-abstract/backstage/BackstageItem.js.map +1 -1
  182. package/lib/esm/appui-abstract/backstage/BackstageItemsManager.d.ts +38 -38
  183. package/lib/esm/appui-abstract/backstage/BackstageItemsManager.js +129 -129
  184. package/lib/esm/appui-abstract/backstage/BackstageItemsManager.js.map +1 -1
  185. package/lib/esm/appui-abstract/common/KeyboardKey.d.ts +51 -51
  186. package/lib/esm/appui-abstract/common/KeyboardKey.js +59 -59
  187. package/lib/esm/appui-abstract/common/KeyboardKey.js.map +1 -1
  188. package/lib/esm/appui-abstract/content/ContentLayoutProps.d.ts +62 -62
  189. package/lib/esm/appui-abstract/content/ContentLayoutProps.js +8 -8
  190. package/lib/esm/appui-abstract/content/ContentLayoutProps.js.map +1 -1
  191. package/lib/esm/appui-abstract/content/StandardContentLayouts.d.ts +19 -19
  192. package/lib/esm/appui-abstract/content/StandardContentLayouts.js +105 -104
  193. package/lib/esm/appui-abstract/content/StandardContentLayouts.js.map +1 -1
  194. package/lib/esm/appui-abstract/dialogs/DialogItem.d.ts +76 -76
  195. package/lib/esm/appui-abstract/dialogs/DialogItem.js +63 -63
  196. package/lib/esm/appui-abstract/dialogs/DialogItem.js.map +1 -1
  197. package/lib/esm/appui-abstract/dialogs/UiDataProvider.d.ts +55 -55
  198. package/lib/esm/appui-abstract/dialogs/UiDataProvider.js +61 -61
  199. package/lib/esm/appui-abstract/dialogs/UiDataProvider.js.map +1 -1
  200. package/lib/esm/appui-abstract/dialogs/UiLayoutDataProvider.d.ts +97 -97
  201. package/lib/esm/appui-abstract/dialogs/UiLayoutDataProvider.js +171 -170
  202. package/lib/esm/appui-abstract/dialogs/UiLayoutDataProvider.js.map +1 -1
  203. package/lib/esm/appui-abstract/items/AbstractItemProps.d.ts +53 -53
  204. package/lib/esm/appui-abstract/items/AbstractItemProps.d.ts.map +1 -1
  205. package/lib/esm/appui-abstract/items/AbstractItemProps.js +8 -8
  206. package/lib/esm/appui-abstract/items/AbstractItemProps.js.map +1 -1
  207. package/lib/esm/appui-abstract/items/AbstractMenuItemProps.d.ts +20 -20
  208. package/lib/esm/appui-abstract/items/AbstractMenuItemProps.js +8 -8
  209. package/lib/esm/appui-abstract/items/AbstractMenuItemProps.js.map +1 -1
  210. package/lib/esm/appui-abstract/items/AbstractToolbarProps.d.ts +13 -13
  211. package/lib/esm/appui-abstract/items/AbstractToolbarProps.js +8 -8
  212. package/lib/esm/appui-abstract/items/AbstractToolbarProps.js.map +1 -1
  213. package/lib/esm/appui-abstract/items/BadgeType.d.ts +14 -14
  214. package/lib/esm/appui-abstract/items/BadgeType.js +19 -19
  215. package/lib/esm/appui-abstract/items/BadgeType.js.map +1 -1
  216. package/lib/esm/appui-abstract/items/ConditionalBooleanValue.d.ts +27 -27
  217. package/lib/esm/appui-abstract/items/ConditionalBooleanValue.js +56 -56
  218. package/lib/esm/appui-abstract/items/ConditionalBooleanValue.js.map +1 -1
  219. package/lib/esm/appui-abstract/items/ConditionalStringValue.d.ts +29 -29
  220. package/lib/esm/appui-abstract/items/ConditionalStringValue.js +58 -58
  221. package/lib/esm/appui-abstract/items/ConditionalStringValue.js.map +1 -1
  222. package/lib/esm/appui-abstract/items/ProvidedItem.d.ts +11 -11
  223. package/lib/esm/appui-abstract/items/ProvidedItem.js +8 -8
  224. package/lib/esm/appui-abstract/items/ProvidedItem.js.map +1 -1
  225. package/lib/esm/appui-abstract/items/RelativePosition.d.ts +18 -18
  226. package/lib/esm/appui-abstract/items/RelativePosition.js +23 -23
  227. package/lib/esm/appui-abstract/items/RelativePosition.js.map +1 -1
  228. package/lib/esm/appui-abstract/items/StageUsage.d.ts +16 -16
  229. package/lib/esm/appui-abstract/items/StageUsage.js +21 -21
  230. package/lib/esm/appui-abstract/items/StageUsage.js.map +1 -1
  231. package/lib/esm/appui-abstract/notification/MessagePresenter.d.ts +42 -42
  232. package/lib/esm/appui-abstract/notification/MessagePresenter.js +21 -21
  233. package/lib/esm/appui-abstract/notification/MessagePresenter.js.map +1 -1
  234. package/lib/esm/appui-abstract/notification/MessageSeverity.d.ts +15 -15
  235. package/lib/esm/appui-abstract/notification/MessageSeverity.js +20 -20
  236. package/lib/esm/appui-abstract/notification/MessageSeverity.js.map +1 -1
  237. package/lib/esm/appui-abstract/properties/Description.d.ts +127 -127
  238. package/lib/esm/appui-abstract/properties/Description.js +192 -192
  239. package/lib/esm/appui-abstract/properties/Description.js.map +1 -1
  240. package/lib/esm/appui-abstract/properties/EditorParams.d.ts +260 -260
  241. package/lib/esm/appui-abstract/properties/EditorParams.d.ts.map +1 -1
  242. package/lib/esm/appui-abstract/properties/EditorParams.js +97 -97
  243. package/lib/esm/appui-abstract/properties/EditorParams.js.map +1 -1
  244. package/lib/esm/appui-abstract/properties/PrimitiveTypes.d.ts +60 -60
  245. package/lib/esm/appui-abstract/properties/PrimitiveTypes.js +8 -8
  246. package/lib/esm/appui-abstract/properties/PrimitiveTypes.js.map +1 -1
  247. package/lib/esm/appui-abstract/properties/Record.d.ts +57 -57
  248. package/lib/esm/appui-abstract/properties/Record.js +74 -74
  249. package/lib/esm/appui-abstract/properties/Record.js.map +1 -1
  250. package/lib/esm/appui-abstract/properties/StandardEditorNames.d.ts +22 -22
  251. package/lib/esm/appui-abstract/properties/StandardEditorNames.js +27 -27
  252. package/lib/esm/appui-abstract/properties/StandardEditorNames.js.map +1 -1
  253. package/lib/esm/appui-abstract/properties/StandardTypeNames.d.ts +30 -30
  254. package/lib/esm/appui-abstract/properties/StandardTypeNames.js +36 -36
  255. package/lib/esm/appui-abstract/properties/StandardTypeNames.js.map +1 -1
  256. package/lib/esm/appui-abstract/properties/Value.d.ts +49 -49
  257. package/lib/esm/appui-abstract/properties/Value.d.ts.map +1 -1
  258. package/lib/esm/appui-abstract/properties/Value.js +17 -17
  259. package/lib/esm/appui-abstract/properties/Value.js.map +1 -1
  260. package/lib/esm/appui-abstract/quantity/BaseQuantityDescription.d.ts +22 -22
  261. package/lib/esm/appui-abstract/quantity/BaseQuantityDescription.js +44 -44
  262. package/lib/esm/appui-abstract/quantity/BaseQuantityDescription.js.map +1 -1
  263. package/lib/esm/appui-abstract/statusbar/StatusBarItem.d.ts +128 -128
  264. package/lib/esm/appui-abstract/statusbar/StatusBarItem.d.ts.map +1 -1
  265. package/lib/esm/appui-abstract/statusbar/StatusBarItem.js +81 -80
  266. package/lib/esm/appui-abstract/statusbar/StatusBarItem.js.map +1 -1
  267. package/lib/esm/appui-abstract/statusbar/StatusBarItemsManager.d.ts +39 -39
  268. package/lib/esm/appui-abstract/statusbar/StatusBarItemsManager.js +131 -131
  269. package/lib/esm/appui-abstract/statusbar/StatusBarItemsManager.js.map +1 -1
  270. package/lib/esm/appui-abstract/toolbars/ToolbarItem.d.ts +121 -121
  271. package/lib/esm/appui-abstract/toolbars/ToolbarItem.d.ts.map +1 -1
  272. package/lib/esm/appui-abstract/toolbars/ToolbarItem.js +61 -60
  273. package/lib/esm/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
  274. package/lib/esm/appui-abstract/toolbars/ToolbarItemsManager.d.ts +45 -45
  275. package/lib/esm/appui-abstract/toolbars/ToolbarItemsManager.js +231 -231
  276. package/lib/esm/appui-abstract/toolbars/ToolbarItemsManager.js.map +1 -1
  277. package/lib/esm/appui-abstract/utils/IconSpecUtilities.d.ts +29 -29
  278. package/lib/esm/appui-abstract/utils/IconSpecUtilities.js +48 -47
  279. package/lib/esm/appui-abstract/utils/IconSpecUtilities.js.map +1 -1
  280. package/lib/esm/appui-abstract/utils/PointProps.d.ts +10 -10
  281. package/lib/esm/appui-abstract/utils/PointProps.js +8 -8
  282. package/lib/esm/appui-abstract/utils/PointProps.js.map +1 -1
  283. package/lib/esm/appui-abstract/utils/UiError.d.ts +12 -12
  284. package/lib/esm/appui-abstract/utils/UiError.js +18 -18
  285. package/lib/esm/appui-abstract/utils/UiError.js.map +1 -1
  286. package/lib/esm/appui-abstract/utils/UiEvent.d.ts +9 -9
  287. package/lib/esm/appui-abstract/utils/UiEvent.js +13 -13
  288. package/lib/esm/appui-abstract/utils/UiEvent.js.map +1 -1
  289. package/lib/esm/appui-abstract/utils/UiEventDispatcher.d.ts +46 -46
  290. package/lib/esm/appui-abstract/utils/UiEventDispatcher.js +126 -126
  291. package/lib/esm/appui-abstract/utils/UiEventDispatcher.js.map +1 -1
  292. package/lib/esm/appui-abstract/utils/callbacks.d.ts +20 -20
  293. package/lib/esm/appui-abstract/utils/callbacks.d.ts.map +1 -1
  294. package/lib/esm/appui-abstract/utils/callbacks.js +8 -8
  295. package/lib/esm/appui-abstract/utils/callbacks.js.map +1 -1
  296. package/lib/esm/appui-abstract/utils/filter/charCode.d.ts +416 -416
  297. package/lib/esm/appui-abstract/utils/filter/charCode.js +5 -5
  298. package/lib/esm/appui-abstract/utils/filter/charCode.js.map +1 -1
  299. package/lib/esm/appui-abstract/utils/filter/filters.d.ts +98 -98
  300. package/lib/esm/appui-abstract/utils/filter/filters.d.ts.map +1 -1
  301. package/lib/esm/appui-abstract/utils/filter/filters.js +694 -694
  302. package/lib/esm/appui-abstract/utils/filter/filters.js.map +1 -1
  303. package/lib/esm/appui-abstract/utils/filter/map.d.ts +59 -59
  304. package/lib/esm/appui-abstract/utils/filter/map.js +397 -397
  305. package/lib/esm/appui-abstract/utils/filter/map.js.map +1 -1
  306. package/lib/esm/appui-abstract/utils/filter/strings.d.ts +20 -20
  307. package/lib/esm/appui-abstract/utils/filter/strings.js +70 -70
  308. package/lib/esm/appui-abstract/utils/filter/strings.js.map +1 -1
  309. package/lib/esm/appui-abstract/utils/isLetter.d.ts +9 -9
  310. package/lib/esm/appui-abstract/utils/isLetter.js +15 -15
  311. package/lib/esm/appui-abstract/utils/isLetter.js.map +1 -1
  312. package/lib/esm/appui-abstract/utils/misc.d.ts +11 -11
  313. package/lib/esm/appui-abstract/utils/misc.js +31 -31
  314. package/lib/esm/appui-abstract/utils/misc.js.map +1 -1
  315. package/lib/esm/appui-abstract/widget/AbstractWidgetProps.d.ts +86 -86
  316. package/lib/esm/appui-abstract/widget/AbstractWidgetProps.js +8 -8
  317. package/lib/esm/appui-abstract/widget/AbstractWidgetProps.js.map +1 -1
  318. package/lib/esm/appui-abstract/widget/StagePanel.d.ts +36 -36
  319. package/lib/esm/appui-abstract/widget/StagePanel.js +43 -43
  320. package/lib/esm/appui-abstract/widget/StagePanel.js.map +1 -1
  321. package/lib/esm/appui-abstract/widget/WidgetState.d.ts +19 -19
  322. package/lib/esm/appui-abstract/widget/WidgetState.js +24 -24
  323. package/lib/esm/appui-abstract/widget/WidgetState.js.map +1 -1
  324. package/lib/esm/appui-abstract.d.ts +103 -103
  325. package/lib/esm/appui-abstract.js +107 -107
  326. package/lib/esm/appui-abstract.js.map +1 -1
  327. package/package.json +6 -6
@@ -1 +1 @@
1
- {"version":3,"file":"UiItemsManager.js","sourceRoot":"","sources":["../../../src/appui-abstract/UiItemsManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;;;AAEH,sDAAoE;AAMpE,uCAA8C;AAG9C;;GAEG;AACH,IAAY,wBAOX;AAPD,WAAY,wBAAwB;IAClC,mCAAmC;IACnC,yEAAK,CAAA;IACL,sCAAsC;IACtC,+EAAQ,CAAA;IACR,wCAAwC;IACxC,2EAAM,CAAA;AACR,CAAC,EAPW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAOnC;AA+CD;;;GAGG;AACH,MAAa,cAAc;IAGzB;mBACe;IACR,MAAM,CAAC,iBAAiB;QAC7B,cAAc,CAAC,2BAA2B,CAAC,KAAK,EAAE,CAAC;IACrD,CAAC;IAKD,8CAA8C;IACvC,MAAM,KAAK,qBAAqB;QACrC,MAAM,GAAG,GAAG,CAAC,GAAG,cAAc,CAAC,2BAA2B,CAAC,IAAI,EAAE,CAAC,CAAC;QACnE,OAAO,GAAG,CAAC;IACb,CAAC;IAED,yDAAyD;IAClD,MAAM,KAAK,sBAAsB;QACtC,OAAO,IAAI,CAAC,2BAA2B,CAAC,IAAI,GAAG,CAAC,CAAC;IACnD,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,kBAAkB,CAAC,UAAkB;QACjD,OAAO,cAAc,CAAC,2BAA2B,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC;IAC9E,CAAC;IAEO,MAAM,CAAC,mBAAmB,CAAC,EAAqC;QACtE,cAAc,CAAC,2BAA2B,CAAC,UAAU,CAAC,EAAE,CAAC,CAAC;IAC5D,CAAC;IAED;;;OAGG;I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vB,IAAI,UAAU,CAAC,cAAc,IAAI,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE;gBACxF,UAAU,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,CAAC;qBAC1F,OAAO,CAAC,CAAC,MAA2B,EAAE,EAAE;oBACvC,uBAAuB;oBACvB,IAAI,CAAC,CAAC,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC,YAAY,EAAC,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,YAAY,CAAC,EAAE,CAAE;wBAC3E,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;gBAC5C,CAAC,CAAC,CAAC;aACN;QACH,CAAC,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACjB,CAAC;;AA/LH,wCAiMC;AAhMgB,0CAA2B,GAAqC,IAAI,GAAG,EAA+B,CAAC;AAQtH,wEAAwE;AACjD,0CAA2B,GAAG,IAAI,sBAAO,EAAmD,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/* eslint-disable deprecation/deprecation */\r\n/** @packageDocumentation\r\n * @module UiItemsProvider\r\n */\r\n\r\nimport { BeEvent, Logger, MarkRequired } from \"@itwin/core-bentley\";\r\nimport { BackstageItem } from \"./backstage/BackstageItem\";\r\nimport { CommonStatusBarItem } from \"./statusbar/StatusBarItem\";\r\nimport { CommonToolbarItem, ToolbarOrientation, ToolbarUsage } from \"./toolbars/ToolbarItem\";\r\nimport { AbstractWidgetProps } from \"./widget/AbstractWidgetProps\";\r\nimport { AbstractZoneLocation, StagePanelLocation, StagePanelSection } from \"./widget/StagePanel\";\r\nimport { loggerCategory } from \"./utils/misc\";\r\nimport { UiItemsProvider } from \"./UiItemsProvider\";\r\n\r\n/** Action taken by the application on item provided by a UiItemsProvider\r\n * @public @deprecated in 3.2. This was only used by the previously removed UiItemsArbiter.\r\n */\r\nexport enum UiItemsApplicationAction {\r\n /** Allow the change to the item */\r\n Allow,\r\n /** Disallow the change to the item */\r\n Disallow,\r\n /** Update the item during the change */\r\n Update,\r\n}\r\n\r\n/** UIProvider Registered Event Args interface.\r\n * @deprecated in 3.6. Use [UiItemsProviderRegisteredEventArgs]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface UiItemProviderRegisteredEventArgs {\r\n providerId: string;\r\n}\r\n\r\n/** UiItemProviderOverrides allows the application that registers a provider to limit when it is allowed to provide items\r\n * @deprecated in 3.6. Use [AllowedUiItemsProviderOverrides]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface AllowedUiItemProviderOverrides {\r\n /** allows providerId to be overridden in the items manager for cases where the same provider needs to provide different content to different stages\r\n * @beta\r\n */\r\n providerId?: string;\r\n /** if specified then the current stage's Usage will be compared before allowing any items to be provided\r\n * @beta\r\n */\r\n stageUsages?: string[];\r\n /** if specified then the current stage's Id will be compared before allowing any items to be provided\r\n * @beta\r\n */\r\n stageIds?: string[];\r\n}\r\n\r\n/** Allowed overrides applied to a UiItemsProvider the application that registers a provider to limit when it is allowed to provide items.\r\n * Note that if an override `providerId` is specified then either `stageIds` or `stageUsages` must be defined to limit when the provider's\r\n * items are allowed.\r\n * @deprecated in 3.6. Use [UiItemsProviderOverrides]($appui-react) instead.\r\n * @public\r\n */\r\nexport type UiItemProviderOverrides = MarkRequired<AllowedUiItemProviderOverrides, \"providerId\" | \"stageUsages\"> |\r\n MarkRequired<AllowedUiItemProviderOverrides, \"providerId\" | \"stageIds\"> | // eslint-disable-line @typescript-eslint/indent\r\n MarkRequired<AllowedUiItemProviderOverrides, \"stageIds\"> | // eslint-disable-line @typescript-eslint/indent\r\n MarkRequired<AllowedUiItemProviderOverrides, \"stageUsages\"> | // eslint-disable-line @typescript-eslint/indent\r\n MarkRequired<AllowedUiItemProviderOverrides, \"providerId\" | \"stageUsages\" | \"stageIds\">; // eslint-disable-line @typescript-eslint/indent\r\n\r\n/** Interface that defines an instance of a UiItemsProvider and its application specified overrides. */\r\ninterface UiItemProviderEntry {\r\n provider: UiItemsProvider;\r\n overrides?: UiItemProviderOverrides;\r\n}\r\n\r\n/** Controls registering of UiItemsProviders and calls the provider's methods when populating different parts of the User Interface.\r\n * @deprecated in 3.6. Use [UiItemsManager]($appui-react) instead.\r\n * @public\r\n */\r\nexport class UiItemsManager {\r\n private static _registeredUiItemsProviders: Map<string, UiItemProviderEntry> = new Map<string, UiItemProviderEntry>();\r\n\r\n /** For use in unit testing\r\n * @internal */\r\n public static clearAllProviders() {\r\n UiItemsManager._registeredUiItemsProviders.clear();\r\n }\r\n\r\n /** Event raised any time a UiProvider is registered or unregistered. */\r\n public static readonly onUiProviderRegisteredEvent = new BeEvent<(ev: UiItemProviderRegisteredEventArgs) => void>();\r\n\r\n /** Return number of registered UiProvider. */\r\n public static get registeredProviderIds() {\r\n const ids = [...UiItemsManager._registeredUiItemsProviders.keys()];\r\n return ids;\r\n }\r\n\r\n /** Return true if there is any registered UiProvider. */\r\n public static get hasRegisteredProviders(): boolean {\r\n return this._registeredUiItemsProviders.size > 0;\r\n }\r\n\r\n /**\r\n * Retrieves a previously loaded UiItemsProvider.\r\n * @param providerId id of the UiItemsProvider to get\r\n */\r\n public static getUiItemsProvider(providerId: string): UiItemsProvider | undefined {\r\n return UiItemsManager._registeredUiItemsProviders.get(providerId)?.provider;\r\n }\r\n\r\n private static sendRegisteredEvent(ev: UiItemProviderRegisteredEventArgs) {\r\n UiItemsManager.onUiProviderRegisteredEvent.raiseEvent(ev);\r\n }\r\n\r\n /**\r\n * Registers a UiItemsProvider with the UiItemsManager.\r\n * @param uiProvider the UI items provider to register.\r\n */\r\n public static register(uiProvider: UiItemsProvider, overrides?: UiItemProviderOverrides): void {\r\n const providerId = overrides?.providerId ?? uiProvider.id;\r\n\r\n if (UiItemsManager.getUiItemsProvider(providerId)) {\r\n Logger.logInfo(loggerCategory(this), `UiItemsProvider (${providerId}) is already loaded`);\r\n } else {\r\n UiItemsManager._registeredUiItemsProviders.set(providerId, { provider: uiProvider, overrides });\r\n Logger.logInfo(loggerCategory(this), `UiItemsProvider ${uiProvider.id} registered as ${providerId} `);\r\n\r\n UiItemsManager.sendRegisteredEvent({ providerId } as UiItemProviderRegisteredEventArgs);\r\n }\r\n }\r\n\r\n /** Remove a specific UiItemsProvider from the list of available providers. */\r\n public static unregister(uiProviderId: string): void {\r\n const provider = UiItemsManager.getUiItemsProvider(uiProviderId);\r\n if (!provider)\r\n return;\r\n\r\n provider.onUnregister && provider.onUnregister();\r\n\r\n UiItemsManager._registeredUiItemsProviders.delete(uiProviderId);\r\n Logger.logInfo(loggerCategory(this), `UiItemsProvider (${uiProviderId}) unloaded`);\r\n\r\n // trigger a refresh of the ui\r\n UiItemsManager.sendRegisteredEvent({ providerId: uiProviderId } as UiItemProviderRegisteredEventArgs);\r\n }\r\n\r\n private static allowItemsFromProvider(entry: UiItemProviderEntry, stageId?: string, stageUsage?: string) {\r\n // istanbul ignore else\r\n const overrides = entry.overrides;\r\n if (undefined !== stageId && overrides?.stageIds && !(overrides.stageIds.some((value: string) => value === stageId)))\r\n return false;\r\n if (undefined !== stageUsage && overrides?.stageUsages && !(overrides.stageUsages.some((value: string) => value === stageUsage)))\r\n return false;\r\n return true;\r\n }\r\n\r\n /** Called when the application is populating a toolbar so that any registered UiItemsProvider can add tool buttons that either either execute\r\n * an action or specify a registered ToolId into toolbar.\r\n * @param stageId a string identifier the active stage.\r\n * @param stageUsage the StageUsage of the active stage.\r\n * @param toolbarUsage usage of the toolbar\r\n * @param toolbarOrientation orientation of the toolbar\r\n * @returns an array of error messages. The array will be empty if the load is successful, otherwise it is a list of one or more problems.\r\n */\r\n public static getToolbarButtonItems(stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage,\r\n toolbarOrientation: ToolbarOrientation, stageAppData?: any): CommonToolbarItem[] {\r\n const buttonItems: CommonToolbarItem[] = [];\r\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\r\n return buttonItems;\r\n\r\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\r\n const uiProvider = entry.provider;\r\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\r\n // istanbul ignore else\r\n if (uiProvider.provideToolbarButtonItems && this.allowItemsFromProvider(entry, stageId, stageUsage)) {\r\n uiProvider.provideToolbarButtonItems(stageId, stageUsage, toolbarUsage, toolbarOrientation, stageAppData)\r\n .forEach((spec: CommonToolbarItem) => {\r\n // ignore duplicate ids\r\n if (-1 === buttonItems.findIndex((existingItem)=> spec.id === existingItem.id ))\r\n buttonItems.push({ ...spec, providerId });\r\n });\r\n }\r\n });\r\n\r\n return buttonItems;\r\n }\r\n\r\n /** Called when the application is populating the statusbar so that any registered UiItemsProvider can add status fields\r\n * @param stageId a string identifier the active stage.\r\n * @param stageUsage the StageUsage of the active stage.\r\n * @returns An array of CommonStatusBarItem that will be used to create controls for the status bar.\r\n */\r\n public static getStatusBarItems(stageId: string, stageUsage: string, stageAppData?: any): CommonStatusBarItem[] {\r\n const statusBarItems: CommonStatusBarItem[] = [];\r\n\r\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\r\n return statusBarItems;\r\n\r\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\r\n const uiProvider = entry.provider;\r\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\r\n\r\n // istanbul ignore else\r\n if (uiProvider.provideStatusBarItems && this.allowItemsFromProvider(entry, stageId, stageUsage)) {\r\n uiProvider.provideStatusBarItems(stageId, stageUsage, stageAppData)\r\n .forEach((item: CommonStatusBarItem) => {\r\n // ignore duplicate ids\r\n if (-1 === statusBarItems.findIndex((existingItem)=> item.id === existingItem.id ))\r\n statusBarItems.push({ ...item, providerId });\r\n });\r\n }\r\n });\r\n\r\n return statusBarItems;\r\n }\r\n\r\n /** Called when the application is populating the statusbar so that any registered UiItemsProvider can add status fields\r\n * @returns An array of BackstageItem that will be used to create controls for the backstage menu.\r\n */\r\n public static getBackstageItems(): BackstageItem[] {\r\n const backstageItems: BackstageItem[] = [];\r\n\r\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\r\n return backstageItems;\r\n\r\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\r\n const uiProvider = entry.provider;\r\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\r\n\r\n // istanbul ignore else\r\n if (uiProvider.provideBackstageItems) { // Note: We do not call this.allowItemsFromProvider here as backstage items\r\n uiProvider.provideBackstageItems() // should not be considered stage specific. If they need to be hidden\r\n .forEach((item: BackstageItem) => { // the isHidden property should be set to a ConditionalBooleanValue\r\n // ignore duplicate ids\r\n if (-1 === backstageItems.findIndex((existingItem)=> item.id === existingItem.id ))\r\n backstageItems.push({ ...item, providerId });\r\n });\r\n }\r\n });\r\n return backstageItems;\r\n }\r\n\r\n /** Called when the application is populating the Stage Panels so that any registered UiItemsProvider can add widgets\r\n * @param stageId a string identifier the active stage.\r\n * @param stageUsage the StageUsage of the active stage.\r\n * @param location the location within the stage.\r\n * @param section the section within location.\r\n * @returns An array of AbstractWidgetProps that will be used to create widgets.\r\n */\r\n public static getWidgets(stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection, zoneLocation?: AbstractZoneLocation, stageAppData?: any): ReadonlyArray<AbstractWidgetProps> {\r\n const widgets: AbstractWidgetProps[] = [];\r\n\r\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\r\n return widgets;\r\n\r\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\r\n const uiProvider = entry.provider;\r\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\r\n\r\n // istanbul ignore else\r\n if (uiProvider.provideWidgets && this.allowItemsFromProvider(entry, stageId, stageUsage)) {\r\n uiProvider.provideWidgets(stageId, stageUsage, location, section, zoneLocation, stageAppData)\r\n .forEach((widget: AbstractWidgetProps) => {\r\n // ignore duplicate ids\r\n if (-1 === widgets.findIndex((existingItem)=> widget.id === existingItem.id ))\r\n widgets.push({ ...widget, providerId });\r\n });\r\n }\r\n });\r\n return widgets;\r\n }\r\n\r\n}\r\n"]}
1
+ {"version":3,"file":"UiItemsManager.js","sourceRoot":"","sources":["../../../src/appui-abstract/UiItemsManager.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F,4CAA4C;AAC5C;;GAEG;;;AAEH,sDAAoE;AAMpE,uCAA8C;AAG9C;;GAEG;AACH,IAAY,wBAOX;AAPD,WAAY,wBAAwB;IAClC,mCAAmC;IACnC,yEAAK,CAAA;IACL,sCAAsC;IACtC,+EAAQ,CAAA;IACR,wCAAwC;IACxC,2EAAM,CAAA;AACR,CAAC,EAPW,wBAAwB,GAAxB,gCAAwB,KAAxB,gCAAwB,QAOnC;AA+CD;;;GAGG;AACH,MAAa,cAAc;IAGzB;mBACe;IACR,MAAM,CAAC,iBAAiB;QAC7B,cAAc,CAAC,2BAA2B,CAAC,KAAK,EAAE,CAAC;IACrD,CAAC;IAKD,8CAA8C;IACvC,MAAM,KAAK,qBAAqB;QACrC,MAAM,GAAG,GAAG,CAAC,GAAG,cAAc,CAAC,2BAA2B,CAAC,IAAI,EAAE,CAAC,CAAC;QACnE,OAAO,GAAG,CAAC;IACb,CAAC;IAED,yDAAyD;IAClD,MAAM,KAAK,sBAAsB;QACtC,OAAO,IAAI,CAAC,2BAA2B,CAAC,IAAI,GAAG,CAAC,CAAC;IACnD,CAAC;IAED;;;OAGG;IACI,MAAM,CAAC,kBAAkB,CAAC,UAAkB;QACjD,OAAO,cAAc,CAAC,2BAA2B,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,QAAQ,CAAC;IAC9E,CAAC;IAEO,MAAM,CAAC,mBAAmB,CAAC,EAAqC;QACtE,cAAc,CAAC,2BAA2B,CAAC,UAAU,CAAC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AAI,UAAU,CAAC,EAAE,CAAC;YAEhE,uBAAuB;YACvB,IAAI,UAAU,CAAC,cAAc,IAAI,IAAI,CAAC,sBAAsB,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,CAAC,EAAE;gBACxF,UAAU,CAAC,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,OAAO,EAAE,YAAY,EAAE,YAAY,CAAC;qBAC1F,OAAO,CAAC,CAAC,MAA2B,EAAE,EAAE;oBACvC,uBAAuB;oBACvB,IAAI,CAAC,CAAC,KAAK,OAAO,CAAC,SAAS,CAAC,CAAC,YAAY,EAAC,EAAE,CAAC,MAAM,CAAC,EAAE,KAAK,YAAY,CAAC,EAAE,CAAE;wBAC3E,OAAO,CAAC,IAAI,CAAC,EAAE,GAAG,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;gBAC5C,CAAC,CAAC,CAAC;aACN;QACH,CAAC,CAAC,CAAC;QACH,OAAO,OAAO,CAAC;IACjB,CAAC;;AA9Lc,0CAA2B,GAAqC,IAAI,GAAG,EAA+B,CAAC;AAQtH,wEAAwE;AACjD,0CAA2B,GAAG,IAAI,sBAAO,EAAmD,CAAC;AAVzG,wCAAc","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 deprecation/deprecation */\n/** @packageDocumentation\n * @module UiItemsProvider\n */\n\nimport { BeEvent, Logger, MarkRequired } from \"@itwin/core-bentley\";\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 { loggerCategory } from \"./utils/misc\";\nimport { UiItemsProvider } from \"./UiItemsProvider\";\n\n/** Action taken by the application on item provided by a UiItemsProvider\n * @public @deprecated in 3.2. This was only used by the previously removed UiItemsArbiter.\n */\nexport enum UiItemsApplicationAction {\n /** Allow the change to the item */\n Allow,\n /** Disallow the change to the item */\n Disallow,\n /** Update the item during the change */\n Update,\n}\n\n/** UIProvider Registered Event Args interface.\n * @deprecated in 3.6. Use [UiItemsProviderRegisteredEventArgs]($appui-react) instead.\n * @public\n */\nexport interface UiItemProviderRegisteredEventArgs {\n providerId: string;\n}\n\n/** UiItemProviderOverrides allows the application that registers a provider to limit when it is allowed to provide items\n * @deprecated in 3.6. Use [AllowedUiItemsProviderOverrides]($appui-react) instead.\n * @public\n */\nexport interface AllowedUiItemProviderOverrides {\n /** allows providerId to be overridden in the items manager for cases where the same provider needs to provide different content to different stages\n * @beta\n */\n providerId?: string;\n /** if specified then the current stage's Usage will be compared before allowing any items to be provided\n * @beta\n */\n stageUsages?: string[];\n /** if specified then the current stage's Id will be compared before allowing any items to be provided\n * @beta\n */\n stageIds?: string[];\n}\n\n/** Allowed overrides applied to a UiItemsProvider the application that registers a provider to limit when it is allowed to provide items.\n * Note that if an override `providerId` is specified then either `stageIds` or `stageUsages` must be defined to limit when the provider's\n * items are allowed.\n * @deprecated in 3.6. Use [UiItemsProviderOverrides]($appui-react) instead.\n * @public\n */\nexport type UiItemProviderOverrides = MarkRequired<AllowedUiItemProviderOverrides, \"providerId\" | \"stageUsages\"> |\n MarkRequired<AllowedUiItemProviderOverrides, \"providerId\" | \"stageIds\"> | // eslint-disable-line @typescript-eslint/indent\n MarkRequired<AllowedUiItemProviderOverrides, \"stageIds\"> | // eslint-disable-line @typescript-eslint/indent\n MarkRequired<AllowedUiItemProviderOverrides, \"stageUsages\"> | // eslint-disable-line @typescript-eslint/indent\n MarkRequired<AllowedUiItemProviderOverrides, \"providerId\" | \"stageUsages\" | \"stageIds\">; // eslint-disable-line @typescript-eslint/indent\n\n/** Interface that defines an instance of a UiItemsProvider and its application specified overrides. */\ninterface UiItemProviderEntry {\n provider: UiItemsProvider;\n overrides?: UiItemProviderOverrides;\n}\n\n/** Controls registering of UiItemsProviders and calls the provider's methods when populating different parts of the User Interface.\n * @deprecated in 3.6. Use [UiItemsManager]($appui-react) instead.\n * @public\n */\nexport class UiItemsManager {\n private static _registeredUiItemsProviders: Map<string, UiItemProviderEntry> = new Map<string, UiItemProviderEntry>();\n\n /** For use in unit testing\n * @internal */\n public static clearAllProviders() {\n UiItemsManager._registeredUiItemsProviders.clear();\n }\n\n /** Event raised any time a UiProvider is registered or unregistered. */\n public static readonly onUiProviderRegisteredEvent = new BeEvent<(ev: UiItemProviderRegisteredEventArgs) => void>();\n\n /** Return number of registered UiProvider. */\n public static get registeredProviderIds() {\n const ids = [...UiItemsManager._registeredUiItemsProviders.keys()];\n return ids;\n }\n\n /** Return true if there is any registered UiProvider. */\n public static get hasRegisteredProviders(): boolean {\n return this._registeredUiItemsProviders.size > 0;\n }\n\n /**\n * Retrieves a previously loaded UiItemsProvider.\n * @param providerId id of the UiItemsProvider to get\n */\n public static getUiItemsProvider(providerId: string): UiItemsProvider | undefined {\n return UiItemsManager._registeredUiItemsProviders.get(providerId)?.provider;\n }\n\n private static sendRegisteredEvent(ev: UiItemProviderRegisteredEventArgs) {\n UiItemsManager.onUiProviderRegisteredEvent.raiseEvent(ev);\n }\n\n /**\n * Registers a UiItemsProvider with the UiItemsManager.\n * @param uiProvider the UI items provider to register.\n */\n public static register(uiProvider: UiItemsProvider, overrides?: UiItemProviderOverrides): void {\n const providerId = overrides?.providerId ?? uiProvider.id;\n\n if (UiItemsManager.getUiItemsProvider(providerId)) {\n Logger.logInfo(loggerCategory(this), `UiItemsProvider (${providerId}) is already loaded`);\n } else {\n UiItemsManager._registeredUiItemsProviders.set(providerId, { provider: uiProvider, overrides });\n Logger.logInfo(loggerCategory(this), `UiItemsProvider ${uiProvider.id} registered as ${providerId} `);\n\n UiItemsManager.sendRegisteredEvent({ providerId } as UiItemProviderRegisteredEventArgs);\n }\n }\n\n /** Remove a specific UiItemsProvider from the list of available providers. */\n public static unregister(uiProviderId: string): void {\n const provider = UiItemsManager.getUiItemsProvider(uiProviderId);\n if (!provider)\n return;\n\n provider.onUnregister && provider.onUnregister();\n\n UiItemsManager._registeredUiItemsProviders.delete(uiProviderId);\n Logger.logInfo(loggerCategory(this), `UiItemsProvider (${uiProviderId}) unloaded`);\n\n // trigger a refresh of the ui\n UiItemsManager.sendRegisteredEvent({ providerId: uiProviderId } as UiItemProviderRegisteredEventArgs);\n }\n\n private static allowItemsFromProvider(entry: UiItemProviderEntry, stageId?: string, stageUsage?: string) {\n // istanbul ignore else\n const overrides = entry.overrides;\n if (undefined !== stageId && overrides?.stageIds && !(overrides.stageIds.some((value: string) => value === stageId)))\n return false;\n if (undefined !== stageUsage && overrides?.stageUsages && !(overrides.stageUsages.some((value: string) => value === stageUsage)))\n return false;\n return true;\n }\n\n /** Called when the application is populating a toolbar so that any registered UiItemsProvider can add tool buttons that either either execute\n * an action or specify a registered ToolId into toolbar.\n * @param stageId a string identifier the active stage.\n * @param stageUsage the StageUsage of the active stage.\n * @param toolbarUsage usage of the toolbar\n * @param toolbarOrientation orientation of the toolbar\n * @returns an array of error messages. The array will be empty if the load is successful, otherwise it is a list of one or more problems.\n */\n public static getToolbarButtonItems(stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage,\n toolbarOrientation: ToolbarOrientation, stageAppData?: any): CommonToolbarItem[] {\n const buttonItems: CommonToolbarItem[] = [];\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\n return buttonItems;\n\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\n const uiProvider = entry.provider;\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\n // istanbul ignore else\n if (uiProvider.provideToolbarButtonItems && this.allowItemsFromProvider(entry, stageId, stageUsage)) {\n uiProvider.provideToolbarButtonItems(stageId, stageUsage, toolbarUsage, toolbarOrientation, stageAppData)\n .forEach((spec: CommonToolbarItem) => {\n // ignore duplicate ids\n if (-1 === buttonItems.findIndex((existingItem)=> spec.id === existingItem.id ))\n buttonItems.push({ ...spec, providerId });\n });\n }\n });\n\n return buttonItems;\n }\n\n /** Called when the application is populating the statusbar so that any registered UiItemsProvider can add status fields\n * @param stageId a string identifier the active stage.\n * @param stageUsage the StageUsage of the active stage.\n * @returns An array of CommonStatusBarItem that will be used to create controls for the status bar.\n */\n public static getStatusBarItems(stageId: string, stageUsage: string, stageAppData?: any): CommonStatusBarItem[] {\n const statusBarItems: CommonStatusBarItem[] = [];\n\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\n return statusBarItems;\n\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\n const uiProvider = entry.provider;\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\n\n // istanbul ignore else\n if (uiProvider.provideStatusBarItems && this.allowItemsFromProvider(entry, stageId, stageUsage)) {\n uiProvider.provideStatusBarItems(stageId, stageUsage, stageAppData)\n .forEach((item: CommonStatusBarItem) => {\n // ignore duplicate ids\n if (-1 === statusBarItems.findIndex((existingItem)=> item.id === existingItem.id ))\n statusBarItems.push({ ...item, providerId });\n });\n }\n });\n\n return statusBarItems;\n }\n\n /** Called when the application is populating the statusbar so that any registered UiItemsProvider can add status fields\n * @returns An array of BackstageItem that will be used to create controls for the backstage menu.\n */\n public static getBackstageItems(): BackstageItem[] {\n const backstageItems: BackstageItem[] = [];\n\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\n return backstageItems;\n\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\n const uiProvider = entry.provider;\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\n\n // istanbul ignore else\n if (uiProvider.provideBackstageItems) { // Note: We do not call this.allowItemsFromProvider here as backstage items\n uiProvider.provideBackstageItems() // should not be considered stage specific. If they need to be hidden\n .forEach((item: BackstageItem) => { // the isHidden property should be set to a ConditionalBooleanValue\n // ignore duplicate ids\n if (-1 === backstageItems.findIndex((existingItem)=> item.id === existingItem.id ))\n backstageItems.push({ ...item, providerId });\n });\n }\n });\n return backstageItems;\n }\n\n /** Called when the application is populating the Stage Panels so that any registered UiItemsProvider can add widgets\n * @param stageId a string identifier the active stage.\n * @param stageUsage the StageUsage of the active stage.\n * @param location the location within the stage.\n * @param section the section within location.\n * @returns An array of AbstractWidgetProps that will be used to create widgets.\n */\n public static getWidgets(stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection, zoneLocation?: AbstractZoneLocation, stageAppData?: any): ReadonlyArray<AbstractWidgetProps> {\n const widgets: AbstractWidgetProps[] = [];\n\n if (0 === UiItemsManager._registeredUiItemsProviders.size)\n return widgets;\n\n UiItemsManager._registeredUiItemsProviders.forEach((entry: UiItemProviderEntry) => {\n const uiProvider = entry.provider;\n const providerId = entry.overrides?.providerId ?? uiProvider.id;\n\n // istanbul ignore else\n if (uiProvider.provideWidgets && this.allowItemsFromProvider(entry, stageId, stageUsage)) {\n uiProvider.provideWidgets(stageId, stageUsage, location, section, zoneLocation, stageAppData)\n .forEach((widget: AbstractWidgetProps) => {\n // ignore duplicate ids\n if (-1 === widgets.findIndex((existingItem)=> widget.id === existingItem.id ))\n widgets.push({ ...widget, providerId });\n });\n }\n });\n return widgets;\n }\n\n}\n"]}
@@ -1,30 +1,30 @@
1
- /** @packageDocumentation
2
- * @module UiItemsProvider
3
- */
4
- import { BackstageItem } from "./backstage/BackstageItem";
5
- import { CommonStatusBarItem } from "./statusbar/StatusBarItem";
6
- import { CommonToolbarItem, ToolbarOrientation, ToolbarUsage } from "./toolbars/ToolbarItem";
7
- import { AbstractWidgetProps } from "./widget/AbstractWidgetProps";
8
- import { AbstractZoneLocation, StagePanelLocation, StagePanelSection } from "./widget/StagePanel";
9
- /** Describes interface of objects that want to provide UI component to the running IModelApp.
10
- * @deprecated in 3.6. Use [UiItemsProvider]($appui-react) instead.
11
- * @public
12
- */
13
- export interface UiItemsProvider {
14
- /** id of provider */
15
- readonly id: string;
16
- /** UiItemsManager calls following method to get items to populate specific toolbars */
17
- provideToolbarButtonItems?: (stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage, toolbarOrientation: ToolbarOrientation, stageAppData?: any) => CommonToolbarItem[];
18
- /** UiItemsManager calls following method to augment base statusbar for stages that allow it. */
19
- provideStatusBarItems?: (stageId: string, stageUsage: string, stageAppData?: any) => CommonStatusBarItem[];
20
- /** UiItemsManager calls following method to augment backstage items. */
21
- provideBackstageItems?: () => BackstageItem[];
22
- /** UiItemsManager calls following method to augment Widget lists.
23
- * @note Returned widgets must provide unique `AbstractWidgetProps["id"]` to correctly save/restore App layout.
24
- */
25
- provideWidgets?: (stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection, // eslint-disable-line deprecation/deprecation
26
- zoneLocation?: AbstractZoneLocation, stageAppData?: any) => ReadonlyArray<AbstractWidgetProps>;
27
- /** Function called when the provider is unregistered via `ItemsManager.unregister` to allow provider to do cleanup. */
28
- onUnregister?: () => void;
29
- }
1
+ /** @packageDocumentation
2
+ * @module UiItemsProvider
3
+ */
4
+ import { BackstageItem } from "./backstage/BackstageItem";
5
+ import { CommonStatusBarItem } from "./statusbar/StatusBarItem";
6
+ import { CommonToolbarItem, ToolbarOrientation, ToolbarUsage } from "./toolbars/ToolbarItem";
7
+ import { AbstractWidgetProps } from "./widget/AbstractWidgetProps";
8
+ import { AbstractZoneLocation, StagePanelLocation, StagePanelSection } from "./widget/StagePanel";
9
+ /** Describes interface of objects that want to provide UI component to the running IModelApp.
10
+ * @deprecated in 3.6. Use [UiItemsProvider]($appui-react) instead.
11
+ * @public
12
+ */
13
+ export interface UiItemsProvider {
14
+ /** id of provider */
15
+ readonly id: string;
16
+ /** UiItemsManager calls following method to get items to populate specific toolbars */
17
+ provideToolbarButtonItems?: (stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage, toolbarOrientation: ToolbarOrientation, stageAppData?: any) => CommonToolbarItem[];
18
+ /** UiItemsManager calls following method to augment base statusbar for stages that allow it. */
19
+ provideStatusBarItems?: (stageId: string, stageUsage: string, stageAppData?: any) => CommonStatusBarItem[];
20
+ /** UiItemsManager calls following method to augment backstage items. */
21
+ provideBackstageItems?: () => BackstageItem[];
22
+ /** UiItemsManager calls following method to augment Widget lists.
23
+ * @note Returned widgets must provide unique `AbstractWidgetProps["id"]` to correctly save/restore App layout.
24
+ */
25
+ provideWidgets?: (stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection, // eslint-disable-line deprecation/deprecation
26
+ zoneLocation?: AbstractZoneLocation, stageAppData?: any) => ReadonlyArray<AbstractWidgetProps>;
27
+ /** Function called when the provider is unregistered via `ItemsManager.unregister` to allow provider to do cleanup. */
28
+ onUnregister?: () => void;
29
+ }
30
30
  //# sourceMappingURL=UiItemsProvider.d.ts.map
@@ -1,10 +1,10 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module UiItemsProvider
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module UiItemsProvider
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  //# sourceMappingURL=UiItemsProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UiItemsProvider.js","sourceRoot":"","sources":["../../../src/appui-abstract/UiItemsProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module UiItemsProvider\r\n */\r\n\r\nimport { BackstageItem } from \"./backstage/BackstageItem\";\r\nimport { CommonStatusBarItem } from \"./statusbar/StatusBarItem\";\r\nimport { CommonToolbarItem, ToolbarOrientation, ToolbarUsage } from \"./toolbars/ToolbarItem\";\r\nimport { AbstractWidgetProps } from \"./widget/AbstractWidgetProps\";\r\nimport { AbstractZoneLocation, StagePanelLocation, StagePanelSection } from \"./widget/StagePanel\";\r\n\r\n/** Describes interface of objects that want to provide UI component to the running IModelApp.\r\n * @deprecated in 3.6. Use [UiItemsProvider]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface UiItemsProvider {\r\n /** id of provider */\r\n readonly id: string;\r\n\r\n /** UiItemsManager calls following method to get items to populate specific toolbars */\r\n provideToolbarButtonItems?: (stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage, toolbarOrientation: ToolbarOrientation, stageAppData?: any) => CommonToolbarItem[]; // eslint-disable-line deprecation/deprecation\r\n /** UiItemsManager calls following method to augment base statusbar for stages that allow it. */\r\n provideStatusBarItems?: (stageId: string, stageUsage: string, stageAppData?: any) => CommonStatusBarItem[]; // eslint-disable-line deprecation/deprecation\r\n /** UiItemsManager calls following method to augment backstage items. */\r\n provideBackstageItems?: () => BackstageItem[]; // eslint-disable-line deprecation/deprecation\r\n /** UiItemsManager calls following method to augment Widget lists.\r\n * @note Returned widgets must provide unique `AbstractWidgetProps[\"id\"]` to correctly save/restore App layout.\r\n */\r\n provideWidgets?: (stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection, // eslint-disable-line deprecation/deprecation\r\n zoneLocation?: AbstractZoneLocation, stageAppData?: any) => ReadonlyArray<AbstractWidgetProps>; // eslint-disable-line deprecation/deprecation\r\n /** Function called when the provider is unregistered via `ItemsManager.unregister` to allow provider to do cleanup. */\r\n onUnregister?: () => void;\r\n}\r\n"]}
1
+ {"version":3,"file":"UiItemsProvider.js","sourceRoot":"","sources":["../../../src/appui-abstract/UiItemsProvider.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 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\";\n\n/** Describes interface of objects that want to provide UI component to the running IModelApp.\n * @deprecated in 3.6. Use [UiItemsProvider]($appui-react) instead.\n * @public\n */\nexport interface UiItemsProvider {\n /** id of provider */\n readonly id: string;\n\n /** UiItemsManager calls following method to get items to populate specific toolbars */\n provideToolbarButtonItems?: (stageId: string, stageUsage: string, toolbarUsage: ToolbarUsage, toolbarOrientation: ToolbarOrientation, stageAppData?: any) => CommonToolbarItem[]; // eslint-disable-line deprecation/deprecation\n /** UiItemsManager calls following method to augment base statusbar for stages that allow it. */\n provideStatusBarItems?: (stageId: string, stageUsage: string, stageAppData?: any) => CommonStatusBarItem[]; // eslint-disable-line deprecation/deprecation\n /** UiItemsManager calls following method to augment backstage items. */\n provideBackstageItems?: () => BackstageItem[]; // eslint-disable-line deprecation/deprecation\n /** UiItemsManager calls following method to augment Widget lists.\n * @note Returned widgets must provide unique `AbstractWidgetProps[\"id\"]` to correctly save/restore App layout.\n */\n provideWidgets?: (stageId: string, stageUsage: string, location: StagePanelLocation, section?: StagePanelSection, // eslint-disable-line deprecation/deprecation\n zoneLocation?: AbstractZoneLocation, stageAppData?: any) => ReadonlyArray<AbstractWidgetProps>; // eslint-disable-line deprecation/deprecation\n /** Function called when the provider is unregistered via `ItemsManager.unregister` to allow provider to do cleanup. */\n onUnregister?: () => void;\n}\n"]}
@@ -1,92 +1,92 @@
1
- /** @packageDocumentation
2
- * @module Backstage
3
- */
4
- import { BadgeType } from "../items/BadgeType";
5
- import { ConditionalBooleanValue } from "../items/ConditionalBooleanValue";
6
- import { ConditionalStringValue } from "../items/ConditionalStringValue";
7
- import { ProvidedItem } from "../items/ProvidedItem";
8
- /** Used to specify the item type added to the backstage menu.
9
- * @deprecated in 3.6. Use type guards instead.
10
- * @public
11
- */
12
- export declare enum BackstageItemType {
13
- /** Item that executes an action function */
14
- ActionItem = 1,
15
- /** Item that activate a stage. */
16
- StageLauncher = 2
17
- }
18
- /** Describes the data needed to insert a button into the backstage menu.
19
- * @deprecated in 3.6. Use [CommonBackstageItem]($appui-react) instead.
20
- * @public
21
- */
22
- export interface CommonBackstageItem extends ProvidedItem {
23
- /** can be used by application to store miscellaneous data. */
24
- applicationData?: any;
25
- /** Describes badge. Renders no badge if not specified. */
26
- readonly badgeType?: BadgeType;
27
- /** Specifies the item's grouping value. Items are sorted by group and then item priority. When
28
- * group priority changes a separator is inserted. It is recommended using values 10 through 100, incrementing by 10. This
29
- * allows extensions enough gaps to insert their own groups.
30
- */
31
- readonly groupPriority: number;
32
- /** Name of icon WebFont entry or if specifying an imported SVG symbol use "webSvg:" prefix to imported symbol Id. */
33
- readonly icon?: string | ConditionalStringValue;
34
- /** Required unique id of the item. To ensure uniqueness it is suggested that a namespace prefix of the extension name be used. */
35
- readonly id: string;
36
- /** optional data to be used by item implementor. */
37
- readonly internalData?: Map<string, any>;
38
- /** Describes if the item is visible or hidden. The default is for the item to be visible. */
39
- readonly isHidden?: boolean | ConditionalBooleanValue;
40
- /** Describes if the item is enabled or disabled. The default is for the item to be enabled. */
41
- readonly isDisabled?: boolean | ConditionalBooleanValue;
42
- /** Priority within a group (recommend using values 1 through 100). */
43
- readonly itemPriority: number;
44
- /** Label. */
45
- readonly label: string | ConditionalStringValue;
46
- /** Subtitle. */
47
- readonly subtitle?: string | ConditionalStringValue;
48
- /** Tooltip. */
49
- readonly tooltip?: string | ConditionalStringValue;
50
- /** Describes if the item is active. The default is for the item to be active if stageId matches activeFrontstageId */
51
- readonly isActive?: boolean | ConditionalBooleanValue;
52
- }
53
- /** Describes the data needed to insert an action button into the backstage menu.
54
- * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.
55
- * @public
56
- */
57
- export interface BackstageActionItem extends CommonBackstageItem {
58
- readonly execute: () => void;
59
- }
60
- /** Describes the data needed to insert an action button into the backstage menu.
61
- * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.
62
- * @public
63
- */
64
- export interface BackstageStageLauncher extends CommonBackstageItem {
65
- readonly stageId: string;
66
- }
67
- /** Describes the data needed to insert a button into the backstage menu.
68
- * @deprecated in 3.6. Use [BackstageItem]($appui-react) instead.
69
- * @public
70
- */
71
- export declare type BackstageItem = BackstageActionItem | BackstageStageLauncher;
72
- /** BackstageActionItem type guard.
73
- * @deprecated in 3.6. Use [isBackstageActionItem]($appui-react) instead.
74
- * @public
75
- */
76
- export declare const isActionItem: (item: BackstageItem) => item is BackstageActionItem;
77
- /** BackstageStageLauncher type guard.
78
- * @deprecated in 3.6. Use [isBackstageStageLauncher]($appui-react) instead.
79
- * @public
80
- */
81
- export declare const isStageLauncher: (item: BackstageItem) => item is BackstageStageLauncher;
82
- /** Utilities for creating and maintaining backstage items
83
- * @deprecated in 3.6. Use [BackstageItemUtilities]($appui-react) instead.
84
- * @public
85
- */
86
- export declare class BackstageItemUtilities {
87
- /** Creates a stage launcher backstage item */
88
- static createStageLauncher: (frontstageId: string, groupPriority: number, itemPriority: number, label: string | ConditionalStringValue, subtitle?: string | ConditionalStringValue | undefined, icon?: string | ConditionalStringValue | undefined, overrides?: Partial<BackstageStageLauncher> | undefined) => BackstageStageLauncher;
89
- /** Creates an action backstage item */
90
- static createActionItem: (itemId: string, groupPriority: number, itemPriority: number, execute: () => void, label: string | ConditionalStringValue, subtitle?: string | ConditionalStringValue | undefined, icon?: string | ConditionalStringValue | undefined, overrides?: Partial<BackstageActionItem> | undefined) => BackstageActionItem;
91
- }
1
+ /** @packageDocumentation
2
+ * @module Backstage
3
+ */
4
+ import { BadgeType } from "../items/BadgeType";
5
+ import { ConditionalBooleanValue } from "../items/ConditionalBooleanValue";
6
+ import { ConditionalStringValue } from "../items/ConditionalStringValue";
7
+ import { ProvidedItem } from "../items/ProvidedItem";
8
+ /** Used to specify the item type added to the backstage menu.
9
+ * @deprecated in 3.6. Use type guards instead.
10
+ * @public
11
+ */
12
+ export declare enum BackstageItemType {
13
+ /** Item that executes an action function */
14
+ ActionItem = 1,
15
+ /** Item that activate a stage. */
16
+ StageLauncher = 2
17
+ }
18
+ /** Describes the data needed to insert a button into the backstage menu.
19
+ * @deprecated in 3.6. Use [CommonBackstageItem]($appui-react) instead.
20
+ * @public
21
+ */
22
+ export interface CommonBackstageItem extends ProvidedItem {
23
+ /** can be used by application to store miscellaneous data. */
24
+ applicationData?: any;
25
+ /** Describes badge. Renders no badge if not specified. */
26
+ readonly badgeType?: BadgeType;
27
+ /** Specifies the item's grouping value. Items are sorted by group and then item priority. When
28
+ * group priority changes a separator is inserted. It is recommended using values 10 through 100, incrementing by 10. This
29
+ * allows extensions enough gaps to insert their own groups.
30
+ */
31
+ readonly groupPriority: number;
32
+ /** Name of icon WebFont entry or if specifying an imported SVG symbol use "webSvg:" prefix to imported symbol Id. */
33
+ readonly icon?: string | ConditionalStringValue;
34
+ /** Required unique id of the item. To ensure uniqueness it is suggested that a namespace prefix of the extension name be used. */
35
+ readonly id: string;
36
+ /** optional data to be used by item implementor. */
37
+ readonly internalData?: Map<string, any>;
38
+ /** Describes if the item is visible or hidden. The default is for the item to be visible. */
39
+ readonly isHidden?: boolean | ConditionalBooleanValue;
40
+ /** Describes if the item is enabled or disabled. The default is for the item to be enabled. */
41
+ readonly isDisabled?: boolean | ConditionalBooleanValue;
42
+ /** Priority within a group (recommend using values 1 through 100). */
43
+ readonly itemPriority: number;
44
+ /** Label. */
45
+ readonly label: string | ConditionalStringValue;
46
+ /** Subtitle. */
47
+ readonly subtitle?: string | ConditionalStringValue;
48
+ /** Tooltip. */
49
+ readonly tooltip?: string | ConditionalStringValue;
50
+ /** Describes if the item is active. The default is for the item to be active if stageId matches activeFrontstageId */
51
+ readonly isActive?: boolean | ConditionalBooleanValue;
52
+ }
53
+ /** Describes the data needed to insert an action button into the backstage menu.
54
+ * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.
55
+ * @public
56
+ */
57
+ export interface BackstageActionItem extends CommonBackstageItem {
58
+ readonly execute: () => void;
59
+ }
60
+ /** Describes the data needed to insert an action button into the backstage menu.
61
+ * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.
62
+ * @public
63
+ */
64
+ export interface BackstageStageLauncher extends CommonBackstageItem {
65
+ readonly stageId: string;
66
+ }
67
+ /** Describes the data needed to insert a button into the backstage menu.
68
+ * @deprecated in 3.6. Use [BackstageItem]($appui-react) instead.
69
+ * @public
70
+ */
71
+ export type BackstageItem = BackstageActionItem | BackstageStageLauncher;
72
+ /** BackstageActionItem type guard.
73
+ * @deprecated in 3.6. Use [isBackstageActionItem]($appui-react) instead.
74
+ * @public
75
+ */
76
+ export declare const isActionItem: (item: BackstageItem) => item is BackstageActionItem;
77
+ /** BackstageStageLauncher type guard.
78
+ * @deprecated in 3.6. Use [isBackstageStageLauncher]($appui-react) instead.
79
+ * @public
80
+ */
81
+ export declare const isStageLauncher: (item: BackstageItem) => item is BackstageStageLauncher;
82
+ /** Utilities for creating and maintaining backstage items
83
+ * @deprecated in 3.6. Use [BackstageItemUtilities]($appui-react) instead.
84
+ * @public
85
+ */
86
+ export declare class BackstageItemUtilities {
87
+ /** Creates a stage launcher backstage item */
88
+ static createStageLauncher: (frontstageId: string, groupPriority: number, itemPriority: number, label: string | ConditionalStringValue, subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageStageLauncher>) => BackstageStageLauncher;
89
+ /** Creates an action backstage item */
90
+ static createActionItem: (itemId: string, groupPriority: number, itemPriority: number, execute: () => void, label: string | ConditionalStringValue, subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageActionItem>) => BackstageActionItem;
91
+ }
92
92
  //# sourceMappingURL=BackstageItem.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"BackstageItem.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/backstage/BackstageItem.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,uBAAuB,EAAE,MAAM,kCAAkC,CAAC;AAC3E,OAAO,EAAE,sBAAsB,EAAE,MAAM,iCAAiC,CAAC;AACzE,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAErD;;;GAGG;AACH,oBAAY,iBAAiB;IAC3B,4CAA4C;IAC5C,UAAU,IAAI;IACd,kCAAkC;IAClC,aAAa,IAAI;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACvD,8DAA8D;IAC9D,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,0DAA0D;IAC1D,QAAQ,CAAC,SAAS,CAAC,EAAE,SAAS,CAAC;IAC/B;;;OAGG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,qHAAqH;IACrH,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAAC;IAChD,kIAAkI;IAClI,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,oDAAoD;IACpD,QAAQ,CAAC,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACzC,6FAA6F;IAC7F,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,uBAAuB,CAA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EAAE,MAAM,GAAG,sBAAsB,CAAC;IACnD,sHAAsH;IACtH,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,GAAG,uBAAuB,CAAC;CACvD;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,mBAAmB;IAC9D,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;CAC9B;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,sBAAsB,CAAC;AAEzE;;;GAGG;AACH,eAAO,MAAM,YAAY,SAAU,aAAa,gCAE/C,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,SAAU,aAAa,mCAElD,CAAC;AAEF;;;GAGG;AACH,qBAAa,sBAAsB;IACjC,8CAA8C;IAC9C,OAAc,mBAAmB,iBACjB,MAAM,iBAAiB,MAAM,gBAAgB,MAAM,SAAS,MAAM,GAAG,sBAAsB,aAC9F,MAAM,GAAG,sBAAsB,SAAS,MAAM,GAAG,sBAAsB,cAAc,QAAQ,sBAAsB,CAAC,KAC9H,sBAAsB,CAUtB;IAEH,uCAAuC;IACvC,OAAc,gBAAgB,WACpB,MAAM,iBAAiB,MAAM,gBAAgB,MAAM,WAAW,MAAM,IAAI,SAAS,MAAM,GAAG,sBAAsB,aAC7G,MAAM,GAAG,sBAAsB,SAAS,MAAM,GAAG,sBAAsB,cAAc,QAAQ,mBAAmB,CAAC,KAC3H,mBAAmB,CAUnB;CACJ"}
@@ -1,71 +1,71 @@
1
- "use strict";
2
- /*---------------------------------------------------------------------------------------------
3
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
- * See LICENSE.md in the project root for license terms and full copyright notice.
5
- *--------------------------------------------------------------------------------------------*/
6
- /** @packageDocumentation
7
- * @module Backstage
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.BackstageItemUtilities = exports.isStageLauncher = exports.isActionItem = exports.BackstageItemType = void 0;
11
- /** Used to specify the item type added to the backstage menu.
12
- * @deprecated in 3.6. Use type guards instead.
13
- * @public
14
- */
15
- var BackstageItemType;
16
- (function (BackstageItemType) {
17
- /** Item that executes an action function */
18
- BackstageItemType[BackstageItemType["ActionItem"] = 1] = "ActionItem";
19
- /** Item that activate a stage. */
20
- BackstageItemType[BackstageItemType["StageLauncher"] = 2] = "StageLauncher";
21
- })(BackstageItemType = exports.BackstageItemType || (exports.BackstageItemType = {}));
22
- /** BackstageActionItem type guard.
23
- * @deprecated in 3.6. Use [isBackstageActionItem]($appui-react) instead.
24
- * @public
25
- */
26
- const isActionItem = (item) => {
27
- return item.execute !== undefined; // eslint-disable-line deprecation/deprecation
28
- };
29
- exports.isActionItem = isActionItem;
30
- /** BackstageStageLauncher type guard.
31
- * @deprecated in 3.6. Use [isBackstageStageLauncher]($appui-react) instead.
32
- * @public
33
- */
34
- const isStageLauncher = (item) => {
35
- return item.stageId !== undefined; // eslint-disable-line deprecation/deprecation
36
- };
37
- exports.isStageLauncher = isStageLauncher;
38
- /** Utilities for creating and maintaining backstage items
39
- * @deprecated in 3.6. Use [BackstageItemUtilities]($appui-react) instead.
40
- * @public
41
- */
42
- class BackstageItemUtilities {
43
- }
44
- exports.BackstageItemUtilities = BackstageItemUtilities;
45
- /** Creates a stage launcher backstage item */
46
- BackstageItemUtilities.createStageLauncher = (frontstageId, groupPriority, itemPriority, label, subtitle, icon, overrides // eslint-disable-line deprecation/deprecation
47
- ) => ({
48
- groupPriority,
49
- icon,
50
- internalData: overrides?.internalData,
51
- id: frontstageId,
52
- itemPriority,
53
- label,
54
- stageId: frontstageId,
55
- subtitle,
56
- ...overrides,
57
- });
58
- /** Creates an action backstage item */
59
- BackstageItemUtilities.createActionItem = (itemId, groupPriority, itemPriority, execute, label, subtitle, icon, overrides // eslint-disable-line deprecation/deprecation
60
- ) => ({
61
- execute,
62
- groupPriority,
63
- icon,
64
- internalData: overrides?.internalData,
65
- id: itemId,
66
- itemPriority,
67
- label,
68
- subtitle,
69
- ...overrides,
70
- });
1
+ "use strict";
2
+ /*---------------------------------------------------------------------------------------------
3
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
4
+ * See LICENSE.md in the project root for license terms and full copyright notice.
5
+ *--------------------------------------------------------------------------------------------*/
6
+ /** @packageDocumentation
7
+ * @module Backstage
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.BackstageItemUtilities = exports.isStageLauncher = exports.isActionItem = exports.BackstageItemType = void 0;
11
+ /** Used to specify the item type added to the backstage menu.
12
+ * @deprecated in 3.6. Use type guards instead.
13
+ * @public
14
+ */
15
+ var BackstageItemType;
16
+ (function (BackstageItemType) {
17
+ /** Item that executes an action function */
18
+ BackstageItemType[BackstageItemType["ActionItem"] = 1] = "ActionItem";
19
+ /** Item that activate a stage. */
20
+ BackstageItemType[BackstageItemType["StageLauncher"] = 2] = "StageLauncher";
21
+ })(BackstageItemType = exports.BackstageItemType || (exports.BackstageItemType = {}));
22
+ /** BackstageActionItem type guard.
23
+ * @deprecated in 3.6. Use [isBackstageActionItem]($appui-react) instead.
24
+ * @public
25
+ */
26
+ const isActionItem = (item) => {
27
+ return item.execute !== undefined; // eslint-disable-line deprecation/deprecation
28
+ };
29
+ exports.isActionItem = isActionItem;
30
+ /** BackstageStageLauncher type guard.
31
+ * @deprecated in 3.6. Use [isBackstageStageLauncher]($appui-react) instead.
32
+ * @public
33
+ */
34
+ const isStageLauncher = (item) => {
35
+ return item.stageId !== undefined; // eslint-disable-line deprecation/deprecation
36
+ };
37
+ exports.isStageLauncher = isStageLauncher;
38
+ /** Utilities for creating and maintaining backstage items
39
+ * @deprecated in 3.6. Use [BackstageItemUtilities]($appui-react) instead.
40
+ * @public
41
+ */
42
+ class BackstageItemUtilities {
43
+ }
44
+ /** Creates a stage launcher backstage item */
45
+ BackstageItemUtilities.createStageLauncher = (frontstageId, groupPriority, itemPriority, label, subtitle, icon, overrides // eslint-disable-line deprecation/deprecation
46
+ ) => ({
47
+ groupPriority,
48
+ icon,
49
+ internalData: overrides?.internalData,
50
+ id: frontstageId,
51
+ itemPriority,
52
+ label,
53
+ stageId: frontstageId,
54
+ subtitle,
55
+ ...overrides,
56
+ });
57
+ /** Creates an action backstage item */
58
+ BackstageItemUtilities.createActionItem = (itemId, groupPriority, itemPriority, execute, label, subtitle, icon, overrides // eslint-disable-line deprecation/deprecation
59
+ ) => ({
60
+ execute,
61
+ groupPriority,
62
+ icon,
63
+ internalData: overrides?.internalData,
64
+ id: itemId,
65
+ itemPriority,
66
+ label,
67
+ subtitle,
68
+ ...overrides,
69
+ });
70
+ exports.BackstageItemUtilities = BackstageItemUtilities;
71
71
  //# sourceMappingURL=BackstageItem.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"BackstageItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/backstage/BackstageItem.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAOH;;;GAGG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,4CAA4C;IAC5C,qEAAc,CAAA;IACd,kCAAkC;IAClC,2EAAiB,CAAA;AACnB,CAAC,EALW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAK5B;AA4DD;;;GAGG;AACI,MAAM,YAAY,GAAG,CAAC,IAAmB,EAA+B,EAAE;IAC/E,OAAQ,IAA4B,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,8CAA8C;AAC5G,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB;AAEF;;;GAGG;AACI,MAAM,eAAe,GAAG,CAAC,IAAmB,EAAkC,EAAE;IACrF,OAAQ,IAA+B,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,8CAA8C;AAC/G,CAAC,CAAC;AAFW,QAAA,eAAe,mBAE1B;AAEF;;;GAGG;AACH,MAAa,sBAAsB;;AAAnC,wDAgCC;AA/BC,8CAA8C;AAChC,0CAAmB,GAAG,CAClC,YAAoB,EAAE,aAAqB,EAAE,YAAoB,EAAE,KAAsC,EACzG,QAA0C,EAAE,IAAsC,EAAE,SAA2C,CAAC,8CAA8C;EACtJ,EAAE,CAAC,CAAC;IAC5B,aAAa;IACb,IAAI;IACJ,YAAY,EAAE,SAAS,EAAE,YAAY;IACrC,EAAE,EAAE,YAAY;IAChB,YAAY;IACZ,KAAK;IACL,OAAO,EAAE,YAAY;IACrB,QAAQ;IACR,GAAG,SAAS;CACb,CAAC,CAAC;AAEH,uCAAuC;AACzB,uCAAgB,GAAG,CAC/B,MAAc,EAAE,aAAqB,EAAE,YAAoB,EAAE,OAAmB,EAAE,KAAsC,EACxH,QAA0C,EAAE,IAAsC,EAAE,SAAwC,CAAC,8CAA8C;EACtJ,EAAE,CAAC,CAAC;IACzB,OAAO;IACP,aAAa;IACb,IAAI;IACJ,YAAY,EAAE,SAAS,EAAE,YAAY;IACrC,EAAE,EAAE,MAAM;IACV,YAAY;IACZ,KAAK;IACL,QAAQ;IACR,GAAG,SAAS;CACb,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Backstage\r\n */\r\n\r\nimport { BadgeType } from \"../items/BadgeType\";\r\nimport { ConditionalBooleanValue } from \"../items/ConditionalBooleanValue\";\r\nimport { ConditionalStringValue } from \"../items/ConditionalStringValue\";\r\nimport { ProvidedItem } from \"../items/ProvidedItem\";\r\n\r\n/** Used to specify the item type added to the backstage menu.\r\n * @deprecated in 3.6. Use type guards instead.\r\n * @public\r\n */\r\nexport enum BackstageItemType {\r\n /** Item that executes an action function */\r\n ActionItem = 1,\r\n /** Item that activate a stage. */\r\n StageLauncher = 2,\r\n}\r\n\r\n/** Describes the data needed to insert a button into the backstage menu.\r\n * @deprecated in 3.6. Use [CommonBackstageItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface CommonBackstageItem extends ProvidedItem { // eslint-disable-line deprecation/deprecation\r\n /** can be used by application to store miscellaneous data. */\r\n applicationData?: any;\r\n /** Describes badge. Renders no badge if not specified. */\r\n readonly badgeType?: BadgeType;\r\n /** Specifies the item's grouping value. Items are sorted by group and then item priority. When\r\n * group priority changes a separator is inserted. It is recommended using values 10 through 100, incrementing by 10. This\r\n * allows extensions enough gaps to insert their own groups.\r\n */\r\n readonly groupPriority: number;\r\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\r\n readonly icon?: string | ConditionalStringValue;\r\n /** Required unique id of the item. To ensure uniqueness it is suggested that a namespace prefix of the extension name be used. */\r\n readonly id: string;\r\n /** optional data to be used by item implementor. */\r\n readonly internalData?: Map<string, any>;\r\n /** Describes if the item is visible or hidden. The default is for the item to be visible. */\r\n readonly isHidden?: boolean | ConditionalBooleanValue;\r\n /** Describes if the item is enabled or disabled. The default is for the item to be enabled. */\r\n readonly isDisabled?: boolean | ConditionalBooleanValue;\r\n /** Priority within a group (recommend using values 1 through 100). */\r\n readonly itemPriority: number;\r\n /** Label. */\r\n readonly label: string | ConditionalStringValue;\r\n /** Subtitle. */\r\n readonly subtitle?: string | ConditionalStringValue;\r\n /** Tooltip. */\r\n readonly tooltip?: string | ConditionalStringValue;\r\n /** Describes if the item is active. The default is for the item to be active if stageId matches activeFrontstageId */\r\n readonly isActive?: boolean | ConditionalBooleanValue;\r\n}\r\n\r\n/** Describes the data needed to insert an action button into the backstage menu.\r\n * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface BackstageActionItem extends CommonBackstageItem { // eslint-disable-line deprecation/deprecation\r\n readonly execute: () => void;\r\n}\r\n\r\n/** Describes the data needed to insert an action button into the backstage menu.\r\n * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport interface BackstageStageLauncher extends CommonBackstageItem { // eslint-disable-line deprecation/deprecation\r\n readonly stageId: string;\r\n}\r\n\r\n/** Describes the data needed to insert a button into the backstage menu.\r\n * @deprecated in 3.6. Use [BackstageItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport type BackstageItem = BackstageActionItem | BackstageStageLauncher; // eslint-disable-line deprecation/deprecation\r\n\r\n/** BackstageActionItem type guard.\r\n * @deprecated in 3.6. Use [isBackstageActionItem]($appui-react) instead.\r\n * @public\r\n */\r\nexport const isActionItem = (item: BackstageItem): item is BackstageActionItem => { // eslint-disable-line deprecation/deprecation\r\n return (item as BackstageActionItem).execute !== undefined; // eslint-disable-line deprecation/deprecation\r\n};\r\n\r\n/** BackstageStageLauncher type guard.\r\n * @deprecated in 3.6. Use [isBackstageStageLauncher]($appui-react) instead.\r\n * @public\r\n */\r\nexport const isStageLauncher = (item: BackstageItem): item is BackstageStageLauncher => { // eslint-disable-line deprecation/deprecation\r\n return (item as BackstageStageLauncher).stageId !== undefined; // eslint-disable-line deprecation/deprecation\r\n};\r\n\r\n/** Utilities for creating and maintaining backstage items\r\n * @deprecated in 3.6. Use [BackstageItemUtilities]($appui-react) instead.\r\n * @public\r\n */\r\nexport class BackstageItemUtilities {\r\n /** Creates a stage launcher backstage item */\r\n public static createStageLauncher = (\r\n frontstageId: string, groupPriority: number, itemPriority: number, label: string | ConditionalStringValue,\r\n subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageStageLauncher> // eslint-disable-line deprecation/deprecation\r\n ): BackstageStageLauncher => ({ // eslint-disable-line deprecation/deprecation\r\n groupPriority,\r\n icon,\r\n internalData: overrides?.internalData,\r\n id: frontstageId,\r\n itemPriority,\r\n label,\r\n stageId: frontstageId,\r\n subtitle,\r\n ...overrides,\r\n });\r\n\r\n /** Creates an action backstage item */\r\n public static createActionItem = (\r\n itemId: string, groupPriority: number, itemPriority: number, execute: () => void, label: string | ConditionalStringValue,\r\n subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageActionItem> // eslint-disable-line deprecation/deprecation\r\n ): BackstageActionItem => ({ // eslint-disable-line deprecation/deprecation\r\n execute,\r\n groupPriority,\r\n icon,\r\n internalData: overrides?.internalData,\r\n id: itemId,\r\n itemPriority,\r\n label,\r\n subtitle,\r\n ...overrides,\r\n });\r\n}\r\n"]}
1
+ {"version":3,"file":"BackstageItem.js","sourceRoot":"","sources":["../../../../src/appui-abstract/backstage/BackstageItem.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAOH;;;GAGG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,4CAA4C;IAC5C,qEAAc,CAAA;IACd,kCAAkC;IAClC,2EAAiB,CAAA;AACnB,CAAC,EALW,iBAAiB,GAAjB,yBAAiB,KAAjB,yBAAiB,QAK5B;AA4DD;;;GAGG;AACI,MAAM,YAAY,GAAG,CAAC,IAAmB,EAA+B,EAAE;IAC/E,OAAQ,IAA4B,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,8CAA8C;AAC5G,CAAC,CAAC;AAFW,QAAA,YAAY,gBAEvB;AAEF;;;GAGG;AACI,MAAM,eAAe,GAAG,CAAC,IAAmB,EAAkC,EAAE;IACrF,OAAQ,IAA+B,CAAC,OAAO,KAAK,SAAS,CAAC,CAAC,8CAA8C;AAC/G,CAAC,CAAC;AAFW,QAAA,eAAe,mBAE1B;AAEF;;;GAGG;AACH,MAAa,sBAAsB;;AACjC,8CAA8C;AAChC,0CAAmB,GAAG,CAClC,YAAoB,EAAE,aAAqB,EAAE,YAAoB,EAAE,KAAsC,EACzG,QAA0C,EAAE,IAAsC,EAAE,SAA2C,CAAC,8CAA8C;EACtJ,EAAE,CAAC,CAAC;IAC5B,aAAa;IACb,IAAI;IACJ,YAAY,EAAE,SAAS,EAAE,YAAY;IACrC,EAAE,EAAE,YAAY;IAChB,YAAY;IACZ,KAAK;IACL,OAAO,EAAE,YAAY;IACrB,QAAQ;IACR,GAAG,SAAS;CACb,CAAC,CAAC;AAEH,uCAAuC;AACzB,uCAAgB,GAAG,CAC/B,MAAc,EAAE,aAAqB,EAAE,YAAoB,EAAE,OAAmB,EAAE,KAAsC,EACxH,QAA0C,EAAE,IAAsC,EAAE,SAAwC,CAAC,8CAA8C;EACtJ,EAAE,CAAC,CAAC;IACzB,OAAO;IACP,aAAa;IACb,IAAI;IACJ,YAAY,EAAE,SAAS,EAAE,YAAY;IACrC,EAAE,EAAE,MAAM;IACV,YAAY;IACZ,KAAK;IACL,QAAQ;IACR,GAAG,SAAS;CACb,CAAC,CAAC;AA/BQ,wDAAsB","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 Backstage\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 item type added to the backstage menu.\n * @deprecated in 3.6. Use type guards instead.\n * @public\n */\nexport enum BackstageItemType {\n /** Item that executes an action function */\n ActionItem = 1,\n /** Item that activate a stage. */\n StageLauncher = 2,\n}\n\n/** Describes the data needed to insert a button into the backstage menu.\n * @deprecated in 3.6. Use [CommonBackstageItem]($appui-react) instead.\n * @public\n */\nexport interface CommonBackstageItem extends ProvidedItem { // eslint-disable-line deprecation/deprecation\n /** can be used by application to store miscellaneous data. */\n applicationData?: any;\n /** Describes badge. Renders no badge if not specified. */\n readonly badgeType?: BadgeType;\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.\n */\n readonly groupPriority: number;\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 /** Required unique id of 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 be used by item implementor. */\n readonly internalData?: Map<string, any>;\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 /** Priority within a group (recommend using values 1 through 100). */\n readonly itemPriority: number;\n /** Label. */\n readonly label: string | ConditionalStringValue;\n /** Subtitle. */\n readonly subtitle?: string | ConditionalStringValue;\n /** Tooltip. */\n readonly tooltip?: string | ConditionalStringValue;\n /** Describes if the item is active. The default is for the item to be active if stageId matches activeFrontstageId */\n readonly isActive?: boolean | ConditionalBooleanValue;\n}\n\n/** Describes the data needed to insert an action button into the backstage menu.\n * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.\n * @public\n */\nexport interface BackstageActionItem extends CommonBackstageItem { // eslint-disable-line deprecation/deprecation\n readonly execute: () => void;\n}\n\n/** Describes the data needed to insert an action button into the backstage menu.\n * @deprecated in 3.6. Use [BackstageActionItem]($appui-react) instead.\n * @public\n */\nexport interface BackstageStageLauncher extends CommonBackstageItem { // eslint-disable-line deprecation/deprecation\n readonly stageId: string;\n}\n\n/** Describes the data needed to insert a button into the backstage menu.\n * @deprecated in 3.6. Use [BackstageItem]($appui-react) instead.\n * @public\n */\nexport type BackstageItem = BackstageActionItem | BackstageStageLauncher; // eslint-disable-line deprecation/deprecation\n\n/** BackstageActionItem type guard.\n * @deprecated in 3.6. Use [isBackstageActionItem]($appui-react) instead.\n * @public\n */\nexport const isActionItem = (item: BackstageItem): item is BackstageActionItem => { // eslint-disable-line deprecation/deprecation\n return (item as BackstageActionItem).execute !== undefined; // eslint-disable-line deprecation/deprecation\n};\n\n/** BackstageStageLauncher type guard.\n * @deprecated in 3.6. Use [isBackstageStageLauncher]($appui-react) instead.\n * @public\n */\nexport const isStageLauncher = (item: BackstageItem): item is BackstageStageLauncher => { // eslint-disable-line deprecation/deprecation\n return (item as BackstageStageLauncher).stageId !== undefined; // eslint-disable-line deprecation/deprecation\n};\n\n/** Utilities for creating and maintaining backstage items\n * @deprecated in 3.6. Use [BackstageItemUtilities]($appui-react) instead.\n * @public\n */\nexport class BackstageItemUtilities {\n /** Creates a stage launcher backstage item */\n public static createStageLauncher = (\n frontstageId: string, groupPriority: number, itemPriority: number, label: string | ConditionalStringValue,\n subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageStageLauncher> // eslint-disable-line deprecation/deprecation\n ): BackstageStageLauncher => ({ // eslint-disable-line deprecation/deprecation\n groupPriority,\n icon,\n internalData: overrides?.internalData,\n id: frontstageId,\n itemPriority,\n label,\n stageId: frontstageId,\n subtitle,\n ...overrides,\n });\n\n /** Creates an action backstage item */\n public static createActionItem = (\n itemId: string, groupPriority: number, itemPriority: number, execute: () => void, label: string | ConditionalStringValue,\n subtitle?: string | ConditionalStringValue, icon?: string | ConditionalStringValue, overrides?: Partial<BackstageActionItem> // eslint-disable-line deprecation/deprecation\n ): BackstageActionItem => ({ // eslint-disable-line deprecation/deprecation\n execute,\n groupPriority,\n icon,\n internalData: overrides?.internalData,\n id: itemId,\n itemPriority,\n label,\n subtitle,\n ...overrides,\n });\n}\n"]}