dce-reactkit 3.2.2-beta.16 → 3.2.2-beta.17

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.16",
3
+ "version": "3.2.2-beta.17",
4
4
  "description": "Shared components for Harvard DCE apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -34,6 +34,7 @@ import LogType from '../types/LogType';
34
34
  import LogAction from '../types/LogAction';
35
35
  import ParamType from '../types/ParamType';
36
36
  import IntelliTableColumn from '../types/IntelliTableColumn';
37
+ import LogBuiltInMetadata from '../types/LogBuiltInMetadata';
37
38
 
38
39
  // Import shared components
39
40
  import SimpleDateChooser from './SimpleDateChooser';
@@ -548,8 +549,12 @@ const LogReviewer: React.FC<Props> = (props) => {
548
549
  const subcontextValue = contextValue[subcontext];
549
550
  (initContextFilterState[contextValue._] as { [k: string]: boolean })[subcontextValue] = true;
550
551
  });
552
+ // Add uncategorized subcontext
553
+ (initContextFilterState[contextValue._] as { [k: string]: boolean })[LogBuiltInMetadata.Context.Uncategorized] = true;
551
554
  }
552
555
  });
556
+ // Add uncategorized context
557
+ initContextFilterState[LogBuiltInMetadata.Context.Uncategorized] = true;
553
558
 
554
559
  // Create initial tag filter state
555
560
  const initTagFilterState: TagFilterState = {};
@@ -966,7 +971,11 @@ const LogReviewer: React.FC<Props> = (props) => {
966
971
  );
967
972
  const item: PickableItem = {
968
973
  id: context,
969
- name: context,
974
+ name: (
975
+ (context === LogBuiltInMetadata.Context.Uncategorized)
976
+ ? 'Uncategorized'
977
+ : context
978
+ ),
970
979
  isGroup: true,
971
980
  children,
972
981
  };
@@ -1601,8 +1610,10 @@ const LogReviewer: React.FC<Props> = (props) => {
1601
1610
 
1602
1611
  // Subcontext doesn't match
1603
1612
  if (
1613
+ // Log context is not "uncategorized" (no point in further filters)
1614
+ log.context !== LogBuiltInMetadata.Context.Uncategorized
1604
1615
  // Log has a subcontext
1605
- log.subcontext
1616
+ && log.subcontext
1606
1617
  // Context has subcontexts
1607
1618
  && (
1608
1619
  contextFilterState[log.context]