cx 25.5.1 → 25.6.0

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.
Files changed (45) hide show
  1. package/dist/charts.js +40 -21
  2. package/dist/manifest.js +771 -771
  3. package/dist/ui.js +0 -15
  4. package/dist/widgets.js +34 -25
  5. package/package.json +1 -1
  6. package/src/charts/LineGraph.js +1 -1
  7. package/src/charts/axis/NumericAxis.d.ts +46 -46
  8. package/src/charts/helpers/PointReducer.d.ts +9 -0
  9. package/src/charts/helpers/PointReducer.js +36 -22
  10. package/src/data/AugmentedViewBase.js +77 -77
  11. package/src/data/ExposedRecordView.js +75 -75
  12. package/src/data/ExposedValueView.js +73 -73
  13. package/src/data/Ref.d.ts +24 -24
  14. package/src/data/Ref.spec.js +79 -79
  15. package/src/data/StoreRef.spec.js +24 -24
  16. package/src/data/StructuredDataAccessor.d.ts +7 -7
  17. package/src/data/SubscribableView.js +54 -54
  18. package/src/ui/Container.js +154 -154
  19. package/src/ui/DataProxy.js +31 -45
  20. package/src/ui/DetachedScope.js +98 -98
  21. package/src/ui/Instance.d.ts +72 -72
  22. package/src/ui/Instance.js +623 -623
  23. package/src/ui/IsolatedScope.js +30 -30
  24. package/src/ui/Repeater.js +109 -109
  25. package/src/ui/Rescope.js +35 -35
  26. package/src/ui/Restate.js +167 -167
  27. package/src/ui/Widget.js +184 -184
  28. package/src/ui/adapter/ArrayAdapter.js +152 -152
  29. package/src/ui/adapter/TreeAdapter.js +101 -101
  30. package/src/ui/createFunctionalComponent.d.ts +1 -1
  31. package/src/ui/index.d.ts +42 -42
  32. package/src/ui/layout/exploreChildren.d.ts +12 -12
  33. package/src/ui/layout/exploreChildren.js +27 -27
  34. package/src/util/debounce.js +18 -18
  35. package/src/util/validatedDebounce.js +19 -19
  36. package/src/widgets/Button.js +118 -118
  37. package/src/widgets/List.js +594 -594
  38. package/src/widgets/form/Calendar.d.ts +86 -86
  39. package/src/widgets/form/Checkbox.js +5 -2
  40. package/src/widgets/form/MonthField.d.ts +5 -0
  41. package/src/widgets/form/MonthField.js +1 -0
  42. package/src/widgets/form/MonthPicker.d.ts +13 -0
  43. package/src/widgets/form/MonthPicker.js +25 -21
  44. package/src/widgets/grid/Grid.js +3421 -3421
  45. package/src/widgets/nav/Route.js +102 -102
package/dist/charts.js CHANGED
@@ -3395,7 +3395,7 @@ var LineGraph = /*#__PURE__*/ (function (_Widget) {
3395
3395
  if (context.pointReducer && isArray(data.data)) {
3396
3396
  data.data.forEach(function (p, index) {
3397
3397
  if (data.area && _this2.y0Field)
3398
- context.pointReducer(p[_this2.xField], p[_this2.y0Field], data.name, p, data, index);
3398
+ context.pointReducer(p[_this2.xField], p[_this2.y0Field], data.name, p, data.data, index);
3399
3399
  context.pointReducer(p[_this2.xField], p[_this2.yField], data.name, p, data.data, index);
3400
3400
  });
3401
3401
  }
@@ -5517,29 +5517,48 @@ var PointReducer = /*#__PURE__*/ (function (_PureContainer) {
5517
5517
  }
5518
5518
  _inheritsLoose(PointReducer, _PureContainer);
5519
5519
  var _proto = PointReducer.prototype;
5520
- _proto.explore = function explore(context, instance) {
5520
+ _proto.declareData = function declareData() {
5521
+ var _PureContainer$protot;
5522
+ (_PureContainer$protot = _PureContainer.prototype.declareData).call.apply(
5523
+ _PureContainer$protot,
5524
+ [this].concat(Array.prototype.slice.call(arguments), [
5525
+ {
5526
+ filterParams: {
5527
+ structured: true,
5528
+ },
5529
+ },
5530
+ ]),
5531
+ );
5532
+ };
5533
+ _proto.prepareData = function prepareData(context, instance) {
5521
5534
  var _this = this;
5522
- var parentPointReducer = context.pointReducer;
5523
- instance.parentPointTracker = parentPointReducer;
5524
- if (!instance.pointReducer) {
5525
- var onMap = this.onMap && instance.getCallback("onMap");
5535
+ _PureContainer.prototype.prepareData.call(this, context, instance);
5536
+ instance.resetAccumulator = function () {
5526
5537
  var accumulator = {};
5527
- instance.resetAccumulator = function () {
5528
- accumulator = {};
5529
- if (_this.onInitAccumulator) instance.invoke("onInitAccumulator", accumulator, instance);
5530
- };
5531
- var pointFilter = null;
5532
- if (this.onCreatePointFilter) pointFilter = instance.invoke("onCreatePointFilter", instance);
5533
- instance.pointReducer = function (x, y, name, data, array, index) {
5534
- if (!pointFilter || pointFilter(x, y, name, data, array, index))
5535
- onMap(accumulator, x, y, name, data, array, index);
5536
- if (parentPointReducer) parentPointReducer(x, y, name, data, array, index);
5537
- };
5538
- instance.write = function () {
5539
- if (_this.onReduce) instance.invoke("onReduce", accumulator, instance);
5540
- };
5541
- }
5538
+ if (_this.onInitAccumulator) {
5539
+ instance.invoke("onInitAccumulator", accumulator, instance);
5540
+ instance.accumulator = accumulator;
5541
+ }
5542
+ };
5543
+ if (this.onCreatePointFilter)
5544
+ instance.pointFilter = instance.invoke("onCreatePointFilter", instance.data.filterParams, instance);
5545
+ };
5546
+ _proto.explore = function explore(context, instance) {
5547
+ var _this2 = this;
5542
5548
  instance.resetAccumulator();
5549
+ var parentPointReducer = context.pointReducer;
5550
+ instance.parentPointTracker = parentPointReducer;
5551
+ var pointFilter = instance.pointFilter;
5552
+ var accumulator = instance.accumulator;
5553
+ var onMap = this.onMap && instance.getCallback("onMap");
5554
+ instance.pointReducer = function (x, y, name, data, array, index) {
5555
+ if (!pointFilter || pointFilter(x, y, name, data, array, index))
5556
+ onMap(accumulator, x, y, name, data, array, index);
5557
+ if (parentPointReducer) parentPointReducer(x, y, name, data, array, index);
5558
+ };
5559
+ instance.write = function () {
5560
+ if (_this2.onReduce) instance.invoke("onReduce", accumulator, instance);
5561
+ };
5543
5562
  context.push("pointReducer", instance.pointReducer);
5544
5563
  _PureContainer.prototype.explore.call(this, context, instance);
5545
5564
  };