@datarobot/design-system 29.7.2 → 29.7.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.
|
@@ -5,5 +5,5 @@ type TooltipCellProps = {
|
|
|
5
5
|
/**
|
|
6
6
|
* Adds tooltip for cells with simple string value
|
|
7
7
|
*/
|
|
8
|
-
export default function TooltipCell({ value, testId, }: TooltipCellProps): import("react/jsx-runtime").JSX.Element
|
|
8
|
+
export default function TooltipCell({ value, testId, }: TooltipCellProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -5,6 +5,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = TooltipCell;
|
|
7
7
|
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _useTranslation = require("../hooks/use-translation");
|
|
8
9
|
var _truncateWithTooltip = require("../truncate-with-tooltip");
|
|
9
10
|
var _tooltip = require("../tooltip");
|
|
10
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
@@ -16,14 +17,15 @@ function TooltipCell({
|
|
|
16
17
|
value,
|
|
17
18
|
testId = 'tooltip-cell'
|
|
18
19
|
}) {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
}
|
|
20
|
+
const {
|
|
21
|
+
t
|
|
22
|
+
} = (0, _useTranslation.useTranslation)();
|
|
23
|
+
const valueText = value == null || value === '' ? t('N/A') : value;
|
|
22
24
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_truncateWithTooltip.TruncateWithTooltip, {
|
|
23
25
|
tooltipPlacement: _tooltip.TOOLTIP_PLACEMENT_TYPES.TOP,
|
|
24
26
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
25
27
|
"test-id": testId,
|
|
26
|
-
children:
|
|
28
|
+
children: valueText
|
|
27
29
|
})
|
|
28
30
|
});
|
|
29
31
|
}
|
|
@@ -5,5 +5,5 @@ type TooltipCellProps = {
|
|
|
5
5
|
/**
|
|
6
6
|
* Adds tooltip for cells with simple string value
|
|
7
7
|
*/
|
|
8
|
-
export default function TooltipCell({ value, testId, }: TooltipCellProps): import("react/jsx-runtime").JSX.Element
|
|
8
|
+
export default function TooltipCell({ value, testId, }: TooltipCellProps): import("react/jsx-runtime").JSX.Element;
|
|
9
9
|
export {};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { useTranslation } from '../hooks/use-translation';
|
|
2
3
|
import { TruncateWithTooltip } from '../truncate-with-tooltip';
|
|
3
4
|
import { TOOLTIP_PLACEMENT_TYPES } from '../tooltip';
|
|
4
5
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
@@ -9,14 +10,15 @@ export default function TooltipCell({
|
|
|
9
10
|
value,
|
|
10
11
|
testId = 'tooltip-cell'
|
|
11
12
|
}) {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
}
|
|
13
|
+
const {
|
|
14
|
+
t
|
|
15
|
+
} = useTranslation();
|
|
16
|
+
const valueText = value == null || value === '' ? t('N/A') : value;
|
|
15
17
|
return /*#__PURE__*/_jsx(TruncateWithTooltip, {
|
|
16
18
|
tooltipPlacement: TOOLTIP_PLACEMENT_TYPES.TOP,
|
|
17
19
|
children: /*#__PURE__*/_jsx("span", {
|
|
18
20
|
"test-id": testId,
|
|
19
|
-
children:
|
|
21
|
+
children: valueText
|
|
20
22
|
})
|
|
21
23
|
});
|
|
22
24
|
}
|
package/js/bundle/bundle.js
CHANGED
|
@@ -80486,8 +80486,10 @@ Table.displayName = 'Table';
|
|
|
80486
80486
|
/* harmony export */ });
|
|
80487
80487
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! react */ "react");
|
|
80488
80488
|
/* harmony import */ var react__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(react__WEBPACK_IMPORTED_MODULE_0__);
|
|
80489
|
-
/* harmony import */ var
|
|
80490
|
-
/* harmony import */ var
|
|
80489
|
+
/* harmony import */ var _hooks_use_translation__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../hooks/use-translation */ "./src/components/hooks/use-translation/index.ts");
|
|
80490
|
+
/* harmony import */ var _truncate_with_tooltip__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../truncate-with-tooltip */ "./src/components/truncate-with-tooltip/index.ts");
|
|
80491
|
+
/* harmony import */ var _tooltip__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../tooltip */ "./src/components/tooltip/index.ts");
|
|
80492
|
+
|
|
80491
80493
|
|
|
80492
80494
|
|
|
80493
80495
|
|
|
@@ -80498,14 +80500,14 @@ function TooltipCell(_ref) {
|
|
|
80498
80500
|
var value = _ref.value,
|
|
80499
80501
|
_ref$testId = _ref.testId,
|
|
80500
80502
|
testId = _ref$testId === void 0 ? 'tooltip-cell' : _ref$testId;
|
|
80501
|
-
|
|
80502
|
-
|
|
80503
|
-
|
|
80504
|
-
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(
|
|
80505
|
-
tooltipPlacement:
|
|
80503
|
+
var _useTranslation = (0,_hooks_use_translation__WEBPACK_IMPORTED_MODULE_1__.useTranslation)(),
|
|
80504
|
+
t = _useTranslation.t;
|
|
80505
|
+
var valueText = value == null || value === '' ? t('N/A') : value;
|
|
80506
|
+
return /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement(_truncate_with_tooltip__WEBPACK_IMPORTED_MODULE_2__.TruncateWithTooltip, {
|
|
80507
|
+
tooltipPlacement: _tooltip__WEBPACK_IMPORTED_MODULE_3__.TOOLTIP_PLACEMENT_TYPES.TOP
|
|
80506
80508
|
}, /*#__PURE__*/react__WEBPACK_IMPORTED_MODULE_0___default().createElement("span", {
|
|
80507
80509
|
"test-id": testId
|
|
80508
|
-
},
|
|
80510
|
+
}, valueText));
|
|
80509
80511
|
}
|
|
80510
80512
|
|
|
80511
80513
|
/***/ }),
|