dce-reactkit 3.2.5 → 3.2.7
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 +28 -28
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/ButtonInputGroup.d.ts +1 -0
- package/dist/cjs/types/types/LogAction.d.ts +1 -1
- package/dist/esm/index.js +28 -28
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/ButtonInputGroup.d.ts +1 -0
- package/dist/esm/types/types/LogAction.d.ts +1 -1
- package/dist/index.d.ts +2 -1
- package/package.json +1 -1
- package/src/components/ButtonInputGroup.tsx +12 -1
- package/src/components/LogReviewer.tsx +51 -51
- package/src/types/LogAction.ts +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -243,6 +243,7 @@ declare type Props$a = {
|
|
|
243
243
|
minLabelWidth?: string;
|
|
244
244
|
children: React.ReactNode;
|
|
245
245
|
className?: string;
|
|
246
|
+
wrapButtonsAndAddGaps?: boolean;
|
|
246
247
|
};
|
|
247
248
|
declare const ButtonInputGroup: React.FC<Props$a>;
|
|
248
249
|
|
|
@@ -710,7 +711,7 @@ declare enum LogAction {
|
|
|
710
711
|
View = "View",
|
|
711
712
|
Interrupt = "Interrupt",
|
|
712
713
|
Create = "Create",
|
|
713
|
-
|
|
714
|
+
Modify = "Modify",
|
|
714
715
|
Delete = "Delete",
|
|
715
716
|
Add = "Add",
|
|
716
717
|
Remove = "Remove",
|
package/package.json
CHANGED
|
@@ -20,6 +20,8 @@ type Props = {
|
|
|
20
20
|
children: React.ReactNode,
|
|
21
21
|
// Additional class names to add to the outer container
|
|
22
22
|
className?: string,
|
|
23
|
+
// If true, wrap buttons and create gaps
|
|
24
|
+
wrapButtonsAndAddGaps?: boolean,
|
|
23
25
|
};
|
|
24
26
|
|
|
25
27
|
/*------------------------------------------------------------------------*/
|
|
@@ -39,6 +41,7 @@ const ButtonInputGroup: React.FC<Props> = (props) => {
|
|
|
39
41
|
minLabelWidth,
|
|
40
42
|
children,
|
|
41
43
|
className,
|
|
44
|
+
wrapButtonsAndAddGaps,
|
|
42
45
|
} = props;
|
|
43
46
|
|
|
44
47
|
/*------------------------------------------------------------------------*/
|
|
@@ -77,7 +80,15 @@ const ButtonInputGroup: React.FC<Props> = (props) => {
|
|
|
77
80
|
borderLeftWidth: 0,
|
|
78
81
|
}}
|
|
79
82
|
>
|
|
80
|
-
{
|
|
83
|
+
{
|
|
84
|
+
wrapButtonsAndAddGaps
|
|
85
|
+
? (
|
|
86
|
+
<div className="d-flex gap-1 flex-wrap">
|
|
87
|
+
{children}
|
|
88
|
+
</div>
|
|
89
|
+
)
|
|
90
|
+
: children
|
|
91
|
+
}
|
|
81
92
|
</span>
|
|
82
93
|
</div>
|
|
83
94
|
</div>
|
|
@@ -1413,61 +1413,61 @@ const LogReviewer: React.FC<Props> = (props) => {
|
|
|
1413
1413
|
<ButtonInputGroup
|
|
1414
1414
|
label="Action"
|
|
1415
1415
|
className="mb-2"
|
|
1416
|
+
wrapButtonsAndAddGaps
|
|
1416
1417
|
>
|
|
1417
|
-
|
|
1418
|
-
|
|
1419
|
-
|
|
1420
|
-
|
|
1421
|
-
|
|
1422
|
-
|
|
1423
|
-
|
|
1424
|
-
|
|
1425
|
-
|
|
1426
|
-
|
|
1427
|
-
|
|
1428
|
-
|
|
1429
|
-
|
|
1430
|
-
|
|
1431
|
-
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
}
|
|
1441
|
-
</div>
|
|
1418
|
+
{
|
|
1419
|
+
Object.keys(LogAction)
|
|
1420
|
+
.map((action) => {
|
|
1421
|
+
const description = genHumanReadableName(action);
|
|
1422
|
+
return (
|
|
1423
|
+
<CheckboxButton
|
|
1424
|
+
key={action}
|
|
1425
|
+
id={`LogReviewer-action-${action}-checkbox`}
|
|
1426
|
+
text={description}
|
|
1427
|
+
ariaLabel={`include logs with action type "${description}" in results`}
|
|
1428
|
+
noMarginOnRight
|
|
1429
|
+
checked={actionErrorFilterState.action[action]}
|
|
1430
|
+
onChanged={(checked) => {
|
|
1431
|
+
actionErrorFilterState.action[action] = checked;
|
|
1432
|
+
dispatch({
|
|
1433
|
+
type: ActionType.UpdateActionErrorFilterState,
|
|
1434
|
+
actionErrorFilterState,
|
|
1435
|
+
});
|
|
1436
|
+
}}
|
|
1437
|
+
/>
|
|
1438
|
+
);
|
|
1439
|
+
})
|
|
1440
|
+
}
|
|
1442
1441
|
</ButtonInputGroup>
|
|
1443
1442
|
{/* Target */}
|
|
1444
|
-
<ButtonInputGroup
|
|
1443
|
+
<ButtonInputGroup
|
|
1444
|
+
label="Target"
|
|
1445
|
+
wrapButtonsAndAddGaps
|
|
1446
|
+
>
|
|
1445
1447
|
{/* List of targets */}
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
|
|
1454
|
-
|
|
1455
|
-
|
|
1456
|
-
|
|
1457
|
-
|
|
1458
|
-
|
|
1459
|
-
|
|
1460
|
-
|
|
1461
|
-
|
|
1462
|
-
|
|
1463
|
-
|
|
1464
|
-
|
|
1465
|
-
|
|
1466
|
-
|
|
1467
|
-
|
|
1468
|
-
|
|
1469
|
-
}
|
|
1470
|
-
</div>
|
|
1448
|
+
{
|
|
1449
|
+
Object.keys(targetMap)
|
|
1450
|
+
.map((target) => {
|
|
1451
|
+
const description = genHumanReadableName(target);
|
|
1452
|
+
return (
|
|
1453
|
+
<CheckboxButton
|
|
1454
|
+
key={target}
|
|
1455
|
+
id={`LogReviewer-target-${target}-checkbox`}
|
|
1456
|
+
text={description}
|
|
1457
|
+
ariaLabel={`include logs with target "${description}" in results`}
|
|
1458
|
+
checked={actionErrorFilterState.target[target]}
|
|
1459
|
+
noMarginOnRight
|
|
1460
|
+
onChanged={(checked) => {
|
|
1461
|
+
actionErrorFilterState.target[target] = checked;
|
|
1462
|
+
dispatch({
|
|
1463
|
+
type: ActionType.UpdateActionErrorFilterState,
|
|
1464
|
+
actionErrorFilterState,
|
|
1465
|
+
});
|
|
1466
|
+
}}
|
|
1467
|
+
/>
|
|
1468
|
+
);
|
|
1469
|
+
})
|
|
1470
|
+
}
|
|
1471
1471
|
</ButtonInputGroup>
|
|
1472
1472
|
</TabBox>
|
|
1473
1473
|
)
|
package/src/types/LogAction.ts
CHANGED
|
@@ -19,8 +19,8 @@ enum LogAction {
|
|
|
19
19
|
Interrupt = 'Interrupt',
|
|
20
20
|
// Target was created by the user (it did not exist before)
|
|
21
21
|
Create = 'Create',
|
|
22
|
-
// Target was
|
|
23
|
-
|
|
22
|
+
// Target was modified by the user (it existed and was changed)
|
|
23
|
+
Modify = 'Modify',
|
|
24
24
|
// Target was deleted by the user (it existed and now it doesn't)
|
|
25
25
|
Delete = 'Delete',
|
|
26
26
|
// Target was added by the user (it already existed and was added to another place)
|