techsbcn-storybook 0.12.6 → 0.12.7

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.
@@ -14,6 +14,7 @@ interface SimpleTableComponentProps {
14
14
  loading?: boolean;
15
15
  onClickRow?: (id: number) => void;
16
16
  isCheckTable?: {
17
+ checkAllItems?: boolean;
17
18
  rowsChecked?: number[];
18
19
  onCheckedAction?: (ids: number[]) => void;
19
20
  onCheckedSingleAction?: (id: number) => void;
@@ -324,6 +324,9 @@ var TextFieldComponent = function TextFieldComponent(props) {
324
324
  disableUnderline: true,
325
325
  startAdornment: props.startIcon,
326
326
  endAdornment: props.endIcon,
327
+ classes: {
328
+ focused: 'main-border-color'
329
+ },
327
330
  inputProps: {
328
331
  max: props.maxNumber,
329
332
  min: props.minNumber,
@@ -713,6 +716,7 @@ var TableComponent = function TableComponent(props) {
713
716
  },
714
717
  onRowsPerPageChange: handleChangeRowsPerPage,
715
718
  component: "div",
719
+ className: "table-pagination",
716
720
  ActionsComponent: function ActionsComponent(_actions) {
717
721
  return React__default.createElement(_.Box, {
718
722
  flexShrink: 0,
@@ -727,7 +731,14 @@ var TableComponent = function TableComponent(props) {
727
731
  hideNextButton: true,
728
732
  hidePrevButton: true,
729
733
  showFirstButton: true,
730
- showLastButton: true
734
+ showLastButton: true,
735
+ renderItem: function renderItem(item) {
736
+ return React__default.createElement(_.PaginationItem, Object.assign({
737
+ classes: {
738
+ selected: 'main-background-color'
739
+ }
740
+ }, item));
741
+ }
731
742
  }));
732
743
  }
733
744
  })));
@@ -740,7 +751,7 @@ var css_248z$6 = ".table-simple-component .paper-container {\n box-shadow: none
740
751
  styleInject(css_248z$6);
741
752
 
742
753
  var SimpleTableComponent = function SimpleTableComponent(props) {
743
- var _props$isCheckTable10, _props$isCheckTable11, _props$isCheckTable12;
754
+ var _props$isCheckTable10, _props$isCheckTable11, _props$isCheckTable12, _props$isCheckTable13;
744
755
 
745
756
  var isSelected = function isSelected(id) {
746
757
  var _props$isCheckTable;
@@ -929,14 +940,14 @@ var SimpleTableComponent = function SimpleTableComponent(props) {
929
940
  className: "table-simple-component"
930
941
  }, React__default.createElement(_.Paper, {
931
942
  className: "paper-container"
932
- }, props.isCheckTable && React__default.createElement(_.Hidden, {
943
+ }, ((_props$isCheckTable10 = props.isCheckTable) == null ? void 0 : _props$isCheckTable10.checkAllItems) && React__default.createElement(_.Hidden, {
933
944
  mdUp: true
934
945
  }, React__default.createElement(_.Box, {
935
946
  display: "block",
936
947
  className: "checkbox-cell"
937
948
  }, React__default.createElement(_.Checkbox, {
938
- indeterminate: props.rows && JSON.parse(JSON.stringify((_props$isCheckTable10 = props.isCheckTable) == null ? void 0 : _props$isCheckTable10.rowsChecked)).length > 0 && JSON.parse(JSON.stringify((_props$isCheckTable11 = props.isCheckTable) == null ? void 0 : _props$isCheckTable11.rowsChecked)).length < props.rows.length,
939
- checked: props.rows && props.rows.length > 0 && JSON.parse(JSON.stringify((_props$isCheckTable12 = props.isCheckTable) == null ? void 0 : _props$isCheckTable12.rowsChecked)).length === props.rows.length,
949
+ indeterminate: props.rows && JSON.parse(JSON.stringify((_props$isCheckTable11 = props.isCheckTable) == null ? void 0 : _props$isCheckTable11.rowsChecked)).length > 0 && JSON.parse(JSON.stringify((_props$isCheckTable12 = props.isCheckTable) == null ? void 0 : _props$isCheckTable12.rowsChecked)).length < props.rows.length,
950
+ checked: props.rows && props.rows.length > 0 && JSON.parse(JSON.stringify((_props$isCheckTable13 = props.isCheckTable) == null ? void 0 : _props$isCheckTable13.rowsChecked)).length === props.rows.length,
940
951
  onChange: handleSelectAllClick
941
952
  }))), React__default.createElement(_.TableContainer, {
942
953
  className: "table-container"
@@ -948,7 +959,7 @@ var SimpleTableComponent = function SimpleTableComponent(props) {
948
959
  smDown: true
949
960
  }, React__default.createElement(_.TableHead, null, React__default.createElement(_.TableRow, null, props.columns.map(function (column) {
950
961
  if (column.id) {
951
- var _props$isCheckTable13, _props$isCheckTable14, _props$isCheckTable15;
962
+ var _props$isCheckTable14, _props$isCheckTable15, _props$isCheckTable16;
952
963
 
953
964
  return React__default.createElement(_.TableCell, {
954
965
  className: "table-column",
@@ -961,8 +972,8 @@ var SimpleTableComponent = function SimpleTableComponent(props) {
961
972
  }, column.isCheck ? React__default.createElement(_.Box, {
962
973
  className: "checkbox-cell"
963
974
  }, React__default.createElement(_.Checkbox, {
964
- indeterminate: props.rows && JSON.parse(JSON.stringify((_props$isCheckTable13 = props.isCheckTable) == null ? void 0 : _props$isCheckTable13.rowsChecked)).length > 0 && JSON.parse(JSON.stringify((_props$isCheckTable14 = props.isCheckTable) == null ? void 0 : _props$isCheckTable14.rowsChecked)).length < props.rows.length,
965
- checked: props.rows && props.rows.length > 0 && JSON.parse(JSON.stringify((_props$isCheckTable15 = props.isCheckTable) == null ? void 0 : _props$isCheckTable15.rowsChecked)).length === props.rows.length,
975
+ indeterminate: props.rows && JSON.parse(JSON.stringify((_props$isCheckTable14 = props.isCheckTable) == null ? void 0 : _props$isCheckTable14.rowsChecked)).length > 0 && JSON.parse(JSON.stringify((_props$isCheckTable15 = props.isCheckTable) == null ? void 0 : _props$isCheckTable15.rowsChecked)).length < props.rows.length,
976
+ checked: props.rows && props.rows.length > 0 && JSON.parse(JSON.stringify((_props$isCheckTable16 = props.isCheckTable) == null ? void 0 : _props$isCheckTable16.rowsChecked)).length === props.rows.length,
966
977
  onChange: handleSelectAllClick
967
978
  })) : React__default.createElement(_.Box, {
968
979
  className: "table-header-cell"
@@ -980,11 +991,11 @@ var SimpleTableComponent = function SimpleTableComponent(props) {
980
991
  }, React__default.createElement(_.CircularProgress, {
981
992
  className: "circular-progress-main-color"
982
993
  }))), props.rows && props.rows.length > 0 ? props.rows.map(function (row, index) {
983
- var _props$isCheckTable16;
994
+ var _props$isCheckTable17;
984
995
 
985
996
  var key = props.rows[index + 1] && props.rows[index + 1].id === row.id ? index : row.id;
986
997
  var rowColor = props.rowsColorColumn && ObjectbyString(row, props.rowsColorColumn.columnName) === props.rowsColorColumn.columnValue ? "row-color-" + props.rowsColorColumn.columnValue : '';
987
- var isRowSelected = ((_props$isCheckTable16 = props.isCheckTable) == null ? void 0 : _props$isCheckTable16.rowsChecked) && isSelected(row.id);
998
+ var isRowSelected = ((_props$isCheckTable17 = props.isCheckTable) == null ? void 0 : _props$isCheckTable17.rowsChecked) && isSelected(row.id);
988
999
  return React__default.createElement(_.TableRow, {
989
1000
  className: "table-rows " + rowColor + " " + (props.onClickRow ? 'row-click' : ''),
990
1001
  role: "checkbox",
@@ -1045,9 +1056,9 @@ var SimpleTableComponent = function SimpleTableComponent(props) {
1045
1056
  'aria-labelledby': row.id
1046
1057
  },
1047
1058
  onChange: function onChange(event) {
1048
- var _props$isCheckTable17;
1059
+ var _props$isCheckTable18;
1049
1060
 
1050
- return (_props$isCheckTable17 = props.isCheckTable) != null && _props$isCheckTable17.onCheckedAction ? onCheckAction(event, row.id) : onCheckSingleAction(event, row.id);
1061
+ return (_props$isCheckTable18 = props.isCheckTable) != null && _props$isCheckTable18.onCheckedAction ? onCheckAction(event, row.id) : onCheckSingleAction(event, row.id);
1051
1062
  }
1052
1063
  })) : column.isEditableTableCell ? EditableTableCell(row, value, column.id, column.isEditableTableCell) : column.enumColumn ? React__default.createElement(_.Box, {
1053
1064
  className: (column.enumColumn.hasColor ? (column.enumColumn.enumSuffix ? value.toLowerCase() + "-" + column.enumColumn.enumSuffix.toLowerCase() : value.toString().toLowerCase()) + "-type-color" : '') + " format-value"
@@ -2728,6 +2739,9 @@ var TabsComponent = function TabsComponent(props) {
2728
2739
  return a.value - b.value;
2729
2740
  }).map(function (tabLabel) {
2730
2741
  return React__default.createElement(material.Tab, {
2742
+ classes: {
2743
+ selected: 'main-background-color'
2744
+ },
2731
2745
  key: tabLabel.value,
2732
2746
  label: tabLabel.label,
2733
2747
  value: tabLabel.value.toString()