cx 24.6.4 → 24.6.5

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 (38) hide show
  1. package/dist/charts.js +27 -29
  2. package/dist/data.js +26 -29
  3. package/dist/manifest.js +802 -796
  4. package/dist/svg.js +59 -56
  5. package/dist/ui.js +51 -52
  6. package/dist/util.js +56 -10
  7. package/dist/widgets.js +68 -69
  8. package/package.json +1 -1
  9. package/src/charts/Legend.js +151 -151
  10. package/src/charts/Marker.d.ts +96 -96
  11. package/src/charts/Marker.js +299 -299
  12. package/src/charts/axis/Axis.d.ts +96 -96
  13. package/src/charts/axis/NumericAxis.js +347 -347
  14. package/src/charts/axis/Stack.js +55 -55
  15. package/src/charts/axis/TimeAxis.js +7 -6
  16. package/src/data/Binding.spec.js +69 -69
  17. package/src/data/StringTemplate.spec.js +105 -105
  18. package/src/data/getAccessor.spec.js +11 -11
  19. package/src/ui/Controller.d.ts +182 -182
  20. package/src/ui/FocusManager.js +171 -171
  21. package/src/ui/Format.js +3 -3
  22. package/src/ui/Instance.d.ts +72 -72
  23. package/src/ui/index.d.ts +42 -42
  24. package/src/util/Format.js +6 -5
  25. package/src/util/date/index.d.ts +10 -9
  26. package/src/util/date/index.js +10 -9
  27. package/src/util/date/parseDateInvariant.d.ts +3 -0
  28. package/src/util/date/parseDateInvariant.js +20 -0
  29. package/src/widgets/drag-drop/DropZone.js +214 -214
  30. package/src/widgets/form/Calendar.js +7 -6
  31. package/src/widgets/form/DateTimeField.js +8 -5
  32. package/src/widgets/form/DateTimePicker.js +9 -8
  33. package/src/widgets/form/MonthField.js +8 -8
  34. package/src/widgets/form/MonthPicker.js +17 -16
  35. package/src/widgets/form/TextField.js +289 -289
  36. package/src/widgets/form/UploadButton.d.ts +34 -34
  37. package/src/widgets/grid/variables.scss +88 -88
  38. package/src/widgets/overlay/Dropdown.js +612 -612
@@ -26,6 +26,7 @@ import { isTouchEvent } from "../../util/isTouchEvent";
26
26
  import { getCursorPos } from "../overlay/captureMouse";
27
27
 
28
28
  import { enableCultureSensitiveFormatting } from "../../ui/Format";
29
+ import { parseDateInvariant } from "../../util";
29
30
  enableCultureSensitiveFormatting();
30
31
 
31
32
  export class MonthPicker extends Field {
@@ -59,7 +60,7 @@ export class MonthPicker extends Field {
59
60
  maxValue: undefined,
60
61
  maxExclusive: undefined,
61
62
  },
62
- ...arguments
63
+ ...arguments,
63
64
  );
64
65
  }
65
66
 
@@ -72,19 +73,19 @@ export class MonthPicker extends Field {
72
73
  disabled: data.disabled,
73
74
  };
74
75
 
75
- if (!this.range && data.value) data.date = monthStart(new Date(data.value));
76
+ if (!this.range && data.value) data.date = monthStart(parseDateInvariant(data.value));
76
77
 
77
78
  if (this.range) {
78
- if (data.from) data.from = monthStart(new Date(data.from));
79
+ if (data.from) data.from = monthStart(parseDateInvariant(data.from));
79
80
 
80
- if (data.to) data.to = monthStart(new Date(data.to));
81
+ if (data.to) data.to = monthStart(parseDateInvariant(data.to));
81
82
  }
82
83
 
83
- if (data.refDate) data.refDate = monthStart(new Date(data.refDate));
84
+ if (data.refDate) data.refDate = monthStart(parseDateInvariant(data.refDate));
84
85
 
85
- if (data.maxValue) data.maxValue = monthStart(new Date(data.maxValue));
86
+ if (data.maxValue) data.maxValue = monthStart(parseDateInvariant(data.maxValue));
86
87
 
87
- if (data.minValue) data.minValue = monthStart(new Date(data.minValue));
88
+ if (data.minValue) data.minValue = monthStart(parseDateInvariant(data.minValue));
88
89
 
89
90
  super.prepareData(...arguments);
90
91
  }
@@ -272,7 +273,7 @@ export class MonthPickerComponent extends VDOM.Component {
272
273
  cursorQuarter: (cursorQuarter + 3) % 4,
273
274
  cursorYear: cursorQuarter == 0 ? cursorYear - 1 : cursorYear,
274
275
  },
275
- { ensureVisible: true }
276
+ { ensureVisible: true },
276
277
  );
277
278
  else if (column == "M")
278
279
  if (cursorMonth > 3) this.moveCursor(e, { cursorMonth: cursorMonth - 3 }, { ensureVisible: true });
@@ -280,7 +281,7 @@ export class MonthPickerComponent extends VDOM.Component {
280
281
  this.moveCursor(
281
282
  e,
282
283
  { cursorMonth: cursorMonth + 9, cursorYear: cursorYear - 1 },
283
- { ensureVisible: true }
284
+ { ensureVisible: true },
284
285
  );
285
286
  break;
286
287
 
@@ -293,7 +294,7 @@ export class MonthPickerComponent extends VDOM.Component {
293
294
  cursorQuarter: (cursorQuarter + 1) % 4,
294
295
  cursorYear: cursorQuarter == 3 ? cursorYear + 1 : cursorYear,
295
296
  },
296
- { ensureVisible: true }
297
+ { ensureVisible: true },
297
298
  );
298
299
  else if (column == "M")
299
300
  if (cursorMonth < 10) this.moveCursor(e, { cursorMonth: cursorMonth + 3 }, { ensureVisible: true });
@@ -301,7 +302,7 @@ export class MonthPickerComponent extends VDOM.Component {
301
302
  this.moveCursor(
302
303
  e,
303
304
  { cursorMonth: cursorMonth - 9, cursorYear: cursorYear + 1 },
304
- { ensureVisible: true }
305
+ { ensureVisible: true },
305
306
  );
306
307
  break;
307
308
 
@@ -470,7 +471,7 @@ export class MonthPickerComponent extends VDOM.Component {
470
471
  onMouseUp={this.handleMouseUp}
471
472
  >
472
473
  {y}
473
- </th>
474
+ </th>,
474
475
  );
475
476
 
476
477
  for (let i = 0; i < 3; i++) {
@@ -500,7 +501,7 @@ export class MonthPickerComponent extends VDOM.Component {
500
501
  onTouchEnd={this.handleMouseUp}
501
502
  >
502
503
  {monthNames[m - 1].substr(0, 3)}
503
- </td>
504
+ </td>,
504
505
  );
505
506
  }
506
507
  row.push(
@@ -519,7 +520,7 @@ export class MonthPickerComponent extends VDOM.Component {
519
520
  onMouseUp={this.handleMouseUp}
520
521
  >
521
522
  {`Q${q + 1}`}
522
- </th>
523
+ </th>,
523
524
  );
524
525
  rows.push(row);
525
526
  }
@@ -568,7 +569,7 @@ export class MonthPickerComponent extends VDOM.Component {
568
569
  let visibleItems = ceil5(Math.ceil(this.dom.el.offsetHeight / this.state.yearHeight));
569
570
  let start = Math.max(
570
571
  startYear,
571
- startYear + floor5(Math.floor(this.dom.el.scrollTop / this.state.yearHeight)) - visibleItems
572
+ startYear + floor5(Math.floor(this.dom.el.scrollTop / this.state.yearHeight)) - visibleItems,
572
573
  );
573
574
  if (start != this.state.start && start + bufferSize <= endYear) {
574
575
  this.setState({
@@ -606,7 +607,7 @@ export class MonthPickerComponent extends VDOM.Component {
606
607
  this.dom.el.scrollTop =
607
608
  (this.state.cursorYear - startYear + yearCount / 2) * this.state.yearHeight -
608
609
  this.dom.el.offsetHeight / 2;
609
- }
610
+ },
610
611
  );
611
612
  }
612
613