@xh/hoist 87.1.1 → 87.2.0

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 (263) hide show
  1. package/.npmignore +39 -0
  2. package/CHANGELOG.md +92 -20
  3. package/admin/AdminUtils.ts +64 -0
  4. package/admin/App.scss +88 -0
  5. package/admin/columns/UserData.ts +30 -3
  6. package/admin/detail/RestDetailModel.ts +64 -0
  7. package/admin/detail/RestDetailPanel.ts +106 -0
  8. package/admin/tabs/activity/tracking/ActivityTrackingModel.ts +27 -94
  9. package/admin/tabs/activity/tracking/ActivityTrackingPanel.ts +23 -60
  10. package/admin/tabs/activity/tracking/detail/ActivityDetailView.ts +1 -2
  11. package/admin/tabs/general/alertBanner/AlertBannerPanel.ts +2 -13
  12. package/admin/tabs/general/config/ConfigDetailPanel.ts +72 -0
  13. package/admin/tabs/general/config/ConfigPanel.ts +41 -53
  14. package/admin/tabs/general/config/ConfigPanelModel.ts +3 -0
  15. package/admin/tabs/general/config/ConfigValue.scss +14 -0
  16. package/admin/tabs/general/config/ConfigValue.ts +104 -65
  17. package/admin/tabs/userData/jsonblob/JsonBlobDetailPanel.ts +93 -0
  18. package/admin/tabs/userData/jsonblob/JsonBlobModel.ts +4 -0
  19. package/admin/tabs/userData/jsonblob/JsonBlobPanel.ts +2 -0
  20. package/admin/tabs/userData/prefs/UserPreferenceDetailPanel.ts +62 -0
  21. package/admin/tabs/userData/prefs/UserPreferenceModel.ts +10 -3
  22. package/admin/tabs/userData/prefs/UserPreferencePanel.ts +3 -1
  23. package/admin/tabs/userData/roles/details/RoleDetails.scss +2 -19
  24. package/admin/tabs/userData/roles/details/RoleDetails.ts +13 -13
  25. package/appcontainer/AboutDialogModel.ts +1 -0
  26. package/appcontainer/AppContainerModel.ts +3 -0
  27. package/appcontainer/AppStateModel.ts +1 -0
  28. package/appcontainer/BannerSourceModel.ts +1 -0
  29. package/appcontainer/ChangelogDialogModel.ts +1 -0
  30. package/appcontainer/ColChooserOptionsModel.ts +1 -0
  31. package/appcontainer/ExceptionDialogModel.ts +1 -0
  32. package/appcontainer/FeedbackDialogModel.ts +1 -0
  33. package/appcontainer/ImpersonationBarModel.ts +1 -0
  34. package/appcontainer/MessageSourceModel.ts +1 -0
  35. package/appcontainer/OptionsDialogModel.ts +1 -0
  36. package/appcontainer/PageStateModel.ts +1 -0
  37. package/appcontainer/RouterModel.ts +2 -0
  38. package/appcontainer/SizingModeModel.ts +1 -0
  39. package/appcontainer/ThemeModel.ts +1 -0
  40. package/appcontainer/ToastSourceModel.ts +1 -0
  41. package/appcontainer/UserAgentModel.ts +1 -0
  42. package/appcontainer/ViewportSizeModel.ts +1 -0
  43. package/build/types/admin/AdminUtils.d.ts +29 -0
  44. package/build/types/admin/columns/UserData.d.ts +3 -0
  45. package/build/types/admin/detail/RestDetailModel.d.ts +20 -0
  46. package/build/types/admin/detail/RestDetailPanel.d.ts +34 -0
  47. package/build/types/admin/tabs/activity/tracking/ActivityTrackingModel.d.ts +5 -17
  48. package/build/types/admin/tabs/general/config/ConfigDetailPanel.d.ts +7 -0
  49. package/build/types/admin/tabs/general/config/ConfigValue.d.ts +10 -4
  50. package/build/types/admin/tabs/userData/jsonblob/JsonBlobDetailPanel.d.ts +3 -0
  51. package/build/types/admin/tabs/userData/prefs/UserPreferenceDetailPanel.d.ts +3 -0
  52. package/build/types/admin/tabs/userData/prefs/UserPreferenceModel.d.ts +3 -0
  53. package/build/types/appcontainer/AboutDialogModel.d.ts +1 -0
  54. package/build/types/appcontainer/AppContainerModel.d.ts +1 -0
  55. package/build/types/appcontainer/AppStateModel.d.ts +1 -0
  56. package/build/types/appcontainer/BannerSourceModel.d.ts +1 -0
  57. package/build/types/appcontainer/ChangelogDialogModel.d.ts +1 -0
  58. package/build/types/appcontainer/ColChooserOptionsModel.d.ts +1 -0
  59. package/build/types/appcontainer/ExceptionDialogModel.d.ts +1 -0
  60. package/build/types/appcontainer/FeedbackDialogModel.d.ts +1 -0
  61. package/build/types/appcontainer/ImpersonationBarModel.d.ts +1 -0
  62. package/build/types/appcontainer/MessageSourceModel.d.ts +1 -0
  63. package/build/types/appcontainer/OptionsDialogModel.d.ts +1 -0
  64. package/build/types/appcontainer/PageStateModel.d.ts +1 -0
  65. package/build/types/appcontainer/RouterModel.d.ts +1 -0
  66. package/build/types/appcontainer/SizingModeModel.d.ts +1 -0
  67. package/build/types/appcontainer/ThemeModel.d.ts +1 -0
  68. package/build/types/appcontainer/ToastSourceModel.d.ts +1 -0
  69. package/build/types/appcontainer/UserAgentModel.d.ts +1 -0
  70. package/build/types/appcontainer/ViewportSizeModel.d.ts +1 -0
  71. package/build/types/cmp/ag-grid/AgGridModel.d.ts +3 -1
  72. package/build/types/cmp/card/Card.d.ts +2 -2
  73. package/build/types/cmp/chart/ChartModel.d.ts +2 -0
  74. package/build/types/cmp/dataview/DataViewModel.d.ts +2 -0
  75. package/build/types/cmp/daterange/DateRangePickerModel.d.ts +266 -0
  76. package/build/types/cmp/daterange/DateRangePresets.d.ts +26 -0
  77. package/build/types/cmp/daterange/DateRangeUtils.d.ts +96 -0
  78. package/build/types/cmp/daterange/Types.d.ts +152 -0
  79. package/build/types/cmp/daterange/index.d.ts +4 -0
  80. package/build/types/cmp/filter/FilterChooserModel.d.ts +3 -1
  81. package/build/types/cmp/form/FormModel.d.ts +3 -1
  82. package/build/types/cmp/grid/GridModel.d.ts +2 -0
  83. package/build/types/cmp/grid/Types.d.ts +2 -0
  84. package/build/types/cmp/grid/filter/GridFilterModel.d.ts +1 -1
  85. package/build/types/cmp/grouping/GroupingChooserModel.d.ts +3 -1
  86. package/build/types/cmp/input/HoistInputProps.d.ts +49 -2
  87. package/build/types/cmp/tab/TabContainerModel.d.ts +3 -1
  88. package/build/types/cmp/tab/TabModel.d.ts +3 -1
  89. package/build/types/cmp/treemap/TreeMapModel.d.ts +2 -0
  90. package/build/types/cmp/viewmanager/ViewManagerModel.d.ts +2 -0
  91. package/build/types/cmp/zoneGrid/ZoneGridModel.d.ts +2 -0
  92. package/build/types/core/HoistBase.d.ts +7 -0
  93. package/build/types/core/HoistProps.d.ts +26 -1
  94. package/build/types/core/model/RootRefreshContextModel.d.ts +1 -0
  95. package/build/types/core/types/Telemetry.d.ts +1 -1
  96. package/build/types/data/Store.d.ts +3 -1
  97. package/build/types/data/StoreSelectionModel.d.ts +3 -1
  98. package/build/types/data/cube/Cube.d.ts +5 -2
  99. package/build/types/data/cube/View.d.ts +2 -0
  100. package/build/types/desktop/cmp/appOption/AutoRefreshAppOption.d.ts +3 -0
  101. package/build/types/desktop/cmp/appOption/ThemeAppOption.d.ts +3 -0
  102. package/build/types/desktop/cmp/button/Button.d.ts +2 -2
  103. package/build/types/desktop/cmp/button/ButtonGroup.d.ts +2 -2
  104. package/build/types/desktop/cmp/dash/DashConfig.d.ts +2 -0
  105. package/build/types/desktop/cmp/dash/DashViewModel.d.ts +3 -1
  106. package/build/types/desktop/cmp/dash/canvas/DashCanvasModel.d.ts +1 -1
  107. package/build/types/desktop/cmp/dash/container/DashContainerModel.d.ts +1 -1
  108. package/build/types/desktop/cmp/daterange/DateRangePicker.d.ts +66 -0
  109. package/build/types/desktop/cmp/daterange/impl/CustomTab.d.ts +3 -0
  110. package/build/types/desktop/cmp/daterange/impl/DateRangePickerLocalModel.d.ts +121 -0
  111. package/build/types/desktop/cmp/daterange/impl/PeriodTab.d.ts +2 -0
  112. package/build/types/desktop/cmp/daterange/impl/PresetsTab.d.ts +3 -0
  113. package/build/types/desktop/cmp/daterange/impl/RelativeTab.d.ts +3 -0
  114. package/build/types/desktop/cmp/daterange/impl/TabUtils.d.ts +21 -0
  115. package/build/types/desktop/cmp/daterange/index.d.ts +2 -0
  116. package/build/types/desktop/cmp/dock/DockContainerModel.d.ts +3 -1
  117. package/build/types/desktop/cmp/dock/DockViewModel.d.ts +3 -1
  118. package/build/types/desktop/cmp/grouping/GroupingChooser.d.ts +4 -1
  119. package/build/types/desktop/cmp/input/IntentInput.d.ts +38 -0
  120. package/build/types/desktop/cmp/input/NumberInput.d.ts +2 -2
  121. package/build/types/desktop/cmp/input/SegmentedControl.d.ts +25 -4
  122. package/build/types/desktop/cmp/input/TextArea.d.ts +2 -2
  123. package/build/types/desktop/cmp/input/TextInput.d.ts +2 -2
  124. package/build/types/desktop/cmp/input/index.d.ts +1 -0
  125. package/build/types/desktop/cmp/leftrightchooser/LeftRightChooserModel.d.ts +3 -1
  126. package/build/types/desktop/cmp/panel/PanelModel.d.ts +3 -1
  127. package/build/types/desktop/cmp/rest/RestGridModel.d.ts +1 -1
  128. package/build/types/desktop/cmp/tab/impl/TabContainer.d.ts +1 -1
  129. package/build/types/icon/Icon.d.ts +3 -0
  130. package/build/types/inspector/impl/InspectorUtils.d.ts +3 -0
  131. package/build/types/inspector/instances/InstancesModel.d.ts +4 -0
  132. package/build/types/kit/react-day-picker/index.d.ts +3 -3
  133. package/build/types/mobile/cmp/button/Button.d.ts +2 -2
  134. package/build/types/mobile/cmp/input/NumberInput.d.ts +2 -2
  135. package/build/types/mobile/cmp/input/SegmentedControl.d.ts +18 -4
  136. package/build/types/mobile/cmp/input/TextArea.d.ts +2 -2
  137. package/build/types/mobile/cmp/input/TextInput.d.ts +2 -2
  138. package/build/types/mobile/cmp/navigator/NavigatorModel.d.ts +3 -1
  139. package/build/types/mobile/cmp/navigator/PageModel.d.ts +3 -1
  140. package/build/types/mobile/cmp/tab/impl/TabContainer.d.ts +1 -1
  141. package/build/types/svc/InspectorService.d.ts +1 -0
  142. package/build/types/utils/js/LangUtils.d.ts +24 -5
  143. package/cmp/README.md +1 -0
  144. package/cmp/ag-grid/AgGridModel.ts +5 -0
  145. package/cmp/badge/Badge.ts +5 -3
  146. package/cmp/card/Card.ts +4 -3
  147. package/cmp/chart/ChartModel.ts +11 -1
  148. package/cmp/dataview/DataViewModel.ts +7 -1
  149. package/cmp/daterange/DateRangePickerModel.ts +628 -0
  150. package/cmp/daterange/DateRangePresets.ts +274 -0
  151. package/cmp/daterange/DateRangeUtils.ts +557 -0
  152. package/cmp/daterange/README.md +434 -0
  153. package/cmp/daterange/Types.ts +203 -0
  154. package/cmp/daterange/index.ts +10 -0
  155. package/cmp/filter/FilterChooserModel.ts +7 -4
  156. package/cmp/form/FormModel.ts +6 -0
  157. package/cmp/form/README.md +1 -0
  158. package/cmp/grid/GridModel.ts +24 -4
  159. package/cmp/grid/Types.ts +3 -0
  160. package/cmp/grid/filter/GridFilterModel.ts +3 -1
  161. package/cmp/grouping/GroupingChooserModel.ts +6 -1
  162. package/cmp/input/HoistInputProps.ts +50 -2
  163. package/cmp/input/README.md +42 -0
  164. package/cmp/layout/Box.ts +3 -2
  165. package/cmp/tab/TabContainerModel.ts +9 -1
  166. package/cmp/tab/TabModel.ts +5 -0
  167. package/cmp/treemap/SplitTreeMapModel.ts +12 -2
  168. package/cmp/treemap/TreeMapModel.ts +6 -1
  169. package/cmp/viewmanager/ViewManagerModel.ts +6 -1
  170. package/cmp/zoneGrid/ZoneGridModel.ts +7 -0
  171. package/core/HoistBase.ts +11 -0
  172. package/core/HoistProps.ts +27 -0
  173. package/core/README.md +46 -0
  174. package/core/impl/InstallServices.ts +5 -1
  175. package/core/model/RootRefreshContextModel.ts +2 -0
  176. package/core/types/Telemetry.ts +1 -1
  177. package/data/README.md +3 -1
  178. package/data/Store.ts +7 -0
  179. package/data/StoreSelectionModel.ts +5 -1
  180. package/data/cube/Cube.ts +12 -3
  181. package/data/cube/View.ts +5 -1
  182. package/desktop/README.md +2 -0
  183. package/desktop/appcontainer/LoginPanel.ts +2 -0
  184. package/desktop/cmp/button/Button.scss +71 -42
  185. package/desktop/cmp/button/Button.ts +10 -1
  186. package/desktop/cmp/button/ButtonGroup.ts +4 -1
  187. package/desktop/cmp/button/grid/ColChooserButton.ts +9 -1
  188. package/desktop/cmp/button/zoneGrid/ZoneMapperButton.ts +1 -0
  189. package/desktop/cmp/dash/DashConfig.ts +3 -0
  190. package/desktop/cmp/dash/DashViewModel.ts +14 -1
  191. package/desktop/cmp/dash/canvas/DashCanvasModel.ts +3 -1
  192. package/desktop/cmp/dash/container/DashContainerModel.ts +3 -1
  193. package/desktop/cmp/daterange/DateRangePicker.scss +577 -0
  194. package/desktop/cmp/daterange/DateRangePicker.ts +357 -0
  195. package/desktop/cmp/daterange/impl/CustomTab.ts +165 -0
  196. package/desktop/cmp/daterange/impl/DateRangePickerLocalModel.ts +482 -0
  197. package/desktop/cmp/daterange/impl/PeriodTab.ts +138 -0
  198. package/desktop/cmp/daterange/impl/PresetsTab.ts +58 -0
  199. package/desktop/cmp/daterange/impl/RelativeTab.ts +108 -0
  200. package/desktop/cmp/daterange/impl/TabUtils.ts +34 -0
  201. package/desktop/cmp/daterange/index.ts +8 -0
  202. package/desktop/cmp/dock/DockContainerModel.ts +6 -1
  203. package/desktop/cmp/dock/DockViewModel.ts +6 -1
  204. package/desktop/cmp/filechooser/FileChooser.ts +4 -0
  205. package/desktop/cmp/form/FormField.ts +1 -0
  206. package/desktop/cmp/grouping/GroupingChooser.ts +8 -2
  207. package/desktop/cmp/input/Checkbox.ts +1 -0
  208. package/desktop/cmp/input/CodeInput.ts +1 -0
  209. package/desktop/cmp/input/DateInput.scss +1 -1
  210. package/desktop/cmp/input/DateInput.ts +1 -0
  211. package/desktop/cmp/input/IntentInput.scss +202 -0
  212. package/desktop/cmp/input/IntentInput.ts +213 -0
  213. package/desktop/cmp/input/NumberInput.ts +11 -2
  214. package/desktop/cmp/input/Picker.ts +1 -0
  215. package/desktop/cmp/input/RadioInput.ts +2 -1
  216. package/desktop/cmp/input/SegmentedControl.scss +45 -2
  217. package/desktop/cmp/input/SegmentedControl.ts +66 -11
  218. package/desktop/cmp/input/Select.ts +9 -7
  219. package/desktop/cmp/input/Slider.ts +2 -0
  220. package/desktop/cmp/input/SwitchInput.ts +1 -0
  221. package/desktop/cmp/input/TextArea.ts +11 -2
  222. package/desktop/cmp/input/TextInput.ts +11 -2
  223. package/desktop/cmp/input/index.ts +1 -0
  224. package/desktop/cmp/leftrightchooser/LeftRightChooserModel.ts +5 -0
  225. package/desktop/cmp/panel/Panel.ts +8 -5
  226. package/desktop/cmp/panel/PanelModel.ts +8 -0
  227. package/desktop/cmp/panel/impl/ResizeContainer.ts +2 -1
  228. package/desktop/cmp/rest/RestGridModel.ts +4 -0
  229. package/desktop/cmp/tab/impl/TabContainer.ts +2 -0
  230. package/docs/README.md +2 -0
  231. package/docs/build-and-publish.md +23 -7
  232. package/docs/doc-registry.json +8 -0
  233. package/docs/version-compatibility.md +2 -0
  234. package/icon/Icon.ts +9 -0
  235. package/icon/index.ts +24 -0
  236. package/inspector/README.md +8 -2
  237. package/inspector/impl/InspectorUtils.ts +12 -0
  238. package/inspector/instances/DiagnosticsModel.ts +3 -2
  239. package/inspector/instances/InstancesModel.ts +81 -14
  240. package/inspector/instances/InstancesPanel.ts +6 -0
  241. package/kit/react-day-picker/index.ts +3 -3
  242. package/mobile/appcontainer/LoginPanel.ts +2 -0
  243. package/mobile/cmp/button/Button.ts +16 -3
  244. package/mobile/cmp/form/FormField.ts +1 -0
  245. package/mobile/cmp/input/Checkbox.ts +1 -0
  246. package/mobile/cmp/input/DateInput.ts +1 -0
  247. package/mobile/cmp/input/Label.ts +13 -8
  248. package/mobile/cmp/input/NumberInput.ts +11 -2
  249. package/mobile/cmp/input/SearchInput.ts +1 -0
  250. package/mobile/cmp/input/SegmentedControl.scss +36 -6
  251. package/mobile/cmp/input/SegmentedControl.ts +37 -11
  252. package/mobile/cmp/input/Select.ts +2 -0
  253. package/mobile/cmp/input/SwitchInput.ts +1 -0
  254. package/mobile/cmp/input/TextArea.ts +11 -2
  255. package/mobile/cmp/input/TextInput.ts +11 -2
  256. package/mobile/cmp/navigator/NavigatorModel.ts +6 -1
  257. package/mobile/cmp/navigator/PageModel.ts +6 -1
  258. package/mobile/cmp/tab/impl/TabContainer.ts +9 -1
  259. package/package.json +19 -19
  260. package/styles/vars.scss +32 -2
  261. package/svc/InspectorService.ts +2 -0
  262. package/svc/TraceService.ts +5 -2
  263. package/utils/js/LangUtils.ts +37 -5
@@ -47,6 +47,8 @@ export interface DockViewConfig {
47
47
  allowDialog?: boolean;
48
48
  /** Awaitable callback invoked on close. Return false to prevent close. */
49
49
  onClose?: () => Awaitable<boolean | void>;
50
+ /** See {@link HoistBase.xhName}. */
51
+ xhName?: string;
50
52
  }
51
53
  /**
52
54
  * Model for a DockView within a DockContainer. Specifies the actual content (child component)
@@ -79,7 +81,7 @@ export declare class DockViewModel extends HoistModel {
79
81
  get isActive(): boolean;
80
82
  get renderMode(): RenderMode;
81
83
  get refreshMode(): RefreshMode;
82
- constructor({ id, containerModel, title, icon, content, width, height, collapsedWidth, dialogWidth, dialogHeight, refreshMode, renderMode, docked, collapsed, allowClose, allowDialog, onClose }: DockViewConfig);
84
+ constructor({ id, containerModel, title, icon, content, width, height, collapsedWidth, dialogWidth, dialogHeight, refreshMode, renderMode, docked, collapsed, allowClose, allowDialog, onClose, xhName }: DockViewConfig);
83
85
  toggleDocked(): void;
84
86
  showInDialog(): void;
85
87
  showInDock(): void;
@@ -25,7 +25,10 @@ export interface GroupingChooserProps extends ButtonProps<GroupingChooserModel>
25
25
  * If unspecified, will default based on favorites enabled status + side.
26
26
  */
27
27
  popoverWidth?: number;
28
- /** True (default) to style trigger button background and borders to match inputs. */
28
+ /**
29
+ * True (default) to style trigger button background and borders to match inputs. Set to false
30
+ * to render an outlined button instead.
31
+ */
29
32
  styleButtonAsInput?: boolean;
30
33
  }
31
34
  /**
@@ -0,0 +1,38 @@
1
+ import { HoistInputProps } from '@xh/hoist/cmp/input';
2
+ import { HoistProps, Intent } from '@xh/hoist/core';
3
+ import '@xh/hoist/desktop/register';
4
+ import './IntentInput.scss';
5
+ export declare const INTENTS: Intent[];
6
+ export interface IntentInputProps extends HoistProps, HoistInputProps {
7
+ /** True to render in a compact mode with reduced sizing for space-constrained contexts. */
8
+ compact?: boolean;
9
+ /**
10
+ * True to offer a null value, rendered as an additional outlined swatch ahead of the intents
11
+ * and holding the check while the value is null. Defaults to false, leaving the control a
12
+ * required single-select.
13
+ */
14
+ enableClear?: boolean;
15
+ /**
16
+ * Intents to offer, in render order. Defaults to all four Hoist intents - specify a subset
17
+ * to restrict or reorder the available choices.
18
+ */
19
+ intents?: Intent[];
20
+ /**
21
+ * True to render each intent's name alongside its swatch. Defaults to false, for the most
22
+ * compact presentation - note swatches always carry their intent name as a tooltip and as
23
+ * their accessible label, so an unlabelled control remains identifiable.
24
+ */
25
+ showNames?: boolean;
26
+ }
27
+ /**
28
+ * An input for selecting a Hoist Intent, rendered as a compact row of color swatches drawn in
29
+ * the intent colors themselves. The selected swatch is marked with a check and a surrounding
30
+ * ring; names can optionally be rendered alongside each swatch.
31
+ *
32
+ * Set `enableClear` to offer a null value, rendered as an additional outlined swatch ahead of
33
+ * the intents.
34
+ *
35
+ * Designed to fit within a toolbar or a dense form without additional chrome. Swatches are
36
+ * rendered as an ARIA radiogroup, supporting selection via click, enter/space, and arrow keys.
37
+ */
38
+ export declare const IntentInput: import("react").FC<IntentInputProps>, intentInput: import("@xh/hoist/core").ElementFactory<IntentInputProps>;
@@ -1,10 +1,10 @@
1
- import { HoistInputProps } from '@xh/hoist/cmp/input';
1
+ import { HoistInputProps, PasswordManagerSupportProps } from '@xh/hoist/cmp/input';
2
2
  import { HoistProps, LayoutProps, StyleProps } from '@xh/hoist/core';
3
3
  import '@xh/hoist/desktop/register';
4
4
  import { NumericPrecision, ZeroPad } from '@xh/hoist/format';
5
5
  import type { Property } from 'csstype';
6
6
  import { KeyboardEventHandler, ReactElement, ReactNode, Ref } from 'react';
7
- export interface NumberInputProps extends HoistProps, LayoutProps, StyleProps, HoistInputProps {
7
+ export interface NumberInputProps extends HoistProps, LayoutProps, StyleProps, HoistInputProps, PasswordManagerSupportProps {
8
8
  value?: number;
9
9
  /** True to focus the control on render. */
10
10
  autoFocus?: boolean;
@@ -6,8 +6,16 @@ export interface SegmentedControlProps extends HoistProps, HoistInputProps {
6
6
  /** True to render in a compact mode with reduced sizing for space-constrained contexts. */
7
7
  compact?: boolean;
8
8
  /**
9
- * True (default) to stretch the control to fill available width,
10
- * distributing space equally among options.
9
+ * True (default) to render all segments at an equal width when {@link fill} is enabled,
10
+ * dividing the available width into equal parts regardless of label length - the conventional
11
+ * segmented-control appearance. Set false to instead size each segment to its content and
12
+ * share only the leftover space, so a longer label yields a wider segment. No effect when
13
+ * `fill` is false.
14
+ */
15
+ equalSegmentWidths?: boolean;
16
+ /**
17
+ * True (default) to stretch the control to fill available width. Set false to size the control
18
+ * to its options. See `equalSegmentWidths` for how the filled width is divided up.
11
19
  */
12
20
  fill?: boolean;
13
21
  /**
@@ -23,10 +31,23 @@ export interface SegmentedControlProps extends HoistProps, HoistInputProps {
23
31
  */
24
32
  options: Array<SegmentedControlOption | SegmentedControlNullOption | OptionPrimitive>;
25
33
  /**
26
- * True to render with an outlined style - a border around the control tray
27
- * with no inner background fill. Border color follows the current intent.
34
+ * True (default) to render a border around the control tray. Border color follows the current
35
+ * intent. Note this controls the tray border only - it does not remove the tray background,
36
+ * which is governed independently by `showTrayBackground`.
28
37
  */
29
38
  outlined?: boolean;
39
+ /**
40
+ * True (default) to fill the control tray with a background, setting it off from the surface
41
+ * behind it. Set false to omit that fill for a lighter presentation.
42
+ */
43
+ showTrayBackground?: boolean;
44
+ /**
45
+ * True to render dividers between options, adding internal structure to the tray. Dividers
46
+ * are suppressed on either side of the selected option so they do not compete with it.
47
+ * Defaults to 'auto', showing dividers only while no option is selected - the state in which
48
+ * the tray offers no other cue that its options are separate and selectable.
49
+ */
50
+ showOptionDividers?: boolean | 'auto';
30
51
  }
31
52
  /**
32
53
  * An input for selecting a single value from a small set of mutually exclusive options,
@@ -1,9 +1,9 @@
1
- import { HoistInputProps } from '@xh/hoist/cmp/input';
1
+ import { HoistInputProps, PasswordManagerSupportProps } from '@xh/hoist/cmp/input';
2
2
  import { HoistProps, LayoutProps, StyleProps } from '@xh/hoist/core';
3
3
  import '@xh/hoist/desktop/register';
4
4
  import { Ref } from 'react';
5
5
  import './TextArea.scss';
6
- export interface TextAreaProps extends HoistProps, HoistInputProps, LayoutProps, StyleProps {
6
+ export interface TextAreaProps extends HoistProps, HoistInputProps, PasswordManagerSupportProps, LayoutProps, StyleProps {
7
7
  value?: string;
8
8
  /** True to focus the control on render. */
9
9
  autoFocus?: boolean;
@@ -1,9 +1,9 @@
1
- import { HoistInputModel, HoistInputProps } from '@xh/hoist/cmp/input';
1
+ import { HoistInputModel, HoistInputProps, PasswordManagerSupportProps } from '@xh/hoist/cmp/input';
2
2
  import { HoistProps, LayoutProps, StyleProps } from '@xh/hoist/core';
3
3
  import '@xh/hoist/desktop/register';
4
4
  import type { Property } from 'csstype';
5
5
  import { FocusEvent, KeyboardEventHandler, ReactElement, ReactNode, Ref } from 'react';
6
- export interface TextInputProps extends HoistProps, HoistInputProps, LayoutProps, StyleProps {
6
+ export interface TextInputProps extends HoistProps, HoistInputProps, PasswordManagerSupportProps, LayoutProps, StyleProps {
7
7
  value?: string;
8
8
  /**
9
9
  * HTML `autocomplete` attribute to set on underlying <input> element.
@@ -3,6 +3,7 @@ export * from './Checkbox';
3
3
  export * from './CheckboxButton';
4
4
  export * from './CodeInput';
5
5
  export * from './DateInput';
6
+ export * from './IntentInput';
6
7
  export * from './JsonInput';
7
8
  export * from './NumberInput';
8
9
  export * from './Picker';
@@ -32,6 +32,8 @@ export interface LeftRightChooserConfig {
32
32
  rightEmptyText?: string;
33
33
  /** @internal */
34
34
  xhImpl?: boolean;
35
+ /** See {@link HoistBase.xhName}. */
36
+ xhName?: string;
35
37
  }
36
38
  /** Data record object for a LeftRightChooser value item. */
37
39
  export interface LeftRightChooserItem {
@@ -82,7 +84,7 @@ export declare class LeftRightChooserModel extends HoistModel {
82
84
  get rightValues(): any[];
83
85
  /** Currently 'selected' values on the left hand side. */
84
86
  get leftValues(): any[];
85
- constructor({ data, onChange, ungroupedName, leftTitle, leftSorted, leftSortBy, leftGroupingEnabled, leftGroupingExpanded, leftEmptyText, readonly, rightTitle, rightSorted, rightSortBy, rightGroupingEnabled, rightGroupingExpanded, rightEmptyText, showCounts, xhImpl }: LeftRightChooserConfig);
87
+ constructor({ data, onChange, ungroupedName, leftTitle, leftSorted, leftSortBy, leftGroupingEnabled, leftGroupingExpanded, leftEmptyText, readonly, rightTitle, rightSorted, rightSortBy, rightGroupingEnabled, rightGroupingExpanded, rightEmptyText, showCounts, xhName, xhImpl }: LeftRightChooserConfig);
86
88
  setData(data: LeftRightChooserItem[]): void;
87
89
  moveRows(rows: StoreRecord[]): void;
88
90
  private getTextColRenderer;
@@ -70,6 +70,8 @@ export interface PanelConfig {
70
70
  showModalToggleButton?: boolean;
71
71
  /** @internal */
72
72
  xhImpl?: any;
73
+ /** See {@link HoistBase.xhName}. */
74
+ xhName?: string;
73
75
  }
74
76
  export interface PanelPersistState {
75
77
  collapsed?: boolean;
@@ -119,7 +121,7 @@ export declare class PanelModel extends HoistModel implements Persistable<PanelP
119
121
  get isActive(): boolean;
120
122
  _resizeRef: React.RefObject<HTMLDivElement>;
121
123
  splitterRef: React.RefObject<HTMLDivElement>;
122
- constructor({ collapsible, resizable, resizeWhileDragging, defaultSize, minSize, maxSize, defaultCollapsed, side, modalSupport, errorBoundary, renderMode, refreshMode, persistWith, showSplitter, showSplitterCollapseButton, showHeaderCollapseButton, showModalToggleButton, xhImpl }: PanelConfig);
124
+ constructor({ collapsible, resizable, resizeWhileDragging, defaultSize, minSize, maxSize, defaultCollapsed, side, modalSupport, errorBoundary, renderMode, refreshMode, persistWith, showSplitter, showSplitterCollapseButton, showHeaderCollapseButton, showModalToggleButton, xhName, xhImpl }: PanelConfig);
123
125
  setCollapsed(collapsed: boolean): void;
124
126
  toggleCollapsed(): void;
125
127
  setIsModal(isModal: boolean): void;
@@ -101,7 +101,7 @@ export declare class RestGridModel extends HoistModel {
101
101
  get selModel(): import("@xh/hoist/data").StoreSelectionModel;
102
102
  get selectedRecords(): StoreRecord[];
103
103
  get selectedRecord(): StoreRecord;
104
- constructor({ readonly, toolbarActions, menuActions, formActions, showRefreshButton, actionWarning, prepareCloneFn, unit, filterFields, editors, onRowDoubleClicked, store, appData, ...rest }: RestGridConfig);
104
+ constructor({ readonly, toolbarActions, menuActions, formActions, showRefreshButton, actionWarning, prepareCloneFn, unit, filterFields, editors, onRowDoubleClicked, store, appData, xhName, ...rest }: RestGridConfig);
105
105
  /** Load the underlying store. */
106
106
  doLoadAsync(loadSpec: any): Promise<void>;
107
107
  /** Load the underlying store. */
@@ -4,4 +4,4 @@ import '../Tabs.scss';
4
4
  * Desktop implementation of TabContainer.
5
5
  * @internal
6
6
  */
7
- export declare function tabContainerImpl({ model, childContainerProps, className, testId, ...props }: TabContainerProps): import("react").ReactElement<import("@xh/hoist/cmp/layout").BoxComponentProps, any>;
7
+ export declare function tabContainerImpl({ model, childContainerProps, className, testId, domAttrs, ...props }: TabContainerProps): import("react").ReactElement<import("@xh/hoist/cmp/layout").BoxComponentProps, any>;
@@ -80,6 +80,7 @@ export declare const Icon: {
80
80
  arrowsLeftRight(p?: IconProps): any;
81
81
  arrowsRotate(p?: IconProps): any;
82
82
  arrowsUpDown(p?: IconProps): any;
83
+ asterisk(p?: IconProps): any;
83
84
  balanceScale(p?: IconProps): any;
84
85
  balanceScaleLeft(p?: IconProps): any;
85
86
  balanceScaleRight(p?: IconProps): any;
@@ -94,6 +95,8 @@ export declare const Icon: {
94
95
  bullhorn(p?: IconProps): any;
95
96
  calculator(p?: IconProps): any;
96
97
  calendar(p?: IconProps): any;
98
+ calendarDays(p?: IconProps): any;
99
+ calendarRange(p?: IconProps): any;
97
100
  camera(p?: IconProps): any;
98
101
  caretLeft(p?: IconProps): any;
99
102
  caretRight(p?: IconProps): any;
@@ -0,0 +1,3 @@
1
+ import type { HoistBase } from '@xh/hoist/core';
2
+ /** Label for an instance within Inspector - its `xhName` or class name, plus `xhId`. */
3
+ export declare function instanceLabel(inst: HoistBase): string;
@@ -23,9 +23,12 @@ export declare class InstancesModel extends HoistModel {
23
23
  loadedGetters: any[];
24
24
  instancesStoreFilter: any;
25
25
  propertiesStoreFilter: any;
26
+ /** Keys of favorited instances (`{className}:{xhName}`) - requires an `xhName` to pin. */
27
+ favorites: string[];
26
28
  instQuickFilters: string[];
27
29
  get showInGroups(): boolean;
28
30
  get showXhImpl(): boolean;
31
+ get favoritesOnly(): boolean;
29
32
  propQuickFilters: any[];
30
33
  get showUnderscoreProps(): boolean;
31
34
  get observablePropsOnly(): boolean;
@@ -35,6 +38,7 @@ export declare class InstancesModel extends HoistModel {
35
38
  selectInstanceAsync(xhId: string): Promise<void>;
36
39
  logInstanceToConsole(rec: StoreRecord): void;
37
40
  logPropToConsole(rec: StoreRecord): void;
41
+ toggleFavorite(record: StoreRecord): void;
38
42
  togglePropsWatchlistItem(record: StoreRecord): void;
39
43
  getInstance(xhId: string): HoistBase;
40
44
  private createInstancesGridModel;
@@ -1,5 +1,5 @@
1
- import { DayPicker } from 'react-day-picker';
2
- import 'react-day-picker/style.css';
1
+ import { DayPicker } from '@daypicker/react';
2
+ import '@daypicker/react/style.css';
3
3
  export { DayPicker };
4
- export type { DayPickerProps, Matcher } from 'react-day-picker';
4
+ export type { DayPickerProps, Matcher } from '@daypicker/react';
5
5
  export declare const dayPicker: import("@xh/hoist/core").ElementFactory<any>;
@@ -1,8 +1,8 @@
1
- import { LayoutProps, StyleProps, HoistModel, HoistProps, TestSupportProps, Intent } from '@xh/hoist/core';
1
+ import { DomAttrsProps, LayoutProps, StyleProps, HoistModel, HoistProps, TestSupportProps, Intent } from '@xh/hoist/core';
2
2
  import '@xh/hoist/mobile/register';
3
3
  import { ReactNode, ReactElement, MouseEvent } from 'react';
4
4
  import './Button.scss';
5
- export interface ButtonProps<M extends HoistModel = HoistModel> extends HoistProps<M>, TestSupportProps, LayoutProps, StyleProps {
5
+ export interface ButtonProps<M extends HoistModel = HoistModel> extends HoistProps<M>, TestSupportProps, DomAttrsProps, LayoutProps, StyleProps {
6
6
  active?: boolean;
7
7
  disabled?: boolean;
8
8
  icon?: ReactElement;
@@ -1,10 +1,10 @@
1
- import { HoistInputProps } from '@xh/hoist/cmp/input';
1
+ import { HoistInputProps, PasswordManagerSupportProps } from '@xh/hoist/cmp/input';
2
2
  import { HoistProps, LayoutProps, StyleProps } from '@xh/hoist/core';
3
3
  import { NumericPrecision, ZeroPad } from '@xh/hoist/format';
4
4
  import '@xh/hoist/mobile/register';
5
5
  import type { Property } from 'csstype';
6
6
  import './NumberInput.scss';
7
- export interface NumberInputProps extends HoistProps, HoistInputProps, StyleProps, LayoutProps {
7
+ export interface NumberInputProps extends HoistProps, HoistInputProps, PasswordManagerSupportProps, StyleProps, LayoutProps {
8
8
  value?: number;
9
9
  /** True to commit on every change/keystroke, default false. */
10
10
  commitOnChange?: boolean;
@@ -12,8 +12,8 @@ export interface SegmentedControlProps extends HoistProps, HoistInputProps {
12
12
  */
13
13
  equalSegmentWidths?: boolean;
14
14
  /**
15
- * True (default) to stretch the control to fill available width,
16
- * distributing space equally among options.
15
+ * True (default) to stretch the control to fill available width. Set false to size the control
16
+ * to its options. See `equalSegmentWidths` for how the filled width is divided up.
17
17
  */
18
18
  fill?: boolean;
19
19
  /**
@@ -29,10 +29,24 @@ export interface SegmentedControlProps extends HoistProps, HoistInputProps {
29
29
  */
30
30
  options: Array<SegmentedControlOption | SegmentedControlNullOption | OptionPrimitive>;
31
31
  /**
32
- * True to render with an outlined style - a border around the control tray
33
- * with no inner background fill. Border color follows the current intent.
32
+ * True (default) to render a border around the control tray. Border color follows the current
33
+ * intent. Note this controls the tray border only - it does not remove the tray background,
34
+ * which is governed independently by `showTrayBackground`.
34
35
  */
35
36
  outlined?: boolean;
37
+ /**
38
+ * True (default) to fill the control tray with a background, setting it off from the surface
39
+ * behind it. Set false to omit that fill for a lighter presentation. With no tray to set a
40
+ * filled tile against, the selected option is indicated with a ring instead.
41
+ */
42
+ showTrayBackground?: boolean;
43
+ /**
44
+ * True to render dividers between options, adding internal structure to the tray. Dividers
45
+ * are suppressed on either side of the selected option so they do not compete with it.
46
+ * Defaults to 'auto', showing dividers only while no option is selected - the state in which
47
+ * the tray offers no other cue that its options are separate and selectable.
48
+ */
49
+ showOptionDividers?: boolean | 'auto';
36
50
  }
37
51
  /**
38
52
  * An input for selecting a single value from a small set of mutually exclusive options,
@@ -1,8 +1,8 @@
1
- import { HoistInputProps } from '@xh/hoist/cmp/input';
1
+ import { HoistInputProps, PasswordManagerSupportProps } from '@xh/hoist/cmp/input';
2
2
  import { HoistProps, LayoutProps, StyleProps } from '@xh/hoist/core';
3
3
  import '@xh/hoist/mobile/register';
4
4
  import './TextArea.scss';
5
- export interface TextAreaProps extends HoistProps, HoistInputProps, StyleProps, LayoutProps {
5
+ export interface TextAreaProps extends HoistProps, HoistInputProps, PasswordManagerSupportProps, StyleProps, LayoutProps {
6
6
  value?: string;
7
7
  /** True to commit on every change/keystroke, default false. */
8
8
  commitOnChange?: boolean;
@@ -1,10 +1,10 @@
1
- import { HoistInputProps } from '@xh/hoist/cmp/input';
1
+ import { HoistInputProps, PasswordManagerSupportProps } from '@xh/hoist/cmp/input';
2
2
  import { HoistProps, LayoutProps, StyleProps } from '@xh/hoist/core';
3
3
  import '@xh/hoist/mobile/register';
4
4
  import type { Property } from 'csstype';
5
5
  import { ReactElement } from 'react';
6
6
  import './TextInput.scss';
7
- export interface TextInputProps extends HoistProps, HoistInputProps, StyleProps, LayoutProps {
7
+ export interface TextInputProps extends HoistProps, HoistInputProps, PasswordManagerSupportProps, StyleProps, LayoutProps {
8
8
  value?: string;
9
9
  /**
10
10
  * HTML `autocapitalize` attribute to set on underlying <input> element.
@@ -35,6 +35,8 @@ export interface NavigatorConfig {
35
35
  * See enum for description of supported modes.
36
36
  */
37
37
  refreshMode?: RefreshMode;
38
+ /** See {@link HoistBase.xhName}. */
39
+ xhName?: string;
38
40
  }
39
41
  /**
40
42
  * Model for handling stack-based navigation between pages.
@@ -57,7 +59,7 @@ export declare class NavigatorModel extends HoistModel {
57
59
  get activePageIdx(): number;
58
60
  get allowSlideNext(): boolean;
59
61
  get allowSlidePrev(): boolean;
60
- constructor({ pages, track, pullDownToRefresh, transitionMs, renderMode, refreshMode }: NavigatorConfig);
62
+ constructor({ pages, track, pullDownToRefresh, transitionMs, renderMode, refreshMode, xhName }: NavigatorConfig);
61
63
  /**
62
64
  * @param callback - function to execute (once) after the next page transition.
63
65
  */
@@ -37,6 +37,8 @@ export interface PageConfig {
37
37
  * no need to specify manually.
38
38
  */
39
39
  navigatorModel?: NavigatorModel;
40
+ /** See {@link HoistBase.xhName}. */
41
+ xhName?: string;
40
42
  }
41
43
  /**
42
44
  * Model for a Page within a Navigator. Specifies the actual content (i.e. page)
@@ -64,5 +66,5 @@ export declare class PageModel extends HoistModel {
64
66
  get renderMode(): RenderMode;
65
67
  get refreshMode(): RefreshMode;
66
68
  get isActive(): boolean;
67
- constructor({ id, navigatorModel, content, props, renderMode, refreshMode, disableDirectLink, disableAppRefreshButton }: PageConfig);
69
+ constructor({ id, navigatorModel, content, props, renderMode, refreshMode, disableDirectLink, disableAppRefreshButton, xhName }: PageConfig);
68
70
  }
@@ -6,4 +6,4 @@ import { TabContainerProps } from '@xh/hoist/cmp/tab';
6
6
  *
7
7
  * @internal
8
8
  */
9
- export declare function tabContainerImpl({ model, className, testId, ...props }: TabContainerProps): import("react").ReactElement<any, any>;
9
+ export declare function tabContainerImpl({ model, className, testId, domAttrs, ...props }: TabContainerProps): import("react").ReactElement<any, any>;
@@ -52,6 +52,7 @@ export declare class InspectorService extends HoistService {
52
52
  }
53
53
  interface InspectorInstanceData {
54
54
  className: string;
55
+ xhName: string;
55
56
  created: number;
56
57
  isHoistModel: boolean;
57
58
  isHoistService: boolean;
@@ -1,4 +1,4 @@
1
- import type { Thunkable } from '@xh/hoist/core';
1
+ import type { HoistBase, Thunkable } from '@xh/hoist/core';
2
2
  /**
3
3
  * Get a cached value on an object, creating it if it does not yet exist.
4
4
  *
@@ -121,15 +121,34 @@ export declare function mergeDeep<T, S1, S2>(object: T, source1: S1, source2: S2
121
121
  export declare function mergeDeep<T, S1, S2, S3>(object: T, source1: S1, source2: S2, source3: S3): T & S1 & S2 & S3;
122
122
  export declare function mergeDeep<T, S>(target: T, ...sources: S[]): T & S;
123
123
  /**
124
- * A string, or an object from which a name can be derived - via `displayName` (e.g. React
125
- * components) or `constructor.name` (e.g. class instances). Used for logging and tracing.
124
+ * A string, or an object from which a name can be derived - via `xhName` (HoistBase instances),
125
+ * `displayName` (e.g. React components), or `constructor.name` (class instances). Used for
126
+ * logging and tracing.
126
127
  */
127
- export type NameSource = string | {
128
+ export type NameSource = string | HoistBase | {
128
129
  displayName: string;
129
130
  } | {
130
131
  constructor: {
131
132
  name: string;
132
133
  };
133
134
  };
134
- /** Resolve a {@link NameSource} to a string, or null if unresolvable. */
135
+ /**
136
+ * Resolve a {@link NameSource} to a string, or null if unresolvable.
137
+ *
138
+ * A HoistBase instance is labelled per {@link formatInstanceLabel}. Other sources resolve via
139
+ * `xhName` or {@link parseTypeName}.
140
+ */
135
141
  export declare function parseNameSource(source: NameSource): string;
142
+ /**
143
+ * Label for a HoistBase instance - `ClassName [xhName]`, or `ClassName [id]` (short `xhId`) when
144
+ * unnamed. An `xhName` matching the class name (e.g. `fetchService`) marks a singleton and is
145
+ * omitted.
146
+ */
147
+ export declare function formatInstanceLabel(className: string, xhName: string, xhId: string): string;
148
+ /**
149
+ * Resolve a {@link NameSource} to its type-level name - `displayName` or `constructor.name` -
150
+ * ignoring any instance-level `xhName`. Returns null if unresolvable.
151
+ *
152
+ * @internal - use {@link parseNameSource}.
153
+ */
154
+ export declare function parseTypeName(source: NameSource): string;
package/cmp/README.md CHANGED
@@ -174,6 +174,7 @@ techniques.
174
174
 
175
175
  | Sub-package | Description |
176
176
  |-------------|-------------|
177
+ | `/daterange/` | DateRangePickerModel for period selection - presets, relative lookbacks, months and years, custom ranges. [See README](./daterange/README.md) |
177
178
  | `/filter/` | FilterChooserModel for building filter UIs |
178
179
  | `/grouping/` | GroupingChooserModel for dimension selection |
179
180
  | `/store/` | Store-related UI components (count label, filter field) |
@@ -58,6 +58,9 @@ export interface AgGridModelConfig {
58
58
 
59
59
  /** @internal */
60
60
  xhImpl?: boolean;
61
+
62
+ /** See {@link HoistBase.xhName}. */
63
+ xhName?: string;
61
64
  }
62
65
 
63
66
  /**
@@ -125,11 +128,13 @@ export class AgGridModel extends HoistModel {
125
128
  stripeRows = true,
126
129
  showCellFocus = false,
127
130
  hideHeaders = false,
131
+ xhName = null,
128
132
  xhImpl = false
129
133
  }: AgGridModelConfig = {}) {
130
134
  super();
131
135
  makeObservable(this);
132
136
  this.xhImpl = xhImpl;
137
+ this.xhName = xhName;
133
138
 
134
139
  this.sizingMode = sizingMode;
135
140
  this.showHover = showHover;
@@ -37,8 +37,10 @@ export const [Badge, badge] = hoistCmp.withFactory<BadgeProps>({
37
37
 
38
38
  render(props, ref) {
39
39
  const classes = [],
40
- [layoutProps, {className, intent, compact, icon, children, testId, ...restProps}] =
41
- splitLayoutProps(props);
40
+ [
41
+ layoutProps,
42
+ {className, intent, compact, icon, children, testId, domAttrs, ...restProps}
43
+ ] = splitLayoutProps(props);
42
44
 
43
45
  if (intent) {
44
46
  classes.push(`xh-bg-intent-${intent}`);
@@ -51,7 +53,7 @@ export const [Badge, badge] = hoistCmp.withFactory<BadgeProps>({
51
53
  const divProps = mergeDeep(
52
54
  {className: classNames(className, classes)},
53
55
  {style: layoutProps},
54
- {[TEST_ID]: testId},
56
+ {[TEST_ID]: testId, ...domAttrs},
55
57
  restProps
56
58
  );
57
59
 
package/cmp/card/Card.ts CHANGED
@@ -8,6 +8,7 @@
8
8
  import {box, fieldset} from '@xh/hoist/cmp/layout';
9
9
  import {
10
10
  BoxProps,
11
+ DomAttrsProps,
11
12
  hoistCmp,
12
13
  HoistProps,
13
14
  Intent,
@@ -26,7 +27,7 @@ import {CardModel} from './CardModel';
26
27
  import './Card.scss';
27
28
 
28
29
  export interface CardProps<M extends CardModel = CardModel>
29
- extends HoistProps<M>, TestSupportProps, LayoutProps {
30
+ extends HoistProps<M>, TestSupportProps, DomAttrsProps, LayoutProps {
30
31
  /** An icon placed left of the title. */
31
32
  icon?: ReactElement;
32
33
  /** Intent to apply to the inline header and border. */
@@ -75,9 +76,9 @@ export const [Card, card] = hoistCmp.withFactory<CardProps>({
75
76
  const wasDisplayed = useRef(false),
76
77
  {collapsed, renderMode} = model;
77
78
 
78
- let [layoutProps, {testId, ...restProps}] = splitLayoutProps(rest);
79
+ let [layoutProps, {testId, domAttrs, ...restProps}] = splitLayoutProps(rest);
79
80
 
80
- restProps = mergeDeep({style: layoutProps}, {[TEST_ID]: testId}, restProps);
81
+ restProps = mergeDeep({style: layoutProps}, {[TEST_ID]: testId, ...domAttrs}, restProps);
81
82
 
82
83
  const classes: string[] = [];
83
84
 
@@ -26,6 +26,9 @@ interface ChartConfig {
26
26
 
27
27
  /** @internal */
28
28
  xhImpl?: boolean;
29
+
30
+ /** See {@link HoistBase.xhName}. */
31
+ xhName?: string;
29
32
  }
30
33
 
31
34
  export interface ChartModelDefaults {
@@ -86,9 +89,16 @@ export class ChartModel extends HoistModel {
86
89
  super();
87
90
  makeObservable(this);
88
91
 
89
- const {highchartsConfig, series = [], contextMenu, xhImpl = false} = config ?? {};
92
+ const {
93
+ highchartsConfig,
94
+ series = [],
95
+ contextMenu,
96
+ xhName = null,
97
+ xhImpl = false
98
+ } = config ?? {};
90
99
 
91
100
  this.xhImpl = xhImpl;
101
+ this.xhName = xhName;
92
102
  this.highchartsConfig = highchartsConfig;
93
103
  this.series = castArray(series);
94
104
  this.contextMenu = this.parseContextMenu(contextMenu);
@@ -125,6 +125,9 @@ export interface DataViewConfig {
125
125
  * with its usages of GridModel.
126
126
  */
127
127
  gridOptions?: Omit<GridConfig, keyof DataViewConfig>;
128
+
129
+ /** See {@link HoistBase.xhName}. */
130
+ xhName?: string;
128
131
  }
129
132
 
130
133
  export type ItemHeightFn = (params: {
@@ -177,8 +180,10 @@ export class DataViewModel extends HoistModel {
177
180
  rowClassRules,
178
181
  onRowClicked,
179
182
  onRowDoubleClicked,
180
- gridOptions
183
+ gridOptions,
184
+ xhName = null
181
185
  } = config;
186
+ this.xhName = xhName;
182
187
 
183
188
  throwIf(
184
189
  !isFunction(itemHeight) && !isNumber(itemHeight),
@@ -203,6 +208,7 @@ export class DataViewModel extends HoistModel {
203
208
  });
204
209
 
205
210
  this.gridModel = new GridModel({
211
+ xhName: this.childXhName('gridModel'),
206
212
  store,
207
213
  sortBy,
208
214
  selModel,