dce-reactkit 3.2.2-beta.51 → 3.2.2-beta.53
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/cjs/index.js +14 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +14 -12
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/LogReviewer.tsx +33 -29
- package/src/components/SimpleDateChooser.tsx +2 -2
package/dist/esm/index.js
CHANGED
|
@@ -1377,7 +1377,7 @@ const SimpleDateChooser = (props) => {
|
|
|
1377
1377
|
const dayOptions = [];
|
|
1378
1378
|
choices.forEach((choice) => {
|
|
1379
1379
|
// Create month option
|
|
1380
|
-
monthOptions.push(React.createElement("option", { key: choice.month, value: choice.month
|
|
1380
|
+
monthOptions.push(React.createElement("option", { key: choice.month, value: `${choice.month}-${choice.year}`, "aria-label": `choose ${choice.choiceName}`, onSelect: () => {
|
|
1381
1381
|
onChange(choice.month, choice.days[0], choice.year);
|
|
1382
1382
|
} }, choice.choiceName));
|
|
1383
1383
|
if (month === choice.month) {
|
|
@@ -1392,7 +1392,7 @@ const SimpleDateChooser = (props) => {
|
|
|
1392
1392
|
}
|
|
1393
1393
|
});
|
|
1394
1394
|
return (React.createElement("div", { className: "SimpleDateChooser d-inline-block", "aria-label": `date chooser with selected date: ${month} ${day}, ${year}` },
|
|
1395
|
-
React.createElement("select", { "aria-label": `month for ${ariaLabel}`, className: "custom-select d-inline-block mr-1", style: { width: 'auto' }, id: `SimpleDateChooser-${name}-month`, value: month
|
|
1395
|
+
React.createElement("select", { "aria-label": `month for ${ariaLabel}`, className: "custom-select d-inline-block mr-1", style: { width: 'auto' }, id: `SimpleDateChooser-${name}-month`, value: `${month}-${year}`, onChange: (e) => {
|
|
1396
1396
|
const choice = choices[e.target.selectedIndex];
|
|
1397
1397
|
// Change day, month, and year
|
|
1398
1398
|
onChange(choice.month, choice.days[0], choice.year);
|
|
@@ -3434,7 +3434,7 @@ const LogReviewer = (props) => {
|
|
|
3434
3434
|
else if (expandedFilterDrawer === FilterDrawer.Context) {
|
|
3435
3435
|
// Create item picker items
|
|
3436
3436
|
const builtInPickableItem = {
|
|
3437
|
-
id: '
|
|
3437
|
+
id: 'built-in-contexts',
|
|
3438
3438
|
name: 'Auto-logged',
|
|
3439
3439
|
isGroup: true,
|
|
3440
3440
|
children: [],
|
|
@@ -3461,6 +3461,7 @@ const LogReviewer = (props) => {
|
|
|
3461
3461
|
// Add to pickable items list
|
|
3462
3462
|
pickableItems.push(item);
|
|
3463
3463
|
}
|
|
3464
|
+
return;
|
|
3464
3465
|
}
|
|
3465
3466
|
// Has subcategories
|
|
3466
3467
|
const children = (Object.keys(value)
|
|
@@ -3493,7 +3494,7 @@ const LogReviewer = (props) => {
|
|
|
3493
3494
|
updatedItems.forEach((pickableItem) => {
|
|
3494
3495
|
if (pickableItem.isGroup) {
|
|
3495
3496
|
// Has subcontexts
|
|
3496
|
-
if (pickableItem.id === '
|
|
3497
|
+
if (pickableItem.id === 'built-in-contexts') {
|
|
3497
3498
|
// Built-in
|
|
3498
3499
|
// Treat as if these were top-level contexts
|
|
3499
3500
|
pickableItem.children.forEach((subcontextItem) => {
|
|
@@ -3524,18 +3525,19 @@ const LogReviewer = (props) => {
|
|
|
3524
3525
|
else if (expandedFilterDrawer === FilterDrawer.Tag) {
|
|
3525
3526
|
// Create filter UI
|
|
3526
3527
|
filterDrawer = (React.createElement(TabBox, { title: "Tags" },
|
|
3527
|
-
React.createElement("div", null, "If any are selected, logs must contain at least one but not necessarily all of the selected tags."),
|
|
3528
|
-
Object.keys((_f = LogMetadata.Tag) !== null && _f !== void 0 ? _f : {})
|
|
3529
|
-
.map((tag
|
|
3528
|
+
React.createElement("div", null, "If any tags are selected, logs must contain at least one (but not necessarily all) of the selected tags."),
|
|
3529
|
+
React.createElement("div", { className: "d-flex gap-1 flex-wrap" }, Object.keys((_f = LogMetadata.Tag) !== null && _f !== void 0 ? _f : {})
|
|
3530
|
+
.map((tag) => {
|
|
3530
3531
|
const description = genHumanReadableName(tag);
|
|
3531
|
-
return (React.createElement(CheckboxButton, { id: `LogReviewer-tag-${tag}-checkbox`, text: description, ariaLabel: `require that logs be tagged with "${description}" or any other selected tag`,
|
|
3532
|
+
return (React.createElement(CheckboxButton, { key: tag, id: `LogReviewer-tag-${tag}-checkbox`, text: description, ariaLabel: `require that logs be tagged with "${description}" or any other selected tag`, checked: tagFilterState[tag], onChanged: (checked) => {
|
|
3532
3533
|
tagFilterState[tag] = checked;
|
|
3534
|
+
console.log(tagFilterState);
|
|
3533
3535
|
dispatch({
|
|
3534
3536
|
type: ActionType.UpdateTagFilterState,
|
|
3535
3537
|
tagFilterState,
|
|
3536
3538
|
});
|
|
3537
3539
|
} }));
|
|
3538
|
-
})));
|
|
3540
|
+
}))));
|
|
3539
3541
|
}
|
|
3540
3542
|
else if (expandedFilterDrawer === FilterDrawer.Action) {
|
|
3541
3543
|
// Create filter UI
|
|
@@ -3616,7 +3618,7 @@ const LogReviewer = (props) => {
|
|
|
3616
3618
|
else if (expandedFilterDrawer === FilterDrawer.Advanced) {
|
|
3617
3619
|
// Create advanced filter ui
|
|
3618
3620
|
filterDrawer = (React.createElement(React.Fragment, null,
|
|
3619
|
-
React.createElement(TabBox, { title: "User
|
|
3621
|
+
React.createElement(TabBox, { title: "User" },
|
|
3620
3622
|
React.createElement("div", { className: "input-group mb-2" },
|
|
3621
3623
|
React.createElement("span", { className: "input-group-text" }, "User First Name"),
|
|
3622
3624
|
React.createElement("input", { type: "text", className: "form-control", "aria-label": "query for user first name", value: advancedFilterState.userFirstName, placeholder: "e.g. Divardo", onChange: (e) => {
|
|
@@ -3681,7 +3683,7 @@ const LogReviewer = (props) => {
|
|
|
3681
3683
|
advancedFilterState,
|
|
3682
3684
|
});
|
|
3683
3685
|
}, checked: advancedFilterState.includeAdmins, ariaLabel: "show logs from admins" }))),
|
|
3684
|
-
React.createElement(TabBox, { title: "Course
|
|
3686
|
+
React.createElement(TabBox, { title: "Course" },
|
|
3685
3687
|
React.createElement("div", { className: "input-group mb-2" },
|
|
3686
3688
|
React.createElement("span", { className: "input-group-text" }, "Course Name"),
|
|
3687
3689
|
React.createElement("input", { type: "text", className: "form-control", "aria-label": "query for course name", value: advancedFilterState.courseName, placeholder: "e.g. GLC 200", onChange: (e) => {
|
|
@@ -3705,7 +3707,7 @@ const LogReviewer = (props) => {
|
|
|
3705
3707
|
advancedFilterState,
|
|
3706
3708
|
});
|
|
3707
3709
|
} }))),
|
|
3708
|
-
React.createElement(TabBox, { title: "Device
|
|
3710
|
+
React.createElement(TabBox, { title: "Device" },
|
|
3709
3711
|
React.createElement(ButtonInputGroup, { label: "Device Type" },
|
|
3710
3712
|
React.createElement(RadioButton, { text: "All Devices", ariaLabel: "show logs from all devices", selected: advancedFilterState.isMobile === undefined, onSelected: () => {
|
|
3711
3713
|
advancedFilterState.isMobile = undefined;
|