@singularsystems/neo-react 1.3.4 → 1.3.6
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
|
@@ -2,6 +2,15 @@
|
|
|
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.6 (15 Oct 2025)
|
|
6
|
+
|
|
7
|
+
- Fixed type in auto complete drop down preventing use of string ids in multi select drop down.
|
|
8
|
+
|
|
9
|
+
## Version 1.3.5
|
|
10
|
+
|
|
11
|
+
- 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.
|
|
12
|
+
- Minor changes to `IRoute` to allow `basePath` property.
|
|
13
|
+
|
|
5
14
|
## Version 1.3.4
|
|
6
15
|
|
|
7
16
|
- Added `PopupHost` component
|
|
@@ -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".
|
|
@@ -105,9 +105,10 @@ var DropDown = /** @class */ (function (_super) {
|
|
|
105
105
|
var items = this.items;
|
|
106
106
|
var selectedItem = this.getSelectedOption(this.props.bind.value); // This sets the sort value to allow sorting of drop downs in grids.
|
|
107
107
|
var value = this.props.bind.value;
|
|
108
|
-
var
|
|
109
|
-
var
|
|
110
|
-
|
|
108
|
+
var valueIsEmpty = !value;
|
|
109
|
+
var notFound = items.length > 0 && !valueIsEmpty && selectedItem[this.valueMember] !== value;
|
|
110
|
+
var addBlankItem = ((_c = (_b = splitProps.select) === null || _b === void 0 ? void 0 : _b.allowNulls) !== null && _c !== void 0 ? _c : this.props.bind.propertyInfo.allowNulls) || valueIsEmpty || notFound;
|
|
111
|
+
if (addBlankItem && items.find(function (item) { return item[_this.valueMember] === null || item[_this.valueMember] === "" || (valueIsEmpty && item[_this.valueMember] === value); })) {
|
|
111
112
|
// If there is an item with a null value, don't add a blank drop down item.
|
|
112
113
|
addBlankItem = false;
|
|
113
114
|
}
|
|
@@ -126,13 +127,13 @@ var DropDown = /** @class */ (function (_super) {
|
|
|
126
127
|
if (domProps.readOnly) {
|
|
127
128
|
domProps.disabled = true;
|
|
128
129
|
}
|
|
129
|
-
var
|
|
130
|
-
var nullText = (
|
|
131
|
-
if (
|
|
130
|
+
var valueIsNull = value === undefined || value === null;
|
|
131
|
+
var nullText = (valueIsNull || ((_e = splitProps.select) === null || _e === void 0 ? void 0 : _e.deSelectText) === undefined) ? (_f = splitProps.select) === null || _f === void 0 ? void 0 : _f.nullText : (_g = splitProps.select) === null || _g === void 0 ? void 0 : _g.deSelectText;
|
|
132
|
+
if (valueIsNull) {
|
|
132
133
|
domProps.className = Utils.joinWithSpaces(domProps.className, "select-no-value");
|
|
133
134
|
}
|
|
134
135
|
control =
|
|
135
|
-
React.createElement("select", __assign({ value:
|
|
136
|
+
React.createElement("select", __assign({ value: valueIsNull ? "" : value, onChange: this.onItemSelected, ref: splitProps.editor.inputElement }, domProps),
|
|
136
137
|
addBlankItem && React.createElement("option", { className: "option-default" }, notFound ? "(Not found): ".concat(value) : nullText),
|
|
137
138
|
items.map(function (item) { return (React.createElement("option", { value: item[_this.valueMember], key: item[_this.valueMember] }, item[_this.displayMember])); }));
|
|
138
139
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { __assign, __spreadArray } from "tslib";
|
|
2
|
-
import { MenuRoute } from './MenuRoute';
|
|
3
2
|
var RouteProvider = /** @class */ (function () {
|
|
4
3
|
/**
|
|
5
4
|
* Creates a route provider which provides a list of flattened routes.
|
|
@@ -106,10 +105,9 @@ var RouteProvider = /** @class */ (function () {
|
|
|
106
105
|
* Adds a unique key, and adds route parameters extracted from the component static params object.
|
|
107
106
|
*/
|
|
108
107
|
RouteProvider.prototype.processRoute = function (into, route) {
|
|
108
|
+
var _a;
|
|
109
109
|
var processed = __assign(__assign({}, route), { path: route.path, params: [], key: this.key++, order: 0 });
|
|
110
|
-
|
|
111
|
-
processed.path = route.basePath;
|
|
112
|
-
}
|
|
110
|
+
processed.path = (_a = route.basePath) !== null && _a !== void 0 ? _a : route.path;
|
|
113
111
|
processed.path = processed.path.toLowerCase();
|
|
114
112
|
if (processed.path.length > 1 && processed.path.endsWith("/")) {
|
|
115
113
|
processed.path = processed.path.substring(0, processed.path.length - 1);
|
|
@@ -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.6",
|
|
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,31 +16,29 @@
|
|
|
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": {
|