!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/var/www/html/wincloud_gateway/node_modules/@buffetjs/core/src/components/TableHeader/   drwxr-xr-x
Free 13.17 GB of 57.97 GB (22.72%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     index.js (2.48 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
/**
 *
 * TableHeader
 *
 */

import React from 'react';
import PropTypes from 'prop-types';
import { get } from 'lodash';
import { Checkbox } from '@buffetjs/styles';
import Icon from '../Icon';

/* eslint-disable jsx-a11y/no-noninteractive-element-interactions */
/* eslint-disable jsx-a11y/control-has-associated-label */
function TableHeader({
  headers,
  onChangeSort,
  onSelectAll,
  rows,
  shouldAddCell,
  sortBy,
  sortOrder,
  withBulkAction,
}) {
  const checked = rows.length > 0 && rows.every(row => row._isChecked === true);
  const shouldDisplayNotChecked =
    rows.some(row => row._isChecked === true) && !checked;

  return (
    <thead>
      <tr>
        {withBulkAction && (
          <th className="checkCell">
            <Checkbox
              onChange={onSelectAll}
              checked={checked}
              someChecked={shouldDisplayNotChecked}
            />
          </th>
        )}
        {headers.map(header => {
          const { isSortEnabled, name, value } = header;
          const shouldDisplaySort = isSortEnabled && sortBy === value;
          const firstElementThatCanBeSorted = get(
            headers.filter(h => h.isSortEnabled),
            [0, 'value'],
            null
          );

          return (
            // eslint-disable-next-line jsx-a11y/click-events-have-key-events
            <th
              key={value}
              onClick={() => {
                onChangeSort({
                  sortBy: value,
                  firstElementThatCanBeSorted,
                  isSortEnabled,
                });
              }}
            >
              <p className={isSortEnabled ? 'clickable' : ''}>
                {name}
                {shouldDisplaySort && <Icon icon={sortOrder || 'asc'} />}
              </p>
            </th>
          );
        })}
        {shouldAddCell && <th />}
      </tr>
    </thead>
  );
}

TableHeader.defaultProps = {
  headers: [],
  onChangeSort: () => {},
  onSelectAll: () => {},
  rows: [],
  shouldAddCell: false,
  sortBy: null,
  sortOrder: 'asc',
  withBulkAction: false,
};

TableHeader.propTypes = {
  headers: PropTypes.arrayOf(
    PropTypes.shape({
      isSortEnabled: PropTypes.bool,
      name: PropTypes.string,
      value: PropTypes.string,
    })
  ),
  onChangeSort: PropTypes.func,
  onSelectAll: PropTypes.func,
  rows: PropTypes.instanceOf(Array),
  shouldAddCell: PropTypes.bool,
  sortBy: PropTypes.string,
  sortOrder: PropTypes.string,
  withBulkAction: PropTypes.bool,
};

export default TableHeader;

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0046 ]--