asab_webui_components 25.2.7 → 25.2.8

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.
@@ -21,22 +21,24 @@ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e;
21
21
  Props:
22
22
  logs - 'array or string', required. Representing the logs to be displayed.
23
23
  header - 'component', optional. The header to be displayed at the CardHeader
24
-
25
24
  cardBodyClass - 'string', optional. Additional CSS classes for the CardBody element.
25
+ shouldWrap - 'bool', optional. Initially makes text wrap
26
26
  */
27
27
 
28
28
  function ConsoleCard(_ref) {
29
29
  var logs = _ref.logs,
30
30
  header = _ref.header,
31
31
  _ref$cardBodyClass = _ref.cardBodyClass,
32
- cardBodyClass = _ref$cardBodyClass === void 0 ? '' : _ref$cardBodyClass;
32
+ cardBodyClass = _ref$cardBodyClass === void 0 ? '' : _ref$cardBodyClass,
33
+ _ref$shouldWrap = _ref.shouldWrap,
34
+ shouldWrap = _ref$shouldWrap === void 0 ? false : _ref$shouldWrap;
33
35
  var logEndRef = (0, _react.useRef)(null); // Reference for scroll to the end of the logs
34
36
 
35
37
  var _useState = (0, _react.useState)(true),
36
38
  _useState2 = (0, _slicedToArray2["default"])(_useState, 2),
37
39
  isScrolledToBottom = _useState2[0],
38
40
  setIsScrolledToBottom = _useState2[1]; // Indicates whether the card is scrolled to the bottom
39
- var _useState3 = (0, _react.useState)(false),
41
+ var _useState3 = (0, _react.useState)(shouldWrap),
40
42
  _useState4 = (0, _slicedToArray2["default"])(_useState3, 2),
41
43
  isContentWrapped = _useState4[0],
42
44
  setIsContentWrapped = _useState4[1]; // Toggles wrapping the console content
@@ -12,15 +12,15 @@ import './ConsoleCard.scss';
12
12
  Props:
13
13
  logs - 'array or string', required. Representing the logs to be displayed.
14
14
  header - 'component', optional. The header to be displayed at the CardHeader
15
-
16
15
  cardBodyClass - 'string', optional. Additional CSS classes for the CardBody element.
16
+ shouldWrap - 'bool', optional. Initially makes text wrap
17
17
  */
18
18
 
19
- export function ConsoleCard ({ logs, header, cardBodyClass = '' }) {
19
+ export function ConsoleCard ({ logs, header, cardBodyClass = '', shouldWrap = false }) {
20
20
  const logEndRef = useRef(null); // Reference for scroll to the end of the logs
21
21
 
22
22
  const [isScrolledToBottom, setIsScrolledToBottom] = useState(true); // Indicates whether the card is scrolled to the bottom
23
- const [isContentWrapped, setIsContentWrapped] = useState(false); // Toggles wrapping the console content
23
+ const [isContentWrapped, setIsContentWrapped] = useState(shouldWrap); // Toggles wrapping the console content
24
24
 
25
25
  // Auto-scroll to the bottom when new logs are added and user is already at the bottom
26
26
  useEffect(() => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "asab_webui_components",
3
- "version": "25.2.7",
3
+ "version": "25.2.8",
4
4
  "license": "BSD-3-Clause",
5
5
  "description": "TeskaLabs ASAB WebUI Components Library",
6
6
  "contributors": [