@xh/hoist 73.0.0-SNAPSHOT.1747335646089 → 73.0.0-SNAPSHOT.1747337729512
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
|
@@ -12,10 +12,8 @@
|
|
|
12
12
|
initialize a new `ViewManagerModel`.
|
|
13
13
|
* For clarity, [here is where Toolbox makes that call](https://github.com/xh/toolbox/blob/f15a8018ce36c2ae998b45724b48a16320b88e49/client-app/src/admin/AppModel.ts#L12).
|
|
14
14
|
* Requires call to `makeObservable(this)` in model constructors with `@bindable` (see below).
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* Requires @xh/hoist-dev-utils >= 11.0
|
|
18
|
-
* Apps must also rename their .eslintrc file to eslint.client.cjs and copy the configuration found in Toolbox.
|
|
15
|
+
Note that there is a new runtime check on all instances of `HoistBase` to warn if this call has not
|
|
16
|
+
been made.
|
|
19
17
|
|
|
20
18
|
### 🎁 New Features
|
|
21
19
|
|
|
@@ -8,7 +8,7 @@ export declare function makeObservable(target: any, annotations?: AnnotationsMap
|
|
|
8
8
|
*/
|
|
9
9
|
export declare function isObservableProp(target: any, propertyKey: string): boolean;
|
|
10
10
|
/**
|
|
11
|
-
* Check that if a class property was annotated with
|
|
11
|
+
* Check that if a class property was annotated with @bindable or @observable that
|
|
12
12
|
* makeObservable was actually called on the instance. Log error on fail.
|
|
13
13
|
*/
|
|
14
14
|
export declare function checkMakeObservable(target: any): void;
|
|
@@ -72,6 +72,7 @@ export class HoistInputModel extends HoistModel {
|
|
|
72
72
|
*/
|
|
73
73
|
get domEl(): HTMLElement {
|
|
74
74
|
const current = this.domRef.current as ReactInstance;
|
|
75
|
+
// eslint-disable-next-line no-undef
|
|
75
76
|
return (
|
|
76
77
|
!current || current instanceof Element ? current : findDOMNode(current)
|
|
77
78
|
) as HTMLElement;
|
package/core/HoistBase.ts
CHANGED
|
@@ -37,6 +37,8 @@ import {IEqualsComparer, IReactionDisposer} from 'mobx/dist/internal';
|
|
|
37
37
|
import {DebounceSpec, PersistableState, PersistenceProvider, PersistOptions, Some, XH} from './';
|
|
38
38
|
import {wait} from '@xh/hoist/promise';
|
|
39
39
|
|
|
40
|
+
declare const xhIsDevelopmentMode: boolean;
|
|
41
|
+
|
|
40
42
|
export interface HoistBaseClass {
|
|
41
43
|
new (...args: any[]): HoistBase;
|
|
42
44
|
isHoistBase: boolean;
|
|
@@ -61,7 +63,7 @@ export abstract class HoistBase {
|
|
|
61
63
|
}
|
|
62
64
|
|
|
63
65
|
constructor() {
|
|
64
|
-
if (
|
|
66
|
+
if (xhIsDevelopmentMode) {
|
|
65
67
|
wait().then(() => checkMakeObservable(this));
|
|
66
68
|
}
|
|
67
69
|
}
|
package/mobx/overrides.ts
CHANGED
|
@@ -57,7 +57,7 @@ export function isObservableProp(target: any, propertyKey: string): boolean {
|
|
|
57
57
|
}
|
|
58
58
|
|
|
59
59
|
/**
|
|
60
|
-
* Check that if a class property was annotated with
|
|
60
|
+
* Check that if a class property was annotated with @bindable or @observable that
|
|
61
61
|
* makeObservable was actually called on the instance. Log error on fail.
|
|
62
62
|
*/
|
|
63
63
|
export function checkMakeObservable(target: any) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xh/hoist",
|
|
3
|
-
"version": "73.0.0-SNAPSHOT.
|
|
3
|
+
"version": "73.0.0-SNAPSHOT.1747337729512",
|
|
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",
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
"license": "Apache-2.0",
|
|
10
10
|
"scripts": {
|
|
11
11
|
"lint": "yarn lint:all",
|
|
12
|
-
"lint:all": "yarn lint:
|
|
13
|
-
"lint:
|
|
12
|
+
"lint:all": "yarn lint:ts && yarn lint:js && yarn lint:styles",
|
|
13
|
+
"lint:js": "eslint --ext .js,.jsx .",
|
|
14
|
+
"lint:ts": "eslint --ext .ts,.tsx .",
|
|
14
15
|
"lint:styles": "stylelint \"**/*.s?(a|c)ss\"",
|
|
15
16
|
"prepare": "husky"
|
|
16
17
|
},
|
|
@@ -96,10 +97,10 @@
|
|
|
96
97
|
"@ag-grid-community/react": "31.x",
|
|
97
98
|
"@types/react": "18.x",
|
|
98
99
|
"@types/react-dom": "18.x",
|
|
99
|
-
"@xh/hoist-dev-utils": "
|
|
100
|
+
"@xh/hoist-dev-utils": "10.x",
|
|
100
101
|
"csstype": "3.x",
|
|
101
|
-
"eslint": "
|
|
102
|
-
"eslint-config-prettier": "
|
|
102
|
+
"eslint": "8.x",
|
|
103
|
+
"eslint-config-prettier": "9.x",
|
|
103
104
|
"eslint-plugin-tsdoc": "0.x",
|
|
104
105
|
"husky": "9.x",
|
|
105
106
|
"lint-staged": "15.x",
|