ehscan-react-table 0.0.35 → 0.0.37

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.
@@ -1,14 +1,16 @@
1
1
  import React from 'react';
2
+ type ClickRowArgs = {
3
+ id: string | number;
4
+ col: string | number;
5
+ type: 'duedate';
6
+ e: React.MouseEvent<HTMLDivElement>;
7
+ };
2
8
  type Props = {
3
9
  content: string;
4
10
  id: string | number;
5
11
  col: string | number;
6
12
  small?: boolean;
7
- clickRow: (args: {
8
- id: string | number;
9
- col: string | number;
10
- type: 'default';
11
- }) => void;
13
+ clickRow: (args: ClickRowArgs) => void;
12
14
  };
13
15
  export declare const TableCellDueDate: React.FC<Props>;
14
16
  export {};
@@ -8,5 +8,5 @@ export const TableCellDueDate = ({ content, id, col, small, clickRow }) => {
8
8
  ? '-'
9
9
  : _jsx("span", { className: `${styles.dateTag} ${styles[calcDateDiff(valDate)]}${small ? ` ${styles.dateTagSmall}` : ''}`, children: small ? '' : formatToDDMMYYYY(valDate) });
10
10
  };
11
- return (_jsx("div", { className: styles.dueDateColWrapper, onClick: () => clickRow({ id, col, type: 'default' }), children: _jsx(DateContent, { value: content }) }));
11
+ return (_jsx("div", { className: styles.dueDateColWrapper, onClick: (e) => clickRow({ id, col, type: 'duedate', e }), children: _jsx(DateContent, { value: content }) }));
12
12
  };
@@ -1,14 +1,16 @@
1
1
  import React, { ReactNode } from 'react';
2
+ type ClickRowArgs = {
3
+ id: string | number;
4
+ col: string | number;
5
+ type: 'default';
6
+ e: React.MouseEvent<HTMLDivElement>;
7
+ };
2
8
  type TableDefCellProps = {
3
9
  content: ReactNode;
4
10
  id: string | number;
5
11
  col: string | number;
6
12
  small?: boolean;
7
- clickRow: (args: {
8
- id: string | number;
9
- col: string | number;
10
- type: 'default';
11
- }) => void;
13
+ clickRow: (args: ClickRowArgs) => void;
12
14
  };
13
15
  export declare const TableDefCell: React.FC<TableDefCellProps>;
14
16
  export {};
@@ -1,4 +1,4 @@
1
1
  import { jsxs as _jsxs } from "react/jsx-runtime";
2
2
  export const TableDefCell = ({ content, id, col, small, clickRow }) => {
3
- return (_jsxs("div", { onClick: () => clickRow({ id, col, type: 'default' }), children: [small ? 'Small' : '', " ", content] }));
3
+ return (_jsxs("div", { onClick: (e) => clickRow({ id, col, type: 'default', e }), children: [small ? 'Small' : '', " ", content] }));
4
4
  };
@@ -50,7 +50,7 @@ export const Table = ({ columns, rows, sortOrder, setSortOrder, cellComponents,
50
50
  }
51
51
  if (headerRef.current) {
52
52
  const { bottom } = headerRef.current.getBoundingClientRect();
53
- setWrapperBottom(bottom - 20);
53
+ setWrapperBottom(bottom - 5);
54
54
  }
55
55
  };
56
56
  const handleScroll = () => {
@@ -132,6 +132,7 @@ export const Table = ({ columns, rows, sortOrder, setSortOrder, cellComponents,
132
132
  const HeadColMainLit = {
133
133
  def: (tag) => tag !== null && tag !== void 0 ? tag : "",
134
134
  duedate: () => (_jsxs("svg", { width: "40", height: "40", version: "1.1", viewBox: "0 -960 1600 1600", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { className: "table-header-icons", d: "m381.72-908.36c-112.37 0-203.83 90.835-203.83 202.42v157.03h-68.359c-31.606 1.731-56.094 24.21-56.094 51.328 0 27.118 24.487 49.407 56.094 51.484h68.359v577.03h-68.359c-32.304 1.1539-57.891 25.058-57.891 53.906 0 28.964 25.587 52.674 57.891 53.828h68.359v147.27a203.93 202.52 0 0 0 203.83 202.42h224.06l56.719-98.359h-288.28c-53.103 0-96.406-42.893-96.406-95.859v-155.47h58.047c31.723-1.9617 56.328-25.441 56.328-53.828 0-28.502-24.606-51.945-56.328-53.906h-58.047v-577.11h58.047c33.117 0 60.118-22.978 60.234-51.25 1e-4 -28.272-27.001-51.328-60.234-51.328h-57.969v-165.47a96.679 96.009 0 0 1 96.484-95.859v0.15624h977.58a96.795 96.124 0 0 1 96.406 95.781v921.72l100 166.88v-1080.4c-1e-4 -111.59-91.347-202.42-203.83-202.42h-962.81zm251.25 359.61c-30.444 1.5001-54.781 22.239-56.641 48.203a47.294 46.966 0 0 0 15 37.188 64.259 63.814 0 0 0 41.641 17.266h514.06v-0.07813c33.233 0 60.042-22.978 60.391-51.25 0-28.272-27.274-51.328-60.391-51.328h-514.06zm-2.8125 338.28c-29.849 0-53.906 24.057-53.906 53.906s24.057 53.828 53.906 53.828h318.59c29.849 1e-5 53.828-23.979 53.828-53.828s-23.979-53.906-53.828-53.906h-318.59zm0 343.36c-29.849 0-53.906 24.057-53.906 53.906 0 29.849 24.057 53.906 53.906 53.906h139.53c29.849 0 53.828-24.057 53.828-53.906 1e-5 -29.85-23.979-53.906-53.828-53.906h-139.53zm96.016 357.11-56.797 98.359h102.73l59.922-98.359h-105.86z" }), _jsx("path", { className: "table-header-icons-overdue", d: "m1134-177.42c-15.754 0-31.544 7.7956-40.547 23.438l-415.94 720.39c-18.005 31.284 4.5368 70.234 40.547 70.234h831.8c36.01 0 58.552-38.951 40.547-70.234l-415.94-720.39c-9.0026-15.642-24.714-23.438-40.469-23.438zm0 184.53c47.713 0 86.406 44.129 86.406 98.594 0 166.1-38.693 300.7-86.406 300.7-47.714 0-86.484-134.61-86.484-300.7 0-54.465 38.771-98.594 86.484-98.594zm0 451.95a60.542 60.542 0 0 1 60.547 60.547 60.542 60.542 0 0 1-60.547 60.547 60.542 60.542 0 0 1-60.547-60.547 60.542 60.542 0 0 1 60.547-60.547z", fill: "#999" })] })),
135
+ solved: () => (_jsxs("svg", { width: "40", height: "40", version: "1.1", viewBox: "0 -960 1600 1600", xmlns: "http://www.w3.org/2000/svg", children: [_jsx("path", { className: "table-header-icons", d: "m381.72-908.36c-112.37 0-203.83 90.835-203.83 202.42v157.03h-68.359c-31.606 1.731-56.094 24.21-56.094 51.328 0 27.118 24.487 49.407 56.094 51.484h68.359v577.03h-68.359c-32.304 1.1539-57.891 25.058-57.891 53.906 0 28.964 25.587 52.674 57.891 53.828h68.359v147.27a203.93 202.52 0 0 0 203.83 202.42h224.06l56.719-98.359h-288.28c-53.103 0-96.406-42.893-96.406-95.859v-155.47h58.047c31.723-1.9617 56.328-25.441 56.328-53.828 0-28.502-24.606-51.945-56.328-53.906h-58.047v-577.11h58.047c33.117 0 60.118-22.978 60.234-51.25 1e-4 -28.272-27.001-51.328-60.234-51.328h-57.969v-165.47a96.679 96.009 0 0 1 96.484-95.859v0.15624h977.58a96.795 96.124 0 0 1 96.406 95.781v921.72l100 166.88v-1080.4c-1e-4 -111.59-91.347-202.42-203.83-202.42h-962.81zm251.25 359.61c-30.444 1.5001-54.781 22.239-56.641 48.203a47.294 46.966 0 0 0 15 37.188 64.259 63.814 0 0 0 41.641 17.266h514.06v-0.07813c33.233 0 60.042-22.978 60.391-51.25 0-28.272-27.274-51.328-60.391-51.328h-514.06zm-2.8125 338.28c-29.849 0-53.906 24.057-53.906 53.906s24.057 53.828 53.906 53.828h318.59c29.849 1e-5 53.828-23.979 53.828-53.828s-23.979-53.906-53.828-53.906h-318.59zm0 343.36c-29.849 0-53.906 24.057-53.906 53.906 0 29.849 24.057 53.906 53.906 53.906h139.53c29.849 0 53.828-24.057 53.828-53.906 1e-5 -29.85-23.979-53.906-53.828-53.906h-139.53zm96.016 357.11-56.797 98.359h102.73l59.922-98.359h-105.86z" }), _jsx("path", { className: "table-header-icons-overdue", d: "m1134-177.42c-15.754 0-31.544 7.7956-40.547 23.438l-415.94 720.39c-18.005 31.284 4.5368 70.234 40.547 70.234h831.8c36.01 0 58.552-38.951 40.547-70.234l-415.94-720.39c-9.0026-15.642-24.714-23.438-40.469-23.438zm0 184.53c47.713 0 86.406 44.129 86.406 98.594 0 166.1-38.693 300.7-86.406 300.7-47.714 0-86.484-134.61-86.484-300.7 0-54.465 38.771-98.594 86.484-98.594zm0 451.95a60.542 60.542 0 0 1 60.547 60.547 60.542 60.542 0 0 1-60.547 60.547 60.542 60.542 0 0 1-60.547-60.547 60.542 60.542 0 0 1 60.547-60.547z", fill: "#999" })] })),
135
136
  };
136
137
  const HeadColMain = ({ col }) => {
137
138
  var _a, _b;
@@ -165,13 +165,13 @@ svg.removesearchsvg{
165
165
  background: transparent;
166
166
  border-radius: var(--ext-search-wrapper-padding, 4px);
167
167
  height: var(--ext-search-wrapper-height, 25px);
168
- --input-padding: 1px 5px 3px 0;
168
+ --input-padding: 2px 5px 3px 5px;
169
169
  }
170
170
 
171
171
  .focused {
172
172
  border: var(--ext-search-wrapper-focused-border, 1px dashed white);
173
173
  color: white;
174
- --input-padding: 1px 5px 3px 10px;
174
+ --input-padding: var(--ext-search-wrapper-focused-padding, 2px 5px 3px 5px);
175
175
  }
176
176
 
177
177
  input.headsearch {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ehscan-react-table",
3
- "version": "0.0.35",
3
+ "version": "0.0.37",
4
4
  "description": "components",
5
5
  "main": "dist/Components.js",
6
6
  "types": "dist/Components.d.ts",