dce-reactkit 3.2.2-beta.5 → 3.2.2-beta.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.
@@ -7,6 +7,7 @@ declare type Props = {
7
7
  label: string;
8
8
  minLabelWidth?: string;
9
9
  children: React.ReactNode;
10
+ className?: string;
10
11
  };
11
12
  declare const ButtonInputGroup: React.FC<Props>;
12
13
  export default ButtonInputGroup;
package/dist/esm/index.js CHANGED
@@ -1180,14 +1180,14 @@ const ButtonInputGroup = (props) => {
1180
1180
  /*------------------------------------------------------------------------*/
1181
1181
  /* -------------- Props ------------- */
1182
1182
  // Destructure all props
1183
- const { label, minLabelWidth, children, } = props;
1183
+ const { label, minLabelWidth, children, className, } = props;
1184
1184
  /*------------------------------------------------------------------------*/
1185
1185
  /* Render */
1186
1186
  /*------------------------------------------------------------------------*/
1187
1187
  /*----------------------------------------*/
1188
1188
  /* Main UI */
1189
1189
  /*----------------------------------------*/
1190
- return (React.createElement("div", { className: "input-group" },
1190
+ return (React.createElement("div", { className: `input-group ${className !== null && className !== void 0 ? className : ''}` },
1191
1191
  React.createElement("div", { className: "input-group-prepend d-flex w-100" },
1192
1192
  React.createElement("span", { className: "input-group-text", style: {
1193
1193
  minWidth: (minLabelWidth !== null && minLabelWidth !== void 0 ? minLabelWidth : undefined),
@@ -2389,9 +2389,9 @@ const IntelliTable = (props) => {
2389
2389
  // Create the cell UI
2390
2390
  return (React.createElement("th", { key: column.param, scope: "col", id: `IntelliTable-${id}-header-${column.param}` },
2391
2391
  React.createElement("div", { className: "d-flex align-items-center justify-content-center flex-row h-100" },
2392
- React.createElement("h4", { className: "m-0" }, column.title),
2392
+ React.createElement("span", { className: "text-nowrap" }, column.title),
2393
2393
  React.createElement("div", null,
2394
- React.createElement("button", { type: "button", className: "btn btn-light", "aria-label": sortButtonAriaLabel, onClick: () => {
2394
+ React.createElement("button", { type: "button", className: "btn btn-light btn-sm ms-1", "aria-label": sortButtonAriaLabel, onClick: () => {
2395
2395
  dispatch({
2396
2396
  type: ActionType$1.ToggleSortColumn,
2397
2397
  param: column.param,
@@ -2539,7 +2539,7 @@ const IntelliTable = (props) => {
2539
2539
  React.createElement("h3", { className: "m-0" }, title),
2540
2540
  React.createElement("div", { className: "flex-grow-1 text-end" },
2541
2541
  React.createElement(CSVDownloadButton, { "aria-label": `download data as csv for ${title}`, id: `IntelliTable-${id}-download-as-csv`, filename: `${title}.csv`, csv: csv }),
2542
- React.createElement("button", { type: "button", className: "btn btn-secondary", "aria-label": `show panel for customizing which columns show in table ${title}`, id: `IntelliTable-${id}-show-column-customization-modal`, onClick: () => {
2542
+ React.createElement("button", { type: "button", className: "btn btn-secondary ms-2", "aria-label": `show panel for customizing which columns show in table ${title}`, id: `IntelliTable-${id}-show-column-customization-modal`, onClick: () => {
2543
2543
  dispatch({
2544
2544
  type: ActionType$1.ToggleColVisCusModalVisibility,
2545
2545
  });
@@ -2604,6 +2604,10 @@ const style = `
2604
2604
  border-radius: 0.5rem;
2605
2605
  overflow: hidden;
2606
2606
 
2607
+ /* Solid background */
2608
+ background-color: white;
2609
+ color: black;
2610
+
2607
2611
  /* Place contents in flex column */
2608
2612
  flex-direction: column;
2609
2613
 
@@ -2648,7 +2652,7 @@ const genHumanReadableName = (machineReadableName) => {
2648
2652
  // Uppercase! Add a space before
2649
2653
  humanReadableName += ' ';
2650
2654
  }
2651
- humanReadableName += chars;
2655
+ humanReadableName += char;
2652
2656
  });
2653
2657
  // Trim and return
2654
2658
  return humanReadableName.trim();
@@ -2730,7 +2734,7 @@ const LogReviewer = (props) => {
2730
2734
  /*------------------------------------------------------------------------*/
2731
2735
  /* Setup */
2732
2736
  /*------------------------------------------------------------------------*/
2733
- var _a, _b, _c, _d, _e;
2737
+ var _a, _b, _c, _d, _e, _f;
2734
2738
  /* -------------- Props ------------- */
2735
2739
  // Destructure props
2736
2740
  const { LogMetadata, onClose, } = props;
@@ -2933,7 +2937,7 @@ const LogReviewer = (props) => {
2933
2937
  /* Filters */
2934
2938
  /*----------------------------------------*/
2935
2939
  // Filter toggle
2936
- const filterToggles = (React.createElement("div", { className: "LogReviewer-filter-toggles d-flex align-items-center justify-content-center" },
2940
+ const filterToggles = (React.createElement("div", { className: "LogReviewer-filter-toggles mb-2" },
2937
2941
  React.createElement("h3", { className: "m-0" }, "Filters:"),
2938
2942
  React.createElement("div", { className: "LogReviewer-filter-toggle-buttons" },
2939
2943
  React.createElement("button", { type: "button", id: "LogReviewer-toggle-date-filter-drawer", className: `btn btn-${FilterDrawer.Date === expandedFilterDrawer} me-2`, "aria-label": "toggle date filter drawer", onClick: () => {
@@ -2952,14 +2956,14 @@ const LogReviewer = (props) => {
2952
2956
  } },
2953
2957
  React.createElement(FontAwesomeIcon, { icon: faCircle, className: "me-2" }),
2954
2958
  "Context"),
2955
- React.createElement("button", { type: "button", id: "LogReviewer-toggle-tag-filter-drawer", className: `btn btn-${FilterDrawer.Tag === expandedFilterDrawer} me-2`, "aria-label": "toggle tag filter drawer", onClick: () => {
2959
+ (LogMetadata.Tag && Object.keys(LogMetadata.Tag).length > 0) && (React.createElement("button", { type: "button", id: "LogReviewer-toggle-tag-filter-drawer", className: `btn btn-${FilterDrawer.Tag === expandedFilterDrawer} me-2`, "aria-label": "toggle tag filter drawer", onClick: () => {
2956
2960
  dispatch({
2957
2961
  type: ActionType.ToggleFilterDrawer,
2958
2962
  filterDrawer: FilterDrawer.Tag,
2959
2963
  });
2960
2964
  } },
2961
2965
  React.createElement(FontAwesomeIcon, { icon: faTag, className: "me-2" }),
2962
- "Tag"),
2966
+ "Tag")),
2963
2967
  React.createElement("button", { type: "button", id: "LogReviewer-toggle-action-filter-drawer", className: `btn btn-${FilterDrawer.Action === expandedFilterDrawer} me-2`, "aria-label": "toggle action and error filter drawer", onClick: () => {
2964
2968
  dispatch({
2965
2969
  type: ActionType.ToggleFilterDrawer,
@@ -3092,7 +3096,7 @@ const LogReviewer = (props) => {
3092
3096
  }, ariaLabel: "only show error logs", selected: actionErrorFilterState.type === LogType$1.Error, noMarginOnRight: true })),
3093
3097
  (actionErrorFilterState.type === undefined
3094
3098
  || actionErrorFilterState.type === LogType$1.Action) && (React.createElement(TabBox, { title: "Action Log Details" },
3095
- React.createElement(ButtonInputGroup, { label: "Action" }, Object.keys(LogAction$1)
3099
+ React.createElement(ButtonInputGroup, { label: "Action", className: "mb-2" }, Object.keys(LogAction$1)
3096
3100
  .map((action, i) => {
3097
3101
  const description = genHumanReadableName(action);
3098
3102
  return (React.createElement(CheckboxButton, { id: `LogReviewer-action-${action}-checkbox`, text: description, ariaLabel: `include logs with action type "${description}" in results`, noMarginOnRight: i === Object.keys(LogAction$1).length - 1, onChanged: (checked) => {
@@ -3103,18 +3107,20 @@ const LogReviewer = (props) => {
3103
3107
  });
3104
3108
  } }));
3105
3109
  })),
3106
- React.createElement(ButtonInputGroup, { label: "Target" }, Object.keys((_e = LogMetadata.Target) !== null && _e !== void 0 ? _e : {})
3107
- .map((target, i) => {
3108
- var _a;
3109
- const description = genHumanReadableName(target);
3110
- return (React.createElement(CheckboxButton, { id: `LogReviewer-target-${target}-checkbox`, text: description, ariaLabel: `include logs with target "${description}" in results`, onChanged: (checked) => {
3111
- actionErrorFilterState.target[target] = checked;
3112
- dispatch({
3113
- type: ActionType.UpdateActionErrorFilterState,
3114
- actionErrorFilterState,
3115
- });
3116
- }, noMarginOnRight: i === Object.keys((_a = LogMetadata.Target) !== null && _a !== void 0 ? _a : {}).length - 1 }));
3117
- })))),
3110
+ React.createElement(ButtonInputGroup, { label: "Target" },
3111
+ (Object.keys((_e = LogMetadata.Target) !== null && _e !== void 0 ? _e : {})) && (React.createElement("div", null, "This app does not have any targets yet.")),
3112
+ Object.keys((_f = LogMetadata.Target) !== null && _f !== void 0 ? _f : {})
3113
+ .map((target, i) => {
3114
+ var _a;
3115
+ const description = genHumanReadableName(target);
3116
+ return (React.createElement(CheckboxButton, { id: `LogReviewer-target-${target}-checkbox`, text: description, ariaLabel: `include logs with target "${description}" in results`, onChanged: (checked) => {
3117
+ actionErrorFilterState.target[target] = checked;
3118
+ dispatch({
3119
+ type: ActionType.UpdateActionErrorFilterState,
3120
+ actionErrorFilterState,
3121
+ });
3122
+ }, noMarginOnRight: i === Object.keys((_a = LogMetadata.Target) !== null && _a !== void 0 ? _a : {}).length - 1 }));
3123
+ })))),
3118
3124
  (actionErrorFilterState.type === undefined
3119
3125
  || actionErrorFilterState.type === LogType$1.Error) && (React.createElement(TabBox, { title: "Error Log Details" },
3120
3126
  React.createElement("div", { className: "input-group mb-2" },
@@ -3306,7 +3312,7 @@ const LogReviewer = (props) => {
3306
3312
  // > Perform filters
3307
3313
  const logs = [];
3308
3314
  Object.keys(logMap).forEach((year) => {
3309
- Object.keys(logMap).forEach((month) => {
3315
+ Object.keys(logMap[year]).forEach((month) => {
3310
3316
  logMap[year][month].forEach((log) => {
3311
3317
  /* ----------- Date Filter ---------- */
3312
3318
  var _a;
@@ -3732,7 +3738,11 @@ const LogReviewer = (props) => {
3732
3738
  },
3733
3739
  ];
3734
3740
  // Create intelliTable
3735
- const dataTable = (React.createElement(IntelliTable, { title: "Matching Logs", id: "logs", data: logs, columns: columns }));
3741
+ const dataTable = (logs.length === 0
3742
+ ? (React.createElement("div", { className: "alert alert-warning" },
3743
+ React.createElement("h4", { className: "m-1" }, "No Logs to Show"),
3744
+ React.createElement("div", null, "Either your filters are too strict or no matching logs have been created yet.")))
3745
+ : (React.createElement(IntelliTable, { title: "Matching Logs", id: "logs", data: logs, columns: columns })));
3736
3746
  // Main body
3737
3747
  body = (React.createElement(React.Fragment, null,
3738
3748
  filters,
@@ -3744,8 +3754,8 @@ const LogReviewer = (props) => {
3744
3754
  React.createElement("div", { className: "LogReviewer-inner-container" },
3745
3755
  React.createElement("div", { className: "LogReviewer-header" },
3746
3756
  React.createElement("div", { className: "LogReviewer-header-title" },
3747
- React.createElement("h1", { className: "m-0" }, "Log Review Dashboard")),
3748
- React.createElement("button", { type: "button", className: "LogReviewer-header-close-button btn btn-lg", "aria-label": "close log reviewer panel", onClick: onClose, style: {
3757
+ React.createElement("h3", { className: "m-0" }, "Log Review Dashboard")),
3758
+ React.createElement("button", { type: "button", className: "LogReviewer-header-close-button btn btn-dark btn-lg", "aria-label": "close log reviewer panel", onClick: onClose, style: {
3749
3759
  border: 0,
3750
3760
  backgroundColor: 'transparent',
3751
3761
  padding: 0,