linear-react-components-ui 1.1.20-beta.21 → 1.1.20-beta.22

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.
Files changed (127) hide show
  1. package/lib/alerts/BaseAlert.js +1 -1
  2. package/lib/alerts/Message.js +1 -1
  3. package/lib/avatar/index.js +8 -9
  4. package/lib/badge/index.js +4 -4
  5. package/lib/buttons/DangerButton.js +1 -1
  6. package/lib/buttons/DefaultButton.js +2 -11
  7. package/lib/buttons/InfoButton.js +1 -1
  8. package/lib/buttons/PrimaryButton.js +1 -1
  9. package/lib/buttons/SuccessButton.js +1 -1
  10. package/lib/buttons/WarningButton.js +1 -1
  11. package/lib/buttons/button_container/index.js +1 -1
  12. package/lib/buttons/split_button/index.js +1 -1
  13. package/lib/calendar/base/Day.js +1 -1
  14. package/lib/calendar/base/Month.js +1 -1
  15. package/lib/calendar/base/helpers.js +2 -2
  16. package/lib/calendar/base/index.js +1 -1
  17. package/lib/checkbox/Label.js +31 -0
  18. package/lib/checkbox/index.js +1 -1
  19. package/lib/dialog/Custom.js +1 -1
  20. package/lib/dialog/Question.js +4 -2
  21. package/lib/dialog/base/Content.js +1 -1
  22. package/lib/dialog/base/Header.js +2 -2
  23. package/lib/dialog/base/index.js +5 -4
  24. package/lib/dialog/form/index.js +1 -1
  25. package/lib/dialog/wizard/progressbar.js +1 -1
  26. package/lib/dialog/wizard/step.js +1 -1
  27. package/lib/drawer/Drawer.js +3 -3
  28. package/lib/drawer/Header.js +1 -1
  29. package/lib/dropdown/Popup.js +6 -6
  30. package/lib/dropdown/helper.js +1 -1
  31. package/lib/dropdown/withDropdown.js +2 -2
  32. package/lib/fieldset/index.js +7 -7
  33. package/lib/form/FieldArray.js +1 -1
  34. package/lib/form/FieldNumber.js +4 -4
  35. package/lib/form/FieldPeriod.js +2 -2
  36. package/lib/form/index.js +2 -2
  37. package/lib/gridlayout/GridCol.js +5 -5
  38. package/lib/gridlayout/GridRow.js +1 -4
  39. package/lib/hint/index.js +1 -7
  40. package/lib/icons/index.js +27 -24
  41. package/lib/inputs/base/InputTextBase.js +8 -6
  42. package/lib/inputs/base/Label.js +1 -1
  43. package/lib/inputs/base/helpers.js +3 -7
  44. package/lib/inputs/date/helpers.js +1 -4
  45. package/lib/inputs/date/index.js +15 -9
  46. package/lib/inputs/errorMessage/index.js +1 -1
  47. package/lib/inputs/file/DefaultFile.js +6 -5
  48. package/lib/inputs/file/DragDropFile.js +17 -15
  49. package/lib/inputs/file/File.js +4 -3
  50. package/lib/inputs/mask/BaseMask.js +1 -1
  51. package/lib/inputs/mask/helpers.d.ts +1 -1
  52. package/lib/inputs/mask/imaskHOC.js +203 -0
  53. package/lib/inputs/multiSelect/Dropdown.js +10 -9
  54. package/lib/inputs/multiSelect/helper.js +2 -1
  55. package/lib/inputs/multiSelect/index.js +9 -7
  56. package/lib/inputs/period/PeriodList.js +1 -1
  57. package/lib/inputs/period/helper.js +1 -3
  58. package/lib/inputs/period/index.js +14 -9
  59. package/lib/inputs/search/index.js +1 -1
  60. package/lib/inputs/select/Dropdown.js +1 -1
  61. package/lib/inputs/select/helper.js +13 -10
  62. package/lib/inputs/select/multiple/Selecteds.js +1 -1
  63. package/lib/inputs/select/multiple/index.js +14 -9
  64. package/lib/inputs/select/simple/index.js +17 -10
  65. package/lib/inputs/textarea/index.js +1 -1
  66. package/lib/internals/withTooltip.js +9 -9
  67. package/lib/labelMessages/index.js +3 -4
  68. package/lib/labels/DefaultLabel.js +1 -4
  69. package/lib/labels/label_container/index.js +1 -1
  70. package/lib/list/Header.js +1 -1
  71. package/lib/list/Item.js +7 -9
  72. package/lib/list/index.js +1 -2
  73. package/lib/menus/float/MenuItem.js +2 -2
  74. package/lib/menus/float/SubMenuContainer.js +1 -1
  75. package/lib/menus/float/index.js +1 -1
  76. package/lib/menus/sidenav/ExpandMenu.js +1 -1
  77. package/lib/menus/sidenav/NavMenuGroup.js +1 -1
  78. package/lib/menus/sidenav/NavMenuItem.js +9 -7
  79. package/lib/menus/sidenav/NavSubMenuItem.js +1 -1
  80. package/lib/menus/sidenav/helpers.js +1 -1
  81. package/lib/menus/sidenav/index.js +5 -5
  82. package/lib/menus/sidenav/popup_menu_help/index.js +85 -0
  83. package/lib/panel/Content.js +7 -5
  84. package/lib/panel/Default.js +2 -2
  85. package/lib/panel/Header.js +3 -3
  86. package/lib/permissionValidations.js +1 -1
  87. package/lib/popover/index.js +1 -1
  88. package/lib/progress/Bar.js +6 -6
  89. package/lib/radio/index.js +2 -2
  90. package/lib/shortcuts/index.js +1 -1
  91. package/lib/skeleton/SkeletonContainer.js +1 -2
  92. package/lib/skeleton/index.js +1 -4
  93. package/lib/spinner/index.js +2 -2
  94. package/lib/split/Split.js +1 -1
  95. package/lib/split/SplitSide.js +3 -3
  96. package/lib/table/Body.js +3 -3
  97. package/lib/table/Header.js +11 -8
  98. package/lib/table/HeaderColumn.js +1 -1
  99. package/lib/table/Row.js +3 -3
  100. package/lib/table/RowColumn.js +1 -1
  101. package/lib/table/index.js +1 -6
  102. package/lib/tabs/DropdownItems.js +62 -0
  103. package/lib/tabs/DropdownTabs.js +1 -1
  104. package/lib/tabs/Menu.js +1 -1
  105. package/lib/tabs/MenuItems.js +70 -0
  106. package/lib/tabs/MenuTabs.js +2 -2
  107. package/lib/tabs/Panel.js +7 -5
  108. package/lib/tabs/context.js +6 -3
  109. package/lib/textContent/index.js +1 -1
  110. package/lib/toolbar/ButtonBar.js +1 -1
  111. package/lib/toolbar/index.js +1 -1
  112. package/lib/tooltip/index.js +7 -7
  113. package/lib/treetable/Body.js +1 -1
  114. package/lib/treetable/Header.js +2 -2
  115. package/lib/treetable/Row.d.ts +1 -1
  116. package/lib/treetable/Row.js +13 -9
  117. package/lib/treetable/helpers.d.ts +1 -1
  118. package/lib/treetable/index.d.ts +2 -2
  119. package/lib/treeview/Header.js +1 -1
  120. package/lib/treeview/Node.js +5 -5
  121. package/lib/treeview/index.js +4 -4
  122. package/lib/treeview_old/Header.js +29 -0
  123. package/lib/treeview_old/Node.js +68 -0
  124. package/lib/treeview_old/index.js +43 -0
  125. package/lib/{types.d-73cece43.d.ts → types.d-3d9e44cd.d.ts} +1 -0
  126. package/lib/uitour/index.js +8 -6
  127. package/package.json +1 -1
@@ -18,8 +18,8 @@ const getPercentage = _ref => {
18
18
  };
19
19
  const getClass = props => {
20
20
  let style = 'bar';
21
- if (props.customClass) style += `${props.customClass}`;
22
- if (props.type) style += ` -${props.type}`;
21
+ if (props.customClass) style += "".concat(props.customClass);
22
+ if (props.type) style += " -".concat(props.type);
23
23
  if (props.effect) style += ' -effect';
24
24
  if (props.animated) style += ' -animated';
25
25
  if (props.indeterminate) style += ' -indeterminate';
@@ -28,7 +28,7 @@ const getClass = props => {
28
28
  const getLabel = progress => {
29
29
  let value = progress.label;
30
30
  if (!progress.label) {
31
- value = `${getPercentage(progress)}%`;
31
+ value = "".concat(getPercentage(progress), "%");
32
32
  }
33
33
  return /*#__PURE__*/_react.default.createElement("span", {
34
34
  className: "progressbar-label "
@@ -46,12 +46,12 @@ const getStyle = props => {
46
46
  return {
47
47
  width: progressWidth,
48
48
  height,
49
- animationDuration: `${indeterminateDuration}s`,
50
- animationDelay: `${indeterminateDelay}s`
49
+ animationDuration: "".concat(indeterminateDuration, "s"),
50
+ animationDelay: "".concat(indeterminateDelay, "s")
51
51
  };
52
52
  }
53
53
  return {
54
- width: `${getPercentage(props)}%`,
54
+ width: "".concat(getPercentage(props), "%"),
55
55
  height
56
56
  };
57
57
  };
@@ -79,7 +79,7 @@ const Radio = _ref => {
79
79
  alignItems: 'center'
80
80
  }
81
81
  }, /*#__PURE__*/_react.default.createElement("div", {
82
- className: `radio-button ${disabled ? 'disabled' : ''} ${skeletonize ? '-skeletonized' : ''}`
82
+ className: "radio-button ".concat(disabled ? 'disabled' : '', " ").concat(skeletonize ? '-skeletonized' : '')
83
83
  }, /*#__PURE__*/_react.default.createElement("input", _extends({}, getCustomProps(), {
84
84
  ref: inputRef,
85
85
  className: "radio-component",
@@ -90,7 +90,7 @@ const Radio = _ref => {
90
90
  required: required,
91
91
  disabled: shouldDisable()
92
92
  })), /*#__PURE__*/_react.default.createElement("label", {
93
- className: `description ${size && `-${size}`}`,
93
+ className: "description ".concat(size && "-".concat(size)),
94
94
  htmlFor: id
95
95
  }, /*#__PURE__*/_react.default.createElement("span", null, /*#__PURE__*/_react.default.createElement(_textContent.default, {
96
96
  required: required,
@@ -21,7 +21,7 @@ const Shortcuts = _ref => {
21
21
  style: style
22
22
  }, /*#__PURE__*/_react.default.createElement("kbd", {
23
23
  "data-testid": "shortcut",
24
- className: `shortcut-component ${type && `-${type}`}`,
24
+ className: "shortcut-component ".concat(type && "-".concat(type)),
25
25
  style: styleShortcut
26
26
  }, shortcut), ":\xA0", description);
27
27
  };
@@ -13,8 +13,7 @@ const SkeletonContainer = _ref => {
13
13
  customClass,
14
14
  style
15
15
  } = _ref;
16
- const getClass = () => `skeletoncontainer-component ${customClass}
17
- ${row && '-row'}`;
16
+ const getClass = () => "skeletoncontainer-component ".concat(customClass, "\n ").concat(row && '-row');
18
17
  return /*#__PURE__*/_react.default.createElement("div", {
19
18
  className: getClass(),
20
19
  style: style
@@ -35,10 +35,7 @@ const Skeleton = props => {
35
35
  width,
36
36
  height
37
37
  };
38
- const getClass = () => `skeleton-component ${customClass}
39
- ${color && `-${color}`}
40
- ${round && '-round'}
41
- ${round && size && `-${size}`}`;
38
+ const getClass = () => "skeleton-component ".concat(customClass, "\n ").concat(color && "-".concat(color), "\n ").concat(round && '-round', "\n ").concat(round && size && "-".concat(size));
42
39
  const renderContent = () => /*#__PURE__*/_react.default.createElement("div", {
43
40
  className: getClass(),
44
41
  style: _objectSpread(_objectSpread({}, customStyles), style)
@@ -37,8 +37,8 @@ const Spinner = props => {
37
37
  };
38
38
  }, []);
39
39
  const getCssClass = () => {
40
- let css = `spinner-component -${align} ${customClass} `;
41
- if (heightAuto) css = `${css} -heightauto`;
40
+ let css = "spinner-component -".concat(align, " ").concat(customClass, " ");
41
+ if (heightAuto) css = "".concat(css, " -heightauto");
42
42
  return css;
43
43
  };
44
44
  if (delay) return null;
@@ -246,7 +246,7 @@ const Split = _ref => {
246
246
  } = state;
247
247
  let containerClasses = 'split-component';
248
248
  if (customClass) {
249
- containerClasses += ` ${customClass}`;
249
+ containerClasses += " ".concat(customClass);
250
250
  }
251
251
  if (vertical) {
252
252
  containerClasses += ' splitter-layout-vertical';
@@ -27,15 +27,15 @@ const SplitSide = _ref => {
27
27
  const splitSideStyle = {};
28
28
  if (!primary) {
29
29
  if (vertical) {
30
- splitSideStyle.height = `${sizeSplitSide}${unit}`;
30
+ splitSideStyle.height = "".concat(sizeSplitSide).concat(unit);
31
31
  } else {
32
- splitSideStyle.width = `${sizeSplitSide}${unit}`;
32
+ splitSideStyle.width = "".concat(sizeSplitSide).concat(unit);
33
33
  }
34
34
  } else {
35
35
  classes += ' layout-pane-primary';
36
36
  }
37
37
  return /*#__PURE__*/_react.default.createElement("div", {
38
- className: `${classes} ${customClass}`,
38
+ className: "".concat(classes, " ").concat(customClass),
39
39
  style: Object.assign({}, splitSideStyle, style)
40
40
  }, children);
41
41
  };
package/lib/table/Body.js CHANGED
@@ -28,7 +28,7 @@ const renderChildren = (children, _ref) => {
28
28
  key: index
29
29
  }, columns.map(id => /*#__PURE__*/_react.default.createElement(_index.Td, {
30
30
  style: {
31
- width: columnsWidth?.[id - 1]
31
+ width: columnsWidth === null || columnsWidth === void 0 ? void 0 : columnsWidth[id - 1]
32
32
  },
33
33
  key: id
34
34
  }, /*#__PURE__*/_react.default.createElement(_skeleton.default, {
@@ -63,9 +63,9 @@ const TableBody = _ref2 => {
63
63
  contain: strict ? 'strict' : 'size layout style'
64
64
  }
65
65
  }, /*#__PURE__*/_react.default.createElement("tbody", {
66
- className: `tbody ${isSkeletonized ? 'skeleton-transparency' : ''} ${customClass}`
66
+ className: "tbody ".concat(isSkeletonized ? 'skeleton-transparency' : '', " ").concat(customClass)
67
67
  }, renderChildren(children, context)))) : /*#__PURE__*/_react.default.createElement("tbody", {
68
- className: `tbody ${isSkeletonized ? 'skeleton-transparency' : ''} ${customClass}`
68
+ className: "tbody ".concat(isSkeletonized ? 'skeleton-transparency' : '', " ").concat(customClass)
69
69
  }, renderChildren(children, context));
70
70
  };
71
71
  var _default = exports.default = TableBody;
@@ -12,7 +12,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
12
12
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
13
  const getColumnsWidth = children => {
14
14
  const columnsWidth = [];
15
- if (/*#__PURE__*/(0, _react.isValidElement)(children) && children.props) {
15
+ if ( /*#__PURE__*/(0, _react.isValidElement)(children) && children.props) {
16
16
  let columns = children.props.children;
17
17
  if (!_lodash.default.isArray(columns)) columns = [columns];
18
18
  columns.forEach(element => {
@@ -20,12 +20,14 @@ const getColumnsWidth = children => {
20
20
  if (_lodash.default.isArray(element)) {
21
21
  element.forEach(elementArray => {
22
22
  if (elementArray && elementArray.props) {
23
- colWidth = elementArray.props?.style?.width;
23
+ var _elementArray$props, _elementArray$props$s;
24
+ colWidth = (_elementArray$props = elementArray.props) === null || _elementArray$props === void 0 ? void 0 : (_elementArray$props$s = _elementArray$props.style) === null || _elementArray$props$s === void 0 ? void 0 : _elementArray$props$s.width;
24
25
  }
25
26
  columnsWidth.push(colWidth);
26
27
  });
27
28
  } else if (element && element.props) {
28
- colWidth = element.props?.style?.width;
29
+ var _element$props, _element$props$style;
30
+ colWidth = (_element$props = element.props) === null || _element$props === void 0 ? void 0 : (_element$props$style = _element$props.style) === null || _element$props$style === void 0 ? void 0 : _element$props$style.width;
29
31
  columnsWidth.push(colWidth);
30
32
  }
31
33
  });
@@ -34,8 +36,9 @@ const getColumnsWidth = children => {
34
36
  };
35
37
  const countColumnsFromChildren = (element, columnsCount) => {
36
38
  const count = columnsCount;
37
- if (/*#__PURE__*/(0, _react.isValidElement)(element)) {
38
- if (_lodash.default.isArray(element?.props?.children)) {
39
+ if ( /*#__PURE__*/(0, _react.isValidElement)(element)) {
40
+ var _element$props2;
41
+ if (_lodash.default.isArray(element === null || element === void 0 ? void 0 : (_element$props2 = element.props) === null || _element$props2 === void 0 ? void 0 : _element$props2.children)) {
39
42
  const currentElement = element.props;
40
43
  currentElement.children.forEach(child => countColumnsFromChildren(child, count));
41
44
  } else if (element) {
@@ -48,7 +51,7 @@ const countColumnsFromChildren = (element, columnsCount) => {
48
51
  const getColumnsCount = (children, columnsCount) => {
49
52
  if (_lodash.default.isArray(children) && children.length > 0 && children[0].props) {
50
53
  countColumnsFromChildren(children[0].props.children, columnsCount);
51
- } else if (/*#__PURE__*/(0, _react.isValidElement)(children) && children.props && children.props.children) {
54
+ } else if ( /*#__PURE__*/(0, _react.isValidElement)(children) && children.props && children.props.children) {
52
55
  countColumnsFromChildren(children.props.children, columnsCount);
53
56
  }
54
57
  return columnsCount.current;
@@ -82,9 +85,9 @@ const Header = _ref => {
82
85
  tableLayout: 'fixed'
83
86
  }
84
87
  }, /*#__PURE__*/_react.default.createElement("thead", {
85
- className: `theader ${customClass}`
88
+ className: "theader ".concat(customClass)
86
89
  }, children))) : /*#__PURE__*/_react.default.createElement("thead", {
87
- className: `theader ${customClass}`
90
+ className: "theader ".concat(customClass)
88
91
  }, children);
89
92
  };
90
93
  var _default = exports.default = Header;
@@ -44,7 +44,7 @@ const HeaderColumn = props => {
44
44
  return /*#__PURE__*/_react.default.createElement("th", _extends({}, getProps(), {
45
45
  id: id,
46
46
  style: style,
47
- className: `headercolumn ${customClass} text-align-${textAlign} ${isMenuColumn && 'menu-column'}`
47
+ className: "headercolumn ".concat(customClass, " text-align-").concat(textAlign, " ").concat(isMenuColumn && 'menu-column')
48
48
  }), skeletonize && (skeletonInHeader || !skeletonInRows) && !vertical ? /*#__PURE__*/_react.default.createElement(_skeleton.default, {
49
49
  height: style && style.height ? undefined : 16,
50
50
  style: {
package/lib/table/Row.js CHANGED
@@ -53,7 +53,7 @@ const Row = props => {
53
53
  }, !divider ? /*#__PURE__*/_react.default.createElement("tr", {
54
54
  onMouseEnter: onMouseEnter,
55
55
  onMouseLeave: onMouseLeave,
56
- className: `trow ${customClass} ${rowId && selectedRowId === rowId ? '-selected' : ''}`,
56
+ className: "trow ".concat(customClass, " ").concat(rowId && selectedRowId === rowId ? '-selected' : ''),
57
57
  onClick: e => {
58
58
  if (handleSelectRow && (rowId !== undefined || rowId !== null)) handleSelectRow(rowId);
59
59
  if (handleTableRowClick) handleTableRowClick(e, dataId);
@@ -67,11 +67,11 @@ const Row = props => {
67
67
  className: "trow trow-divider"
68
68
  }, vertical ? /*#__PURE__*/_react.default.createElement("th", {
69
69
  colSpan: dividerColSpan,
70
- className: `-divider -${dividerColor}`,
70
+ className: "-divider -".concat(dividerColor),
71
71
  style: dividerStyle
72
72
  }, dividerTitle || '') : /*#__PURE__*/_react.default.createElement("td", {
73
73
  colSpan: dividerColSpan,
74
- className: `-divider -${dividerColor}`,
74
+ className: "-divider -".concat(dividerColor),
75
75
  style: dividerStyle
76
76
  }, dividerTitle || '')));
77
77
  };
@@ -71,7 +71,7 @@ const RowColumn = props => {
71
71
  return /*#__PURE__*/_react.default.createElement("td", {
72
72
  rowSpan: rowSpan,
73
73
  colSpan: colSpan,
74
- className: `rowcolumn ${customClass} text-align-${textAlign} ${!context.rowBorder && ' -noborder'} ${!rowSpan ? ' -norowspan' : ''} ${isMenuColumn && 'menu-column'}`,
74
+ className: "rowcolumn ".concat(customClass, " text-align-").concat(textAlign, " ").concat(!context.rowBorder && ' -noborder', " ").concat(!rowSpan ? ' -norowspan' : '', " ").concat(isMenuColumn && 'menu-column'),
75
75
  style: style,
76
76
  onClick: e => getColClickEvent(e, _objectSpread(_objectSpread({}, context), props)),
77
77
  role: "presentation",
@@ -65,12 +65,7 @@ const getClass = _ref => {
65
65
  bodyScrollable,
66
66
  skeletonInRows = 10
67
67
  } = _ref;
68
- return `table-component ${customClass} ${striped && '-striped'}
69
- ${bordered && '-bordered'} ${hovered && '-hovered'} ${headerColored && '-headercolor'}
70
- ${condensed && '-condensed'}
71
- ${vertical && '-vertical'}
72
- ${skeletonize && !skeletonInRows ? '-skeletonized' : ''}
73
- ${bodyScrollable ? '-scrollable' : ''}`;
68
+ return "table-component ".concat(customClass, " ").concat(striped && '-striped', " \n ").concat(bordered && '-bordered', " ").concat(hovered && '-hovered', " ").concat(headerColored && '-headercolor', "\n ").concat(condensed && '-condensed', "\n ").concat(vertical && '-vertical', "\n ").concat(skeletonize && !skeletonInRows ? '-skeletonized' : '', "\n ").concat(bodyScrollable ? '-scrollable' : '');
74
69
  };
75
70
  const Table = _ref2 => {
76
71
  let {
@@ -0,0 +1,62 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _buttons = _interopRequireDefault(require("../buttons"));
9
+ var _list = _interopRequireWildcard(require("../list"));
10
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
11
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
12
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13
+ const DropdownItems = _ref => {
14
+ let {
15
+ handlerClick,
16
+ handlerRemovePanel,
17
+ dropdownPanels = [],
18
+ tabMenuSize = 'medium'
19
+ } = _ref;
20
+ return dropdownPanels.length > 0 ? /*#__PURE__*/_react.default.createElement(_buttons.default, {
21
+ dropdown: true,
22
+ dropdownAlign: "right",
23
+ transparent: true,
24
+ boxShadow: false,
25
+ size: "large",
26
+ customClass: "dropdownbutton"
27
+ }, /*#__PURE__*/_react.default.createElement(_list.default, {
28
+ customClass: "dropdown-hide-tabs"
29
+ }, dropdownPanels.map((panel, index) => {
30
+ const {
31
+ id,
32
+ title,
33
+ closeable,
34
+ iconAlign,
35
+ icon,
36
+ iconName,
37
+ disabled
38
+ } = panel.props;
39
+ return /*#__PURE__*/_react.default.createElement(_list.ListItem, {
40
+ key: id
41
+ }, /*#__PURE__*/_react.default.createElement("div", {
42
+ className: "menuitem"
43
+ }, /*#__PURE__*/_react.default.createElement(_buttons.default, {
44
+ className: "btn menubutton",
45
+ boxShadow: false,
46
+ onClick: () => handlerClick === null || handlerClick === void 0 ? void 0 : handlerClick(id),
47
+ iconAlign: iconAlign,
48
+ iconName: iconName,
49
+ icon: icon,
50
+ disabled: disabled,
51
+ label: title,
52
+ size: tabMenuSize,
53
+ transparent: true
54
+ }), closeable && /*#__PURE__*/_react.default.createElement("button", {
55
+ className: "closepanel",
56
+ onClick: () => {
57
+ handlerRemovePanel === null || handlerRemovePanel === void 0 ? void 0 : handlerRemovePanel(id, index, true);
58
+ }
59
+ })));
60
+ }))) : null;
61
+ };
62
+ var _default = exports.default = DropdownItems;
@@ -62,7 +62,7 @@ const DropdownTabs = _ref2 => {
62
62
  transparent: true,
63
63
  boxShadow: false,
64
64
  size: "large",
65
- customClass: `dropdownbutton ${hasTabs ? 'show' : ''}`
65
+ customClass: "dropdownbutton ".concat(hasTabs ? 'show' : '')
66
66
  }, /*#__PURE__*/_react.default.createElement(_list.default, {
67
67
  customClass: "dropdown-hide-tabs"
68
68
  }, uniqueTabs.map(tab => /*#__PURE__*/_react.default.createElement(DropdownTab, _extends({
package/lib/tabs/Menu.js CHANGED
@@ -40,7 +40,7 @@ const Menu = _ref => {
40
40
  tabMenuAlign: props.tabMenuAlign,
41
41
  firstTabIdent: props.firstTabIdent
42
42
  }), toolbar && /*#__PURE__*/_react.default.cloneElement(toolbar, {
43
- customClass: `menubar ${customClassForToolBar}`
43
+ customClass: "menubar ".concat(customClassForToolBar)
44
44
  }));
45
45
  };
46
46
  var _default = exports.default = Menu;
@@ -0,0 +1,70 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _buttons = _interopRequireDefault(require("../buttons"));
9
+ var helpers = _interopRequireWildcard(require("./tabHelpers"));
10
+ var _permissionValidations = require("../permissionValidations");
11
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
12
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
13
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14
+ const MenuItems = _ref => {
15
+ let {
16
+ handlerClick,
17
+ currentPanels,
18
+ handlerRemovePanel,
19
+ tabWidth = 'auto',
20
+ tabMenuSize = 'medium',
21
+ tabMenuAlign = 'left',
22
+ selectedTabId = '',
23
+ firstTabIdent = false
24
+ } = _ref;
25
+ return /*#__PURE__*/_react.default.createElement("ul", {
26
+ className: "menu ".concat(firstTabIdent && '-firsttabident'),
27
+ style: helpers.menuStyles(tabMenuAlign)
28
+ }, currentPanels === null || currentPanels === void 0 ? void 0 : currentPanels.map((panel, index) => {
29
+ const {
30
+ id,
31
+ icon,
32
+ title,
33
+ tooltip,
34
+ disabled,
35
+ iconName,
36
+ closeable,
37
+ iconAlign,
38
+ tooltipWidth,
39
+ permissionAttr,
40
+ tooltipPosition
41
+ } = panel.props;
42
+ const onDenied = (0, _permissionValidations.actionsOnPermissionDenied)(helpers.onDeniedOptions, permissionAttr);
43
+ return onDenied.unvisible ? null : /*#__PURE__*/_react.default.createElement("li", {
44
+ key: id,
45
+ style: {
46
+ width: tabWidth
47
+ },
48
+ className: "menuitem ".concat(selectedTabId === id && 'selected')
49
+ }, /*#__PURE__*/_react.default.createElement(_buttons.default, {
50
+ className: "btn menubutton",
51
+ boxShadow: false,
52
+ onClick: () => handlerClick === null || handlerClick === void 0 ? void 0 : handlerClick(id),
53
+ iconAlign: iconAlign,
54
+ iconName: iconName,
55
+ icon: icon,
56
+ disabled: disabled || !!onDenied.disabled,
57
+ label: title,
58
+ size: tabMenuSize,
59
+ tooltip: tooltip || title,
60
+ tooltipPosition: tooltipPosition,
61
+ tooltipWidth: tooltipWidth
62
+ }), closeable && currentPanels.length > 1 && /*#__PURE__*/_react.default.createElement("button", {
63
+ className: "closepanel",
64
+ onClick: () => {
65
+ handlerRemovePanel === null || handlerRemovePanel === void 0 ? void 0 : handlerRemovePanel(id, index);
66
+ }
67
+ }));
68
+ }));
69
+ };
70
+ var _default = exports.default = MenuItems;
@@ -42,7 +42,7 @@ const MenuTab = _ref => {
42
42
  style: {
43
43
  width: tabWidth
44
44
  },
45
- className: `menuitem ${selectedTabId === id && 'selected'}`
45
+ className: "menuitem ".concat(selectedTabId === id && 'selected')
46
46
  }, /*#__PURE__*/_react.default.createElement(_buttons.default, {
47
47
  className: "btn menubutton",
48
48
  boxShadow: false,
@@ -71,7 +71,7 @@ const MenuTabs = /*#__PURE__*/_react.default.forwardRef((_ref2, ref) => {
71
71
  } = _ref2;
72
72
  const uniqueTabs = _lodash.default.uniqBy(tabs, 'id');
73
73
  return /*#__PURE__*/_react.default.createElement("ul", {
74
- className: `menu ${firstTabIdent && '-firsttabident'}`,
74
+ className: "menu ".concat(firstTabIdent && '-firsttabident'),
75
75
  style: helpers.menuStyles(tabMenuAlign),
76
76
  ref: ref
77
77
  }, uniqueTabs.map(tab => /*#__PURE__*/_react.default.createElement(MenuTab, _extends({
package/lib/tabs/Panel.js CHANGED
@@ -60,8 +60,9 @@ const Panel = props => {
60
60
  scrollHeight
61
61
  } = rootElementRef.current;
62
62
  if (scrollHeight !== lastScrollHeight.current) {
63
+ var _observer;
63
64
  enableOnEndReached.current = true;
64
- observer?.disconnect();
65
+ (_observer = observer) === null || _observer === void 0 ? void 0 : _observer.disconnect();
65
66
  }
66
67
  });
67
68
  observer.observe(rootElementRef.current);
@@ -69,15 +70,16 @@ const Panel = props => {
69
70
  rootElementRef.current.addEventListener('resize', onScrollEndReached);
70
71
  }
71
72
  return () => {
72
- rootElementRef.current?.removeEventListener('scroll', onScrollEndReached);
73
- rootElementRef.current?.removeEventListener('resize', onScrollEndReached);
74
- observer?.disconnect();
73
+ var _rootElementRef$curre, _rootElementRef$curre2, _observer2;
74
+ (_rootElementRef$curre = rootElementRef.current) === null || _rootElementRef$curre === void 0 ? void 0 : _rootElementRef$curre.removeEventListener('scroll', onScrollEndReached);
75
+ (_rootElementRef$curre2 = rootElementRef.current) === null || _rootElementRef$curre2 === void 0 ? void 0 : _rootElementRef$curre2.removeEventListener('resize', onScrollEndReached);
76
+ (_observer2 = observer) === null || _observer2 === void 0 ? void 0 : _observer2.disconnect();
75
77
  };
76
78
  }, [onScrollEndReached]);
77
79
  return /*#__PURE__*/_react.default.createElement("div", {
78
80
  ref: rootElementRef,
79
81
  id: id,
80
- className: `${customClass} panel ${hidePanel}`,
82
+ className: "".concat(customClass, " panel ").concat(hidePanel),
81
83
  style: style
82
84
  }, hideContent ? /*#__PURE__*/_react.default.createElement(_noPermission.default, null) : children);
83
85
  };
@@ -13,6 +13,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
13
13
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
14
14
  const TabsContext = exports.TabsContext = /*#__PURE__*/(0, _react.createContext)({});
15
15
  function TabsProvider(_ref) {
16
+ var _menuRef$current$clie, _menuRef$current;
16
17
  let {
17
18
  children,
18
19
  tabs: tabsProp,
@@ -25,11 +26,12 @@ function TabsProvider(_ref) {
25
26
  } = _ref;
26
27
  const [selectedTabId, setSelectedTabId] = _react.default.useState(selectedTab);
27
28
  const [containerWidth, setContainerWidth] = (0, _react.useState)(() => {
28
- return container.current?.clientWidth ?? 0;
29
+ var _container$current$cl, _container$current;
30
+ return (_container$current$cl = (_container$current = container.current) === null || _container$current === void 0 ? void 0 : _container$current.clientWidth) !== null && _container$current$cl !== void 0 ? _container$current$cl : 0;
29
31
  });
30
32
  const [tabs, setTabs] = (0, _react.useState)((0, _tabHelpers.getTabs)(tabsProp));
31
33
  const menuRef = (0, _react.useRef)(null);
32
- const menuSize = (menuRef.current?.clientWidth ?? 0) - 38 - (firstTabIdent ? 15 : 0);
34
+ const menuSize = ((_menuRef$current$clie = (_menuRef$current = menuRef.current) === null || _menuRef$current === void 0 ? void 0 : _menuRef$current.clientWidth) !== null && _menuRef$current$clie !== void 0 ? _menuRef$current$clie : 0) - 38 - (firstTabIdent ? 15 : 0);
33
35
  const tabsWidth = (0, _react.useMemo)(() => {
34
36
  if (typeof tabsWidthProp === 'string') return tabsWidthProp === 'auto' ? 100 : parseInt(tabsWidthProp) || 100;
35
37
  return tabsWidthProp;
@@ -39,7 +41,8 @@ function TabsProvider(_ref) {
39
41
  setSelectedTabId(selectedTab);
40
42
  }
41
43
  if (tabs.length > 0 && selectedTabId === null) {
42
- setSelectedTabId(tabs[0]?.id);
44
+ var _tabs$;
45
+ setSelectedTabId((_tabs$ = tabs[0]) === null || _tabs$ === void 0 ? void 0 : _tabs$.id);
43
46
  }
44
47
  const dropdownTabs = (0, _react.useMemo)(() => {
45
48
  if (menuSize === 0) return [];
@@ -31,7 +31,7 @@ const TextContent = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
31
31
  return /*#__PURE__*/_react.default.createElement(Comp, _extends({
32
32
  ref: typedRef,
33
33
  style: styleForLabel,
34
- className: `text-content-component ${className}`,
34
+ className: "text-content-component ".concat(className),
35
35
  "data-textcontent": Comp,
36
36
  onMouseEnter: onHoverLabel
37
37
  }, props), children);
@@ -44,7 +44,7 @@ const ButtonBar = _ref => {
44
44
  transparent,
45
45
  skeletonize,
46
46
  boxShadow: false,
47
- customClass: `buttonbar ${customClass}`
47
+ customClass: "buttonbar ".concat(customClass)
48
48
  });
49
49
  return {
50
50
  default: /*#__PURE__*/_react.default.createElement(_buttons.default, getProps()),
@@ -58,7 +58,7 @@ const ToolBar = _ref => {
58
58
  value: contextValues
59
59
  }, /*#__PURE__*/_react.default.createElement("div", {
60
60
  ref: innerRef,
61
- className: `toolbar-component ${size ? `${size}-bar` : ''} ${customClass}`,
61
+ className: "toolbar-component ".concat(size ? "".concat(size, "-bar") : '', " ").concat(customClass),
62
62
  style: style
63
63
  }, children));
64
64
  };
@@ -23,14 +23,14 @@ const Tooltip = _ref => {
23
23
  } = _ref;
24
24
  const tooltipComponent = (0, _react.useRef)(document.createElement('div'));
25
25
  (0, _react.useEffect)(() => {
26
- tooltipComponent.current.id = `tooltip-${uuid.v1()}`;
27
- tooltipComponent.current.className = `tooltip-component ${className} `;
26
+ tooltipComponent.current.id = "tooltip-".concat(uuid.v1());
27
+ tooltipComponent.current.className = "tooltip-component ".concat(className, " ");
28
28
  tooltipComponent.current.dataset.testid = 'tooltip-component';
29
29
  tooltipComponent.current.style.cssText = style;
30
30
  document.body.appendChild(tooltipComponent.current);
31
- const tooltipEl = document.querySelector(`div#${tooltipComponent.current.id}`);
32
- let widthDimension = tooltipEl?.offsetWidth;
33
- const heightDimension = tooltipEl?.offsetHeight;
31
+ const tooltipEl = document.querySelector("div#".concat(tooltipComponent.current.id));
32
+ let widthDimension = tooltipEl === null || tooltipEl === void 0 ? void 0 : tooltipEl.offsetWidth;
33
+ const heightDimension = tooltipEl === null || tooltipEl === void 0 ? void 0 : tooltipEl.offsetHeight;
34
34
  if (tooltipDimensions && tooltipDimensions.width) {
35
35
  widthDimension = tooltipDimensions.width;
36
36
  }
@@ -47,13 +47,13 @@ const Tooltip = _ref => {
47
47
  };
48
48
  }, []);
49
49
  (0, _react.useEffect)(() => {
50
- tooltipComponent.current.className = `tooltip-component ${className} `;
50
+ tooltipComponent.current.className = "tooltip-component ".concat(className, " ");
51
51
  }, [className]);
52
52
  (0, _react.useEffect)(() => {
53
53
  tooltipComponent.current.style.cssText = style;
54
54
  }, [style]);
55
55
  (0, _react.useEffect)(() => {
56
- tooltipComponent.current.className = textError ? `tooltip-error tooltip-component ${className}` : `tooltip-component ${className}`;
56
+ tooltipComponent.current.className = textError ? "tooltip-error tooltip-component ".concat(className) : "tooltip-component ".concat(className);
57
57
  }, [textError]);
58
58
  const getTooltipContent = () => /*#__PURE__*/_react.default.createElement("div", {
59
59
  className: "tooltipcontent"
@@ -27,7 +27,7 @@ const TreeTableBody = () => {
27
27
  dataRow: element,
28
28
  rowLevel: element.rowLevel ? element.rowLevel + 1 : 0,
29
29
  key: element[rootPropName],
30
- rowId: `${element[rootPropName]}`,
30
+ rowId: "".concat(element[rootPropName]),
31
31
  style: stylesForRow
32
32
  })));
33
33
  };
@@ -15,9 +15,9 @@ const TreeTableHeader = () => {
15
15
  dataColumns
16
16
  } = (0, _react.useContext)(_helpers.TreeTableContext);
17
17
  return /*#__PURE__*/_react.default.createElement(_table.THeader, null, /*#__PURE__*/_react.default.createElement(_table.TRow, {
18
- key: `tr-header-${(0, _uuid.v1)()}`
18
+ key: "tr-header-".concat((0, _uuid.v1)())
19
19
  }, dataColumns.map(column => /*#__PURE__*/_react.default.createElement(_table.Th, {
20
- key: `th-${column.name}-${(0, _uuid.v1)()}`,
20
+ key: "th-".concat(column.name, "-").concat((0, _uuid.v1)()),
21
21
  style: column.style
22
22
  }, column.title))));
23
23
  };
@@ -1,4 +1,4 @@
1
- import { I as ITreeTableRow } from '../types.d-73cece43.js';
1
+ import { I as ITreeTableRow } from '../types.d-3d9e44cd.js';
2
2
  import 'react';
3
3
  import '../table/types.js';
4
4