Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
Size: Mime:
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
import { Skeleton, Table, TableHead, TableBody, TableRow, TableCell } from '@scaleflex/ui/core';
import { LIST_VIEW_COLS_IDS } from '@filerobot/utils/lib/constants';
import { useExplorer } from '../../../hooks';
import StyledAssetsList from '../AssetsList.styled';
import Styled from './ListView.styled';
import { jsx as _jsx } from "react/jsx-runtime";
import { jsxs as _jsxs } from "react/jsx-runtime";
var ListViewFilesSkeleton = function ListViewFilesSkeleton(_ref) {
  var hideAccordionHeader = _ref.hideAccordionHeader,
    _ref$count = _ref.count,
    count = _ref$count === void 0 ? 18 : _ref$count;
  var _useExplorer = useExplorer(),
    selectedListViewCols = _useExplorer.opts.selectedListViewCols;
  var createEmptyArray = function createEmptyArray(arrayLength) {
    return new Array(arrayLength).fill();
  };
  return /*#__PURE__*/_jsx(StyledAssetsList.Accordion, {
    expanded: true,
    label: /*#__PURE__*/_jsx(Skeleton, {
      width: 80
    }),
    detailStyle: {
      paddingLeft: '20px'
    },
    hideHeader: hideAccordionHeader,
    hideIcon: true,
    onContextMenu: function onContextMenu(e) {
      return e.stopPropagation();
    },
    children: /*#__PURE__*/_jsxs(Table, {
      children: [/*#__PURE__*/_jsx(TableHead, {
        children: /*#__PURE__*/_jsx(TableRow, {
          children: [LIST_VIEW_COLS_IDS.NAME].concat(_toConsumableArray(selectedListViewCols)).map(function (cell) {
            return /*#__PURE__*/_jsxs(Styled.InnerHeaderTableCell, {
              children: [cell === LIST_VIEW_COLS_IDS.NAME && /*#__PURE__*/_jsx(Styled.TableCheckboxSkeleton, {}), /*#__PURE__*/_jsx(Styled.TableHeaderSkeleton, {})]
            }, cell);
          })
        })
      }), /*#__PURE__*/_jsx(TableBody, {
        children: createEmptyArray(count).map(function (_, index) {
          return /*#__PURE__*/_jsxs(TableRow, {
            children: [/*#__PURE__*/_jsx(TableCell, {
              children: /*#__PURE__*/_jsxs(Styled.FirstColumnWrapper, {
                children: [/*#__PURE__*/_jsx(Styled.TableCheckboxSkeleton, {}), /*#__PURE__*/_jsxs(Styled.FirstColumnContentWrapper, {
                  children: [/*#__PURE__*/_jsx(Styled.AssetPreviewSkeleton, {}), /*#__PURE__*/_jsxs(Styled.FileInfoSkeletonWrapper, {
                    children: [/*#__PURE__*/_jsx(Styled.FileNameSkeleton, {}), /*#__PURE__*/_jsx(Styled.FileSizAndResolutionSkeleton, {})]
                  })]
                })]
              })
            }), /*#__PURE__*/_jsx(TableCell, {
              children: /*#__PURE__*/_jsx(Styled.TableCellSkeleton, {})
            }), createEmptyArray(4).map(function (_, index) {
              return /*#__PURE__*/_jsx(TableCell, {
                children: /*#__PURE__*/_jsx(Styled.TableCellSkeleton, {})
              }, index);
            })]
          }, index);
        })
      })]
    })
  });
};
export default ListViewFilesSkeleton;