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/cjs/index.js CHANGED
@@ -2661,8 +2661,12 @@ const style = `
2661
2661
  background-color: transparent !important;
2662
2662
  padding-top: 0 !important;
2663
2663
  padding-bottom: 0 !important;
2664
+ padding-right: 1em !important;
2664
2665
  margin: 0 !important;
2665
- color: #333 !important;
2666
+ color: #444 !important;
2667
+
2668
+ right: 0 !important;
2669
+ position: absolute !important;
2666
2670
  }
2667
2671
  .LogReviewer-header-close-button:hover {
2668
2672
  border: 0 !important;
@@ -2785,10 +2789,33 @@ const LogReviewer = (props) => {
2785
2789
  /*------------------------------------------------------------------------*/
2786
2790
  /* Setup */
2787
2791
  /*------------------------------------------------------------------------*/
2788
- var _a, _b, _c, _d, _e, _f;
2792
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j;
2789
2793
  /* -------------- Props ------------- */
2790
2794
  // Destructure props
2791
2795
  const { LogMetadata, onClose, } = props;
2796
+ // Add built-in LogMetadata
2797
+ // > Add "uncategorized" subcontext to each context
2798
+ Object.keys((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {}).forEach((context) => {
2799
+ if (LogMetadata.Context
2800
+ // Context has children already
2801
+ && typeof LogMetadata.Context[context] !== 'string') {
2802
+ LogMetadata.Context[context][LogBuiltInMetadata.Context.Uncategorized] = (LogBuiltInMetadata.Context.Uncategorized);
2803
+ }
2804
+ });
2805
+ // > Add built-in contexts
2806
+ LogMetadata.Context = ((_b = LogMetadata.Context) !== null && _b !== void 0 ? _b : {});
2807
+ Object.keys(LogBuiltInMetadata.Context).forEach((context) => {
2808
+ if (LogMetadata.Context) {
2809
+ LogMetadata.Context[context] = context;
2810
+ }
2811
+ });
2812
+ // > Add built-in targets
2813
+ LogMetadata.Target = ((_c = LogMetadata.Target) !== null && _c !== void 0 ? _c : {});
2814
+ Object.keys(LogBuiltInMetadata.Target).forEach((target) => {
2815
+ if (LogMetadata.Target) {
2816
+ LogMetadata.Target[target] = target;
2817
+ }
2818
+ });
2792
2819
  /* -------------- State ------------- */
2793
2820
  // Create initial date filter state
2794
2821
  const today = getTimeInfoInET();
@@ -2808,7 +2835,7 @@ const LogReviewer = (props) => {
2808
2835
  };
2809
2836
  // Create initial context filter state
2810
2837
  const initContextFilterState = {};
2811
- Object.keys((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {}).forEach((context) => {
2838
+ Object.keys((_d = LogMetadata.Context) !== null && _d !== void 0 ? _d : {}).forEach((context) => {
2812
2839
  var _a, _b;
2813
2840
  const contextValue = ((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {})[context];
2814
2841
  if (typeof contextValue === 'string') {
@@ -2822,17 +2849,11 @@ const LogReviewer = (props) => {
2822
2849
  const subcontextValue = contextValue[subcontext];
2823
2850
  initContextFilterState[contextValue._][subcontextValue] = true;
2824
2851
  });
2825
- // Add uncategorized subcontext
2826
- initContextFilterState[contextValue._][LogBuiltInMetadata.Context.Uncategorized] = true;
2827
2852
  }
2828
2853
  });
2829
- // Add built-in contexts
2830
- Object.values(LogBuiltInMetadata.Context).forEach((context) => {
2831
- initContextFilterState[context] = true;
2832
- });
2833
2854
  // Create initial tag filter state
2834
2855
  const initTagFilterState = {};
2835
- Object.values((_b = LogMetadata.Tag) !== null && _b !== void 0 ? _b : {}).forEach((tagValue) => {
2856
+ Object.values((_e = LogMetadata.Tag) !== null && _e !== void 0 ? _e : {}).forEach((tagValue) => {
2836
2857
  initTagFilterState[tagValue] = true;
2837
2858
  });
2838
2859
  // Create advanced filter state
@@ -2859,7 +2880,7 @@ const LogReviewer = (props) => {
2859
2880
  target: {},
2860
2881
  action: {},
2861
2882
  };
2862
- Object.values((_c = LogMetadata.Target) !== null && _c !== void 0 ? _c : {}).forEach((target) => {
2883
+ Object.values((_f = LogMetadata.Target) !== null && _f !== void 0 ? _f : {}).forEach((target) => {
2863
2884
  initActionErrorFilterState.target[target] = true;
2864
2885
  });
2865
2886
  Object.values(LogAction$1).forEach((action) => {
@@ -3072,7 +3093,7 @@ const LogReviewer = (props) => {
3072
3093
  }
3073
3094
  else if (expandedFilterDrawer === FilterDrawer.Context) {
3074
3095
  // Create item picker items
3075
- const pickableItems = (Object.keys((_d = LogMetadata.Context) !== null && _d !== void 0 ? _d : {})
3096
+ const pickableItems = (Object.keys((_g = LogMetadata.Context) !== null && _g !== void 0 ? _g : {})
3076
3097
  .map((context) => {
3077
3098
  var _a;
3078
3099
  const value = ((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {})[context];
@@ -3179,8 +3200,8 @@ const LogReviewer = (props) => {
3179
3200
  } }));
3180
3201
  })),
3181
3202
  React__default["default"].createElement(ButtonInputGroup, { label: "Target" },
3182
- (Object.keys((_e = LogMetadata.Target) !== null && _e !== void 0 ? _e : {}).length === 0) && (React__default["default"].createElement("div", null, "This app does not have any targets yet.")),
3183
- Object.keys((_f = LogMetadata.Target) !== null && _f !== void 0 ? _f : {})
3203
+ (Object.keys((_h = LogMetadata.Target) !== null && _h !== void 0 ? _h : {}).length === 0) && (React__default["default"].createElement("div", null, "This app does not have any targets yet.")),
3204
+ Object.keys((_j = LogMetadata.Target) !== null && _j !== void 0 ? _j : {})
3184
3205
  .map((target, i) => {
3185
3206
  var _a;
3186
3207
  const description = genHumanReadableName(target);