hrm_ui_lib 2.4.8 → 2.4.10

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,3 +1,14 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
13
  import classNames from 'classnames';
3
14
  import { calcColumnWidth, CHECKBOX_DEFAULT_WIDTH, CHECKBOX_HEADER_ID } from './utils';
@@ -5,13 +16,15 @@ import { Text } from '../Text';
5
16
  import IconArrowDown from '../SVGIcons/IconArrowDown';
6
17
  import IconArrowUp from '../SVGIcons/IconArrowUp';
7
18
  export function Header({ headerGroup, tableWidth, withSelect, uniqueKey, fixedHeader = false }) {
8
- return (_jsx("tr", Object.assign({}, headerGroup.getHeaderGroupProps(), { className: classNames({ fixed_header: fixedHeader }), children: headerGroup.headers.map(({ id, minWidth, maxWidth, width, widthInPercent, getHeaderProps, fixed, columnProps, render, isSorted, isSortedDesc, getSortByToggleProps }, i, arr) => {
19
+ const _a = headerGroup.getHeaderGroupProps(), { key: keyheaderGroup } = _a, headerGroupProps = __rest(_a, ["key"]);
20
+ return (_jsx("tr", Object.assign({}, headerGroupProps, { className: classNames({ fixed_header: fixedHeader }), children: headerGroup.headers.map(({ id, minWidth, maxWidth, width, widthInPercent, getHeaderProps, fixed, columnProps, render, isSorted, isSortedDesc, getSortByToggleProps }, i, arr) => {
9
21
  var _a;
10
22
  const isSelection = id === CHECKBOX_HEADER_ID;
11
23
  const style = Object.assign(Object.assign(Object.assign({ width: isSelection
12
24
  ? CHECKBOX_DEFAULT_WIDTH
13
25
  : calcColumnWidth(widthInPercent, tableWidth), left: !isSelection && withSelect && fixed === 'left' ? CHECKBOX_DEFAULT_WIDTH : 0 }, (!isSelection && minWidth ? { minWidth } : {})), (!isSelection && maxWidth ? { maxWidth } : {})), (!isSelection && width ? { width } : {}));
14
- return (_jsx("th", Object.assign({}, getHeaderProps((columnProps === null || columnProps === void 0 ? void 0 : columnProps.sortable) ? getSortByToggleProps() : undefined), { className: classNames({
26
+ const _b = getHeaderProps((columnProps === null || columnProps === void 0 ? void 0 : columnProps.sortable) ? getSortByToggleProps() : undefined), { key: keyHead } = _b, headProps = __rest(_b, ["key"]);
27
+ return (_jsx("th", Object.assign({}, headProps, { className: classNames({
15
28
  fixed_column_left: fixed === 'left',
16
29
  fixed_column_right: fixed === 'right',
17
30
  fixed_checkbox: isSelection && ((_a = arr[i + 1]) === null || _a === void 0 ? void 0 : _a.fixed) === 'left',
@@ -1,13 +1,26 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  import { jsx as _jsx } from "react/jsx-runtime";
2
13
  import { useMemo } from 'react';
3
14
  import classNames from 'classnames';
4
15
  import { CHECKBOX_DEFAULT_WIDTH, CHECKBOX_HEADER_ID } from './utils';
5
16
  export function Row({ row, selectedFlatRows, withSelect, uniqueKey, handleRowClick }) {
6
17
  const isRowSelected = useMemo(() => selectedFlatRows.find((r) => r.id === row.id), [selectedFlatRows]);
7
- return (_jsx("tr", Object.assign({}, row.getRowProps(), { className: classNames({ selected: Boolean(isRowSelected) }), onClick: () => handleRowClick === null || handleRowClick === void 0 ? void 0 : handleRowClick(row.original), children: row.cells.map(({ getCellProps, column, render }, i, arr) => {
18
+ const _a = row.getRowProps(), { key: keyRow } = _a, rowProps = __rest(_a, ["key"]);
19
+ return (_jsx("tr", Object.assign({}, rowProps, { className: classNames({ selected: Boolean(isRowSelected) }), onClick: () => handleRowClick === null || handleRowClick === void 0 ? void 0 : handleRowClick(row.original), children: row.cells.map(({ getCellProps, column, render }, i, arr) => {
8
20
  var _a;
9
21
  const isSelection = column.id === CHECKBOX_HEADER_ID;
10
- return (_jsx("td", Object.assign({}, getCellProps(), { style: {
22
+ const _b = getCellProps(), { key: keycell } = _b, cellProps = __rest(_b, ["key"]);
23
+ return (_jsx("td", Object.assign({}, cellProps, { style: {
11
24
  left: !isSelection && withSelect && (column === null || column === void 0 ? void 0 : column.fixed) === 'left' ? CHECKBOX_DEFAULT_WIDTH : 0
12
25
  }, className: classNames({
13
26
  fixed_column_left: (column === null || column === void 0 ? void 0 : column.fixed) === 'left',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hrm_ui_lib",
3
- "version": "2.4.8",
3
+ "version": "2.4.10",
4
4
  "description": "UI library for Dino",
5
5
  "main": "./index.js",
6
6
  "module": "./index.js",
File without changes