linear-react-components-ui 1.1.20-beta.27 → 1.1.20-beta.29

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 (128) hide show
  1. package/lib/alerts/BaseAlert.js +1 -1
  2. package/lib/alerts/Message.js +1 -1
  3. package/lib/avatar/index.js +9 -8
  4. package/lib/badge/index.js +4 -4
  5. package/lib/buttons/DangerButton.js +1 -1
  6. package/lib/buttons/DefaultButton.js +12 -4
  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/index.js +1 -1
  18. package/lib/dialog/Custom.js +1 -1
  19. package/lib/dialog/Question.js +2 -4
  20. package/lib/dialog/base/Content.js +1 -1
  21. package/lib/dialog/base/Header.js +2 -2
  22. package/lib/dialog/base/index.js +4 -5
  23. package/lib/dialog/form/index.js +1 -1
  24. package/lib/dialog/wizard/progressbar.js +1 -1
  25. package/lib/dialog/wizard/step.js +1 -1
  26. package/lib/drawer/Drawer.js +3 -3
  27. package/lib/drawer/Header.js +1 -1
  28. package/lib/dropdown/Popup.js +6 -6
  29. package/lib/dropdown/helper.js +1 -1
  30. package/lib/dropdown/withDropdown.js +2 -2
  31. package/lib/fieldset/index.js +7 -7
  32. package/lib/form/FieldArray.js +1 -1
  33. package/lib/form/FieldNumber.js +3 -3
  34. package/lib/form/FieldPeriod.js +2 -2
  35. package/lib/form/index.js +2 -2
  36. package/lib/gridlayout/GridCol.js +5 -5
  37. package/lib/gridlayout/GridRow.js +4 -1
  38. package/lib/hint/index.js +7 -1
  39. package/lib/icons/index.js +24 -27
  40. package/lib/inputs/base/InputTextBase.js +6 -8
  41. package/lib/inputs/base/Label.js +1 -1
  42. package/lib/inputs/base/helpers.js +7 -3
  43. package/lib/inputs/date/helpers.js +4 -1
  44. package/lib/inputs/date/index.js +9 -15
  45. package/lib/inputs/errorMessage/index.js +1 -1
  46. package/lib/inputs/file/DefaultFile.js +5 -6
  47. package/lib/inputs/file/DragDropFile.js +15 -17
  48. package/lib/inputs/file/File.js +3 -4
  49. package/lib/inputs/mask/BaseMask.js +1 -2
  50. package/lib/inputs/multiSelect/Dropdown.js +9 -10
  51. package/lib/inputs/multiSelect/helper.js +1 -2
  52. package/lib/inputs/multiSelect/index.js +7 -9
  53. package/lib/inputs/number/index.js +1 -1
  54. package/lib/inputs/period/PeriodList.js +1 -1
  55. package/lib/inputs/period/helper.js +3 -1
  56. package/lib/inputs/period/index.js +9 -14
  57. package/lib/inputs/search/index.js +1 -1
  58. package/lib/inputs/select/Dropdown.js +1 -1
  59. package/lib/inputs/select/helper.js +10 -13
  60. package/lib/inputs/select/multiple/Selecteds.js +1 -1
  61. package/lib/inputs/select/multiple/index.js +9 -14
  62. package/lib/inputs/select/simple/index.js +10 -17
  63. package/lib/inputs/textarea/index.js +1 -1
  64. package/lib/internals/withTooltip.js +9 -9
  65. package/lib/labelMessages/index.js +4 -3
  66. package/lib/labels/DefaultLabel.js +4 -1
  67. package/lib/labels/label_container/index.js +1 -1
  68. package/lib/list/Header.js +1 -1
  69. package/lib/list/Item.js +9 -7
  70. package/lib/list/index.js +2 -1
  71. package/lib/menus/float/MenuItem.js +2 -2
  72. package/lib/menus/float/SubMenuContainer.js +1 -1
  73. package/lib/menus/float/index.js +1 -1
  74. package/lib/menus/sidenav/ExpandMenu.js +1 -1
  75. package/lib/menus/sidenav/NavMenuGroup.js +1 -1
  76. package/lib/menus/sidenav/NavMenuItem.js +7 -9
  77. package/lib/menus/sidenav/NavSubMenuItem.js +1 -1
  78. package/lib/menus/sidenav/helpers.js +1 -1
  79. package/lib/menus/sidenav/index.js +39 -31
  80. package/lib/menus/sidenav/types.d.ts +1 -0
  81. package/lib/panel/Content.js +5 -7
  82. package/lib/panel/Default.js +2 -2
  83. package/lib/panel/Header.js +3 -3
  84. package/lib/permissionValidations.js +1 -1
  85. package/lib/popover/index.js +1 -1
  86. package/lib/progress/Bar.js +6 -6
  87. package/lib/radio/index.js +2 -2
  88. package/lib/shortcuts/index.js +1 -1
  89. package/lib/skeleton/SkeletonContainer.js +2 -1
  90. package/lib/skeleton/index.js +4 -1
  91. package/lib/spinner/index.js +2 -2
  92. package/lib/split/Split.js +1 -1
  93. package/lib/split/SplitSide.js +3 -3
  94. package/lib/table/Body.js +3 -3
  95. package/lib/table/Header.js +8 -11
  96. package/lib/table/HeaderColumn.js +1 -1
  97. package/lib/table/Row.js +3 -3
  98. package/lib/table/RowColumn.js +1 -1
  99. package/lib/table/index.js +6 -1
  100. package/lib/tabs/DropdownTabs.js +1 -1
  101. package/lib/tabs/Menu.js +1 -1
  102. package/lib/tabs/MenuTabs.js +2 -2
  103. package/lib/tabs/Panel.js +5 -7
  104. package/lib/tabs/context.js +3 -6
  105. package/lib/textContent/index.js +1 -1
  106. package/lib/toolbar/ButtonBar.js +1 -1
  107. package/lib/toolbar/index.js +1 -1
  108. package/lib/tooltip/index.js +7 -7
  109. package/lib/treetable/Body.js +1 -1
  110. package/lib/treetable/Header.js +2 -2
  111. package/lib/treetable/Row.d.ts +1 -1
  112. package/lib/treetable/Row.js +12 -16
  113. package/lib/treetable/helpers.d.ts +1 -1
  114. package/lib/treetable/index.d.ts +2 -2
  115. package/lib/treeview/Header.js +1 -1
  116. package/lib/treeview/Node.js +5 -5
  117. package/lib/treeview/index.js +4 -4
  118. package/lib/{types.d-b477e076.d.ts → types.d-73cece43.d.ts} +0 -1
  119. package/lib/uitour/index.js +6 -8
  120. package/package.json +1 -1
  121. package/lib/checkbox/Label.js +0 -31
  122. package/lib/inputs/mask/imaskHOC.js +0 -203
  123. package/lib/menus/sidenav/popup_menu_help/index.js +0 -85
  124. package/lib/tabs/DropdownItems.js +0 -62
  125. package/lib/tabs/MenuItems.js +0 -70
  126. package/lib/treeview_old/Header.js +0 -29
  127. package/lib/treeview_old/Node.js +0 -68
  128. package/lib/treeview_old/index.js +0 -43
package/lib/tabs/Panel.js CHANGED
@@ -60,9 +60,8 @@ const Panel = props => {
60
60
  scrollHeight
61
61
  } = rootElementRef.current;
62
62
  if (scrollHeight !== lastScrollHeight.current) {
63
- var _observer;
64
63
  enableOnEndReached.current = true;
65
- (_observer = observer) === null || _observer === void 0 ? void 0 : _observer.disconnect();
64
+ observer?.disconnect();
66
65
  }
67
66
  });
68
67
  observer.observe(rootElementRef.current);
@@ -70,16 +69,15 @@ const Panel = props => {
70
69
  rootElementRef.current.addEventListener('resize', onScrollEndReached);
71
70
  }
72
71
  return () => {
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();
72
+ rootElementRef.current?.removeEventListener('scroll', onScrollEndReached);
73
+ rootElementRef.current?.removeEventListener('resize', onScrollEndReached);
74
+ observer?.disconnect();
77
75
  };
78
76
  }, [onScrollEndReached]);
79
77
  return /*#__PURE__*/_react.default.createElement("div", {
80
78
  ref: rootElementRef,
81
79
  id: id,
82
- className: "".concat(customClass, " panel ").concat(hidePanel),
80
+ className: `${customClass} panel ${hidePanel}`,
83
81
  style: style
84
82
  }, hideContent ? /*#__PURE__*/_react.default.createElement(_noPermission.default, null) : children);
85
83
  };
@@ -13,7 +13,6 @@ 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;
17
16
  let {
18
17
  children,
19
18
  tabs: tabsProp,
@@ -26,12 +25,11 @@ function TabsProvider(_ref) {
26
25
  } = _ref;
27
26
  const [selectedTabId, setSelectedTabId] = _react.default.useState(selectedTab);
28
27
  const [containerWidth, setContainerWidth] = (0, _react.useState)(() => {
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;
28
+ return container.current?.clientWidth ?? 0;
31
29
  });
32
30
  const [tabs, setTabs] = (0, _react.useState)((0, _tabHelpers.getTabs)(tabsProp));
33
31
  const menuRef = (0, _react.useRef)(null);
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);
32
+ const menuSize = (menuRef.current?.clientWidth ?? 0) - 38 - (firstTabIdent ? 15 : 0);
35
33
  const tabsWidth = (0, _react.useMemo)(() => {
36
34
  if (typeof tabsWidthProp === 'string') return tabsWidthProp === 'auto' ? 100 : parseInt(tabsWidthProp) || 100;
37
35
  return tabsWidthProp;
@@ -41,8 +39,7 @@ function TabsProvider(_ref) {
41
39
  setSelectedTabId(selectedTab);
42
40
  }
43
41
  if (tabs.length > 0 && selectedTabId === null) {
44
- var _tabs$;
45
- setSelectedTabId((_tabs$ = tabs[0]) === null || _tabs$ === void 0 ? void 0 : _tabs$.id);
42
+ setSelectedTabId(tabs[0]?.id);
46
43
  }
47
44
  const dropdownTabs = (0, _react.useMemo)(() => {
48
45
  if (menuSize === 0) return [];
@@ -33,7 +33,7 @@ const TextContent = /*#__PURE__*/(0, _react.forwardRef)((_ref, ref) => {
33
33
  return /*#__PURE__*/_react.default.createElement(Comp, _extends({
34
34
  ref: typedRef,
35
35
  style: styleForLabel,
36
- className: "text-content-component ".concat(className),
36
+ className: `text-content-component ${className}`,
37
37
  "data-textcontent": Comp,
38
38
  onMouseEnter: onHoverLabel
39
39
  }, restProps), children);
@@ -44,7 +44,7 @@ const ButtonBar = _ref => {
44
44
  transparent,
45
45
  skeletonize,
46
46
  boxShadow: false,
47
- customClass: "buttonbar ".concat(customClass)
47
+ customClass: `buttonbar ${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 ".concat(size ? "".concat(size, "-bar") : '', " ").concat(customClass),
61
+ className: `toolbar-component ${size ? `${size}-bar` : ''} ${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-".concat(uuid.v1());
27
- tooltipComponent.current.className = "tooltip-component ".concat(className, " ");
26
+ tooltipComponent.current.id = `tooltip-${uuid.v1()}`;
27
+ tooltipComponent.current.className = `tooltip-component ${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#".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;
31
+ const tooltipEl = document.querySelector(`div#${tooltipComponent.current.id}`);
32
+ let widthDimension = tooltipEl?.offsetWidth;
33
+ const heightDimension = 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 ".concat(className, " ");
50
+ tooltipComponent.current.className = `tooltip-component ${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 ".concat(className) : "tooltip-component ".concat(className);
56
+ tooltipComponent.current.className = textError ? `tooltip-error tooltip-component ${className}` : `tooltip-component ${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: "".concat(element[rootPropName]),
30
+ rowId: `${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-".concat((0, _uuid.v1)())
18
+ key: `tr-header-${(0, _uuid.v1)()}`
19
19
  }, dataColumns.map(column => /*#__PURE__*/_react.default.createElement(_table.Th, {
20
- key: "th-".concat(column.name, "-").concat((0, _uuid.v1)()),
20
+ key: `th-${column.name}-${(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-b477e076.js';
1
+ import { I as ITreeTableRow } from '../types.d-73cece43.js';
2
2
  import 'react';
3
3
  import '../table/types.js';
4
4
 
@@ -37,8 +37,7 @@ const TreeRow = props => {
37
37
  leftToolbarElements,
38
38
  rightToolbarElements,
39
39
  styleForRightToolbar,
40
- toolbarElementsValidations,
41
- openNodeId
40
+ toolbarElementsValidations
42
41
  } = (0, _react.useContext)(_helpers.TreeTableContext);
43
42
  const {
44
43
  rowId,
@@ -55,11 +54,11 @@ const TreeRow = props => {
55
54
  setChildrens(dataChildrens);
56
55
  setIsLoadingChildrens(false);
57
56
  };
58
- const handlerShowChildrens = () => {
59
- if (!firstRenderingOfChildrens && !open) {
57
+ const handlerShowChildrens = async () => {
58
+ if (!firstRenderingOfChildrens && !open && onClickGetChildrens) {
60
59
  setOpen(true);
61
60
  setIsLoadingChildrens(true);
62
- if (onClickGetChildrens !== null && onClickGetChildrens !== void 0 && onClickGetChildrens(rowId) && typeof onClickGetChildrens(rowId).finally === 'function') onClickGetChildrens(rowId).then(() => {}).catch(() => {}).finally(() => {
61
+ await onClickGetChildrens(rowId).then(() => {}).catch(() => {}).finally(() => {
63
62
  searchChildrensAndInsertState();
64
63
  });
65
64
  setFirstRenderingOfChildrens(true);
@@ -95,7 +94,7 @@ const TreeRow = props => {
95
94
  let newElementsWithNewProps = [];
96
95
  if (elements) {
97
96
  newElementsWithNewProps = _react.default.Children.map(elements, element => {
98
- if ( /*#__PURE__*/_react.default.isValidElement(element) && element.props) {
97
+ if (/*#__PURE__*/_react.default.isValidElement(element) && element.props) {
99
98
  const _element$props = element.props,
100
99
  {
101
100
  validationKey,
@@ -128,9 +127,6 @@ const TreeRow = props => {
128
127
  (0, _react.useEffect)(() => {
129
128
  setIsLoadingChildrens(false);
130
129
  }, [childrens]);
131
- (0, _react.useEffect)(() => {
132
- if (openNodeId === Number(dataRow.id)) setOpen(true);
133
- }, [openNodeId]);
134
130
  return /*#__PURE__*/_react.default.createElement(_react.Fragment, null, /*#__PURE__*/_react.default.createElement(_table.TRow, _extends({}, props, {
135
131
  dataId: rowId,
136
132
  customClass: "tree-row-element",
@@ -138,14 +134,14 @@ const TreeRow = props => {
138
134
  onMouseLeave: () => setShowToolbarElements(false)
139
135
  }), /*#__PURE__*/_react.default.createElement(_table.Td, {
140
136
  ignoreTableColClick: true,
141
- key: "td-".concat(dataColumns[0].name, "-").concat((0, _uuid.v1)()),
137
+ key: `td-${dataColumns[0].name}-${(0, _uuid.v1)()}`,
142
138
  style: dataColumns[0].style
143
139
  }, /*#__PURE__*/_react.default.createElement("div", {
144
140
  className: "column-container"
145
141
  }, /*#__PURE__*/_react.default.createElement("span", {
146
- className: "column-more-childrens ".concat(rowLevel && 'line-path-decoration'),
142
+ className: `column-more-childrens ${rowLevel && 'line-path-decoration'}`,
147
143
  style: {
148
- marginLeft: "".concat(rowLevel, "rem")
144
+ marginLeft: `${rowLevel}rem`
149
145
  }
150
146
  }, /*#__PURE__*/_react.default.createElement("button", {
151
147
  tabIndex: -1,
@@ -166,20 +162,20 @@ const TreeRow = props => {
166
162
  size: "small",
167
163
  customClass: "row-toolbar"
168
164
  }, /*#__PURE__*/_react.default.createElement(_toolbar.ToolBarGroup, {
169
- key: "left-toolbar-".concat((0, _uuid.v1)()),
165
+ key: `left-toolbar-${(0, _uuid.v1)()}`,
170
166
  style: _objectSpread({
171
167
  float: 'left',
172
168
  height: 'fit-content'
173
169
  }, styleForLeftToolbar)
174
170
  }, showToolbarElements && leftToolbarElements && buildToolbarElements(leftToolbarElements)), /*#__PURE__*/_react.default.createElement(_toolbar.ToolBarGroup, {
175
- key: "right-toolbar-".concat((0, _uuid.v1)()),
171
+ key: `right-toolbar-${(0, _uuid.v1)()}`,
176
172
  style: _objectSpread({
177
173
  float: 'right',
178
174
  height: 'fit-content',
179
175
  gap: '4px'
180
176
  }, styleForRightToolbar)
181
177
  }, rightToolbarElements && buildToolbarElements(rightToolbarElements)))))), dataColumns.slice(1).map(column => /*#__PURE__*/_react.default.createElement(_table.Td, {
182
- key: "key-".concat(column.name, "-").concat((0, _uuid.v1)()),
178
+ key: `key-${column.name}-${(0, _uuid.v1)()}`,
183
179
  style: _objectSpread({}, column.style),
184
180
  ignoreTableColClick: true
185
181
  }, dataRow[column.name]))), open && /*#__PURE__*/_react.default.createElement(_react.Fragment, null, childrens && childrens.length === 0 && isLoadingChildrens ? /*#__PURE__*/_react.default.createElement(_table.TRow, {
@@ -196,7 +192,7 @@ const TreeRow = props => {
196
192
  dataRow: item,
197
193
  rowLevel: item.rowLevel ? item.rowLevel + 1 : 1,
198
194
  key: item[rootPropName],
199
- rowId: "".concat(item[rootPropName]),
195
+ rowId: `${item[rootPropName]}`,
200
196
  style: stylesForRow
201
197
  })), childrens && childrens.length !== 0 && isLoadingChildrens && /*#__PURE__*/_react.default.createElement(_table.TRow, {
202
198
  key: "tr-loading-childrens"
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { a as ITreeTableProps } from '../types.d-b477e076.js';
2
+ import { a as ITreeTableProps } from '../types.d-73cece43.js';
3
3
  import '../table/types.js';
4
4
 
5
5
  declare const TreeTableContext: React.Context<ITreeTableProps>;
@@ -1,5 +1,5 @@
1
- import { a as ITreeTableProps } from '../types.d-b477e076.js';
2
- export { b as IRowElementsValidations, R as RowItem } from '../types.d-b477e076.js';
1
+ import { a as ITreeTableProps } from '../types.d-73cece43.js';
2
+ export { b as IRowElementsValidations, R as RowItem } from '../types.d-73cece43.js';
3
3
  import 'react';
4
4
  import '../table/types.js';
5
5
 
@@ -13,7 +13,7 @@ const Header = props => {
13
13
  children
14
14
  } = props;
15
15
  return /*#__PURE__*/_react.default.createElement("div", {
16
- className: "treeviewheader ".concat(customClass)
16
+ className: `treeviewheader ${customClass}`
17
17
  }, title ? /*#__PURE__*/_react.default.createElement("div", {
18
18
  className: "title"
19
19
  }, title) : children);
@@ -119,7 +119,7 @@ const TreeNode = props => {
119
119
  applyBehavior
120
120
  } = validation;
121
121
  if (_lodash.default.isEmpty(elementBehavior) && validator && validator(node)) {
122
- elementBehavior = options[applyBehavior !== null && applyBehavior !== void 0 ? applyBehavior : 'unvisible'];
122
+ elementBehavior = options[applyBehavior ?? 'unvisible'];
123
123
  }
124
124
  });
125
125
  }
@@ -129,7 +129,7 @@ const TreeNode = props => {
129
129
  let updatedElements = [];
130
130
  if (elements) {
131
131
  updatedElements = _react.default.Children.map(elements, element => {
132
- if ( /*#__PURE__*/_react.default.isValidElement(element) && element.props) {
132
+ if (/*#__PURE__*/_react.default.isValidElement(element) && element.props) {
133
133
  const _element$props = element.props,
134
134
  {
135
135
  validationKey,
@@ -165,7 +165,7 @@ const TreeNode = props => {
165
165
  } : {};
166
166
  return /*#__PURE__*/_react.default.createElement("div", {
167
167
  style: style,
168
- key: "element-".concat(uuid.v1()),
168
+ key: `element-${uuid.v1()}`,
169
169
  className: "element"
170
170
  }, element);
171
171
  });
@@ -185,7 +185,7 @@ const TreeNode = props => {
185
185
  }, [node]);
186
186
  return /*#__PURE__*/_react.default.createElement("li", {
187
187
  style: customStyle,
188
- className: "treeviewitem ".concat(customClass)
188
+ className: `treeviewitem ${customClass}`
189
189
  }, getSpan(), /*#__PURE__*/_react.default.createElement("div", {
190
190
  className: "label",
191
191
  style: {
@@ -202,7 +202,7 @@ const TreeNode = props => {
202
202
  }, showCheckBox ? /*#__PURE__*/_react.default.createElement(_checkbox.default, {
203
203
  checked: checked,
204
204
  disabled: required || disabled,
205
- value: "".concat(node[valuePropName]),
205
+ value: `${node[valuePropName]}`,
206
206
  label: node[labelPropName],
207
207
  tooltip: required ? defaultDisabledTooltip : '',
208
208
  onChange: disabled || required ? undefined : e => {
@@ -239,7 +239,7 @@ const TreeView = props => {
239
239
  }
240
240
  }
241
241
  return /*#__PURE__*/_react.default.createElement(_Node.default, {
242
- key: "node-".concat(node.id),
242
+ key: `node-${node.id}`,
243
243
  node: node,
244
244
  idsInLoading: idsInLoading,
245
245
  startNodesOpened: startNodesOpened,
@@ -281,7 +281,7 @@ const TreeView = props => {
281
281
  setData(props.data);
282
282
  } else if (!isSameSelectedIds) {
283
283
  setCurrentSelectedIds(selectedIds);
284
- onSelectedIdsChange === null || onSelectedIdsChange === void 0 ? void 0 : onSelectedIdsChange(selectedIds);
284
+ onSelectedIdsChange?.(selectedIds);
285
285
  setPropSelectedIds(selectedIds);
286
286
  }
287
287
  }, [selectedIds.length, props.data]);
@@ -311,10 +311,10 @@ const TreeView = props => {
311
311
  return /*#__PURE__*/_react.default.createElement(_constants.TreeviewContext.Provider, {
312
312
  value: contextValues
313
313
  }, /*#__PURE__*/_react.default.createElement("div", {
314
- className: "treeview-component ".concat(customClass)
314
+ className: `treeview-component ${customClass}`
315
315
  }, children, /*#__PURE__*/_react.default.createElement("ul", {
316
316
  style: styleForContainer,
317
- className: "treeviewcontainer ".concat(bordered && '-bordered')
317
+ className: `treeviewcontainer ${bordered && '-bordered'}`
318
318
  }, buildTree(data))));
319
319
  };
320
320
  var _default = exports.default = TreeView;
@@ -34,7 +34,6 @@ interface ITreeTableProps extends ITableProps {
34
34
  onClickFirstColumn?: (id?: string | number) => void;
35
35
  styleForRightToolbar?: CSSProperties;
36
36
  styleForLeftToolbar?: CSSProperties;
37
- openNodeId?: number;
38
37
  }
39
38
 
40
39
  interface ITreeTableRow extends ITableRowProps {
@@ -40,7 +40,7 @@ const UiTour = props => {
40
40
  const activatedEffects = (0, _react.useRef)([]);
41
41
  const handleNextStep = () => {
42
42
  if (hasNextStep) {
43
- const currentStepIndex = data.findIndex(item => item.id === (currentStep === null || currentStep === void 0 ? void 0 : currentStep.id));
43
+ const currentStepIndex = data.findIndex(item => item.id === currentStep?.id);
44
44
  const nextStep = data[currentStepIndex + 1];
45
45
  const nextStepIndex = data.findIndex(item => item.id === nextStep.id);
46
46
  const target = document.getElementById(nextStep.targetId);
@@ -53,7 +53,7 @@ const UiTour = props => {
53
53
  };
54
54
  const handleBackStep = () => {
55
55
  if (hasBackStep) {
56
- const currentStepIndex = data.findIndex(item => item.id === (currentStep === null || currentStep === void 0 ? void 0 : currentStep.id));
56
+ const currentStepIndex = data.findIndex(item => item.id === currentStep?.id);
57
57
  const backStep = data[currentStepIndex - 1];
58
58
  const backStepIndex = data.findIndex(item => item.id === backStep.id);
59
59
  const target = document.getElementById(backStep.targetId);
@@ -72,7 +72,7 @@ const UiTour = props => {
72
72
  if (stepRef.current) {
73
73
  const stepRect = stepRef.current.getBoundingClientRect();
74
74
  const windowWidth = window.innerWidth;
75
- if (stepRect.right >= windowWidth || (currentStep === null || currentStep === void 0 ? void 0 : currentStep.position) === _helpers.STEP_POSITIONS.right) {
75
+ if (stepRect.right >= windowWidth || currentStep?.position === _helpers.STEP_POSITIONS.right) {
76
76
  setStepPosition(_helpers.STEP_POSITIONS.right);
77
77
  setStepDimensions({
78
78
  top: target.top - _helpers.ARROW_HEIGHT,
@@ -179,9 +179,8 @@ const UiTour = props => {
179
179
  mutationObserver = new MutationObserver(() => {
180
180
  const targetObserved = document.getElementById(initialStep.targetId);
181
181
  if (targetObserved) {
182
- var _mutationObserver;
183
182
  showStepTour(initialStep);
184
- (_mutationObserver = mutationObserver) === null || _mutationObserver === void 0 ? void 0 : _mutationObserver.disconnect();
183
+ mutationObserver?.disconnect();
185
184
  mutationObserver = null;
186
185
  }
187
186
  });
@@ -192,8 +191,7 @@ const UiTour = props => {
192
191
  }
193
192
  }
194
193
  return () => {
195
- var _mutationObserver2;
196
- (_mutationObserver2 = mutationObserver) === null || _mutationObserver2 === void 0 ? void 0 : _mutationObserver2.disconnect();
194
+ mutationObserver?.disconnect();
197
195
  mutationObserver = null;
198
196
  };
199
197
  }, [visible, data]);
@@ -207,7 +205,7 @@ const UiTour = props => {
207
205
  className: "uitour-component"
208
206
  }, currentStep && /*#__PURE__*/_react.default.createElement("div", {
209
207
  ref: stepRef,
210
- className: "step -".concat(stepPosition),
208
+ className: `step -${stepPosition}`,
211
209
  key: currentStep.id,
212
210
  style: _objectSpread({}, stepDimensions)
213
211
  }, showCloseButton && /*#__PURE__*/_react.default.createElement("div", {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linear-react-components-ui",
3
- "version": "1.1.20-beta.27",
3
+ "version": "1.1.20-beta.29",
4
4
  "description": "Linear Sistemas ReactJs Components",
5
5
  "main": "lib/index.js",
6
6
  "module": "lib/index.cjs",
@@ -1,31 +0,0 @@
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 _withTooltip = _interopRequireDefault(require("../internals/withTooltip"));
9
- var _hint = _interopRequireDefault(require("../hint"));
10
- function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
11
- const Label = _ref => {
12
- let {
13
- label,
14
- targetSpanRef,
15
- disabled,
16
- hint
17
- } = _ref;
18
- return /*#__PURE__*/_react.default.createElement("div", {
19
- className: "description"
20
- }, /*#__PURE__*/_react.default.createElement("span", {
21
- ref: r => {
22
- if (targetSpanRef) targetSpanRef(r);
23
- }
24
- }, label), /*#__PURE__*/_react.default.createElement(_hint.default, {
25
- disabled: disabled,
26
- visible: !!hint,
27
- description: hint,
28
- customClass: "hint"
29
- }));
30
- };
31
- var _default = exports.default = (0, _withTooltip.default)(Label);