@xh/hoist 83.1.0 → 84.0.1

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 (250) hide show
  1. package/CHANGELOG.md +76 -0
  2. package/admin/tabs/cluster/instances/logs/levels/LogLevelDialogModel.ts +106 -10
  3. package/admin/tabs/cluster/metrics/MetricsModel.ts +3 -3
  4. package/appcontainer/AppContainerModel.ts +1 -1
  5. package/appcontainer/README.md +20 -0
  6. package/assets.d.ts +34 -0
  7. package/build/types/cmp/ag-grid/AgGrid.d.ts +8 -19
  8. package/build/types/cmp/ag-grid/AgGridModel.d.ts +18 -5
  9. package/build/types/cmp/card/Card.d.ts +9 -4
  10. package/build/types/cmp/card/CardModel.d.ts +15 -2
  11. package/build/types/cmp/chart/Chart.d.ts +2 -2
  12. package/build/types/cmp/chart/ChartModel.d.ts +11 -1
  13. package/build/types/cmp/dataview/DataView.d.ts +4 -2
  14. package/build/types/cmp/dataview/DataViewModel.d.ts +16 -4
  15. package/build/types/cmp/filter/FilterChooserModel.d.ts +7 -1
  16. package/build/types/cmp/form/Form.d.ts +2 -1
  17. package/build/types/cmp/form/FormModel.d.ts +12 -0
  18. package/build/types/cmp/form/field/BaseFieldModel.d.ts +7 -0
  19. package/build/types/cmp/form/formfieldset/FormFieldSetModel.d.ts +7 -1
  20. package/build/types/cmp/grid/GridModel.d.ts +16 -1
  21. package/build/types/cmp/grid/GridSorter.d.ts +14 -0
  22. package/build/types/cmp/grid/Types.d.ts +18 -0
  23. package/build/types/cmp/grid/columns/Column.d.ts +40 -2
  24. package/build/types/cmp/grid/columns/ColumnGroup.d.ts +10 -0
  25. package/build/types/cmp/grouping/GroupingChooserModel.d.ts +9 -2
  26. package/build/types/cmp/layout/Box.d.ts +19 -7
  27. package/build/types/cmp/layout/Frame.d.ts +17 -5
  28. package/build/types/cmp/loadingindicator/LoadingIndicator.d.ts +6 -4
  29. package/build/types/cmp/pinpad/PinPadModel.d.ts +6 -1
  30. package/build/types/cmp/spinner/Spinner.d.ts +31 -10
  31. package/build/types/cmp/tab/TabContainerModel.d.ts +11 -0
  32. package/build/types/cmp/tab/TabModel.d.ts +7 -0
  33. package/build/types/cmp/tab/Types.d.ts +4 -0
  34. package/build/types/cmp/treemap/TreeMapModel.d.ts +3 -3
  35. package/build/types/cmp/viewmanager/ViewManagerModel.d.ts +9 -0
  36. package/build/types/cmp/zoneGrid/ZoneGridModel.d.ts +22 -3
  37. package/build/types/cmp/zoneGrid/impl/ZoneMapperModel.d.ts +6 -0
  38. package/build/types/core/HoistComponent.d.ts +29 -8
  39. package/build/types/core/HoistProps.d.ts +9 -3
  40. package/build/types/core/load/LoadSpec.d.ts +1 -1
  41. package/build/types/core/persist/provider/ViewManagerProvider.d.ts +7 -0
  42. package/build/types/data/Store.d.ts +35 -1
  43. package/build/types/data/StoreSelectionModel.d.ts +18 -2
  44. package/build/types/data/cube/Cube.d.ts +26 -6
  45. package/build/types/data/cube/Query.d.ts +10 -0
  46. package/build/types/data/cube/View.d.ts +21 -2
  47. package/build/types/data/cube/aggregate/Aggregator.d.ts +13 -0
  48. package/build/types/data/cube/aggregate/AverageAggregator.d.ts +1 -0
  49. package/build/types/data/cube/aggregate/AverageStrictAggregator.d.ts +1 -0
  50. package/build/types/data/cube/aggregate/ChildCountAggregator.d.ts +1 -0
  51. package/build/types/data/cube/aggregate/LeafCountAggregator.d.ts +1 -0
  52. package/build/types/data/cube/aggregate/MaxAggregator.d.ts +1 -0
  53. package/build/types/data/cube/aggregate/MinAggregator.d.ts +1 -0
  54. package/build/types/data/cube/aggregate/NullAggregator.d.ts +1 -0
  55. package/build/types/data/cube/aggregate/SingleAggregator.d.ts +1 -0
  56. package/build/types/data/cube/aggregate/SumAggregator.d.ts +1 -0
  57. package/build/types/data/cube/aggregate/SumStrictAggregator.d.ts +1 -0
  58. package/build/types/data/cube/aggregate/UniqueAggregator.d.ts +1 -0
  59. package/build/types/data/filter/BaseFilterFieldSpec.d.ts +9 -0
  60. package/build/types/data/filter/Types.d.ts +12 -0
  61. package/build/types/desktop/cmp/button/AppMenuButton.d.ts +5 -0
  62. package/build/types/desktop/cmp/button/Button.d.ts +5 -1
  63. package/build/types/desktop/cmp/dash/canvas/DashCanvasModel.d.ts +12 -3
  64. package/build/types/desktop/cmp/dash/container/DashContainerModel.d.ts +9 -0
  65. package/build/types/desktop/cmp/dock/DockViewModel.d.ts +7 -0
  66. package/build/types/desktop/cmp/filechooser/FileChooserModel.d.ts +8 -0
  67. package/build/types/desktop/cmp/grid/editors/BooleanEditor.d.ts +1 -0
  68. package/build/types/desktop/cmp/grid/editors/DateEditor.d.ts +1 -0
  69. package/build/types/desktop/cmp/grid/editors/NumberEditor.d.ts +1 -0
  70. package/build/types/desktop/cmp/grid/editors/SelectEditor.d.ts +1 -0
  71. package/build/types/desktop/cmp/grid/editors/TextAreaEditor.d.ts +1 -0
  72. package/build/types/desktop/cmp/grid/editors/TextEditor.d.ts +1 -0
  73. package/build/types/desktop/cmp/input/Picker.d.ts +1 -1
  74. package/build/types/desktop/cmp/input/SegmentedControl.d.ts +16 -2
  75. package/build/types/desktop/cmp/leftrightchooser/LeftRightChooserModel.d.ts +7 -0
  76. package/build/types/desktop/cmp/modalsupport/ModalSupportModel.d.ts +28 -2
  77. package/build/types/desktop/cmp/panel/Panel.d.ts +5 -2
  78. package/build/types/desktop/cmp/panel/PanelModel.d.ts +12 -2
  79. package/build/types/desktop/cmp/rest/RestGrid.d.ts +10 -0
  80. package/build/types/desktop/cmp/rest/RestGridModel.d.ts +9 -1
  81. package/build/types/desktop/cmp/toolbar/Toolbar.d.ts +4 -1
  82. package/build/types/format/FormatDate.d.ts +4 -4
  83. package/build/types/icon/Icon.d.ts +3 -0
  84. package/build/types/kit/blueprint/Wrappers.d.ts +12 -1
  85. package/build/types/mobile/cmp/navigator/NavigatorModel.d.ts +8 -0
  86. package/build/types/mobile/cmp/navigator/PageModel.d.ts +7 -0
  87. package/build/types/mobile/cmp/panel/DialogPanel.d.ts +0 -2
  88. package/build/types/security/BaseOAuthClient.d.ts +9 -0
  89. package/build/types/security/authzero/AuthZeroClient.d.ts +6 -0
  90. package/build/types/security/msal/MsalClient.d.ts +6 -0
  91. package/build/types/svc/FetchService.d.ts +10 -7
  92. package/build/types/svc/TraceService.d.ts +17 -2
  93. package/build/types/utils/async/Timer.d.ts +6 -0
  94. package/build/types/utils/js/LangUtils.d.ts +1 -1
  95. package/build/types/utils/js/TestUtils.d.ts +1 -1
  96. package/build/types/utils/react/index.d.ts +0 -1
  97. package/build/types/utils/telemetry/Span.d.ts +12 -2
  98. package/cmp/ag-grid/AgGrid.ts +8 -19
  99. package/cmp/ag-grid/AgGridModel.ts +18 -5
  100. package/cmp/card/Card.ts +9 -4
  101. package/cmp/card/CardModel.ts +15 -2
  102. package/cmp/chart/Chart.ts +2 -2
  103. package/cmp/chart/ChartModel.ts +11 -1
  104. package/cmp/dataview/DataView.ts +4 -2
  105. package/cmp/dataview/DataViewModel.ts +16 -4
  106. package/cmp/filter/FilterChooserModel.ts +7 -1
  107. package/cmp/form/Form.ts +2 -1
  108. package/cmp/form/FormModel.ts +12 -0
  109. package/cmp/form/README.md +13 -0
  110. package/cmp/form/field/BaseFieldModel.ts +7 -0
  111. package/cmp/form/formfieldset/FormFieldSetModel.ts +7 -1
  112. package/cmp/grid/Grid.scss +14 -8
  113. package/cmp/grid/GridModel.ts +16 -1
  114. package/cmp/grid/GridSorter.ts +14 -0
  115. package/cmp/grid/README.md +12 -0
  116. package/cmp/grid/Types.ts +18 -0
  117. package/cmp/grid/columns/Column.ts +40 -2
  118. package/cmp/grid/columns/ColumnGroup.ts +10 -0
  119. package/cmp/grouping/GroupingChooserModel.ts +9 -2
  120. package/cmp/layout/Box.ts +19 -7
  121. package/cmp/layout/Frame.ts +17 -5
  122. package/cmp/layout/README.md +16 -21
  123. package/cmp/loadingindicator/LoadingIndicator.scss +1 -1
  124. package/cmp/loadingindicator/LoadingIndicator.ts +11 -9
  125. package/cmp/pinpad/PinPadModel.ts +6 -1
  126. package/cmp/spinner/Spinner.scss +13 -0
  127. package/cmp/spinner/Spinner.ts +58 -20
  128. package/cmp/tab/TabContainerModel.ts +11 -0
  129. package/cmp/tab/TabModel.ts +7 -0
  130. package/cmp/tab/Types.ts +4 -0
  131. package/cmp/treemap/TreeMapModel.ts +3 -3
  132. package/cmp/viewmanager/ViewManagerModel.ts +9 -0
  133. package/cmp/zoneGrid/ZoneGridModel.ts +22 -3
  134. package/cmp/zoneGrid/impl/ZoneMapperModel.ts +6 -0
  135. package/core/ExceptionHandler.ts +1 -1
  136. package/core/HoistComponent.ts +36 -11
  137. package/core/HoistProps.ts +9 -3
  138. package/core/README.md +68 -6
  139. package/core/impl/InstanceManager.ts +1 -0
  140. package/core/load/LoadSpec.ts +1 -1
  141. package/core/persist/provider/ViewManagerProvider.ts +7 -0
  142. package/data/README.md +48 -124
  143. package/data/Store.ts +35 -1
  144. package/data/StoreSelectionModel.ts +18 -2
  145. package/data/cube/Cube.ts +26 -6
  146. package/data/cube/Query.ts +10 -0
  147. package/data/cube/README.md +236 -0
  148. package/data/cube/View.ts +21 -2
  149. package/data/cube/aggregate/Aggregator.ts +13 -0
  150. package/data/cube/aggregate/AverageAggregator.ts +1 -0
  151. package/data/cube/aggregate/AverageStrictAggregator.ts +1 -0
  152. package/data/cube/aggregate/ChildCountAggregator.ts +1 -0
  153. package/data/cube/aggregate/LeafCountAggregator.ts +1 -0
  154. package/data/cube/aggregate/MaxAggregator.ts +1 -0
  155. package/data/cube/aggregate/MinAggregator.ts +1 -0
  156. package/data/cube/aggregate/NullAggregator.ts +1 -0
  157. package/data/cube/aggregate/SingleAggregator.ts +1 -0
  158. package/data/cube/aggregate/SumAggregator.ts +1 -0
  159. package/data/cube/aggregate/SumStrictAggregator.ts +1 -0
  160. package/data/cube/aggregate/UniqueAggregator.ts +1 -0
  161. package/data/filter/BaseFilterFieldSpec.ts +9 -0
  162. package/data/filter/Types.ts +12 -0
  163. package/desktop/README.md +131 -9
  164. package/desktop/appcontainer/AboutDialog.ts +2 -0
  165. package/desktop/appcontainer/Banner.ts +5 -2
  166. package/desktop/appcontainer/ChangelogDialog.ts +1 -0
  167. package/desktop/appcontainer/ExceptionDialog.ts +4 -0
  168. package/desktop/appcontainer/ExceptionDialogDetails.ts +4 -1
  169. package/desktop/appcontainer/FeedbackDialog.ts +4 -1
  170. package/desktop/appcontainer/ImpersonationBar.ts +4 -0
  171. package/desktop/appcontainer/LockoutPanel.ts +4 -1
  172. package/desktop/appcontainer/LoginPanel.ts +7 -3
  173. package/desktop/appcontainer/Message.ts +9 -3
  174. package/desktop/appcontainer/OptionsDialog.ts +3 -1
  175. package/desktop/appcontainer/VersionBar.ts +1 -0
  176. package/desktop/appcontainer/suspend/IdlePanel.ts +4 -4
  177. package/desktop/appcontainer/suspend/SuspendPanel.ts +3 -0
  178. package/desktop/cmp/button/AppMenuButton.ts +5 -0
  179. package/desktop/cmp/button/Button.ts +14 -4
  180. package/desktop/cmp/dash/README.md +14 -0
  181. package/desktop/cmp/dash/canvas/DashCanvasModel.ts +12 -3
  182. package/desktop/cmp/dash/container/DashContainerModel.ts +9 -0
  183. package/desktop/cmp/dock/DockViewModel.ts +7 -0
  184. package/desktop/cmp/filechooser/FileChooserModel.ts +9 -2
  185. package/desktop/cmp/grid/editors/BooleanEditor.ts +1 -0
  186. package/desktop/cmp/grid/editors/DateEditor.ts +1 -0
  187. package/desktop/cmp/grid/editors/NumberEditor.ts +1 -0
  188. package/desktop/cmp/grid/editors/SelectEditor.ts +1 -0
  189. package/desktop/cmp/grid/editors/TextAreaEditor.ts +1 -0
  190. package/desktop/cmp/grid/editors/TextEditor.ts +1 -0
  191. package/desktop/cmp/input/Picker.ts +2 -2
  192. package/desktop/cmp/input/SegmentedControl.ts +20 -2
  193. package/desktop/cmp/leftrightchooser/LeftRightChooserModel.ts +7 -0
  194. package/desktop/cmp/modalsupport/ModalSupportModel.ts +31 -2
  195. package/desktop/cmp/panel/Panel.ts +29 -21
  196. package/desktop/cmp/panel/PanelModel.ts +12 -2
  197. package/desktop/cmp/panel/README.md +20 -0
  198. package/desktop/cmp/rest/RestGrid.ts +10 -0
  199. package/desktop/cmp/rest/RestGridModel.ts +9 -1
  200. package/desktop/cmp/toolbar/Toolbar.ts +9 -2
  201. package/desktop/cmp/viewmanager/ViewManager.ts +1 -1
  202. package/docs/README.md +9 -4
  203. package/docs/coding-conventions.md +29 -21
  204. package/docs/doc-registry.json +31 -15
  205. package/docs/planning/docs-roadmap-log.md +11 -0
  206. package/docs/planning/docs-roadmap.md +1 -0
  207. package/docs/upgrade-notes/v84-upgrade-notes.md +136 -0
  208. package/docs/version-compatibility.md +2 -0
  209. package/format/FormatDate.ts +4 -4
  210. package/icon/Icon.ts +9 -0
  211. package/icon/README.md +62 -22
  212. package/icon/index.ts +24 -0
  213. package/kit/README.md +8 -2
  214. package/kit/blueprint/Wrappers.ts +12 -1
  215. package/mcp/README.md +47 -26
  216. package/mcp/cli/ts.ts +39 -4
  217. package/mcp/data/ts-registry.ts +57 -17
  218. package/mcp/tools/typescript.ts +32 -4
  219. package/mobile/appcontainer/AboutDialog.ts +3 -0
  220. package/mobile/appcontainer/Banner.ts +2 -0
  221. package/mobile/appcontainer/ExceptionDialog.ts +4 -0
  222. package/mobile/appcontainer/ExceptionDialogDetails.ts +1 -0
  223. package/mobile/appcontainer/FeedbackDialog.ts +4 -1
  224. package/mobile/appcontainer/ImpersonationBar.ts +2 -0
  225. package/mobile/appcontainer/LockoutPanel.ts +2 -0
  226. package/mobile/appcontainer/LoginPanel.ts +7 -3
  227. package/mobile/appcontainer/Message.ts +9 -3
  228. package/mobile/appcontainer/OptionsDialog.ts +5 -1
  229. package/mobile/appcontainer/VersionBar.ts +1 -0
  230. package/mobile/appcontainer/suspend/IdlePanel.ts +5 -6
  231. package/mobile/appcontainer/suspend/SuspendPanel.ts +3 -0
  232. package/mobile/cmp/navigator/NavigatorModel.ts +8 -0
  233. package/mobile/cmp/navigator/PageModel.ts +7 -0
  234. package/mobile/cmp/panel/DialogPanel.ts +0 -2
  235. package/package.json +11 -11
  236. package/security/BaseOAuthClient.ts +9 -0
  237. package/security/authzero/AuthZeroClient.ts +6 -0
  238. package/security/msal/MsalClient.ts +6 -0
  239. package/styles/vars.scss +14 -0
  240. package/svc/FetchService.ts +25 -15
  241. package/svc/README.md +39 -9
  242. package/svc/TraceService.ts +69 -11
  243. package/utils/README.md +0 -1
  244. package/utils/async/Timer.ts +6 -0
  245. package/utils/js/LangUtils.ts +1 -1
  246. package/utils/js/TestUtils.ts +1 -1
  247. package/utils/react/index.ts +0 -1
  248. package/utils/telemetry/Span.ts +21 -4
  249. package/build/types/utils/react/ClassName.d.ts +0 -14
  250. package/utils/react/ClassName.ts +0 -24
@@ -10,6 +10,16 @@ import { GridAutosizeOptions } from './GridAutosizeOptions';
10
10
  import { GridContextMenuItemLike, GridContextMenuSpec } from './GridContextMenu';
11
11
  import { GridSorter, GridSorterLike } from './GridSorter';
12
12
  import { ColChooserConfig, ColumnState, GridModelPersistOptions, GroupRowRenderer, RowClassFn, RowClassRuleFn } from './Types';
13
+ /**
14
+ * Configuration for a {@link GridModel} - the primary model backing the Hoist Grid component.
15
+ *
16
+ * At minimum, provide `columns` (an array of {@link ColumnSpec} or {@link ColumnGroupSpec}
17
+ * objects). A {@link Store} can be provided or will be auto-created with fields inferred
18
+ * from the column configs. Use `colDefaults` to apply shared settings across all columns.
19
+ *
20
+ * @see GridModel
21
+ * @see ColumnSpec
22
+ */
13
23
  export interface GridConfig {
14
24
  /** Columns for this grid. */
15
25
  columns?: ColumnOrGroupSpec[];
@@ -246,7 +256,7 @@ export interface GridModelDefaults {
246
256
  treeStyle?: TreeStyle;
247
257
  }
248
258
  /**
249
- * Core Model for a Grid, specifying the grid's data store, column definitions,
259
+ * Core Model for a {@link Grid}, specifying the grid's data store, column definitions,
250
260
  * sorting/grouping/selection state, and context menu configuration.
251
261
  *
252
262
  * This is the primary application entry-point for specifying Grid component options and behavior.
@@ -257,6 +267,11 @@ export interface GridModelDefaults {
257
267
  * 3) Include a single column with `isTreeColumn: true`. This column will provide expand /
258
268
  * collapse controls and indent child columns in addition to displaying its own data.
259
269
  *
270
+ * See the grid package README (`cmp/grid/README.md`) for full documentation including column
271
+ * configuration, renderers, filtering, sorting, and common pitfalls.
272
+ *
273
+ * @see Grid
274
+ * @see DataView
260
275
  */
261
276
  export declare class GridModel extends HoistModel {
262
277
  /** App-level defaults for GridModel. Instance config takes precedence. */
@@ -1,9 +1,23 @@
1
1
  export type GridSorterLike = GridSorterSpec | string | GridSorter;
2
+ /**
3
+ * Plain-object form of a {@link GridSorter}, specifying a column sort direction.
4
+ *
5
+ * Accepted by {@link GridModel.sortBy} alongside pipe-delimited strings and GridSorter
6
+ * instances. The framework parses these into immutable GridSorter objects automatically.
7
+ */
2
8
  export interface GridSorterSpec {
3
9
  colId: string;
4
10
  sort?: 'asc' | 'desc' | 'ASC' | 'DESC';
11
+ /** True to sort by absolute value, ignoring sign. */
5
12
  abs?: boolean;
6
13
  }
14
+ /**
15
+ * Immutable value object representing a sort specification for a single grid column.
16
+ *
17
+ * Applications typically don't need to construct these directly - pass `GridSorterSpec` objects
18
+ * or pipe-delimited strings to {@link GridModel.sortBy} and the framework will parse them
19
+ * automatically.
20
+ */
7
21
  export declare class GridSorter {
8
22
  readonly colId: string;
9
23
  readonly sort: 'asc' | 'desc';
@@ -55,6 +55,13 @@ export interface GridModelPersistOptions extends PersistOptions {
55
55
  /** True (default) to include expanded level state or provide expanded level-specific PersistOptions. */
56
56
  persistExpandToLevel?: boolean | PersistOptions;
57
57
  }
58
+ /**
59
+ * Configuration for a {@link GridFilterModel} - the model powering column-header filter menus.
60
+ * Passed via the `filterModel` config on {@link GridConfig}.
61
+ *
62
+ * @see GridFilterModel
63
+ * @see GridFilterFieldSpec
64
+ */
58
65
  export interface GridFilterModelConfig {
59
66
  /**
60
67
  * Target (typically a {@link Store} or Cube {@link View}) to be filtered as column filters
@@ -94,6 +101,13 @@ export interface GridFilterBindTarget extends FilterBindTarget, FilterValueSourc
94
101
  * @returns the formatted value for display.
95
102
  */
96
103
  export type GroupRowRenderer = (context: ICellRendererParams) => ReactNode;
104
+ /**
105
+ * Configuration for a {@link ColChooserModel} - the model backing the grid column chooser UI.
106
+ * Passed via the `colChooserModel` config on {@link GridConfig}, or set app-wide via
107
+ * `GridModel.defaults.colChooserModel`.
108
+ *
109
+ * @see ColChooserModel
110
+ */
97
111
  export interface ColChooserConfig {
98
112
  /** GridModel to bind to. Not required if creating via `GridModel.colChooserModel` */
99
113
  gridModel?: GridModel;
@@ -283,6 +297,10 @@ export type ColumnGetValueFn<T = any> = (params: {
283
297
  column: Column;
284
298
  gridModel: GridModel;
285
299
  }) => T;
300
+ /**
301
+ * Entry within a {@link ColumnSpec.sortingOrder} array, defining one step in the sort cycle
302
+ * applied by successive clicks on a column header.
303
+ */
286
304
  export interface ColumnSortSpec {
287
305
  /** Direction to sort, either 'asc' or 'desc', or null to remove sort. */
288
306
  sort: 'asc' | 'desc' | null;
@@ -4,6 +4,17 @@ import { FunctionComponent, ReactNode } from 'react';
4
4
  import { GridModel } from '../GridModel';
5
5
  import { ColumnCellClassFn, ColumnCellClassRuleFn, ColumnComparator, ColumnEditableFn, ColumnEditorFn, ColumnEditorProps, ColumnExcelFormatFn, ColumnExportValueFn, ColumnGetValueFn, ColumnHeaderClassFn, ColumnHeaderNameFn, ColumnRenderer, ColumnSetValueFn, ColumnSortSpec, ColumnSortValueFn, ColumnTooltipFn } from '../Types';
6
6
  import type { ColDef, CellClickedEvent } from '@xh/hoist/kit/ag-grid';
7
+ /**
8
+ * Configuration object for defining a {@link Column} within a {@link GridModel}.
9
+ *
10
+ * Passed as plain objects in the `columns` array of a {@link GridConfig}. Each spec must
11
+ * identify its data via `field` (and/or `colId`). All other properties are optional and
12
+ * have sensible defaults - many are derived from the corresponding {@link Field} definition
13
+ * on the grid's store when available (e.g. `displayName`, `align`, `sortingOrder`).
14
+ *
15
+ * @see Column
16
+ * @see GridModel
17
+ */
7
18
  export interface ColumnSpec {
8
19
  /**
9
20
  * Name of data store field to display within the column, or object containing properties
@@ -138,7 +149,20 @@ export interface ColumnSpec {
138
149
  * ensuring it's visible while horizontally scrolling.
139
150
  */
140
151
  pinned?: boolean | HSide;
141
- /** Function returning a React Element for each cell value in this Column.*/
152
+ /**
153
+ * Function returning a React Element for each cell value in this Column.
154
+ *
155
+ * For number and date formatting, prefer the pre-built `numberRenderer` and `dateRenderer`
156
+ * factories from `@xh/hoist/format` - these accept formatting options and return a reusable
157
+ * renderer function. Also consider the pre-built column specs (`number`, `date`, `dateTime`,
158
+ * `boolCheck` from `@xh/hoist/cmp/grid`) which bundle a renderer with appropriate alignment,
159
+ * sorting, and export formatting.
160
+ *
161
+ * For custom rendering based on record data beyond this column's field, set
162
+ * `rendererIsComplex: true` to ensure cells refresh on any record change.
163
+ *
164
+ * See the grid package README (`cmp/grid/README.md`) for renderer patterns and examples.
165
+ */
142
166
  renderer?: ColumnRenderer;
143
167
  /**
144
168
  * True if this renderer relies on more than just the value of the field associated with this
@@ -271,7 +295,21 @@ export interface ColumnSpec {
271
295
  }
272
296
  /**
273
297
  * Cross-platform definition and API for a standardized Grid column.
274
- * Provided to GridModels as plain configuration objects.
298
+ *
299
+ * Columns are defined as plain {@link ColumnSpec} objects within the `columns` array of a
300
+ * {@link GridConfig} - they are never constructed directly. GridModel also supports
301
+ * `colDefaults` for shared config applied to all columns, and `GridModel.defaults.colDefaults`
302
+ * for app-wide column defaults. Columns can be nested within {@link ColumnGroup}s for
303
+ * multi-level headers.
304
+ *
305
+ * Every column must resolve to a unique `colId`, which defaults to `field` when not set.
306
+ * If two columns reference the same `field`, provide an explicit `colId` on one of them.
307
+ *
308
+ * See {@link ColumnSpec} for all available configuration properties, and the grid package
309
+ * README (`cmp/grid/README.md`) for full configuration guidance, renderer patterns, and pitfalls.
310
+ *
311
+ * @see GridModel
312
+ * @see ColumnGroup
275
313
  */
276
314
  export declare class Column {
277
315
  static DEFAULT_WIDTH: number;
@@ -4,6 +4,16 @@ import { ReactNode } from 'react';
4
4
  import { GridModel } from '../GridModel';
5
5
  import { ColumnHeaderClassFn, ColumnHeaderNameFn, ColumnOrGroup } from '../Types';
6
6
  import { Column, ColumnSpec } from './Column';
7
+ /**
8
+ * Configuration for a {@link ColumnGroup} - a hierarchical grouping of columns that renders
9
+ * as a multi-level header in the grid. Nest {@link ColumnSpec} and/or additional
10
+ * ColumnGroupSpec objects within `children`.
11
+ *
12
+ * The `groupId` must be unique across the grid, defaulting to `headerName` when not set.
13
+ *
14
+ * @see ColumnGroup
15
+ * @see ColumnSpec
16
+ */
7
17
  export interface ColumnGroupSpec {
8
18
  /** Column or ColumnGroup configs for children of this group.*/
9
19
  children: Array<ColumnGroupSpec | ColumnSpec>;
@@ -1,6 +1,13 @@
1
1
  import { HoistModel, PersistOptions } from '@xh/hoist/core';
2
2
  import type { GridModel } from '@xh/hoist/cmp/grid';
3
3
  import { View } from '@xh/hoist/data';
4
+ /**
5
+ * Configuration for a {@link GroupingChooserModel} - a control for selecting multi-level
6
+ * dimension groupings, typically bound to a Cube {@link View} or {@link GridModel}.
7
+ *
8
+ * @see GroupingChooserModel
9
+ * @see DimensionSpec
10
+ */
4
11
  export interface GroupingChooserConfig {
5
12
  /** True to accept an empty list as a valid value. */
6
13
  allowEmpty?: boolean;
@@ -9,7 +16,7 @@ export interface GroupingChooserConfig {
9
16
  * should be automatically applied as it changes. When bound to a GridModel, calls
10
17
  * `setGroupBy()`; when bound to a View, calls `updateQuery({dimensions: ...})`.
11
18
  *
12
- * This is a two-way binding changes to the target's value are reflected back into
19
+ * This is a two-way binding - changes to the target's value are reflected back into
13
20
  * the GroupingChooserModel automatically.
14
21
  */
15
22
  bind?: GroupingBindTarget;
@@ -72,7 +79,7 @@ export type GroupingBindTarget = GridModel | View;
72
79
  *
73
80
  * Manages the current dimension selection, available dimensions, user-managed favorites, and
74
81
  * drag-and-drop reordering. Supports bidirectional binding to a {@link GridModel} or Cube
75
- * {@link View} via the `bind` config grouping changes are automatically applied to the
82
+ * {@link View} via the `bind` config - grouping changes are automatically applied to the
76
83
  * target, and external changes to the target are reflected back into this model.
77
84
  *
78
85
  * Dimensions can be auto-populated from the bind target or specified explicitly. When binding
@@ -1,16 +1,28 @@
1
1
  import { BoxProps, HoistProps } from '@xh/hoist/core';
2
+ /**
3
+ * Props for {@link Box}, {@link VBox}, and {@link HBox} layout containers.
4
+ * Combines {@link HoistProps} with {@link BoxProps} (layout attributes resolved to CSS styles).
5
+ */
2
6
  export interface BoxComponentProps extends HoistProps, BoxProps {
3
7
  }
4
8
  /**
5
- * A Component that supports flexbox-based layout of its contents.
6
- *
7
- * Box is the component that provides the core implementation of the LayoutSupport mixin.
8
- * It renders a div and merges all layout props to that div's `style` property.
9
- *
10
- * Access to the internal div is provided via a ref argument.
9
+ * Base flexbox container that merges all {@link LayoutProps} - margin, padding, dimensions,
10
+ * flex, alignment, and overflow - onto a rendered `div`. This is the terminal component where
11
+ * layout props are resolved to CSS; higher-level components pass layout props through to a
12
+ * Box (or {@link Frame}) at the bottom of their render tree.
11
13
  *
12
- * VBox and HBox variants support internal vertical (column) and horizontal (row) flex layouts.
14
+ * **Application code should generally prefer {@link VBox} or {@link HBox}**, which make layout
15
+ * direction explicit. Bare `box()` applies `display: flex` with the CSS default direction (row)
16
+ * but does not communicate that intent clearly.
13
17
  */
14
18
  export declare const Box: import("react").FC<BoxComponentProps>, box: import("@xh/hoist/core").ElementFactory<BoxComponentProps>;
19
+ /**
20
+ * A {@link Box} with vertical (column) flex layout. Does not stretch to fill its parent -
21
+ * use {@link VFrame} instead when the container should grow to consume available space.
22
+ */
15
23
  export declare const VBox: import("react").FC<BoxComponentProps>, vbox: import("@xh/hoist/core").ElementFactory<BoxComponentProps>;
24
+ /**
25
+ * A {@link Box} with horizontal (row) flex layout. Does not stretch to fill its parent -
26
+ * use {@link HFrame} instead when the container should grow to consume available space.
27
+ */
16
28
  export declare const HBox: import("react").FC<BoxComponentProps>, hbox: import("@xh/hoist/core").ElementFactory<BoxComponentProps>;
@@ -1,14 +1,26 @@
1
1
  import { BoxProps, HoistProps } from '@xh/hoist/core';
2
+ /**
3
+ * Props for {@link Frame}, {@link VFrame}, and {@link HFrame} layout containers.
4
+ * Combines {@link HoistProps} with {@link BoxProps} (layout attributes resolved to CSS styles).
5
+ */
2
6
  export interface FrameProps extends HoistProps, BoxProps {
3
7
  }
4
8
  /**
5
- * A Box class that flexes to grow and stretch within its *own* parent via flex:'auto', useful for
6
- * creating nested layouts.
9
+ * A {@link Box} that stretches to fill its parent via `flex: auto`. Like Box, it supports
10
+ * all {@link LayoutProps} and merges them onto its rendered `div`.
7
11
  *
8
- * Like Box, Frame provides access to its internal div via a ref argument.
9
- *
10
- * VFrame and HFrame variants support internal vertical (column) and horizontal (row) flex layouts.
12
+ * **Application code should generally prefer {@link VFrame} or {@link HFrame}**, which make
13
+ * layout direction explicit. Bare `frame()` inherits the CSS default direction (row) but does
14
+ * not communicate that intent clearly.
11
15
  */
12
16
  export declare const Frame: import("react").FC<FrameProps>, frame: import("@xh/hoist/core").ElementFactory<FrameProps>;
17
+ /**
18
+ * A {@link Frame} with vertical (column) flex layout. Stretches to fill its parent via
19
+ * `flex: auto` - use {@link VBox} instead when the container should size to its content.
20
+ */
13
21
  export declare const VFrame: import("react").FC<FrameProps>, vframe: import("@xh/hoist/core").ElementFactory<FrameProps>;
22
+ /**
23
+ * A {@link Frame} with horizontal (row) flex layout. Stretches to fill its parent via
24
+ * `flex: auto` - use {@link HBox} instead when the container should size to its content.
25
+ */
14
26
  export declare const HFrame: import("react").FC<FrameProps>, hframe: import("@xh/hoist/core").ElementFactory<FrameProps>;
@@ -1,5 +1,7 @@
1
+ import { SpinnerProps } from '@xh/hoist/cmp/spinner';
1
2
  import { Corner, HoistProps, Some, TaskObserver } from '@xh/hoist/core';
2
3
  import './LoadingIndicator.scss';
4
+ import { ReactNode } from 'react';
3
5
  export interface LoadingIndicatorProps extends HoistProps {
4
6
  /** TaskObserver(s) that should be monitored to determine if the Indicator should be displayed. */
5
7
  bind?: Some<TaskObserver>;
@@ -7,12 +9,12 @@ export interface LoadingIndicatorProps extends HoistProps {
7
9
  corner?: Corner;
8
10
  /** True to display the indicator. */
9
11
  isDisplayed?: boolean;
10
- /** Max characters allowed in message, after which it will be elided. Default 30. */
12
+ /** Max characters allowed in a String message, after which it will be elided. Default 30. */
11
13
  maxMessageLength?: number;
12
14
  /** Optional text to be displayed - can also be sourced from bound TaskObserver. */
13
- message?: string;
14
- /** True (default) to display with an animated spinner. */
15
- spinner?: boolean;
15
+ message?: ReactNode;
16
+ /** True (default) to display with an animated spinner, or SpinnerProps to customize. */
17
+ spinner?: boolean | Omit<SpinnerProps, 'compact'>;
16
18
  }
17
19
  /**
18
20
  * A minimal / unobtrusive LoadingIndicator displaying an optional spinner and/or message to signal
@@ -1,4 +1,9 @@
1
1
  import { HoistModel } from '@xh/hoist/core';
2
+ /**
3
+ * Configuration for a {@link PinPadModel} - a numeric keypad for collecting a PIN.
4
+ *
5
+ * @see PinPadModel
6
+ */
2
7
  export interface PinPadConfig {
3
8
  /** The length of the PIN to get from the user, default 4. */
4
9
  pinLength?: number;
@@ -6,7 +11,7 @@ export interface PinPadConfig {
6
11
  subHeaderText?: string;
7
12
  }
8
13
  /**
9
- * Model for a PinPad a numeric keypad prompt for collecting a PIN from the user.
14
+ * Model for a PinPad - a numeric keypad prompt for collecting a PIN from the user.
10
15
  *
11
16
  * Tracks entered digits, validates PIN completion, and provides observable `value` and
12
17
  * `isComplete` getters. Supports configurable PIN length and custom header/subheader text.
@@ -1,16 +1,37 @@
1
+ import { IconName } from '@fortawesome/fontawesome-svg-core';
1
2
  import { HoistProps } from '@xh/hoist/core';
2
- import { ImgHTMLAttributes } from 'react';
3
- export interface SpinnerProps extends HoistProps, ImgHTMLAttributes<HTMLImageElement> {
4
- /** True to return a smaller 20px image vs default 50px. */
3
+ import { HoistIconPrefix } from '@xh/hoist/icon';
4
+ import './Spinner.scss';
5
+ export interface SpinnerDefaults {
6
+ iconName?: IconName;
7
+ prefix?: HoistIconPrefix;
8
+ usePng?: boolean;
9
+ }
10
+ export interface SpinnerProps extends HoistProps {
11
+ /** True to return a smaller spinner suitable for inline/compact use. */
5
12
  compact?: boolean;
13
+ /** FA icon name to use. Default set via `Spinner.defaults.iconName`. */
14
+ iconName?: IconName;
15
+ /** FA icon prefix/weight. Default set via `Spinner.defaults.prefix`. */
16
+ prefix?: HoistIconPrefix;
17
+ /** True to use legacy animated PNG images. Default set via `Spinner.defaults.usePng`. */
18
+ usePng?: boolean;
6
19
  }
7
20
  /**
8
- * Returns an img-based spinner in one of two sizes - default 50px spinner or smaller 20px spinner
9
- * when `compact: true`. Used for the platform-specific `Mask` and `LoadingIndicator` components.
21
+ * An animated spinner rendered via a FontAwesome icon with a CSS rotation animation. Used for
22
+ * the platform-specific `Mask` and `LoadingIndicator` components.
23
+ *
24
+ * The rotation animation is applied via CSS on the `.xh-spinner` class rather than FA's
25
+ * animation props, ensuring the spinner remains functional when the OS-level
26
+ * `prefers-reduced-motion` preference is enabled (FA disables all its animations in that case).
27
+ *
28
+ * The icon and legacy PNG fallback can be configured per-instance via props or globally via
29
+ * `Spinner.defaults` (e.g. in app Bootstrap.ts):
10
30
  *
11
- * Note that the source images are animated PNGs generated via https://loading.io. These are used
12
- * in place of SVG-based options to reduce rendering overhead, especially when accessing an app
13
- * via a remote desktop technology such as Citrix (where the spinners bundled with e.g. Blueprint
14
- * were observed to cause unpredictable and unexpectedly severe performance issues).
31
+ * ```ts
32
+ * Spinner.defaults.iconName = 'circle-notch';
33
+ * Spinner.defaults.prefix = 'far';
34
+ * Spinner.defaults.usePng = true; // fall back to animated PNG
35
+ * ```
15
36
  */
16
- export declare const Spinner: import("react").FC<SpinnerProps>, spinner: import("@xh/hoist/core").ElementFactory<SpinnerProps>;
37
+ export declare const Spinner: any, spinner: import("@xh/hoist/core").ElementFactory<SpinnerProps>;
@@ -2,6 +2,14 @@ import type { TabSwitcherConfig, IDynamicTabSwitcherModel, TabContainerModelPers
2
2
  import { HoistModel, RefreshContextModel, RefreshMode, RenderMode } from '@xh/hoist/core';
3
3
  import { ReactNode } from 'react';
4
4
  import { TabConfig, TabModel } from './TabModel';
5
+ /**
6
+ * Configuration for a {@link TabContainerModel} - the primary tabbed navigation container
7
+ * in Hoist. Supports routing, lazy rendering/refresh strategies, and optional persistence
8
+ * of the active tab.
9
+ *
10
+ * @see TabContainerModel
11
+ * @see TabConfig
12
+ */
5
13
  export interface TabContainerConfig {
6
14
  /** Tabs to be displayed. */
7
15
  tabs: TabConfig[];
@@ -57,6 +65,9 @@ export interface TabContainerConfig {
57
65
  * unmounting of inactive tabs, and customizable refreshing of tabs via a built-in RefreshContextModel.
58
66
  *
59
67
  * Note: Routing is currently enabled for desktop applications only.
68
+ *
69
+ * See the tab package README (`cmp/tab/README.md`) for render/refresh mode options, routing
70
+ * configuration, and usage patterns.
60
71
  */
61
72
  export declare class TabContainerModel extends HoistModel {
62
73
  config: TabContainerConfig;
@@ -1,6 +1,13 @@
1
1
  import { HoistModel, RefreshMode, RenderMode, Content, RefreshContextModel, Thunkable } from '@xh/hoist/core';
2
2
  import { TabContainerConfig, TabContainerModel } from '@xh/hoist/cmp/tab';
3
3
  import { ReactElement, ReactNode } from 'react';
4
+ /**
5
+ * Configuration for a {@link TabModel} - a single tab within a {@link TabContainerModel}.
6
+ * Passed as entries in the `tabs` array of a {@link TabContainerConfig}.
7
+ *
8
+ * @see TabModel
9
+ * @see TabContainerConfig
10
+ */
4
11
  export interface TabConfig {
5
12
  /** Unique ID, used by container for locating tabs and generating routes. */
6
13
  id: string;
@@ -21,6 +21,10 @@ export interface TabSwitcherProps extends HoistProps<TabContainerModel>, BoxProp
21
21
  /** Maximum width (in px) to render tabs. Only applies to horizontal orientations */
22
22
  tabMaxWidth?: number;
23
23
  }
24
+ /**
25
+ * Configuration for the tab switcher UI within a {@link TabContainerModel}. Passed via the
26
+ * `switcher` config on {@link TabContainerConfig}.
27
+ */
24
28
  export interface TabSwitcherConfig {
25
29
  /** Specification for type of switcher. Specify `dynamic`for user-configurable tabs */
26
30
  mode: 'static' | 'dynamic';
@@ -76,9 +76,9 @@ export interface TreeMapModelDefaults {
76
76
  *
77
77
  * Node colors are normalized to a 0-1 range and mapped to a colorAxis. The `colorMode` config
78
78
  * controls how:
79
- * - 'linear' distributes values across the colorAxis according to the heatField.
80
- * - 'wash' ignores heat intensity, applying a single positive/negative color.
81
- * - 'none' ignores the colorAxis entirely, using the neutral color.
79
+ * - 'linear' - distributes values across the colorAxis according to the heatField.
80
+ * - 'wash' - ignores heat intensity, applying a single positive/negative color.
81
+ * - 'none' - ignores the colorAxis entirely, using the neutral color.
82
82
  *
83
83
  * Color customization can be managed by setting colorAxis stops via `highchartsConfig`.
84
84
  * See {@link https://www.highcharts.com/docs/chart-and-series-types/treemap} for Highcharts
@@ -18,6 +18,12 @@ export interface ViewUserState {
18
18
  userPinned: Record<string, boolean>;
19
19
  autoSave: boolean;
20
20
  }
21
+ /**
22
+ * Configuration for a {@link ViewManagerModel} - persists and manages named user views
23
+ * (saved configurations) for grids, dashboards, or other stateful components.
24
+ *
25
+ * @see ViewManagerModel
26
+ */
21
27
  export interface ViewManagerConfig {
22
28
  /**
23
29
  * Required discriminator for the particular class of views to be loaded and managed by this
@@ -109,6 +115,9 @@ export interface ViewManagerConfig {
109
115
  * - Views can be private to their owner, or optionally enabled for sharing to (all) other users.
110
116
  * - Views can be marked as pinned for quick access.
111
117
  * - See the desktop {@link ViewManager} component - the initial Hoist UI for this model.
118
+ *
119
+ * See the view manager package README (`cmp/viewmanager/README.md`) for architecture,
120
+ * integration patterns, and access control configuration.
112
121
  */
113
122
  export declare class ViewManagerModel<T = PlainObject> extends HoistModel {
114
123
  /**
@@ -5,6 +5,14 @@ import { RecordAction, Store, StoreConfig, StoreRecordOrId, StoreSelectionConfig
5
5
  import { ReactNode } from 'react';
6
6
  import { ZoneMapperConfig, ZoneMapperModel } from './impl/ZoneMapperModel';
7
7
  import { Zone, ZoneGridModelPersistOptions, ZoneLimit, ZoneMapping } from './Types';
8
+ /**
9
+ * Configuration for a {@link ZoneGridModel} - a card-style grid that arranges column data
10
+ * into four zones (top-left, top-right, bottom-left, bottom-right) within each row.
11
+ * Provide `columns` and `mappings` to define which fields appear in each zone.
12
+ *
13
+ * @see ZoneGridModel
14
+ * @see ZoneMapperConfig
15
+ */
8
16
  export interface ZoneGridConfig {
9
17
  /**
10
18
  * Available columns for this grid. Columns with an omit property evaluating to true will be
@@ -192,10 +200,21 @@ export interface ZoneGridConfig {
192
200
  xhImpl?: boolean;
193
201
  }
194
202
  /**
195
- * ZoneGridModel is a wrapper around GridModel, which shows date in a grid with multi-line
196
- * full-width rows, each broken into four zones for top/bottom and left/right.
203
+ * Model for a ZoneGrid - a card-style grid that renders each row as a full-width block
204
+ * divided into four zones: top-left, top-right, bottom-left, and bottom-right. Built on
205
+ * {@link GridModel} internally.
206
+ *
207
+ * Use ZoneGrid when you want a structured multi-field card layout per row without writing
208
+ * a fully custom renderer. Especially well-suited for mobile or other space-constrained
209
+ * contexts where horizontal scrolling is undesirable but four or more user-configurable
210
+ * fields need to be visible per row. The `mappings` config controls which columns appear
211
+ * in each zone, and users can rearrange them via the optional ZoneMapper UI.
212
+ *
213
+ * For a standard column-based grid, use {@link GridModel}. For fully custom row rendering,
214
+ * use {@link DataViewModel}.
197
215
  *
198
- * This is the primary app entry-point for specifying ZoneGrid component options and behavior.
216
+ * @see ZoneGrid
217
+ * @see ZoneGridConfig
199
218
  */
200
219
  export declare class ZoneGridModel extends HoistModel {
201
220
  gridModel: GridModel;
@@ -4,6 +4,12 @@ import { GridSorter } from '@xh/hoist/cmp/grid';
4
4
  import { ReactNode } from 'react';
5
5
  import { ZoneGridModel } from '../ZoneGridModel';
6
6
  import { ZoneField, Zone, ZoneLimit, ZoneMapping } from '../Types';
7
+ /**
8
+ * Configuration for a ZoneMapperModel - the UI for user-driven customization of zone
9
+ * column mappings. Passed via the `zoneMapperModel` config on {@link ZoneGridConfig}.
10
+ *
11
+ * @see ZoneGridModel
12
+ */
7
13
  export interface ZoneMapperConfig {
8
14
  /** The ZoneGridModel to be configured. */
9
15
  zoneGridModel: ZoneGridModel;
@@ -1,4 +1,4 @@
1
- import { HoistProps, DefaultHoistProps, ElementFactory } from './';
1
+ import { HoistProps, DefaultHoistProps, ElementFactory, PlainObject } from './';
2
2
  import { ModelSpec, HoistModel } from './model';
3
3
  import { ForwardedRef, FC, ReactNode } from 'react';
4
4
  /**
@@ -20,7 +20,7 @@ export type RenderPropsOf<P extends HoistProps> = P & {
20
20
  * Configuration for creating a Component. May be specified either as a render function,
21
21
  * or an object containing a render function and associated metadata.
22
22
  */
23
- export type ComponentConfig<P extends HoistProps> = ((props: RenderPropsOf<P>, ref?: ForwardedRef<any>) => ReactNode) | {
23
+ export type ComponentConfig<P extends HoistProps, D extends PlainObject = never> = ((props: RenderPropsOf<P>, ref?: ForwardedRef<any>) => ReactNode) | {
24
24
  /** Render function defining the component. */
25
25
  render(props: RenderPropsOf<P>, ref?: ForwardedRef<any>): ReactNode;
26
26
  /**
@@ -49,9 +49,18 @@ export type ComponentConfig<P extends HoistProps> = ((props: RenderPropsOf<P>, r
49
49
  * state may set this to `false`, but this is not typically done by application code.
50
50
  */
51
51
  observer?: boolean;
52
+ /**
53
+ * Static, app-wide configuration for the component, attached to the returned component
54
+ * as a typed `defaults` object that applications can modify at bootstrap to customize
55
+ * behavior for all instances (e.g. `Button.defaults.minimal = false` in Bootstrap.ts).
56
+ *
57
+ * Most commonly used to supply default values for selected props. May also be used for
58
+ * other app-overridable settings that are not exposed as props.
59
+ */
60
+ defaults?: D;
52
61
  };
53
62
  /**
54
- * The primary entry point for defining Hoist components functional React components enhanced
63
+ * The primary entry point for defining Hoist components - functional React components enhanced
55
64
  * with MobX reactivity and integrated model support.
56
65
  *
57
66
  * Accepts a configuration object (or a bare render function) and returns a React functional
@@ -63,22 +72,31 @@ export type ComponentConfig<P extends HoistProps> = ((props: RenderPropsOf<P>, r
63
72
  * when observable state read during render changes.
64
73
  *
65
74
  * Forward refs ({@link https://reactjs.org/docs/forwarding-refs.html}) are supported by
66
- * specifying a render function with two arguments the second is treated as a ref, and
75
+ * specifying a render function with two arguments - the second is treated as a ref, and
67
76
  * `React.forwardRef` is applied automatically.
68
77
  *
69
78
  * Most components should be defined via one of two convenience methods rather than calling
70
79
  * this function directly:
71
- * - `hoistCmp.factory()` returns an element factory (the standard pattern for app components).
72
- * - `hoistCmp.withFactory()` returns a `[Component, factory]` pair (the standard pattern for
80
+ * - `hoistCmp.factory()` - returns an element factory (the standard pattern for app components).
81
+ * - `hoistCmp.withFactory()` - returns a `[Component, factory]` pair (the standard pattern for
73
82
  * library components that need to export both).
74
83
  *
75
- * See `core/README.md` for full documentation on component configuration, model specs, and
76
- * context lookup behavior.
84
+ * See the core package README (`core/README.md`) for full documentation on component
85
+ * configuration, model specs, and context lookup behavior.
86
+ *
87
+ * Components can also declare a typed `defaults` object in their config to expose static,
88
+ * app-wide configuration - most typically default values for selected props, but also other
89
+ * settings designed to be overridden by applications at bootstrap (e.g.
90
+ * `Button.defaults.minimal = false` in Bootstrap.ts). When specified, the returned component
91
+ * exposes a typed `defaults` property.
77
92
  *
78
93
  * @param config - specification object, or a render function defining the component.
79
94
  * @returns a functional React Component for use within Hoist apps.
80
95
  */
81
96
  export declare function hoistCmp<M extends HoistModel>(config: ComponentConfig<DefaultHoistProps<M>>): FC<DefaultHoistProps<M>>;
97
+ export declare function hoistCmp<P extends HoistProps, D extends PlainObject>(config: ComponentConfig<P, D>): FC<P> & {
98
+ defaults: D;
99
+ };
82
100
  export declare function hoistCmp<P extends HoistProps>(config: ComponentConfig<P>): FC<P>;
83
101
  export declare namespace hoistCmp {
84
102
  var factory: typeof hoistCmpFactory;
@@ -102,6 +120,9 @@ export declare function hoistCmpFactory<P extends HoistProps>(config: ComponentC
102
120
  * Not typically used by applications.
103
121
  */
104
122
  export declare function hoistCmpWithFactory<M extends HoistModel>(config: ComponentConfig<DefaultHoistProps<M>>): [FC<DefaultHoistProps<M>>, ElementFactory<DefaultHoistProps<M>>];
123
+ export declare function hoistCmpWithFactory<P extends HoistProps, D extends PlainObject>(config: ComponentConfig<P, D>): [FC<P> & {
124
+ defaults: D;
125
+ }, ElementFactory<P>];
105
126
  export declare function hoistCmpWithFactory<P extends HoistProps>(config: ComponentConfig<P>): [FC<P>, ElementFactory<P>];
106
127
  /**
107
128
  * Component to render certain errors caught within hoistComponent.
@@ -46,10 +46,16 @@ export interface DefaultHoistProps<M extends HoistModel = HoistModel> extends Ho
46
46
  [x: string]: any;
47
47
  }
48
48
  /**
49
- * Props for Components that support standard Layout attributes
49
+ * Props for components that support standard layout attributes (margin, padding, dimensions,
50
+ * flex, alignment, overflow). Extends {@link LayoutProps} with test support and standard
51
+ * HTML div attributes.
50
52
  *
51
- * Most component will typically separate these props out and pass them along to another component
52
- * which also supports this interface. Eventually, they should be passed to a Box class.
53
+ * Higher-level components accept these props and pass them through to a {@link Box} or
54
+ * {@link Frame} at the bottom of their render tree, where they are resolved to CSS styles.
55
+ *
56
+ * @see Box
57
+ * @see Frame
58
+ * @see LayoutProps
53
59
  */
54
60
  export interface BoxProps extends LayoutProps, TestSupportProps, Omit<HTMLAttributes<HTMLDivElement>, 'onChange' | 'contextMenu'> {
55
61
  }
@@ -16,7 +16,7 @@ export type LoadSpecConfig = {
16
16
  * LoadSpec instances directly.
17
17
  *
18
18
  * Within `doLoadAsync()`, check {@link isStale} after any async call to determine if a newer
19
- * load has already been requested if so, return early to avoid applying outdated results.
19
+ * load has already been requested - if so, return early to avoid applying outdated results.
20
20
  * Check {@link isAutoRefresh} to adjust behavior for background refreshes (e.g. skip expensive
21
21
  * operations, avoid user-facing error dialogs).
22
22
  *