dce-reactkit 3.2.2-beta.49 → 3.2.2-beta.50

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dce-reactkit",
3
- "version": "3.2.2-beta.49",
3
+ "version": "3.2.2-beta.50",
4
4
  "description": "Shared components for Harvard DCE apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -1151,7 +1151,7 @@ const LogReviewer: React.FC<Props> = (props) => {
1151
1151
  month={dateFilterState.startDate.month}
1152
1152
  day={dateFilterState.startDate.day}
1153
1153
  chooseFromPast
1154
- numMonthsToShow={12}
1154
+ numMonthsToShow={36}
1155
1155
  onChange={(month, day, year) => {
1156
1156
  dateFilterState.startDate = { month, day, year };
1157
1157
  handleDateRangeUpdated(dateFilterState);
@@ -1434,6 +1434,7 @@ const LogReviewer: React.FC<Props> = (props) => {
1434
1434
  text={description}
1435
1435
  ariaLabel={`include logs with target "${description}" in results`}
1436
1436
  checked={actionErrorFilterState.target[target]}
1437
+ noMarginOnRight
1437
1438
  onChanged={(checked) => {
1438
1439
  actionErrorFilterState.target[target] = checked;
1439
1440
  console.log(actionErrorFilterState, target, checked);
@@ -88,7 +88,7 @@ const SimpleDateChooser: React.FC<Props> = (props) => {
88
88
  let startMonth = today.month;
89
89
  if (chooseFromPast) {
90
90
  startMonth -= Math.max(0, numMonthsToShow - 1);
91
- if (startMonth <= 0) {
91
+ while (startMonth <= 0) {
92
92
  startMonth += 12;
93
93
  startYear -= 1;
94
94
  }
@@ -96,17 +96,13 @@ const SimpleDateChooser: React.FC<Props> = (props) => {
96
96
  for (let i = 0; i < numMonthsToShow; i++) {
97
97
  // Get month and year info
98
98
  const unmoddedMonth = (startMonth + i);
99
- const month = (
100
- unmoddedMonth > 12
101
- ? unmoddedMonth - 12
102
- : unmoddedMonth
103
- );
99
+ let month = unmoddedMonth;
100
+ while (month > 12) {
101
+ month -= 12;
102
+ }
104
103
  const monthName = getMonthName(month).full;
105
- const year = (
106
- unmoddedMonth > 12
107
- ? startYear + 1
108
- : startYear
109
- );
104
+ // Year is start year +1 for each 12 months
105
+ const year = (startYear + (Math.floor(unmoddedMonth / 12)));
110
106
 
111
107
  // Figure out which days are allowed
112
108
  const days = [];