cx 25.5.2 → 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.
- package/dist/charts.js +40 -21
- package/dist/manifest.js +741 -741
- package/dist/widgets.js +30 -24
- package/package.json +1 -1
- package/src/charts/LineGraph.js +1 -1
- package/src/charts/axis/NumericAxis.d.ts +46 -46
- package/src/charts/helpers/PointReducer.d.ts +9 -0
- package/src/charts/helpers/PointReducer.js +36 -22
- package/src/data/Ref.d.ts +24 -24
- package/src/data/Ref.spec.js +79 -79
- package/src/data/StoreRef.spec.js +24 -24
- package/src/data/StructuredDataAccessor.d.ts +7 -7
- package/src/data/SubscribableView.js +54 -54
- package/src/ui/createFunctionalComponent.d.ts +1 -1
- package/src/ui/index.d.ts +42 -42
- package/src/util/debounce.js +18 -18
- package/src/util/validatedDebounce.js +19 -19
- package/src/widgets/Button.js +118 -118
- package/src/widgets/form/Calendar.d.ts +86 -86
- package/src/widgets/form/Checkbox.js +203 -203
- package/src/widgets/form/MonthField.d.ts +5 -0
- package/src/widgets/form/MonthField.js +1 -0
- package/src/widgets/form/MonthPicker.d.ts +13 -0
- package/src/widgets/form/MonthPicker.js +25 -21
|
@@ -154,6 +154,7 @@ MonthPicker.prototype.range = false;
|
|
|
154
154
|
MonthPicker.prototype.startYear = 1980;
|
|
155
155
|
MonthPicker.prototype.endYear = 2030;
|
|
156
156
|
MonthPicker.prototype.bufferSize = 15;
|
|
157
|
+
MonthPicker.prototype.hideQuarters = false;
|
|
157
158
|
|
|
158
159
|
// Localization
|
|
159
160
|
MonthPicker.prototype.maxValueErrorText = "Select {0:d} or before.";
|
|
@@ -193,7 +194,7 @@ export class MonthPickerComponent extends VDOM.Component {
|
|
|
193
194
|
cursorQuarter: cursor.getMonth() / 3,
|
|
194
195
|
column: "M",
|
|
195
196
|
start: widget.startYear,
|
|
196
|
-
end: widget.startYear + widget.bufferSize,
|
|
197
|
+
end: Math.min(widget.startYear + widget.bufferSize, widget.endYear),
|
|
197
198
|
};
|
|
198
199
|
|
|
199
200
|
this.handleMouseDown = this.handleMouseDown.bind(this);
|
|
@@ -427,8 +428,9 @@ export class MonthPickerComponent extends VDOM.Component {
|
|
|
427
428
|
}
|
|
428
429
|
|
|
429
430
|
render() {
|
|
430
|
-
let {
|
|
431
|
-
let {
|
|
431
|
+
let { instance } = this.props;
|
|
432
|
+
let { data, widget } = instance;
|
|
433
|
+
let { CSS, baseClass, startYear, endYear, hideQuarters } = widget;
|
|
432
434
|
|
|
433
435
|
let years = [];
|
|
434
436
|
|
|
@@ -512,24 +514,26 @@ export class MonthPickerComponent extends VDOM.Component {
|
|
|
512
514
|
</td>,
|
|
513
515
|
);
|
|
514
516
|
}
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
517
|
+
|
|
518
|
+
if (!hideQuarters)
|
|
519
|
+
row.push(
|
|
520
|
+
<th
|
|
521
|
+
key={`q${q}`}
|
|
522
|
+
className={CSS.state({
|
|
523
|
+
cursor:
|
|
524
|
+
showCursor &&
|
|
525
|
+
this.state.column == "Q" &&
|
|
526
|
+
y == this.state.cursorYear &&
|
|
527
|
+
q == this.state.cursorQuarter,
|
|
528
|
+
})}
|
|
529
|
+
data-point={`Y-${y}-Q-${q}`}
|
|
530
|
+
onMouseEnter={this.handleMouseEnter}
|
|
531
|
+
onMouseDown={this.handleMouseDown}
|
|
532
|
+
onMouseUp={this.handleMouseUp}
|
|
533
|
+
>
|
|
534
|
+
{`Q${q + 1}`}
|
|
535
|
+
</th>,
|
|
536
|
+
);
|
|
533
537
|
rows.push(row);
|
|
534
538
|
}
|
|
535
539
|
years.push(rows);
|