@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,171 +1,172 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- /** @packageDocumentation
6
- * @module Dialog
7
- */
8
- import { BeUiEvent } from "@itwin/core-bentley";
9
- import { PropertyEditorParamTypes } from "../properties/EditorParams";
10
- import { PropertyRecord } from "../properties/Record";
11
- import { PropertyValueFormat } from "../properties/Value";
12
- import { PropertyChangeStatus, UiDataProvider } from "./UiDataProvider";
13
- /** Enum for button types. Determines button label, and default button style.
14
- * @public
15
- */
16
- export var DialogButtonType;
17
- (function (DialogButtonType) {
18
- DialogButtonType["None"] = "";
19
- DialogButtonType["Close"] = "close";
20
- DialogButtonType["OK"] = "ok";
21
- DialogButtonType["Cancel"] = "cancel";
22
- DialogButtonType["Yes"] = "yes";
23
- DialogButtonType["No"] = "no";
24
- DialogButtonType["Retry"] = "retry";
25
- DialogButtonType["Next"] = "next";
26
- DialogButtonType["Previous"] = "previous";
27
- })(DialogButtonType || (DialogButtonType = {}));
28
- /** Enum for button style.
29
- * @public
30
- */
31
- export var DialogButtonStyle;
32
- (function (DialogButtonStyle) {
33
- DialogButtonStyle["None"] = "";
34
- DialogButtonStyle["Primary"] = "iui-cta";
35
- DialogButtonStyle["Hollow"] = "iui-default";
36
- DialogButtonStyle["Blue"] = "iui-high-visibility";
37
- })(DialogButtonStyle || (DialogButtonStyle = {}));
38
- /**
39
- * @public
40
- */
41
- export class UiLayoutDataProvider extends UiDataProvider {
42
- constructor() {
43
- super(...arguments);
44
- /** Applies change of a single property - this is the default method used when property editors are dynamically generated. */
45
- // istanbul ignore next
46
- this.applyUiPropertyChange = (_updatedValue) => {
47
- throw (new Error("Derived UiDataProvider should implement this to apply change to a single property."));
48
- };
49
- }
50
- /** Applies changes from one or more properties - some dialogs will use this to send a bulk set of changes back to the provider */
51
- processChangesInUi(properties) {
52
- // Default implementation is to just pass each property to applyUiPropertyChange
53
- properties.forEach((property) => this.applyUiPropertyChange(property));
54
- return { status: PropertyChangeStatus.Success };
55
- }
56
- /** Array of dialog rows */
57
- get rows() {
58
- if (!this._rows) {
59
- this._rows = this.layoutDialogRows();
60
- }
61
- return this._rows;
62
- }
63
- loadItemsInternal(items) {
64
- this._items = items ? items : [];
65
- this._rows = this.layoutDialogRows();
66
- }
67
- /** Called by UI to request available properties that can be bound to user supplied UI components (See Tool1UiProvider for example). */
68
- // istanbul ignore next
69
- supplyDialogItems() {
70
- throw (new Error("Derived UiDataProvider must implement this method to supply set of properties."));
71
- }
72
- get items() {
73
- if (undefined === this._items) {
74
- this.loadItemsInternal(this.supplyDialogItems());
75
- }
76
- return this._items;
77
- }
78
- /** Called to inform listeners that new properties are ready for display in UI. */
79
- reloadDialogItems(emitEvent = true) {
80
- this.loadItemsInternal(this.supplyDialogItems());
81
- // istanbul ignore else
82
- if (emitEvent)
83
- this.fireItemsReloadedEvent();
84
- }
85
- /**
86
- * @internal
87
- */
88
- layoutDialogRows() {
89
- const rows = [];
90
- this.items.forEach((item) => {
91
- const row = rows.find((value) => value.priority === item.editorPosition.rowPriority);
92
- if (row) {
93
- row.items.push(item);
94
- }
95
- else {
96
- rows.push({ priority: item.editorPosition.rowPriority, items: [item] });
97
- }
98
- });
99
- // sort rows
100
- rows.sort((a, b) => a.priority - b.priority);
101
- // sort records
102
- rows.forEach((row) => row.items.sort((a, b) => a.editorPosition.columnIndex - b.editorPosition.columnIndex));
103
- return rows;
104
- }
105
- /** Determines if a dialog item editor wants a label */
106
- static editorWantsLabel(item) {
107
- if (item.property.editor && item.property.editor.params) {
108
- const params = item.property.editor.params.find((param) => param.type === PropertyEditorParamTypes.SuppressEditorLabel);
109
- // istanbul ignore else
110
- if (params)
111
- return false;
112
- }
113
- return true;
114
- }
115
- /** Determines if a dialog items has an associated lock property */
116
- static hasAssociatedLockProperty(item) {
117
- return !!item.lockProperty;
118
- }
119
- /** Gets the disabled state for a given dialog item */
120
- static getItemDisabledState(baseDialogItem) {
121
- const dialogItem = baseDialogItem;
122
- // istanbul ignore else
123
- if (dialogItem === undefined || dialogItem.lockProperty === undefined)
124
- return !!baseDialogItem.isDisabled;
125
- const value = dialogItem.lockProperty.value;
126
- // istanbul ignore next
127
- if (value === undefined)
128
- return !!baseDialogItem.isDisabled;
129
- return !value.value;
130
- }
131
- /** Determines if a dialog row only contains button group editors */
132
- static onlyContainButtonGroupEditors(row) {
133
- for (const item of row.items) {
134
- // istanbul ignore else
135
- if (UiLayoutDataProvider.hasAssociatedLockProperty(item) || undefined === item.property.editor || "enum-buttongroup" !== item.property.editor.name || UiLayoutDataProvider.editorWantsLabel(item))
136
- return false;
137
- }
138
- return true;
139
- }
140
- }
141
- /** Gets a property record for a given dialog item */
142
- UiLayoutDataProvider.getPropertyRecord = (dialogItem) => {
143
- const propertyValue = { valueFormat: PropertyValueFormat.Primitive, value: dialogItem.value.value, displayValue: dialogItem.value.displayValue };
144
- const record = new PropertyRecord(propertyValue, dialogItem.property);
145
- record.isDisabled = UiLayoutDataProvider.getItemDisabledState(dialogItem);
146
- return record;
147
- };
148
- /** [[DialogLayoutDataProvider]] Abstract class that allows property values to be passed between hosting API and Dialog that generates and arranges components dynamically
149
- * including the buttons at the bottom of the dialog.
150
- * @public
151
- */
152
- export class DialogLayoutDataProvider extends UiLayoutDataProvider {
153
- constructor() {
154
- super(...arguments);
155
- this.onButtonsReloadedEvent = new BeUiEvent();
156
- }
157
- /** Called to inform listeners that modal dialog button data needs to be refreshed. */
158
- fireDialogButtonsReloadEvent() {
159
- this.onButtonsReloadedEvent.emit();
160
- }
161
- supplyButtonData() {
162
- // Derived class should override
163
- const buttons = [];
164
- // istanbul ignore next
165
- buttons.push({ type: DialogButtonType.OK, onClick: () => { } });
166
- // istanbul ignore next
167
- buttons.push({ type: DialogButtonType.Cancel, onClick: () => { } });
168
- return buttons;
169
- }
170
- }
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module Dialog
7
+ */
8
+ import { BeUiEvent } from "@itwin/core-bentley";
9
+ import { PropertyEditorParamTypes } from "../properties/EditorParams";
10
+ import { PropertyRecord } from "../properties/Record";
11
+ import { PropertyValueFormat } from "../properties/Value";
12
+ import { PropertyChangeStatus, UiDataProvider } from "./UiDataProvider";
13
+ /** Enum for button types. Determines button label, and default button style.
14
+ * @public
15
+ */
16
+ export var DialogButtonType;
17
+ (function (DialogButtonType) {
18
+ DialogButtonType["None"] = "";
19
+ DialogButtonType["Close"] = "close";
20
+ DialogButtonType["OK"] = "ok";
21
+ DialogButtonType["Cancel"] = "cancel";
22
+ DialogButtonType["Yes"] = "yes";
23
+ DialogButtonType["No"] = "no";
24
+ DialogButtonType["Retry"] = "retry";
25
+ DialogButtonType["Next"] = "next";
26
+ DialogButtonType["Previous"] = "previous";
27
+ })(DialogButtonType || (DialogButtonType = {}));
28
+ /** Enum for button style.
29
+ * @public
30
+ */
31
+ export var DialogButtonStyle;
32
+ (function (DialogButtonStyle) {
33
+ DialogButtonStyle["None"] = "";
34
+ DialogButtonStyle["Primary"] = "iui-cta";
35
+ DialogButtonStyle["Hollow"] = "iui-default";
36
+ DialogButtonStyle["Blue"] = "iui-high-visibility";
37
+ })(DialogButtonStyle || (DialogButtonStyle = {}));
38
+ /**
39
+ * @public
40
+ */
41
+ class UiLayoutDataProvider extends UiDataProvider {
42
+ constructor() {
43
+ super(...arguments);
44
+ /** Applies change of a single property - this is the default method used when property editors are dynamically generated. */
45
+ // istanbul ignore next
46
+ this.applyUiPropertyChange = (_updatedValue) => {
47
+ throw (new Error("Derived UiDataProvider should implement this to apply change to a single property."));
48
+ };
49
+ }
50
+ /** Applies changes from one or more properties - some dialogs will use this to send a bulk set of changes back to the provider */
51
+ processChangesInUi(properties) {
52
+ // Default implementation is to just pass each property to applyUiPropertyChange
53
+ properties.forEach((property) => this.applyUiPropertyChange(property));
54
+ return { status: PropertyChangeStatus.Success };
55
+ }
56
+ /** Array of dialog rows */
57
+ get rows() {
58
+ if (!this._rows) {
59
+ this._rows = this.layoutDialogRows();
60
+ }
61
+ return this._rows;
62
+ }
63
+ loadItemsInternal(items) {
64
+ this._items = items ? items : [];
65
+ this._rows = this.layoutDialogRows();
66
+ }
67
+ /** Called by UI to request available properties that can be bound to user supplied UI components (See Tool1UiProvider for example). */
68
+ // istanbul ignore next
69
+ supplyDialogItems() {
70
+ throw (new Error("Derived UiDataProvider must implement this method to supply set of properties."));
71
+ }
72
+ get items() {
73
+ if (undefined === this._items) {
74
+ this.loadItemsInternal(this.supplyDialogItems());
75
+ }
76
+ return this._items;
77
+ }
78
+ /** Called to inform listeners that new properties are ready for display in UI. */
79
+ reloadDialogItems(emitEvent = true) {
80
+ this.loadItemsInternal(this.supplyDialogItems());
81
+ // istanbul ignore else
82
+ if (emitEvent)
83
+ this.fireItemsReloadedEvent();
84
+ }
85
+ /**
86
+ * @internal
87
+ */
88
+ layoutDialogRows() {
89
+ const rows = [];
90
+ this.items.forEach((item) => {
91
+ const row = rows.find((value) => value.priority === item.editorPosition.rowPriority);
92
+ if (row) {
93
+ row.items.push(item);
94
+ }
95
+ else {
96
+ rows.push({ priority: item.editorPosition.rowPriority, items: [item] });
97
+ }
98
+ });
99
+ // sort rows
100
+ rows.sort((a, b) => a.priority - b.priority);
101
+ // sort records
102
+ rows.forEach((row) => row.items.sort((a, b) => a.editorPosition.columnIndex - b.editorPosition.columnIndex));
103
+ return rows;
104
+ }
105
+ /** Determines if a dialog item editor wants a label */
106
+ static editorWantsLabel(item) {
107
+ if (item.property.editor && item.property.editor.params) {
108
+ const params = item.property.editor.params.find((param) => param.type === PropertyEditorParamTypes.SuppressEditorLabel);
109
+ // istanbul ignore else
110
+ if (params)
111
+ return false;
112
+ }
113
+ return true;
114
+ }
115
+ /** Determines if a dialog items has an associated lock property */
116
+ static hasAssociatedLockProperty(item) {
117
+ return !!item.lockProperty;
118
+ }
119
+ /** Gets the disabled state for a given dialog item */
120
+ static getItemDisabledState(baseDialogItem) {
121
+ const dialogItem = baseDialogItem;
122
+ // istanbul ignore else
123
+ if (dialogItem === undefined || dialogItem.lockProperty === undefined)
124
+ return !!baseDialogItem.isDisabled;
125
+ const value = dialogItem.lockProperty.value;
126
+ // istanbul ignore next
127
+ if (value === undefined)
128
+ return !!baseDialogItem.isDisabled;
129
+ return !value.value;
130
+ }
131
+ /** Determines if a dialog row only contains button group editors */
132
+ static onlyContainButtonGroupEditors(row) {
133
+ for (const item of row.items) {
134
+ // istanbul ignore else
135
+ if (UiLayoutDataProvider.hasAssociatedLockProperty(item) || undefined === item.property.editor || "enum-buttongroup" !== item.property.editor.name || UiLayoutDataProvider.editorWantsLabel(item))
136
+ return false;
137
+ }
138
+ return true;
139
+ }
140
+ }
141
+ /** Gets a property record for a given dialog item */
142
+ UiLayoutDataProvider.getPropertyRecord = (dialogItem) => {
143
+ const propertyValue = { valueFormat: PropertyValueFormat.Primitive, value: dialogItem.value.value, displayValue: dialogItem.value.displayValue };
144
+ const record = new PropertyRecord(propertyValue, dialogItem.property);
145
+ record.isDisabled = UiLayoutDataProvider.getItemDisabledState(dialogItem);
146
+ return record;
147
+ };
148
+ export { UiLayoutDataProvider };
149
+ /** [[DialogLayoutDataProvider]] Abstract class that allows property values to be passed between hosting API and Dialog that generates and arranges components dynamically
150
+ * including the buttons at the bottom of the dialog.
151
+ * @public
152
+ */
153
+ export class DialogLayoutDataProvider extends UiLayoutDataProvider {
154
+ constructor() {
155
+ super(...arguments);
156
+ this.onButtonsReloadedEvent = new BeUiEvent();
157
+ }
158
+ /** Called to inform listeners that modal dialog button data needs to be refreshed. */
159
+ fireDialogButtonsReloadEvent() {
160
+ this.onButtonsReloadedEvent.emit();
161
+ }
162
+ supplyButtonData() {
163
+ // Derived class should override
164
+ const buttons = [];
165
+ // istanbul ignore next
166
+ buttons.push({ type: DialogButtonType.OK, onClick: () => { } });
167
+ // istanbul ignore next
168
+ buttons.push({ type: DialogButtonType.Cancel, onClick: () => { } });
169
+ return buttons;
170
+ }
171
+ }
171
172
  //# sourceMappingURL=UiLayoutDataProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UiLayoutDataProvider.js","sourceRoot":"","sources":["../../../../src/appui-abstract/dialogs/UiLayoutDataProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAwB,wBAAwB,EAA6B,MAAM,4BAA4B,CAAC;AACvH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAkB,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1E,OAAO,EAAwB,oBAAoB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE9F;;GAEG;AACH,MAAM,CAAN,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,6BAAS,CAAA;IACT,qCAAiB,CAAA;IACjB,+BAAW,CAAA;IACX,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,iCAAa,CAAA;IACb,yCAAqB,CAAA;AACvB,CAAC,EAVW,gBAAgB,KAAhB,gBAAgB,QAU3B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,8BAAS,CAAA;IACT,wCAAmB,CAAA;IACnB,2CAAsB,CAAA;IACtB,iDAA4B,CAAA;AAC9B,CAAC,EALW,iBAAiB,KAAjB,iBAAiB,QAK5B;AA4BD;;GAEG;AACH,MAAM,OAAgB,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AAG,CAAC,UAA0B,EAAkB,EAAE;IAC/E,MAAM,aAAa,GAAG,EAAE,WAAW,EAAE,mBAAmB,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,UAAU,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;IACjJ,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,aAA+B,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IACxF,MAAM,CAAC,UAAU,GAAG,oBAAoB,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;IAC1E,OAAO,MAAM,CAAC;AAChB,CAAC,CAAC;AAaJ;;;GAGG;AACH,MAAM,OAAgB,wBAAyB,SAAQ,oBAAoB;IAA3E;;QACS,2BAAsB,GAAG,IAAI,SAAS,EAAQ,CAAC;IAgBxD,CAAC;IAdC,sFAAsF;IAC/E,4BAA4B;QACjC,IAAI,CAAC,sBAAsB,CAAC,IAAI,EAAE,CAAC;IACrC,CAAC;IAEM,gBAAgB;QACrB,gCAAgC;QAChC,MAAM,OAAO,GAAsB,EAAE,CAAC;QACtC,uBAAuB;QACvB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QAChE,uBAAuB;QACvB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QACpE,OAAO,OAAO,CAAC;IACjB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\nimport { BeUiEvent } from \"@itwin/core-bentley\";\r\nimport { PropertyEditorParams, PropertyEditorParamTypes, SuppressLabelEditorParams } from \"../properties/EditorParams\";\r\nimport { PropertyRecord } from \"../properties/Record\";\r\nimport { PrimitiveValue, PropertyValueFormat } from \"../properties/Value\";\r\nimport { BaseDialogItem, DialogItem, DialogPropertyItem, DialogPropertySyncItem } from \"./DialogItem\";\r\nimport { PropertyChangeResult, PropertyChangeStatus, UiDataProvider } from \"./UiDataProvider\";\r\n\r\n/** Enum for button types. Determines button label, and default button style.\r\n * @public\r\n */\r\nexport enum DialogButtonType {\r\n None = \"\",\r\n Close = \"close\",\r\n OK = \"ok\",\r\n Cancel = \"cancel\",\r\n Yes = \"yes\",\r\n No = \"no\",\r\n Retry = \"retry\",\r\n Next = \"next\",\r\n Previous = \"previous\"\r\n}\r\n\r\n/** Enum for button style.\r\n * @public\r\n */\r\nexport enum DialogButtonStyle {\r\n None = \"\",\r\n Primary = \"iui-cta\",\r\n Hollow = \"iui-default\",\r\n Blue = \"iui-high-visibility\",\r\n}\r\n\r\n/** Interface for a dialog button in a button cluster\r\n * @public\r\n */\r\nexport interface DialogButtonDef {\r\n /** type of button */\r\n type: DialogButtonType;\r\n /** Triggered on button click */\r\n onClick: () => void;\r\n /** Which button style to decorate button width */\r\n buttonStyle?: DialogButtonStyle;\r\n /** Disable the button */\r\n disabled?: boolean;\r\n /** Custom label */\r\n label?: string;\r\n /** Custom CSS class */\r\n className?: string;\r\n}\r\n\r\n/** [[DialogRow]] is the interface that groups dialog items into rows for building UI\r\n * @public\r\n */\r\nexport interface DialogRow {\r\n priority: number;\r\n items: DialogItem[];\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport abstract class UiLayoutDataProvider extends UiDataProvider {\r\n private _items: ReadonlyArray<DialogItem> | undefined;\r\n\r\n /** Applies changes from one or more properties - some dialogs will use this to send a bulk set of changes back to the provider */\r\n public override processChangesInUi(properties: DialogPropertyItem[]): PropertyChangeResult {\r\n // Default implementation is to just pass each property to applyUiPropertyChange\r\n properties.forEach((property) => this.applyUiPropertyChange(property));\r\n return { status: PropertyChangeStatus.Success };\r\n }\r\n\r\n /** Applies change of a single property - this is the default method used when property editors are dynamically generated. */\r\n // istanbul ignore next\r\n public applyUiPropertyChange = (_updatedValue: DialogPropertySyncItem): void => {\r\n throw (new Error(\"Derived UiDataProvider should implement this to apply change to a single property.\"));\r\n };\r\n\r\n private _rows: DialogRow[] | undefined;\r\n\r\n /** Array of dialog rows */\r\n public get rows(): DialogRow[] {\r\n if (!this._rows) {\r\n this._rows = this.layoutDialogRows();\r\n }\r\n return this._rows;\r\n }\r\n\r\n protected loadItemsInternal(items: ReadonlyArray<DialogItem> | undefined) {\r\n this._items = items ? items : [];\r\n this._rows = this.layoutDialogRows();\r\n }\r\n\r\n /** Called by UI to request available properties that can be bound to user supplied UI components (See Tool1UiProvider for example). */\r\n // istanbul ignore next\r\n public supplyDialogItems(): DialogItem[] | undefined {\r\n throw (new Error(\"Derived UiDataProvider must implement this method to supply set of properties.\"));\r\n }\r\n\r\n public get items(): ReadonlyArray<DialogItem> {\r\n if (undefined === this._items) {\r\n this.loadItemsInternal(this.supplyDialogItems());\r\n }\r\n return this._items!;\r\n }\r\n\r\n /** Called to inform listeners that new properties are ready for display in UI. */\r\n public reloadDialogItems(emitEvent = true) {\r\n this.loadItemsInternal(this.supplyDialogItems());\r\n // istanbul ignore else\r\n if (emitEvent)\r\n this.fireItemsReloadedEvent();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public layoutDialogRows(): DialogRow[] {\r\n const rows: DialogRow[] = [];\r\n\r\n this.items.forEach((item) => {\r\n const row = rows.find((value) => value.priority === item.editorPosition.rowPriority);\r\n if (row) {\r\n row.items.push(item);\r\n } else {\r\n rows.push({ priority: item.editorPosition.rowPriority, items: [item] });\r\n }\r\n });\r\n\r\n // sort rows\r\n rows.sort((a: DialogRow, b: DialogRow) => a.priority - b.priority);\r\n // sort records\r\n rows.forEach((row: DialogRow) => row.items.sort((a: DialogItem, b: DialogItem) => a.editorPosition.columnIndex - b.editorPosition.columnIndex));\r\n return rows;\r\n }\r\n\r\n /** Determines if a dialog item editor wants a label */\r\n public static editorWantsLabel(item: DialogItem): boolean {\r\n if (item.property.editor && item.property.editor.params) {\r\n const params = item.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.SuppressEditorLabel) as SuppressLabelEditorParams;\r\n // istanbul ignore else\r\n if (params)\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n /** Determines if a dialog items has an associated lock property */\r\n public static hasAssociatedLockProperty(item: DialogItem): boolean {\r\n return !!item.lockProperty;\r\n }\r\n\r\n /** Gets the disabled state for a given dialog item */\r\n public static getItemDisabledState(baseDialogItem: BaseDialogItem): boolean {\r\n const dialogItem = baseDialogItem as DialogItem;\r\n // istanbul ignore else\r\n if (dialogItem === undefined || dialogItem.lockProperty === undefined)\r\n return !!baseDialogItem.isDisabled;\r\n const value = dialogItem.lockProperty.value;\r\n // istanbul ignore next\r\n if (value === undefined)\r\n return !!baseDialogItem.isDisabled;\r\n\r\n return !value.value;\r\n }\r\n\r\n /** Gets a property record for a given dialog item */\r\n public static getPropertyRecord = (dialogItem: BaseDialogItem): PropertyRecord => {\r\n const propertyValue = { valueFormat: PropertyValueFormat.Primitive, value: dialogItem.value.value, displayValue: dialogItem.value.displayValue };\r\n const record = new PropertyRecord(propertyValue as PrimitiveValue, dialogItem.property);\r\n record.isDisabled = UiLayoutDataProvider.getItemDisabledState(dialogItem);\r\n return record;\r\n };\r\n\r\n /** Determines if a dialog row only contains button group editors */\r\n public static onlyContainButtonGroupEditors(row: DialogRow): boolean {\r\n for (const item of row.items) {\r\n // istanbul ignore else\r\n if (UiLayoutDataProvider.hasAssociatedLockProperty(item) || undefined === item.property.editor || \"enum-buttongroup\" !== item.property.editor.name || UiLayoutDataProvider.editorWantsLabel(item))\r\n return false;\r\n }\r\n return true;\r\n }\r\n}\r\n\r\n/** [[DialogLayoutDataProvider]] Abstract class that allows property values to be passed between hosting API and Dialog that generates and arranges components dynamically\r\n * including the buttons at the bottom of the dialog.\r\n * @public\r\n */\r\nexport abstract class DialogLayoutDataProvider extends UiLayoutDataProvider {\r\n public onButtonsReloadedEvent = new BeUiEvent<void>();\r\n\r\n /** Called to inform listeners that modal dialog button data needs to be refreshed. */\r\n public fireDialogButtonsReloadEvent() {\r\n this.onButtonsReloadedEvent.emit();\r\n }\r\n\r\n public supplyButtonData(): DialogButtonDef[] | undefined {\r\n // Derived class should override\r\n const buttons: DialogButtonDef[] = [];\r\n // istanbul ignore next\r\n buttons.push({ type: DialogButtonType.OK, onClick: () => { } });\r\n // istanbul ignore next\r\n buttons.push({ type: DialogButtonType.Cancel, onClick: () => { } });\r\n return buttons;\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"UiLayoutDataProvider.js","sourceRoot":"","sources":["../../../../src/appui-abstract/dialogs/UiLayoutDataProvider.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAwB,wBAAwB,EAA6B,MAAM,4BAA4B,CAAC;AACvH,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAkB,mBAAmB,EAAE,MAAM,qBAAqB,CAAC;AAE1E,OAAO,EAAwB,oBAAoB,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAE9F;;GAEG;AACH,MAAM,CAAN,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,6BAAS,CAAA;IACT,qCAAiB,CAAA;IACjB,+BAAW,CAAA;IACX,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,iCAAa,CAAA;IACb,yCAAqB,CAAA;AACvB,CAAC,EAVW,gBAAgB,KAAhB,gBAAgB,QAU3B;AAED;;GAEG;AACH,MAAM,CAAN,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,8BAA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AAI,oBAAoB,CAAC,gBAAgB,CAAC,IAAI,CAAC;gBAC/L,OAAO,KAAK,CAAC;SAChB;QACD,OAAO,IAAI,CAAC;IACd,CAAC;;AAhBD,qDAAqD;AACvC,sCAAiB,GAAG,CAAC,UAA0B,EAAkB,EAAE;IAC/E,MAAM,aAAa,GAAG,EAAE,WAAW,EAAE,mBAAmB,CAAC,SAAS,EAAE,KAAK,EAAE,UAAU,CAAC,KAAK,CAAC,KAAK,EAAE,YAAY,EAAE,UAAU,CAAC,KAAK,CAAC,YAAY,EAAE,CAAC;IACjJ,MAAM,MAAM,GAAG,IAAI,cAAc,CAAC,aAA+B,EAAE,UAAU,CAAC,QAAQ,CAAC,CAAC;IACxF,MAAM,CAAC,UAAU,GAAG,oBAAoB,CAAC,oBAAoB,CAAC,UAAU,CAAC,CAAC;IAC1E,OAAO,MAAM,CAAC;AAChB,CAAC,AAL8B,CAK7B;SA9GkB,oBAAoB;AA2H1C;;;GAGG;AACH,MAAM,OAAgB,wBAAyB,SAAQ,oBAAoB;IAA3E;;QACS,2BAAsB,GAAG,IAAI,SAAS,EAAQ,CAAC;IAgBxD,CAAC;IAdC,sFAAsF;IAC/E,4BAA4B;QACjC,IAAI,CAAC,sBAAsB,CAAC,IAAI,EAAE,CAAC;IACrC,CAAC;IAEM,gBAAgB;QACrB,gCAAgC;QAChC,MAAM,OAAO,GAAsB,EAAE,CAAC;QACtC,uBAAuB;QACvB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QAChE,uBAAuB;QACvB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QACpE,OAAO,OAAO,CAAC;IACjB,CAAC;CACF","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Dialog\n */\n\nimport { BeUiEvent } from \"@itwin/core-bentley\";\nimport { PropertyEditorParams, PropertyEditorParamTypes, SuppressLabelEditorParams } from \"../properties/EditorParams\";\nimport { PropertyRecord } from \"../properties/Record\";\nimport { PrimitiveValue, PropertyValueFormat } from \"../properties/Value\";\nimport { BaseDialogItem, DialogItem, DialogPropertyItem, DialogPropertySyncItem } from \"./DialogItem\";\nimport { PropertyChangeResult, PropertyChangeStatus, UiDataProvider } from \"./UiDataProvider\";\n\n/** Enum for button types. Determines button label, and default button style.\n * @public\n */\nexport enum DialogButtonType {\n None = \"\",\n Close = \"close\",\n OK = \"ok\",\n Cancel = \"cancel\",\n Yes = \"yes\",\n No = \"no\",\n Retry = \"retry\",\n Next = \"next\",\n Previous = \"previous\"\n}\n\n/** Enum for button style.\n * @public\n */\nexport enum DialogButtonStyle {\n None = \"\",\n Primary = \"iui-cta\",\n Hollow = \"iui-default\",\n Blue = \"iui-high-visibility\",\n}\n\n/** Interface for a dialog button in a button cluster\n * @public\n */\nexport interface DialogButtonDef {\n /** type of button */\n type: DialogButtonType;\n /** Triggered on button click */\n onClick: () => void;\n /** Which button style to decorate button width */\n buttonStyle?: DialogButtonStyle;\n /** Disable the button */\n disabled?: boolean;\n /** Custom label */\n label?: string;\n /** Custom CSS class */\n className?: string;\n}\n\n/** [[DialogRow]] is the interface that groups dialog items into rows for building UI\n * @public\n */\nexport interface DialogRow {\n priority: number;\n items: DialogItem[];\n}\n\n/**\n * @public\n */\nexport abstract class UiLayoutDataProvider extends UiDataProvider {\n private _items: ReadonlyArray<DialogItem> | undefined;\n\n /** Applies changes from one or more properties - some dialogs will use this to send a bulk set of changes back to the provider */\n public override processChangesInUi(properties: DialogPropertyItem[]): PropertyChangeResult {\n // Default implementation is to just pass each property to applyUiPropertyChange\n properties.forEach((property) => this.applyUiPropertyChange(property));\n return { status: PropertyChangeStatus.Success };\n }\n\n /** Applies change of a single property - this is the default method used when property editors are dynamically generated. */\n // istanbul ignore next\n public applyUiPropertyChange = (_updatedValue: DialogPropertySyncItem): void => {\n throw (new Error(\"Derived UiDataProvider should implement this to apply change to a single property.\"));\n };\n\n private _rows: DialogRow[] | undefined;\n\n /** Array of dialog rows */\n public get rows(): DialogRow[] {\n if (!this._rows) {\n this._rows = this.layoutDialogRows();\n }\n return this._rows;\n }\n\n protected loadItemsInternal(items: ReadonlyArray<DialogItem> | undefined) {\n this._items = items ? items : [];\n this._rows = this.layoutDialogRows();\n }\n\n /** Called by UI to request available properties that can be bound to user supplied UI components (See Tool1UiProvider for example). */\n // istanbul ignore next\n public supplyDialogItems(): DialogItem[] | undefined {\n throw (new Error(\"Derived UiDataProvider must implement this method to supply set of properties.\"));\n }\n\n public get items(): ReadonlyArray<DialogItem> {\n if (undefined === this._items) {\n this.loadItemsInternal(this.supplyDialogItems());\n }\n return this._items!;\n }\n\n /** Called to inform listeners that new properties are ready for display in UI. */\n public reloadDialogItems(emitEvent = true) {\n this.loadItemsInternal(this.supplyDialogItems());\n // istanbul ignore else\n if (emitEvent)\n this.fireItemsReloadedEvent();\n }\n\n /**\n * @internal\n */\n public layoutDialogRows(): DialogRow[] {\n const rows: DialogRow[] = [];\n\n this.items.forEach((item) => {\n const row = rows.find((value) => value.priority === item.editorPosition.rowPriority);\n if (row) {\n row.items.push(item);\n } else {\n rows.push({ priority: item.editorPosition.rowPriority, items: [item] });\n }\n });\n\n // sort rows\n rows.sort((a: DialogRow, b: DialogRow) => a.priority - b.priority);\n // sort records\n rows.forEach((row: DialogRow) => row.items.sort((a: DialogItem, b: DialogItem) => a.editorPosition.columnIndex - b.editorPosition.columnIndex));\n return rows;\n }\n\n /** Determines if a dialog item editor wants a label */\n public static editorWantsLabel(item: DialogItem): boolean {\n if (item.property.editor && item.property.editor.params) {\n const params = item.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.SuppressEditorLabel) as SuppressLabelEditorParams;\n // istanbul ignore else\n if (params)\n return false;\n }\n return true;\n }\n\n /** Determines if a dialog items has an associated lock property */\n public static hasAssociatedLockProperty(item: DialogItem): boolean {\n return !!item.lockProperty;\n }\n\n /** Gets the disabled state for a given dialog item */\n public static getItemDisabledState(baseDialogItem: BaseDialogItem): boolean {\n const dialogItem = baseDialogItem as DialogItem;\n // istanbul ignore else\n if (dialogItem === undefined || dialogItem.lockProperty === undefined)\n return !!baseDialogItem.isDisabled;\n const value = dialogItem.lockProperty.value;\n // istanbul ignore next\n if (value === undefined)\n return !!baseDialogItem.isDisabled;\n\n return !value.value;\n }\n\n /** Gets a property record for a given dialog item */\n public static getPropertyRecord = (dialogItem: BaseDialogItem): PropertyRecord => {\n const propertyValue = { valueFormat: PropertyValueFormat.Primitive, value: dialogItem.value.value, displayValue: dialogItem.value.displayValue };\n const record = new PropertyRecord(propertyValue as PrimitiveValue, dialogItem.property);\n record.isDisabled = UiLayoutDataProvider.getItemDisabledState(dialogItem);\n return record;\n };\n\n /** Determines if a dialog row only contains button group editors */\n public static onlyContainButtonGroupEditors(row: DialogRow): boolean {\n for (const item of row.items) {\n // istanbul ignore else\n if (UiLayoutDataProvider.hasAssociatedLockProperty(item) || undefined === item.property.editor || \"enum-buttongroup\" !== item.property.editor.name || UiLayoutDataProvider.editorWantsLabel(item))\n return false;\n }\n return true;\n }\n}\n\n/** [[DialogLayoutDataProvider]] Abstract class that allows property values to be passed between hosting API and Dialog that generates and arranges components dynamically\n * including the buttons at the bottom of the dialog.\n * @public\n */\nexport abstract class DialogLayoutDataProvider extends UiLayoutDataProvider {\n public onButtonsReloadedEvent = new BeUiEvent<void>();\n\n /** Called to inform listeners that modal dialog button data needs to be refreshed. */\n public fireDialogButtonsReloadEvent() {\n this.onButtonsReloadedEvent.emit();\n }\n\n public supplyButtonData(): DialogButtonDef[] | undefined {\n // Derived class should override\n const buttons: DialogButtonDef[] = [];\n // istanbul ignore next\n buttons.push({ type: DialogButtonType.OK, onClick: () => { } });\n // istanbul ignore next\n buttons.push({ type: DialogButtonType.Cancel, onClick: () => { } });\n return buttons;\n }\n}\n"]}
@@ -1,54 +1,54 @@
1
- /** @packageDocumentation
2
- * @module Item
3
- */
4
- import { BadgeType } from "./BadgeType";
5
- import { ConditionalBooleanValue } from "./ConditionalBooleanValue";
6
- import { ConditionalStringValue } from "./ConditionalStringValue";
7
- /** Prototype for string getter function.
8
- * @public
9
- */
10
- export declare type StringGetter = () => string;
11
- /** Definition that specifies properties shared between many ConfigurableUi components.
12
- * @public
13
- */
14
- export interface CommonItemProps {
15
- /** can be used by application to store miscellaneous data. */
16
- applicationData?: any;
17
- /** Badge to be overlaid on the item. */
18
- badgeType?: BadgeType;
19
- /** if set, it is used to explicitly set the description shown by components that support a description. */
20
- description?: string | ConditionalStringValue;
21
- /** Name of icon WebFont entry or if specifying an imported SVG symbol use "webSvg:" prefix to imported symbol Id. */
22
- icon?: string | ConditionalStringValue;
23
- /** optional data to be used by item implementor. */
24
- readonly internalData?: Map<string, any>;
25
- /** if true component will be hidden - defaults to false */
26
- isHidden?: boolean | ConditionalBooleanValue;
27
- /** if true component will be disabled - defaults to false */
28
- isDisabled?: boolean | ConditionalBooleanValue;
29
- /** if set, component will be considered "active" an will display an "active stripe" - defaults to false */
30
- isActive?: boolean;
31
- /** if set, component will be considered selected but will NOT display an "active stripe" - defaults to false. Typically used by buttons that toggle between two states. */
32
- isPressed?: boolean;
33
- /** if set, it is used to explicitly set the label shown by a component. */
34
- label?: string | ConditionalStringValue;
35
- /** used to explicitly set the tooltip shown by a component. */
36
- tooltip?: string | ConditionalStringValue;
37
- }
38
- /** Definition for a command handler.
39
- * @public
40
- */
41
- export interface CommandHandler {
42
- /** Function to execute */
43
- execute?: (args?: any) => any;
44
- /** Parameters passed to the function */
45
- parameters?: any;
46
- /** Function to get the parameters passed to the function */
47
- getCommandArgs?: () => any[];
48
- }
49
- /** Definition for an item that executes and action.
50
- * @public
51
- */
52
- export interface AbstractActionItemProps extends CommonItemProps, CommandHandler {
53
- }
1
+ /** @packageDocumentation
2
+ * @module Item
3
+ */
4
+ import { BadgeType } from "./BadgeType";
5
+ import { ConditionalBooleanValue } from "./ConditionalBooleanValue";
6
+ import { ConditionalStringValue } from "./ConditionalStringValue";
7
+ /** Prototype for string getter function.
8
+ * @public
9
+ */
10
+ export type StringGetter = () => string;
11
+ /** Definition that specifies properties shared between many ConfigurableUi components.
12
+ * @public
13
+ */
14
+ export interface CommonItemProps {
15
+ /** can be used by application to store miscellaneous data. */
16
+ applicationData?: any;
17
+ /** Badge to be overlaid on the item. */
18
+ badgeType?: BadgeType;
19
+ /** if set, it is used to explicitly set the description shown by components that support a description. */
20
+ description?: string | ConditionalStringValue;
21
+ /** Name of icon WebFont entry or if specifying an imported SVG symbol use "webSvg:" prefix to imported symbol Id. */
22
+ icon?: string | ConditionalStringValue;
23
+ /** optional data to be used by item implementor. */
24
+ readonly internalData?: Map<string, any>;
25
+ /** if true component will be hidden - defaults to false */
26
+ isHidden?: boolean | ConditionalBooleanValue;
27
+ /** if true component will be disabled - defaults to false */
28
+ isDisabled?: boolean | ConditionalBooleanValue;
29
+ /** if set, component will be considered "active" an will display an "active stripe" - defaults to false */
30
+ isActive?: boolean;
31
+ /** if set, component will be considered selected but will NOT display an "active stripe" - defaults to false. Typically used by buttons that toggle between two states. */
32
+ isPressed?: boolean;
33
+ /** if set, it is used to explicitly set the label shown by a component. */
34
+ label?: string | ConditionalStringValue;
35
+ /** used to explicitly set the tooltip shown by a component. */
36
+ tooltip?: string | ConditionalStringValue;
37
+ }
38
+ /** Definition for a command handler.
39
+ * @public
40
+ */
41
+ export interface CommandHandler {
42
+ /** Function to execute */
43
+ execute?: (args?: any) => any;
44
+ /** Parameters passed to the function */
45
+ parameters?: any;
46
+ /** Function to get the parameters passed to the function */
47
+ getCommandArgs?: () => any[];
48
+ }
49
+ /** Definition for an item that executes and action.
50
+ * @public
51
+ */
52
+ export interface AbstractActionItemProps extends CommonItemProps, CommandHandler {
53
+ }
54
54
  //# sourceMappingURL=AbstractItemProps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractItemProps.d.ts","sourceRoot":"","sources":["../../../../src/appui-abstract/items/AbstractItemProps.ts"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AACxC,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE;;GAEG;AACH,oBAAY,YAAY,GAAG,MAAM,MAAM,CAAC;AAExC;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B,8DAA8D;IAC9D,eAAe,CAAC,EAAE,GAAG,CAAC;IACtB,wCAAwC;IACxC,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,2GAA2G;IAC3G,WAAW,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAAC;IAC9C,sHAAsH;IACtH,IAAI,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAAC;IACvC,oDAAoD;IACpD,QAAQ,CAAC,YAAY,CAAC,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAEzC,2DAA2D;IAC3D,QAAQ,CAAC,EAAE,OAAO,GAAG,uBAAuB,CAAC;IAC7C,6DAA6D;IAC7D,UAAU,CAAC,EAAE,OAAO,GAAG,uBAAuB,CAAC;IAC/C,2GAA2G;IAC3G,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,2KAA2K;IAC3K,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,2EAA2E;IAC3E,KAAK,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAAC;IACxC,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAAC;CAC3C;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,0BAA0B;IAC1B,OAAO,CAAC,E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BAAsB,CAAC;IACxC,+DAA+D;IAC/D,OAAO,CAAC,EAAE,MAAM,GAAG,sBAAsB,CAAC;CAC3C;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,0BAA0B;IAC1B,OAAO,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,GAAG,KAAK,GAAG,CAAC;IAC9B,wCAAwC;IACxC,UAAU,CAAC,EAAE,GAAG,CAAC;IACjB,4DAA4D;IAC5D,cAAc,CAAC,EAAE,MAAM,GAAG,EAAE,CAAC;CAC9B;AAED;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,eAAe,EAAE,cAAc;CAC/E"}
@@ -1,9 +1,9 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- /** @packageDocumentation
6
- * @module Item
7
- */
8
- export {};
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module Item
7
+ */
8
+ export {};
9
9
  //# sourceMappingURL=AbstractItemProps.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"AbstractItemProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/AbstractItemProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Item\r\n */\r\n\r\nimport { BadgeType } from \"./BadgeType\";\r\nimport { ConditionalBooleanValue } from \"./ConditionalBooleanValue\";\r\nimport { ConditionalStringValue } from \"./ConditionalStringValue\";\r\n\r\n/** Prototype for string getter function.\r\n * @public\r\n */\r\nexport type StringGetter = () => string;\r\n\r\n/** Definition that specifies properties shared between many ConfigurableUi components.\r\n * @public\r\n */\r\nexport interface CommonItemProps {\r\n /** can be used by application to store miscellaneous data. */\r\n applicationData?: any;\r\n /** Badge to be overlaid on the item. */\r\n badgeType?: BadgeType;\r\n /** if set, it is used to explicitly set the description shown by components that support a description. */\r\n description?: string | ConditionalStringValue;\r\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\r\n icon?: string | ConditionalStringValue;\r\n /** optional data to be used by item implementor. */\r\n readonly internalData?: Map<string, any>;\r\n\r\n /** if true component will be hidden - defaults to false */\r\n isHidden?: boolean | ConditionalBooleanValue;\r\n /** if true component will be disabled - defaults to false */\r\n isDisabled?: boolean | ConditionalBooleanValue;\r\n /** if set, component will be considered \"active\" an will display an \"active stripe\" - defaults to false */\r\n isActive?: boolean;\r\n /** if set, component will be considered selected but will NOT display an \"active stripe\" - defaults to false. Typically used by buttons that toggle between two states. */\r\n isPressed?: boolean;\r\n /** if set, it is used to explicitly set the label shown by a component. */\r\n label?: string | ConditionalStringValue;\r\n /** used to explicitly set the tooltip shown by a component. */\r\n tooltip?: string | ConditionalStringValue;\r\n}\r\n\r\n/** Definition for a command handler.\r\n * @public\r\n */\r\nexport interface CommandHandler {\r\n /** Function to execute */\r\n execute?: (args?: any) => any;\r\n /** Parameters passed to the function */\r\n parameters?: any;\r\n /** Function to get the parameters passed to the function */\r\n getCommandArgs?: () => any[];\r\n}\r\n\r\n/** Definition for an item that executes and action.\r\n * @public\r\n */\r\nexport interface AbstractActionItemProps extends CommonItemProps, CommandHandler {\r\n}\r\n"]}
1
+ {"version":3,"file":"AbstractItemProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/AbstractItemProps.ts"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Item\n */\n\nimport { BadgeType } from \"./BadgeType\";\nimport { ConditionalBooleanValue } from \"./ConditionalBooleanValue\";\nimport { ConditionalStringValue } from \"./ConditionalStringValue\";\n\n/** Prototype for string getter function.\n * @public\n */\nexport type StringGetter = () => string;\n\n/** Definition that specifies properties shared between many ConfigurableUi components.\n * @public\n */\nexport interface CommonItemProps {\n /** can be used by application to store miscellaneous data. */\n applicationData?: any;\n /** Badge to be overlaid on the item. */\n badgeType?: BadgeType;\n /** if set, it is used to explicitly set the description shown by components that support a description. */\n description?: string | ConditionalStringValue;\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\n icon?: string | ConditionalStringValue;\n /** optional data to be used by item implementor. */\n readonly internalData?: Map<string, any>;\n\n /** if true component will be hidden - defaults to false */\n isHidden?: boolean | ConditionalBooleanValue;\n /** if true component will be disabled - defaults to false */\n isDisabled?: boolean | ConditionalBooleanValue;\n /** if set, component will be considered \"active\" an will display an \"active stripe\" - defaults to false */\n isActive?: boolean;\n /** if set, component will be considered selected but will NOT display an \"active stripe\" - defaults to false. Typically used by buttons that toggle between two states. */\n isPressed?: boolean;\n /** if set, it is used to explicitly set the label shown by a component. */\n label?: string | ConditionalStringValue;\n /** used to explicitly set the tooltip shown by a component. */\n tooltip?: string | ConditionalStringValue;\n}\n\n/** Definition for a command handler.\n * @public\n */\nexport interface CommandHandler {\n /** Function to execute */\n execute?: (args?: any) => any;\n /** Parameters passed to the function */\n parameters?: any;\n /** Function to get the parameters passed to the function */\n getCommandArgs?: () => any[];\n}\n\n/** Definition for an item that executes and action.\n * @public\n */\nexport interface AbstractActionItemProps extends CommonItemProps, CommandHandler {\n}\n"]}
@@ -1,21 +1,21 @@
1
- /** @packageDocumentation
2
- * @module Item
3
- */
4
- import { AbstractActionItemProps, CommonItemProps } from "./AbstractItemProps";
5
- import { ConditionalStringValue } from "./ConditionalStringValue";
6
- /** Properties for a Menu item
7
- * @public
8
- */
9
- export interface AbstractMenuItemProps extends CommonItemProps {
10
- /** The id for the menu item. */
11
- id: string;
12
- /** The item to execute when this item is invoked. Either 'item' or 'submenu' must be specified. */
13
- item?: AbstractActionItemProps;
14
- /** Nested array of item props. Either 'item' or 'submenu' must be specified. */
15
- submenu?: AbstractMenuItemProps[];
16
- /** Icon to display on right side of the menu item.
17
- * Name of icon WebFont entry or if specifying an imported SVG symbol use "webSvg:" prefix to imported symbol Id.
18
- */
19
- iconRight?: string | ConditionalStringValue;
20
- }
1
+ /** @packageDocumentation
2
+ * @module Item
3
+ */
4
+ import { AbstractActionItemProps, CommonItemProps } from "./AbstractItemProps";
5
+ import { ConditionalStringValue } from "./ConditionalStringValue";
6
+ /** Properties for a Menu item
7
+ * @public
8
+ */
9
+ export interface AbstractMenuItemProps extends CommonItemProps {
10
+ /** The id for the menu item. */
11
+ id: string;
12
+ /** The item to execute when this item is invoked. Either 'item' or 'submenu' must be specified. */
13
+ item?: AbstractActionItemProps;
14
+ /** Nested array of item props. Either 'item' or 'submenu' must be specified. */
15
+ submenu?: AbstractMenuItemProps[];
16
+ /** Icon to display on right side of the menu item.
17
+ * Name of icon WebFont entry or if specifying an imported SVG symbol use "webSvg:" prefix to imported symbol Id.
18
+ */
19
+ iconRight?: string | ConditionalStringValue;
20
+ }
21
21
  //# sourceMappingURL=AbstractMenuItemProps.d.ts.map
@@ -1,9 +1,9 @@
1
- /*---------------------------------------------------------------------------------------------
2
- * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
- * See LICENSE.md in the project root for license terms and full copyright notice.
4
- *--------------------------------------------------------------------------------------------*/
5
- /** @packageDocumentation
6
- * @module Item
7
- */
8
- export {};
1
+ /*---------------------------------------------------------------------------------------------
2
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
3
+ * See LICENSE.md in the project root for license terms and full copyright notice.
4
+ *--------------------------------------------------------------------------------------------*/
5
+ /** @packageDocumentation
6
+ * @module Item
7
+ */
8
+ export {};
9
9
  //# sourceMappingURL=AbstractMenuItemProps.js.map