@itwin/appui-abstract 4.0.0-dev.48 → 4.0.0-dev.51

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (307) hide show
  1. package/lib/cjs/appui-abstract/BaseUiItemsProvider.d.ts +30 -30
  2. package/lib/cjs/appui-abstract/BaseUiItemsProvider.js +79 -79
  3. package/lib/cjs/appui-abstract/BaseUiItemsProvider.js.map +1 -1
  4. package/lib/cjs/appui-abstract/UiAdmin.d.ts +221 -221
  5. package/lib/cjs/appui-abstract/UiAdmin.js +224 -224
  6. package/lib/cjs/appui-abstract/UiAdmin.js.map +1 -1
  7. package/lib/cjs/appui-abstract/UiItemsManager.d.ts +113 -113
  8. package/lib/cjs/appui-abstract/UiItemsManager.js +193 -193
  9. package/lib/cjs/appui-abstract/UiItemsManager.js.map +1 -1
  10. package/lib/cjs/appui-abstract/UiItemsProvider.d.ts +29 -29
  11. package/lib/cjs/appui-abstract/UiItemsProvider.js +9 -9
  12. package/lib/cjs/appui-abstract/UiItemsProvider.js.map +1 -1
  13. package/lib/cjs/appui-abstract/backstage/BackstageItem.d.ts +91 -91
  14. package/lib/cjs/appui-abstract/backstage/BackstageItem.js +70 -70
  15. package/lib/cjs/appui-abstract/backstage/BackstageItem.js.map +1 -1
  16. package/lib/cjs/appui-abstract/backstage/BackstageItemsManager.d.ts +38 -38
  17. package/lib/cjs/appui-abstract/backstage/BackstageItemsManager.js +133 -133
  18. package/lib/cjs/appui-abstract/backstage/BackstageItemsManager.js.map +1 -1
  19. package/lib/cjs/appui-abstract/common/KeyboardKey.d.ts +51 -51
  20. package/lib/cjs/appui-abstract/common/KeyboardKey.js +63 -63
  21. package/lib/cjs/appui-abstract/common/KeyboardKey.js.map +1 -1
  22. package/lib/cjs/appui-abstract/content/ContentLayoutProps.d.ts +62 -62
  23. package/lib/cjs/appui-abstract/content/ContentLayoutProps.js +9 -9
  24. package/lib/cjs/appui-abstract/content/ContentLayoutProps.js.map +1 -1
  25. package/lib/cjs/appui-abstract/content/StandardContentLayouts.d.ts +19 -19
  26. package/lib/cjs/appui-abstract/content/StandardContentLayouts.js +108 -108
  27. package/lib/cjs/appui-abstract/content/StandardContentLayouts.js.map +1 -1
  28. package/lib/cjs/appui-abstract/dialogs/DialogItem.d.ts +76 -76
  29. package/lib/cjs/appui-abstract/dialogs/DialogItem.js +67 -67
  30. package/lib/cjs/appui-abstract/dialogs/DialogItem.js.map +1 -1
  31. package/lib/cjs/appui-abstract/dialogs/UiDataProvider.d.ts +55 -55
  32. package/lib/cjs/appui-abstract/dialogs/UiDataProvider.js +66 -66
  33. package/lib/cjs/appui-abstract/dialogs/UiDataProvider.js.map +1 -1
  34. package/lib/cjs/appui-abstract/dialogs/UiLayoutDataProvider.d.ts +97 -97
  35. package/lib/cjs/appui-abstract/dialogs/UiLayoutDataProvider.js +175 -175
  36. package/lib/cjs/appui-abstract/dialogs/UiLayoutDataProvider.js.map +1 -1
  37. package/lib/cjs/appui-abstract/items/AbstractItemProps.d.ts +53 -53
  38. package/lib/cjs/appui-abstract/items/AbstractItemProps.js +9 -9
  39. package/lib/cjs/appui-abstract/items/AbstractItemProps.js.map +1 -1
  40. package/lib/cjs/appui-abstract/items/AbstractMenuItemProps.d.ts +20 -20
  41. package/lib/cjs/appui-abstract/items/AbstractMenuItemProps.js +9 -9
  42. package/lib/cjs/appui-abstract/items/AbstractMenuItemProps.js.map +1 -1
  43. package/lib/cjs/appui-abstract/items/AbstractToolbarProps.d.ts +13 -13
  44. package/lib/cjs/appui-abstract/items/AbstractToolbarProps.js +9 -9
  45. package/lib/cjs/appui-abstract/items/AbstractToolbarProps.js.map +1 -1
  46. package/lib/cjs/appui-abstract/items/BadgeType.d.ts +14 -14
  47. package/lib/cjs/appui-abstract/items/BadgeType.js +22 -22
  48. package/lib/cjs/appui-abstract/items/BadgeType.js.map +1 -1
  49. package/lib/cjs/appui-abstract/items/ConditionalBooleanValue.d.ts +27 -27
  50. package/lib/cjs/appui-abstract/items/ConditionalBooleanValue.js +60 -60
  51. package/lib/cjs/appui-abstract/items/ConditionalBooleanValue.js.map +1 -1
  52. package/lib/cjs/appui-abstract/items/ConditionalStringValue.d.ts +29 -29
  53. package/lib/cjs/appui-abstract/items/ConditionalStringValue.js +62 -62
  54. package/lib/cjs/appui-abstract/items/ConditionalStringValue.js.map +1 -1
  55. package/lib/cjs/appui-abstract/items/ProvidedItem.d.ts +11 -11
  56. package/lib/cjs/appui-abstract/items/ProvidedItem.js +9 -9
  57. package/lib/cjs/appui-abstract/items/ProvidedItem.js.map +1 -1
  58. package/lib/cjs/appui-abstract/items/RelativePosition.d.ts +18 -18
  59. package/lib/cjs/appui-abstract/items/RelativePosition.js +26 -26
  60. package/lib/cjs/appui-abstract/items/RelativePosition.js.map +1 -1
  61. package/lib/cjs/appui-abstract/items/StageUsage.d.ts +16 -16
  62. package/lib/cjs/appui-abstract/items/StageUsage.js +24 -24
  63. package/lib/cjs/appui-abstract/items/StageUsage.js.map +1 -1
  64. package/lib/cjs/appui-abstract/notification/MessagePresenter.d.ts +42 -42
  65. package/lib/cjs/appui-abstract/notification/MessagePresenter.js +24 -24
  66. package/lib/cjs/appui-abstract/notification/MessagePresenter.js.map +1 -1
  67. package/lib/cjs/appui-abstract/notification/MessageSeverity.d.ts +15 -15
  68. package/lib/cjs/appui-abstract/notification/MessageSeverity.js +23 -23
  69. package/lib/cjs/appui-abstract/notification/MessageSeverity.js.map +1 -1
  70. package/lib/cjs/appui-abstract/properties/Description.d.ts +127 -127
  71. package/lib/cjs/appui-abstract/properties/Description.js +196 -196
  72. package/lib/cjs/appui-abstract/properties/Description.js.map +1 -1
  73. package/lib/cjs/appui-abstract/properties/EditorParams.d.ts +260 -260
  74. package/lib/cjs/appui-abstract/properties/EditorParams.js +106 -106
  75. package/lib/cjs/appui-abstract/properties/EditorParams.js.map +1 -1
  76. package/lib/cjs/appui-abstract/properties/PrimitiveTypes.d.ts +60 -60
  77. package/lib/cjs/appui-abstract/properties/PrimitiveTypes.js +9 -9
  78. package/lib/cjs/appui-abstract/properties/PrimitiveTypes.js.map +1 -1
  79. package/lib/cjs/appui-abstract/properties/Record.d.ts +57 -57
  80. package/lib/cjs/appui-abstract/properties/Record.js +78 -78
  81. package/lib/cjs/appui-abstract/properties/Record.js.map +1 -1
  82. package/lib/cjs/appui-abstract/properties/StandardEditorNames.d.ts +22 -22
  83. package/lib/cjs/appui-abstract/properties/StandardEditorNames.js +30 -30
  84. package/lib/cjs/appui-abstract/properties/StandardEditorNames.js.map +1 -1
  85. package/lib/cjs/appui-abstract/properties/StandardTypeNames.d.ts +30 -30
  86. package/lib/cjs/appui-abstract/properties/StandardTypeNames.js +39 -39
  87. package/lib/cjs/appui-abstract/properties/StandardTypeNames.js.map +1 -1
  88. package/lib/cjs/appui-abstract/properties/Value.d.ts +49 -49
  89. package/lib/cjs/appui-abstract/properties/Value.js +20 -20
  90. package/lib/cjs/appui-abstract/properties/Value.js.map +1 -1
  91. package/lib/cjs/appui-abstract/quantity/BaseQuantityDescription.d.ts +22 -22
  92. package/lib/cjs/appui-abstract/quantity/BaseQuantityDescription.js +48 -48
  93. package/lib/cjs/appui-abstract/quantity/BaseQuantityDescription.js.map +1 -1
  94. package/lib/cjs/appui-abstract/statusbar/StatusBarItem.d.ts +128 -128
  95. package/lib/cjs/appui-abstract/statusbar/StatusBarItem.js +87 -87
  96. package/lib/cjs/appui-abstract/statusbar/StatusBarItem.js.map +1 -1
  97. package/lib/cjs/appui-abstract/statusbar/StatusBarItemsManager.d.ts +39 -39
  98. package/lib/cjs/appui-abstract/statusbar/StatusBarItemsManager.js +135 -135
  99. package/lib/cjs/appui-abstract/statusbar/StatusBarItemsManager.js.map +1 -1
  100. package/lib/cjs/appui-abstract/toolbars/ToolbarItem.d.ts +121 -121
  101. package/lib/cjs/appui-abstract/toolbars/ToolbarItem.js +64 -64
  102. package/lib/cjs/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
  103. package/lib/cjs/appui-abstract/toolbars/ToolbarItemsManager.d.ts +45 -45
  104. package/lib/cjs/appui-abstract/toolbars/ToolbarItemsManager.js +235 -235
  105. package/lib/cjs/appui-abstract/toolbars/ToolbarItemsManager.js.map +1 -1
  106. package/lib/cjs/appui-abstract/utils/IconSpecUtilities.d.ts +29 -29
  107. package/lib/cjs/appui-abstract/utils/IconSpecUtilities.js +51 -51
  108. package/lib/cjs/appui-abstract/utils/IconSpecUtilities.js.map +1 -1
  109. package/lib/cjs/appui-abstract/utils/PointProps.d.ts +10 -10
  110. package/lib/cjs/appui-abstract/utils/PointProps.js +9 -9
  111. package/lib/cjs/appui-abstract/utils/PointProps.js.map +1 -1
  112. package/lib/cjs/appui-abstract/utils/UiError.d.ts +12 -12
  113. package/lib/cjs/appui-abstract/utils/UiError.js +22 -22
  114. package/lib/cjs/appui-abstract/utils/UiError.js.map +1 -1
  115. package/lib/cjs/appui-abstract/utils/UiEvent.d.ts +9 -9
  116. package/lib/cjs/appui-abstract/utils/UiEvent.js +17 -17
  117. package/lib/cjs/appui-abstract/utils/UiEvent.js.map +1 -1
  118. package/lib/cjs/appui-abstract/utils/UiEventDispatcher.d.ts +46 -46
  119. package/lib/cjs/appui-abstract/utils/UiEventDispatcher.js +131 -131
  120. package/lib/cjs/appui-abstract/utils/UiEventDispatcher.js.map +1 -1
  121. package/lib/cjs/appui-abstract/utils/callbacks.d.ts +20 -20
  122. package/lib/cjs/appui-abstract/utils/callbacks.js +9 -9
  123. package/lib/cjs/appui-abstract/utils/callbacks.js.map +1 -1
  124. package/lib/cjs/appui-abstract/utils/filter/charCode.d.ts +416 -416
  125. package/lib/cjs/appui-abstract/utils/filter/charCode.js +6 -6
  126. package/lib/cjs/appui-abstract/utils/filter/charCode.js.map +1 -1
  127. package/lib/cjs/appui-abstract/utils/filter/filters.d.ts +98 -98
  128. package/lib/cjs/appui-abstract/utils/filter/filters.js +709 -709
  129. package/lib/cjs/appui-abstract/utils/filter/filters.js.map +1 -1
  130. package/lib/cjs/appui-abstract/utils/filter/map.d.ts +59 -59
  131. package/lib/cjs/appui-abstract/utils/filter/map.js +402 -402
  132. package/lib/cjs/appui-abstract/utils/filter/map.js.map +1 -1
  133. package/lib/cjs/appui-abstract/utils/filter/strings.d.ts +20 -20
  134. package/lib/cjs/appui-abstract/utils/filter/strings.js +78 -78
  135. package/lib/cjs/appui-abstract/utils/filter/strings.js.map +1 -1
  136. package/lib/cjs/appui-abstract/utils/isLetter.d.ts +9 -9
  137. package/lib/cjs/appui-abstract/utils/isLetter.js +19 -19
  138. package/lib/cjs/appui-abstract/utils/isLetter.js.map +1 -1
  139. package/lib/cjs/appui-abstract/utils/misc.d.ts +11 -11
  140. package/lib/cjs/appui-abstract/utils/misc.js +36 -36
  141. package/lib/cjs/appui-abstract/utils/misc.js.map +1 -1
  142. package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.d.ts +86 -86
  143. package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.js +9 -9
  144. package/lib/cjs/appui-abstract/widget/AbstractWidgetProps.js.map +1 -1
  145. package/lib/cjs/appui-abstract/widget/StagePanel.d.ts +36 -36
  146. package/lib/cjs/appui-abstract/widget/StagePanel.js +46 -46
  147. package/lib/cjs/appui-abstract/widget/StagePanel.js.map +1 -1
  148. package/lib/cjs/appui-abstract/widget/WidgetState.d.ts +19 -19
  149. package/lib/cjs/appui-abstract/widget/WidgetState.js +27 -27
  150. package/lib/cjs/appui-abstract/widget/WidgetState.js.map +1 -1
  151. package/lib/cjs/appui-abstract.d.ts +103 -103
  152. package/lib/cjs/appui-abstract.js +119 -119
  153. package/lib/cjs/appui-abstract.js.map +1 -1
  154. package/lib/esm/appui-abstract/BaseUiItemsProvider.d.ts +30 -30
  155. package/lib/esm/appui-abstract/BaseUiItemsProvider.js +75 -75
  156. package/lib/esm/appui-abstract/BaseUiItemsProvider.js.map +1 -1
  157. package/lib/esm/appui-abstract/UiAdmin.d.ts +221 -221
  158. package/lib/esm/appui-abstract/UiAdmin.js +219 -219
  159. package/lib/esm/appui-abstract/UiAdmin.js.map +1 -1
  160. package/lib/esm/appui-abstract/UiItemsManager.d.ts +113 -113
  161. package/lib/esm/appui-abstract/UiItemsManager.js +189 -189
  162. package/lib/esm/appui-abstract/UiItemsManager.js.map +1 -1
  163. package/lib/esm/appui-abstract/UiItemsProvider.d.ts +29 -29
  164. package/lib/esm/appui-abstract/UiItemsProvider.js +8 -8
  165. package/lib/esm/appui-abstract/UiItemsProvider.js.map +1 -1
  166. package/lib/esm/appui-abstract/backstage/BackstageItem.d.ts +91 -91
  167. package/lib/esm/appui-abstract/backstage/BackstageItem.js +64 -64
  168. package/lib/esm/appui-abstract/backstage/BackstageItem.js.map +1 -1
  169. package/lib/esm/appui-abstract/backstage/BackstageItemsManager.d.ts +38 -38
  170. package/lib/esm/appui-abstract/backstage/BackstageItemsManager.js +129 -129
  171. package/lib/esm/appui-abstract/backstage/BackstageItemsManager.js.map +1 -1
  172. package/lib/esm/appui-abstract/common/KeyboardKey.d.ts +51 -51
  173. package/lib/esm/appui-abstract/common/KeyboardKey.js +59 -59
  174. package/lib/esm/appui-abstract/common/KeyboardKey.js.map +1 -1
  175. package/lib/esm/appui-abstract/content/ContentLayoutProps.d.ts +62 -62
  176. package/lib/esm/appui-abstract/content/ContentLayoutProps.js +8 -8
  177. package/lib/esm/appui-abstract/content/ContentLayoutProps.js.map +1 -1
  178. package/lib/esm/appui-abstract/content/StandardContentLayouts.d.ts +19 -19
  179. package/lib/esm/appui-abstract/content/StandardContentLayouts.js +104 -104
  180. package/lib/esm/appui-abstract/content/StandardContentLayouts.js.map +1 -1
  181. package/lib/esm/appui-abstract/dialogs/DialogItem.d.ts +76 -76
  182. package/lib/esm/appui-abstract/dialogs/DialogItem.js +63 -63
  183. package/lib/esm/appui-abstract/dialogs/DialogItem.js.map +1 -1
  184. package/lib/esm/appui-abstract/dialogs/UiDataProvider.d.ts +55 -55
  185. package/lib/esm/appui-abstract/dialogs/UiDataProvider.js +61 -61
  186. package/lib/esm/appui-abstract/dialogs/UiDataProvider.js.map +1 -1
  187. package/lib/esm/appui-abstract/dialogs/UiLayoutDataProvider.d.ts +97 -97
  188. package/lib/esm/appui-abstract/dialogs/UiLayoutDataProvider.js +170 -170
  189. package/lib/esm/appui-abstract/dialogs/UiLayoutDataProvider.js.map +1 -1
  190. package/lib/esm/appui-abstract/items/AbstractItemProps.d.ts +53 -53
  191. package/lib/esm/appui-abstract/items/AbstractItemProps.js +8 -8
  192. package/lib/esm/appui-abstract/items/AbstractItemProps.js.map +1 -1
  193. package/lib/esm/appui-abstract/items/AbstractMenuItemProps.d.ts +20 -20
  194. package/lib/esm/appui-abstract/items/AbstractMenuItemProps.js +8 -8
  195. package/lib/esm/appui-abstract/items/AbstractMenuItemProps.js.map +1 -1
  196. package/lib/esm/appui-abstract/items/AbstractToolbarProps.d.ts +13 -13
  197. package/lib/esm/appui-abstract/items/AbstractToolbarProps.js +8 -8
  198. package/lib/esm/appui-abstract/items/AbstractToolbarProps.js.map +1 -1
  199. package/lib/esm/appui-abstract/items/BadgeType.d.ts +14 -14
  200. package/lib/esm/appui-abstract/items/BadgeType.js +19 -19
  201. package/lib/esm/appui-abstract/items/BadgeType.js.map +1 -1
  202. package/lib/esm/appui-abstract/items/ConditionalBooleanValue.d.ts +27 -27
  203. package/lib/esm/appui-abstract/items/ConditionalBooleanValue.js +56 -56
  204. package/lib/esm/appui-abstract/items/ConditionalBooleanValue.js.map +1 -1
  205. package/lib/esm/appui-abstract/items/ConditionalStringValue.d.ts +29 -29
  206. package/lib/esm/appui-abstract/items/ConditionalStringValue.js +58 -58
  207. package/lib/esm/appui-abstract/items/ConditionalStringValue.js.map +1 -1
  208. package/lib/esm/appui-abstract/items/ProvidedItem.d.ts +11 -11
  209. package/lib/esm/appui-abstract/items/ProvidedItem.js +8 -8
  210. package/lib/esm/appui-abstract/items/ProvidedItem.js.map +1 -1
  211. package/lib/esm/appui-abstract/items/RelativePosition.d.ts +18 -18
  212. package/lib/esm/appui-abstract/items/RelativePosition.js +23 -23
  213. package/lib/esm/appui-abstract/items/RelativePosition.js.map +1 -1
  214. package/lib/esm/appui-abstract/items/StageUsage.d.ts +16 -16
  215. package/lib/esm/appui-abstract/items/StageUsage.js +21 -21
  216. package/lib/esm/appui-abstract/items/StageUsage.js.map +1 -1
  217. package/lib/esm/appui-abstract/notification/MessagePresenter.d.ts +42 -42
  218. package/lib/esm/appui-abstract/notification/MessagePresenter.js +21 -21
  219. package/lib/esm/appui-abstract/notification/MessagePresenter.js.map +1 -1
  220. package/lib/esm/appui-abstract/notification/MessageSeverity.d.ts +15 -15
  221. package/lib/esm/appui-abstract/notification/MessageSeverity.js +20 -20
  222. package/lib/esm/appui-abstract/notification/MessageSeverity.js.map +1 -1
  223. package/lib/esm/appui-abstract/properties/Description.d.ts +127 -127
  224. package/lib/esm/appui-abstract/properties/Description.js +192 -192
  225. package/lib/esm/appui-abstract/properties/Description.js.map +1 -1
  226. package/lib/esm/appui-abstract/properties/EditorParams.d.ts +260 -260
  227. package/lib/esm/appui-abstract/properties/EditorParams.js +97 -97
  228. package/lib/esm/appui-abstract/properties/EditorParams.js.map +1 -1
  229. package/lib/esm/appui-abstract/properties/PrimitiveTypes.d.ts +60 -60
  230. package/lib/esm/appui-abstract/properties/PrimitiveTypes.js +8 -8
  231. package/lib/esm/appui-abstract/properties/PrimitiveTypes.js.map +1 -1
  232. package/lib/esm/appui-abstract/properties/Record.d.ts +57 -57
  233. package/lib/esm/appui-abstract/properties/Record.js +74 -74
  234. package/lib/esm/appui-abstract/properties/Record.js.map +1 -1
  235. package/lib/esm/appui-abstract/properties/StandardEditorNames.d.ts +22 -22
  236. package/lib/esm/appui-abstract/properties/StandardEditorNames.js +27 -27
  237. package/lib/esm/appui-abstract/properties/StandardEditorNames.js.map +1 -1
  238. package/lib/esm/appui-abstract/properties/StandardTypeNames.d.ts +30 -30
  239. package/lib/esm/appui-abstract/properties/StandardTypeNames.js +36 -36
  240. package/lib/esm/appui-abstract/properties/StandardTypeNames.js.map +1 -1
  241. package/lib/esm/appui-abstract/properties/Value.d.ts +49 -49
  242. package/lib/esm/appui-abstract/properties/Value.js +17 -17
  243. package/lib/esm/appui-abstract/properties/Value.js.map +1 -1
  244. package/lib/esm/appui-abstract/quantity/BaseQuantityDescription.d.ts +22 -22
  245. package/lib/esm/appui-abstract/quantity/BaseQuantityDescription.js +44 -44
  246. package/lib/esm/appui-abstract/quantity/BaseQuantityDescription.js.map +1 -1
  247. package/lib/esm/appui-abstract/statusbar/StatusBarItem.d.ts +128 -128
  248. package/lib/esm/appui-abstract/statusbar/StatusBarItem.js +80 -80
  249. package/lib/esm/appui-abstract/statusbar/StatusBarItem.js.map +1 -1
  250. package/lib/esm/appui-abstract/statusbar/StatusBarItemsManager.d.ts +39 -39
  251. package/lib/esm/appui-abstract/statusbar/StatusBarItemsManager.js +131 -131
  252. package/lib/esm/appui-abstract/statusbar/StatusBarItemsManager.js.map +1 -1
  253. package/lib/esm/appui-abstract/toolbars/ToolbarItem.d.ts +121 -121
  254. package/lib/esm/appui-abstract/toolbars/ToolbarItem.js +60 -60
  255. package/lib/esm/appui-abstract/toolbars/ToolbarItem.js.map +1 -1
  256. package/lib/esm/appui-abstract/toolbars/ToolbarItemsManager.d.ts +45 -45
  257. package/lib/esm/appui-abstract/toolbars/ToolbarItemsManager.js +231 -231
  258. package/lib/esm/appui-abstract/toolbars/ToolbarItemsManager.js.map +1 -1
  259. package/lib/esm/appui-abstract/utils/IconSpecUtilities.d.ts +29 -29
  260. package/lib/esm/appui-abstract/utils/IconSpecUtilities.js +47 -47
  261. package/lib/esm/appui-abstract/utils/IconSpecUtilities.js.map +1 -1
  262. package/lib/esm/appui-abstract/utils/PointProps.d.ts +10 -10
  263. package/lib/esm/appui-abstract/utils/PointProps.js +8 -8
  264. package/lib/esm/appui-abstract/utils/PointProps.js.map +1 -1
  265. package/lib/esm/appui-abstract/utils/UiError.d.ts +12 -12
  266. package/lib/esm/appui-abstract/utils/UiError.js +18 -18
  267. package/lib/esm/appui-abstract/utils/UiError.js.map +1 -1
  268. package/lib/esm/appui-abstract/utils/UiEvent.d.ts +9 -9
  269. package/lib/esm/appui-abstract/utils/UiEvent.js +13 -13
  270. package/lib/esm/appui-abstract/utils/UiEvent.js.map +1 -1
  271. package/lib/esm/appui-abstract/utils/UiEventDispatcher.d.ts +46 -46
  272. package/lib/esm/appui-abstract/utils/UiEventDispatcher.js +126 -126
  273. package/lib/esm/appui-abstract/utils/UiEventDispatcher.js.map +1 -1
  274. package/lib/esm/appui-abstract/utils/callbacks.d.ts +20 -20
  275. package/lib/esm/appui-abstract/utils/callbacks.js +8 -8
  276. package/lib/esm/appui-abstract/utils/callbacks.js.map +1 -1
  277. package/lib/esm/appui-abstract/utils/filter/charCode.d.ts +416 -416
  278. package/lib/esm/appui-abstract/utils/filter/charCode.js +5 -5
  279. package/lib/esm/appui-abstract/utils/filter/charCode.js.map +1 -1
  280. package/lib/esm/appui-abstract/utils/filter/filters.d.ts +98 -98
  281. package/lib/esm/appui-abstract/utils/filter/filters.js +694 -694
  282. package/lib/esm/appui-abstract/utils/filter/filters.js.map +1 -1
  283. package/lib/esm/appui-abstract/utils/filter/map.d.ts +59 -59
  284. package/lib/esm/appui-abstract/utils/filter/map.js +397 -397
  285. package/lib/esm/appui-abstract/utils/filter/map.js.map +1 -1
  286. package/lib/esm/appui-abstract/utils/filter/strings.d.ts +20 -20
  287. package/lib/esm/appui-abstract/utils/filter/strings.js +70 -70
  288. package/lib/esm/appui-abstract/utils/filter/strings.js.map +1 -1
  289. package/lib/esm/appui-abstract/utils/isLetter.d.ts +9 -9
  290. package/lib/esm/appui-abstract/utils/isLetter.js +15 -15
  291. package/lib/esm/appui-abstract/utils/isLetter.js.map +1 -1
  292. package/lib/esm/appui-abstract/utils/misc.d.ts +11 -11
  293. package/lib/esm/appui-abstract/utils/misc.js +31 -31
  294. package/lib/esm/appui-abstract/utils/misc.js.map +1 -1
  295. package/lib/esm/appui-abstract/widget/AbstractWidgetProps.d.ts +86 -86
  296. package/lib/esm/appui-abstract/widget/AbstractWidgetProps.js +8 -8
  297. package/lib/esm/appui-abstract/widget/AbstractWidgetProps.js.map +1 -1
  298. package/lib/esm/appui-abstract/widget/StagePanel.d.ts +36 -36
  299. package/lib/esm/appui-abstract/widget/StagePanel.js +43 -43
  300. package/lib/esm/appui-abstract/widget/StagePanel.js.map +1 -1
  301. package/lib/esm/appui-abstract/widget/WidgetState.d.ts +19 -19
  302. package/lib/esm/appui-abstract/widget/WidgetState.js +24 -24
  303. package/lib/esm/appui-abstract/widget/WidgetState.js.map +1 -1
  304. package/lib/esm/appui-abstract.d.ts +103 -103
  305. package/lib/esm/appui-abstract.js +107 -107
  306. package/lib/esm/appui-abstract.js.map +1 -1
  307. package/package.json +4 -4
@@ -1,176 +1,176 @@
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 Dialog
8
- */
9
- Object.defineProperty(exports, "__esModule", { value: true });
10
- exports.DialogLayoutDataProvider = exports.UiLayoutDataProvider = exports.DialogButtonStyle = exports.DialogButtonType = void 0;
11
- const core_bentley_1 = require("@itwin/core-bentley");
12
- const EditorParams_1 = require("../properties/EditorParams");
13
- const Record_1 = require("../properties/Record");
14
- const Value_1 = require("../properties/Value");
15
- const UiDataProvider_1 = require("./UiDataProvider");
16
- /** Enum for button types. Determines button label, and default button style.
17
- * @public
18
- */
19
- var DialogButtonType;
20
- (function (DialogButtonType) {
21
- DialogButtonType["None"] = "";
22
- DialogButtonType["Close"] = "close";
23
- DialogButtonType["OK"] = "ok";
24
- DialogButtonType["Cancel"] = "cancel";
25
- DialogButtonType["Yes"] = "yes";
26
- DialogButtonType["No"] = "no";
27
- DialogButtonType["Retry"] = "retry";
28
- DialogButtonType["Next"] = "next";
29
- DialogButtonType["Previous"] = "previous";
30
- })(DialogButtonType = exports.DialogButtonType || (exports.DialogButtonType = {}));
31
- /** Enum for button style.
32
- * @public
33
- */
34
- var DialogButtonStyle;
35
- (function (DialogButtonStyle) {
36
- DialogButtonStyle["None"] = "";
37
- DialogButtonStyle["Primary"] = "iui-cta";
38
- DialogButtonStyle["Hollow"] = "iui-default";
39
- DialogButtonStyle["Blue"] = "iui-high-visibility";
40
- })(DialogButtonStyle = exports.DialogButtonStyle || (exports.DialogButtonStyle = {}));
41
- /**
42
- * @public
43
- */
44
- class UiLayoutDataProvider extends UiDataProvider_1.UiDataProvider {
45
- constructor() {
46
- super(...arguments);
47
- /** Applies change of a single property - this is the default method used when property editors are dynamically generated. */
48
- // istanbul ignore next
49
- this.applyUiPropertyChange = (_updatedValue) => {
50
- throw (new Error("Derived UiDataProvider should implement this to apply change to a single property."));
51
- };
52
- }
53
- /** Applies changes from one or more properties - some dialogs will use this to send a bulk set of changes back to the provider */
54
- processChangesInUi(properties) {
55
- // Default implementation is to just pass each property to applyUiPropertyChange
56
- properties.forEach((property) => this.applyUiPropertyChange(property));
57
- return { status: UiDataProvider_1.PropertyChangeStatus.Success };
58
- }
59
- /** Array of dialog rows */
60
- get rows() {
61
- if (!this._rows) {
62
- this._rows = this.layoutDialogRows();
63
- }
64
- return this._rows;
65
- }
66
- loadItemsInternal(items) {
67
- this._items = items ? items : [];
68
- this._rows = this.layoutDialogRows();
69
- }
70
- /** Called by UI to request available properties that can be bound to user supplied UI components (See Tool1UiProvider for example). */
71
- // istanbul ignore next
72
- supplyDialogItems() {
73
- throw (new Error("Derived UiDataProvider must implement this method to supply set of properties."));
74
- }
75
- get items() {
76
- if (undefined === this._items) {
77
- this.loadItemsInternal(this.supplyDialogItems());
78
- }
79
- return this._items;
80
- }
81
- /** Called to inform listeners that new properties are ready for display in UI. */
82
- reloadDialogItems(emitEvent = true) {
83
- this.loadItemsInternal(this.supplyDialogItems());
84
- // istanbul ignore else
85
- if (emitEvent)
86
- this.fireItemsReloadedEvent();
87
- }
88
- /**
89
- * @internal
90
- */
91
- layoutDialogRows() {
92
- const rows = [];
93
- this.items.forEach((item) => {
94
- const row = rows.find((value) => value.priority === item.editorPosition.rowPriority);
95
- if (row) {
96
- row.items.push(item);
97
- }
98
- else {
99
- rows.push({ priority: item.editorPosition.rowPriority, items: [item] });
100
- }
101
- });
102
- // sort rows
103
- rows.sort((a, b) => a.priority - b.priority);
104
- // sort records
105
- rows.forEach((row) => row.items.sort((a, b) => a.editorPosition.columnIndex - b.editorPosition.columnIndex));
106
- return rows;
107
- }
108
- /** Determines if a dialog item editor wants a label */
109
- static editorWantsLabel(item) {
110
- if (item.property.editor && item.property.editor.params) {
111
- const params = item.property.editor.params.find((param) => param.type === EditorParams_1.PropertyEditorParamTypes.SuppressEditorLabel);
112
- // istanbul ignore else
113
- if (params)
114
- return false;
115
- }
116
- return true;
117
- }
118
- /** Determines if a dialog items has an associated lock property */
119
- static hasAssociatedLockProperty(item) {
120
- return !!item.lockProperty;
121
- }
122
- /** Gets the disabled state for a given dialog item */
123
- static getItemDisabledState(baseDialogItem) {
124
- const dialogItem = baseDialogItem;
125
- // istanbul ignore else
126
- if (dialogItem === undefined || dialogItem.lockProperty === undefined)
127
- return !!baseDialogItem.isDisabled;
128
- const value = dialogItem.lockProperty.value;
129
- // istanbul ignore next
130
- if (value === undefined)
131
- return !!baseDialogItem.isDisabled;
132
- return !value.value;
133
- }
134
- /** Determines if a dialog row only contains button group editors */
135
- static onlyContainButtonGroupEditors(row) {
136
- for (const item of row.items) {
137
- // istanbul ignore else
138
- if (UiLayoutDataProvider.hasAssociatedLockProperty(item) || undefined === item.property.editor || "enum-buttongroup" !== item.property.editor.name || UiLayoutDataProvider.editorWantsLabel(item))
139
- return false;
140
- }
141
- return true;
142
- }
143
- }
144
- exports.UiLayoutDataProvider = UiLayoutDataProvider;
145
- /** Gets a property record for a given dialog item */
146
- UiLayoutDataProvider.getPropertyRecord = (dialogItem) => {
147
- const propertyValue = { valueFormat: Value_1.PropertyValueFormat.Primitive, value: dialogItem.value.value, displayValue: dialogItem.value.displayValue };
148
- const record = new Record_1.PropertyRecord(propertyValue, dialogItem.property);
149
- record.isDisabled = UiLayoutDataProvider.getItemDisabledState(dialogItem);
150
- return record;
151
- };
152
- /** [[DialogLayoutDataProvider]] Abstract class that allows property values to be passed between hosting API and Dialog that generates and arranges components dynamically
153
- * including the buttons at the bottom of the dialog.
154
- * @public
155
- */
156
- class DialogLayoutDataProvider extends UiLayoutDataProvider {
157
- constructor() {
158
- super(...arguments);
159
- this.onButtonsReloadedEvent = new core_bentley_1.BeUiEvent();
160
- }
161
- /** Called to inform listeners that modal dialog button data needs to be refreshed. */
162
- fireDialogButtonsReloadEvent() {
163
- this.onButtonsReloadedEvent.emit();
164
- }
165
- supplyButtonData() {
166
- // Derived class should override
167
- const buttons = [];
168
- // istanbul ignore next
169
- buttons.push({ type: DialogButtonType.OK, onClick: () => { } });
170
- // istanbul ignore next
171
- buttons.push({ type: DialogButtonType.Cancel, onClick: () => { } });
172
- return buttons;
173
- }
174
- }
175
- exports.DialogLayoutDataProvider = DialogLayoutDataProvider;
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 Dialog
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.DialogLayoutDataProvider = exports.UiLayoutDataProvider = exports.DialogButtonStyle = exports.DialogButtonType = void 0;
11
+ const core_bentley_1 = require("@itwin/core-bentley");
12
+ const EditorParams_1 = require("../properties/EditorParams");
13
+ const Record_1 = require("../properties/Record");
14
+ const Value_1 = require("../properties/Value");
15
+ const UiDataProvider_1 = require("./UiDataProvider");
16
+ /** Enum for button types. Determines button label, and default button style.
17
+ * @public
18
+ */
19
+ var DialogButtonType;
20
+ (function (DialogButtonType) {
21
+ DialogButtonType["None"] = "";
22
+ DialogButtonType["Close"] = "close";
23
+ DialogButtonType["OK"] = "ok";
24
+ DialogButtonType["Cancel"] = "cancel";
25
+ DialogButtonType["Yes"] = "yes";
26
+ DialogButtonType["No"] = "no";
27
+ DialogButtonType["Retry"] = "retry";
28
+ DialogButtonType["Next"] = "next";
29
+ DialogButtonType["Previous"] = "previous";
30
+ })(DialogButtonType = exports.DialogButtonType || (exports.DialogButtonType = {}));
31
+ /** Enum for button style.
32
+ * @public
33
+ */
34
+ var DialogButtonStyle;
35
+ (function (DialogButtonStyle) {
36
+ DialogButtonStyle["None"] = "";
37
+ DialogButtonStyle["Primary"] = "iui-cta";
38
+ DialogButtonStyle["Hollow"] = "iui-default";
39
+ DialogButtonStyle["Blue"] = "iui-high-visibility";
40
+ })(DialogButtonStyle = exports.DialogButtonStyle || (exports.DialogButtonStyle = {}));
41
+ /**
42
+ * @public
43
+ */
44
+ class UiLayoutDataProvider extends UiDataProvider_1.UiDataProvider {
45
+ constructor() {
46
+ super(...arguments);
47
+ /** Applies change of a single property - this is the default method used when property editors are dynamically generated. */
48
+ // istanbul ignore next
49
+ this.applyUiPropertyChange = (_updatedValue) => {
50
+ throw (new Error("Derived UiDataProvider should implement this to apply change to a single property."));
51
+ };
52
+ }
53
+ /** Applies changes from one or more properties - some dialogs will use this to send a bulk set of changes back to the provider */
54
+ processChangesInUi(properties) {
55
+ // Default implementation is to just pass each property to applyUiPropertyChange
56
+ properties.forEach((property) => this.applyUiPropertyChange(property));
57
+ return { status: UiDataProvider_1.PropertyChangeStatus.Success };
58
+ }
59
+ /** Array of dialog rows */
60
+ get rows() {
61
+ if (!this._rows) {
62
+ this._rows = this.layoutDialogRows();
63
+ }
64
+ return this._rows;
65
+ }
66
+ loadItemsInternal(items) {
67
+ this._items = items ? items : [];
68
+ this._rows = this.layoutDialogRows();
69
+ }
70
+ /** Called by UI to request available properties that can be bound to user supplied UI components (See Tool1UiProvider for example). */
71
+ // istanbul ignore next
72
+ supplyDialogItems() {
73
+ throw (new Error("Derived UiDataProvider must implement this method to supply set of properties."));
74
+ }
75
+ get items() {
76
+ if (undefined === this._items) {
77
+ this.loadItemsInternal(this.supplyDialogItems());
78
+ }
79
+ return this._items;
80
+ }
81
+ /** Called to inform listeners that new properties are ready for display in UI. */
82
+ reloadDialogItems(emitEvent = true) {
83
+ this.loadItemsInternal(this.supplyDialogItems());
84
+ // istanbul ignore else
85
+ if (emitEvent)
86
+ this.fireItemsReloadedEvent();
87
+ }
88
+ /**
89
+ * @internal
90
+ */
91
+ layoutDialogRows() {
92
+ const rows = [];
93
+ this.items.forEach((item) => {
94
+ const row = rows.find((value) => value.priority === item.editorPosition.rowPriority);
95
+ if (row) {
96
+ row.items.push(item);
97
+ }
98
+ else {
99
+ rows.push({ priority: item.editorPosition.rowPriority, items: [item] });
100
+ }
101
+ });
102
+ // sort rows
103
+ rows.sort((a, b) => a.priority - b.priority);
104
+ // sort records
105
+ rows.forEach((row) => row.items.sort((a, b) => a.editorPosition.columnIndex - b.editorPosition.columnIndex));
106
+ return rows;
107
+ }
108
+ /** Determines if a dialog item editor wants a label */
109
+ static editorWantsLabel(item) {
110
+ if (item.property.editor && item.property.editor.params) {
111
+ const params = item.property.editor.params.find((param) => param.type === EditorParams_1.PropertyEditorParamTypes.SuppressEditorLabel);
112
+ // istanbul ignore else
113
+ if (params)
114
+ return false;
115
+ }
116
+ return true;
117
+ }
118
+ /** Determines if a dialog items has an associated lock property */
119
+ static hasAssociatedLockProperty(item) {
120
+ return !!item.lockProperty;
121
+ }
122
+ /** Gets the disabled state for a given dialog item */
123
+ static getItemDisabledState(baseDialogItem) {
124
+ const dialogItem = baseDialogItem;
125
+ // istanbul ignore else
126
+ if (dialogItem === undefined || dialogItem.lockProperty === undefined)
127
+ return !!baseDialogItem.isDisabled;
128
+ const value = dialogItem.lockProperty.value;
129
+ // istanbul ignore next
130
+ if (value === undefined)
131
+ return !!baseDialogItem.isDisabled;
132
+ return !value.value;
133
+ }
134
+ /** Determines if a dialog row only contains button group editors */
135
+ static onlyContainButtonGroupEditors(row) {
136
+ for (const item of row.items) {
137
+ // istanbul ignore else
138
+ if (UiLayoutDataProvider.hasAssociatedLockProperty(item) || undefined === item.property.editor || "enum-buttongroup" !== item.property.editor.name || UiLayoutDataProvider.editorWantsLabel(item))
139
+ return false;
140
+ }
141
+ return true;
142
+ }
143
+ }
144
+ exports.UiLayoutDataProvider = UiLayoutDataProvider;
145
+ /** Gets a property record for a given dialog item */
146
+ UiLayoutDataProvider.getPropertyRecord = (dialogItem) => {
147
+ const propertyValue = { valueFormat: Value_1.PropertyValueFormat.Primitive, value: dialogItem.value.value, displayValue: dialogItem.value.displayValue };
148
+ const record = new Record_1.PropertyRecord(propertyValue, dialogItem.property);
149
+ record.isDisabled = UiLayoutDataProvider.getItemDisabledState(dialogItem);
150
+ return record;
151
+ };
152
+ /** [[DialogLayoutDataProvider]] Abstract class that allows property values to be passed between hosting API and Dialog that generates and arranges components dynamically
153
+ * including the buttons at the bottom of the dialog.
154
+ * @public
155
+ */
156
+ class DialogLayoutDataProvider extends UiLayoutDataProvider {
157
+ constructor() {
158
+ super(...arguments);
159
+ this.onButtonsReloadedEvent = new core_bentley_1.BeUiEvent();
160
+ }
161
+ /** Called to inform listeners that modal dialog button data needs to be refreshed. */
162
+ fireDialogButtonsReloadEvent() {
163
+ this.onButtonsReloadedEvent.emit();
164
+ }
165
+ supplyButtonData() {
166
+ // Derived class should override
167
+ const buttons = [];
168
+ // istanbul ignore next
169
+ buttons.push({ type: DialogButtonType.OK, onClick: () => { } });
170
+ // istanbul ignore next
171
+ buttons.push({ type: DialogButtonType.Cancel, onClick: () => { } });
172
+ return buttons;
173
+ }
174
+ }
175
+ exports.DialogLayoutDataProvider = DialogLayoutDataProvider;
176
176
  //# sourceMappingURL=UiLayoutDataProvider.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"UiLayoutDataProvider.js","sourceRoot":"","sources":["../../../../src/appui-abstract/dialogs/UiLayoutDataProvider.ts"],"names":[],"mappings":";AAAA;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,CAAC;IACrC,CAAC;IAEM,gBAAgB;QACrB,gCAAgC;QAChC,MAAM,OAAO,GAAsB,EAAE,CAAC;QACtC,uBAAuB;QACvB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,EAAE,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QAChE,uBAAuB;QACvB,OAAO,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,gBAAgB,CAAC,MAAM,EAAE,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,EAAE,CAAC,CAAC;QACpE,OAAO,OAAO,CAAC;IACjB,CAAC;CACF;AAjBD,4DAiBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Dialog\n */\n\nimport { BeUiEvent } from \"@itwin/core-bentley\";\nimport { PropertyEditorParams, PropertyEditorParamTypes, SuppressLabelEditorParams } from \"../properties/EditorParams\";\nimport { PropertyRecord } from \"../properties/Record\";\nimport { PrimitiveValue, PropertyValueFormat } from \"../properties/Value\";\nimport { BaseDialogItem, DialogItem, DialogPropertyItem, DialogPropertySyncItem } from \"./DialogItem\";\nimport { PropertyChangeResult, PropertyChangeStatus, UiDataProvider } from \"./UiDataProvider\";\n\n/** Enum for button types. Determines button label, and default button style.\n * @public\n */\nexport enum DialogButtonType {\n None = \"\",\n Close = \"close\",\n OK = \"ok\",\n Cancel = \"cancel\",\n Yes = \"yes\",\n No = \"no\",\n Retry = \"retry\",\n Next = \"next\",\n Previous = \"previous\"\n}\n\n/** Enum for button style.\n * @public\n */\nexport enum DialogButtonStyle {\n None = \"\",\n Primary = \"iui-cta\",\n Hollow = \"iui-default\",\n Blue = \"iui-high-visibility\",\n}\n\n/** Interface for a dialog button in a button cluster\n * @public\n */\nexport interface DialogButtonDef {\n /** type of button */\n type: DialogButtonType;\n /** Triggered on button click */\n onClick: () => void;\n /** Which button style to decorate button width */\n buttonStyle?: DialogButtonStyle;\n /** Disable the button */\n disabled?: boolean;\n /** Custom label */\n label?: string;\n /** Custom CSS class */\n className?: string;\n}\n\n/** [[DialogRow]] is the interface that groups dialog items into rows for building UI\n * @public\n */\nexport interface DialogRow {\n priority: number;\n items: DialogItem[];\n}\n\n/**\n * @public\n */\nexport abstract class UiLayoutDataProvider extends UiDataProvider {\n private _items: ReadonlyArray<DialogItem> | undefined;\n\n /** Applies changes from one or more properties - some dialogs will use this to send a bulk set of changes back to the provider */\n public override processChangesInUi(properties: DialogPropertyItem[]): PropertyChangeResult {\n // Default implementation is to just pass each property to applyUiPropertyChange\n properties.forEach((property) => this.applyUiPropertyChange(property));\n return { status: PropertyChangeStatus.Success };\n }\n\n /** Applies change of a single property - this is the default method used when property editors are dynamically generated. */\n // istanbul ignore next\n public applyUiPropertyChange = (_updatedValue: DialogPropertySyncItem): void => {\n throw (new Error(\"Derived UiDataProvider should implement this to apply change to a single property.\"));\n };\n\n private _rows: DialogRow[] | undefined;\n\n /** Array of dialog rows */\n public get rows(): DialogRow[] {\n if (!this._rows) {\n this._rows = this.layoutDialogRows();\n }\n return this._rows;\n }\n\n protected loadItemsInternal(items: ReadonlyArray<DialogItem> | undefined) {\n this._items = items ? items : [];\n this._rows = this.layoutDialogRows();\n }\n\n /** Called by UI to request available properties that can be bound to user supplied UI components (See Tool1UiProvider for example). */\n // istanbul ignore next\n public supplyDialogItems(): DialogItem[] | undefined {\n throw (new Error(\"Derived UiDataProvider must implement this method to supply set of properties.\"));\n }\n\n public get items(): ReadonlyArray<DialogItem> {\n if (undefined === this._items) {\n this.loadItemsInternal(this.supplyDialogItems());\n }\n return this._items!;\n }\n\n /** Called to inform listeners that new properties are ready for display in UI. */\n public reloadDialogItems(emitEvent = true) {\n this.loadItemsInternal(this.supplyDialogItems());\n // istanbul ignore else\n if (emitEvent)\n this.fireItemsReloadedEvent();\n }\n\n /**\n * @internal\n */\n public layoutDialogRows(): DialogRow[] {\n const rows: DialogRow[] = [];\n\n this.items.forEach((item) => {\n const row = rows.find((value) => value.priority === item.editorPosition.rowPriority);\n if (row) {\n row.items.push(item);\n } else {\n rows.push({ priority: item.editorPosition.rowPriority, items: [item] });\n }\n });\n\n // sort rows\n rows.sort((a: DialogRow, b: DialogRow) => a.priority - b.priority);\n // sort records\n rows.forEach((row: DialogRow) => row.items.sort((a: DialogItem, b: DialogItem) => a.editorPosition.columnIndex - b.editorPosition.columnIndex));\n return rows;\n }\n\n /** Determines if a dialog item editor wants a label */\n public static editorWantsLabel(item: DialogItem): boolean {\n if (item.property.editor && item.property.editor.params) {\n const params = item.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.SuppressEditorLabel) as SuppressLabelEditorParams;\n // istanbul ignore else\n if (params)\n return false;\n }\n return true;\n }\n\n /** Determines if a dialog items has an associated lock property */\n public static hasAssociatedLockProperty(item: DialogItem): boolean {\n return !!item.lockProperty;\n }\n\n /** Gets the disabled state for a given dialog item */\n public static getItemDisabledState(baseDialogItem: BaseDialogItem): boolean {\n const dialogItem = baseDialogItem as DialogItem;\n // istanbul ignore else\n if (dialogItem === undefined || dialogItem.lockProperty === undefined)\n return !!baseDialogItem.isDisabled;\n const value = dialogItem.lockProperty.value;\n // istanbul ignore next\n if (value === undefined)\n return !!baseDialogItem.isDisabled;\n\n return !value.value;\n }\n\n /** Gets a property record for a given dialog item */\n public static getPropertyRecord = (dialogItem: BaseDialogItem): PropertyRecord => {\n const propertyValue = { valueFormat: PropertyValueFormat.Primitive, value: dialogItem.value.value, displayValue: dialogItem.value.displayValue };\n const record = new PropertyRecord(propertyValue as PrimitiveValue, dialogItem.property);\n record.isDisabled = UiLayoutDataProvider.getItemDisabledState(dialogItem);\n return record;\n };\n\n /** Determines if a dialog row only contains button group editors */\n public static onlyContainButtonGroupEditors(row: DialogRow): boolean {\n for (const item of row.items) {\n // istanbul ignore else\n if (UiLayoutDataProvider.hasAssociatedLockProperty(item) || undefined === item.property.editor || \"enum-buttongroup\" !== item.property.editor.name || UiLayoutDataProvider.editorWantsLabel(item))\n return false;\n }\n return true;\n }\n}\n\n/** [[DialogLayoutDataProvider]] Abstract class that allows property values to be passed between hosting API and Dialog that generates and arranges components dynamically\n * including the buttons at the bottom of the dialog.\n * @public\n */\nexport abstract class DialogLayoutDataProvider extends UiLayoutDataProvider {\n public onButtonsReloadedEvent = new BeUiEvent<void>();\n\n /** Called to inform listeners that modal dialog button data needs to be refreshed. */\n public fireDialogButtonsReloadEvent() {\n this.onButtonsReloadedEvent.emit();\n }\n\n public supplyButtonData(): DialogButtonDef[] | undefined {\n // Derived class should override\n const buttons: DialogButtonDef[] = [];\n // istanbul ignore next\n buttons.push({ type: DialogButtonType.OK, onClick: () => { } });\n // istanbul ignore next\n buttons.push({ type: DialogButtonType.Cancel, onClick: () => { } });\n return buttons;\n }\n}\n"]}
1
+ {"version":3,"file":"UiLayoutDataProvider.js","sourceRoot":"","sources":["../../../../src/appui-abstract/dialogs/UiLayoutDataProvider.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG;;;AAEH,sDAAgD;AAChD,6DAAuH;AACvH,iDAAsD;AACtD,+CAA0E;AAE1E,qDAA8F;AAE9F;;GAEG;AACH,IAAY,gBAUX;AAVD,WAAY,gBAAgB;IAC1B,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,6BAAS,CAAA;IACT,qCAAiB,CAAA;IACjB,+BAAW,CAAA;IACX,6BAAS,CAAA;IACT,mCAAe,CAAA;IACf,iCAAa,CAAA;IACb,yCAAqB,CAAA;AACvB,CAAC,EAVW,gBAAgB,GAAhB,wBAAgB,KAAhB,wBAAgB,QAU3B;AAED;;GAEG;AACH,IAAY,iBAKX;AALD,WAAY,iBAAiB;IAC3B,8BAAS,CAAA;IACT,wCAAmB,CAAA;IACnB,2CAAsB,CAAA;IACtB,iDAA4B,CAAA;AAC9B,CAAC,EALW,i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;SAChB;QACD,OAAO,IAAI,CAAC;IACd,CAAC;;AAxHH,oDAyHC;AAjBC,qDAAqD;AACvC,sCAAiB,GAAG,CAAC,UAA0B,EAAkB,EAAE;IAC/E,MAAM,aAAa,GAAG,EAAE,WAAW,EAAE,2BAAmB,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,uBAAc,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,MAAsB,wBAAyB,SAAQ,oBAAoB;IAA3E;;QACS,2BAAsB,GAAG,IAAI,wBAAS,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;AAjBD,4DAiBC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Dialog\r\n */\r\n\r\nimport { BeUiEvent } from \"@itwin/core-bentley\";\r\nimport { PropertyEditorParams, PropertyEditorParamTypes, SuppressLabelEditorParams } from \"../properties/EditorParams\";\r\nimport { PropertyRecord } from \"../properties/Record\";\r\nimport { PrimitiveValue, PropertyValueFormat } from \"../properties/Value\";\r\nimport { BaseDialogItem, DialogItem, DialogPropertyItem, DialogPropertySyncItem } from \"./DialogItem\";\r\nimport { PropertyChangeResult, PropertyChangeStatus, UiDataProvider } from \"./UiDataProvider\";\r\n\r\n/** Enum for button types. Determines button label, and default button style.\r\n * @public\r\n */\r\nexport enum DialogButtonType {\r\n None = \"\",\r\n Close = \"close\",\r\n OK = \"ok\",\r\n Cancel = \"cancel\",\r\n Yes = \"yes\",\r\n No = \"no\",\r\n Retry = \"retry\",\r\n Next = \"next\",\r\n Previous = \"previous\"\r\n}\r\n\r\n/** Enum for button style.\r\n * @public\r\n */\r\nexport enum DialogButtonStyle {\r\n None = \"\",\r\n Primary = \"iui-cta\",\r\n Hollow = \"iui-default\",\r\n Blue = \"iui-high-visibility\",\r\n}\r\n\r\n/** Interface for a dialog button in a button cluster\r\n * @public\r\n */\r\nexport interface DialogButtonDef {\r\n /** type of button */\r\n type: DialogButtonType;\r\n /** Triggered on button click */\r\n onClick: () => void;\r\n /** Which button style to decorate button width */\r\n buttonStyle?: DialogButtonStyle;\r\n /** Disable the button */\r\n disabled?: boolean;\r\n /** Custom label */\r\n label?: string;\r\n /** Custom CSS class */\r\n className?: string;\r\n}\r\n\r\n/** [[DialogRow]] is the interface that groups dialog items into rows for building UI\r\n * @public\r\n */\r\nexport interface DialogRow {\r\n priority: number;\r\n items: DialogItem[];\r\n}\r\n\r\n/**\r\n * @public\r\n */\r\nexport abstract class UiLayoutDataProvider extends UiDataProvider {\r\n private _items: ReadonlyArray<DialogItem> | undefined;\r\n\r\n /** Applies changes from one or more properties - some dialogs will use this to send a bulk set of changes back to the provider */\r\n public override processChangesInUi(properties: DialogPropertyItem[]): PropertyChangeResult {\r\n // Default implementation is to just pass each property to applyUiPropertyChange\r\n properties.forEach((property) => this.applyUiPropertyChange(property));\r\n return { status: PropertyChangeStatus.Success };\r\n }\r\n\r\n /** Applies change of a single property - this is the default method used when property editors are dynamically generated. */\r\n // istanbul ignore next\r\n public applyUiPropertyChange = (_updatedValue: DialogPropertySyncItem): void => {\r\n throw (new Error(\"Derived UiDataProvider should implement this to apply change to a single property.\"));\r\n };\r\n\r\n private _rows: DialogRow[] | undefined;\r\n\r\n /** Array of dialog rows */\r\n public get rows(): DialogRow[] {\r\n if (!this._rows) {\r\n this._rows = this.layoutDialogRows();\r\n }\r\n return this._rows;\r\n }\r\n\r\n protected loadItemsInternal(items: ReadonlyArray<DialogItem> | undefined) {\r\n this._items = items ? items : [];\r\n this._rows = this.layoutDialogRows();\r\n }\r\n\r\n /** Called by UI to request available properties that can be bound to user supplied UI components (See Tool1UiProvider for example). */\r\n // istanbul ignore next\r\n public supplyDialogItems(): DialogItem[] | undefined {\r\n throw (new Error(\"Derived UiDataProvider must implement this method to supply set of properties.\"));\r\n }\r\n\r\n public get items(): ReadonlyArray<DialogItem> {\r\n if (undefined === this._items) {\r\n this.loadItemsInternal(this.supplyDialogItems());\r\n }\r\n return this._items!;\r\n }\r\n\r\n /** Called to inform listeners that new properties are ready for display in UI. */\r\n public reloadDialogItems(emitEvent = true) {\r\n this.loadItemsInternal(this.supplyDialogItems());\r\n // istanbul ignore else\r\n if (emitEvent)\r\n this.fireItemsReloadedEvent();\r\n }\r\n\r\n /**\r\n * @internal\r\n */\r\n public layoutDialogRows(): DialogRow[] {\r\n const rows: DialogRow[] = [];\r\n\r\n this.items.forEach((item) => {\r\n const row = rows.find((value) => value.priority === item.editorPosition.rowPriority);\r\n if (row) {\r\n row.items.push(item);\r\n } else {\r\n rows.push({ priority: item.editorPosition.rowPriority, items: [item] });\r\n }\r\n });\r\n\r\n // sort rows\r\n rows.sort((a: DialogRow, b: DialogRow) => a.priority - b.priority);\r\n // sort records\r\n rows.forEach((row: DialogRow) => row.items.sort((a: DialogItem, b: DialogItem) => a.editorPosition.columnIndex - b.editorPosition.columnIndex));\r\n return rows;\r\n }\r\n\r\n /** Determines if a dialog item editor wants a label */\r\n public static editorWantsLabel(item: DialogItem): boolean {\r\n if (item.property.editor && item.property.editor.params) {\r\n const params = item.property.editor.params.find((param: PropertyEditorParams) => param.type === PropertyEditorParamTypes.SuppressEditorLabel) as SuppressLabelEditorParams;\r\n // istanbul ignore else\r\n if (params)\r\n return false;\r\n }\r\n return true;\r\n }\r\n\r\n /** Determines if a dialog items has an associated lock property */\r\n public static hasAssociatedLockProperty(item: DialogItem): boolean {\r\n return !!item.lockProperty;\r\n }\r\n\r\n /** Gets the disabled state for a given dialog item */\r\n public static getItemDisabledState(baseDialogItem: BaseDialogItem): boolean {\r\n const dialogItem = baseDialogItem as DialogItem;\r\n // istanbul ignore else\r\n if (dialogItem === undefined || dialogItem.lockProperty === undefined)\r\n return !!baseDialogItem.isDisabled;\r\n const value = dialogItem.lockProperty.value;\r\n // istanbul ignore next\r\n if (value === undefined)\r\n return !!baseDialogItem.isDisabled;\r\n\r\n return !value.value;\r\n }\r\n\r\n /** Gets a property record for a given dialog item */\r\n public static getPropertyRecord = (dialogItem: BaseDialogItem): PropertyRecord => {\r\n const propertyValue = { valueFormat: PropertyValueFormat.Primitive, value: dialogItem.value.value, displayValue: dialogItem.value.displayValue };\r\n const record = new PropertyRecord(propertyValue as PrimitiveValue, dialogItem.property);\r\n record.isDisabled = UiLayoutDataProvider.getItemDisabledState(dialogItem);\r\n return record;\r\n };\r\n\r\n /** Determines if a dialog row only contains button group editors */\r\n public static onlyContainButtonGroupEditors(row: DialogRow): boolean {\r\n for (const item of row.items) {\r\n // istanbul ignore else\r\n if (UiLayoutDataProvider.hasAssociatedLockProperty(item) || undefined === item.property.editor || \"enum-buttongroup\" !== item.property.editor.name || UiLayoutDataProvider.editorWantsLabel(item))\r\n return false;\r\n }\r\n return true;\r\n }\r\n}\r\n\r\n/** [[DialogLayoutDataProvider]] Abstract class that allows property values to be passed between hosting API and Dialog that generates and arranges components dynamically\r\n * including the buttons at the bottom of the dialog.\r\n * @public\r\n */\r\nexport abstract class DialogLayoutDataProvider extends UiLayoutDataProvider {\r\n public onButtonsReloadedEvent = new BeUiEvent<void>();\r\n\r\n /** Called to inform listeners that modal dialog button data needs to be refreshed. */\r\n public fireDialogButtonsReloadEvent() {\r\n this.onButtonsReloadedEvent.emit();\r\n }\r\n\r\n public supplyButtonData(): DialogButtonDef[] | undefined {\r\n // Derived class should override\r\n const buttons: DialogButtonDef[] = [];\r\n // istanbul ignore next\r\n buttons.push({ type: DialogButtonType.OK, onClick: () => { } });\r\n // istanbul ignore next\r\n buttons.push({ type: DialogButtonType.Cancel, onClick: () => { } });\r\n return buttons;\r\n }\r\n}\r\n"]}
@@ -1,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 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
+ }
54
54
  //# sourceMappingURL=AbstractItemProps.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 Item
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 Item
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  //# 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":["/*---------------------------------------------------------------------------------------------\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\n* See LICENSE.md in the project root for license terms and full copyright notice.\n*--------------------------------------------------------------------------------------------*/\n/** @packageDocumentation\n * @module Item\n */\n\nimport { BadgeType } from \"./BadgeType\";\nimport { ConditionalBooleanValue } from \"./ConditionalBooleanValue\";\nimport { ConditionalStringValue } from \"./ConditionalStringValue\";\n\n/** Prototype for string getter function.\n * @public\n */\nexport type StringGetter = () => string;\n\n/** Definition that specifies properties shared between many ConfigurableUi components.\n * @public\n */\nexport interface CommonItemProps {\n /** can be used by application to store miscellaneous data. */\n applicationData?: any;\n /** Badge to be overlaid on the item. */\n badgeType?: BadgeType;\n /** if set, it is used to explicitly set the description shown by components that support a description. */\n description?: string | ConditionalStringValue;\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\n icon?: string | ConditionalStringValue;\n /** optional data to be used by item implementor. */\n readonly internalData?: Map<string, any>;\n\n /** if true component will be hidden - defaults to false */\n isHidden?: boolean | ConditionalBooleanValue;\n /** if true component will be disabled - defaults to false */\n isDisabled?: boolean | ConditionalBooleanValue;\n /** if set, component will be considered \"active\" an will display an \"active stripe\" - defaults to false */\n isActive?: boolean;\n /** if set, component will be considered selected but will NOT display an \"active stripe\" - defaults to false. Typically used by buttons that toggle between two states. */\n isPressed?: boolean;\n /** if set, it is used to explicitly set the label shown by a component. */\n label?: string | ConditionalStringValue;\n /** used to explicitly set the tooltip shown by a component. */\n tooltip?: string | ConditionalStringValue;\n}\n\n/** Definition for a command handler.\n * @public\n */\nexport interface CommandHandler {\n /** Function to execute */\n execute?: (args?: any) => any;\n /** Parameters passed to the function */\n parameters?: any;\n /** Function to get the parameters passed to the function */\n getCommandArgs?: () => any[];\n}\n\n/** Definition for an item that executes and action.\n * @public\n */\nexport interface AbstractActionItemProps extends CommonItemProps, CommandHandler {\n}\n"]}
1
+ {"version":3,"file":"AbstractItemProps.js","sourceRoot":"","sources":["../../../../src/appui-abstract/items/AbstractItemProps.ts"],"names":[],"mappings":";AAAA;;;+FAG+F;AAC/F;;GAEG","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Item\r\n */\r\n\r\nimport { BadgeType } from \"./BadgeType\";\r\nimport { ConditionalBooleanValue } from \"./ConditionalBooleanValue\";\r\nimport { ConditionalStringValue } from \"./ConditionalStringValue\";\r\n\r\n/** Prototype for string getter function.\r\n * @public\r\n */\r\nexport type StringGetter = () => string;\r\n\r\n/** Definition that specifies properties shared between many ConfigurableUi components.\r\n * @public\r\n */\r\nexport interface CommonItemProps {\r\n /** can be used by application to store miscellaneous data. */\r\n applicationData?: any;\r\n /** Badge to be overlaid on the item. */\r\n badgeType?: BadgeType;\r\n /** if set, it is used to explicitly set the description shown by components that support a description. */\r\n description?: string | ConditionalStringValue;\r\n /** Name of icon WebFont entry or if specifying an imported SVG symbol use \"webSvg:\" prefix to imported symbol Id. */\r\n icon?: string | ConditionalStringValue;\r\n /** optional data to be used by item implementor. */\r\n readonly internalData?: Map<string, any>;\r\n\r\n /** if true component will be hidden - defaults to false */\r\n isHidden?: boolean | ConditionalBooleanValue;\r\n /** if true component will be disabled - defaults to false */\r\n isDisabled?: boolean | ConditionalBooleanValue;\r\n /** if set, component will be considered \"active\" an will display an \"active stripe\" - defaults to false */\r\n isActive?: boolean;\r\n /** if set, component will be considered selected but will NOT display an \"active stripe\" - defaults to false. Typically used by buttons that toggle between two states. */\r\n isPressed?: boolean;\r\n /** if set, it is used to explicitly set the label shown by a component. */\r\n label?: string | ConditionalStringValue;\r\n /** used to explicitly set the tooltip shown by a component. */\r\n tooltip?: string | ConditionalStringValue;\r\n}\r\n\r\n/** Definition for a command handler.\r\n * @public\r\n */\r\nexport interface CommandHandler {\r\n /** Function to execute */\r\n execute?: (args?: any) => any;\r\n /** Parameters passed to the function */\r\n parameters?: any;\r\n /** Function to get the parameters passed to the function */\r\n getCommandArgs?: () => any[];\r\n}\r\n\r\n/** Definition for an item that executes and action.\r\n * @public\r\n */\r\nexport interface AbstractActionItemProps extends CommonItemProps, CommandHandler {\r\n}\r\n"]}
@@ -1,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,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 Item
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 Item
8
+ */
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
10
  //# sourceMappingURL=AbstractMenuItemProps.js.map