@itwin/appui-react 3.3.0-dev.72 → 3.3.0-dev.77

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 (165) hide show
  1. package/lib/cjs/appui-react/configurableui/state.d.ts +0 -2
  2. package/lib/cjs/appui-react/configurableui/state.d.ts.map +1 -1
  3. package/lib/cjs/appui-react/configurableui/state.js +0 -1
  4. package/lib/cjs/appui-react/configurableui/state.js.map +1 -1
  5. package/lib/cjs/appui-react/content/ContentLayout.d.ts +4 -1
  6. package/lib/cjs/appui-react/content/ContentLayout.d.ts.map +1 -1
  7. package/lib/cjs/appui-react/content/ContentLayout.js.map +1 -1
  8. package/lib/cjs/appui-react/frontstage/Frontstage.d.ts +3 -1
  9. package/lib/cjs/appui-react/frontstage/Frontstage.d.ts.map +1 -1
  10. package/lib/cjs/appui-react/frontstage/Frontstage.js +1 -1
  11. package/lib/cjs/appui-react/frontstage/Frontstage.js.map +1 -1
  12. package/lib/cjs/appui-react/selection/ClearEmphasisStatusField.d.ts.map +1 -1
  13. package/lib/cjs/appui-react/selection/ClearEmphasisStatusField.js +4 -1
  14. package/lib/cjs/appui-react/selection/ClearEmphasisStatusField.js.map +1 -1
  15. package/lib/cjs/appui-react/statusbar/StatusBar.d.ts +4 -1
  16. package/lib/cjs/appui-react/statusbar/StatusBar.d.ts.map +1 -1
  17. package/lib/cjs/appui-react/statusbar/StatusBar.js +12 -4
  18. package/lib/cjs/appui-react/statusbar/StatusBar.js.map +1 -1
  19. package/lib/cjs/appui-react/statusbar/StatusBarComposer.d.ts.map +1 -1
  20. package/lib/cjs/appui-react/statusbar/StatusBarComposer.js +1 -0
  21. package/lib/cjs/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  22. package/lib/cjs/appui-react/statusbar/StatusBarWidgetControl.d.ts +3 -1
  23. package/lib/cjs/appui-react/statusbar/StatusBarWidgetControl.d.ts.map +1 -1
  24. package/lib/cjs/appui-react/statusbar/StatusBarWidgetControl.js.map +1 -1
  25. package/lib/cjs/appui-react/statusbar/withMessageCenterFieldProps.d.ts +1 -1
  26. package/lib/cjs/appui-react/statusbar/withMessageCenterFieldProps.js +1 -1
  27. package/lib/cjs/appui-react/statusbar/withMessageCenterFieldProps.js.map +1 -1
  28. package/lib/cjs/appui-react/statusbar/withStatusFieldProps.d.ts +1 -0
  29. package/lib/cjs/appui-react/statusbar/withStatusFieldProps.d.ts.map +1 -1
  30. package/lib/cjs/appui-react/statusbar/withStatusFieldProps.js +1 -0
  31. package/lib/cjs/appui-react/statusbar/withStatusFieldProps.js.map +1 -1
  32. package/lib/cjs/appui-react/statusfields/ConditionalField.d.ts +4 -1
  33. package/lib/cjs/appui-react/statusfields/ConditionalField.d.ts.map +1 -1
  34. package/lib/cjs/appui-react/statusfields/ConditionalField.js +4 -1
  35. package/lib/cjs/appui-react/statusfields/ConditionalField.js.map +1 -1
  36. package/lib/cjs/appui-react/statusfields/FooterModeField.d.ts +2 -3
  37. package/lib/cjs/appui-react/statusfields/FooterModeField.d.ts.map +1 -1
  38. package/lib/cjs/appui-react/statusfields/FooterModeField.js +9 -8
  39. package/lib/cjs/appui-react/statusfields/FooterModeField.js.map +1 -1
  40. package/lib/cjs/appui-react/statusfields/Indicator.d.ts +3 -1
  41. package/lib/cjs/appui-react/statusfields/Indicator.d.ts.map +1 -1
  42. package/lib/cjs/appui-react/statusfields/Indicator.js +1 -0
  43. package/lib/cjs/appui-react/statusfields/Indicator.js.map +1 -1
  44. package/lib/cjs/appui-react/statusfields/MessageCenter.d.ts +3 -1
  45. package/lib/cjs/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
  46. package/lib/cjs/appui-react/statusfields/MessageCenter.js +13 -7
  47. package/lib/cjs/appui-react/statusfields/MessageCenter.js.map +1 -1
  48. package/lib/cjs/appui-react/statusfields/PromptField.d.ts.map +1 -1
  49. package/lib/cjs/appui-react/statusfields/PromptField.js +4 -1
  50. package/lib/cjs/appui-react/statusfields/PromptField.js.map +1 -1
  51. package/lib/cjs/appui-react/statusfields/SectionsField.d.ts.map +1 -1
  52. package/lib/cjs/appui-react/statusfields/SectionsField.js +4 -1
  53. package/lib/cjs/appui-react/statusfields/SectionsField.js.map +1 -1
  54. package/lib/cjs/appui-react/statusfields/SelectionInfo.d.ts.map +1 -1
  55. package/lib/cjs/appui-react/statusfields/SelectionInfo.js +4 -1
  56. package/lib/cjs/appui-react/statusfields/SelectionInfo.js.map +1 -1
  57. package/lib/cjs/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
  58. package/lib/cjs/appui-react/statusfields/SelectionScope.js +5 -2
  59. package/lib/cjs/appui-react/statusfields/SelectionScope.js.map +1 -1
  60. package/lib/cjs/appui-react/statusfields/StatusFieldProps.d.ts +4 -2
  61. package/lib/cjs/appui-react/statusfields/StatusFieldProps.d.ts.map +1 -1
  62. package/lib/cjs/appui-react/statusfields/StatusFieldProps.js.map +1 -1
  63. package/lib/cjs/appui-react/statusfields/ViewAttributes.d.ts.map +1 -1
  64. package/lib/cjs/appui-react/statusfields/ViewAttributes.js +4 -1
  65. package/lib/cjs/appui-react/statusfields/ViewAttributes.js.map +1 -1
  66. package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.d.ts.map +1 -1
  67. package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.js +4 -1
  68. package/lib/cjs/appui-react/statusfields/tileloading/TileLoadingIndicator.js.map +1 -1
  69. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js +3 -3
  70. package/lib/cjs/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
  71. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
  72. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js +1 -0
  73. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
  74. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts.map +1 -1
  75. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +1 -0
  76. package/lib/cjs/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
  77. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
  78. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +7 -2
  79. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
  80. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts.map +1 -1
  81. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +7 -2
  82. package/lib/cjs/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  83. package/lib/esm/appui-react/configurableui/state.d.ts +0 -2
  84. package/lib/esm/appui-react/configurableui/state.d.ts.map +1 -1
  85. package/lib/esm/appui-react/configurableui/state.js +0 -1
  86. package/lib/esm/appui-react/configurableui/state.js.map +1 -1
  87. package/lib/esm/appui-react/content/ContentLayout.d.ts +4 -1
  88. package/lib/esm/appui-react/content/ContentLayout.d.ts.map +1 -1
  89. package/lib/esm/appui-react/content/ContentLayout.js.map +1 -1
  90. package/lib/esm/appui-react/frontstage/Frontstage.d.ts +3 -1
  91. package/lib/esm/appui-react/frontstage/Frontstage.d.ts.map +1 -1
  92. package/lib/esm/appui-react/frontstage/Frontstage.js +1 -1
  93. package/lib/esm/appui-react/frontstage/Frontstage.js.map +1 -1
  94. package/lib/esm/appui-react/selection/ClearEmphasisStatusField.d.ts.map +1 -1
  95. package/lib/esm/appui-react/selection/ClearEmphasisStatusField.js +4 -1
  96. package/lib/esm/appui-react/selection/ClearEmphasisStatusField.js.map +1 -1
  97. package/lib/esm/appui-react/statusbar/StatusBar.d.ts +4 -1
  98. package/lib/esm/appui-react/statusbar/StatusBar.d.ts.map +1 -1
  99. package/lib/esm/appui-react/statusbar/StatusBar.js +12 -4
  100. package/lib/esm/appui-react/statusbar/StatusBar.js.map +1 -1
  101. package/lib/esm/appui-react/statusbar/StatusBarComposer.d.ts.map +1 -1
  102. package/lib/esm/appui-react/statusbar/StatusBarComposer.js +1 -0
  103. package/lib/esm/appui-react/statusbar/StatusBarComposer.js.map +1 -1
  104. package/lib/esm/appui-react/statusbar/StatusBarWidgetControl.d.ts +3 -1
  105. package/lib/esm/appui-react/statusbar/StatusBarWidgetControl.d.ts.map +1 -1
  106. package/lib/esm/appui-react/statusbar/StatusBarWidgetControl.js.map +1 -1
  107. package/lib/esm/appui-react/statusbar/withMessageCenterFieldProps.d.ts +1 -1
  108. package/lib/esm/appui-react/statusbar/withMessageCenterFieldProps.js +1 -1
  109. package/lib/esm/appui-react/statusbar/withMessageCenterFieldProps.js.map +1 -1
  110. package/lib/esm/appui-react/statusbar/withStatusFieldProps.d.ts +1 -0
  111. package/lib/esm/appui-react/statusbar/withStatusFieldProps.d.ts.map +1 -1
  112. package/lib/esm/appui-react/statusbar/withStatusFieldProps.js +1 -0
  113. package/lib/esm/appui-react/statusbar/withStatusFieldProps.js.map +1 -1
  114. package/lib/esm/appui-react/statusfields/ConditionalField.d.ts +4 -1
  115. package/lib/esm/appui-react/statusfields/ConditionalField.d.ts.map +1 -1
  116. package/lib/esm/appui-react/statusfields/ConditionalField.js +4 -1
  117. package/lib/esm/appui-react/statusfields/ConditionalField.js.map +1 -1
  118. package/lib/esm/appui-react/statusfields/FooterModeField.d.ts +2 -3
  119. package/lib/esm/appui-react/statusfields/FooterModeField.d.ts.map +1 -1
  120. package/lib/esm/appui-react/statusfields/FooterModeField.js +9 -8
  121. package/lib/esm/appui-react/statusfields/FooterModeField.js.map +1 -1
  122. package/lib/esm/appui-react/statusfields/Indicator.d.ts +3 -1
  123. package/lib/esm/appui-react/statusfields/Indicator.d.ts.map +1 -1
  124. package/lib/esm/appui-react/statusfields/Indicator.js +1 -0
  125. package/lib/esm/appui-react/statusfields/Indicator.js.map +1 -1
  126. package/lib/esm/appui-react/statusfields/MessageCenter.d.ts +3 -1
  127. package/lib/esm/appui-react/statusfields/MessageCenter.d.ts.map +1 -1
  128. package/lib/esm/appui-react/statusfields/MessageCenter.js +13 -7
  129. package/lib/esm/appui-react/statusfields/MessageCenter.js.map +1 -1
  130. package/lib/esm/appui-react/statusfields/PromptField.d.ts.map +1 -1
  131. package/lib/esm/appui-react/statusfields/PromptField.js +4 -1
  132. package/lib/esm/appui-react/statusfields/PromptField.js.map +1 -1
  133. package/lib/esm/appui-react/statusfields/SectionsField.d.ts.map +1 -1
  134. package/lib/esm/appui-react/statusfields/SectionsField.js +4 -1
  135. package/lib/esm/appui-react/statusfields/SectionsField.js.map +1 -1
  136. package/lib/esm/appui-react/statusfields/SelectionInfo.d.ts.map +1 -1
  137. package/lib/esm/appui-react/statusfields/SelectionInfo.js +4 -1
  138. package/lib/esm/appui-react/statusfields/SelectionInfo.js.map +1 -1
  139. package/lib/esm/appui-react/statusfields/SelectionScope.d.ts.map +1 -1
  140. package/lib/esm/appui-react/statusfields/SelectionScope.js +5 -2
  141. package/lib/esm/appui-react/statusfields/SelectionScope.js.map +1 -1
  142. package/lib/esm/appui-react/statusfields/StatusFieldProps.d.ts +4 -2
  143. package/lib/esm/appui-react/statusfields/StatusFieldProps.d.ts.map +1 -1
  144. package/lib/esm/appui-react/statusfields/StatusFieldProps.js.map +1 -1
  145. package/lib/esm/appui-react/statusfields/ViewAttributes.d.ts.map +1 -1
  146. package/lib/esm/appui-react/statusfields/ViewAttributes.js +4 -1
  147. package/lib/esm/appui-react/statusfields/ViewAttributes.js.map +1 -1
  148. package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.d.ts.map +1 -1
  149. package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.js +4 -1
  150. package/lib/esm/appui-react/statusfields/tileloading/TileLoadingIndicator.js.map +1 -1
  151. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js +3 -3
  152. package/lib/esm/appui-react/statusfields/toolassistance/ToolAssistanceField.js.map +1 -1
  153. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.d.ts.map +1 -1
  154. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js +1 -0
  155. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsProvider.js.map +1 -1
  156. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.d.ts.map +1 -1
  157. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js +1 -0
  158. package/lib/esm/appui-react/ui-items-provider/StandardContentToolsUiItemsProvider.js.map +1 -1
  159. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.d.ts.map +1 -1
  160. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js +7 -2
  161. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarItemsProvider.js.map +1 -1
  162. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.d.ts.map +1 -1
  163. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js +7 -2
  164. package/lib/esm/appui-react/ui-items-provider/StandardStatusbarUiItemsProvider.js.map +1 -1
  165. package/package.json +32 -32
@@ -12,7 +12,9 @@ export declare type StatusBarFieldId = string | null;
12
12
  * @public
13
13
  */
14
14
  export interface StatusBarWidgetControlArgs {
15
- /** Describes whether the footer is in widget or footer mode. */
15
+ /** Describes whether the footer is in widget or footer mode.
16
+ * @deprecated In upcoming version, widget mode will be removed. Consider this parameter to always be true.
17
+ */
16
18
  isInFooterMode: boolean;
17
19
  /** Currently open widget or null if no widget is open.
18
20
  * @deprecated In upcoming versions, this will be removed. Field will be have the freedom of handling their dialog behavior however they like.
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBarWidgetControl.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusbar/StatusBarWidgetControl.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAEH,OAAO,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD;;GAEG;AACH,oBAAY,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC,gEAAgE;IAChE,cAAc,EAAE,OAAO,CAAC;IACxB;;MAEE;IACF,UAAU,EAAE,gBAAgB,CAAC;IAC7B;;MAEE;IACF,YAAY,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACjD,gEAAgE;IAChE,cAAc,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;CACxC;AAED;;GAEG;AACH,8BAAsB,sBAAuB,SAAQ,aAAa;gBACpD,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,GAAG;IAItD,wEAAwE;aACxD,YAAY,CAAC,IAAI,EAAE,0BAA0B,GAAG,KAAK,CAAC,SAAS;IAE/E,sFAAsF;IACtE,OAAO,IAAI,yBAAyB;CACrD"}
1
+ {"version":3,"file":"StatusBarWidgetControl.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusbar/StatusBarWidgetControl.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAEH,OAAO,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAEzD;;GAEG;AACH,oBAAY,gBAAgB,GAAG,MAAM,GAAG,IAAI,CAAC;AAE7C;;GAEG;AACH,MAAM,WAAW,0BAA0B;IACzC;;MAEE;IACF,cAAc,EAAE,OAAO,CAAC;IACxB;;MAEE;IACF,UAAU,EAAE,gBAAgB,CAAC;IAC7B;;MAEE;IACF,YAAY,EAAE,CAAC,MAAM,EAAE,gBAAgB,KAAK,IAAI,CAAC;IACjD,gEAAgE;IAChE,cAAc,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;CACxC;AAED;;GAEG;AACH,8BAAsB,sBAAuB,SAAQ,aAAa;gBACpD,IAAI,EAAE,sBAAsB,EAAE,OAAO,EAAE,GAAG;IAItD,wEAAwE;aACxD,YAAY,CAAC,IAAI,EAAE,0BAA0B,GAAG,KAAK,CAAC,SAAS;IAE/E,sFAAsF;IACtE,OAAO,IAAI,yBAAyB;CACrD"}
@@ -1 +1 @@
1
- {"version":3,"file":"StatusBarWidgetControl.js","sourceRoot":"","sources":["../../../../src/appui-react/statusbar/StatusBarWidgetControl.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAA0B,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AAyBzD;;GAEG;AACH,MAAM,OAAgB,sBAAuB,SAAQ,aAAa;IAChE,YAAY,IAA4B,EAAE,OAAY;QACpD,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACvB,CAAC;IAKD,sFAAsF;IACtE,OAAO,KAAgC,OAAO,yBAAyB,CAAC,eAAe,CAAC,CAAC,CAAC;CAC3G","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 StatusBar\r\n */\r\n\r\nimport { ConfigurableCreateInfo, ConfigurableUiControlType } from \"../configurableui/ConfigurableUiControl\";\r\nimport { WidgetControl } from \"../widgets/WidgetControl\";\r\n\r\n/** Status Bar Field type.\r\n * @public\r\n */\r\nexport type StatusBarFieldId = string | null;\r\n\r\n/** Status Bar Widget Control render prop arguments.\r\n * @public\r\n */\r\nexport interface StatusBarWidgetControlArgs {\r\n /** Describes whether the footer is in widget or footer mode. */\r\n isInFooterMode: boolean;\r\n /** Currently open widget or null if no widget is open.\r\n * @deprecated In upcoming versions, this will be removed. Field will be have the freedom of handling their dialog behavior however they like.\r\n */\r\n openWidget: StatusBarFieldId;\r\n /** Function called when the widget is being opened or closed.\r\n * @deprecated In upcoming versions, this will be removed. Field will be have the freedom of handling their dialog behavior however they like.\r\n */\r\n onOpenWidget: (widget: StatusBarFieldId) => void;\r\n /** Element reference to which the toast will animate out to. */\r\n toastTargetRef: React.Ref<HTMLElement>;\r\n}\r\n\r\n/** Status Bar Widget Control.\r\n * @public\r\n */\r\nexport abstract class StatusBarWidgetControl extends WidgetControl {\r\n constructor(info: ConfigurableCreateInfo, options: any) {\r\n super(info, options);\r\n }\r\n\r\n /** Gets the React node associated with this StatusBar Widget Control */\r\n public abstract getReactNode(args: StatusBarWidgetControlArgs): React.ReactNode;\r\n\r\n /** Gets the type of ConfigurableUiControl, which is 'StatusBarWidget' in this case */\r\n public override getType(): ConfigurableUiControlType { return ConfigurableUiControlType.StatusBarWidget; }\r\n}\r\n"]}
1
+ {"version":3,"file":"StatusBarWidgetControl.js","sourceRoot":"","sources":["../../../../src/appui-react/statusbar/StatusBarWidgetControl.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,EAA0B,yBAAyB,EAAE,MAAM,yCAAyC,CAAC;AAC5G,OAAO,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAC;AA2BzD;;GAEG;AACH,MAAM,OAAgB,sBAAuB,SAAQ,aAAa;IAChE,YAAY,IAA4B,EAAE,OAAY;QACpD,KAAK,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IACvB,CAAC;IAKD,sFAAsF;IACtE,OAAO,KAAgC,OAAO,yBAAyB,CAAC,eAAe,CAAC,CAAC,CAAC;CAC3G","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 StatusBar\r\n */\r\n\r\nimport { ConfigurableCreateInfo, ConfigurableUiControlType } from \"../configurableui/ConfigurableUiControl\";\r\nimport { WidgetControl } from \"../widgets/WidgetControl\";\r\n\r\n/** Status Bar Field type.\r\n * @public\r\n */\r\nexport type StatusBarFieldId = string | null;\r\n\r\n/** Status Bar Widget Control render prop arguments.\r\n * @public\r\n */\r\nexport interface StatusBarWidgetControlArgs {\r\n /** Describes whether the footer is in widget or footer mode.\r\n * @deprecated In upcoming version, widget mode will be removed. Consider this parameter to always be true.\r\n */\r\n isInFooterMode: boolean;\r\n /** Currently open widget or null if no widget is open.\r\n * @deprecated In upcoming versions, this will be removed. Field will be have the freedom of handling their dialog behavior however they like.\r\n */\r\n openWidget: StatusBarFieldId;\r\n /** Function called when the widget is being opened or closed.\r\n * @deprecated In upcoming versions, this will be removed. Field will be have the freedom of handling their dialog behavior however they like.\r\n */\r\n onOpenWidget: (widget: StatusBarFieldId) => void;\r\n /** Element reference to which the toast will animate out to. */\r\n toastTargetRef: React.Ref<HTMLElement>;\r\n}\r\n\r\n/** Status Bar Widget Control.\r\n * @public\r\n */\r\nexport abstract class StatusBarWidgetControl extends WidgetControl {\r\n constructor(info: ConfigurableCreateInfo, options: any) {\r\n super(info, options);\r\n }\r\n\r\n /** Gets the React node associated with this StatusBar Widget Control */\r\n public abstract getReactNode(args: StatusBarWidgetControlArgs): React.ReactNode;\r\n\r\n /** Gets the type of ConfigurableUiControl, which is 'StatusBarWidget' in this case */\r\n public override getType(): ConfigurableUiControlType { return ConfigurableUiControlType.StatusBarWidget; }\r\n}\r\n"]}
@@ -4,7 +4,7 @@
4
4
  import * as React from "react";
5
5
  import { MessageCenterFieldProps } from "../statusfields/MessageCenter";
6
6
  /** HOC that injects values for [[MessageCenterFieldProps]].
7
- * @public
7
+ * @public @deprecated Use `MessageManager.registerAnimateOutToElement` to register this ref in the related component.
8
8
  */
9
9
  export declare const withMessageCenterFieldProps: <P extends MessageCenterFieldProps, C>(Component: React.JSXElementConstructor<P> & C) => (props: JSX.LibraryManagedAttributes<C, Omit<P, "isInFooterMode" | "openWidget" | "onOpenWidget" | "targetRef">>) => JSX.Element;
10
10
  //# sourceMappingURL=withMessageCenterFieldProps.d.ts.map
@@ -8,7 +8,7 @@
8
8
  import * as React from "react";
9
9
  import { StatusBarContext } from "./StatusBar";
10
10
  /** HOC that injects values for [[MessageCenterFieldProps]].
11
- * @public
11
+ * @public @deprecated Use `MessageManager.registerAnimateOutToElement` to register this ref in the related component.
12
12
  */
13
13
  export const withMessageCenterFieldProps = (
14
14
  // eslint-disable-next-line @typescript-eslint/naming-convention
@@ -1 +1 @@
1
- {"version":3,"file":"withMessageCenterFieldProps.js","sourceRoot":"","sources":["../../../../src/appui-react/statusbar/withMessageCenterFieldProps.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;AACzC,gEAAgE;AAChE,SAA6C,EAC7C,EAAE;IAGF,OAAO,SAAS,2BAA2B,CAAC,KAAY;QACtD,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;QAC5D,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,gBAAgB,CAAC;QACrD,OAAO,CACL,oBAAC,SAAS,OACJ,KAAY,KACZ,IAAI,EACR,SAAS,EAAE,cAAc,GACzB,CACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module StatusBar\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { MessageCenterFieldProps } from \"../statusfields/MessageCenter\";\r\nimport { StatusBarContext } from \"./StatusBar\";\r\n\r\n/** HOC that injects values for [[MessageCenterFieldProps]].\r\n * @public\r\n */\r\nexport const withMessageCenterFieldProps = <P extends MessageCenterFieldProps, C>(\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n Component: React.JSXElementConstructor<P> & C,\r\n) => {\r\n type InjectedProps = Pick<MessageCenterFieldProps, \"isInFooterMode\" | \"onOpenWidget\" | \"openWidget\" | \"targetRef\">;\r\n type Props = JSX.LibraryManagedAttributes<C, Omit<P, keyof InjectedProps>>;\r\n return function WithMessageCenterFieldProps(props: Props) {\r\n const statusBarContext = React.useContext(StatusBarContext);\r\n const { toastTargetRef, ...args } = statusBarContext;\r\n return (\r\n <Component\r\n {...props as any}\r\n {...args}\r\n targetRef={toastTargetRef}\r\n />\r\n );\r\n };\r\n};\r\n"]}
1
+ {"version":3,"file":"withMessageCenterFieldProps.js","sourceRoot":"","sources":["../../../../src/appui-react/statusbar/withMessageCenterFieldProps.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAAG;AACzC,gEAAgE;AAChE,SAA6C,EAC7C,EAAE;IAGF,OAAO,SAAS,2BAA2B,CAAC,KAAY;QACtD,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;QAC5D,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,gBAAgB,CAAC;QACrD,OAAO,CACL,oBAAC,SAAS,OACJ,KAAY,KACZ,IAAI,EACR,SAAS,EAAE,cAAc,GACzB,CACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module StatusBar\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { MessageCenterFieldProps } from \"../statusfields/MessageCenter\";\r\nimport { StatusBarContext } from \"./StatusBar\";\r\n\r\n/** HOC that injects values for [[MessageCenterFieldProps]].\r\n * @public @deprecated Use `MessageManager.registerAnimateOutToElement` to register this ref in the related component.\r\n */\r\nexport const withMessageCenterFieldProps = <P extends MessageCenterFieldProps, C>(\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n Component: React.JSXElementConstructor<P> & C,\r\n) => {\r\n type InjectedProps = Pick<MessageCenterFieldProps, \"isInFooterMode\" | \"onOpenWidget\" | \"openWidget\" | \"targetRef\">;\r\n type Props = JSX.LibraryManagedAttributes<C, Omit<P, keyof InjectedProps>>;\r\n return function WithMessageCenterFieldProps(props: Props) {\r\n const statusBarContext = React.useContext(StatusBarContext);\r\n const { toastTargetRef, ...args } = statusBarContext;\r\n return (\r\n <Component\r\n {...props as any}\r\n {...args}\r\n targetRef={toastTargetRef}\r\n />\r\n );\r\n };\r\n};\r\n"]}
@@ -5,6 +5,7 @@ import * as React from "react";
5
5
  import { StatusFieldProps } from "../statusfields/StatusFieldProps";
6
6
  /** HOC that injects values for [[StatusFieldProps]].
7
7
  * @public
8
+ * @deprecated StatusFieldProps props are deprecated, using this is no longer necessary and will be removed.
8
9
  */
9
10
  export declare const withStatusFieldProps: <P extends StatusFieldProps, C>(Component: React.JSXElementConstructor<P> & C) => (props: JSX.LibraryManagedAttributes<C, Omit<P, "isInFooterMode" | "openWidget" | "onOpenWidget">>) => JSX.Element;
10
11
  //# sourceMappingURL=withStatusFieldProps.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"withStatusFieldProps.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusbar/withStatusFieldProps.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGpE;;GAEG;AACH,eAAO,MAAM,oBAAoB,sMAgBhC,CAAC"}
1
+ {"version":3,"file":"withStatusFieldProps.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusbar/withStatusFieldProps.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AAGpE;;;GAGG;AACH,eAAO,MAAM,oBAAoB,sMAgBhC,CAAC"}
@@ -9,6 +9,7 @@ import * as React from "react";
9
9
  import { StatusBarContext } from "./StatusBar";
10
10
  /** HOC that injects values for [[StatusFieldProps]].
11
11
  * @public
12
+ * @deprecated StatusFieldProps props are deprecated, using this is no longer necessary and will be removed.
12
13
  */
13
14
  export const withStatusFieldProps = (
14
15
  // eslint-disable-next-line @typescript-eslint/naming-convention
@@ -1 +1 @@
1
- {"version":3,"file":"withStatusFieldProps.js","sourceRoot":"","sources":["../../../../src/appui-react/statusbar/withStatusFieldProps.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;GAEG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;AAClC,gEAAgE;AAChE,SAA6C,EAC7C,EAAE;IAGF,OAAO,SAAS,oBAAoB,CAAC,KAAY;QAC/C,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;QAC5D,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,gBAAgB,CAAC,CAAC,wDAAwD;QAC9G,OAAO,CACL,oBAAC,SAAS,OACJ,KAAY,KACZ,IAAI,GACR,CACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module StatusBar\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StatusFieldProps } from \"../statusfields/StatusFieldProps\";\r\nimport { StatusBarContext } from \"./StatusBar\";\r\n\r\n/** HOC that injects values for [[StatusFieldProps]].\r\n * @public\r\n */\r\nexport const withStatusFieldProps = <P extends StatusFieldProps, C>(\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n Component: React.JSXElementConstructor<P> & C,\r\n) => {\r\n type InjectedProps = Pick<StatusFieldProps, \"isInFooterMode\" | \"onOpenWidget\" | \"openWidget\">;\r\n type Props = JSX.LibraryManagedAttributes<C, Omit<P, keyof InjectedProps>>;\r\n return function WithStatusFieldProps(props: Props) {\r\n const statusBarContext = React.useContext(StatusBarContext);\r\n const { toastTargetRef, ...args } = statusBarContext; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n return (\r\n <Component\r\n {...props as any}\r\n {...args}\r\n />\r\n );\r\n };\r\n};\r\n"]}
1
+ {"version":3,"file":"withStatusFieldProps.js","sourceRoot":"","sources":["../../../../src/appui-react/statusbar/withStatusFieldProps.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAE/C;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;AAClC,gEAAgE;AAChE,SAA6C,EAC7C,EAAE;IAGF,OAAO,SAAS,oBAAoB,CAAC,KAAY;QAC/C,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;QAC5D,MAAM,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GAAG,gBAAgB,CAAC,CAAC,wDAAwD;QAC9G,OAAO,CACL,oBAAC,SAAS,OACJ,KAAY,KACZ,IAAI,GACR,CACH,CAAC;IACJ,CAAC,CAAC;AACJ,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module StatusBar\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StatusFieldProps } from \"../statusfields/StatusFieldProps\";\r\nimport { StatusBarContext } from \"./StatusBar\";\r\n\r\n/** HOC that injects values for [[StatusFieldProps]].\r\n * @public\r\n * @deprecated StatusFieldProps props are deprecated, using this is no longer necessary and will be removed.\r\n */\r\nexport const withStatusFieldProps = <P extends StatusFieldProps, C>(\r\n // eslint-disable-next-line @typescript-eslint/naming-convention\r\n Component: React.JSXElementConstructor<P> & C,\r\n) => {\r\n type InjectedProps = Pick<StatusFieldProps, \"isInFooterMode\" | \"onOpenWidget\" | \"openWidget\">;\r\n type Props = JSX.LibraryManagedAttributes<C, Omit<P, keyof InjectedProps>>;\r\n return function WithStatusFieldProps(props: Props) {\r\n const statusBarContext = React.useContext(StatusBarContext);\r\n const { toastTargetRef, ...args } = statusBarContext; // eslint-disable-line @typescript-eslint/no-unused-vars\r\n return (\r\n <Component\r\n {...props as any}\r\n {...args}\r\n />\r\n );\r\n };\r\n};\r\n"]}
@@ -11,7 +11,9 @@ export interface ConditionalFieldProps extends StatusFieldProps {
11
11
  /** Function to be called to return a boolean value. If the boolean value is different than the component's state value setState is
12
12
  * called to update the value and trigger a re-render.
13
13
  */
14
- boolFunc: (props: StatusFieldProps) => boolean;
14
+ boolFunc: (props: StatusFieldProps & {
15
+ isInFooterMode: boolean;
16
+ }) => boolean;
15
17
  /** Optional, default/initial boolean value that is saved in the components state. If
16
18
  * not defined it will default to true.
17
19
  */
@@ -27,6 +29,7 @@ interface ConditionalFieldState {
27
29
  /**
28
30
  * A component that expects its children to be a function that will be passed the current component Props.
29
31
  * @public
32
+ * @deprecated In upcoming version, all props passed down to the bool function will be undefined, making this component useless.
30
33
  */
31
34
  export declare class ConditionalField extends React.PureComponent<ConditionalFieldProps, ConditionalFieldState> {
32
35
  /** @internal */
@@ -1 +1 @@
1
- {"version":3,"file":"ConditionalField.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/ConditionalField.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,OAAO,CAAC;IAC/C;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,UAAU,qBAAqB;IAC7B,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;GAGG;AACH,qBAAa,gBAAiB,SAAQ,KAAK,CAAC,aAAa,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;IACrG,gBAAgB;IAChB,SAAyB,KAAK,EAAE,qBAAqB,CAAC;gBAE1C,KAAK,EAAE,qBAAqB;IAOxC,OAAO,CAAC,oBAAoB,CAK1B;IAEc,iBAAiB;IAIjB,kBAAkB,CAAC,SAAS,EAAE,qBAAqB;IAKnE,OAAO,CAAC,cAAc,CAA2D;IAEjE,MAAM,IAAI,KAAK,CAAC,SAAS;CAiB1C"}
1
+ {"version":3,"file":"ConditionalField.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/ConditionalField.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAGH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;;GAGG;AACH,MAAM,WAAW,qBAAsB,SAAQ,gBAAgB;IAC7D;;OAEG;IACH,QAAQ,EAAE,CAAC,KAAK,EAAE,gBAAgB,GAAG;QAAC,cAAc,EAAE,OAAO,CAAA;KAAC,KAAK,OAAO,CAAC;IAC3E;;OAEG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;CACxB;AAED;;;GAGG;AACH,UAAU,qBAAqB;IAC7B,SAAS,EAAE,OAAO,CAAC;CACpB;AAED;;;;GAIG;AACH,qBAAa,gBAAiB,SAAQ,KAAK,CAAC,aAAa,CAAC,qBAAqB,EAAE,qBAAqB,CAAC;IACrG,gBAAgB;IAChB,SAAyB,KAAK,EAAE,qBAAqB,CAAC;gBAE1C,KAAK,EAAE,qBAAqB;IAOxC,OAAO,CAAC,oBAAoB,CAM1B;IAEc,iBAAiB;IAIjB,kBAAkB,CAAC,SAAS,EAAE,qBAAqB;IAKnE,OAAO,CAAC,cAAc,CAA2D;IAEjE,MAAM,IAAI,KAAK,CAAC,SAAS;CAiB1C"}
@@ -10,12 +10,15 @@ import * as React from "react";
10
10
  /**
11
11
  * A component that expects its children to be a function that will be passed the current component Props.
12
12
  * @public
13
+ * @deprecated In upcoming version, all props passed down to the bool function will be undefined, making this component useless.
13
14
  */
14
15
  export class ConditionalField extends React.PureComponent {
15
16
  constructor(props) {
16
17
  super(props);
17
18
  this._resolveBooleanValue = () => {
18
- const boolValue = this.props.boolFunc(this.props);
19
+ var _a;
20
+ // eslint-disable-next-line deprecation/deprecation
21
+ const boolValue = this.props.boolFunc({ ...this.props, isInFooterMode: (_a = this.props.isInFooterMode) !== null && _a !== void 0 ? _a : true });
19
22
  if (this.state.boolValue !== boolValue) {
20
23
  this.setState({ boolValue });
21
24
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ConditionalField.js","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/ConditionalField.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;A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C,SAAS,CAAC;QAEvC,OAAO,CACL,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC;YAC9B,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;YAC/B,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC;gBAC9B,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC;gBAC/B,CAAC,CAAC,IAAI,CACX,CAAC;IACJ,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 StatusBar\r\n */\r\n\r\nimport * as _ from \"lodash\";\r\nimport * as React from \"react\";\r\nimport { StatusFieldProps } from \"./StatusFieldProps\";\r\n\r\n/**\r\n * Properties supported by [[ConditionalField]] component.\r\n * @public\r\n */\r\nexport interface ConditionalFieldProps extends StatusFieldProps {\r\n /** Function to be called to return a boolean value. If the boolean value is different than the component's state value setState is\r\n * called to update the value and trigger a re-render.\r\n */\r\n boolFunc: (props: StatusFieldProps) => boolean;\r\n /** Optional, default/initial boolean value that is saved in the components state. If\r\n * not defined it will default to true.\r\n */\r\n defaultValue?: boolean;\r\n}\r\n\r\n/**\r\n * State for the [[ConditionalField]] component.\r\n * @internal\r\n */\r\ninterface ConditionalFieldState {\r\n boolValue: boolean;\r\n}\r\n\r\n/**\r\n * A component that expects its children to be a function that will be passed the current component Props.\r\n * @public\r\n */\r\nexport class ConditionalField extends React.PureComponent<ConditionalFieldProps, ConditionalFieldState> {\r\n /** @internal */\r\n public override readonly state: ConditionalFieldState;\r\n\r\n constructor(props: ConditionalFieldProps) {\r\n super(props);\r\n this.state = {\r\n boolValue: undefined !== props.defaultValue ? props.defaultValue : true,\r\n };\r\n }\r\n\r\n private _resolveBooleanValue = (): void => {\r\n const boolValue = this.props.boolFunc(this.props);\r\n if (this.state.boolValue !== boolValue) {\r\n this.setState({ boolValue });\r\n }\r\n };\r\n\r\n public override componentDidMount() {\r\n this._resolveBooleanValue();\r\n }\r\n\r\n public override componentDidUpdate(prevProps: ConditionalFieldProps) {\r\n if (!_.isEqual(prevProps, this.props))\r\n this._resolveBooleanValue();\r\n }\r\n\r\n private _hasNoChildren = (children: any) => React.Children.count(children) === 0;\r\n\r\n public override render(): React.ReactNode {\r\n const {\r\n // do not bleed our props\r\n children, eventIds, boolFunc, defaultValue, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n // eslint-disable-next-line comma-dangle\r\n ...otherProps // pass-through props\r\n } = this.props as any;\r\n const boolValue = this.state.boolValue;\r\n\r\n return (\r\n typeof children === \"function\" ?\r\n children(boolValue, otherProps)\r\n : !this._hasNoChildren(children)\r\n ? React.Children.only(children)\r\n : null\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"ConditionalField.js","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/ConditionalField.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,QAAQ,CAAC;AAC5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AA0B/B;;;;GAIG;AACH,MAAM,OAAO,gBAAiB,SAAQ,KAAK,CAAC,aAA2D;IAIrG,YAAY,KAA4B;QACtC,KAAK,CAAC,KAAK,CAAC,CAAC;QAMP,yBAAoB,GAAG,GAAS,EAAE;;YACxC,mDAAmD;YACnD,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAC,GAAG,IAAI,CAAC,KAAK,EAAE,cAAc,EAAE,MAAA,IAAI,CAAC,KAAK,CAAC,cAAc,mCAAI,IAAI,EAAC,CAAC,CAAC;YAC1G,IAAI,IAAI,CAAC,KAAK,CAAC,SAAS,KAAK,SAAS,EAAE;gBACtC,IAAI,CAAC,QAAQ,CAAC,EAAE,SAAS,EAAE,CAAC,CAAC;aAC9B;QACH,CAAC,CAAC;QAWM,mBAAc,GAAG,CAAC,QAAa,EAAE,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;QAtB/E,IAAI,CAAC,KAAK,GAAG;YACX,SAAS,EAAE,SAAS,KAAK,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,KAAK,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI;SACxE,CAAC;IACJ,CAAC;IAUe,iBAAiB;QAC/B,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAC9B,CAAC;IAEe,kBAAkB,CAAC,SAAgC;QACjE,IAAI,CAAC,CAAC,CAAC,OAAO,CAAC,SAAS,EAAE,IAAI,CAAC,KAAK,CAAC;YACnC,IAAI,CAAC,oBAAoB,EAAE,CAAC;IAChC,CAAC;IAIe,MAAM;QACpB,MAAM;QACJ,yBAAyB;QACzB,QAAQ,EAAE,QAAQ,EAAE,QAAQ,EAAE,YAAY,EAAE,wDAAwD;QACpG,wCAAwC;QACxC,GAAG,UAAU,CAAC,qBAAqB;UACpC,GAAG,IAAI,CAAC,KAAY,CAAC;QACtB,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC;QAEvC,OAAO,CACL,OAAO,QAAQ,KAAK,UAAU,CAAC,CAAC;YAC9B,QAAQ,CAAC,SAAS,EAAE,UAAU,CAAC;YAC/B,CAAC,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,QAAQ,CAAC;gBAC9B,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC;gBAC/B,CAAC,CAAC,IAAI,CACX,CAAC;IACJ,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 StatusBar\r\n */\r\n\r\nimport * as _ from \"lodash\";\r\nimport * as React from \"react\";\r\nimport { StatusFieldProps } from \"./StatusFieldProps\";\r\n\r\n/**\r\n * Properties supported by [[ConditionalField]] component.\r\n * @public\r\n */\r\nexport interface ConditionalFieldProps extends StatusFieldProps {\r\n /** Function to be called to return a boolean value. If the boolean value is different than the component's state value setState is\r\n * called to update the value and trigger a re-render.\r\n */\r\n boolFunc: (props: StatusFieldProps & {isInFooterMode: boolean}) => boolean;\r\n /** Optional, default/initial boolean value that is saved in the components state. If\r\n * not defined it will default to true.\r\n */\r\n defaultValue?: boolean;\r\n}\r\n\r\n/**\r\n * State for the [[ConditionalField]] component.\r\n * @internal\r\n */\r\ninterface ConditionalFieldState {\r\n boolValue: boolean;\r\n}\r\n\r\n/**\r\n * A component that expects its children to be a function that will be passed the current component Props.\r\n * @public\r\n * @deprecated In upcoming version, all props passed down to the bool function will be undefined, making this component useless.\r\n */\r\nexport class ConditionalField extends React.PureComponent<ConditionalFieldProps, ConditionalFieldState> {\r\n /** @internal */\r\n public override readonly state: ConditionalFieldState;\r\n\r\n constructor(props: ConditionalFieldProps) {\r\n super(props);\r\n this.state = {\r\n boolValue: undefined !== props.defaultValue ? props.defaultValue : true,\r\n };\r\n }\r\n\r\n private _resolveBooleanValue = (): void => {\r\n // eslint-disable-next-line deprecation/deprecation\r\n const boolValue = this.props.boolFunc({...this.props, isInFooterMode: this.props.isInFooterMode ?? true});\r\n if (this.state.boolValue !== boolValue) {\r\n this.setState({ boolValue });\r\n }\r\n };\r\n\r\n public override componentDidMount() {\r\n this._resolveBooleanValue();\r\n }\r\n\r\n public override componentDidUpdate(prevProps: ConditionalFieldProps) {\r\n if (!_.isEqual(prevProps, this.props))\r\n this._resolveBooleanValue();\r\n }\r\n\r\n private _hasNoChildren = (children: any) => React.Children.count(children) === 0;\r\n\r\n public override render(): React.ReactNode {\r\n const {\r\n // do not bleed our props\r\n children, eventIds, boolFunc, defaultValue, // eslint-disable-line @typescript-eslint/no-unused-vars\r\n // eslint-disable-next-line comma-dangle\r\n ...otherProps // pass-through props\r\n } = this.props as any;\r\n const boolValue = this.state.boolValue;\r\n\r\n return (\r\n typeof children === \"function\" ?\r\n children(boolValue, otherProps)\r\n : !this._hasNoChildren(children)\r\n ? React.Children.only(children)\r\n : null\r\n );\r\n }\r\n}\r\n"]}
@@ -13,8 +13,7 @@ export interface FooterModeFieldProps extends StatusFieldProps {
13
13
  /**
14
14
  * A component that renders its children if the StatusBar is in Footer mode.
15
15
  * @public
16
+ * @deprecated In upcoming version, widget mode will be removed, in footer mode will always be true, making this component useless.
16
17
  */
17
- export declare class FooterModeField extends React.PureComponent<FooterModeFieldProps> {
18
- render(): React.ReactNode;
19
- }
18
+ export declare function FooterModeField(props: FooterModeFieldProps): JSX.Element;
20
19
  //# sourceMappingURL=FooterModeField.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"FooterModeField.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/FooterModeField.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAKtD;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,qBAAqB;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;GAGG;AACH,qBAAa,eAAgB,SAAQ,KAAK,CAAC,aAAa,CAAC,oBAAoB,CAAC;IAE5D,MAAM,IAAI,KAAK,CAAC,SAAS;CAS1C"}
1
+ {"version":3,"file":"FooterModeField.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/FooterModeField.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAG/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,oBAAqB,SAAQ,gBAAgB;IAC5D,qBAAqB;IACrB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CAC5B;AAED;;;;GAIG;AACH,wBAAgB,eAAe,CAAC,KAAK,EAAE,oBAAoB,eAW1D"}
@@ -6,18 +6,19 @@
6
6
  * @module StatusBar
7
7
  */
8
8
  import * as React from "react";
9
- import { withStatusFieldProps } from "../statusbar/withStatusFieldProps";
9
+ import { StatusBarContext } from "../statusbar/StatusBar";
10
10
  import { ConditionalField } from "./ConditionalField";
11
- // eslint-disable-next-line @typescript-eslint/naming-convention
12
- const ConditionalFieldWithProps = withStatusFieldProps(ConditionalField);
13
11
  /**
14
12
  * A component that renders its children if the StatusBar is in Footer mode.
15
13
  * @public
14
+ * @deprecated In upcoming version, widget mode will be removed, in footer mode will always be true, making this component useless.
16
15
  */
17
- export class FooterModeField extends React.PureComponent {
18
- render() {
19
- const { children, ...otherProps } = this.props;
20
- return (React.createElement(ConditionalFieldWithProps, { ...otherProps, boolFunc: (props) => props.isInFooterMode }, (isInFooterMode) => isInFooterMode && children));
21
- }
16
+ export function FooterModeField(props) {
17
+ const { children, ...otherProps } = props;
18
+ const statusBarContext = React.useContext(StatusBarContext);
19
+ const conditionProps = { ...statusBarContext, ...otherProps };
20
+ return (
21
+ // eslint-disable-next-line deprecation/deprecation
22
+ React.createElement(ConditionalField, { ...conditionProps, boolFunc: (innerProps) => innerProps.isInFooterMode }, (isInFooterMode) => isInFooterMode && children));
22
23
  }
23
24
  //# sourceMappingURL=FooterModeField.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"FooterModeField.js","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/FooterModeField.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,oBAAoB,EAAE,MAAM,mCAAmC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,gEAAgE;AAChE,MAAM,yBAAyB,GAAG,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;AAUzE;;;GAGG;AACH,MAAM,OAAO,eAAgB,SAAQ,KAAK,CAAC,aAAmC;IAE5D,MAAM;QACpB,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,IAAI,CAAC,KAAY,CAAC;QAEtD,OAAO,CACL,oBAAC,yBAAyB,OAAK,UAAU,EAAE,QAAQ,EAAE,CAAC,KAAuB,EAAW,EAAE,CAAC,KAAK,CAAC,cAAc,IAC5G,CAAC,cAAuB,EAAE,EAAE,CAAC,cAAc,IAAI,QAAQ,CAC9B,CAC7B,CAAC;IACJ,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 StatusBar\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { withStatusFieldProps } from \"../statusbar/withStatusFieldProps\";\r\nimport { ConditionalField } from \"./ConditionalField\";\r\nimport { StatusFieldProps } from \"./StatusFieldProps\";\r\n\r\n// eslint-disable-next-line @typescript-eslint/naming-convention\r\nconst ConditionalFieldWithProps = withStatusFieldProps(ConditionalField);\r\n\r\n/** Properties for a FooterModeField component\r\n * @public\r\n */\r\nexport interface FooterModeFieldProps extends StatusFieldProps {\r\n /** Field content. */\r\n children?: React.ReactNode;\r\n}\r\n\r\n/**\r\n * A component that renders its children if the StatusBar is in Footer mode.\r\n * @public\r\n */\r\nexport class FooterModeField extends React.PureComponent<FooterModeFieldProps> {\r\n\r\n public override render(): React.ReactNode {\r\n const { children, ...otherProps } = this.props as any;\r\n\r\n return (\r\n <ConditionalFieldWithProps {...otherProps} boolFunc={(props: StatusFieldProps): boolean => props.isInFooterMode} >\r\n {(isInFooterMode: boolean) => isInFooterMode && children}\r\n </ConditionalFieldWithProps>\r\n );\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"FooterModeField.js","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/FooterModeField.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAWtD;;;;GAIG;AACH,MAAM,UAAU,eAAe,CAAC,KAA2B;IACzD,MAAM,EAAE,QAAQ,EAAE,GAAG,UAAU,EAAE,GAAG,KAAY,CAAC;IACjD,MAAM,gBAAgB,GAAG,KAAK,CAAC,UAAU,CAAC,gBAAgB,CAAC,CAAC;IAC5D,MAAM,cAAc,GAAG,EAAC,GAAG,gBAAgB,EAAE,GAAG,UAAU,EAAC,CAAC;IAE5D,OAAO;IACP,mDAAmD;IACjD,oBAAC,gBAAgB,OAAK,cAAc,EAAE,QAAQ,EAAE,CAAC,UAAU,EAAW,EAAE,CAAC,UAAU,CAAC,cAAc,IAC/F,CAAC,cAAuB,EAAE,EAAE,CAAC,cAAc,IAAI,QAAQ,CACvC,CACpB,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module StatusBar\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { StatusBarContext } from \"../statusbar/StatusBar\";\r\nimport { ConditionalField } from \"./ConditionalField\";\r\nimport { StatusFieldProps } from \"./StatusFieldProps\";\r\n\r\n/** Properties for a FooterModeField component\r\n * @public\r\n */\r\nexport interface FooterModeFieldProps extends StatusFieldProps {\r\n /** Field content. */\r\n children?: React.ReactNode;\r\n}\r\n\r\n/**\r\n * A component that renders its children if the StatusBar is in Footer mode.\r\n * @public\r\n * @deprecated In upcoming version, widget mode will be removed, in footer mode will always be true, making this component useless.\r\n */\r\nexport function FooterModeField(props: FooterModeFieldProps) {\r\n const { children, ...otherProps } = props as any;\r\n const statusBarContext = React.useContext(StatusBarContext);\r\n const conditionProps = {...statusBarContext, ...otherProps};\r\n\r\n return (\r\n // eslint-disable-next-line deprecation/deprecation\r\n <ConditionalField {...conditionProps} boolFunc={(innerProps): boolean => innerProps.isInFooterMode} >\r\n {(isInFooterMode: boolean) => isInFooterMode && children}\r\n </ConditionalField>\r\n );\r\n}\r\n"]}
@@ -26,7 +26,9 @@ interface IndicatorProps extends CommonProps {
26
26
  onClick?: () => void;
27
27
  /** If dialog prop is set, used to determine initial state. */
28
28
  opened?: boolean;
29
- /** Describes whether the footer is in footer or widget mode. */
29
+ /** Describes whether the footer is in footer or widget mode.
30
+ * @deprecated In upcoming version, widget mode will be removed. Consider this parameter to always be true.
31
+ */
30
32
  isInFooterMode?: boolean;
31
33
  /** Tooltip text if not specified label is used */
32
34
  toolTip?: string;
@@ -1 +1 @@
1
- {"version":3,"file":"Indicator.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/Indicator.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,kBAAkB,CAAC;AAE1B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAA0B,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAE,WAAW,EAAQ,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAe,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAEhF,6CAA6C;AAC7C,UAAU,cAAe,SAAQ,WAAW;IAC1C,mDAAmD;IACnD,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,4DAA4D;IAC5D,MAAM,CAAC,EAAE,KAAK,CAAC,UAAU,CAAC;IAC1B,0DAA0D;IAC1D,QAAQ,CAAC,EA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,uBAAuB;IACvB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,6BAA6B;IAC7B,SAAS,CAAC,EAAE,kBAAkB,CAAC;IAC/B,iDAAiD;IACjD,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,8DAA8D;IAC9D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;MAEE;IACF,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,kDAAkD;IAClD,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,kHAAkH;IAClH,WAAW,CAAC,EAAE,sBAAsB,CAAC;CACtC;AAED;;GAEG;AACH,wBAAgB,SAAS,CAAC,KAAK,EAAE,cAAc,eA2C9C"}
@@ -15,6 +15,7 @@ import { FooterPopup } from "@itwin/appui-layout-react";
15
15
  * @beta
16
16
  */
17
17
  export function Indicator(props) {
18
+ // eslint-disable-next-line deprecation/deprecation
18
19
  const { className, contentType, dialog, iconName, iconSpec, isInFooterMode, isLabelVisible, label, labelSide, onClick, opened, style, toolTip } = props;
19
20
  const hasClickAction = React.useMemo(() => !!onClick || !!dialog, [dialog, onClick]);
20
21
  const [isOpen, setIsOpen] = React.useState(!!opened);
@@ -1 +1 @@
1
- {"version":3,"file":"Indicator.js","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/Indicator.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAe,IAAI,EAAY,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,WAAW,EAA0B,MAAM,2BAA2B,CAAC;AA8BhF;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC7C,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,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UAAU,CAC3B,wBAAwB,EAAE,uBAAuB,EACjD,QAAQ,IAAI,gBAAgB,EAC5B,cAAc,IAAI,oBAAoB,EACtC,SAAS,KAAK,kBAAkB,CAAC,KAAK,IAAI,4BAA4B,EACtE,SAAS,CAAC,CAAC;IACb,OAAO,CAEL;QAEE,6BAAK,GAAG,EAAE,MAAM,EACd,IAAI,EAAC,QAAQ,EAAC,QAAQ,EAAE,CAAC,CAAC,EAC1B,SAAS,EAAE,UAAU,EACrB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,sBAAsB;YAE9B,cAAc,IAAI,KAAK,IAAI,8BAAM,SAAS,EAAC,UAAU,IAAE,sBAAsB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAQ;YACrG,IAAI,IAAI,6BAAK,SAAS,EAAC,qBAAqB;gBAAC,oBAAC,IAAI,IAAC,QAAQ,EAAE,IAAI,GAAI,CAAM,CACxE;QACL,MAAM,IAAI,oBAAC,WAAW,IAAC,WAAW,EAAE,WAAW,EAC9C,MAAM,EAAE,MAAM,CAAC,OAAO,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAC/B,MAAM,EAAE,MAAM,IACb,MAAM,CACK,CACb,CACJ,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module StatusBar\r\n */\r\n\r\nimport \"./Indicator.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { ConditionalStringValue, StatusBarLabelSide } from \"@itwin/appui-abstract\";\r\nimport { CommonProps, Icon, IconSpec } from \"@itwin/core-react\";\r\nimport { FooterPopup, FooterPopupContentType } from \"@itwin/appui-layout-react\";\r\n\r\n/** Properties of [[Indicator]] component. */\r\ninterface IndicatorProps extends CommonProps {\r\n /** Label of balloon icon. @deprecated use label */\r\n balloonLabel?: string;\r\n /** Dialog to display in popup when indicator is clicked. */\r\n dialog?: React.ReactChild;\r\n /** Icon to use in the footer. @deprecated use iconSpec */\r\n iconName?: string;\r\n /** specification for Icon, overrides iconName specification */\r\n iconSpec?: IconSpec;\r\n /** Describes if the indicator label is visible. */\r\n isLabelVisible?: boolean;\r\n /** Indicator label. */\r\n label?: string;\r\n /** Side to display label. */\r\n labelSide?: StatusBarLabelSide;\r\n /** Function called when indicator is clicked. */\r\n onClick?: () => void;\r\n /** If dialog prop is set, used to determine initial state. */\r\n opened?: boolean;\r\n /** Describes whether the footer is in footer or widget mode. */\r\n isInFooterMode?: boolean;\r\n /** Tooltip text if not specified label is used */\r\n toolTip?: string;\r\n /** ContentType is used to determine color of popup arrow. If not set defaults to FooterPopupContentType.Dialog */\r\n contentType?: FooterPopupContentType;\r\n}\r\n\r\n/** General-purpose [[Footer]] indicator. Shows an icon and supports an optional popup dialog.\r\n * @beta\r\n */\r\nexport function Indicator(props: IndicatorProps) {\r\n const { className, contentType, dialog, iconName, iconSpec, isInFooterMode, isLabelVisible, label, labelSide, onClick, opened, style, toolTip } = props;\r\n const hasClickAction = React.useMemo(() => !!onClick || !!dialog, [dialog, onClick]);\r\n const [isOpen, setIsOpen] = React.useState(!!opened);\r\n const handleOnIndicatorClick = React.useCallback(() => {\r\n if (dialog) {\r\n setIsOpen(!isOpen);\r\n }\r\n onClick && onClick();\r\n }, [dialog, isOpen, onClick]);\r\n const inFooter = React.useMemo(() => false === isInFooterMode ? false : true, [isInFooterMode]);\r\n const target = React.useRef<HTMLDivElement>(null);\r\n const icon = React.useMemo(() => iconSpec ?? iconName, [iconSpec, iconName]);\r\n const title = React.useMemo(() => toolTip ?? label, [toolTip, label]);\r\n const classNames = classnames(\r\n \"uifw-footer-label-left\", \"uifw-footer-indicator\",\r\n inFooter && \"nz-footer-mode\",\r\n hasClickAction && \"uifw-footer-action\",\r\n labelSide === StatusBarLabelSide.Right && \"uifw-footer-label-reversed\",\r\n className);\r\n return (\r\n\r\n <>\r\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\r\n <div ref={target}\r\n role=\"button\" tabIndex={-1}\r\n className={classNames}\r\n title={title}\r\n style={style}\r\n onClick={handleOnIndicatorClick}\r\n >\r\n {isLabelVisible && label && <span className=\"nz-label\">{ConditionalStringValue.getValue(label)}</span>}\r\n {icon && <div className=\"uifw-indicator-icon\"><Icon iconSpec={icon} /></div>}\r\n </div>\r\n {dialog && <FooterPopup contentType={contentType}\r\n target={target.current}\r\n onClose={() => setIsOpen(false)}\r\n isOpen={isOpen}>\r\n {dialog}\r\n </FooterPopup>}\r\n </>\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"Indicator.js","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/Indicator.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,kBAAkB,CAAC;AAC1B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AACnF,OAAO,EAAe,IAAI,EAAY,MAAM,mBAAmB,CAAC;AAChE,OAAO,EAAE,WAAW,EAA0B,MAAM,2BAA2B,CAAC;AAgChF;;GAEG;AACH,MAAM,UAAU,SAAS,CAAC,KAAqB;IAC7C,mDAAmD;IACnD,MAAM,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,QAAQ,EAAE,cAAc,EAAE,cAAc,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IACxJ,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,CAAC,CAAC,OAAO,IAAI,CAAC,CAAC,MAAM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AAE,CAAC,CAAC,EAC1B,SAAS,EAAE,UAAU,EACrB,KAAK,EAAE,KAAK,EACZ,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,sBAAsB;YAE9B,cAAc,IAAI,KAAK,IAAI,8BAAM,SAAS,EAAC,UAAU,IAAE,sBAAsB,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAQ;YACrG,IAAI,IAAI,6BAAK,SAAS,EAAC,qBAAqB;gBAAC,oBAAC,IAAI,IAAC,QAAQ,EAAE,IAAI,GAAI,CAAM,CACxE;QACL,MAAM,IAAI,oBAAC,WAAW,IAAC,WAAW,EAAE,WAAW,EAC9C,MAAM,EAAE,MAAM,CAAC,OAAO,EACtB,OAAO,EAAE,GAAG,EAAE,CAAC,SAAS,CAAC,KAAK,CAAC,EAC/B,MAAM,EAAE,MAAM,IACb,MAAM,CACK,CACb,CACJ,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module StatusBar\r\n */\r\n\r\nimport \"./Indicator.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { ConditionalStringValue, StatusBarLabelSide } from \"@itwin/appui-abstract\";\r\nimport { CommonProps, Icon, IconSpec } from \"@itwin/core-react\";\r\nimport { FooterPopup, FooterPopupContentType } from \"@itwin/appui-layout-react\";\r\n\r\n/** Properties of [[Indicator]] component. */\r\ninterface IndicatorProps extends CommonProps {\r\n /** Label of balloon icon. @deprecated use label */\r\n balloonLabel?: string;\r\n /** Dialog to display in popup when indicator is clicked. */\r\n dialog?: React.ReactChild;\r\n /** Icon to use in the footer. @deprecated use iconSpec */\r\n iconName?: string;\r\n /** specification for Icon, overrides iconName specification */\r\n iconSpec?: IconSpec;\r\n /** Describes if the indicator label is visible. */\r\n isLabelVisible?: boolean;\r\n /** Indicator label. */\r\n label?: string;\r\n /** Side to display label. */\r\n labelSide?: StatusBarLabelSide;\r\n /** Function called when indicator is clicked. */\r\n onClick?: () => void;\r\n /** If dialog prop is set, used to determine initial state. */\r\n opened?: boolean;\r\n /** Describes whether the footer is in footer or widget mode.\r\n * @deprecated In upcoming version, widget mode will be removed. Consider this parameter to always be true.\r\n */\r\n isInFooterMode?: boolean;\r\n /** Tooltip text if not specified label is used */\r\n toolTip?: string;\r\n /** ContentType is used to determine color of popup arrow. If not set defaults to FooterPopupContentType.Dialog */\r\n contentType?: FooterPopupContentType;\r\n}\r\n\r\n/** General-purpose [[Footer]] indicator. Shows an icon and supports an optional popup dialog.\r\n * @beta\r\n */\r\nexport function Indicator(props: IndicatorProps) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n const { className, contentType, dialog, iconName, iconSpec, isInFooterMode, isLabelVisible, label, labelSide, onClick, opened, style, toolTip } = props;\r\n const hasClickAction = React.useMemo(() => !!onClick || !!dialog, [dialog, onClick]);\r\n const [isOpen, setIsOpen] = React.useState(!!opened);\r\n const handleOnIndicatorClick = React.useCallback(() => {\r\n if (dialog) {\r\n setIsOpen(!isOpen);\r\n }\r\n onClick && onClick();\r\n }, [dialog, isOpen, onClick]);\r\n const inFooter = React.useMemo(() => false === isInFooterMode ? false : true, [isInFooterMode]);\r\n const target = React.useRef<HTMLDivElement>(null);\r\n const icon = React.useMemo(() => iconSpec ?? iconName, [iconSpec, iconName]);\r\n const title = React.useMemo(() => toolTip ?? label, [toolTip, label]);\r\n const classNames = classnames(\r\n \"uifw-footer-label-left\", \"uifw-footer-indicator\",\r\n inFooter && \"nz-footer-mode\",\r\n hasClickAction && \"uifw-footer-action\",\r\n labelSide === StatusBarLabelSide.Right && \"uifw-footer-label-reversed\",\r\n className);\r\n return (\r\n\r\n <>\r\n {/* eslint-disable-next-line jsx-a11y/click-events-have-key-events */}\r\n <div ref={target}\r\n role=\"button\" tabIndex={-1}\r\n className={classNames}\r\n title={title}\r\n style={style}\r\n onClick={handleOnIndicatorClick}\r\n >\r\n {isLabelVisible && label && <span className=\"nz-label\">{ConditionalStringValue.getValue(label)}</span>}\r\n {icon && <div className=\"uifw-indicator-icon\"><Icon iconSpec={icon} /></div>}\r\n </div>\r\n {dialog && <FooterPopup contentType={contentType}\r\n target={target.current}\r\n onClose={() => setIsOpen(false)}\r\n isOpen={isOpen}>\r\n {dialog}\r\n </FooterPopup>}\r\n </>\r\n );\r\n}\r\n"]}
@@ -23,7 +23,9 @@ interface MessageCenterState {
23
23
  * @public
24
24
  */
25
25
  export interface MessageCenterFieldProps extends StatusFieldProps {
26
- /** Message center dialog target. */
26
+ /** Message center dialog target.
27
+ * @deprecated Use `MessageManager.registerAnimateOutToElement` to register this ref in the related component.
28
+ */
27
29
  targetRef?: React.Ref<HTMLElement>;
28
30
  }
29
31
  /** Message Center Field React component.
@@ -1 +1 @@
1
- {"version":3,"file":"MessageCenter.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/MessageCenter.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAQ/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,aAAK,sBAAsB;IACzB,WAAW,IAAA;IACX,QAAQ,IAAA;CACT;AAED;;GAEG;AACH,UAAU,kBAAkB;IAC1B,SAAS,EAAE,sBAAsB,CAAC;IAClC,MAAM,EAAE,cAAc,GAAG,IAAI,CAAC;IAC9B,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AAED;;GAEG;AACH,MAAM,WAAW,uBAAwB,SAAQ,gBAAgB;IAC/D,oCAAoC;IACpC,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC;CACpC;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,KAAK,CAAC,SAAS,CAAC,uBAAuB,EA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C;AAED;;GAEG;AACH,qBAAa,kBAAmB,SAAQ,KAAK,CAAC,SAAS,CAAC,uBAAuB,EAAE,kBAAkB,CAAC;IAClG,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,UAAU,CAAqC;IACvD,OAAO,CAAC,MAAM,CAAmD;IACjE,OAAO,CAAC,6BAA6B,CAAC,CAAa;IACnD,OAAO,CAAC,gCAAgC,CAAC,CAAa;gBAE1C,CAAC,EAAE,uBAAuB;IAetC,gBAAgB;IACA,iBAAiB;IAMjC,gBAAgB;IACA,oBAAoB;IAapC,OAAO,CAAC,2BAA2B,CAIjC;IAEF,OAAO,CAAC,6BAA6B,CAEnC;IAEc,MAAM,IAAI,KAAK,CAAC,SAAS;IA0DzC,OAAO,CAAC,gBAAgB,CAQtB;IAEF,OAAO,CAAC,YAAY,CAElB;IAEF,OAAO,CAAC,mBAAmB,CAOzB;IAEF,OAAO,CAAC,4BAA4B,CAOlC;IAEF,OAAO,CAAC,gBAAgB,CAEtB;IAEF,OAAO,CAAC,WAAW;IA+BnB,OAAO,CAAC,eAAe;IASvB,OAAO,CAAC,aAAa;CAKtB"}
@@ -37,10 +37,12 @@ export class MessageCenterField extends React.Component {
37
37
  this.setOpenWidget(this._className);
38
38
  };
39
39
  this._handleTargetRef = (target) => {
40
- if (typeof this.props.targetRef === "function")
41
- this.props.targetRef(target);
42
- else if (this.props.targetRef)
43
- this.props.targetRef.current = target;
40
+ // eslint-disable-next-line deprecation/deprecation
41
+ const ref = this.props.targetRef;
42
+ if (typeof ref === "function")
43
+ ref(target);
44
+ else if (ref)
45
+ ref.current = target;
44
46
  this.setState({ target });
45
47
  };
46
48
  this._handleClose = () => {
@@ -95,17 +97,21 @@ export class MessageCenterField extends React.Component {
95
97
  }
96
98
  }
97
99
  render() {
98
- var _a;
100
+ var _a, _b, _c;
99
101
  const tooltip = `${this.state.messageCount} ${this._title}`;
100
102
  const divStyle = { ...this.props.style, height: "100%" };
101
103
  const footerMessages = (React.createElement(React.Fragment, null,
102
104
  React.createElement("div", { className: this.props.className, style: divStyle, title: tooltip, ref: this._handleTargetRef },
103
- React.createElement(MessageCenter, { indicatorRef: this._indicator, isInFooterMode: this.props.isInFooterMode, label: this.props.isInFooterMode ? this._title : undefined, onClick: this._handleMessageIndicatorClick }, this.state.messageCount.toString())),
105
+ React.createElement(MessageCenter, { indicatorRef: this._indicator,
106
+ // eslint-disable-next-line deprecation/deprecation
107
+ isInFooterMode: (_a = this.props.isInFooterMode) !== null && _a !== void 0 ? _a : true,
108
+ // eslint-disable-next-line deprecation/deprecation
109
+ label: ((_b = this.props.isInFooterMode) !== null && _b !== void 0 ? _b : true) ? this._title : undefined, onClick: this._handleMessageIndicatorClick }, this.state.messageCount.toString())),
104
110
  React.createElement(FooterPopup
105
111
  // eslint-disable-next-line deprecation/deprecation
106
112
  , {
107
113
  // eslint-disable-next-line deprecation/deprecation
108
- isOpen: ((_a = this.props.openWidget) !== null && _a !== void 0 ? _a : this.state.openWidget) === this._className, onClose: this._handleClose, onOutsideClick: this._handleOutsideClick, target: this.state.target },
114
+ isOpen: ((_c = this.props.openWidget) !== null && _c !== void 0 ? _c : this.state.openWidget) === this._className, onClose: this._handleClose, onOutsideClick: this._handleOutsideClick, target: this.state.target },
109
115
  React.createElement(MessageCenterDialog, { prompt: UiFramework.translate("messageCenter.prompt"), tabs: React.createElement(React.Fragment, null,
110
116
  React.createElement(MessageCenterTab, { isActive: this.state.activeTab === MessageCenterActiveTab.AllMessages, onClick: () => this._changeActiveTab(MessageCenterActiveTab.AllMessages) }, UiFramework.translate("messageCenter.all")),
111
117
  React.createElement(MessageCenterTab, { isActive: this.state.activeTab === MessageCenterActiveTab.Problems, onClick: () => this._changeActiveTab(MessageCenterActiveTab.Problems) }, UiFramework.translate("messageCenter.errors"))), title: this._title }, this.getMessages()))));
@@ -1 +1 @@
1
- {"version":3,"file":"MessageCenter.js","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/MessageCenter.tsx"],"names":[],"mappings":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,CAAC,UAA4B;;QAChD,mDAAmD;QACnD,MAAA,MAAA,IAAI,CAAC,KAAK,EAAC,YAAY,mDAAG,UAAU,CAAC,CAAC;QACtC,IAAI,CAAC,QAAQ,CAAC,EAAC,UAAU,EAAC,CAAC,CAAC;IAC9B,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 Notification\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { OutputMessagePriority } from \"@itwin/core-frontend\";\r\nimport { FooterPopup, MessageCenter, MessageCenterDialog, MessageCenterMessage, MessageCenterTab } from \"@itwin/appui-layout-react\";\r\nimport { MessageManager } from \"../messages/MessageManager\";\r\nimport { MessageSpan } from \"../messages/MessageSpan\";\r\nimport { NotifyMessageDetailsType } from \"../messages/ReactNotifyMessageDetails\";\r\nimport { StatusBarFieldId } from \"../statusbar/StatusBarWidgetControl\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { StatusFieldProps } from \"./StatusFieldProps\";\r\n\r\n/** Enum for the [[MessageCenterField]] active tab\r\n * @internal\r\n */\r\nenum MessageCenterActiveTab {\r\n AllMessages,\r\n Problems,\r\n}\r\n\r\n/** State for the [[MessageCenterField]] React component\r\n * @internal\r\n */\r\ninterface MessageCenterState {\r\n activeTab: MessageCenterActiveTab;\r\n target: HTMLDivElement | null;\r\n messageCount: number;\r\n openWidget: string | null;\r\n}\r\n\r\n/** Properties for withMessageCenterFieldProps HOC.\r\n * @public\r\n */\r\nexport interface MessageCenterFieldProps extends StatusFieldProps {\r\n /** Message center dialog target. */\r\n targetRef?: React.Ref<HTMLElement>;\r\n}\r\n\r\n/** Message Center Field React component.\r\n * @public\r\n */\r\nexport class MessageCenterField extends React.Component<MessageCenterFieldProps, MessageCenterState> {\r\n private _className: string;\r\n private _indicator = React.createRef<HTMLDivElement>();\r\n private _title = UiFramework.translate(\"messageCenter.messages\");\r\n private _unloadMessagesUpdatedHandler?: () => void;\r\n private _removeOpenMessagesCenterHandler?: () => void;\r\n\r\n constructor(p: MessageCenterFieldProps) {\r\n super(p);\r\n\r\n const instance = this.constructor;\r\n this._className = instance.name;\r\n\r\n this.state = {\r\n activeTab: MessageCenterActiveTab.AllMessages,\r\n target: null,\r\n messageCount: MessageManager.messages.length,\r\n // eslint-disable-next-line deprecation/deprecation\r\n openWidget: p.openWidget ?? null,\r\n };\r\n }\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n this._unloadMessagesUpdatedHandler = MessageManager.onMessagesUpdatedEvent.addListener(this._handleMessagesUpdatedEvent, this);\r\n this._removeOpenMessagesCenterHandler = MessageManager.onOpenMessageCenterEvent.addListener(this._handleOpenMessageCenterEvent, this);\r\n MessageManager.registerAnimateOutToElement(this._indicator.current);\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n // istanbul ignore else\r\n if (this._unloadMessagesUpdatedHandler) {\r\n this._unloadMessagesUpdatedHandler();\r\n this._unloadMessagesUpdatedHandler = undefined;\r\n }\r\n // istanbul ignore else\r\n if (this._removeOpenMessagesCenterHandler) {\r\n this._removeOpenMessagesCenterHandler();\r\n this._removeOpenMessagesCenterHandler = undefined;\r\n }\r\n }\r\n\r\n private _handleMessagesUpdatedEvent = () => {\r\n // istanbul ignore else\r\n if (this._unloadMessagesUpdatedHandler)\r\n this.setState({ messageCount: MessageManager.messages.length });\r\n };\r\n\r\n private _handleOpenMessageCenterEvent = () => {\r\n this.setOpenWidget(this._className);\r\n };\r\n\r\n public override render(): React.ReactNode {\r\n const tooltip = `${this.state.messageCount} ${this._title}`;\r\n const divStyle = { ...this.props.style, height: \"100%\" };\r\n const footerMessages = (\r\n <>\r\n <div\r\n className={this.props.className}\r\n style={divStyle}\r\n title={tooltip}\r\n ref={this._handleTargetRef}\r\n >\r\n <MessageCenter\r\n indicatorRef={this._indicator}\r\n isInFooterMode={this.props.isInFooterMode}\r\n label={this.props.isInFooterMode ? this._title : undefined}\r\n onClick={this._handleMessageIndicatorClick}\r\n >\r\n {this.state.messageCount.toString()}\r\n </MessageCenter>\r\n </div>\r\n <FooterPopup\r\n // eslint-disable-next-line deprecation/deprecation\r\n isOpen={(this.props.openWidget ?? this.state.openWidget) === this._className}\r\n onClose={this._handleClose}\r\n onOutsideClick={this._handleOutsideClick}\r\n target={this.state.target}\r\n >\r\n <MessageCenterDialog\r\n prompt={UiFramework.translate(\"messageCenter.prompt\")}\r\n tabs={\r\n <>\r\n <MessageCenterTab\r\n isActive={this.state.activeTab === MessageCenterActiveTab.AllMessages}\r\n onClick={() => this._changeActiveTab(MessageCenterActiveTab.AllMessages)}\r\n >\r\n {UiFramework.translate(\"messageCenter.all\")}\r\n </MessageCenterTab>\r\n <MessageCenterTab\r\n isActive={this.state.activeTab === MessageCenterActiveTab.Problems}\r\n onClick={() => this._changeActiveTab(MessageCenterActiveTab.Problems)}\r\n >\r\n {UiFramework.translate(\"messageCenter.errors\")}\r\n </MessageCenterTab>\r\n </>\r\n }\r\n title={this._title}\r\n >\r\n {this.getMessages()}\r\n </MessageCenterDialog>\r\n </FooterPopup>\r\n </>\r\n );\r\n\r\n return footerMessages;\r\n }\r\n\r\n private _handleTargetRef = (target: HTMLDivElement | null) => {\r\n if (typeof this.props.targetRef === \"function\")\r\n this.props.targetRef(target);\r\n else if (this.props.targetRef)\r\n (this.props.targetRef as React.MutableRefObject<HTMLElement | null>).current = target;\r\n this.setState({ target });\r\n };\r\n\r\n private _handleClose = () => {\r\n this.setOpenWidget(null);\r\n };\r\n\r\n private _handleOutsideClick = (e: MouseEvent) => {\r\n if (!this._indicator.current ||\r\n !(e.target instanceof Node) ||\r\n this._indicator.current.contains(e.target))\r\n return;\r\n\r\n this._handleClose();\r\n };\r\n\r\n private _handleMessageIndicatorClick = () => {\r\n // eslint-disable-next-line deprecation/deprecation\r\n const isOpen = (this.props.openWidget ?? this.state.openWidget) === this._className;\r\n if (isOpen)\r\n this.setOpenWidget(null);\r\n else\r\n this.setOpenWidget(this._className);\r\n };\r\n\r\n private _changeActiveTab = (tab: MessageCenterActiveTab) => {\r\n this.setState({ activeTab: tab });\r\n };\r\n\r\n private getMessages(): React.ReactChild[] {\r\n const messages = MessageManager.messages.slice(0).reverse();\r\n const tabRows: React.ReactChild[] = new Array<React.ReactChild>();\r\n\r\n messages.forEach((details: NotifyMessageDetailsType, index: number) => {\r\n /* istanbul ignore else */\r\n if (this.state.activeTab === MessageCenterActiveTab.AllMessages || this.isProblemStatus(details.priority)) {\r\n\r\n const iconClassName = MessageManager.getIconClassName(details);\r\n const message = details.briefMessage;\r\n\r\n tabRows.push(\r\n <MessageCenterMessage\r\n key={index.toString()}\r\n icon={<i className={iconClassName} />}\r\n >\r\n <MessageSpan message={message} />\r\n {details.detailedMessage &&\r\n <>\r\n <br />\r\n <MessageSpan className=\"uicore-text-small\" message={details.detailedMessage} />\r\n </>\r\n }\r\n </MessageCenterMessage>,\r\n );\r\n }\r\n });\r\n\r\n return tabRows;\r\n }\r\n\r\n private isProblemStatus(priority: OutputMessagePriority): boolean {\r\n // See priority values in DgnPlatform defined in NotificationManager\r\n\r\n if (priority === OutputMessagePriority.Error || priority === OutputMessagePriority.Fatal)\r\n return true;\r\n\r\n return false;\r\n }\r\n\r\n private setOpenWidget(openWidget: StatusBarFieldId) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n this.props.onOpenWidget?.(openWidget);\r\n this.setState({openWidget});\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"MessageCenter.js","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/MessageCenter.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,mBAAmB,EAA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,CAAC,EAAC,UAAU,EAAC,CAAC,CAAC;IAC9B,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 Notification\r\n */\r\n\r\nimport * as React from \"react\";\r\nimport { OutputMessagePriority } from \"@itwin/core-frontend\";\r\nimport { FooterPopup, MessageCenter, MessageCenterDialog, MessageCenterMessage, MessageCenterTab } from \"@itwin/appui-layout-react\";\r\nimport { MessageManager } from \"../messages/MessageManager\";\r\nimport { MessageSpan } from \"../messages/MessageSpan\";\r\nimport { NotifyMessageDetailsType } from \"../messages/ReactNotifyMessageDetails\";\r\nimport { StatusBarFieldId } from \"../statusbar/StatusBarWidgetControl\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { StatusFieldProps } from \"./StatusFieldProps\";\r\n\r\n/** Enum for the [[MessageCenterField]] active tab\r\n * @internal\r\n */\r\nenum MessageCenterActiveTab {\r\n AllMessages,\r\n Problems,\r\n}\r\n\r\n/** State for the [[MessageCenterField]] React component\r\n * @internal\r\n */\r\ninterface MessageCenterState {\r\n activeTab: MessageCenterActiveTab;\r\n target: HTMLDivElement | null;\r\n messageCount: number;\r\n openWidget: string | null;\r\n}\r\n\r\n/** Properties for withMessageCenterFieldProps HOC.\r\n * @public\r\n */\r\nexport interface MessageCenterFieldProps extends StatusFieldProps {\r\n /** Message center dialog target.\r\n * @deprecated Use `MessageManager.registerAnimateOutToElement` to register this ref in the related component.\r\n */\r\n targetRef?: React.Ref<HTMLElement>;\r\n}\r\n\r\n/** Message Center Field React component.\r\n * @public\r\n */\r\nexport class MessageCenterField extends React.Component<MessageCenterFieldProps, MessageCenterState> {\r\n private _className: string;\r\n private _indicator = React.createRef<HTMLDivElement>();\r\n private _title = UiFramework.translate(\"messageCenter.messages\");\r\n private _unloadMessagesUpdatedHandler?: () => void;\r\n private _removeOpenMessagesCenterHandler?: () => void;\r\n\r\n constructor(p: MessageCenterFieldProps) {\r\n super(p);\r\n\r\n const instance = this.constructor;\r\n this._className = instance.name;\r\n\r\n this.state = {\r\n activeTab: MessageCenterActiveTab.AllMessages,\r\n target: null,\r\n messageCount: MessageManager.messages.length,\r\n // eslint-disable-next-line deprecation/deprecation\r\n openWidget: p.openWidget ?? null,\r\n };\r\n }\r\n\r\n /** @internal */\r\n public override componentDidMount() {\r\n this._unloadMessagesUpdatedHandler = MessageManager.onMessagesUpdatedEvent.addListener(this._handleMessagesUpdatedEvent, this);\r\n this._removeOpenMessagesCenterHandler = MessageManager.onOpenMessageCenterEvent.addListener(this._handleOpenMessageCenterEvent, this);\r\n MessageManager.registerAnimateOutToElement(this._indicator.current);\r\n }\r\n\r\n /** @internal */\r\n public override componentWillUnmount() {\r\n // istanbul ignore else\r\n if (this._unloadMessagesUpdatedHandler) {\r\n this._unloadMessagesUpdatedHandler();\r\n this._unloadMessagesUpdatedHandler = undefined;\r\n }\r\n // istanbul ignore else\r\n if (this._removeOpenMessagesCenterHandler) {\r\n this._removeOpenMessagesCenterHandler();\r\n this._removeOpenMessagesCenterHandler = undefined;\r\n }\r\n }\r\n\r\n private _handleMessagesUpdatedEvent = () => {\r\n // istanbul ignore else\r\n if (this._unloadMessagesUpdatedHandler)\r\n this.setState({ messageCount: MessageManager.messages.length });\r\n };\r\n\r\n private _handleOpenMessageCenterEvent = () => {\r\n this.setOpenWidget(this._className);\r\n };\r\n\r\n public override render(): React.ReactNode {\r\n const tooltip = `${this.state.messageCount} ${this._title}`;\r\n const divStyle = { ...this.props.style, height: \"100%\" };\r\n const footerMessages = (\r\n <>\r\n <div\r\n className={this.props.className}\r\n style={divStyle}\r\n title={tooltip}\r\n ref={this._handleTargetRef}\r\n >\r\n <MessageCenter\r\n indicatorRef={this._indicator}\r\n // eslint-disable-next-line deprecation/deprecation\r\n isInFooterMode={this.props.isInFooterMode ?? true}\r\n // eslint-disable-next-line deprecation/deprecation\r\n label={(this.props.isInFooterMode ?? true) ? this._title : undefined}\r\n onClick={this._handleMessageIndicatorClick}\r\n >\r\n {this.state.messageCount.toString()}\r\n </MessageCenter>\r\n </div>\r\n <FooterPopup\r\n // eslint-disable-next-line deprecation/deprecation\r\n isOpen={(this.props.openWidget ?? this.state.openWidget) === this._className}\r\n onClose={this._handleClose}\r\n onOutsideClick={this._handleOutsideClick}\r\n target={this.state.target}\r\n >\r\n <MessageCenterDialog\r\n prompt={UiFramework.translate(\"messageCenter.prompt\")}\r\n tabs={\r\n <>\r\n <MessageCenterTab\r\n isActive={this.state.activeTab === MessageCenterActiveTab.AllMessages}\r\n onClick={() => this._changeActiveTab(MessageCenterActiveTab.AllMessages)}\r\n >\r\n {UiFramework.translate(\"messageCenter.all\")}\r\n </MessageCenterTab>\r\n <MessageCenterTab\r\n isActive={this.state.activeTab === MessageCenterActiveTab.Problems}\r\n onClick={() => this._changeActiveTab(MessageCenterActiveTab.Problems)}\r\n >\r\n {UiFramework.translate(\"messageCenter.errors\")}\r\n </MessageCenterTab>\r\n </>\r\n }\r\n title={this._title}\r\n >\r\n {this.getMessages()}\r\n </MessageCenterDialog>\r\n </FooterPopup>\r\n </>\r\n );\r\n\r\n return footerMessages;\r\n }\r\n\r\n private _handleTargetRef = (target: HTMLDivElement | null) => {\r\n // eslint-disable-next-line deprecation/deprecation\r\n const ref = this.props.targetRef;\r\n if (typeof ref === \"function\")\r\n ref(target);\r\n else if (ref)\r\n (ref as React.MutableRefObject<HTMLElement | null>).current = target;\r\n this.setState({ target });\r\n };\r\n\r\n private _handleClose = () => {\r\n this.setOpenWidget(null);\r\n };\r\n\r\n private _handleOutsideClick = (e: MouseEvent) => {\r\n if (!this._indicator.current ||\r\n !(e.target instanceof Node) ||\r\n this._indicator.current.contains(e.target))\r\n return;\r\n\r\n this._handleClose();\r\n };\r\n\r\n private _handleMessageIndicatorClick = () => {\r\n // eslint-disable-next-line deprecation/deprecation\r\n const isOpen = (this.props.openWidget ?? this.state.openWidget) === this._className;\r\n if (isOpen)\r\n this.setOpenWidget(null);\r\n else\r\n this.setOpenWidget(this._className);\r\n };\r\n\r\n private _changeActiveTab = (tab: MessageCenterActiveTab) => {\r\n this.setState({ activeTab: tab });\r\n };\r\n\r\n private getMessages(): React.ReactChild[] {\r\n const messages = MessageManager.messages.slice(0).reverse();\r\n const tabRows: React.ReactChild[] = new Array<React.ReactChild>();\r\n\r\n messages.forEach((details: NotifyMessageDetailsType, index: number) => {\r\n /* istanbul ignore else */\r\n if (this.state.activeTab === MessageCenterActiveTab.AllMessages || this.isProblemStatus(details.priority)) {\r\n\r\n const iconClassName = MessageManager.getIconClassName(details);\r\n const message = details.briefMessage;\r\n\r\n tabRows.push(\r\n <MessageCenterMessage\r\n key={index.toString()}\r\n icon={<i className={iconClassName} />}\r\n >\r\n <MessageSpan message={message} />\r\n {details.detailedMessage &&\r\n <>\r\n <br />\r\n <MessageSpan className=\"uicore-text-small\" message={details.detailedMessage} />\r\n </>\r\n }\r\n </MessageCenterMessage>,\r\n );\r\n }\r\n });\r\n\r\n return tabRows;\r\n }\r\n\r\n private isProblemStatus(priority: OutputMessagePriority): boolean {\r\n // See priority values in DgnPlatform defined in NotificationManager\r\n\r\n if (priority === OutputMessagePriority.Error || priority === OutputMessagePriority.Fatal)\r\n return true;\r\n\r\n return false;\r\n }\r\n\r\n private setOpenWidget(openWidget: StatusBarFieldId) {\r\n // eslint-disable-next-line deprecation/deprecation\r\n this.props.onOpenWidget?.(openWidget);\r\n this.setState({openWidget});\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"PromptField.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/PromptField.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAE5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;GACG;AACH,UAAU,gBAAiB,SAAQ,gBAAgB;IACjD,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,cAAM,oBAAqB,SAAQ,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC;gBAEtD,KAAK,EAAE,gBAAgB;IAInB,MAAM,IAAI,KAAK,CAAC,SAAS;CAW1C;AAaD;;;;;;;GAOG,CACH,eAAO,MAAM,WAAW,iLAAiD,CAAC"}
1
+ {"version":3,"file":"PromptField.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/PromptField.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAE5B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;GACG;AACH,UAAU,gBAAiB,SAAQ,gBAAgB;IACjD,sCAAsC;IACtC,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;;GAIG;AACH,cAAM,oBAAqB,SAAQ,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC;gBAEtD,KAAK,EAAE,gBAAgB;IAInB,MAAM,IAAI,KAAK,CAAC,SAAS;CAY1C;AAaD;;;;;;;GAOG,CACH,eAAO,MAAM,WAAW,iLAAiD,CAAC"}
@@ -21,7 +21,10 @@ class PromptFieldComponent extends React.Component {
21
21
  super(props);
22
22
  }
23
23
  render() {
24
- return (React.createElement(FooterIndicator, { className: classnames("uifw-statusFields-promptField", this.props.className), style: this.props.style, isInFooterMode: this.props.isInFooterMode }, this.props.toolPrompt));
24
+ var _a;
25
+ return (React.createElement(FooterIndicator, { className: classnames("uifw-statusFields-promptField", this.props.className), style: this.props.style,
26
+ // eslint-disable-next-line deprecation/deprecation
27
+ isInFooterMode: (_a = this.props.isInFooterMode) !== null && _a !== void 0 ? _a : true }, this.props.toolPrompt));
25
28
  }
26
29
  }
27
30
  /** Function used by Redux to map state data in Redux store to props that are used to render this component. */
@@ -1 +1 @@
1
- {"version":3,"file":"PromptField.js","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/PromptField.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAU7C;;;;GAIG;AACH,MAAM,oBAAqB,SAAQ,KAAK,CAAC,SAA2B;IAElE,YAAY,KAAuB;QACjC,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;IAEe,MAAM;QACpB,OAAO,CACL,oBAAC,eAAe,IACd,SAAS,EAAE,UAAU,CAAC,+BAA+B,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAC5E,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,EACvB,cAAc,EAAE,IAAI,CAAC,KAAK,CAAC,cAAc,IAExC,IAAI,CAAC,KAAK,CAAC,UAAU,CACN,CACnB,CAAC;IACJ,CAAC;CACF;AAED,+GAA+G;AAC/G,SAAS,eAAe,CAAC,KAAU;IACjC,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,CAAE,8CAA8C;IAC5G,0BAA0B;IAC1B,IAAI,CAAC,cAAc;QACjB,OAAO,SAAS,CAAC;IAEnB,OAAO,EAAE,UAAU,EAAE,cAAc,CAAC,mBAAmB,CAAC,UAAU,EAAE,CAAC;AACvE,CAAC;AAED,4EAA4E;AAC5E;;;;;;;GAOG,CAAC,gEAAgE;AACpE,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,oBAAoB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module StatusBar\r\n */\r\n\r\nimport \"./PromptField.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { connect } from \"react-redux\";\r\nimport { FooterIndicator } from \"@itwin/appui-layout-react\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { StatusFieldProps } from \"./StatusFieldProps\";\r\n\r\n/** Defines properties supported by the Prompt Field Component.\r\n */\r\ninterface PromptFieldProps extends StatusFieldProps {\r\n /** Prompt text for the active tool */\r\n toolPrompt: string;\r\n}\r\n\r\n/**\r\n * Prompt Field React component. This component is designed to be specified in a status bar definition.\r\n * It is used to display prompts from tools. To send a prompt to this component use IModelApp.notifications.outputPromptByKey or\r\n * IModelApp.notifications.outputPrompt.\r\n */\r\nclass PromptFieldComponent extends React.Component<PromptFieldProps> {\r\n\r\n constructor(props: PromptFieldProps) {\r\n super(props);\r\n }\r\n\r\n public override render(): React.ReactNode {\r\n return (\r\n <FooterIndicator\r\n className={classnames(\"uifw-statusFields-promptField\", this.props.className)}\r\n style={this.props.style}\r\n isInFooterMode={this.props.isInFooterMode}\r\n >\r\n {this.props.toolPrompt}\r\n </FooterIndicator>\r\n );\r\n }\r\n}\r\n\r\n/** Function used by Redux to map state data in Redux store to props that are used to render this component. */\r\nfunction mapStateToProps(state: any) {\r\n const frameworkState = state[UiFramework.frameworkStateKey]; // since app sets up key, don't hard-code name\r\n /* istanbul ignore next */\r\n if (!frameworkState)\r\n return undefined;\r\n\r\n return { toolPrompt: frameworkState.configurableUiState.toolPrompt };\r\n}\r\n\r\n// we declare the variable and export that rather than using export default.\r\n/**\r\n * Prompt Field React component. This component is designed to be specified in a status bar definition.\r\n * It is used to display prompts from tools. To send a prompt to this component use IModelApp.notifications.outputPromptByKey or\r\n * IModelApp.notifications.outputPrompt.\r\n * This React component is Redux connected.\r\n * @public\r\n * @deprecated Use ToolAssistanceField instead\r\n */ // eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const PromptField = connect(mapStateToProps)(PromptFieldComponent);\r\n"]}
1
+ {"version":3,"file":"PromptField.js","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/PromptField.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,oBAAoB,CAAC;AAC5B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,eAAe,EAAE,MAAM,2BAA2B,CAAC;AAC5D,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAU7C;;;;GAIG;AACH,MAAM,oBAAqB,SAAQ,KAAK,CAAC,SAA2B;IAElE,YAAY,KAAuB;QACjC,KAAK,CAAC,KAAK,CAAC,CAAC;IACf,CAAC;IAEe,MAAM;;QACpB,OAAO,CACL,oBAAC,eAAe,IACd,SAAS,EAAE,UAAU,CAAC,+BAA+B,EAAE,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAC5E,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK;YACvB,mDAAmD;YACnD,cAAc,EAAE,MAAA,IAAI,CAAC,KAAK,CAAC,cAAc,mCAAI,IAAI,IAEhD,IAAI,CAAC,KAAK,CAAC,UAAU,CACN,CACnB,CAAC;IACJ,CAAC;CACF;AAED,+GAA+G;AAC/G,SAAS,eAAe,CAAC,KAAU;IACjC,MAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CAAC,iBAAiB,CAAC,CAAC,CAAE,8CAA8C;IAC5G,0BAA0B;IAC1B,IAAI,CAAC,cAAc;QACjB,OAAO,SAAS,CAAC;IAEnB,OAAO,EAAE,UAAU,EAAE,cAAc,CAAC,mBAAmB,CAAC,UAAU,EAAE,CAAC;AACvE,CAAC;AAED,4EAA4E;AAC5E;;;;;;;GAOG,CAAC,gEAAgE;AACpE,MAAM,CAAC,MAAM,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC,CAAC,oBAAoB,CAAC,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module StatusBar\r\n */\r\n\r\nimport \"./PromptField.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { connect } from \"react-redux\";\r\nimport { FooterIndicator } from \"@itwin/appui-layout-react\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { StatusFieldProps } from \"./StatusFieldProps\";\r\n\r\n/** Defines properties supported by the Prompt Field Component.\r\n */\r\ninterface PromptFieldProps extends StatusFieldProps {\r\n /** Prompt text for the active tool */\r\n toolPrompt: string;\r\n}\r\n\r\n/**\r\n * Prompt Field React component. This component is designed to be specified in a status bar definition.\r\n * It is used to display prompts from tools. To send a prompt to this component use IModelApp.notifications.outputPromptByKey or\r\n * IModelApp.notifications.outputPrompt.\r\n */\r\nclass PromptFieldComponent extends React.Component<PromptFieldProps> {\r\n\r\n constructor(props: PromptFieldProps) {\r\n super(props);\r\n }\r\n\r\n public override render(): React.ReactNode {\r\n return (\r\n <FooterIndicator\r\n className={classnames(\"uifw-statusFields-promptField\", this.props.className)}\r\n style={this.props.style}\r\n // eslint-disable-next-line deprecation/deprecation\r\n isInFooterMode={this.props.isInFooterMode ?? true}\r\n >\r\n {this.props.toolPrompt}\r\n </FooterIndicator>\r\n );\r\n }\r\n}\r\n\r\n/** Function used by Redux to map state data in Redux store to props that are used to render this component. */\r\nfunction mapStateToProps(state: any) {\r\n const frameworkState = state[UiFramework.frameworkStateKey]; // since app sets up key, don't hard-code name\r\n /* istanbul ignore next */\r\n if (!frameworkState)\r\n return undefined;\r\n\r\n return { toolPrompt: frameworkState.configurableUiState.toolPrompt };\r\n}\r\n\r\n// we declare the variable and export that rather than using export default.\r\n/**\r\n * Prompt Field React component. This component is designed to be specified in a status bar definition.\r\n * It is used to display prompts from tools. To send a prompt to this component use IModelApp.notifications.outputPromptByKey or\r\n * IModelApp.notifications.outputPrompt.\r\n * This React component is Redux connected.\r\n * @public\r\n * @deprecated Use ToolAssistanceField instead\r\n */ // eslint-disable-next-line @typescript-eslint/naming-convention\r\nexport const PromptField = connect(mapStateToProps)(PromptFieldComponent);\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SectionsField.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/SectionsField.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAEH,OAAO,sBAAsB,CAAC;AAS9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;IAChE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,eAgFlE"}
1
+ {"version":3,"file":"SectionsField.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/SectionsField.tsx"],"names":[],"mappings":"AAIA;;GAEG;;AAEH,OAAO,sBAAsB,CAAC;AAS9B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,wBAAyB,SAAQ,gBAAgB;IAChE,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,wBAAwB,eAiFlE"}
@@ -18,6 +18,7 @@ import { Indicator } from "./Indicator";
18
18
  * @beta
19
19
  */
20
20
  export function SectionsStatusField(props) {
21
+ var _a;
21
22
  const [toolTip] = React.useState(UiFramework.translate("tools.sectionTools"));
22
23
  const [clearLabel] = React.useState(UiFramework.translate("tools.sectionClear"));
23
24
  const [showHandlesLabel] = React.useState(UiFramework.translate("tools.sectionShowHandles"));
@@ -60,7 +61,9 @@ export function SectionsStatusField(props) {
60
61
  return (React.createElement("div", { className: "uifw-section-footer-popup-container" }, showIndicator &&
61
62
  React.createElement(React.Fragment, null,
62
63
  React.createElement("div", { ref: targetDiv, title: toolTip },
63
- React.createElement(Indicator, { className: classes, iconName: "icon-section-tool", onClick: () => setPopupOpen(!isPopupOpen), opened: isPopupOpen, isInFooterMode: props.isInFooterMode })),
64
+ React.createElement(Indicator, { className: classes, iconName: "icon-section-tool", onClick: () => setPopupOpen(!isPopupOpen), opened: isPopupOpen,
65
+ // eslint-disable-next-line deprecation/deprecation
66
+ isInFooterMode: (_a = props.isInFooterMode) !== null && _a !== void 0 ? _a : true })),
64
67
  React.createElement(FooterPopup, { target: targetDiv.current, onClose: () => setPopupOpen(false), isOpen: isPopupOpen },
65
68
  React.createElement(Dialog, { titleBar: React.createElement(TitleBar, { title: toolTip }) },
66
69
  React.createElement("div", { className: "uifw-sections-footer-contents" },
@@ -1 +1 @@
1
- {"version":3,"file":"SectionsField.js","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/SectionsField.tsx"],"names":[],"mappings":"AAAA;;;+FAG+F;AAC/F;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAC9B,OAAO,UAAU,MAAM,YAAY,CAAC;AACpC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAiB,SAAS,EAAE,iBAAiB,EAAE,kBAAkB,EAAE,0BAA0B,EAAY,MAAM,sBAAsB,CAAC;AAC7I,OAAO,EAAE,MAAM,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,2BAA2B,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,iBAAiB,EAAE,MAAM,4BAA4B,CAAC;AAC/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MAAM,EAAE,CAAC,CAAC;QACzF,YAAY,CAAC,KAAK,CAAC,CAAC;IACtB,CAAC,CAAC;IAEF,OAAO,CACL,6BAAK,SAAS,EAAC,qCAAqC,IACjD,aAAa;QACZ;YACE,6BAAK,GAAG,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO;gBACjC,oBAAC,SAAS,IAAC,SAAS,EAAE,OAAO,EAC3B,QAAQ,EAAC,mBAAmB,EAC5B,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,CAAC,WAAW,CAAC,EACzC,MAAM,EAAE,WAAW,EACnB,cAAc,EAAE,KAAK,CAAC,cAAc,GACpC,CACE;YACN,oBAAC,WAAW,IACV,MAAM,EAAE,SAAS,CAAC,OAAO,EACzB,OAAO,EAAE,GAAG,EAAE,CAAC,YAAY,CAAC,KAAK,CAAC,EAClC,MAAM,EAAE,WAAW;gBACnB,oBAAC,MAAM,IACL,QAAQ,EACN,oBAAC,QAAQ,IAAC,KAAK,EAAE,OAAO,GAAI;oBAE9B,6BAAK,SAAS,EAAC,+BAA+B;wBAC5C,oBAAC,MAAM,IAAC,OAAO,EAAE,WAAW,IAAG,UAAU,CAAU;wBACnD,6BAAK,SAAS,EAAC,qCAAqC;4BAClD,6BAAK,SAAS,EAAE,UAAU,CAAC,qBAAqB,CAAC,IAAG,gBAAgB,CAAO;4BAC3E,oBAAC,YAAY,IAAC,SAAS,EAAC,sBAAsB,EAAC,QAAQ,EAAE,kBAAkB,EAAE,OAAO,EAAE,oBAAoB,GAAI,CAC1G,CACF,CACC,CACG,CACb,CAED,CACP,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module StatusBar\r\n */\r\n\r\nimport \"./SectionsField.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { ClipEventType, IModelApp, ViewClipClearTool, ViewClipDecoration, ViewClipDecorationProvider, Viewport } from \"@itwin/core-frontend\";\r\nimport { Dialog, FooterPopup, TitleBar } from \"@itwin/appui-layout-react\";\r\nimport { Button, ToggleSwitch } from \"@itwin/itwinui-react\";\r\nimport { useActiveViewport } from \"../hooks/useActiveViewport\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { Indicator } from \"./Indicator\";\r\nimport { StatusFieldProps } from \"./StatusFieldProps\";\r\n\r\n/** Sections Status Field Props\r\n * @beta\r\n */\r\nexport interface SectionsStatusFieldProps extends StatusFieldProps {\r\n hideWhenUnused?: boolean;\r\n}\r\n\r\n/** Status Field for showing section extra tools for clearing and showing manipulators\r\n * @beta\r\n */\r\nexport function SectionsStatusField(props: SectionsStatusFieldProps) {\r\n const [toolTip] = React.useState(UiFramework.translate(\"tools.sectionTools\"));\r\n const [clearLabel] = React.useState(UiFramework.translate(\"tools.sectionClear\"));\r\n const [showHandlesLabel] = React.useState(UiFramework.translate(\"tools.sectionShowHandles\"));\r\n const activeViewport = useActiveViewport();\r\n const [showIndicator, setShowIndicator] = React.useState(false);\r\n const [isPopupOpen, setPopupOpen] = React.useState(false);\r\n const targetDiv = React.useRef<HTMLDivElement>(null);\r\n const classes = (showIndicator) ? \"uifw-indicator-fade-in\" : \"uifw-indicator-fade-out\";\r\n const [hasManipulatorsShown, setHasManipulatorsShown] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n // istanbul ignore next\r\n const onClipChanged = (viewport: Viewport, _eventType: ClipEventType, _provider: ViewClipDecorationProvider) => {\r\n if (viewport !== activeViewport)\r\n return;\r\n\r\n setHasManipulatorsShown(!!ViewClipDecoration.get(activeViewport));\r\n const isClipActive = !!activeViewport.view.getViewClip();\r\n setShowIndicator(isClipActive || !props.hideWhenUnused);\r\n };\r\n\r\n const clipActive = !!activeViewport && /* istanbul ignore next */ !!activeViewport.view.getViewClip();\r\n setShowIndicator(clipActive || !props.hideWhenUnused);\r\n setHasManipulatorsShown(clipActive && /* istanbul ignore next */ !!activeViewport && /* istanbul ignore next */ !!ViewClipDecoration.get(activeViewport));\r\n\r\n ViewClipDecorationProvider.create().onActiveClipChanged.addListener(onClipChanged);\r\n return () => {\r\n // Get or create static ViewClipDecorationProvider\r\n ViewClipDecorationProvider.create().onActiveClipChanged.removeListener(onClipChanged);\r\n };\r\n }, [activeViewport, props.hideWhenUnused, isPopupOpen]);\r\n\r\n // istanbul ignore next\r\n const toggleManipulators = async (e: React.ChangeEvent<HTMLInputElement>) => {\r\n if (activeViewport) {\r\n setHasManipulatorsShown(e.target.checked);\r\n await ViewClipDecorationProvider.create().toggleDecoration(activeViewport);\r\n }\r\n };\r\n\r\n // istanbul ignore next\r\n const handleClear = async () => {\r\n await IModelApp.tools.run(ViewClipClearTool.toolId, ViewClipDecorationProvider.create());\r\n setPopupOpen(false);\r\n };\r\n\r\n return (\r\n <div className=\"uifw-section-footer-popup-container\">\r\n {showIndicator &&\r\n <>\r\n <div ref={targetDiv} title={toolTip}>\r\n <Indicator className={classes}\r\n iconName=\"icon-section-tool\"\r\n onClick={() => setPopupOpen(!isPopupOpen)}\r\n opened={isPopupOpen}\r\n isInFooterMode={props.isInFooterMode}\r\n />\r\n </div>\r\n <FooterPopup\r\n target={targetDiv.current}\r\n onClose={() => setPopupOpen(false)}\r\n isOpen={isPopupOpen}>\r\n <Dialog\r\n titleBar={\r\n <TitleBar title={toolTip} />\r\n }>\r\n <div className=\"uifw-sections-footer-contents\">\r\n <Button onClick={handleClear}>{clearLabel}</Button>\r\n <div className=\"uifw-uifw-sections-toggle-container\">\r\n <div className={classnames(\"uifw-sections-label\")}>{showHandlesLabel}</div>\r\n <ToggleSwitch className=\"uifw-sections-toggle\" onChange={toggleManipulators} checked={hasManipulatorsShown} />\r\n </div>\r\n </div>\r\n </Dialog>\r\n </FooterPopup>\r\n </>\r\n }\r\n </div>\r\n );\r\n}\r\n"]}
1
+ {"version":3,"file":"SectionsField.js","s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,WAAW,IAAG,UAAU,CAAU;wBACnD,6BAAK,SAAS,EAAC,qCAAqC;4BAClD,6BAAK,SAAS,EAAE,UAAU,CAAC,qBAAqB,CAAC,IAAG,gBAAgB,CAAO;4BAC3E,oBAAC,YAAY,IAAC,SAAS,EAAC,sBAAsB,EAAC,QAAQ,EAAE,kBAAkB,EAAE,OAAO,EAAE,oBAAoB,GAAI,CAC1G,CACF,CACC,CACG,CACb,CAED,CACP,CAAC;AACJ,CAAC","sourcesContent":["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module StatusBar\r\n */\r\n\r\nimport \"./SectionsField.scss\";\r\nimport classnames from \"classnames\";\r\nimport * as React from \"react\";\r\nimport { ClipEventType, IModelApp, ViewClipClearTool, ViewClipDecoration, ViewClipDecorationProvider, Viewport } from \"@itwin/core-frontend\";\r\nimport { Dialog, FooterPopup, TitleBar } from \"@itwin/appui-layout-react\";\r\nimport { Button, ToggleSwitch } from \"@itwin/itwinui-react\";\r\nimport { useActiveViewport } from \"../hooks/useActiveViewport\";\r\nimport { UiFramework } from \"../UiFramework\";\r\nimport { Indicator } from \"./Indicator\";\r\nimport { StatusFieldProps } from \"./StatusFieldProps\";\r\n\r\n/** Sections Status Field Props\r\n * @beta\r\n */\r\nexport interface SectionsStatusFieldProps extends StatusFieldProps {\r\n hideWhenUnused?: boolean;\r\n}\r\n\r\n/** Status Field for showing section extra tools for clearing and showing manipulators\r\n * @beta\r\n */\r\nexport function SectionsStatusField(props: SectionsStatusFieldProps) {\r\n const [toolTip] = React.useState(UiFramework.translate(\"tools.sectionTools\"));\r\n const [clearLabel] = React.useState(UiFramework.translate(\"tools.sectionClear\"));\r\n const [showHandlesLabel] = React.useState(UiFramework.translate(\"tools.sectionShowHandles\"));\r\n const activeViewport = useActiveViewport();\r\n const [showIndicator, setShowIndicator] = React.useState(false);\r\n const [isPopupOpen, setPopupOpen] = React.useState(false);\r\n const targetDiv = React.useRef<HTMLDivElement>(null);\r\n const classes = (showIndicator) ? \"uifw-indicator-fade-in\" : \"uifw-indicator-fade-out\";\r\n const [hasManipulatorsShown, setHasManipulatorsShown] = React.useState(false);\r\n\r\n React.useEffect(() => {\r\n // istanbul ignore next\r\n const onClipChanged = (viewport: Viewport, _eventType: ClipEventType, _provider: ViewClipDecorationProvider) => {\r\n if (viewport !== activeViewport)\r\n return;\r\n\r\n setHasManipulatorsShown(!!ViewClipDecoration.get(activeViewport));\r\n const isClipActive = !!activeViewport.view.getViewClip();\r\n setShowIndicator(isClipActive || !props.hideWhenUnused);\r\n };\r\n\r\n const clipActive = !!activeViewport && /* istanbul ignore next */ !!activeViewport.view.getViewClip();\r\n setShowIndicator(clipActive || !props.hideWhenUnused);\r\n setHasManipulatorsShown(clipActive && /* istanbul ignore next */ !!activeViewport && /* istanbul ignore next */ !!ViewClipDecoration.get(activeViewport));\r\n\r\n ViewClipDecorationProvider.create().onActiveClipChanged.addListener(onClipChanged);\r\n return () => {\r\n // Get or create static ViewClipDecorationProvider\r\n ViewClipDecorationProvider.create().onActiveClipChanged.removeListener(onClipChanged);\r\n };\r\n }, [activeViewport, props.hideWhenUnused, isPopupOpen]);\r\n\r\n // istanbul ignore next\r\n const toggleManipulators = async (e: React.ChangeEvent<HTMLInputElement>) => {\r\n if (activeViewport) {\r\n setHasManipulatorsShown(e.target.checked);\r\n await ViewClipDecorationProvider.create().toggleDecoration(activeViewport);\r\n }\r\n };\r\n\r\n // istanbul ignore next\r\n const handleClear = async () => {\r\n await IModelApp.tools.run(ViewClipClearTool.toolId, ViewClipDecorationProvider.create());\r\n setPopupOpen(false);\r\n };\r\n\r\n return (\r\n <div className=\"uifw-section-footer-popup-container\">\r\n {showIndicator &&\r\n <>\r\n <div ref={targetDiv} title={toolTip}>\r\n <Indicator className={classes}\r\n iconName=\"icon-section-tool\"\r\n onClick={() => setPopupOpen(!isPopupOpen)}\r\n opened={isPopupOpen}\r\n // eslint-disable-next-line deprecation/deprecation\r\n isInFooterMode={props.isInFooterMode ?? true}\r\n />\r\n </div>\r\n <FooterPopup\r\n target={targetDiv.current}\r\n onClose={() => setPopupOpen(false)}\r\n isOpen={isPopupOpen}>\r\n <Dialog\r\n titleBar={\r\n <TitleBar title={toolTip} />\r\n }>\r\n <div className=\"uifw-sections-footer-contents\">\r\n <Button onClick={handleClear}>{clearLabel}</Button>\r\n <div className=\"uifw-uifw-sections-toggle-container\">\r\n <div className={classnames(\"uifw-sections-label\")}>{showHandlesLabel}</div>\r\n <ToggleSwitch className=\"uifw-sections-toggle\" onChange={toggleManipulators} checked={hasManipulatorsShown} />\r\n </div>\r\n </div>\r\n </Dialog>\r\n </FooterPopup>\r\n </>\r\n }\r\n </div>\r\n );\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"SelectionInfo.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/SelectionInfo.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;GACG;AACH,UAAU,uBAAwB,SAAQ,gBAAgB;IACxD,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,cAAM,2BAA4B,SAAQ,KAAK,CAAC,SAAS,CAAC,uBAAuB,CAAC;gBAEpE,KAAK,EAAE,uBAAuB;IAI1B,MAAM,IAAI,KAAK,CAAC,SAAS;CAY1C;AAaD;;;;;GAKG,CACH,eAAO,MAAM,kBAAkB,0MAAwD,CAAC"}
1
+ {"version":3,"file":"SelectionInfo.d.ts","sourceRoot":"","sources":["../../../../src/appui-react/statusfields/SelectionInfo.tsx"],"names":[],"mappings":"AAIA;;GAEG;AAEH,OAAO,sBAAsB,CAAC;AAE9B,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEtD;GACG;AACH,UAAU,uBAAwB,SAAQ,gBAAgB;IACxD,cAAc,EAAE,MAAM,CAAC;CACxB;AAED;;;GAGG;AACH,cAAM,2BAA4B,SAAQ,KAAK,CAAC,SAAS,CAAC,uBAAuB,CAAC;gBAEpE,KAAK,EAAE,uBAAuB;IAI1B,MAAM,IAAI,KAAK,CAAC,SAAS;CAa1C;AAaD;;;;;GAKG,CACH,eAAO,MAAM,kBAAkB,0MAAwD,CAAC"}