@xh/hoist 70.0.0-SNAPSHOT.1731623470295 → 70.0.0-SNAPSHOT.1731695078472

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.
package/CHANGELOG.md CHANGED
@@ -56,6 +56,8 @@
56
56
  of the model.
57
57
  * Expanded the `JsonBlob` interface to include additional properties present on all blobs.
58
58
  * Corrected `DashViewSpec.title` to be optional - it can be defaulted from the `id`.
59
+ * Corrected the return type for `SelectProps.loadingMessageFn` and `noOptionsMessageFn` to return
60
+ `ReactNode` vs `string`. The component supports rendering richer content via these options.
59
61
 
60
62
  ## 69.1.0 - 2024-11-07
61
63
 
@@ -72,7 +72,7 @@ export interface SelectProps extends HoistProps, HoistInputProps, LayoutProps {
72
72
  /** Icon to display inline on the left side of the input. */
73
73
  leftIcon?: ReactElement;
74
74
  /** Function to return loading message during an async query. Passed current query input. */
75
- loadingMessageFn?: (query: string) => string;
75
+ loadingMessageFn?: (query: string) => ReactNode;
76
76
  /** Maximum height of the menu before scrolling. Defaults to 300px. */
77
77
  maxMenuHeight?: number;
78
78
  /** Placement of the dropdown menu relative to the input control. */
@@ -80,7 +80,7 @@ export interface SelectProps extends HoistProps, HoistInputProps, LayoutProps {
80
80
  /** Width in pixels for the dropdown menu - if unspecified, defaults to control width. */
81
81
  menuWidth?: number;
82
82
  /** Function to return message indicating no options loaded. Passed current query input. */
83
- noOptionsMessageFn?: (query: string) => string;
83
+ noOptionsMessageFn?: (query: string) => ReactNode;
84
84
  /** True to auto-open the dropdown menu on input focus. */
85
85
  openMenuOnFocus?: boolean;
86
86
  /**
@@ -88,7 +88,7 @@ export interface SelectProps extends HoistProps, HoistInputProps, LayoutProps {
88
88
  * will contain at minimum a value and label field, as well as any other fields present in
89
89
  * the source objects).
90
90
  */
91
- optionRenderer?: (SelectOption: any) => ReactNode;
91
+ optionRenderer?: (opt: SelectOption) => ReactNode;
92
92
  /**
93
93
  * Preset list of options for selection. Elements can be either a primitive or an object.
94
94
  * Primitives will be displayed via toString().
package/data/cube/View.ts CHANGED
@@ -472,6 +472,12 @@ export class View extends HoistBase {
472
472
  'Store.reuseRecords cannot be used on a Store that is connected to a Cube View'
473
473
  );
474
474
 
475
+ throwIf(
476
+ ret.some(s => s.idEncodesTreePath) &&
477
+ (!isNil(this.cube.bucketSpecFn) || !isNil(this.cube.omitFn)),
478
+ 'Store.idEncodesTreePath cannot be used on a Store that is connected to a Cube with a `bucketSpecFn` or `omitFn`'
479
+ );
480
+
475
481
  return ret;
476
482
  }
477
483
 
@@ -123,7 +123,7 @@ export interface SelectProps extends HoistProps, HoistInputProps, LayoutProps {
123
123
  leftIcon?: ReactElement;
124
124
 
125
125
  /** Function to return loading message during an async query. Passed current query input. */
126
- loadingMessageFn?: (query: string) => string;
126
+ loadingMessageFn?: (query: string) => ReactNode;
127
127
 
128
128
  /** Maximum height of the menu before scrolling. Defaults to 300px. */
129
129
  maxMenuHeight?: number;
@@ -135,7 +135,7 @@ export interface SelectProps extends HoistProps, HoistInputProps, LayoutProps {
135
135
  menuWidth?: number;
136
136
 
137
137
  /** Function to return message indicating no options loaded. Passed current query input. */
138
- noOptionsMessageFn?: (query: string) => string;
138
+ noOptionsMessageFn?: (query: string) => ReactNode;
139
139
 
140
140
  /** True to auto-open the dropdown menu on input focus. */
141
141
  openMenuOnFocus?: boolean;
@@ -145,7 +145,7 @@ export interface SelectProps extends HoistProps, HoistInputProps, LayoutProps {
145
145
  * will contain at minimum a value and label field, as well as any other fields present in
146
146
  * the source objects).
147
147
  */
148
- optionRenderer?: (SelectOption) => ReactNode;
148
+ optionRenderer?: (opt: SelectOption) => ReactNode;
149
149
 
150
150
  /**
151
151
  * Preset list of options for selection. Elements can be either a primitive or an object.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "70.0.0-SNAPSHOT.1731623470295",
3
+ "version": "70.0.0-SNAPSHOT.1731695078472",
4
4
  "description": "Hoist add-on for building and deploying React Applications.",
5
5
  "repository": "github:xh/hoist-react",
6
6
  "homepage": "https://xh.io",