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/data.js CHANGED
@@ -111,67 +111,47 @@ function isBinding(value) {
111
111
  return value instanceof Binding;
112
112
  }
113
113
 
114
+ function _construct(t, e, r) {
115
+ if (_isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);
116
+ var o = [null];
117
+ o.push.apply(o, e);
118
+ var p = new (t.bind.apply(t, o))();
119
+ return p;
120
+ }
114
121
  function _extends() {
115
- _extends = Object.assign
116
- ? Object.assign.bind()
117
- : function (target) {
118
- for (var i = 1; i < arguments.length; i++) {
119
- var source = arguments[i];
120
- for (var key in source) {
121
- if (Object.prototype.hasOwnProperty.call(source, key)) {
122
- target[key] = source[key];
123
- }
122
+ return (
123
+ (_extends = Object.assign
124
+ ? Object.assign.bind()
125
+ : function (n) {
126
+ for (var e = 1; e < arguments.length; e++) {
127
+ var t = arguments[e];
128
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
124
129
  }
125
- }
126
- return target;
127
- };
128
- return _extends.apply(this, arguments);
129
- }
130
- function _inheritsLoose(subClass, superClass) {
131
- subClass.prototype = Object.create(superClass.prototype);
132
- subClass.prototype.constructor = subClass;
133
- _setPrototypeOf(subClass, superClass);
130
+ return n;
131
+ }),
132
+ _extends.apply(null, arguments)
133
+ );
134
134
  }
135
- function _setPrototypeOf(o, p) {
136
- _setPrototypeOf = Object.setPrototypeOf
137
- ? Object.setPrototypeOf.bind()
138
- : function _setPrototypeOf(o, p) {
139
- o.__proto__ = p;
140
- return o;
141
- };
142
- return _setPrototypeOf(o, p);
135
+ function _inheritsLoose(t, o) {
136
+ (t.prototype = Object.create(o.prototype)), (t.prototype.constructor = t), _setPrototypeOf(t, o);
143
137
  }
144
138
  function _isNativeReflectConstruct() {
145
- if (typeof Reflect === "undefined" || !Reflect.construct) return false;
146
- if (Reflect.construct.sham) return false;
147
- if (typeof Proxy === "function") return true;
148
139
  try {
149
- Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
150
- return true;
151
- } catch (e) {
152
- return false;
153
- }
154
- }
155
- function _construct(Parent, args, Class) {
156
- if (_isNativeReflectConstruct()) {
157
- _construct = Reflect.construct.bind();
158
- } else {
159
- _construct = function _construct(Parent, args, Class) {
160
- var a = [null];
161
- a.push.apply(a, args);
162
- var Constructor = Function.bind.apply(Parent, a);
163
- var instance = new Constructor();
164
- if (Class) _setPrototypeOf(instance, Class.prototype);
165
- return instance;
166
- };
167
- }
168
- return _construct.apply(null, arguments);
140
+ var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));
141
+ } catch (t) {}
142
+ return (_isNativeReflectConstruct = function () {
143
+ return !!t;
144
+ })();
169
145
  }
170
- function _assertThisInitialized(self) {
171
- if (self === void 0) {
172
- throw new ReferenceError("this hasn't been initialised - super() hasn't been called");
173
- }
174
- return self;
146
+ function _setPrototypeOf(t, e) {
147
+ return (
148
+ (_setPrototypeOf = Object.setPrototypeOf
149
+ ? Object.setPrototypeOf.bind()
150
+ : function (t, e) {
151
+ return (t.__proto__ = e), t;
152
+ }),
153
+ _setPrototypeOf(t, e)
154
+ );
175
155
  }
176
156
 
177
157
  function computable() {
@@ -495,14 +475,14 @@ function invalidateStringTemplateCache() {
495
475
  }
496
476
 
497
477
  var Ref = /*#__PURE__*/ (function (_Component) {
498
- _inheritsLoose(Ref, _Component);
499
478
  function Ref(config) {
500
479
  var _this;
501
480
  _this = _Component.call(this, config) || this;
502
- _this.get = _this.get.bind(_assertThisInitialized(_this));
503
- if (_this.set) _this.set = _this.set.bind(_assertThisInitialized(_this));
481
+ _this.get = _this.get.bind(_this);
482
+ if (_this.set) _this.set = _this.set.bind(_this);
504
483
  return _this;
505
484
  }
485
+ _inheritsLoose(Ref, _Component);
506
486
  var _proto = Ref.prototype;
507
487
  _proto.get = function get() {
508
488
  throw new Error("Ref's get method is not implemented.");
@@ -560,13 +540,13 @@ Ref.factory = function (alias, config, more) {
560
540
  };
561
541
 
562
542
  var StoreRef = /*#__PURE__*/ (function (_Ref) {
563
- _inheritsLoose(StoreRef, _Ref);
564
543
  function StoreRef(config) {
565
544
  var _this;
566
545
  _this = _Ref.call(this, config) || this;
567
546
  if (isAccessorChain(_this.path)) _this.path = _this.path.toString();
568
547
  return _this;
569
548
  }
549
+ _inheritsLoose(StoreRef, _Ref);
570
550
  var _proto = StoreRef.prototype;
571
551
  _proto.get = function get() {
572
552
  return this.store.get(this.path);
@@ -772,7 +752,6 @@ View.prototype.mutate = function () {
772
752
  };
773
753
 
774
754
  var SubscribableView = /*#__PURE__*/ (function (_View) {
775
- _inheritsLoose(SubscribableView, _View);
776
755
  function SubscribableView(config) {
777
756
  var _this;
778
757
  _this = _View.call(this, config) || this;
@@ -780,6 +759,7 @@ var SubscribableView = /*#__PURE__*/ (function (_View) {
780
759
  _this.changes = [];
781
760
  return _this;
782
761
  }
762
+ _inheritsLoose(SubscribableView, _View);
783
763
  var _proto = SubscribableView.prototype;
784
764
  _proto.subscribe = function subscribe(callback) {
785
765
  return this.subscribers.subscribe(callback);
@@ -824,7 +804,6 @@ var SubscribableView = /*#__PURE__*/ (function (_View) {
824
804
  SubscribableView.prototype.async = false;
825
805
 
826
806
  var Store = /*#__PURE__*/ (function (_SubscribableView) {
827
- _inheritsLoose(Store, _SubscribableView);
828
807
  function Store(config) {
829
808
  var _this;
830
809
  if (config === void 0) {
@@ -837,6 +816,7 @@ var Store = /*#__PURE__*/ (function (_SubscribableView) {
837
816
  };
838
817
  return _this;
839
818
  }
819
+ _inheritsLoose(Store, _SubscribableView);
840
820
  var _proto = Store.prototype;
841
821
  _proto.getData = function getData() {
842
822
  return this.data;
@@ -871,10 +851,10 @@ var Store = /*#__PURE__*/ (function (_SubscribableView) {
871
851
  Store.prototype.async = false;
872
852
 
873
853
  var ExposedRecordView = /*#__PURE__*/ (function (_View) {
874
- _inheritsLoose(ExposedRecordView, _View);
875
854
  function ExposedRecordView() {
876
855
  return _View.apply(this, arguments) || this;
877
856
  }
857
+ _inheritsLoose(ExposedRecordView, _View);
878
858
  var _proto = ExposedRecordView.prototype;
879
859
  _proto.getData = function getData() {
880
860
  if (this.sealed && this.meta.version === this.cache.version && this.cache.itemIndex === this.itemIndex)
@@ -936,10 +916,10 @@ var ExposedRecordView = /*#__PURE__*/ (function (_View) {
936
916
  ExposedRecordView.prototype.immutable = false;
937
917
 
938
918
  var ExposedValueView = /*#__PURE__*/ (function (_View) {
939
- _inheritsLoose(ExposedValueView, _View);
940
919
  function ExposedValueView() {
941
920
  return _View.apply(this, arguments) || this;
942
921
  }
922
+ _inheritsLoose(ExposedValueView, _View);
943
923
  var _proto = ExposedValueView.prototype;
944
924
  _proto.getData = function getData() {
945
925
  if (this.sealed && this.meta.version === this.cache.version && this.cache.key === this.key)
@@ -998,10 +978,10 @@ var ExposedValueView = /*#__PURE__*/ (function (_View) {
998
978
  ExposedValueView.prototype.immutable = false;
999
979
 
1000
980
  var ReadOnlyDataView = /*#__PURE__*/ (function (_View) {
1001
- _inheritsLoose(ReadOnlyDataView, _View);
1002
981
  function ReadOnlyDataView() {
1003
982
  return _View.apply(this, arguments) || this;
1004
983
  }
984
+ _inheritsLoose(ReadOnlyDataView, _View);
1005
985
  var _proto = ReadOnlyDataView.prototype;
1006
986
  _proto.getData = function getData() {
1007
987
  if (this.sealed && this.meta.version === this.cache.version && this.cache.data === this.data)
@@ -1026,10 +1006,10 @@ var ReadOnlyDataView = /*#__PURE__*/ (function (_View) {
1026
1006
  ReadOnlyDataView.prototype.immutable = false;
1027
1007
 
1028
1008
  var AugmentedViewBase = /*#__PURE__*/ (function (_View) {
1029
- _inheritsLoose(AugmentedViewBase, _View);
1030
1009
  function AugmentedViewBase() {
1031
1010
  return _View.apply(this, arguments) || this;
1032
1011
  }
1012
+ _inheritsLoose(AugmentedViewBase, _View);
1033
1013
  var _proto = AugmentedViewBase.prototype;
1034
1014
  _proto.getData = function getData() {
1035
1015
  if (this.meta.version === this.cache.version && this.sealed) return this.cache.result;
@@ -1088,10 +1068,10 @@ var AugmentedViewBase = /*#__PURE__*/ (function (_View) {
1088
1068
  AugmentedViewBase.prototype.immutable = false;
1089
1069
 
1090
1070
  var NestedDataView = /*#__PURE__*/ (function (_AugmentedViewBase) {
1091
- _inheritsLoose(NestedDataView, _AugmentedViewBase);
1092
1071
  function NestedDataView() {
1093
1072
  return _AugmentedViewBase.apply(this, arguments) || this;
1094
1073
  }
1074
+ _inheritsLoose(NestedDataView, _AugmentedViewBase);
1095
1075
  var _proto = NestedDataView.prototype;
1096
1076
  _proto.embedAugmentData = function embedAugmentData(result, parentStoreData) {
1097
1077
  if (this.nestedData) {
@@ -1112,10 +1092,10 @@ var NestedDataView = /*#__PURE__*/ (function (_AugmentedViewBase) {
1112
1092
  })(AugmentedViewBase);
1113
1093
 
1114
1094
  var ZoomIntoPropertyView = /*#__PURE__*/ (function (_NestedDataView) {
1115
- _inheritsLoose(ZoomIntoPropertyView, _NestedDataView);
1116
1095
  function ZoomIntoPropertyView() {
1117
1096
  return _NestedDataView.apply(this, arguments) || this;
1118
1097
  }
1098
+ _inheritsLoose(ZoomIntoPropertyView, _NestedDataView);
1119
1099
  var _proto = ZoomIntoPropertyView.prototype;
1120
1100
  _proto.getBaseData = function getBaseData(parentStoreData) {
1121
1101
  var x = this.binding.value(parentStoreData);
@@ -1869,10 +1849,10 @@ function diffArrays(oldArray, newArray, keyFn) {
1869
1849
  }
1870
1850
 
1871
1851
  var ArrayRef = /*#__PURE__*/ (function (_Ref) {
1872
- _inheritsLoose(ArrayRef, _Ref);
1873
1852
  function ArrayRef() {
1874
1853
  return _Ref.apply(this, arguments) || this;
1875
1854
  }
1855
+ _inheritsLoose(ArrayRef, _Ref);
1876
1856
  var _proto = ArrayRef.prototype;
1877
1857
  _proto.append = function append$1() {
1878
1858
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
@@ -1910,18 +1890,18 @@ var ArrayRef = /*#__PURE__*/ (function (_Ref) {
1910
1890
  })(Ref);
1911
1891
 
1912
1892
  var StoreProxy = /*#__PURE__*/ (function (_View) {
1913
- _inheritsLoose(StoreProxy, _View);
1914
1893
  function StoreProxy(getStore) {
1915
1894
  var _this;
1916
1895
  _this =
1917
1896
  _View.call(this, {
1918
1897
  store: getStore(),
1919
1898
  }) || this;
1920
- Object.defineProperty(_assertThisInitialized(_this), "store", {
1899
+ Object.defineProperty(_this, "store", {
1921
1900
  get: getStore,
1922
1901
  });
1923
1902
  return _this;
1924
1903
  }
1904
+ _inheritsLoose(StoreProxy, _View);
1925
1905
  var _proto = StoreProxy.prototype;
1926
1906
  _proto.getData = function getData() {
1927
1907
  return this.store.getData();
@@ -1930,10 +1910,10 @@ var StoreProxy = /*#__PURE__*/ (function (_View) {
1930
1910
  })(View);
1931
1911
 
1932
1912
  var ArrayElementView = /*#__PURE__*/ (function (_AugmentedViewBase) {
1933
- _inheritsLoose(ArrayElementView, _AugmentedViewBase);
1934
1913
  function ArrayElementView() {
1935
1914
  return _AugmentedViewBase.apply(this, arguments) || this;
1936
1915
  }
1916
+ _inheritsLoose(ArrayElementView, _AugmentedViewBase);
1937
1917
  var _proto = ArrayElementView.prototype;
1938
1918
  _proto.isExtraKey = function isExtraKey(key) {
1939
1919
  return key == this.recordAlias || key == this.indexAlias || key == this.lengthAlias;