dce-reactkit 3.2.2-beta.23 → 3.2.2-beta.25

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
@@ -2803,9 +2803,11 @@ const LogReviewer = (props) => {
2803
2803
  // Add built-in LogMetadata
2804
2804
  // > Add "uncategorized" subcontext to each context
2805
2805
  Object.keys((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {}).forEach((context) => {
2806
- if (LogMetadata.Context
2806
+ if (
2807
+ // Context exists
2808
+ LogMetadata.Context
2807
2809
  // Context has children already
2808
- && typeof LogMetadata.Context[context] !== 'string') {
2810
+ && LogMetadata.Context[context] !== 'string') {
2809
2811
  LogMetadata.Context[context][LogBuiltInMetadata.Context.Uncategorized] = (LogBuiltInMetadata.Context.Uncategorized);
2810
2812
  }
2811
2813
  });
@@ -2823,6 +2825,7 @@ const LogReviewer = (props) => {
2823
2825
  LogMetadata.Target[target] = target;
2824
2826
  }
2825
2827
  });
2828
+ console.log(LogMetadata);
2826
2829
  /* -------------- State ------------- */
2827
2830
  // Create initial date filter state
2828
2831
  const today = getTimeInfoInET();
@@ -2853,8 +2856,10 @@ const LogReviewer = (props) => {
2853
2856
  // Case: subcontexts exist
2854
2857
  initContextFilterState[contextValue._] = {};
2855
2858
  Object.values(((_b = LogMetadata.Context) !== null && _b !== void 0 ? _b : {})[context]).forEach((subcontext) => {
2856
- const subcontextValue = contextValue[subcontext];
2857
- initContextFilterState[contextValue._][subcontextValue] = true;
2859
+ if (subcontext) {
2860
+ const subcontextValue = contextValue[subcontext];
2861
+ initContextFilterState[contextValue._][subcontextValue] = true;
2862
+ }
2858
2863
  });
2859
2864
  }
2860
2865
  });
@@ -3124,7 +3129,7 @@ const LogReviewer = (props) => {
3124
3129
  id: subcontext,
3125
3130
  name: genHumanReadableName(subcontext),
3126
3131
  isGroup: false,
3127
- checked: !!value[subcontext],
3132
+ checked: contextFilterState[context][subcontext],
3128
3133
  };
3129
3134
  }));
3130
3135
  const item = {
@@ -3137,18 +3142,13 @@ const LogReviewer = (props) => {
3137
3142
  }));
3138
3143
  // Create filter UI
3139
3144
  filterDrawer = (React__default["default"].createElement(ItemPicker, { title: "Context", items: pickableItems, onChanged: (updatedItems) => {
3140
- console.log('Items before:', pickableItems);
3141
- console.log('Updated Items:', updatedItems);
3142
3145
  // Update our state
3143
3146
  updatedItems.forEach((pickableItem) => {
3144
3147
  if (pickableItem.isGroup) {
3145
3148
  // Has subcontexts
3146
3149
  pickableItem.children.forEach((subcontextItem) => {
3147
3150
  if (!subcontextItem.isGroup) {
3148
- console.log('Update child:', pickableItem.id, subcontextItem.id, subcontextItem.checked);
3149
- console.log(contextFilterState);
3150
3151
  contextFilterState[pickableItem.id][subcontextItem.id] = (subcontextItem.checked);
3151
- console.log(contextFilterState);
3152
3152
  }
3153
3153
  });
3154
3154
  }
@@ -3157,6 +3157,7 @@ const LogReviewer = (props) => {
3157
3157
  contextFilterState[pickableItem.id] = (pickableItem.checked);
3158
3158
  }
3159
3159
  });
3160
+ console.log('New context filter state:', contextFilterState);
3160
3161
  dispatch({
3161
3162
  type: ActionType.UpdateContextFilterState,
3162
3163
  contextFilterState,