@singularsystems/neo-react 1.3.5 → 1.3.7
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 +8 -0
- package/dist/ReactComponents/DropDown/AutoCompleteDropDown.d.ts +1 -1
- package/dist/ReactComponents/Modal/Modal.d.ts +1 -1
- package/dist/ReactComponents/Modal/Modal.js +17 -10
- package/dist/Views/ViewModelBase.d.ts +1 -0
- package/package.json +16 -17
- package/styles/Modal.scss +5 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
This file details all new features and changes to functionality. If you only need to see changes that require updates to your project, see the [breaking changes](./Breaking.md) readme.
|
|
4
4
|
|
|
5
|
+
## Version 1.3.7 (18 Nov 2025)
|
|
6
|
+
|
|
7
|
+
- Modals shown with ModalUtils will now preserve pre-formatted text if the provided content is a string.
|
|
8
|
+
|
|
9
|
+
## Version 1.3.6 (15 Oct 2025)
|
|
10
|
+
|
|
11
|
+
- Fixed type in auto complete drop down preventing use of string ids in multi select drop down.
|
|
12
|
+
|
|
5
13
|
## Version 1.3.5
|
|
6
14
|
|
|
7
15
|
- Fixed drop down to not add a blank item if the bound value is zero, and the items contains an item with id of zero.
|
|
@@ -78,7 +78,7 @@ export interface IAutoCompleteMultiSelectProps {
|
|
|
78
78
|
/**
|
|
79
79
|
* Optional list of ids. This will be kept in sync with the bindItems prop.
|
|
80
80
|
*/
|
|
81
|
-
bindIds?: (string | number)[] | Model.IPropertyInstance<number[]>;
|
|
81
|
+
bindIds?: (string | number)[] | Model.IPropertyInstance<(string | number)[]>;
|
|
82
82
|
/**
|
|
83
83
|
* The max no of items to record in the field info if bound to a field info class. (Defaults to 5)
|
|
84
84
|
* If the selected items exceeds this limit, the field info will be recorded as "x items selected".
|
|
@@ -103,8 +103,16 @@ var Modal = /** @class */ (function (_super) {
|
|
|
103
103
|
buttons.push(Utils.populatePartialWithDefaults(closeButton, __assign(__assign({}, Settings.modal.closeButton), { onClick: onClose })));
|
|
104
104
|
}
|
|
105
105
|
}
|
|
106
|
-
|
|
107
|
-
|
|
106
|
+
if (!this.visible) {
|
|
107
|
+
return null;
|
|
108
|
+
}
|
|
109
|
+
var childContent = this.props.children instanceof Function ? (show ? this.props.children(this.lastBindValue) : (renderOnCollapse ? this.props.children(this.lastBindValue) : undefined)) : this.props.children;
|
|
110
|
+
var bodyClassName = "modal-body";
|
|
111
|
+
if (other.isCodeModal && typeof childContent === "string") {
|
|
112
|
+
bodyClassName += " modal-content-pre";
|
|
113
|
+
}
|
|
114
|
+
var content = React.createElement(React.Fragment, null,
|
|
115
|
+
React.createElement("div", { className: bodyClassName }, childContent),
|
|
108
116
|
(buttons.length > 0 || footerContent || footer) &&
|
|
109
117
|
React.createElement("div", { className: "modal-footer" }, footer ? footer : React.createElement(React.Fragment, null,
|
|
110
118
|
footerContent && React.createElement("div", { className: "modal-footer-content" }, footerContent),
|
|
@@ -116,14 +124,13 @@ var Modal = /** @class */ (function (_super) {
|
|
|
116
124
|
else {
|
|
117
125
|
container = React.createElement(Form, __assign({}, formProps, { onSubmit: function (e) { _this.onSubmit && _this.onSubmit(e); } }), content);
|
|
118
126
|
}
|
|
119
|
-
return (this.
|
|
120
|
-
React.createElement(
|
|
121
|
-
React.createElement("div", { className: "modal-
|
|
122
|
-
React.createElement("div", { className: "modal-
|
|
123
|
-
React.createElement("
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
container))));
|
|
127
|
+
return (React.createElement(ModalPortal, { show: show, onDismiss: onClose, options: this.props },
|
|
128
|
+
React.createElement("div", { className: "modal-dialog" + (size ? " modal-" + size : "") + (className ? " " + className : "") },
|
|
129
|
+
React.createElement("div", { className: "modal-content" },
|
|
130
|
+
React.createElement("div", { className: "modal-header" },
|
|
131
|
+
React.createElement("h5", { className: "modal-title" }, this.props.title),
|
|
132
|
+
this.props.showCancelButton !== false && BootstrapUtils.getCloseButton(onClose)),
|
|
133
|
+
container))));
|
|
127
134
|
};
|
|
128
135
|
Modal = __decorate([
|
|
129
136
|
observer
|
|
@@ -20,6 +20,7 @@ export default abstract class ViewModelBase extends ModelBase implements IViewMo
|
|
|
20
20
|
registerReaction<T>(expression: () => T, effect: (value: T) => void): IReactionDisposer;
|
|
21
21
|
/**
|
|
22
22
|
* Instantiates, and registers a child view model that will be disposed when this view model is disposed.
|
|
23
|
+
* Does not initialise the view model unless specified in options.
|
|
23
24
|
* The task runner will be passed to the new vm from this one.
|
|
24
25
|
* @param viewModel View model type.
|
|
25
26
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@singularsystems/neo-react",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.7",
|
|
4
4
|
"description": "React application logic and components for the Neo client library",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -16,41 +16,40 @@
|
|
|
16
16
|
"author": "Singular Systems",
|
|
17
17
|
"license": "ISC",
|
|
18
18
|
"devDependencies": {
|
|
19
|
-
"@
|
|
20
|
-
"@testing-library/react": "16.2.0",
|
|
21
|
-
"@types/jest": "29.5.14",
|
|
19
|
+
"@types/jest": "30.0.0",
|
|
22
20
|
"@types/memoize-one": "5.1.2",
|
|
23
|
-
"@types/node": "
|
|
24
|
-
"@types/react": "19.
|
|
21
|
+
"@types/node": "24.7.2",
|
|
22
|
+
"@types/react": "19.2.2",
|
|
25
23
|
"@types/react-custom-scrollbars": "4.0.13",
|
|
26
|
-
"@types/react-dom": "19.
|
|
24
|
+
"@types/react-dom": "19.2.2",
|
|
27
25
|
"decimal.js-light": "2.5.1",
|
|
28
26
|
"react-scripts": "5.0.1",
|
|
29
27
|
"typescript": "5.7.3"
|
|
30
28
|
},
|
|
31
29
|
"dependencies": {
|
|
32
|
-
"@singularsystems/neo-core": "1.
|
|
30
|
+
"@singularsystems/neo-core": "1.3.4",
|
|
33
31
|
"@types/react-color": "3.0.13",
|
|
34
|
-
"axios": "1.
|
|
32
|
+
"axios": "1.12.2",
|
|
35
33
|
"inversify": "6.0.2",
|
|
36
34
|
"memoize-one": "6.0.0",
|
|
37
|
-
"mobx": "6.
|
|
38
|
-
"mobx-react": "9.2.
|
|
39
|
-
"rc-slider": "11.1.
|
|
40
|
-
"react": "19.
|
|
35
|
+
"mobx": "6.15.0",
|
|
36
|
+
"mobx-react": "9.2.1",
|
|
37
|
+
"rc-slider": "11.1.9",
|
|
38
|
+
"react": "19.2.0",
|
|
41
39
|
"react-custom-scrollbars": "4.2.1",
|
|
42
|
-
"react-dom": "19.
|
|
43
|
-
"react-select": "5.10.
|
|
40
|
+
"react-dom": "19.2.0",
|
|
41
|
+
"react-select": "5.10.2",
|
|
44
42
|
"tslib": "2.8.1"
|
|
45
43
|
},
|
|
46
44
|
"peerDependencies": {
|
|
47
|
-
"@singularsystems/neo-core": ">=1.3.
|
|
45
|
+
"@singularsystems/neo-core": ">=1.3.6",
|
|
48
46
|
"axios": ">=1.6.2",
|
|
49
47
|
"inversify": ">=5.0.1",
|
|
50
48
|
"mobx": ">=6.9.0",
|
|
51
49
|
"mobx-react": ">=7.6.0",
|
|
52
50
|
"react": ">=18.2.0",
|
|
53
|
-
"react-dom": ">=18.2.0"
|
|
51
|
+
"react-dom": ">=18.2.0",
|
|
52
|
+
"react-select": ">=5.10.2"
|
|
54
53
|
},
|
|
55
54
|
"packageManager": "yarn@4.6.0",
|
|
56
55
|
"resolutions": {
|