dce-reactkit 3.2.2-beta.23 → 3.2.2-beta.24
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,7 +2803,9 @@ 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 (
|
|
2806
|
+
if (
|
|
2807
|
+
// Context exists
|
|
2808
|
+
LogMetadata.Context
|
|
2807
2809
|
// Context has children already
|
|
2808
2810
|
&& typeof LogMetadata.Context[context] !== 'string') {
|
|
2809
2811
|
LogMetadata.Context[context][LogBuiltInMetadata.Context.Uncategorized] = (LogBuiltInMetadata.Context.Uncategorized);
|
|
@@ -2853,8 +2855,10 @@ const LogReviewer = (props) => {
|
|
|
2853
2855
|
// Case: subcontexts exist
|
|
2854
2856
|
initContextFilterState[contextValue._] = {};
|
|
2855
2857
|
Object.values(((_b = LogMetadata.Context) !== null && _b !== void 0 ? _b : {})[context]).forEach((subcontext) => {
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
+
if (subcontext) {
|
|
2859
|
+
const subcontextValue = contextValue[subcontext];
|
|
2860
|
+
initContextFilterState[contextValue._][subcontextValue] = true;
|
|
2861
|
+
}
|
|
2858
2862
|
});
|
|
2859
2863
|
}
|
|
2860
2864
|
});
|
|
@@ -3137,18 +3141,13 @@ const LogReviewer = (props) => {
|
|
|
3137
3141
|
}));
|
|
3138
3142
|
// Create filter UI
|
|
3139
3143
|
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
3144
|
// Update our state
|
|
3143
3145
|
updatedItems.forEach((pickableItem) => {
|
|
3144
3146
|
if (pickableItem.isGroup) {
|
|
3145
3147
|
// Has subcontexts
|
|
3146
3148
|
pickableItem.children.forEach((subcontextItem) => {
|
|
3147
3149
|
if (!subcontextItem.isGroup) {
|
|
3148
|
-
console.log('Update child:', pickableItem.id, subcontextItem.id, subcontextItem.checked);
|
|
3149
|
-
console.log(contextFilterState);
|
|
3150
3150
|
contextFilterState[pickableItem.id][subcontextItem.id] = (subcontextItem.checked);
|
|
3151
|
-
console.log(contextFilterState);
|
|
3152
3151
|
}
|
|
3153
3152
|
});
|
|
3154
3153
|
}
|
|
@@ -3157,6 +3156,7 @@ const LogReviewer = (props) => {
|
|
|
3157
3156
|
contextFilterState[pickableItem.id] = (pickableItem.checked);
|
|
3158
3157
|
}
|
|
3159
3158
|
});
|
|
3159
|
+
console.log('New context filter state:', contextFilterState);
|
|
3160
3160
|
dispatch({
|
|
3161
3161
|
type: ActionType.UpdateContextFilterState,
|
|
3162
3162
|
contextFilterState,
|