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/esm/index.js CHANGED
@@ -2795,9 +2795,11 @@ const LogReviewer = (props) => {
2795
2795
  // Add built-in LogMetadata
2796
2796
  // > Add "uncategorized" subcontext to each context
2797
2797
  Object.keys((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {}).forEach((context) => {
2798
- if (LogMetadata.Context
2798
+ if (
2799
+ // Context exists
2800
+ LogMetadata.Context
2799
2801
  // Context has children already
2800
- && typeof LogMetadata.Context[context] !== 'string') {
2802
+ && LogMetadata.Context[context] !== 'string') {
2801
2803
  LogMetadata.Context[context][LogBuiltInMetadata.Context.Uncategorized] = (LogBuiltInMetadata.Context.Uncategorized);
2802
2804
  }
2803
2805
  });
@@ -2815,6 +2817,7 @@ const LogReviewer = (props) => {
2815
2817
  LogMetadata.Target[target] = target;
2816
2818
  }
2817
2819
  });
2820
+ console.log(LogMetadata);
2818
2821
  /* -------------- State ------------- */
2819
2822
  // Create initial date filter state
2820
2823
  const today = getTimeInfoInET();
@@ -2845,8 +2848,10 @@ const LogReviewer = (props) => {
2845
2848
  // Case: subcontexts exist
2846
2849
  initContextFilterState[contextValue._] = {};
2847
2850
  Object.values(((_b = LogMetadata.Context) !== null && _b !== void 0 ? _b : {})[context]).forEach((subcontext) => {
2848
- const subcontextValue = contextValue[subcontext];
2849
- initContextFilterState[contextValue._][subcontextValue] = true;
2851
+ if (subcontext) {
2852
+ const subcontextValue = contextValue[subcontext];
2853
+ initContextFilterState[contextValue._][subcontextValue] = true;
2854
+ }
2850
2855
  });
2851
2856
  }
2852
2857
  });
@@ -3116,7 +3121,7 @@ const LogReviewer = (props) => {
3116
3121
  id: subcontext,
3117
3122
  name: genHumanReadableName(subcontext),
3118
3123
  isGroup: false,
3119
- checked: !!value[subcontext],
3124
+ checked: contextFilterState[context][subcontext],
3120
3125
  };
3121
3126
  }));
3122
3127
  const item = {
@@ -3129,18 +3134,13 @@ const LogReviewer = (props) => {
3129
3134
  }));
3130
3135
  // Create filter UI
3131
3136
  filterDrawer = (React.createElement(ItemPicker, { title: "Context", items: pickableItems, onChanged: (updatedItems) => {
3132
- console.log('Items before:', pickableItems);
3133
- console.log('Updated Items:', updatedItems);
3134
3137
  // Update our state
3135
3138
  updatedItems.forEach((pickableItem) => {
3136
3139
  if (pickableItem.isGroup) {
3137
3140
  // Has subcontexts
3138
3141
  pickableItem.children.forEach((subcontextItem) => {
3139
3142
  if (!subcontextItem.isGroup) {
3140
- console.log('Update child:', pickableItem.id, subcontextItem.id, subcontextItem.checked);
3141
- console.log(contextFilterState);
3142
3143
  contextFilterState[pickableItem.id][subcontextItem.id] = (subcontextItem.checked);
3143
- console.log(contextFilterState);
3144
3144
  }
3145
3145
  });
3146
3146
  }
@@ -3149,6 +3149,7 @@ const LogReviewer = (props) => {
3149
3149
  contextFilterState[pickableItem.id] = (pickableItem.checked);
3150
3150
  }
3151
3151
  });
3152
+ console.log('New context filter state:', contextFilterState);
3152
3153
  dispatch({
3153
3154
  type: ActionType.UpdateContextFilterState,
3154
3155
  contextFilterState,