dce-reactkit 3.2.2-beta.26 → 3.2.2-beta.28
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 +7 -6
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +7 -6
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/LogReviewer.tsx +12 -7
package/package.json
CHANGED
|
@@ -548,7 +548,6 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
548
548
|
LogMetadata.Target[target] = target;
|
|
549
549
|
}
|
|
550
550
|
});
|
|
551
|
-
console.log(LogMetadata);
|
|
552
551
|
|
|
553
552
|
/* -------------- State ------------- */
|
|
554
553
|
|
|
@@ -574,16 +573,19 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
574
573
|
Object.keys(LogMetadata.Context ?? {}).forEach((context) => {
|
|
575
574
|
const contextValue = (LogMetadata.Context ?? {})[context];
|
|
576
575
|
if (typeof contextValue === 'string') {
|
|
577
|
-
// Case: no subcontexts
|
|
576
|
+
// Case: no subcontexts, init as checked
|
|
578
577
|
initContextFilterState[contextValue] = true;
|
|
579
578
|
} else {
|
|
580
579
|
// Case: subcontexts exist
|
|
581
|
-
initContextFilterState[
|
|
580
|
+
initContextFilterState[context] = {};
|
|
582
581
|
Object.values((LogMetadata.Context ?? {})[context]).forEach((subcontext) => {
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
582
|
+
// Skip self ("_")
|
|
583
|
+
if (subcontext === '_') {
|
|
584
|
+
return;
|
|
586
585
|
}
|
|
586
|
+
|
|
587
|
+
// Initialize as checked
|
|
588
|
+
(initContextFilterState[context] as any)[subcontext] = true;
|
|
587
589
|
});
|
|
588
590
|
}
|
|
589
591
|
});
|
|
@@ -1635,7 +1637,10 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1635
1637
|
contextFilterState[log.context] === false
|
|
1636
1638
|
// None of the subcontexts are selected
|
|
1637
1639
|
|| (
|
|
1638
|
-
|
|
1640
|
+
// Has subcontexts
|
|
1641
|
+
typeof contextFilterState[log.context] !== 'boolean'
|
|
1642
|
+
// None of the subcontexts are selected
|
|
1643
|
+
&& Object.values(contextFilterState[log.context] ?? {})
|
|
1639
1644
|
.every((isSelected) => {
|
|
1640
1645
|
return !isSelected;
|
|
1641
1646
|
})
|