All files / src proptypes.js

100% Statements 123/123
100% Branches 0/0
100% Functions 0/0
100% Lines 123/123

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272      34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x   34x           34x     34x 34x 34x 34x     34x 34x 34x       34x     34x               34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x 34x     34x       34x 34x 34x 34x 34x 34x 34x 34x   34x           34x         34x       34x         34x               34x                         34x   34x         34x         34x         34x               34x               34x               34x                                 34x                 34x       34x       34x       34x       34x         34x   34x         34x       34x  
import PropTypes from "prop-types";
 
// Redux
export const initializeOptionsPropType = PropTypes.func.isRequired;
export const initializeCustomComponentsPropType = PropTypes.func.isRequired;
export const updateComponentSizePropType = PropTypes.func.isRequired;
export const sortColumnsPropType = PropTypes.func.isRequired;
export const addToDeleteRowPropType = PropTypes.func.isRequired;
export const setPagePagePropType = PropTypes.func.isRequired;
export const setRowsPerPagePropType = PropTypes.func.isRequired;
export const setRowEditedPropType = PropTypes.func.isRequired;
export const addRowEditedPropType = PropTypes.func.isRequired;
export const revertRowEditedPropType = PropTypes.func.isRequired;
export const addNewRowPropType = PropTypes.func.isRequired;
export const saveRowEditedPropType = PropTypes.func.isRequired;
export const deleteRowPropType = PropTypes.func.isRequired;
export const setIsScrollingPropType = PropTypes.func.isRequired;
export const selectRowPropType = PropTypes.func.isRequired;
export const setRowsSelectedPropType = PropTypes.func.isRequired;
export const setColumnVisibiltyPropType = PropTypes.func.isRequired;
export const searchPropType = PropTypes.func.isRequired;
export const toggleSnackbarPropType = PropTypes.func.isRequired;
export const setUserConfigurationPropType = PropTypes.func.isRequired;
export const enqueueSnackbarPropType = PropTypes.func.isRequired;
export const refreshRowsUserPropType = PropTypes.func.isRequired;
export const refreshRowsPropType = PropTypes.func;
export const orderByColumnsPropType = PropTypes.func.isRequired;
export const addAllRowsToEditedPropType = PropTypes.func.isRequired;
export const saveAllRowsEditedPropType = PropTypes.func.isRequired;
export const revertAllRowsToEditedPropType = PropTypes.func.isRequired;
export const duplicateRowPropType = PropTypes.func.isRequired;
export const isScrollingPropType = PropTypes.bool;
export const canDeletePropType = PropTypes.bool;
export const checkedPropType = PropTypes.bool;
export const orderByPropType = PropTypes.object;
export const isRefreshingPropType = PropTypes.bool;
export const strippedPropType = PropTypes.bool;
export const searchTermPropType = PropTypes.string;
export const rowsEditedPropType = PropTypes.arrayOf(PropTypes.object);
export const rowsDeletedPropType = PropTypes.arrayOf(PropTypes.object);
export const rowsSelectedPropType = PropTypes.arrayOf(PropTypes.object);
export const rowsGlobalEditedPropType = PropTypes.arrayOf(PropTypes.object);
export const maskPropType = PropTypes.array;
 
export const cellValPropType = PropTypes.oneOfType([
  PropTypes.string,
  PropTypes.number,
  PropTypes.bool
]);
 
export const classesPropType = PropTypes.object;
 
// Input propTypes
export const typePropType = PropTypes.string;
export const rowIdPropType = PropTypes.string;
export const columnIdPropType = PropTypes.string;
export const editingPropType = PropTypes.bool;
 
// Pagination propTypes
export const pageSelectedPropType = PropTypes.number;
export const pageTotalPropType = PropTypes.number;
export const rowsPerPageSelectedPropType = PropTypes.oneOfType([
  PropTypes.string,
  PropTypes.number
]);
export const rowsCurrentPagePropType = PropTypes.arrayOf(
  PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.object])
);
export const paginationPropType = PropTypes.shape({
  pageSelected: pageSelectedPropType,
  pageTotal: pageTotalPropType,
  rowsPerPageSelected: rowsPerPageSelectedPropType,
  rowsCurrentPage: rowsCurrentPagePropType
});
 
// Options propTypes
export const actionsPropType = PropTypes.func;
export const canEditRowPropType = PropTypes.func;
export const dtKeyPropType = PropTypes.string;
export const forceRerenderPropType = PropTypes.bool;
export const titlePropType = PropTypes.string;
export const widthPropType = PropTypes.string;
export const widthNumberPropType = PropTypes.number;
export const heightPropType = PropTypes.string;
export const heightNumberPropType = PropTypes.number;
export const columnSizeMultiplierPropType = PropTypes.number;
export const stylePropType = PropTypes.object;
export const keyColumnPropType = PropTypes.string;
export const fontPropType = PropTypes.string;
export const idPropType = PropTypes.string;
export const labelPropType = PropTypes.string;
export const colSizePropType = PropTypes.string;
export const editablePropType = PropTypes.bool;
export const dataTypePropType = PropTypes.string;
export const inputTypePropType = PropTypes.string;
export const dateFormatPropType = PropTypes.string;
export const valuesPropType = PropTypes.array;
export const requiredPropType = PropTypes.bool;
export const valueVerificationPropType = PropTypes.func;
export const rowPropType = PropTypes.object;
export const rowsPropType = PropTypes.arrayOf(rowPropType);
export const canEditPropType = PropTypes.bool;
export const canGlobalEditPropType = PropTypes.bool;
export const canPrintPropType = PropTypes.bool;
export const canDownloadPropType = PropTypes.bool;
export const canSearchPropType = PropTypes.bool;
export const canAddPropType = PropTypes.bool;
export const canRefreshRowsPropType = PropTypes.bool;
export const canOrderColumnsPropType = PropTypes.bool;
export const canSelectRowPropType = PropTypes.bool;
export const canSaveUserConfigurationPropType = PropTypes.bool;
export const canDuplicatePropType = PropTypes.bool;
export const columnsOrderPropType = PropTypes.arrayOf(PropTypes.string);
export const copyToClipboardPropType = PropTypes.bool;
export const availablePropType = PropTypes.arrayOf(
  PropTypes.oneOfType([PropTypes.string, PropTypes.number])
);
export const selectedPropType = PropTypes.oneOfType([
  PropTypes.string,
  PropTypes.number
]);
export const rowsSelectablePropType = PropTypes.bool;
export const selectPageRowsPropType = PropTypes.bool;
export const selectAllRowsPropType = PropTypes.bool;
export const tooltipPropType = PropTypes.string;
export const iconPropType = PropTypes.element;
export const onClickPropType = PropTypes.func;
export const headOfTheTablePropType = PropTypes.element;
export const bodyOfTheTablePropType = PropTypes.element;
 
export const datatablePropType = PropTypes.shape({
  width: widthPropType.isRequired,
  height: heightPropType,
  widthNumber: widthNumberPropType
});
 
export const headerPropType = PropTypes.shape({
  height: heightPropType.isRequired,
  heightNumber: heightNumberPropType
});
 
export const bodyPropType = PropTypes.shape({
  heightNumber: heightNumberPropType
});
 
export const rowDimensionPropType = PropTypes.shape({
  height: heightPropType.isRequired,
  heightNumber: heightNumberPropType
});
 
export const dimensionsPropType = PropTypes.shape({
  datatable: datatablePropType,
  header: headerPropType,
  body: bodyPropType,
  row: rowDimensionPropType,
  columnSizeMultiplier: columnSizeMultiplierPropType
});
 
export const columnPropType = PropTypes.shape({
  id: idPropType.isRequired,
  label: labelPropType.isRequired,
  colSize: colSizePropType,
  editable: editablePropType,
  dataType: dataTypePropType,
  inputType: inputTypePropType,
  dateFormat: dateFormatPropType,
  values: valuesPropType,
  required: requiredPropType,
  valueVerification: valueVerificationPropType
});
 
export const columnsPropType = PropTypes.arrayOf(columnPropType);
 
export const dataPropType = PropTypes.shape({
  columns: columnsPropType,
  rows: rowsPropType
});
 
export const userConfigurationPropType = PropTypes.shape({
  columnsOrder: columnsOrderPropType,
  copyToClipboard: copyToClipboardPropType
});
 
export const rowsPerPagePropType = PropTypes.shape({
  available: availablePropType,
  selected: selectedPropType
});
 
export const additionalIconsPropType = PropTypes.arrayOf(
  PropTypes.shape({
    tooltip: tooltipPropType,
    icon: iconPropType.isRequired,
    onClick: onClickPropType.isRequired
  })
);
 
export const additionalActionsPropType = PropTypes.arrayOf(
  PropTypes.shape({
    tooltip: tooltipPropType,
    icon: iconPropType.isRequired,
    onClick: onClickPropType.isRequired
  })
);
 
export const selectionIconsPropType = PropTypes.arrayOf(
  PropTypes.shape({
    tooltip: tooltipPropType,
    icon: iconPropType.isRequired,
    onClick: onClickPropType.isRequired
  })
);
 
export const featuresPropType = PropTypes.shape({
  canEdit: canEditPropType,
  canAdd: canAddPropType,
  canPrint: canPrintPropType,
  canDownload: canDownloadPropType,
  canSearch: canSearchPropType,
  canRefreshRows: canRefreshRowsPropType,
  canOrderColumns: canOrderColumnsPropType,
  canSaveUserConfiguration: canSaveUserConfigurationPropType,
  canSelectRow: canSelectRowPropType,
  userConfiguration: userConfigurationPropType,
  rowsPerPage: rowsPerPagePropType,
  additionalActions: additionalActionsPropType,
  additionalIcons: additionalIconsPropType,
  selectionIcons: selectionIconsPropType
});
 
export const optionsPropType = PropTypes.shape({
  title: titlePropType,
  dimensions: dimensionsPropType,
  keyColumn: keyColumnPropType.isRequired,
  font: fontPropType,
  data: dataPropType.isRequired,
  features: featuresPropType
});
 
export const CustomTableBodyRowPropType = PropTypes.oneOfType([
  PropTypes.func,
  PropTypes.element
]);
export const CustomTableBodyCellPropType = PropTypes.oneOfType([
  PropTypes.func,
  PropTypes.element
]);
export const CustomTableHeaderRowPropType = PropTypes.oneOfType([
  PropTypes.func,
  PropTypes.element
]);
export const CustomTableHeaderCellPropType = PropTypes.oneOfType([
  PropTypes.func,
  PropTypes.element
]);
export const componentPropType = PropTypes.oneOfType([
  PropTypes.func,
  PropTypes.element
]);
 
export const customPropsPropType = PropTypes.any;
 
export const customDataTypePropType = PropTypes.shape({
  dataType: dataTypePropType.isRequired,
  component: componentPropType.isRequired
});
 
export const customDataTypesPropType = PropTypes.arrayOf(
  customDataTypePropType
);
 
export const indexPropType = PropTypes.number;