dce-reactkit 3.2.2-beta.19 → 3.2.2-beta.20
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 +35 -14
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +35 -14
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/LogReviewer.tsx +33 -7
package/package.json
CHANGED
|
@@ -244,8 +244,12 @@ const style = `
|
|
|
244
244
|
background-color: transparent !important;
|
|
245
245
|
padding-top: 0 !important;
|
|
246
246
|
padding-bottom: 0 !important;
|
|
247
|
+
padding-right: 1em !important;
|
|
247
248
|
margin: 0 !important;
|
|
248
|
-
color: #
|
|
249
|
+
color: #444 !important;
|
|
250
|
+
|
|
251
|
+
right: 0 !important;
|
|
252
|
+
position: absolute !important;
|
|
249
253
|
}
|
|
250
254
|
.LogReviewer-header-close-button:hover {
|
|
251
255
|
border: 0 !important;
|
|
@@ -516,6 +520,34 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
516
520
|
onClose,
|
|
517
521
|
} = props;
|
|
518
522
|
|
|
523
|
+
// Add built-in LogMetadata
|
|
524
|
+
// > Add "uncategorized" subcontext to each context
|
|
525
|
+
Object.keys(LogMetadata.Context ?? {}).forEach((context) => {
|
|
526
|
+
if (
|
|
527
|
+
LogMetadata.Context
|
|
528
|
+
// Context has children already
|
|
529
|
+
&& typeof LogMetadata.Context[context] !== 'string'
|
|
530
|
+
) {
|
|
531
|
+
(LogMetadata.Context as any)[context][LogBuiltInMetadata.Context.Uncategorized] = (
|
|
532
|
+
LogBuiltInMetadata.Context.Uncategorized
|
|
533
|
+
);
|
|
534
|
+
}
|
|
535
|
+
})
|
|
536
|
+
// > Add built-in contexts
|
|
537
|
+
LogMetadata.Context = (LogMetadata.Context ?? {});
|
|
538
|
+
Object.keys(LogBuiltInMetadata.Context).forEach((context) => {
|
|
539
|
+
if (LogMetadata.Context) {
|
|
540
|
+
LogMetadata.Context[context] = context;
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
// > Add built-in targets
|
|
544
|
+
LogMetadata.Target = (LogMetadata.Target ?? {});
|
|
545
|
+
Object.keys(LogBuiltInMetadata.Target).forEach((target) => {
|
|
546
|
+
if (LogMetadata.Target) {
|
|
547
|
+
LogMetadata.Target[target] = target;
|
|
548
|
+
}
|
|
549
|
+
});
|
|
550
|
+
|
|
519
551
|
/* -------------- State ------------- */
|
|
520
552
|
|
|
521
553
|
// Create initial date filter state
|
|
@@ -549,14 +581,8 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
549
581
|
const subcontextValue = contextValue[subcontext];
|
|
550
582
|
(initContextFilterState[contextValue._] as { [k: string]: boolean })[subcontextValue] = true;
|
|
551
583
|
});
|
|
552
|
-
// Add uncategorized subcontext
|
|
553
|
-
(initContextFilterState[contextValue._] as { [k: string]: boolean })[LogBuiltInMetadata.Context.Uncategorized] = true;
|
|
554
584
|
}
|
|
555
585
|
});
|
|
556
|
-
// Add built-in contexts
|
|
557
|
-
Object.values(LogBuiltInMetadata.Context).forEach((context) => {
|
|
558
|
-
initContextFilterState[context] = true;
|
|
559
|
-
});
|
|
560
586
|
|
|
561
587
|
// Create initial tag filter state
|
|
562
588
|
const initTagFilterState: TagFilterState = {};
|