techsbcn-storybook 0.26.1 → 0.26.3

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.
@@ -797,7 +797,7 @@ var TableComponent = function TableComponent(props) {
797
797
  className: "label-cell"
798
798
  }, column.label)), column.rowViewFormat ? React__default.createElement(_.Box, {
799
799
  className: "format-value"
800
- }, value) : column.action && row.length > 0 ? React__default.createElement(_.Box, null, React__default.createElement(_.Box, {
800
+ }, value) : column.action && Object.keys(row).length > 0 ? React__default.createElement(_.Box, null, React__default.createElement(_.Box, {
801
801
  display: "flex",
802
802
  className: "actions"
803
803
  }, column.action && column.action.map(function (action, i) {
@@ -816,12 +816,12 @@ var TableComponent = function TableComponent(props) {
816
816
  }, action.children), !action.onClick && !action.onClickId && React__default.createElement(_.Box, {
817
817
  className: "btn-action"
818
818
  }, action.children));
819
- }))) : column.isActiveFunction && row.length > 0 ? React__default.createElement(_.Box, {
819
+ }))) : column.isActiveFunction && Object.keys(row).length > 0 ? React__default.createElement(_.Box, {
820
820
  className: "btn-action main-color-hover",
821
821
  onClick: function onClick() {
822
822
  return column.isActiveFunction && column.isActiveFunction.onClickId(row.id);
823
823
  }
824
- }, value ? column.isActiveFunction.activeIcon : column.isActiveFunction.disabledIcon) : column.isCheck && row.length > 0 ? React__default.createElement(_.Box, {
824
+ }, value ? column.isActiveFunction.activeIcon : column.isActiveFunction.disabledIcon) : column.isCheck && Object.keys(row).length > 0 ? React__default.createElement(_.Box, {
825
825
  className: "checkbox-cell"
826
826
  }, React__default.createElement(_.Checkbox, {
827
827
  checked: isItemSelected,
@@ -831,9 +831,9 @@ var TableComponent = function TableComponent(props) {
831
831
  onChange: function onChange(event) {
832
832
  return onCheckAction(event, row.id);
833
833
  }
834
- })) : column.isEditableTableCell && row.length > 0 ? EditableTableCell(row, value, column.id, column.isEditableTableCell) : column.enumColumn && row.length > 0 ? React__default.createElement(_.Box, {
834
+ })) : column.isEditableTableCell && Object.keys(row).length > 0 ? EditableTableCell(row, value, column.id, column.isEditableTableCell) : column.enumColumn && Object.keys(row).length > 0 ? React__default.createElement(_.Box, {
835
835
  className: (column.enumColumn.hasColor ? (column.enumColumn.enumSuffix ? value.toLowerCase() + "-" + column.enumColumn.enumSuffix.toLowerCase() : value.toString().toLowerCase()) + "-type-color" : '') + " format-value"
836
- }, formatValue(value, column)) : column.isBoolean && row.length > 0 ? React__default.createElement(_.Box, {
836
+ }, formatValue(value, column)) : column.isBoolean && Object.keys(row).length > 0 ? React__default.createElement(_.Box, {
837
837
  className: (column.isBoolean.hasColor ? (column.isBoolean.enumSuffix ? value.toString().toLowerCase() + "-" + column.isBoolean.enumSuffix.toLowerCase() : value.toString().toLowerCase()) + "-boolean-color" : '') + " format-value"
838
838
  }, formatValue(value, column)) : React__default.createElement(_.Box, {
839
839
  className: "" + (column.isImage ? '' : 'format-value')
@@ -1192,7 +1192,7 @@ var SimpleTableComponent = function SimpleTableComponent(props) {
1192
1192
  }, column.label !== '-' && React__default.createElement(_.Box, {
1193
1193
  display: "inline-block",
1194
1194
  className: "label-cell"
1195
- }, column.label)), column.action && row.length > 0 ? React__default.createElement(_.Box, null, React__default.createElement(_.Box, {
1195
+ }, column.label)), column.action && Object.keys(row).length > 0 ? React__default.createElement(_.Box, null, React__default.createElement(_.Box, {
1196
1196
  display: "flex",
1197
1197
  className: "actions"
1198
1198
  }, column.rowViewFormat ? React__default.createElement(_.Box, {
@@ -1213,12 +1213,12 @@ var SimpleTableComponent = function SimpleTableComponent(props) {
1213
1213
  }, action.children), !action.onClick && !action.onClickId && React__default.createElement(_.Box, {
1214
1214
  className: "btn-action"
1215
1215
  }, action.children));
1216
- }))) : column.isActiveFunction && row.length > 0 ? React__default.createElement(_.Box, {
1216
+ }))) : column.isActiveFunction && Object.keys(row).length > 0 ? React__default.createElement(_.Box, {
1217
1217
  className: "btn-action main-color-hover",
1218
1218
  onClick: function onClick() {
1219
1219
  return column.isActiveFunction && column.isActiveFunction.onClickId(row.id);
1220
1220
  }
1221
- }, value ? column.isActiveFunction.activeIcon : column.isActiveFunction.disabledIcon) : column.isCheck && row.length > 0 ? React__default.createElement(_.Box, {
1221
+ }, value ? column.isActiveFunction.activeIcon : column.isActiveFunction.disabledIcon) : column.isCheck && Object.keys(row).length > 0 ? React__default.createElement(_.Box, {
1222
1222
  className: "checkbox-cell"
1223
1223
  }, React__default.createElement(_.Checkbox, {
1224
1224
  checked: isItemSelected,
@@ -1230,9 +1230,9 @@ var SimpleTableComponent = function SimpleTableComponent(props) {
1230
1230
 
1231
1231
  return (_props$isCheckTable18 = props.isCheckTable) != null && _props$isCheckTable18.onCheckedAction ? onCheckAction(event, row.id) : onCheckSingleAction(event, row.id);
1232
1232
  }
1233
- })) : column.isEditableTableCell && row.length > 0 ? EditableTableCell(row, value, column.id, column.isEditableTableCell) : column.enumColumn && row.length > 0 ? React__default.createElement(_.Box, {
1233
+ })) : column.isEditableTableCell && Object.keys(row).length > 0 ? EditableTableCell(row, value, column.id, column.isEditableTableCell) : column.enumColumn && Object.keys(row).length > 0 ? React__default.createElement(_.Box, {
1234
1234
  className: (column.enumColumn.hasColor ? (column.enumColumn.enumSuffix ? value.toLowerCase() + "-" + column.enumColumn.enumSuffix.toLowerCase() : value.toString().toLowerCase()) + "-type-color" : '') + " format-value"
1235
- }, formatValue(value, column)) : column.isBoolean && row.length > 0 ? React__default.createElement(_.Box, {
1235
+ }, formatValue(value, column)) : column.isBoolean && Object.keys(row).length > 0 ? React__default.createElement(_.Box, {
1236
1236
  className: (column.isBoolean.hasColor ? (column.isBoolean.enumSuffix ? value.toString().toLowerCase() + "-" + column.isBoolean.enumSuffix.toLowerCase() : value.toString().toLowerCase()) + "-boolean-color" : '') + " format-value"
1237
1237
  }, formatValue(value, column)) : React__default.createElement(_.Box, {
1238
1238
  className: "" + (column.isImage ? '' : 'format-value')
@@ -3186,6 +3186,11 @@ var DatePickerComponent = function DatePickerComponent(props) {
3186
3186
  hover = _React$useState2[0],
3187
3187
  setHover = _React$useState2[1];
3188
3188
 
3189
+ React.useEffect(function () {
3190
+ var _props$value;
3191
+
3192
+ setValue((_props$value = props.value) != null ? _props$value : null);
3193
+ }, [props.value]);
3189
3194
  return React__default.createElement(_.Box, {
3190
3195
  className: "data-picker-component",
3191
3196
  width: "100%"