2adbf1fe2ff3e8713a86159caf8773199f5d5ab8f1709d32d0ab0920ca16a03d600240c9477b9bbfc42dc845bbec0ae6c3b44e2d8e3725dd9ca9d605597270 739 B

12345678910111213141516171819202122232425262728293031323334
  1. 'use strict';
  2. Object.defineProperty(exports, '__esModule', { value: true });
  3. const calcColumnStyle = (column, fixedColumn, fixed) => {
  4. var _a;
  5. const flex = {
  6. flexGrow: 0,
  7. flexShrink: 0,
  8. ...fixed ? {} : {
  9. flexGrow: column.flexGrow || 0,
  10. flexShrink: column.flexShrink || 1
  11. }
  12. };
  13. if (!fixed) {
  14. flex.flexShrink = 1;
  15. }
  16. const style = {
  17. ...(_a = column.style) != null ? _a : {},
  18. ...flex,
  19. flexBasis: "auto",
  20. width: column.width
  21. };
  22. if (!fixedColumn) {
  23. if (column.maxWidth)
  24. style.maxWidth = column.maxWidth;
  25. if (column.minWidth)
  26. style.minWidth = column.minWidth;
  27. }
  28. return style;
  29. };
  30. exports.calcColumnStyle = calcColumnStyle;
  31. //# sourceMappingURL=utils.js.map