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.
package/dist/cjs/index.js CHANGED
@@ -519,14 +519,14 @@ const LOG_ROUTE_PATH = `${ROUTE_PATH_PREFIX}/log`;
519
519
  const LogBuiltInMetadata = {
520
520
  // Contexts
521
521
  Context: {
522
- Uncategorized: 'n/a',
523
- ServerRenderedErrorPage: '_server-rendered-error-page',
524
- ServerEndpointError: '_server-endpoint-error',
525
- ClientFatalError: '_client-fatal-error',
522
+ Uncategorized: 'Uncategorized',
523
+ ServerRenderedErrorPage: 'ServerRenderedErrorPage',
524
+ ServerEndpointError: 'ServerEndpointError',
525
+ ClientFatalError: 'ClientFatalError',
526
526
  },
527
527
  // Targets
528
528
  Target: {
529
- NoSpecificTarget: 'n/a',
529
+ NoTarget: 'NoTarget',
530
530
  },
531
531
  };
532
532
 
@@ -682,7 +682,7 @@ const logClientEvent = (opts) => __awaiter(void 0, void 0, void 0, function* ()
682
682
  ? opts.error.stack
683
683
  : undefined),
684
684
  target: (opts.action
685
- ? ((_g = opts.target) !== null && _g !== void 0 ? _g : LogBuiltInMetadata.Target.NoSpecificTarget)
685
+ ? ((_g = opts.target) !== null && _g !== void 0 ? _g : LogBuiltInMetadata.Target.NoTarget)
686
686
  : undefined),
687
687
  action: (opts.action
688
688
  ? opts.action
@@ -2674,15 +2674,6 @@ 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
- /*------------------------------------------------------------------------*/
2686
2677
  /* Static Functions */
2687
2678
  /*------------------------------------------------------------------------*/
2688
2679
  /**
@@ -2835,8 +2826,10 @@ const LogReviewer = (props) => {
2835
2826
  initContextFilterState[contextValue._][LogBuiltInMetadata.Context.Uncategorized] = true;
2836
2827
  }
2837
2828
  });
2838
- // Add uncategorized context
2839
- initContextFilterState[LogBuiltInMetadata.Context.Uncategorized] = true;
2829
+ // Add built-in contexts
2830
+ Object.values(LogBuiltInMetadata.Context).forEach((context) => {
2831
+ initContextFilterState[context] = true;
2832
+ });
2840
2833
  // Create initial tag filter state
2841
2834
  const initTagFilterState = {};
2842
2835
  Object.values((_b = LogMetadata.Tag) !== null && _b !== void 0 ? _b : {}).forEach((tagValue) => {
@@ -2872,6 +2865,10 @@ const LogReviewer = (props) => {
2872
2865
  Object.values(LogAction$1).forEach((action) => {
2873
2866
  initActionErrorFilterState.action[action] = true;
2874
2867
  });
2868
+ // Add built-in targets
2869
+ Object.values(LogBuiltInMetadata.Target).forEach((target) => {
2870
+ initActionErrorFilterState.target[target] = true;
2871
+ });
2875
2872
  // Initial state
2876
2873
  const initialState = {
2877
2874
  loading: true,
@@ -3077,7 +3074,7 @@ const LogReviewer = (props) => {
3077
3074
  // Create item picker items
3078
3075
  const pickableItems = (Object.keys((_d = LogMetadata.Context) !== null && _d !== void 0 ? _d : {})
3079
3076
  .map((context) => {
3080
- var _a, _b;
3077
+ var _a;
3081
3078
  const value = ((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {})[context];
3082
3079
  if (typeof value === 'string') {
3083
3080
  // No subcategories
@@ -3104,7 +3101,7 @@ const LogReviewer = (props) => {
3104
3101
  }));
3105
3102
  const item = {
3106
3103
  id: context,
3107
- name: ((_b = builtInContextToName[context]) !== null && _b !== void 0 ? _b : genHumanReadableName(context)),
3104
+ name: genHumanReadableName(context),
3108
3105
  isGroup: true,
3109
3106
  children,
3110
3107
  };
@@ -4873,7 +4870,7 @@ const genRouteHandler = (opts) => {
4873
4870
  }
4874
4871
  : {
4875
4872
  type: LogType$1.Action,
4876
- target: ((_m = opts.target) !== null && _m !== void 0 ? _m : LogBuiltInMetadata.Target.NoSpecificTarget),
4873
+ target: ((_m = opts.target) !== null && _m !== void 0 ? _m : LogBuiltInMetadata.Target.NoTarget),
4877
4874
  action: ((_o = opts.action) !== null && _o !== void 0 ? _o : LogAction$1.Unknown),
4878
4875
  });
4879
4876
  // Source-specific info