dce-reactkit 3.2.2-beta.16 → 3.2.2-beta.18
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 +21 -4
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +21 -4
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/LogReviewer.tsx +25 -2
package/dist/esm/index.js
CHANGED
|
@@ -2666,6 +2666,15 @@ const style = `
|
|
|
2666
2666
|
}
|
|
2667
2667
|
`;
|
|
2668
2668
|
/*------------------------------------------------------------------------*/
|
|
2669
|
+
/* Constants */
|
|
2670
|
+
/*------------------------------------------------------------------------*/
|
|
2671
|
+
const builtInContextToName = {
|
|
2672
|
+
[LogBuiltInMetadata.Context.Uncategorized]: 'Uncategorized',
|
|
2673
|
+
[LogBuiltInMetadata.Context.ServerRenderedErrorPage]: 'Server Rendered Error Page',
|
|
2674
|
+
[LogBuiltInMetadata.Context.ServerEndpointError]: 'Server Endpoint Error',
|
|
2675
|
+
[LogBuiltInMetadata.Context.ClientFatalError]: 'Client Fatal Error',
|
|
2676
|
+
};
|
|
2677
|
+
/*------------------------------------------------------------------------*/
|
|
2669
2678
|
/* Static Functions */
|
|
2670
2679
|
/*------------------------------------------------------------------------*/
|
|
2671
2680
|
/**
|
|
@@ -2814,8 +2823,12 @@ const LogReviewer = (props) => {
|
|
|
2814
2823
|
const subcontextValue = contextValue[subcontext];
|
|
2815
2824
|
initContextFilterState[contextValue._][subcontextValue] = true;
|
|
2816
2825
|
});
|
|
2826
|
+
// Add uncategorized subcontext
|
|
2827
|
+
initContextFilterState[contextValue._][LogBuiltInMetadata.Context.Uncategorized] = true;
|
|
2817
2828
|
}
|
|
2818
2829
|
});
|
|
2830
|
+
// Add uncategorized context
|
|
2831
|
+
initContextFilterState[LogBuiltInMetadata.Context.Uncategorized] = true;
|
|
2819
2832
|
// Create initial tag filter state
|
|
2820
2833
|
const initTagFilterState = {};
|
|
2821
2834
|
Object.values((_b = LogMetadata.Tag) !== null && _b !== void 0 ? _b : {}).forEach((tagValue) => {
|
|
@@ -3056,7 +3069,7 @@ const LogReviewer = (props) => {
|
|
|
3056
3069
|
// Create item picker items
|
|
3057
3070
|
const pickableItems = (Object.keys((_d = LogMetadata.Context) !== null && _d !== void 0 ? _d : {})
|
|
3058
3071
|
.map((context) => {
|
|
3059
|
-
var _a;
|
|
3072
|
+
var _a, _b;
|
|
3060
3073
|
const value = ((_a = LogMetadata.Context) !== null && _a !== void 0 ? _a : {})[context];
|
|
3061
3074
|
if (typeof value === 'string') {
|
|
3062
3075
|
// No subcategories
|
|
@@ -3083,7 +3096,7 @@ const LogReviewer = (props) => {
|
|
|
3083
3096
|
}));
|
|
3084
3097
|
const item = {
|
|
3085
3098
|
id: context,
|
|
3086
|
-
name: context,
|
|
3099
|
+
name: ((_b = builtInContextToName[context]) !== null && _b !== void 0 ? _b : genHumanReadableName(context)),
|
|
3087
3100
|
isGroup: true,
|
|
3088
3101
|
children,
|
|
3089
3102
|
};
|
|
@@ -3091,6 +3104,8 @@ const LogReviewer = (props) => {
|
|
|
3091
3104
|
}));
|
|
3092
3105
|
// Create filter UI
|
|
3093
3106
|
filterDrawer = (React.createElement(ItemPicker, { title: "Context", items: pickableItems, onChanged: (updatedItems) => {
|
|
3107
|
+
console.log('Items before:', pickableItems);
|
|
3108
|
+
console.log('Updated Items:', updatedItems);
|
|
3094
3109
|
// Update our state
|
|
3095
3110
|
updatedItems.forEach((pickableItem) => {
|
|
3096
3111
|
if (pickableItem.isGroup) {
|
|
@@ -3412,8 +3427,10 @@ const LogReviewer = (props) => {
|
|
|
3412
3427
|
}
|
|
3413
3428
|
// Subcontext doesn't match
|
|
3414
3429
|
if (
|
|
3415
|
-
// Log
|
|
3416
|
-
log.
|
|
3430
|
+
// Log context is not "uncategorized" (no point in further filters)
|
|
3431
|
+
log.context !== LogBuiltInMetadata.Context.Uncategorized
|
|
3432
|
+
// Log has a subcontext
|
|
3433
|
+
&& log.subcontext
|
|
3417
3434
|
// Context has subcontexts
|
|
3418
3435
|
&& (contextFilterState[log.context]
|
|
3419
3436
|
&& contextFilterState[log.context] !== false
|