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

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.17",
3
+ "version": "3.2.2-beta.18",
4
4
  "description": "Shared components for Harvard DCE apps",
5
5
  "main": "dist/cjs/index.js",
6
6
  "module": "dist/esm/index.js",
@@ -257,6 +257,17 @@ const style = `
257
257
  }
258
258
  `;
259
259
 
260
+ /*------------------------------------------------------------------------*/
261
+ /* Constants */
262
+ /*------------------------------------------------------------------------*/
263
+
264
+ const builtInContextToName = {
265
+ [LogBuiltInMetadata.Context.Uncategorized]: 'Uncategorized',
266
+ [LogBuiltInMetadata.Context.ServerRenderedErrorPage]: 'Server Rendered Error Page',
267
+ [LogBuiltInMetadata.Context.ServerEndpointError]: 'Server Endpoint Error',
268
+ [LogBuiltInMetadata.Context.ClientFatalError]: 'Client Fatal Error',
269
+ };
270
+
260
271
  /*------------------------------------------------------------------------*/
261
272
  /* Static Functions */
262
273
  /*------------------------------------------------------------------------*/
@@ -972,9 +983,8 @@ const LogReviewer: React.FC<Props> = (props) => {
972
983
  const item: PickableItem = {
973
984
  id: context,
974
985
  name: (
975
- (context === LogBuiltInMetadata.Context.Uncategorized)
976
- ? 'Uncategorized'
977
- : context
986
+ builtInContextToName[context]
987
+ ?? genHumanReadableName(context)
978
988
  ),
979
989
  isGroup: true,
980
990
  children,
@@ -989,6 +999,8 @@ const LogReviewer: React.FC<Props> = (props) => {
989
999
  title="Context"
990
1000
  items={pickableItems}
991
1001
  onChanged={(updatedItems) => {
1002
+ console.log('Items before:', pickableItems);
1003
+ console.log('Updated Items:', updatedItems);
992
1004
  // Update our state
993
1005
  updatedItems.forEach((pickableItem) => {
994
1006
  if (pickableItem.isGroup) {