cx 24.0.3 → 24.2.1

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 (46) hide show
  1. package/dist/charts.js +61 -63
  2. package/dist/data.js +50 -70
  3. package/dist/manifest.js +719 -713
  4. package/dist/svg.js +70 -71
  5. package/dist/ui.js +104 -112
  6. package/dist/util.js +94 -13
  7. package/dist/widgets.js +273 -257
  8. package/package.json +1 -1
  9. package/src/charts/ColorMap.js +4 -6
  10. package/src/charts/axis/Axis.d.ts +96 -96
  11. package/src/charts/axis/Axis.js +252 -252
  12. package/src/charts/axis/TimeAxis.js +7 -6
  13. package/src/data/Expression.js +212 -212
  14. package/src/data/Expression.spec.js +174 -174
  15. package/src/data/StringTemplate.spec.js +105 -105
  16. package/src/ui/Controller.d.ts +182 -182
  17. package/src/ui/FocusManager.js +171 -171
  18. package/src/ui/Format.js +88 -87
  19. package/src/ui/Instance.d.ts +72 -72
  20. package/src/ui/keyboardShortcuts.js +4 -5
  21. package/src/ui/selection/KeySelection.d.ts +1 -1
  22. package/src/ui/selection/PropertySelection.d.ts +1 -1
  23. package/src/ui/selection/PropertySelection.js +2 -4
  24. package/src/ui/selection/Selection.d.ts +1 -1
  25. package/src/util/Format.js +73 -86
  26. package/src/util/date/index.d.ts +10 -9
  27. package/src/util/date/index.js +10 -9
  28. package/src/util/date/parseDateInvariant.d.ts +3 -0
  29. package/src/util/date/parseDateInvariant.js +20 -0
  30. package/src/widgets/form/Calendar.js +27 -26
  31. package/src/widgets/form/ColorField.js +14 -9
  32. package/src/widgets/form/ColorPicker.scss +275 -275
  33. package/src/widgets/form/ColorPicker.variables.scss +22 -22
  34. package/src/widgets/form/DateTimeField.js +18 -11
  35. package/src/widgets/form/DateTimePicker.js +9 -8
  36. package/src/widgets/form/Label.js +88 -88
  37. package/src/widgets/form/LookupField.d.ts +8 -9
  38. package/src/widgets/form/MonthField.js +17 -13
  39. package/src/widgets/form/MonthPicker.js +17 -16
  40. package/src/widgets/form/NumberField.js +8 -4
  41. package/src/widgets/form/TextArea.js +10 -6
  42. package/src/widgets/form/TextField.js +11 -9
  43. package/src/widgets/form/UploadButton.d.ts +34 -34
  44. package/src/widgets/form/index.js +1 -2
  45. package/src/widgets/grid/Grid.d.ts +11 -8
  46. package/src/widgets/grid/Grid.js +3277 -3277
package/dist/svg.js CHANGED
@@ -91,80 +91,79 @@ Rect.prototype.r = 0; //right
91
91
  Rect.prototype.t = 0; //top
92
92
  Rect.prototype.b = 0; //bottom
93
93
 
94
- function _extends() {
95
- _extends = Object.assign
96
- ? Object.assign.bind()
97
- : function (target) {
98
- for (var i = 1; i < arguments.length; i++) {
99
- var source = arguments[i];
100
- for (var key in source) {
101
- if (Object.prototype.hasOwnProperty.call(source, key)) {
102
- target[key] = source[key];
103
- }
104
- }
105
- }
106
- return target;
107
- };
108
- return _extends.apply(this, arguments);
109
- }
110
- function _inheritsLoose(subClass, superClass) {
111
- subClass.prototype = Object.create(superClass.prototype);
112
- subClass.prototype.constructor = subClass;
113
- _setPrototypeOf(subClass, superClass);
94
+ function _arrayLikeToArray(r, a) {
95
+ (null == a || a > r.length) && (a = r.length);
96
+ for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e];
97
+ return n;
114
98
  }
115
- function _setPrototypeOf(o, p) {
116
- _setPrototypeOf = Object.setPrototypeOf
117
- ? Object.setPrototypeOf.bind()
118
- : function _setPrototypeOf(o, p) {
119
- o.__proto__ = p;
120
- return o;
121
- };
122
- return _setPrototypeOf(o, p);
123
- }
124
- function _unsupportedIterableToArray(o, minLen) {
125
- if (!o) return;
126
- if (typeof o === "string") return _arrayLikeToArray(o, minLen);
127
- var n = Object.prototype.toString.call(o).slice(8, -1);
128
- if (n === "Object" && o.constructor) n = o.constructor.name;
129
- if (n === "Map" || n === "Set") return Array.from(o);
130
- if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
131
- }
132
- function _arrayLikeToArray(arr, len) {
133
- if (len == null || len > arr.length) len = arr.length;
134
- for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
135
- return arr2;
136
- }
137
- function _createForOfIteratorHelperLoose(o, allowArrayLike) {
138
- var it = (typeof Symbol !== "undefined" && o[Symbol.iterator]) || o["@@iterator"];
139
- if (it) return (it = it.call(o)).next.bind(it);
140
- if (
141
- Array.isArray(o) ||
142
- (it = _unsupportedIterableToArray(o)) ||
143
- (allowArrayLike && o && typeof o.length === "number")
144
- ) {
145
- if (it) o = it;
146
- var i = 0;
99
+ function _createForOfIteratorHelperLoose(r, e) {
100
+ var t = ("undefined" != typeof Symbol && r[Symbol.iterator]) || r["@@iterator"];
101
+ if (t) return (t = t.call(r)).next.bind(t);
102
+ if (Array.isArray(r) || (t = _unsupportedIterableToArray(r)) || e) {
103
+ t && (r = t);
104
+ var o = 0;
147
105
  return function () {
148
- if (i >= o.length)
149
- return {
150
- done: true,
151
- };
152
- return {
153
- done: false,
154
- value: o[i++],
155
- };
106
+ return o >= r.length
107
+ ? {
108
+ done: !0,
109
+ }
110
+ : {
111
+ done: !1,
112
+ value: r[o++],
113
+ };
156
114
  };
157
115
  }
158
116
  throw new TypeError(
159
117
  "Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.",
160
118
  );
161
119
  }
120
+ function _extends() {
121
+ return (
122
+ (_extends = Object.assign
123
+ ? Object.assign.bind()
124
+ : function (n) {
125
+ for (var e = 1; e < arguments.length; e++) {
126
+ var t = arguments[e];
127
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
128
+ }
129
+ return n;
130
+ }),
131
+ _extends.apply(null, arguments)
132
+ );
133
+ }
134
+ function _inheritsLoose(t, o) {
135
+ (t.prototype = Object.create(o.prototype)), (t.prototype.constructor = t), _setPrototypeOf(t, o);
136
+ }
137
+ function _setPrototypeOf(t, e) {
138
+ return (
139
+ (_setPrototypeOf = Object.setPrototypeOf
140
+ ? Object.setPrototypeOf.bind()
141
+ : function (t, e) {
142
+ return (t.__proto__ = e), t;
143
+ }),
144
+ _setPrototypeOf(t, e)
145
+ );
146
+ }
147
+ function _unsupportedIterableToArray(r, a) {
148
+ if (r) {
149
+ if ("string" == typeof r) return _arrayLikeToArray(r, a);
150
+ var t = {}.toString.call(r).slice(8, -1);
151
+ return (
152
+ "Object" === t && r.constructor && (t = r.constructor.name),
153
+ "Map" === t || "Set" === t
154
+ ? Array.from(r)
155
+ : "Arguments" === t || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t)
156
+ ? _arrayLikeToArray(r, a)
157
+ : void 0
158
+ );
159
+ }
160
+ }
162
161
 
163
162
  var BoundedObject = /*#__PURE__*/ (function (_PureContainer) {
164
- _inheritsLoose(BoundedObject, _PureContainer);
165
163
  function BoundedObject() {
166
164
  return _PureContainer.apply(this, arguments) || this;
167
165
  }
166
+ _inheritsLoose(BoundedObject, _PureContainer);
168
167
  var _proto = BoundedObject.prototype;
169
168
  _proto.declareData = function declareData() {
170
169
  var _PureContainer$protot;
@@ -226,10 +225,10 @@ BoundedObject.prototype.isPureContainer = false;
226
225
  BoundedObject.prototype.styled = true;
227
226
 
228
227
  var Text = /*#__PURE__*/ (function (_BoundedObject) {
229
- _inheritsLoose(Text, _BoundedObject);
230
228
  function Text() {
231
229
  return _BoundedObject.apply(this, arguments) || this;
232
230
  }
231
+ _inheritsLoose(Text, _BoundedObject);
233
232
  var _proto = Text.prototype;
234
233
  _proto.declareData = function declareData() {
235
234
  var _BoundedObject$protot;
@@ -303,10 +302,10 @@ Text.prototype.autoAnchor = false;
303
302
  Widget.alias("svg.text", Text);
304
303
 
305
304
  var TextualBoundedObject = /*#__PURE__*/ (function (_BoundedObject) {
306
- _inheritsLoose(TextualBoundedObject, _BoundedObject);
307
305
  function TextualBoundedObject() {
308
306
  return _BoundedObject.apply(this, arguments) || this;
309
307
  }
308
+ _inheritsLoose(TextualBoundedObject, _BoundedObject);
310
309
  var _proto = TextualBoundedObject.prototype;
311
310
  _proto.add = function add(widget) {
312
311
  if (typeof widget != "string") return _BoundedObject.prototype.add.apply(this, arguments);
@@ -323,10 +322,10 @@ var TextualBoundedObject = /*#__PURE__*/ (function (_BoundedObject) {
323
322
  })(BoundedObject);
324
323
 
325
324
  var Svg = /*#__PURE__*/ (function (_BoundedObject) {
326
- _inheritsLoose(Svg, _BoundedObject);
327
325
  function Svg() {
328
326
  return _BoundedObject.apply(this, arguments) || this;
329
327
  }
328
+ _inheritsLoose(Svg, _BoundedObject);
330
329
  var _proto = Svg.prototype;
331
330
  _proto.initState = function initState(context, instance) {
332
331
  var size = {
@@ -397,10 +396,10 @@ function sameSize(a, b) {
397
396
  return a.width == b.width && a.height == b.height;
398
397
  }
399
398
  var SvgComponent = /*#__PURE__*/ (function (_VDOM$Component) {
400
- _inheritsLoose(SvgComponent, _VDOM$Component);
401
399
  function SvgComponent() {
402
400
  return _VDOM$Component.apply(this, arguments) || this;
403
401
  }
402
+ _inheritsLoose(SvgComponent, _VDOM$Component);
404
403
  var _proto2 = SvgComponent.prototype;
405
404
  _proto2.render = function render() {
406
405
  var _this = this;
@@ -513,10 +512,10 @@ var SvgComponent = /*#__PURE__*/ (function (_VDOM$Component) {
513
512
  Widget.alias("svg", Svg);
514
513
 
515
514
  var Rectangle = /*#__PURE__*/ (function (_TextualBoundedObject) {
516
- _inheritsLoose(Rectangle, _TextualBoundedObject);
517
515
  function Rectangle() {
518
516
  return _TextualBoundedObject.apply(this, arguments) || this;
519
517
  }
518
+ _inheritsLoose(Rectangle, _TextualBoundedObject);
520
519
  var _proto = Rectangle.prototype;
521
520
  _proto.declareData = function declareData() {
522
521
  var _TextualBoundedObject2;
@@ -564,10 +563,10 @@ Rectangle.prototype.anchors = "0 1 1 0";
564
563
  Widget.alias("rectangle", Rectangle);
565
564
 
566
565
  var ClipRect = /*#__PURE__*/ (function (_BoundedObject) {
567
- _inheritsLoose(ClipRect, _BoundedObject);
568
566
  function ClipRect() {
569
567
  return _BoundedObject.apply(this, arguments) || this;
570
568
  }
569
+ _inheritsLoose(ClipRect, _BoundedObject);
571
570
  var _proto = ClipRect.prototype;
572
571
  _proto.prepareBounds = function prepareBounds(context, instance) {
573
572
  _BoundedObject.prototype.prepareBounds.call(this, context, instance);
@@ -590,10 +589,10 @@ var ClipRect = /*#__PURE__*/ (function (_BoundedObject) {
590
589
  ClipRect.prototype.anchors = "0 1 1 0";
591
590
 
592
591
  var Ellipse = /*#__PURE__*/ (function (_TextualBoundedObject) {
593
- _inheritsLoose(Ellipse, _TextualBoundedObject);
594
592
  function Ellipse() {
595
593
  return _TextualBoundedObject.apply(this, arguments) || this;
596
594
  }
595
+ _inheritsLoose(Ellipse, _TextualBoundedObject);
597
596
  var _proto = Ellipse.prototype;
598
597
  _proto.declareData = function declareData() {
599
598
  var _TextualBoundedObject2;
@@ -641,10 +640,10 @@ Ellipse.prototype.anchors = "0 1 1 0";
641
640
  Widget.alias("ellipse", Ellipse);
642
641
 
643
642
  var Line = /*#__PURE__*/ (function (_TextualBoundedObject) {
644
- _inheritsLoose(Line, _TextualBoundedObject);
645
643
  function Line() {
646
644
  return _TextualBoundedObject.apply(this, arguments) || this;
647
645
  }
646
+ _inheritsLoose(Line, _TextualBoundedObject);
648
647
  var _proto = Line.prototype;
649
648
  _proto.declareData = function declareData() {
650
649
  var _TextualBoundedObject2;
@@ -689,10 +688,10 @@ Line.prototype.baseClass = "line";
689
688
  Widget.alias("line", Line);
690
689
 
691
690
  var NonOverlappingRect = /*#__PURE__*/ (function (_BoundedObject) {
692
- _inheritsLoose(NonOverlappingRect, _BoundedObject);
693
691
  function NonOverlappingRect() {
694
692
  return _BoundedObject.apply(this, arguments) || this;
695
693
  }
694
+ _inheritsLoose(NonOverlappingRect, _BoundedObject);
696
695
  var _proto = NonOverlappingRect.prototype;
697
696
  _proto.prepare = function prepare(context, instance) {
698
697
  _BoundedObject.prototype.prepare.call(this, context, instance); //calculate bounds
@@ -708,10 +707,10 @@ var NonOverlappingRect = /*#__PURE__*/ (function (_BoundedObject) {
708
707
  })(BoundedObject);
709
708
 
710
709
  var NonOverlappingRectGroup = /*#__PURE__*/ (function (_PureContainer) {
711
- _inheritsLoose(NonOverlappingRectGroup, _PureContainer);
712
710
  function NonOverlappingRectGroup() {
713
711
  return _PureContainer.apply(this, arguments) || this;
714
712
  }
713
+ _inheritsLoose(NonOverlappingRectGroup, _PureContainer);
715
714
  var _proto = NonOverlappingRectGroup.prototype;
716
715
  _proto.prepare = function prepare(context, instance) {
717
716
  instance.nonOverlappingObjects = [];