dce-reactkit 3.2.2-beta.34 → 3.2.2-beta.35

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 CHANGED
@@ -2395,13 +2395,13 @@ const IntelliTable = (props) => {
2395
2395
  dispatch({
2396
2396
  type: ActionType$1.ToggleColVisCusModalVisibility,
2397
2397
  });
2398
- } }, columns.map((column) => {
2399
- return (React__default["default"].createElement(CheckboxButton, { key: column.param, id: `IntelliTable-${id}-toggle-visibility-${column.param}`, text: column.title, onChanged: () => {
2398
+ }, okayVariant: Variant$1.Light }, columns.map((column) => {
2399
+ return (React__default["default"].createElement(CheckboxButton, { key: column.param, id: `IntelliTable-${id}-toggle-visibility-${column.param}`, className: "mb-2", text: column.title, onChanged: () => {
2400
2400
  dispatch({
2401
2401
  type: ActionType$1.ToggleColumnVisibility,
2402
2402
  param: column.param,
2403
2403
  });
2404
- }, checked: columnVisibilityMap[column.param], ariaLabel: `show "${column.title}" column` }));
2404
+ }, checked: columnVisibilityMap[column.param], ariaLabel: `show "${column.title}" column`, checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Secondary }));
2405
2405
  })));
2406
2406
  }
2407
2407
  /*----------------------------------------*/
@@ -2446,7 +2446,7 @@ const IntelliTable = (props) => {
2446
2446
  borderRight: '0.05rem solid #555',
2447
2447
  borderLeft: '0.05rem solid #555',
2448
2448
  } },
2449
- React__default["default"].createElement("div", { className: "d-flex align-items-center justify-content-center flex-row h-100" },
2449
+ React__default["default"].createElement("div", { className: "d-flex align-items-center justify-content-start flex-row h-100" },
2450
2450
  React__default["default"].createElement("span", { className: "text-nowrap" }, column.title),
2451
2451
  React__default["default"].createElement("div", null,
2452
2452
  React__default["default"].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: () => {
@@ -2469,6 +2469,22 @@ const IntelliTable = (props) => {
2469
2469
  sortedData.sort((a, b) => {
2470
2470
  const aVal = a[sortColumnParam];
2471
2471
  const bVal = b[sortColumnParam];
2472
+ // Auto-sort undefined and null to end of list
2473
+ if ((aVal === undefined || aVal === null)
2474
+ || (bVal === undefined || bVal === null)) {
2475
+ // At least one was undefined
2476
+ if ((aVal === undefined || aVal === null)
2477
+ && (bVal === undefined || bVal === null)) {
2478
+ // Both undefined
2479
+ return 0;
2480
+ }
2481
+ if (aVal === undefined || aVal === null) {
2482
+ // First was undefined
2483
+ return 1;
2484
+ }
2485
+ // Second was undefined
2486
+ return -1;
2487
+ }
2472
2488
  // Sort differently based on the data type
2473
2489
  // > Boolean
2474
2490
  if (paramType === ParamType$1.Boolean) {