dce-reactkit 3.2.2-beta.32 → 3.2.2-beta.33

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/esm/index.js CHANGED
@@ -2234,7 +2234,23 @@ const genCSV = (data, columns) => {
2234
2234
  data.forEach((datum) => {
2235
2235
  csv += (columns
2236
2236
  .map((column) => {
2237
- return escapeCellText(datum[column.param]);
2237
+ let contents;
2238
+ const cell = datum[column.param];
2239
+ if (typeof cell === 'string'
2240
+ || typeof cell === 'number') {
2241
+ contents = String(cell);
2242
+ }
2243
+ else if (typeof cell === 'undefined'
2244
+ || cell === null) {
2245
+ contents = '';
2246
+ }
2247
+ else if (typeof cell === 'object') {
2248
+ contents = JSON.stringify(cell);
2249
+ }
2250
+ else {
2251
+ contents = '';
2252
+ }
2253
+ return escapeCellText(contents);
2238
2254
  })
2239
2255
  .join(','));
2240
2256
  });
@@ -2383,6 +2399,7 @@ const IntelliTable = (props) => {
2383
2399
  // Custom info based on current sort type
2384
2400
  let sortButtonAriaLabel;
2385
2401
  let sortIcon = faSort;
2402
+ let sortingByThisColumn = false;
2386
2403
  if (!sortColumnParam) {
2387
2404
  // Not being sorted yet
2388
2405
  sortButtonAriaLabel = `sort ascending by ${column.title}`;
@@ -2390,6 +2407,7 @@ const IntelliTable = (props) => {
2390
2407
  }
2391
2408
  else if (column.param === sortColumnParam) {
2392
2409
  // Already sorted by this column
2410
+ sortingByThisColumn = true;
2393
2411
  if (sortType === SortType.Ascending) {
2394
2412
  // Sorted ascending
2395
2413
  sortButtonAriaLabel = `sort descending by ${column.title}`;
@@ -2407,11 +2425,11 @@ const IntelliTable = (props) => {
2407
2425
  sortIcon = faSort;
2408
2426
  }
2409
2427
  // Create the cell UI
2410
- return (React.createElement("th", { key: column.param, scope: "col", id: `IntelliTable-${id}-header-${column.param}` },
2428
+ return (React.createElement("th", { key: column.param, scope: "col", id: `IntelliTable-${id}-header-${column.param}`, className: "text-start" },
2411
2429
  React.createElement("div", { className: "d-flex align-items-center justify-content-center flex-row h-100" },
2412
2430
  React.createElement("span", { className: "text-nowrap" }, column.title),
2413
2431
  React.createElement("div", null,
2414
- React.createElement("button", { type: "button", className: "btn btn-light btn-sm ms-1", "aria-label": sortButtonAriaLabel, onClick: () => {
2432
+ React.createElement("button", { type: "button", id: `IntelliTable-${id}-sort-by-${column.param}-button`, className: `btn btn-${sortingByThisColumn ? 'light' : 'secondary'} btn-sm ms-1 ps-1 pe-1 pt-0 pb-0`, "aria-label": sortButtonAriaLabel, onClick: () => {
2415
2433
  dispatch({
2416
2434
  type: ActionType$1.ToggleSortColumn,
2417
2435
  param: column.param,
@@ -3707,7 +3725,7 @@ const LogReviewer = (props) => {
3707
3725
  type: ParamType$1.Int,
3708
3726
  },
3709
3727
  {
3710
- title: 'Student',
3728
+ title: 'Student?',
3711
3729
  param: 'isLearner',
3712
3730
  type: ParamType$1.Boolean,
3713
3731
  },
@@ -4883,7 +4901,7 @@ const genRouteHandler = (opts) => {
4883
4901
  isAdmin: !!launchInfo.isAdmin,
4884
4902
  isTTM: !!launchInfo.isTTM,
4885
4903
  courseId: launchInfo.courseId,
4886
- courseName: launchInfo.courseName,
4904
+ courseName: launchInfo.contextLabel,
4887
4905
  browser,
4888
4906
  device,
4889
4907
  year,