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

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/esm/index.js CHANGED
@@ -2653,8 +2653,12 @@ const style = `
2653
2653
  background-color: transparent !important;
2654
2654
  padding-top: 0 !important;
2655
2655
  padding-bottom: 0 !important;
2656
+ padding-right: 1em !important;
2656
2657
  margin: 0 !important;
2657
- color: #333 !important;
2658
+ color: #444 !important;
2659
+
2660
+ right: 0 !important;
2661
+ position: absolute !important;
2658
2662
  }
2659
2663
  .LogReviewer-header-close-button:hover {
2660
2664
  border: 0 !important;
@@ -2777,10 +2781,33 @@ const LogReviewer = (props) => {
2777
2781
  /*------------------------------------------------------------------------*/
2778
2782
  /* Setup */
2779
2783
  /*------------------------------------------------------------------------*/
2780
- var _a, _b, _c, _d, _e, _f;
2784
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2781
2785
  /* -------------- Props ------------- */
2782
2786
  // Destructure props
2783
2787
  const { LogMetadata, onClose, } = props;
2788
+ // Add built-in LogMetadata
2789
+ // > Add "uncategorized" subcontext to each context
2790
+ Object.keys((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {}).forEach((context) => {
2791
+ if (LogMetadata.Context
2792
+ // Context has children already
2793
+ && typeof LogMetadata.Context[context] !== 'string') {
2794
+ LogMetadata.Context[context][LogBuiltInMetadata.Context.Uncategorized] = (LogBuiltInMetadata.Context.Uncategorized);
2795
+ }
2796
+ });
2797
+ // > Add built-in contexts
2798
+ LogMetadata.Context = ((_b = LogMetadata.Context) !== null && _b !== void 0 ? _b : {});
2799
+ Object.keys(LogBuiltInMetadata.Context).forEach((context) => {
2800
+ if (LogMetadata.Context) {
2801
+ LogMetadata.Context[context] = context;
2802
+ }
2803
+ });
2804
+ // > Add built-in targets
2805
+ LogMetadata.Target = ((_c = LogMetadata.Target) !== null && _c !== void 0 ? _c : {});
2806
+ Object.keys(LogBuiltInMetadata.Target).forEach((target) => {
2807
+ if (LogMetadata.Target) {
2808
+ LogMetadata.Target[target] = target;
2809
+ }
2810
+ });
2784
2811
  /* -------------- State ------------- */
2785
2812
  // Create initial date filter state
2786
2813
  const today = getTimeInfoInET();
@@ -2800,7 +2827,7 @@ const LogReviewer = (props) => {
2800
2827
  };
2801
2828
  // Create initial context filter state
2802
2829
  const initContextFilterState = {};
2803
- Object.keys((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {}).forEach((context) => {
2830
+ Object.keys((_d = LogMetadata.Context) !== null && _d !== void 0 ? _d : {}).forEach((context) => {
2804
2831
  var _a, _b;
2805
2832
  const contextValue = ((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {})[context];
2806
2833
  if (typeof contextValue === 'string') {
@@ -2814,17 +2841,11 @@ const LogReviewer = (props) => {
2814
2841
  const subcontextValue = contextValue[subcontext];
2815
2842
  initContextFilterState[contextValue._][subcontextValue] = true;
2816
2843
  });
2817
- // Add uncategorized subcontext
2818
- initContextFilterState[contextValue._][LogBuiltInMetadata.Context.Uncategorized] = true;
2819
2844
  }
2820
2845
  });
2821
- // Add built-in contexts
2822
- Object.values(LogBuiltInMetadata.Context).forEach((context) => {
2823
- initContextFilterState[context] = true;
2824
- });
2825
2846
  // Create initial tag filter state
2826
2847
  const initTagFilterState = {};
2827
- Object.values((_b = LogMetadata.Tag) !== null && _b !== void 0 ? _b : {}).forEach((tagValue) => {
2848
+ Object.values((_e = LogMetadata.Tag) !== null && _e !== void 0 ? _e : {}).forEach((tagValue) => {
2828
2849
  initTagFilterState[tagValue] = true;
2829
2850
  });
2830
2851
  // Create advanced filter state
@@ -2851,7 +2872,7 @@ const LogReviewer = (props) => {
2851
2872
  target: {},
2852
2873
  action: {},
2853
2874
  };
2854
- Object.values((_c = LogMetadata.Target) !== null && _c !== void 0 ? _c : {}).forEach((target) => {
2875
+ Object.values((_f = LogMetadata.Target) !== null && _f !== void 0 ? _f : {}).forEach((target) => {
2855
2876
  initActionErrorFilterState.target[target] = true;
2856
2877
  });
2857
2878
  Object.values(LogAction$1).forEach((action) => {
@@ -3064,7 +3085,7 @@ const LogReviewer = (props) => {
3064
3085
  }
3065
3086
  else if (expandedFilterDrawer === FilterDrawer.Context) {
3066
3087
  // Create item picker items
3067
- const pickableItems = (Object.keys((_d = LogMetadata.Context) !== null && _d !== void 0 ? _d : {})
3088
+ const pickableItems = (Object.keys((_g = LogMetadata.Context) !== null && _g !== void 0 ? _g : {})
3068
3089
  .map((context) => {
3069
3090
  var _a;
3070
3091
  const value = ((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {})[context];
@@ -3171,8 +3192,8 @@ const LogReviewer = (props) => {
3171
3192
  } }));
3172
3193
  })),
3173
3194
  React.createElement(ButtonInputGroup, { label: "Target" },
3174
- (Object.keys((_e = LogMetadata.Target) !== null && _e !== void 0 ? _e : {}).length === 0) && (React.createElement("div", null, "This app does not have any targets yet.")),
3175
- Object.keys((_f = LogMetadata.Target) !== null && _f !== void 0 ? _f : {})
3195
+ (Object.keys((_h = LogMetadata.Target) !== null && _h !== void 0 ? _h : {}).length === 0) && (React.createElement("div", null, "This app does not have any targets yet.")),
3196
+ Object.keys((_j = LogMetadata.Target) !== null && _j !== void 0 ? _j : {})
3176
3197
  .map((target, i) => {
3177
3198
  var _a;
3178
3199
  const description = genHumanReadableName(target);