dce-reactkit 3.2.2-beta.16 → 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/dist/cjs/index.js CHANGED
@@ -2674,6 +2674,15 @@ const style = `
2674
2674
  }
2675
2675
  `;
2676
2676
  /*------------------------------------------------------------------------*/
2677
+ /* Constants */
2678
+ /*------------------------------------------------------------------------*/
2679
+ const builtInContextToName = {
2680
+ [LogBuiltInMetadata.Context.Uncategorized]: 'Uncategorized',
2681
+ [LogBuiltInMetadata.Context.ServerRenderedErrorPage]: 'Server Rendered Error Page',
2682
+ [LogBuiltInMetadata.Context.ServerEndpointError]: 'Server Endpoint Error',
2683
+ [LogBuiltInMetadata.Context.ClientFatalError]: 'Client Fatal Error',
2684
+ };
2685
+ /*------------------------------------------------------------------------*/
2677
2686
  /* Static Functions */
2678
2687
  /*------------------------------------------------------------------------*/
2679
2688
  /**
@@ -2822,8 +2831,12 @@ const LogReviewer = (props) => {
2822
2831
  const subcontextValue = contextValue[subcontext];
2823
2832
  initContextFilterState[contextValue._][subcontextValue] = true;
2824
2833
  });
2834
+ // Add uncategorized subcontext
2835
+ initContextFilterState[contextValue._][LogBuiltInMetadata.Context.Uncategorized] = true;
2825
2836
  }
2826
2837
  });
2838
+ // Add uncategorized context
2839
+ initContextFilterState[LogBuiltInMetadata.Context.Uncategorized] = true;
2827
2840
  // Create initial tag filter state
2828
2841
  const initTagFilterState = {};
2829
2842
  Object.values((_b = LogMetadata.Tag) !== null && _b !== void 0 ? _b : {}).forEach((tagValue) => {
@@ -3064,7 +3077,7 @@ const LogReviewer = (props) => {
3064
3077
  // Create item picker items
3065
3078
  const pickableItems = (Object.keys((_d = LogMetadata.Context) !== null && _d !== void 0 ? _d : {})
3066
3079
  .map((context) => {
3067
- var _a;
3080
+ var _a, _b;
3068
3081
  const value = ((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {})[context];
3069
3082
  if (typeof value === 'string') {
3070
3083
  // No subcategories
@@ -3091,7 +3104,7 @@ const LogReviewer = (props) => {
3091
3104
  }));
3092
3105
  const item = {
3093
3106
  id: context,
3094
- name: context,
3107
+ name: ((_b = builtInContextToName[context]) !== null && _b !== void 0 ? _b : genHumanReadableName(context)),
3095
3108
  isGroup: true,
3096
3109
  children,
3097
3110
  };
@@ -3099,6 +3112,8 @@ const LogReviewer = (props) => {
3099
3112
  }));
3100
3113
  // Create filter UI
3101
3114
  filterDrawer = (React__default["default"].createElement(ItemPicker, { title: "Context", items: pickableItems, onChanged: (updatedItems) => {
3115
+ console.log('Items before:', pickableItems);
3116
+ console.log('Updated Items:', updatedItems);
3102
3117
  // Update our state
3103
3118
  updatedItems.forEach((pickableItem) => {
3104
3119
  if (pickableItem.isGroup) {
@@ -3420,8 +3435,10 @@ const LogReviewer = (props) => {
3420
3435
  }
3421
3436
  // Subcontext doesn't match
3422
3437
  if (
3423
- // Log has a subcontext
3424
- log.subcontext
3438
+ // Log context is not "uncategorized" (no point in further filters)
3439
+ log.context !== LogBuiltInMetadata.Context.Uncategorized
3440
+ // Log has a subcontext
3441
+ && log.subcontext
3425
3442
  // Context has subcontexts
3426
3443
  && (contextFilterState[log.context]
3427
3444
  && contextFilterState[log.context] !== false