@singularsystems/neo-react 1.3.6 → 1.3.8

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.8 (24 Nov 2025)
6
+
7
+ - Deserialiser
8
+ - Fixed plain arrays not deserialising when marked with `ChildList` attribute.
9
+
10
+ ## Version 1.3.7 (18 Nov 2025)
11
+
12
+ - Modals shown with ModalUtils will now preserve pre-formatted text if the provided content is a string.
13
+
5
14
  ## Version 1.3.6 (15 Oct 2025)
6
15
 
7
16
  - Fixed type in auto complete drop down preventing use of string ids in multi select drop down.
@@ -141,6 +141,10 @@ var ReactModelCreator = /** @class */ (function (_super) {
141
141
  };
142
142
  ReactModelCreator.prototype.setupList = function (object, propertyName, originalList) {
143
143
  var obsArray = object[propertyName];
144
+ if ((originalList === null || originalList === void 0 ? void 0 : originalList.setupProxy) === undefined) {
145
+ // This is a plain array, not a neo list.
146
+ return;
147
+ }
144
148
  List.copyMethods(obsArray);
145
149
  originalList.setupProxy(obsArray, object);
146
150
  // Don't allow list to change, just change the list contents.
@@ -7,5 +7,5 @@ export default class Modal extends React.Component<IModalOptions | IModalOptions
7
7
  private onSubmit;
8
8
  private lastBindValue?;
9
9
  componentWillUnmount(): void;
10
- render(): false | React.JSX.Element;
10
+ render(): React.JSX.Element | null;
11
11
  }
@@ -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
- var content = this.visible && React.createElement(React.Fragment, null,
107
- React.createElement("div", { className: "modal-body" }, this.props.children instanceof Function ? (show ? this.props.children(this.lastBindValue) : (renderOnCollapse ? this.props.children(this.lastBindValue) : undefined)) : this.props.children),
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.visible &&
120
- React.createElement(ModalPortal, { show: show, onDismiss: onClose, options: this.props },
121
- React.createElement("div", { className: "modal-dialog" + (size ? " modal-" + size : "") + (className ? " " + className : "") },
122
- React.createElement("div", { className: "modal-content" },
123
- React.createElement("div", { className: "modal-header" },
124
- React.createElement("h5", { className: "modal-title" }, this.props.title),
125
- this.props.showCancelButton !== false && BootstrapUtils.getCloseButton(onClose)),
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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@singularsystems/neo-react",
3
- "version": "1.3.6",
3
+ "version": "1.3.8",
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",
@@ -42,13 +42,14 @@
42
42
  "tslib": "2.8.1"
43
43
  },
44
44
  "peerDependencies": {
45
- "@singularsystems/neo-core": ">=1.3.0",
45
+ "@singularsystems/neo-core": ">=1.3.6",
46
46
  "axios": ">=1.6.2",
47
47
  "inversify": ">=5.0.1",
48
48
  "mobx": ">=6.9.0",
49
49
  "mobx-react": ">=7.6.0",
50
50
  "react": ">=18.2.0",
51
- "react-dom": ">=18.2.0"
51
+ "react-dom": ">=18.2.0",
52
+ "react-select": ">=5.10.2"
52
53
  },
53
54
  "packageManager": "yarn@4.6.0",
54
55
  "resolutions": {
package/styles/Modal.scss CHANGED
@@ -50,4 +50,8 @@ body.has-modal-scroll-fix {
50
50
  .modal-footer-content {
51
51
  flex-grow: 1;
52
52
  }
53
- }
53
+
54
+ .modal-content-pre {
55
+ white-space: pre-wrap;
56
+ }
57
+ }