cx 24.6.4 → 24.7.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/dist/ui.js CHANGED
@@ -3941,7 +3941,7 @@ function startAppLoop(parentDOMElement, storeOrInstance, widget, options) {
3941
3941
  if (storeOrInstance.widget === widget) instance = storeOrInstance;
3942
3942
  else parentInstance = storeOrInstance;
3943
3943
  } else throw new Error("Second argument to startAppLoop should be either of type Store or Instance");
3944
- var root = /*#__PURE__*/ jsx(Cx, {
3944
+ var content = /*#__PURE__*/ jsx(Cx, {
3945
3945
  store: store,
3946
3946
  widget: widget,
3947
3947
  instance: instance,
@@ -3949,21 +3949,26 @@ function startAppLoop(parentDOMElement, storeOrInstance, widget, options) {
3949
3949
  options: options,
3950
3950
  subscribe: true,
3951
3951
  });
3952
- VDOM.DOM.render(root, parentDOMElement);
3952
+ var root = null;
3953
+ if (VDOM.DOM.createRoot) {
3954
+ root = VDOM.DOM.createRoot(parentDOMElement);
3955
+ root.render(content);
3956
+ } else VDOM.DOM.render(content, parentDOMElement);
3953
3957
  var stopped = false;
3954
3958
  return function () {
3955
3959
  if (stopped) return;
3956
3960
  stopped = true;
3957
- if (!options.destroyDelay) destroy(parentDOMElement, options);
3961
+ if (!options.destroyDelay) destroy(parentDOMElement, options, root);
3958
3962
  else {
3959
3963
  setTimeout(function () {
3960
- destroy(parentDOMElement, options);
3964
+ destroy(parentDOMElement, options, root);
3961
3965
  }, options.destroyDelay);
3962
3966
  }
3963
3967
  };
3964
3968
  }
3965
- function destroy(parentDOMElement, options) {
3966
- VDOM.DOM.unmountComponentAtNode(parentDOMElement);
3969
+ function destroy(parentDOMElement, options, root) {
3970
+ if (root) root.unmount();
3971
+ else VDOM.DOM.unmountComponentAtNode(parentDOMElement);
3967
3972
  if (options.removeParentDOMElement && parentDOMElement.parentNode)
3968
3973
  parentDOMElement.parentNode.removeChild(parentDOMElement);
3969
3974
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cx",
3
- "version": "24.6.4",
3
+ "version": "24.7.2",
4
4
  "description": "Advanced JavaScript UI framework for admin and dashboard applications with ready to use grid, form and chart components.",
5
5
  "main": "index.js",
6
6
  "jsnext:main": "src/index.js",
@@ -3,19 +3,19 @@ import { PointReducerProps } from "./PointReducer";
3
3
 
4
4
  interface MinMaxFinderProps extends PointReducerProps {
5
5
  /* A binding used to receive the x value of the point with the minimum value */
6
- minX?: Cx.Bind;
6
+ minX?: Cx.Bind | Cx.AccessorChain<number>;
7
7
 
8
8
  /* A binding used to receive the y value of the point with the minimum value */
9
- minY?: Cx.Bind;
9
+ minY?: Cx.Bind | Cx.AccessorChain<number>;
10
10
 
11
11
  /* A binding used to receive the x value of the point with the maximum value */
12
- maxX?: Cx.Bind;
12
+ maxX?: Cx.Bind | Cx.AccessorChain<number>;
13
13
 
14
14
  /* A binding used to receive the x value of the point with the maximum value */
15
- maxY?: Cx.Bind;
15
+ maxY?: Cx.Bind | Cx.AccessorChain<number>;
16
16
 
17
17
  /* An object used for filtering data points. Available as accumulator.params inside the onMap function. */
18
- params: Cx.StructuredProp;
18
+ params?: Cx.StructuredProp;
19
19
  }
20
20
 
21
21
  /** Find minimum and maximum points of a point series */
@@ -9,10 +9,10 @@ interface SnapPointFinderProps extends PointReducerProps {
9
9
  cursorY?: Cx.NumberProp;
10
10
 
11
11
  /* A binding used to receive the x value of the nearest point.*/
12
- snapX?: Cx.NumberProp | Cx.StringProp;
12
+ snapX?: Cx.Bind | Cx.AccessorChain<number> | Cx.AccessorChain<string>;
13
13
 
14
14
  /* A binding used to receive the y value of the nearest point. */
15
- snapY?: Cx.NumberProp | Cx.StringProp;
15
+ snapY?: Cx.Bind | Cx.AccessorChain<number> | Cx.AccessorChain<string>;
16
16
 
17
17
  /* A binding used to receive the record prop */
18
18
  snapRecord?: Cx.Prop<Cx.Record>;