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

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.
@@ -10,7 +10,7 @@ declare const LogBuiltInMetadata: {
10
10
  ClientFatalError: string;
11
11
  };
12
12
  Target: {
13
- NoSpecificTarget: string;
13
+ NoTarget: string;
14
14
  };
15
15
  };
16
16
  export default LogBuiltInMetadata;
package/dist/esm/index.js CHANGED
@@ -511,14 +511,14 @@ const LOG_ROUTE_PATH = `${ROUTE_PATH_PREFIX}/log`;
511
511
  const LogBuiltInMetadata = {
512
512
  // Contexts
513
513
  Context: {
514
- Uncategorized: 'n/a',
515
- ServerRenderedErrorPage: '_server-rendered-error-page',
516
- ServerEndpointError: '_server-endpoint-error',
517
- ClientFatalError: '_client-fatal-error',
514
+ Uncategorized: 'Uncategorized',
515
+ ServerRenderedErrorPage: 'ServerRenderedErrorPage',
516
+ ServerEndpointError: 'ServerEndpointError',
517
+ ClientFatalError: 'ClientFatalError',
518
518
  },
519
519
  // Targets
520
520
  Target: {
521
- NoSpecificTarget: 'n/a',
521
+ NoTarget: 'NoTarget',
522
522
  },
523
523
  };
524
524
 
@@ -674,7 +674,7 @@ const logClientEvent = (opts) => __awaiter(void 0, void 0, void 0, function* ()
674
674
  ? opts.error.stack
675
675
  : undefined),
676
676
  target: (opts.action
677
- ? ((_g = opts.target) !== null && _g !== void 0 ? _g : LogBuiltInMetadata.Target.NoSpecificTarget)
677
+ ? ((_g = opts.target) !== null && _g !== void 0 ? _g : LogBuiltInMetadata.Target.NoTarget)
678
678
  : undefined),
679
679
  action: (opts.action
680
680
  ? opts.action
@@ -2666,15 +2666,6 @@ const style = `
2666
2666
  }
2667
2667
  `;
2668
2668
  /*------------------------------------------------------------------------*/
2669
- /* Constants */
2670
- /*------------------------------------------------------------------------*/
2671
- const builtInContextToName = {
2672
- [LogBuiltInMetadata.Context.Uncategorized]: 'Uncategorized',
2673
- [LogBuiltInMetadata.Context.ServerRenderedErrorPage]: 'Server Rendered Error Page',
2674
- [LogBuiltInMetadata.Context.ServerEndpointError]: 'Server Endpoint Error',
2675
- [LogBuiltInMetadata.Context.ClientFatalError]: 'Client Fatal Error',
2676
- };
2677
- /*------------------------------------------------------------------------*/
2678
2669
  /* Static Functions */
2679
2670
  /*------------------------------------------------------------------------*/
2680
2671
  /**
@@ -2827,8 +2818,10 @@ const LogReviewer = (props) => {
2827
2818
  initContextFilterState[contextValue._][LogBuiltInMetadata.Context.Uncategorized] = true;
2828
2819
  }
2829
2820
  });
2830
- // Add uncategorized context
2831
- initContextFilterState[LogBuiltInMetadata.Context.Uncategorized] = true;
2821
+ // Add built-in contexts
2822
+ Object.values(LogBuiltInMetadata.Context).forEach((context) => {
2823
+ initContextFilterState[context] = true;
2824
+ });
2832
2825
  // Create initial tag filter state
2833
2826
  const initTagFilterState = {};
2834
2827
  Object.values((_b = LogMetadata.Tag) !== null && _b !== void 0 ? _b : {}).forEach((tagValue) => {
@@ -2864,6 +2857,10 @@ const LogReviewer = (props) => {
2864
2857
  Object.values(LogAction$1).forEach((action) => {
2865
2858
  initActionErrorFilterState.action[action] = true;
2866
2859
  });
2860
+ // Add built-in targets
2861
+ Object.values(LogBuiltInMetadata.Target).forEach((target) => {
2862
+ initActionErrorFilterState.target[target] = true;
2863
+ });
2867
2864
  // Initial state
2868
2865
  const initialState = {
2869
2866
  loading: true,
@@ -3069,7 +3066,7 @@ const LogReviewer = (props) => {
3069
3066
  // Create item picker items
3070
3067
  const pickableItems = (Object.keys((_d = LogMetadata.Context) !== null && _d !== void 0 ? _d : {})
3071
3068
  .map((context) => {
3072
- var _a, _b;
3069
+ var _a;
3073
3070
  const value = ((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {})[context];
3074
3071
  if (typeof value === 'string') {
3075
3072
  // No subcategories
@@ -3096,7 +3093,7 @@ const LogReviewer = (props) => {
3096
3093
  }));
3097
3094
  const item = {
3098
3095
  id: context,
3099
- name: ((_b = builtInContextToName[context]) !== null && _b !== void 0 ? _b : genHumanReadableName(context)),
3096
+ name: genHumanReadableName(context),
3100
3097
  isGroup: true,
3101
3098
  children,
3102
3099
  };
@@ -4865,7 +4862,7 @@ const genRouteHandler = (opts) => {
4865
4862
  }
4866
4863
  : {
4867
4864
  type: LogType$1.Action,
4868
- target: ((_m = opts.target) !== null && _m !== void 0 ? _m : LogBuiltInMetadata.Target.NoSpecificTarget),
4865
+ target: ((_m = opts.target) !== null && _m !== void 0 ? _m : LogBuiltInMetadata.Target.NoTarget),
4869
4866
  action: ((_o = opts.action) !== null && _o !== void 0 ? _o : LogAction$1.Unknown),
4870
4867
  });
4871
4868
  // Source-specific info