@xh/hoist 71.0.0-SNAPSHOT.1735673121607 → 71.0.0-SNAPSHOT.1735830010593

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.
@@ -134,17 +134,16 @@ class RelativeTimestampLocalModel extends HoistModel {
134
134
  constructor() {
135
135
  super();
136
136
  makeObservable(this);
137
+ }
137
138
 
139
+ override onLinked() {
140
+ this.model = this.lookupModel('*');
138
141
  this.addReaction({
139
142
  track: () => [this.timestamp, this.options],
140
143
  run: () => this.refreshDisplay()
141
144
  });
142
145
  }
143
146
 
144
- override onLinked() {
145
- this.model = this.lookupModel('*');
146
- }
147
-
148
147
  @action
149
148
  private refreshDisplay() {
150
149
  this.display = getRelativeTimestamp(this.timestamp, this.options);
@@ -137,7 +137,7 @@ export abstract class HoistModel extends HoistBase implements Loadable {
137
137
  */
138
138
  @computed({equals: comparer.shallow})
139
139
  get componentProps(): DefaultHoistProps {
140
- return this._componentProps;
140
+ return this._componentProps ?? {};
141
141
  }
142
142
 
143
143
  /**
@@ -124,8 +124,7 @@ export const [NumberInput, numberInput] = hoistCmp.withFactory<NumberInputProps>
124
124
  class NumberInputModel extends HoistInputModel {
125
125
  override xhImpl = true;
126
126
 
127
- constructor() {
128
- super();
127
+ override onLinked() {
129
128
  throwIf(Math.log10(this.scaleFactor) % 1 !== 0, 'scaleFactor must be a factor of 10');
130
129
  }
131
130
 
@@ -92,8 +92,7 @@ class NumberInputModel extends HoistInputModel {
92
92
 
93
93
  static shorthandValidator = /((\.\d+)|(\d+(\.\d+)?))([kmb])\b/i;
94
94
 
95
- constructor() {
96
- super();
95
+ override onLinked() {
97
96
  throwIf(Math.log10(this.scaleFactor) % 1 !== 0, 'scaleFactor must be a factor of 10');
98
97
  }
99
98
 
@@ -167,7 +167,9 @@ class PopoverModel extends HoistModel {
167
167
  constructor() {
168
168
  super();
169
169
  makeObservable(this);
170
+ }
170
171
 
172
+ override onLinked() {
171
173
  // Popovers are automatically closed on app route changes to avoid navigating the
172
174
  // app underneath the popover in an unsettling way. (i.e. via browser back button)
173
175
  this.addReaction({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xh/hoist",
3
- "version": "71.0.0-SNAPSHOT.1735673121607",
3
+ "version": "71.0.0-SNAPSHOT.1735830010593",
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",