techsbcn-storybook 0.12.2 → 0.12.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.
- package/dist/index.d.ts +1 -0
- package/dist/techsbcn-storybook.cjs.development.js +347 -19
- package/dist/techsbcn-storybook.cjs.development.js.map +1 -1
- package/dist/techsbcn-storybook.cjs.production.min.js +1 -1
- package/dist/techsbcn-storybook.cjs.production.min.js.map +1 -1
- package/dist/techsbcn-storybook.esm.js +347 -20
- package/dist/techsbcn-storybook.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/index.tsx +1 -0
package/dist/index.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ export * from './components/wrappers/PublicFormWrapper/PublicFormWrapper';
|
|
|
2
2
|
export * from './components/wrappers/MainWrapperComponent/MainWrapperComponent';
|
|
3
3
|
export * from './components/tables/SearchComponent/SearchComponent';
|
|
4
4
|
export * from './components/tables/TableComponent/TableComponent';
|
|
5
|
+
export * from './components/tables/SimpleTableComponent/SimpleTableComponent';
|
|
5
6
|
export * from './components/layouts/MainLayoutSimple/MainLayoutSimple';
|
|
6
7
|
export * from './components/navigation/VerticalNav/VerticalNav';
|
|
7
8
|
export * from './components/navigation/components/UserInfo';
|
|
@@ -725,9 +725,336 @@ TableComponent.defaultProps = {
|
|
|
725
725
|
showTotalCount: true
|
|
726
726
|
};
|
|
727
727
|
|
|
728
|
-
var css_248z$5 = ".
|
|
728
|
+
var css_248z$5 = ".table-simple-component .paper-container {\n box-shadow: none;\n background-color: transparent !important;\n}\n.table-simple-component .paper-container .checkbox-cell .MuiCheckbox-root {\n padding: 0 !important;\n}\n.table-simple-component .paper-container .checkbox-cell .MuiCheckbox-root:hover {\n background-color: transparent !important;\n}\n.table-simple-component .paper-container .checkbox-cell .Mui-checked {\n color: rgba(0, 0, 0, 0.54) !important;\n}\n.table-simple-component .paper-container .checkbox-cell .MuiCheckbox-indeterminate {\n color: #212529 !important;\n}\n.table-simple-component .paper-container .table-container {\n max-height: 68vh;\n border-bottom: 1px solid black;\n}\n.table-simple-component .paper-container .table-container .table-column:first-child {\n border-radius: 5px 0 0 5px;\n}\n.table-simple-component .paper-container .table-container .table-column:last-child {\n border-right: none !important;\n border-radius: 0 5px 5px 0;\n}\n.table-simple-component .paper-container .table-container .table-column {\n font-weight: bold;\n font-size: 1rem !important;\n padding: 10px !important;\n border-top: 1px solid #e0e0e0;\n border-right: 1px solid #e0e0e0;\n border-bottom: 2px solid #e0e0e0;\n}\n.table-simple-component .paper-container .table-container .table-column .table-header-cell {\n color: black;\n padding: 0px 10px 0px 10px !important;\n}\n.table-simple-component .paper-container .table-container .table-rows.row-click {\n cursor: pointer;\n}\n.table-simple-component .paper-container .table-container .table-rows.row-click:hover {\n background-color: rgba(0, 0, 0, 0.04);\n}\n.table-simple-component .paper-container .table-container .table-rows .Mui-selected {\n background-color: transparent !important;\n}\n.table-simple-component .paper-container .table-container .table-rows .MuiTableCell-root {\n padding: 6px !important;\n overflow: hidden;\n}\n.table-simple-component .paper-container .table-container .table-rows .img-table {\n width: 100%;\n height: 110px;\n}\n.table-simple-component .paper-container .table-container .table-rows .img-table img {\n object-fit: contain;\n}\n.table-simple-component .paper-container .table-container .table-rows .actions {\n float: right;\n}\n.table-simple-component .paper-container .table-container .table-rows .btn-action {\n color: rgba(0, 0, 0, 0.54);\n display: inline-block;\n text-decoration: none;\n font-size: 1.6em !important;\n padding: 0px 7px;\n cursor: pointer;\n}\n.table-simple-component .paper-container .MuiTable-root.loading {\n opacity: 0.5;\n}\n.table-simple-component .paper-container .MuiTable-root.loading .MuiCircularProgress-root {\n width: 80px !important;\n height: 80px !important;\n position: absolute;\n left: 0;\n right: 0;\n top: 5px;\n margin: auto;\n color: grey;\n}\n@media (max-width: 992px) {\n .table-simple-component .paper-container .table-container {\n max-height: 60vh;\n border-top: 1px solid #cccccc;\n }\n .table-simple-component .paper-container .table-container .MuiTable-root {\n border-collapse: collapse !important;\n }\n .table-simple-component .paper-container .table-container .MuiTableHead-root {\n display: none !important;\n }\n .table-simple-component .paper-container .table-container .table-rows {\n border-bottom: 2px solid #cccccc;\n }\n .table-simple-component .paper-container .table-container .table-rows .MuiTableCell-root {\n width: 100%;\n border-bottom: none !important;\n }\n .table-simple-component .paper-container .table-container .table-rows .MuiTableCell-root .label-cell {\n font-size: 1rem;\n vertical-align: top;\n width: 50%;\n height: auto;\n }\n .table-simple-component .paper-container .table-container .table-rows .MuiTableCell-root .label-cell + div {\n display: inline-block;\n }\n .table-simple-component .paper-container .table-container .table-rows .table-cell {\n display: inline-block !important;\n }\n .table-simple-component .paper-container .table-container .table-rows .format-value {\n text-overflow: ellipsis;\n white-space: nowrap;\n overflow: hidden;\n width: 50%;\n max-width: 300px;\n }\n}";
|
|
729
729
|
styleInject(css_248z$5);
|
|
730
730
|
|
|
731
|
+
var SimpleTableComponent = function SimpleTableComponent(props) {
|
|
732
|
+
var _props$isCheckTable10, _props$isCheckTable11, _props$isCheckTable12;
|
|
733
|
+
|
|
734
|
+
var isSelected = function isSelected(id) {
|
|
735
|
+
var _props$isCheckTable;
|
|
736
|
+
|
|
737
|
+
return JSON.parse(JSON.stringify((_props$isCheckTable = props.isCheckTable) == null ? void 0 : _props$isCheckTable.rowsChecked)).indexOf(id) !== -1;
|
|
738
|
+
};
|
|
739
|
+
|
|
740
|
+
var handleRowClick = function handleRowClick(id) {
|
|
741
|
+
if (props.onClickRow) props.onClickRow(id);
|
|
742
|
+
};
|
|
743
|
+
|
|
744
|
+
var onCheckAction = function onCheckAction(event, id) {
|
|
745
|
+
var _props$isCheckTable2, _props$isCheckTable3, _props$isCheckTable4;
|
|
746
|
+
|
|
747
|
+
var checks = JSON.parse(JSON.stringify(((_props$isCheckTable2 = props.isCheckTable) == null ? void 0 : _props$isCheckTable2.rowsChecked) || []));
|
|
748
|
+
var index = checks.indexOf(id);
|
|
749
|
+
if (event.target.checked) checks.push(id);else checks.splice(index, 1);
|
|
750
|
+
((_props$isCheckTable3 = props.isCheckTable) == null ? void 0 : _props$isCheckTable3.onCheckedAction) && ((_props$isCheckTable4 = props.isCheckTable) == null ? void 0 : _props$isCheckTable4.onCheckedAction(checks));
|
|
751
|
+
};
|
|
752
|
+
|
|
753
|
+
var onCheckSingleAction = function onCheckSingleAction(event, id) {
|
|
754
|
+
var _props$isCheckTable5, _props$isCheckTable6, _props$isCheckTable7;
|
|
755
|
+
|
|
756
|
+
var checks = JSON.parse(JSON.stringify(((_props$isCheckTable5 = props.isCheckTable) == null ? void 0 : _props$isCheckTable5.rowsChecked) || []));
|
|
757
|
+
var index = checks.indexOf(id);
|
|
758
|
+
|
|
759
|
+
if (event.target.checked) {
|
|
760
|
+
checks.push(id);
|
|
761
|
+
|
|
762
|
+
if (checks.length > 1) {
|
|
763
|
+
checks = checks.splice(-1);
|
|
764
|
+
}
|
|
765
|
+
} else checks.splice(index, 1);
|
|
766
|
+
|
|
767
|
+
((_props$isCheckTable6 = props.isCheckTable) == null ? void 0 : _props$isCheckTable6.onCheckedSingleAction) && ((_props$isCheckTable7 = props.isCheckTable) == null ? void 0 : _props$isCheckTable7.onCheckedSingleAction(checks[0]));
|
|
768
|
+
};
|
|
769
|
+
|
|
770
|
+
var handleSelectAllClick = function handleSelectAllClick(event) {
|
|
771
|
+
var _props$isCheckTable8, _props$isCheckTable9;
|
|
772
|
+
|
|
773
|
+
var newSelecteds = [];
|
|
774
|
+
|
|
775
|
+
if (event.target.checked) {
|
|
776
|
+
newSelecteds = props.rows.map(function (n) {
|
|
777
|
+
return n.id;
|
|
778
|
+
});
|
|
779
|
+
}
|
|
780
|
+
|
|
781
|
+
((_props$isCheckTable8 = props.isCheckTable) == null ? void 0 : _props$isCheckTable8.onCheckedAction) && ((_props$isCheckTable9 = props.isCheckTable) == null ? void 0 : _props$isCheckTable9.onCheckedAction(newSelecteds));
|
|
782
|
+
};
|
|
783
|
+
|
|
784
|
+
var formatValue = function formatValue(value, column) {
|
|
785
|
+
var _column$enumColumn;
|
|
786
|
+
|
|
787
|
+
if ((_column$enumColumn = column.enumColumn) != null && _column$enumColumn.isEnum) {
|
|
788
|
+
var _column$enumColumn2, _column$enumColumn9;
|
|
789
|
+
|
|
790
|
+
if ((_column$enumColumn2 = column.enumColumn) != null && _column$enumColumn2.enumType) {
|
|
791
|
+
var _column$enumColumn5, _column$enumColumn8;
|
|
792
|
+
|
|
793
|
+
var result = [];
|
|
794
|
+
|
|
795
|
+
if (value === null) {
|
|
796
|
+
return value;
|
|
797
|
+
} else if (value.split(',').length > 1) {
|
|
798
|
+
value.split(',').forEach(function (v) {
|
|
799
|
+
var _column$enumColumn3;
|
|
800
|
+
|
|
801
|
+
result.push(props.values[(_column$enumColumn3 = column.enumColumn) == null ? void 0 : _column$enumColumn3.enumType[v.replace(/ /g, '')].toUpperCase()]);
|
|
802
|
+
});
|
|
803
|
+
return result.join();
|
|
804
|
+
} else if (Array.isArray(value)) {
|
|
805
|
+
var split = value.toString().split(',');
|
|
806
|
+
split.forEach(function (v) {
|
|
807
|
+
var _column$enumColumn4;
|
|
808
|
+
|
|
809
|
+
if (!isNaN(parseInt(v))) result.push(props.values[(_column$enumColumn4 = column.enumColumn) == null ? void 0 : _column$enumColumn4.enumType[v.replace(/ /g, '')].toUpperCase()]);else result.push(props.values[v.toUpperCase()]);
|
|
810
|
+
});
|
|
811
|
+
return result.join();
|
|
812
|
+
} else if ((_column$enumColumn5 = column.enumColumn) != null && _column$enumColumn5.enumSuffix) {
|
|
813
|
+
var _column$enumColumn6, _column$enumColumn7;
|
|
814
|
+
|
|
815
|
+
return props.values[((_column$enumColumn6 = column.enumColumn) == null ? void 0 : _column$enumColumn6.enumType[value].toUpperCase()) + "_" + ((_column$enumColumn7 = column.enumColumn) == null ? void 0 : _column$enumColumn7.enumSuffix.toUpperCase())];
|
|
816
|
+
} else return props.values[(_column$enumColumn8 = column.enumColumn) == null ? void 0 : _column$enumColumn8.enumType[value].toUpperCase()];
|
|
817
|
+
} else if ((_column$enumColumn9 = column.enumColumn) != null && _column$enumColumn9.enumSuffix) {
|
|
818
|
+
var _column$enumColumn10;
|
|
819
|
+
|
|
820
|
+
return props.values[value.toUpperCase() + "_" + ((_column$enumColumn10 = column.enumColumn) == null ? void 0 : _column$enumColumn10.enumSuffix.toUpperCase())];
|
|
821
|
+
} else return props.values[value.toUpperCase()];
|
|
822
|
+
}
|
|
823
|
+
|
|
824
|
+
if (column.isDate && value) return new Date(value).toLocaleDateString('es-ES');
|
|
825
|
+
|
|
826
|
+
if (column.isPrice) {
|
|
827
|
+
if (value !== null) return value.toLocaleString() + " " + props.values.SYMBOL_EURO;
|
|
828
|
+
}
|
|
829
|
+
|
|
830
|
+
if (column.isImage) {
|
|
831
|
+
if (column.isImage.isUrl) {
|
|
832
|
+
return React__default.createElement(_.Avatar, {
|
|
833
|
+
alt: "-",
|
|
834
|
+
src: value,
|
|
835
|
+
className: "img-table",
|
|
836
|
+
variant: "square"
|
|
837
|
+
});
|
|
838
|
+
}
|
|
839
|
+
}
|
|
840
|
+
|
|
841
|
+
if (Array.isArray(value)) {
|
|
842
|
+
return value.join(', ');
|
|
843
|
+
}
|
|
844
|
+
|
|
845
|
+
if (column.isBoolean) {
|
|
846
|
+
var booleanStr = value ? 'true' : 'false';
|
|
847
|
+
|
|
848
|
+
if (column.isBoolean.enumType) {
|
|
849
|
+
var _column$isBoolean3;
|
|
850
|
+
|
|
851
|
+
if (column.isBoolean.enumSuffix) {
|
|
852
|
+
var _column$isBoolean, _column$isBoolean2;
|
|
853
|
+
|
|
854
|
+
return props.values[((_column$isBoolean = column.isBoolean) == null ? void 0 : _column$isBoolean.enumType[booleanStr].toUpperCase()) + "_" + ((_column$isBoolean2 = column.isBoolean) == null ? void 0 : _column$isBoolean2.enumSuffix.toUpperCase())];
|
|
855
|
+
} else return props.values[(_column$isBoolean3 = column.isBoolean) == null ? void 0 : _column$isBoolean3.enumType[booleanStr].toUpperCase()];
|
|
856
|
+
} else if (column.isBoolean.enumSuffix) {
|
|
857
|
+
var _column$isBoolean4;
|
|
858
|
+
|
|
859
|
+
return props.values[booleanStr.toUpperCase() + "_" + ((_column$isBoolean4 = column.isBoolean) == null ? void 0 : _column$isBoolean4.enumSuffix.toUpperCase())];
|
|
860
|
+
}
|
|
861
|
+
}
|
|
862
|
+
|
|
863
|
+
if (typeof value === 'boolean') {
|
|
864
|
+
return String(value);
|
|
865
|
+
}
|
|
866
|
+
|
|
867
|
+
return value;
|
|
868
|
+
};
|
|
869
|
+
|
|
870
|
+
var ObjectbyString = function ObjectbyString(o, s) {
|
|
871
|
+
s = s.replace(/\[(\w+)\]/g, '.$1');
|
|
872
|
+
var a = s.split('.');
|
|
873
|
+
|
|
874
|
+
for (var i = 0, n = a.length; i < n; ++i) {
|
|
875
|
+
var k = a[i];
|
|
876
|
+
|
|
877
|
+
try {
|
|
878
|
+
if (k in o) {
|
|
879
|
+
o = o[k];
|
|
880
|
+
} else {
|
|
881
|
+
return undefined;
|
|
882
|
+
}
|
|
883
|
+
} catch (_error) {
|
|
884
|
+
return undefined;
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
|
|
888
|
+
return o;
|
|
889
|
+
};
|
|
890
|
+
|
|
891
|
+
var EditableTableCell = function EditableTableCell(row, value, fieldName, editableCell) {
|
|
892
|
+
var rowEdit = JSON.parse(JSON.stringify(row));
|
|
893
|
+
|
|
894
|
+
if (editableCell.isTextField) {
|
|
895
|
+
var setUpdate = lodash.debounce(function () {
|
|
896
|
+
var _editableCell$isTextF, _editableCell$isTextF2;
|
|
897
|
+
|
|
898
|
+
((_editableCell$isTextF = editableCell.isTextField) == null ? void 0 : _editableCell$isTextF.onCellValueChange) && ((_editableCell$isTextF2 = editableCell.isTextField) == null ? void 0 : _editableCell$isTextF2.onCellValueChange(rowEdit));
|
|
899
|
+
}, 1000);
|
|
900
|
+
|
|
901
|
+
var handleTextFieldChange = function handleTextFieldChange(e) {
|
|
902
|
+
rowEdit[fieldName] = e.target.value;
|
|
903
|
+
setUpdate();
|
|
904
|
+
};
|
|
905
|
+
|
|
906
|
+
return React__default.createElement(TextFieldComponent, {
|
|
907
|
+
type: editableCell.isTextField.type,
|
|
908
|
+
onChange: handleTextFieldChange,
|
|
909
|
+
name: fieldName,
|
|
910
|
+
defaultValue: value
|
|
911
|
+
});
|
|
912
|
+
} else {
|
|
913
|
+
return value;
|
|
914
|
+
}
|
|
915
|
+
};
|
|
916
|
+
|
|
917
|
+
return React__default.createElement(_.Box, {
|
|
918
|
+
className: "table-simple-component"
|
|
919
|
+
}, React__default.createElement(_.Paper, {
|
|
920
|
+
className: "paper-container"
|
|
921
|
+
}, props.isCheckTable && React__default.createElement(_.Hidden, {
|
|
922
|
+
mdUp: true
|
|
923
|
+
}, React__default.createElement(_.Box, {
|
|
924
|
+
display: "block",
|
|
925
|
+
className: "checkbox-cell"
|
|
926
|
+
}, React__default.createElement(_.Checkbox, {
|
|
927
|
+
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,
|
|
928
|
+
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,
|
|
929
|
+
onChange: handleSelectAllClick
|
|
930
|
+
}))), React__default.createElement(_.TableContainer, {
|
|
931
|
+
className: "table-container"
|
|
932
|
+
}, React__default.createElement(_.Table, {
|
|
933
|
+
stickyHeader: true,
|
|
934
|
+
"aria-label": "sticky table",
|
|
935
|
+
className: props.loading ? 'loading' : props.className ? props.className : ''
|
|
936
|
+
}, React__default.createElement(_.Hidden, {
|
|
937
|
+
smDown: true
|
|
938
|
+
}, React__default.createElement(_.TableHead, null, React__default.createElement(_.TableRow, null, props.columns.map(function (column) {
|
|
939
|
+
if (column.id) {
|
|
940
|
+
var _props$isCheckTable13, _props$isCheckTable14, _props$isCheckTable15;
|
|
941
|
+
|
|
942
|
+
return React__default.createElement(_.TableCell, {
|
|
943
|
+
className: "table-column",
|
|
944
|
+
key: column.isUnique ? column.id + "-unique" : column.id,
|
|
945
|
+
align: column.align ? column.align : 'center',
|
|
946
|
+
style: {
|
|
947
|
+
minWidth: column.minWidth,
|
|
948
|
+
maxWidth: column.maxWidth
|
|
949
|
+
}
|
|
950
|
+
}, column.isCheck ? React__default.createElement(_.Box, {
|
|
951
|
+
className: "checkbox-cell"
|
|
952
|
+
}, React__default.createElement(_.Checkbox, {
|
|
953
|
+
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,
|
|
954
|
+
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,
|
|
955
|
+
onChange: handleSelectAllClick
|
|
956
|
+
})) : React__default.createElement(_.Box, {
|
|
957
|
+
className: "table-header-cell"
|
|
958
|
+
}, column.label));
|
|
959
|
+
} else return null;
|
|
960
|
+
})))), React__default.createElement(_.TableBody, null, props.loading && React__default.createElement(_.TableRow, {
|
|
961
|
+
className: "table-rows"
|
|
962
|
+
}, React__default.createElement(_.TableCell, {
|
|
963
|
+
colSpan: props.columns.length,
|
|
964
|
+
sx: {
|
|
965
|
+
position: 'relative',
|
|
966
|
+
overflow: 'inherit !important',
|
|
967
|
+
height: props.rows.length > 0 ? 'auto' : '80px'
|
|
968
|
+
}
|
|
969
|
+
}, React__default.createElement(_.CircularProgress, {
|
|
970
|
+
className: "circular-progress-main-color"
|
|
971
|
+
}))), props.rows && props.rows.length > 0 ? props.rows.map(function (row, index) {
|
|
972
|
+
var _props$isCheckTable16;
|
|
973
|
+
|
|
974
|
+
var key = props.rows[index + 1] && props.rows[index + 1].id === row.id ? index : row.id;
|
|
975
|
+
var rowColor = props.rowsColorColumn && ObjectbyString(row, props.rowsColorColumn.columnName) === props.rowsColorColumn.columnValue ? "row-color-" + props.rowsColorColumn.columnValue : '';
|
|
976
|
+
var isRowSelected = ((_props$isCheckTable16 = props.isCheckTable) == null ? void 0 : _props$isCheckTable16.rowsChecked) && isSelected(row.id);
|
|
977
|
+
return React__default.createElement(_.TableRow, {
|
|
978
|
+
className: "table-rows " + rowColor + " " + (props.onClickRow ? 'row-click' : ''),
|
|
979
|
+
role: "checkbox",
|
|
980
|
+
tabIndex: -1,
|
|
981
|
+
selected: isRowSelected,
|
|
982
|
+
"aria-checked": isRowSelected,
|
|
983
|
+
key: key || index
|
|
984
|
+
}, props.columns.map(function (column) {
|
|
985
|
+
if (column.id) {
|
|
986
|
+
var value = ObjectbyString(row, column.id);
|
|
987
|
+
var isItemSelected = column.isCheck && isSelected(row.id);
|
|
988
|
+
return React__default.createElement(_.TableCell, {
|
|
989
|
+
className: "table-cell",
|
|
990
|
+
key: column.isUnique ? column.id + "-unique" : column.id,
|
|
991
|
+
sx: {
|
|
992
|
+
textAlign: {
|
|
993
|
+
xs: 'left',
|
|
994
|
+
md: column.alignCell ? column.alignCell : column.align ? column.align : 'center'
|
|
995
|
+
}
|
|
996
|
+
},
|
|
997
|
+
onClick: function onClick() {
|
|
998
|
+
return !column.action && !column.isCheck && !column.isActiveFunction ? handleRowClick(row.id) : '';
|
|
999
|
+
}
|
|
1000
|
+
}, React__default.createElement(_.Hidden, {
|
|
1001
|
+
mdUp: true
|
|
1002
|
+
}, column.label !== '-' && React__default.createElement(_.Box, {
|
|
1003
|
+
display: "inline-block",
|
|
1004
|
+
className: "label-cell"
|
|
1005
|
+
}, column.label)), column.action ? React__default.createElement(_.Box, null, React__default.createElement(_.Box, {
|
|
1006
|
+
display: "flex",
|
|
1007
|
+
className: "actions"
|
|
1008
|
+
}, column.action && column.action.map(function (action, i) {
|
|
1009
|
+
return React__default.createElement(_.Box, {
|
|
1010
|
+
key: i
|
|
1011
|
+
}, action.onClick && React__default.createElement(_.Box, {
|
|
1012
|
+
className: "btn-action main-color-hover",
|
|
1013
|
+
onClick: function onClick() {
|
|
1014
|
+
return action.onClick && action.onClick(row);
|
|
1015
|
+
}
|
|
1016
|
+
}, action.children), action.onClickId && React__default.createElement(_.Box, {
|
|
1017
|
+
className: "btn-action main-color-hover",
|
|
1018
|
+
onClick: function onClick() {
|
|
1019
|
+
return action.onClickId && action.onClickId(row.id);
|
|
1020
|
+
}
|
|
1021
|
+
}, action.children), !action.onClick && !action.onClickId && React__default.createElement(_.Box, {
|
|
1022
|
+
className: "btn-action"
|
|
1023
|
+
}, action.children));
|
|
1024
|
+
}))) : column.isActiveFunction ? React__default.createElement(_.Box, {
|
|
1025
|
+
className: "btn-action main-color-hover",
|
|
1026
|
+
onClick: function onClick() {
|
|
1027
|
+
return column.isActiveFunction && column.isActiveFunction.onClickId(row.id);
|
|
1028
|
+
}
|
|
1029
|
+
}, value ? column.isActiveFunction.activeIcon : column.isActiveFunction.disabledIcon) : column.isCheck ? React__default.createElement(_.Box, {
|
|
1030
|
+
className: "checkbox-cell"
|
|
1031
|
+
}, React__default.createElement(_.Checkbox, {
|
|
1032
|
+
checked: isItemSelected,
|
|
1033
|
+
inputProps: {
|
|
1034
|
+
'aria-labelledby': row.id
|
|
1035
|
+
},
|
|
1036
|
+
onChange: function onChange(event) {
|
|
1037
|
+
var _props$isCheckTable17;
|
|
1038
|
+
|
|
1039
|
+
return (_props$isCheckTable17 = props.isCheckTable) != null && _props$isCheckTable17.onCheckedAction ? onCheckAction(event, row.id) : onCheckSingleAction(event, row.id);
|
|
1040
|
+
}
|
|
1041
|
+
})) : column.isEditableTableCell ? EditableTableCell(row, value, column.id, column.isEditableTableCell) : column.enumColumn ? React__default.createElement(_.Box, {
|
|
1042
|
+
className: (column.enumColumn.hasColor ? (column.enumColumn.enumSuffix ? value.toLowerCase() + "-" + column.enumColumn.enumSuffix.toLowerCase() : value.toString().toLowerCase()) + "-type-color" : '') + " format-value"
|
|
1043
|
+
}, formatValue(value, column)) : column.isBoolean ? React__default.createElement(_.Box, {
|
|
1044
|
+
className: (column.isBoolean.hasColor ? (column.isBoolean.enumSuffix ? value.toString().toLowerCase() + "-" + column.isBoolean.enumSuffix.toLowerCase() : value.toString().toLowerCase()) + "-boolean-color" : '') + " format-value"
|
|
1045
|
+
}, formatValue(value, column)) : React__default.createElement(_.Box, {
|
|
1046
|
+
className: "format-value"
|
|
1047
|
+
}, formatValue(value, column)));
|
|
1048
|
+
} else return null;
|
|
1049
|
+
}));
|
|
1050
|
+
}) : !props.loading ? React__default.createElement(_.TableRow, null, React__default.createElement(_.TableCell, {
|
|
1051
|
+
colSpan: props.columns.length
|
|
1052
|
+
}, React__default.createElement(_.Box, null, props.values.NO_RESULTS_FOUND))) : React__default.createElement(_.TableRow, null))))));
|
|
1053
|
+
};
|
|
1054
|
+
|
|
1055
|
+
var css_248z$6 = ".main-layout-simple {\n width: 100%;\n}\n.main-layout-simple .main-wrapper {\n width: 100%;\n min-height: 100vh;\n height: fit-content;\n position: relative;\n}";
|
|
1056
|
+
styleInject(css_248z$6);
|
|
1057
|
+
|
|
731
1058
|
var MainLayoutSimple = function MainLayoutSimple(props) {
|
|
732
1059
|
return React__default.createElement(_.Box, {
|
|
733
1060
|
display: "flex",
|
|
@@ -892,8 +1219,8 @@ var VerticalNavItemCollapse = function VerticalNavItemCollapse(props) {
|
|
|
892
1219
|
|
|
893
1220
|
var VerticalNavItemCollapse$1 = /*#__PURE__*/React__default.memo(VerticalNavItemCollapse);
|
|
894
1221
|
|
|
895
|
-
var css_248z$
|
|
896
|
-
styleInject(css_248z$
|
|
1222
|
+
var css_248z$7 = ".vertical-navigation {\n background: transparent;\n color: white;\n}\n.vertical-navigation .nav-item {\n cursor: pointer;\n}\n.vertical-navigation .nav-item svg {\n font-size: 28px;\n}\n.vertical-navigation .nav-item {\n padding: 12px;\n}\n.vertical-navigation .nav-item:hover {\n background-color: #333f54;\n}\n.vertical-navigation .active .nav-item {\n background-color: #3299C7;\n border-radius: 0 25px 25px 0;\n margin-right: 16px;\n}\n.vertical-navigation .active .nav-item .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .active .nav-item:hover {\n color: white !important;\n}\n.vertical-navigation .active .nav-item:hover .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .active {\n background-color: #333f54;\n}\n.vertical-navigation .nav-item-collapse .active .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .active:hover {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .active:hover .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .open {\n background-color: #333f54;\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .open .nav-item-text {\n color: white !important;\n}\n.vertical-navigation .nav-item-collapse .collapse-children {\n background-color: #39465e;\n}\n.vertical-navigation .nav-item-collapse .collapse-children .nav-item-text {\n padding-left: 16px;\n padding-right: 16px;\n}";
|
|
1223
|
+
styleInject(css_248z$7);
|
|
897
1224
|
|
|
898
1225
|
(function (NavigationType) {
|
|
899
1226
|
NavigationType[NavigationType["Item"] = 0] = "Item";
|
|
@@ -923,8 +1250,8 @@ var VerticalNav = function VerticalNav(props) {
|
|
|
923
1250
|
}));
|
|
924
1251
|
};
|
|
925
1252
|
|
|
926
|
-
var css_248z$
|
|
927
|
-
styleInject(css_248z$
|
|
1253
|
+
var css_248z$8 = ".user-info svg {\n font-size: 28px !important;\n}";
|
|
1254
|
+
styleInject(css_248z$8);
|
|
928
1255
|
|
|
929
1256
|
var UserInfo = function UserInfo(props) {
|
|
930
1257
|
var _React$useState = React__default.useState(null),
|
|
@@ -976,8 +1303,8 @@ var UserInfo = function UserInfo(props) {
|
|
|
976
1303
|
}))))));
|
|
977
1304
|
};
|
|
978
1305
|
|
|
979
|
-
var css_248z$
|
|
980
|
-
styleInject(css_248z$
|
|
1306
|
+
var css_248z$9 = ".app-sidebar {\n width: 17rem;\n background-color: #3f4d67;\n box-shadow: 1px 0 20px 0 #3f4d67;\n z-index: 1029;\n color: white;\n}";
|
|
1307
|
+
styleInject(css_248z$9);
|
|
981
1308
|
|
|
982
1309
|
var AppSidebar = function AppSidebar(props) {
|
|
983
1310
|
return React__default.createElement(React__default.Fragment, null, React__default.createElement(material.Drawer, {
|
|
@@ -1034,8 +1361,8 @@ var AppSidebar = function AppSidebar(props) {
|
|
|
1034
1361
|
}, props.footerComponents))))));
|
|
1035
1362
|
};
|
|
1036
1363
|
|
|
1037
|
-
var css_248z$
|
|
1038
|
-
styleInject(css_248z$
|
|
1364
|
+
var css_248z$a = ".drawer-sidebar {\n width: 17rem;\n background-color: #3f4d67;\n box-shadow: 1px 0 20px 0 #3f4d67;\n z-index: 1029;\n color: white;\n}";
|
|
1365
|
+
styleInject(css_248z$a);
|
|
1039
1366
|
|
|
1040
1367
|
var DrawerSidebar = function DrawerSidebar(props) {
|
|
1041
1368
|
return React__default.createElement(material.Drawer, {
|
|
@@ -1061,8 +1388,8 @@ var DrawerSidebar = function DrawerSidebar(props) {
|
|
|
1061
1388
|
}, props.footerComponents))));
|
|
1062
1389
|
};
|
|
1063
1390
|
|
|
1064
|
-
var css_248z$
|
|
1065
|
-
styleInject(css_248z$
|
|
1391
|
+
var css_248z$b = ".app-bar {\n background-color: white !important;\n border-bottom: 1px solid rgba(0, 0, 0, 0.12);\n color: black !important;\n}\n.app-bar .header-logo {\n max-height: 59px;\n height: 100%;\n min-height: 56px;\n width: 100%;\n}\n.app-bar img {\n max-height: 59px;\n height: 100%;\n min-height: 56px;\n width: 100%;\n}";
|
|
1392
|
+
styleInject(css_248z$b);
|
|
1066
1393
|
|
|
1067
1394
|
var AppHeader = function AppHeader(props) {
|
|
1068
1395
|
return React__default.createElement(material.AppBar, {
|
|
@@ -1084,8 +1411,8 @@ var AppHeader = function AppHeader(props) {
|
|
|
1084
1411
|
}, React__default.createElement(MenuIcon, null)), props.children));
|
|
1085
1412
|
};
|
|
1086
1413
|
|
|
1087
|
-
var css_248z$
|
|
1088
|
-
styleInject(css_248z$
|
|
1414
|
+
var css_248z$c = ".MuiButton-root {\n width: auto;\n padding: 0.8rem 1rem !important;\n text-transform: inherit !important;\n line-height: inherit !important;\n box-shadow: none !important;\n font-size: 1rem !important;\n background-color: #3299C7;\n}\n.MuiButton-root.btn-login {\n width: 100%;\n}\n.MuiButton-root.btn-reverse-color {\n border: 1px solid #3299C7;\n color: #3299C7;\n background-color: white !important;\n}\n.MuiButton-root.btn-modal-cancel {\n background-color: #666666 !important;\n}\n.MuiButton-root.btn-modal-cancel.Mui-disabled {\n background-color: #666666c4 !important;\n color: #030303b4 !important;\n}\n.MuiButton-root:hover {\n box-shadow: 0px 2px 4px -1px rgba(0, 0, 0, 0.2), 0px 4px 5px 0px rgba(0, 0, 0, 0.14), 0px 1px 10px 0px rgba(0, 0, 0, 0.12) !important;\n}\n.MuiButton-root .MuiCircularProgress-root {\n color: white;\n}\n.MuiButton-root .MuiButton-label .MuiCircularProgress-root {\n color: white;\n}\n.MuiButton-root .MuiButton-startIcon svg {\n font-size: 20px !important;\n}\n.MuiButton-root .MuiButton-endIcon svg {\n font-size: 20px !important;\n}";
|
|
1415
|
+
styleInject(css_248z$c);
|
|
1089
1416
|
|
|
1090
1417
|
var ButtonComponent = function ButtonComponent(props) {
|
|
1091
1418
|
return React__default.createElement(_.Button, {
|
|
@@ -1107,8 +1434,8 @@ ButtonComponent.defaultProps = {
|
|
|
1107
1434
|
component: 'button'
|
|
1108
1435
|
};
|
|
1109
1436
|
|
|
1110
|
-
var css_248z$
|
|
1111
|
-
styleInject(css_248z$
|
|
1437
|
+
var css_248z$d = ".text-simple-component .MuiFormLabel-root {\n color: #666666 !important;\n font-size: calc(12pt + (14 - 12) * calc(100vw - 300px)/1300) !important;\n transform: translate(0, 0.5px) scale(0.85);\n transform-origin: top left;\n text-overflow: initial !important;\n}\n.text-simple-component .MuiFormLabel-root + .text-simple-box.no-border {\n margin-top: 16px !important;\n}\n.text-simple-component .MuiFormLabel-root + .text-simple-box.no-margin.no-border {\n margin-top: 7px !important;\n}\n.text-simple-component .text-simple-box.no-border {\n border: none !important;\n padding: 0 !important;\n}\n.text-simple-component .text-simple-box {\n color: #666666 !important;\n font-size: 1rem;\n border: 1px solid grey;\n padding: 0.868rem;\n border-radius: 3px !important;\n}\n.text-simple-component .helper-text {\n font-size: 0.85rem !important;\n padding: 0 !important;\n margin-top: 3px;\n line-height: 1.66;\n color: #666666 !important;\n letter-spacing: 0.03333em;\n}\n.text-simple-component .has-error-border {\n border-color: #F24726 !important;\n}\n.text-simple-component .has-error {\n color: #F24726 !important;\n}";
|
|
1438
|
+
styleInject(css_248z$d);
|
|
1112
1439
|
|
|
1113
1440
|
var TextSimpleComponent = function TextSimpleComponent(props) {
|
|
1114
1441
|
return React__default.createElement(_.Box, {
|
|
@@ -1132,8 +1459,8 @@ TextSimpleComponent.defaultProps = {
|
|
|
1132
1459
|
noBorders: true
|
|
1133
1460
|
};
|
|
1134
1461
|
|
|
1135
|
-
var css_248z$
|
|
1136
|
-
styleInject(css_248z$
|
|
1462
|
+
var css_248z$e = ".select-field .MuiFormLabel-root {\n color: #666666 !important;\n font-size: calc(12pt + (14 - 12) * calc(100vw - 300px)/1300) !important;\n transform: translate(0, 0.5px) scale(0.85);\n transform-origin: top left;\n text-overflow: initial !important;\n}\n.select-field .select {\n font-size: 1rem;\n}\n.select-field .select__menu {\n z-index: 3 !important;\n background-color: white;\n}\n.select-field .select__control {\n cursor: pointer;\n border: 1px solid grey;\n border-radius: 5px !important;\n padding: 0.33rem 0.2rem;\n font-size: 1rem;\n color: grey !important;\n background-color: transparent;\n}\n.select-field .select__option {\n cursor: pointer;\n color: #666666 !important;\n background-color: white !important;\n}\n.select-field .select__option--is-focused {\n background-color: rgba(0, 0, 0, 0.04) !important;\n color: #666666 !important;\n}\n.select-field .select__option--is-selected {\n color: white !important;\n}\n.select-field .select__indicator {\n color: grey !important;\n}\n.select-field .select__indicator:hover {\n color: black !important;\n}\n.select-field .select__placeholder {\n text-overflow: ellipsis !important;\n color: #666666 !important;\n opacity: 1;\n}\n.select-field .select__single-value {\n color: #666666 !important;\n}\n.select-field .select__multi-value__label {\n color: #666666 !important;\n font-size: 1rem;\n}\n.select-field .select__control--is-focused {\n border-color: grey !important;\n box-shadow: none !important;\n}\n.select-field .helper-text {\n font-size: 0.85rem !important;\n padding: 0 !important;\n margin-top: 3px;\n line-height: 1.66;\n color: #666666 !important;\n letter-spacing: 0.03333em;\n}\n.select-field .has-error {\n color: #F24726 !important;\n}\n.select-field .has-error .select__control {\n border: 1px #F24726 solid !important;\n}\n.select-field .has-error .select__control--is-focused {\n border-color: #F24726 !important;\n box-shadow: 0 0 0 1px #F24726;\n}";
|
|
1463
|
+
styleInject(css_248z$e);
|
|
1137
1464
|
|
|
1138
1465
|
var SelectField = function SelectField(props) {
|
|
1139
1466
|
return React__default.createElement(_.Box, {
|
|
@@ -2372,8 +2699,8 @@ ModalComponent.defaultProps = {
|
|
|
2372
2699
|
dividers: true
|
|
2373
2700
|
};
|
|
2374
2701
|
|
|
2375
|
-
var css_248z$
|
|
2376
|
-
styleInject(css_248z$
|
|
2702
|
+
var css_248z$f = ".tabs-component .Mui-selected {\n color: white !important;\n border: none !important;\n background-color: #3299C7;\n}\n.tabs-component .MuiTabs-indicator {\n display: none;\n}\n.tabs-component .MuiTab-root {\n margin: 2px 2px 0px;\n border: 1px solid #00000038;\n border-bottom: none;\n border-radius: 5% 5% 0% 0%;\n color: rgba(0, 0, 0, 0.54);\n}\n.tabs-component .MuiTabPanel-root {\n border: 1px solid #00000038;\n margin: 0px 2px 0px;\n border-radius: 0% 5px 5px 5px;\n}";
|
|
2703
|
+
styleInject(css_248z$f);
|
|
2377
2704
|
|
|
2378
2705
|
var TabsComponent = function TabsComponent(props) {
|
|
2379
2706
|
var _React$useState = React__default.useState(props.tabActive.toString()),
|
|
@@ -2422,6 +2749,7 @@ exports.ResetPasswordForm = ResetPasswordForm;
|
|
|
2422
2749
|
exports.SearchComponent = SearchComponent;
|
|
2423
2750
|
exports.SelectAsyncField = SelectAsyncField;
|
|
2424
2751
|
exports.SelectField = SelectField;
|
|
2752
|
+
exports.SimpleTableComponent = SimpleTableComponent;
|
|
2425
2753
|
exports.TableComponent = TableComponent;
|
|
2426
2754
|
exports.TabsComponent = TabsComponent;
|
|
2427
2755
|
exports.TextFieldComponent = TextFieldComponent;
|