@oliasoft-open-source/react-ui-library 2.4.7 → 2.4.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.
package/package.json
CHANGED
|
@@ -76,44 +76,46 @@ const LinkCell = (props) => {
|
|
|
76
76
|
const { cell, testId } = props;
|
|
77
77
|
const { error, warning, tooltip, maxTooltipWidth } = cell;
|
|
78
78
|
return (
|
|
79
|
-
<
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
<div
|
|
93
|
-
className={cx(
|
|
94
|
-
styles.staticCell,
|
|
95
|
-
error ? styles.error : warning ? styles.warning : '',
|
|
96
|
-
)}
|
|
79
|
+
<div className={styles.inputWrapper}>
|
|
80
|
+
<Tooltip
|
|
81
|
+
error={!!error}
|
|
82
|
+
warning={!!warning}
|
|
83
|
+
text={tooltip || error || warning}
|
|
84
|
+
enabled={
|
|
85
|
+
(tooltip && isStringNumberOrNode(tooltip)) ||
|
|
86
|
+
(error && isStringNumberOrNode(error)) ||
|
|
87
|
+
(warning && isStringNumberOrNode(warning)) ||
|
|
88
|
+
false
|
|
89
|
+
}
|
|
90
|
+
maxWidth={maxTooltipWidth}
|
|
91
|
+
placement="bottom-center"
|
|
97
92
|
>
|
|
98
|
-
|
|
99
|
-
<a
|
|
93
|
+
<div
|
|
100
94
|
className={cx(
|
|
101
|
-
|
|
95
|
+
styles.staticCellContent,
|
|
96
|
+
error ? styles.error : warning ? styles.warning : '',
|
|
102
97
|
)}
|
|
103
|
-
onClick={
|
|
104
|
-
cell.disabled || disabledContext
|
|
105
|
-
? () => {}
|
|
106
|
-
: (evt) => {
|
|
107
|
-
evt.stopPropagation();
|
|
108
|
-
cell.onClick(evt);
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
data-testid={testId}
|
|
112
98
|
>
|
|
113
|
-
{
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
99
|
+
{/* eslint-disable-next-line jsx-a11y/anchor-is-valid */}
|
|
100
|
+
<a
|
|
101
|
+
className={cx(
|
|
102
|
+
(cell.disabled || disabledContext) && styles.disabledLink,
|
|
103
|
+
)}
|
|
104
|
+
onClick={
|
|
105
|
+
cell.disabled || disabledContext
|
|
106
|
+
? () => {}
|
|
107
|
+
: (evt) => {
|
|
108
|
+
evt.stopPropagation();
|
|
109
|
+
cell.onClick(evt);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
data-testid={testId}
|
|
113
|
+
>
|
|
114
|
+
{cell.value}
|
|
115
|
+
</a>
|
|
116
|
+
</div>
|
|
117
|
+
</Tooltip>
|
|
118
|
+
</div>
|
|
117
119
|
);
|
|
118
120
|
};
|
|
119
121
|
|
|
@@ -366,7 +368,9 @@ export const Cell = (props) => {
|
|
|
366
368
|
cell.type === 'CheckBox' ? styles.checkBoxCell : '',
|
|
367
369
|
cell.type === 'Actions' ? styles.actionsCell : '',
|
|
368
370
|
cell.type === 'Icon' ? styles.iconCell : '',
|
|
369
|
-
cell.type === 'Static' ||
|
|
371
|
+
cell.type === 'Static' || cell.type === 'Link' || !cell.type
|
|
372
|
+
? styles.staticCell
|
|
373
|
+
: '',
|
|
370
374
|
cell.hasSort ? styles.sortingCell : null,
|
|
371
375
|
cellAlignmentStyle,
|
|
372
376
|
cell.breakWord ? styles.breakWord : '',
|