dce-reactkit 3.2.2-beta.53 → 3.2.2-beta.55

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.53",
3
+ "version": "3.2.2-beta.55",
4
4
  "description": "Shared components for Harvard DCE apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -765,7 +765,7 @@ const LogReviewer: React.FC<Props> = (props) => {
765
765
 
766
766
  // Create initial context filter state
767
767
  const initContextFilterState: ContextFilterState = {};
768
- Object.keys(LogMetadata.Context ?? {}).forEach((context) => {
768
+ Object.keys(contextMap).forEach((context) => {
769
769
  const contextValue = (LogMetadata.Context ?? {})[context];
770
770
  if (typeof contextValue === 'string') {
771
771
  // Case: no subcontexts, init as checked
@@ -773,7 +773,7 @@ const LogReviewer: React.FC<Props> = (props) => {
773
773
  } else {
774
774
  // Case: subcontexts exist
775
775
  initContextFilterState[context] = {};
776
- Object.values((LogMetadata.Context ?? {})[context]).forEach((subcontext) => {
776
+ Object.values(contextMap[context]).forEach((subcontext) => {
777
777
  // Skip self ("_")
778
778
  if (subcontext === '_') {
779
779
  return;
@@ -816,16 +816,12 @@ const LogReviewer: React.FC<Props> = (props) => {
816
816
  target: {},
817
817
  action: {},
818
818
  };
819
- Object.values(LogMetadata.Target ?? {}).forEach((target) => {
819
+ Object.values(targetMap).forEach((target) => {
820
820
  initActionErrorFilterState.target[target] = true;
821
821
  });
822
822
  Object.values(LogAction).forEach((action) => {
823
823
  initActionErrorFilterState.action[action] = true;
824
824
  });
825
- // Add built-in targets
826
- Object.values(LogBuiltInMetadata.Target).forEach((target) => {
827
- initActionErrorFilterState.target[target] = true;
828
- });
829
825
 
830
826
  // Initial state
831
827
  const initialState: State = {
@@ -1203,7 +1199,7 @@ const LogReviewer: React.FC<Props> = (props) => {
1203
1199
  const pickableItems: PickableItem[] = [];
1204
1200
  Object.keys(contextMap)
1205
1201
  .forEach((context) => {
1206
- const value = (contextMap)[context];
1202
+ const value = contextMap[context];
1207
1203
  if (typeof value === 'string') {
1208
1204
  // No subcategories
1209
1205
  const item: PickableItem = {
@@ -1264,7 +1260,6 @@ const LogReviewer: React.FC<Props> = (props) => {
1264
1260
  if (pickableItem.isGroup) {
1265
1261
  // Has subcontexts
1266
1262
 
1267
-
1268
1263
  if (pickableItem.id === 'built-in-contexts') {
1269
1264
  // Built-in
1270
1265
 
@@ -1411,7 +1406,6 @@ const LogReviewer: React.FC<Props> = (props) => {
1411
1406
  checked={actionErrorFilterState.action[action]}
1412
1407
  onChanged={(checked) => {
1413
1408
  actionErrorFilterState.action[action] = checked;
1414
- console.log(actionErrorFilterState, action, checked);
1415
1409
  dispatch({
1416
1410
  type: ActionType.UpdateActionErrorFilterState,
1417
1411
  actionErrorFilterState,
@@ -1441,7 +1435,6 @@ const LogReviewer: React.FC<Props> = (props) => {
1441
1435
  noMarginOnRight
1442
1436
  onChanged={(checked) => {
1443
1437
  actionErrorFilterState.target[target] = checked;
1444
- console.log(actionErrorFilterState, target, checked);
1445
1438
  dispatch({
1446
1439
  type: ActionType.UpdateActionErrorFilterState,
1447
1440
  actionErrorFilterState,