dce-reactkit 3.2.2-beta.33 → 3.2.2-beta.34
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 +36 -18
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +36 -18
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/CSVDownloadButton.tsx +1 -1
- package/src/components/IntelliTable.tsx +19 -5
- package/src/components/LogReviewer.tsx +6 -6
package/dist/esm/index.js
CHANGED
|
@@ -2283,7 +2283,8 @@ const CSVDownloadButton = (props) => {
|
|
|
2283
2283
|
? `Click to download ${filename}`
|
|
2284
2284
|
: ariaLabel), style: style, onClick: onClick },
|
|
2285
2285
|
!children && (React.createElement(React.Fragment, null,
|
|
2286
|
-
React.createElement(FontAwesomeIcon, { icon: faCloudDownloadAlt
|
|
2286
|
+
React.createElement(FontAwesomeIcon, { icon: faCloudDownloadAlt }),
|
|
2287
|
+
' ',
|
|
2287
2288
|
"Download CSV")),
|
|
2288
2289
|
children));
|
|
2289
2290
|
};
|
|
@@ -2371,10 +2372,18 @@ const IntelliTable = (props) => {
|
|
|
2371
2372
|
const [state, dispatch] = useReducer(reducer$1, initialState);
|
|
2372
2373
|
// Destructure common state
|
|
2373
2374
|
const { sortColumnParam, sortType, columnVisibilityMap, columnVisibilityCustomizationModalVisible, } = state;
|
|
2375
|
+
/*------------------------------------------------------------------------*/
|
|
2376
|
+
/* Render */
|
|
2377
|
+
/*------------------------------------------------------------------------*/
|
|
2378
|
+
/*----------------------------------------*/
|
|
2379
|
+
/* Modal */
|
|
2380
|
+
/*----------------------------------------*/
|
|
2381
|
+
// Modal that may be defined
|
|
2382
|
+
let modal;
|
|
2374
2383
|
/* ------- Col Vis Customization Modal ------ */
|
|
2375
2384
|
if (columnVisibilityCustomizationModalVisible) {
|
|
2376
2385
|
// Create modal
|
|
2377
|
-
(React.createElement(Modal, { type: ModalType$1.Okay, title: "Choose columns to show:", onClose: () => {
|
|
2386
|
+
modal = (React.createElement(Modal, { type: ModalType$1.Okay, title: "Choose columns to show:", onClose: () => {
|
|
2378
2387
|
dispatch({
|
|
2379
2388
|
type: ActionType$1.ToggleColVisCusModalVisibility,
|
|
2380
2389
|
});
|
|
@@ -2425,7 +2434,10 @@ const IntelliTable = (props) => {
|
|
|
2425
2434
|
sortIcon = faSort;
|
|
2426
2435
|
}
|
|
2427
2436
|
// Create the cell UI
|
|
2428
|
-
return (React.createElement("th", { key: column.param, scope: "col", id: `IntelliTable-${id}-header-${column.param}`, className: "text-start"
|
|
2437
|
+
return (React.createElement("th", { key: column.param, scope: "col", id: `IntelliTable-${id}-header-${column.param}`, className: "text-start", style: {
|
|
2438
|
+
borderRight: '0.05rem solid #555',
|
|
2439
|
+
borderLeft: '0.05rem solid #555',
|
|
2440
|
+
} },
|
|
2429
2441
|
React.createElement("div", { className: "d-flex align-items-center justify-content-center flex-row h-100" },
|
|
2430
2442
|
React.createElement("span", { className: "text-nowrap" }, column.title),
|
|
2431
2443
|
React.createElement("div", null,
|
|
@@ -2470,10 +2482,10 @@ const IntelliTable = (props) => {
|
|
|
2470
2482
|
// > String
|
|
2471
2483
|
if (paramType === ParamType$1.String) {
|
|
2472
2484
|
if (aVal < bVal) {
|
|
2473
|
-
return (descending ?
|
|
2485
|
+
return (descending ? 1 : -1);
|
|
2474
2486
|
}
|
|
2475
2487
|
if (aVal > bVal) {
|
|
2476
|
-
return (descending ? 1 :
|
|
2488
|
+
return (descending ? -1 : 1);
|
|
2477
2489
|
}
|
|
2478
2490
|
return 0;
|
|
2479
2491
|
}
|
|
@@ -2537,7 +2549,9 @@ const IntelliTable = (props) => {
|
|
|
2537
2549
|
}
|
|
2538
2550
|
else if (column.type === ParamType$1.String) {
|
|
2539
2551
|
fullValue = String(value).trim();
|
|
2540
|
-
const noValue = (
|
|
2552
|
+
const noValue = (value === undefined
|
|
2553
|
+
|| value === null
|
|
2554
|
+
|| String(fullValue).trim().length === 0);
|
|
2541
2555
|
visibleValue = (noValue
|
|
2542
2556
|
? (React.createElement(FontAwesomeIcon, { icon: faMinus }))
|
|
2543
2557
|
: fullValue);
|
|
@@ -2553,7 +2567,10 @@ const IntelliTable = (props) => {
|
|
|
2553
2567
|
: fullValue);
|
|
2554
2568
|
}
|
|
2555
2569
|
// Create UI
|
|
2556
|
-
return (React.createElement("td", { key: `${datum.id}-${column.param}`, title: title
|
|
2570
|
+
return (React.createElement("td", { key: `${datum.id}-${column.param}`, title: title, style: {
|
|
2571
|
+
borderRight: '0.05rem solid #555',
|
|
2572
|
+
borderLeft: '0.05rem solid #555',
|
|
2573
|
+
} }, visibleValue));
|
|
2557
2574
|
}));
|
|
2558
2575
|
// Add cells to a row
|
|
2559
2576
|
return (React.createElement("tr", { key: datum.id }, cells));
|
|
@@ -2573,7 +2590,8 @@ const IntelliTable = (props) => {
|
|
|
2573
2590
|
const csv = genCSV(data, columns);
|
|
2574
2591
|
// Build main UI
|
|
2575
2592
|
return (React.createElement("div", { className: `IntelliTable-container-${id}` },
|
|
2576
|
-
|
|
2593
|
+
modal,
|
|
2594
|
+
React.createElement("div", { className: "d-flex align-items-center justify-content-start" },
|
|
2577
2595
|
React.createElement("h3", { className: "m-0" }, title),
|
|
2578
2596
|
React.createElement("div", { className: "flex-grow-1 text-end" },
|
|
2579
2597
|
React.createElement(CSVDownloadButton, { "aria-label": `download data as csv for ${title}`, id: `IntelliTable-${id}-download-as-csv`, filename: `${title}.csv`, csv: csv }),
|
|
@@ -2589,7 +2607,7 @@ const IntelliTable = (props) => {
|
|
|
2589
2607
|
numHiddenCols,
|
|
2590
2608
|
' ',
|
|
2591
2609
|
"hidden)"))))),
|
|
2592
|
-
React.createElement("div", { className: `IntelliTable-table-${id}`, style: {
|
|
2610
|
+
React.createElement("div", { className: `IntelliTable-table-${id} mt-2`, style: {
|
|
2593
2611
|
overflowX: 'auto',
|
|
2594
2612
|
} }, table)));
|
|
2595
2613
|
};
|
|
@@ -2806,7 +2824,7 @@ const LogReviewer = (props) => {
|
|
|
2806
2824
|
/*------------------------------------------------------------------------*/
|
|
2807
2825
|
/* Setup */
|
|
2808
2826
|
/*------------------------------------------------------------------------*/
|
|
2809
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
2827
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
2810
2828
|
/* -------------- Props ------------- */
|
|
2811
2829
|
// Destructure props
|
|
2812
2830
|
const { LogMetadata, onClose, } = props;
|
|
@@ -2876,8 +2894,8 @@ const LogReviewer = (props) => {
|
|
|
2876
2894
|
});
|
|
2877
2895
|
// Create initial tag filter state
|
|
2878
2896
|
const initTagFilterState = {};
|
|
2879
|
-
Object.
|
|
2880
|
-
initTagFilterState[
|
|
2897
|
+
Object.keys((_e = LogMetadata.Tag) !== null && _e !== void 0 ? _e : {}).forEach((tag) => {
|
|
2898
|
+
initTagFilterState[tag] = false;
|
|
2881
2899
|
});
|
|
2882
2900
|
// Create advanced filter state
|
|
2883
2901
|
const initAdvancedFilterState = {
|
|
@@ -3176,7 +3194,7 @@ const LogReviewer = (props) => {
|
|
|
3176
3194
|
}
|
|
3177
3195
|
else if (expandedFilterDrawer === FilterDrawer.Tag) {
|
|
3178
3196
|
// Create filter UI
|
|
3179
|
-
filterDrawer = (React.createElement(TabBox, { title: "Tags" }, Object.keys(
|
|
3197
|
+
filterDrawer = (React.createElement(TabBox, { title: "Tags" }, Object.keys((_h = LogMetadata.Tag) !== null && _h !== void 0 ? _h : {})
|
|
3180
3198
|
.map((tag, i) => {
|
|
3181
3199
|
const description = genHumanReadableName(tag);
|
|
3182
3200
|
return (React.createElement(CheckboxButton, { id: `LogReviewer-tag-${tag}-checkbox`, text: description, ariaLabel: `require that logs be tagged with "${description}" or any other selected tag`, noMarginOnRight: i === Object.keys(tagFilterState).length - 1, checked: tagFilterState[tag], onChanged: (checked) => {
|
|
@@ -3223,8 +3241,8 @@ const LogReviewer = (props) => {
|
|
|
3223
3241
|
} }));
|
|
3224
3242
|
})),
|
|
3225
3243
|
React.createElement(ButtonInputGroup, { label: "Target" },
|
|
3226
|
-
(Object.keys((
|
|
3227
|
-
Object.keys((
|
|
3244
|
+
(Object.keys((_j = LogMetadata.Target) !== null && _j !== void 0 ? _j : {}).length === 0) && (React.createElement("div", null, "This app does not have any targets yet.")),
|
|
3245
|
+
Object.keys((_k = LogMetadata.Target) !== null && _k !== void 0 ? _k : {})
|
|
3228
3246
|
.map((target, i) => {
|
|
3229
3247
|
var _a;
|
|
3230
3248
|
const description = genHumanReadableName(target);
|
|
@@ -3730,13 +3748,13 @@ const LogReviewer = (props) => {
|
|
|
3730
3748
|
type: ParamType$1.Boolean,
|
|
3731
3749
|
},
|
|
3732
3750
|
{
|
|
3733
|
-
title: 'Teaching Staff',
|
|
3751
|
+
title: 'Teaching Staff?',
|
|
3734
3752
|
param: 'isTTM',
|
|
3735
3753
|
type: ParamType$1.Boolean,
|
|
3736
3754
|
startsHidden: true,
|
|
3737
3755
|
},
|
|
3738
3756
|
{
|
|
3739
|
-
title: 'Admin',
|
|
3757
|
+
title: 'Admin?',
|
|
3740
3758
|
param: 'isAdmin',
|
|
3741
3759
|
type: ParamType$1.Boolean,
|
|
3742
3760
|
startsHidden: true,
|
|
@@ -3771,7 +3789,7 @@ const LogReviewer = (props) => {
|
|
|
3771
3789
|
startsHidden: true,
|
|
3772
3790
|
},
|
|
3773
3791
|
{
|
|
3774
|
-
title: 'Mobile',
|
|
3792
|
+
title: 'Mobile?',
|
|
3775
3793
|
param: 'device.isMobile',
|
|
3776
3794
|
type: ParamType$1.Boolean,
|
|
3777
3795
|
startsHidden: true,
|