@singularsystems/neo-react 1.4.0 → 1.4.2

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,16 @@
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.4.2 (20 April 2026)
6
+
7
+ - Navigation helper
8
+ - Changed `openWindow` and `readOpenerState` to store state as string.
9
+
10
+ ## Version 1.4.1 (17 April 2026)
11
+
12
+ - AutoCompleteDropDown
13
+ - Fixed type issues when `valueMember` and `displayMember` were specified.
14
+
5
15
  ## Version 1.4.0 (16 April 2026)
6
16
 
7
17
  - Button
@@ -21,8 +21,8 @@ interface IAutoCompleteCommonProps<T, TChild = T> extends ICommonEditorProps<Sel
21
21
  * Items to display for non async drop down, or default items to display in async drop down before typing.
22
22
  */
23
23
  items?: ItemSource<T>;
24
- valueMember?: keyof TChild;
25
- displayMember?: keyof TChild;
24
+ valueMember?: NoInfer<keyof TChild>;
25
+ displayMember?: NoInfer<keyof TChild>;
26
26
  /**
27
27
  * Function used to filter items out of the datasource.
28
28
  * **Note:** this will only apply to the `items` prop. */
@@ -38,7 +38,7 @@ interface IAutoCompleteCommonProps<T, TChild = T> extends ICommonEditorProps<Sel
38
38
  *
39
39
  * Description will be shown in muted text below the item name.
40
40
  */
41
- descriptionMember?: keyof TChild | false;
41
+ descriptionMember?: NoInfer<keyof TChild> | false;
42
42
  /**
43
43
  * Callback used to provide a custom option component instead of displaying the display member value.
44
44
  */
@@ -70,11 +70,11 @@ interface IAutoCompleteCommonProps<T, TChild = T> extends ICommonEditorProps<Sel
70
70
  /**
71
71
  * The group member to use as the display for grouped items.
72
72
  */
73
- groupDisplayMember?: keyof T;
73
+ groupDisplayMember?: NoInfer<keyof T>;
74
74
  /**
75
75
  * Name of the property on the parent which contains a child list.
76
76
  */
77
- childListMember?: keyof T;
77
+ childListMember?: NoInfer<keyof T>;
78
78
  }
79
79
  export interface IAutoCompleteProps {
80
80
  bind: Model.IPropertyInstance;
@@ -192,7 +192,7 @@ var AutoCompleteDropDown = /** @class */ (function (_super) {
192
192
  AutoCompleteDropDown.prototype.render = function () {
193
193
  var _this = this;
194
194
  var _a, _b, _c, _d, _e, _f, _g, _h, _j;
195
- var _k = this.props, bind = _k.bind, bindDisplay = _k.bindDisplay, bindItems = _k.bindItems, bindIds = _k.bindIds, itemSource = _k.itemSource, items = _k.items, displayMember = _k.displayMember, valueMember = _k.valueMember, descriptionMember = _k.descriptionMember, option = _k.option, noRecordsPrompt = _k.noRecordsPrompt, typeToSearchPrompt = _k.typeToSearchPrompt, delayMs = _k.delayMs, minCharacters = _k.minCharacters, onItemSelected = _k.onItemSelected, fieldInfoLimit = _k.fieldInfoLimit, filterPredicate = _k.filterPredicate, inputFilter = _k.inputFilter, otherProps = __rest(_k, ["bind", "bindDisplay", "bindItems", "bindIds", "itemSource", "items", "displayMember", "valueMember", "descriptionMember", "option", "noRecordsPrompt", "typeToSearchPrompt", "delayMs", "minCharacters", "onItemSelected", "fieldInfoLimit", "filterPredicate", "inputFilter"]);
195
+ var _k = this.props, bind = _k.bind, bindDisplay = _k.bindDisplay, bindItems = _k.bindItems, bindIds = _k.bindIds, itemSource = _k.itemSource, items = _k.items, displayMember = _k.displayMember, valueMember = _k.valueMember, descriptionMember = _k.descriptionMember, option = _k.option, noRecordsPrompt = _k.noRecordsPrompt, typeToSearchPrompt = _k.typeToSearchPrompt, delayMs = _k.delayMs, minCharacters = _k.minCharacters, onItemSelected = _k.onItemSelected, fieldInfoLimit = _k.fieldInfoLimit, filterPredicate = _k.filterPredicate, inputFilter = _k.inputFilter, groupDisplayMember = _k.groupDisplayMember, childListMember = _k.childListMember, otherProps = __rest(_k, ["bind", "bindDisplay", "bindItems", "bindIds", "itemSource", "items", "displayMember", "valueMember", "descriptionMember", "option", "noRecordsPrompt", "typeToSearchPrompt", "delayMs", "minCharacters", "onItemSelected", "fieldInfoLimit", "filterPredicate", "inputFilter", "groupDisplayMember", "childListMember"]);
196
196
  this.setBindProperty();
197
197
  var splitProps = BindPropsHelper.splitCommonEditorProps(otherProps);
198
198
  var nativeProps = splitProps.rest;
@@ -6,8 +6,8 @@ import { FormContext } from '../FormContext';
6
6
  export interface IDropDownSpecificProps<T, TChild = T> {
7
7
  items?: T[] | Promise<T[]>;
8
8
  itemSource?: Data.IAsyncDataSource<T[]> | Data.IArrayCacheEntry<T>;
9
- valueMember?: keyof TChild;
10
- displayMember?: keyof TChild;
9
+ valueMember?: NoInfer<keyof TChild>;
10
+ displayMember?: NoInfer<keyof TChild>;
11
11
  /**
12
12
  * Set to true if your bind property is nullable, and you need to show a blank item in the list.
13
13
  * If your property value is null, a blank item will automatically be shown.
@@ -31,11 +31,11 @@ export interface IDropDownSpecificProps<T, TChild = T> {
31
31
  /**
32
32
  * The group member to use as the display for grouped items.
33
33
  */
34
- groupDisplayMember?: keyof T;
34
+ groupDisplayMember?: NoInfer<keyof T>;
35
35
  /**
36
36
  * The child list containing the grouped items.
37
37
  */
38
- childListMember?: keyof T;
38
+ childListMember?: NoInfer<keyof T>;
39
39
  }
40
40
  export interface IDropDownProps<T, TChild = T> extends IBindableEditorProps<HTMLSelectElement> {
41
41
  select: IDropDownSpecificProps<T, TChild>;
@@ -129,6 +129,6 @@ var neoFontAwesomeMappings = [
129
129
  ["cube", "deployed_code"],
130
130
  ["paper-plane", "send"],
131
131
  ["layer-group", "layers"],
132
- ["arrow-up-right-from-square", "open_in_new"],
132
+ ["external-link-alt", "open_in_new"],
133
133
  ["file", "draft"]
134
134
  ];
@@ -36,12 +36,12 @@ export default class NavigationHelper implements INavigationHelper {
36
36
  navigateToView<TParams extends RouteParameterObject<TParams>>(view: ViewConstructor<TParams>, paramValues?: ParamValues<TParams>): void;
37
37
  openWindow(path: string, state?: {
38
38
  name: string;
39
- value: object;
39
+ value: any;
40
40
  }, options?: {
41
41
  target?: string;
42
42
  features?: string;
43
43
  }): Window | null;
44
- readOpenerState(name: string, reset?: boolean): object | undefined;
44
+ readOpenerState(name: string, reset?: boolean): string | undefined;
45
45
  getPathForView<TParams extends RouteParameterObject<TParams>>(view: ViewConstructor<TParams>, paramValues?: ParamValues<TParams>): string;
46
46
  getCurrentViewPath(): string;
47
47
  private historyPopState;
@@ -78,8 +78,12 @@ var NavigationHelper = /** @class */ (function () {
78
78
  NavigationHelper.prototype.openWindow = function (path, state, options) {
79
79
  var newWindow = window.open(this.routingState.basePath + path, options === null || options === void 0 ? void 0 : options.target, options === null || options === void 0 ? void 0 : options.features);
80
80
  if (newWindow && state) {
81
+ var value = state.value;
82
+ if (typeof value === "object") {
83
+ value = JSON.stringify(value);
84
+ }
81
85
  // @ts-ignore
82
- newWindow["__neoOpenerState" + state.name] = state.value;
86
+ newWindow["__neoOpenerState" + state.name] = value;
83
87
  }
84
88
  return newWindow;
85
89
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@singularsystems/neo-react",
3
- "version": "1.4.0",
3
+ "version": "1.4.2",
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",
@@ -27,7 +27,7 @@
27
27
  "typescript": "5.9.3"
28
28
  },
29
29
  "dependencies": {
30
- "@singularsystems/neo-core": "1.3.8",
30
+ "@singularsystems/neo-core": "1.4.1",
31
31
  "@types/react-color": "3.0.13",
32
32
  "axios": "1.13.5",
33
33
  "inversify": "6.0.2",