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/esm/index.js
CHANGED
|
@@ -2795,7 +2795,9 @@ 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 (
|
|
2798
|
+
if (
|
|
2799
|
+
// Context exists
|
|
2800
|
+
LogMetadata.Context
|
|
2799
2801
|
// Context has children already
|
|
2800
2802
|
&& typeof LogMetadata.Context[context] !== 'string') {
|
|
2801
2803
|
LogMetadata.Context[context][LogBuiltInMetadata.Context.Uncategorized] = (LogBuiltInMetadata.Context.Uncategorized);
|
|
@@ -2845,8 +2847,10 @@ const LogReviewer = (props) => {
|
|
|
2845
2847
|
// Case: subcontexts exist
|
|
2846
2848
|
initContextFilterState[contextValue._] = {};
|
|
2847
2849
|
Object.values(((_b = LogMetadata.Context) !== null && _b !== void 0 ? _b : {})[context]).forEach((subcontext) => {
|
|
2848
|
-
|
|
2849
|
-
|
|
2850
|
+
if (subcontext) {
|
|
2851
|
+
const subcontextValue = contextValue[subcontext];
|
|
2852
|
+
initContextFilterState[contextValue._][subcontextValue] = true;
|
|
2853
|
+
}
|
|
2850
2854
|
});
|
|
2851
2855
|
}
|
|
2852
2856
|
});
|
|
@@ -3129,18 +3133,13 @@ const LogReviewer = (props) => {
|
|
|
3129
3133
|
}));
|
|
3130
3134
|
// Create filter UI
|
|
3131
3135
|
filterDrawer = (React.createElement(ItemPicker, { title: "Context", items: pickableItems, onChanged: (updatedItems) => {
|
|
3132
|
-
console.log('Items before:', pickableItems);
|
|
3133
|
-
console.log('Updated Items:', updatedItems);
|
|
3134
3136
|
// Update our state
|
|
3135
3137
|
updatedItems.forEach((pickableItem) => {
|
|
3136
3138
|
if (pickableItem.isGroup) {
|
|
3137
3139
|
// Has subcontexts
|
|
3138
3140
|
pickableItem.children.forEach((subcontextItem) => {
|
|
3139
3141
|
if (!subcontextItem.isGroup) {
|
|
3140
|
-
console.log('Update child:', pickableItem.id, subcontextItem.id, subcontextItem.checked);
|
|
3141
|
-
console.log(contextFilterState);
|
|
3142
3142
|
contextFilterState[pickableItem.id][subcontextItem.id] = (subcontextItem.checked);
|
|
3143
|
-
console.log(contextFilterState);
|
|
3144
3143
|
}
|
|
3145
3144
|
});
|
|
3146
3145
|
}
|
|
@@ -3149,6 +3148,7 @@ const LogReviewer = (props) => {
|
|
|
3149
3148
|
contextFilterState[pickableItem.id] = (pickableItem.checked);
|
|
3150
3149
|
}
|
|
3151
3150
|
});
|
|
3151
|
+
console.log('New context filter state:', contextFilterState);
|
|
3152
3152
|
dispatch({
|
|
3153
3153
|
type: ActionType.UpdateContextFilterState,
|
|
3154
3154
|
contextFilterState,
|