ehscan-react-table 0.0.55 → 0.0.56

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.
@@ -9,6 +9,7 @@ type Props = {
9
9
  content: string;
10
10
  id: string | number;
11
11
  col: string | number;
12
+ checked?: boolean;
12
13
  small?: boolean;
13
14
  clickRow: (args: ClickRowArgs) => void;
14
15
  };
@@ -1,12 +1,14 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { calcDateDiff, formatToDDMMYYYY } from '../tools/dateFunction';
3
3
  import styles from '../elements/table.module.css';
4
- export const TableCellDueDate = ({ content, id, col, small, clickRow }) => {
4
+ export const TableCellDueDate = ({ content, id, col, checked, small, clickRow }) => {
5
5
  const DateContent = ({ value }) => {
6
6
  const valDate = value;
7
- return valDate === '-' || !valDate
8
- ? '-'
9
- : _jsx("span", { className: `${styles.dateTag} ${styles[calcDateDiff(valDate)]}${small ? ` ${styles.dateTagSmall}` : ''}`, children: small ? '' : formatToDDMMYYYY(valDate) });
7
+ switch (true) {
8
+ case valDate === '-' || !valDate: return '-';
9
+ case checked === true: return _jsx("span", { className: `${styles.dateTag} ${styles['irrelevant']}${small ? ` ${styles.dateTagSmall}` : ''}`, children: small ? '' : formatToDDMMYYYY(valDate) });
10
+ default: return _jsx("span", { className: `${styles.dateTag} ${styles[calcDateDiff(valDate)]}${small ? ` ${styles.dateTagSmall}` : ''}`, children: small ? '' : formatToDDMMYYYY(valDate) });
11
+ }
10
12
  };
11
13
  return (_jsx("div", { className: styles.dueDateColWrapper, onClick: (e) => clickRow({ id, col, type: 'duedate', e }), children: _jsx(DateContent, { value: content }) }));
12
14
  };
@@ -539,4 +539,8 @@ RIPPLE
539
539
  .futureDueDate {
540
540
  --ext-table-date-tag-clr: white;
541
541
  --ext-table-date-tag-bck-clr: #008000;
542
+ }
543
+ .irrelevant {
544
+ --ext-table-date-tag-clr: darkgray;
545
+ --ext-table-date-tag-bck-clr: white;
542
546
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ehscan-react-table",
3
- "version": "0.0.55",
3
+ "version": "0.0.56",
4
4
  "description": "components",
5
5
  "main": "dist/Components.js",
6
6
  "types": "dist/Components.d.ts",