@true-engineering/true-react-common-ui-kit 3.27.1 → 3.28.1
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/README.md +19 -0
- package/dist/components/Description/Description.styles.d.ts +1 -1
- package/dist/components/FlexibleTable/FlexibleTable.d.ts +5 -5
- package/dist/components/FlexibleTable/FlexibleTable.stories.d.ts +2 -2
- package/dist/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.d.ts +4 -4
- package/dist/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.d.ts +7 -7
- package/dist/components/FlexibleTable/helpers.d.ts +2 -2
- package/dist/components/FlexibleTable/types.d.ts +10 -9
- package/dist/components/List/components/ListItem/ListItem.d.ts +1 -1
- package/dist/components/ScrollIntoViewIfNeeded/ScrollIntoViewIfNeeded.d.ts +2 -2
- package/dist/components/TextButton/TextButton.styles.d.ts +1 -1
- package/dist/helpers/misc.d.ts +2 -0
- package/dist/hooks/use-tweak-styles.d.ts +1 -1
- package/dist/true-react-common-ui-kit.js +16 -15
- package/dist/true-react-common-ui-kit.js.map +1 -1
- package/dist/true-react-common-ui-kit.umd.cjs +16 -15
- package/dist/true-react-common-ui-kit.umd.cjs.map +1 -1
- package/package.json +4 -4
- package/src/components/FlexibleTable/FlexibleTable.stories.tsx +3 -2
- package/src/components/FlexibleTable/FlexibleTable.tsx +23 -15
- package/src/components/FlexibleTable/components/FlexibleTableCell/FlexibleTableCell.tsx +25 -19
- package/src/components/FlexibleTable/components/FlexibleTableRow/FlexibleTableRow.tsx +16 -9
- package/src/components/FlexibleTable/helpers.ts +6 -3
- package/src/components/FlexibleTable/types.ts +14 -9
- package/src/components/List/List.tsx +10 -4
- package/src/components/List/components/ListItem/ListItem.tsx +1 -1
- package/src/helpers/misc.ts +2 -0
- package/src/hooks/use-tweak-styles.ts +1 -1
|
@@ -8255,9 +8255,12 @@
|
|
|
8255
8255
|
var classes = useStyles$S({
|
|
8256
8256
|
theme: tweakStyles
|
|
8257
8257
|
});
|
|
8258
|
-
var handleItemClick = function(event,
|
|
8259
|
-
|
|
8260
|
-
|
|
8258
|
+
var handleItemClick = function(event, param2) {
|
|
8259
|
+
var itemOnClick = param2.onClick;
|
|
8260
|
+
if (trueReactPlatformHelpers.isNotEmpty(itemOnClick)) {
|
|
8261
|
+
itemOnClick(event);
|
|
8262
|
+
onClick === null || onClick === void 0 ? void 0 : onClick(event);
|
|
8263
|
+
}
|
|
8261
8264
|
};
|
|
8262
8265
|
return /* @__PURE__ */ jsx("div", _object_spread_props$N(_object_spread$W({
|
|
8263
8266
|
className: classes.root
|
|
@@ -8286,7 +8289,8 @@
|
|
|
8286
8289
|
children: /* @__PURE__ */ jsx("div", {
|
|
8287
8290
|
className: classes.nestedItems,
|
|
8288
8291
|
children: /* @__PURE__ */ jsx(List, {
|
|
8289
|
-
items: item.nestedItems
|
|
8292
|
+
items: item.nestedItems,
|
|
8293
|
+
onClick
|
|
8290
8294
|
})
|
|
8291
8295
|
})
|
|
8292
8296
|
}) : /* @__PURE__ */ jsx(ListItem, _object_spread$W({}, itemProps))
|
|
@@ -26005,9 +26009,9 @@
|
|
|
26005
26009
|
var classes = useStyles$i({
|
|
26006
26010
|
theme: tweakStyles
|
|
26007
26011
|
});
|
|
26008
|
-
var _config_columnName;
|
|
26009
|
-
var _ref = (_config_columnName = config[columnName]) !== null && _config_columnName !== void 0 ? _config_columnName : {}, component = _ref.component, left2 = _ref.left, right2 = _ref.right, position = _ref.position, cellAlign = _ref.cellAlign, cellVerticalAlign = _ref.cellVerticalAlign, shouldRenderDataId = _ref.shouldRenderDataId;
|
|
26010
26012
|
var value = row[columnName];
|
|
26013
|
+
var _config_columnName;
|
|
26014
|
+
var _ref = (_config_columnName = config[columnName]) !== null && _config_columnName !== void 0 ? _config_columnName : {}, _ref_component = _ref.component, component = _ref_component === void 0 ? formatCellContent(value, config[columnName]) : _ref_component, left2 = _ref.left, right2 = _ref.right, position = _ref.position, cellAlign = _ref.cellAlign, cellVerticalAlign = _ref.cellVerticalAlign, shouldRenderDataId = _ref.shouldRenderDataId;
|
|
26011
26015
|
var TableCell = renderMode === "divs" ? "div" : "td";
|
|
26012
26016
|
var _obj2;
|
|
26013
26017
|
return /* @__PURE__ */ jsx(TableCell, _object_spread_props$j(_object_spread$k({
|
|
@@ -26025,12 +26029,10 @@
|
|
|
26025
26029
|
children: isLoading ? /* @__PURE__ */ jsx("div", {
|
|
26026
26030
|
className: classes.skeleton,
|
|
26027
26031
|
children: /* @__PURE__ */ jsx(Skeleton, {})
|
|
26028
|
-
}) : trueReactPlatformHelpers.isNotEmpty(value) &&
|
|
26029
|
-
|
|
26030
|
-
|
|
26031
|
-
|
|
26032
|
-
})) : formatCellContent(value, config[columnName])
|
|
26033
|
-
})
|
|
26032
|
+
}) : trueReactPlatformHelpers.isNotEmpty(value) && trueReactPlatformHelpers.applyAction(component, _object_spread_props$j(_object_spread$k({}, valueComponentProps), {
|
|
26033
|
+
value,
|
|
26034
|
+
row
|
|
26035
|
+
}))
|
|
26034
26036
|
}));
|
|
26035
26037
|
}
|
|
26036
26038
|
var useStyles$h = createThemedStyles("FlexibleTableRow", {
|
|
@@ -26491,7 +26493,6 @@
|
|
|
26491
26493
|
className: classes.headerRow,
|
|
26492
26494
|
children: columns.map(function(key, i) {
|
|
26493
26495
|
var itemConfig = config === null || config === void 0 ? void 0 : config[key];
|
|
26494
|
-
var TitleComponent = itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.titleComponent;
|
|
26495
26496
|
var _itemConfig_titleAlign, _itemConfig_title;
|
|
26496
26497
|
var _obj2;
|
|
26497
26498
|
return /* @__PURE__ */ jsx(TableHeader, _object_spread_props$h(_object_spread$i({
|
|
@@ -26508,9 +26509,9 @@
|
|
|
26508
26509
|
}, addDataAttributes({
|
|
26509
26510
|
id: (itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.shouldRenderDataId) ? key : void 0
|
|
26510
26511
|
})), {
|
|
26511
|
-
children: trueReactPlatformHelpers.
|
|
26512
|
+
children: trueReactPlatformHelpers.applyAction((_itemConfig_title = itemConfig === null || itemConfig === void 0 ? void 0 : itemConfig.title) !== null && _itemConfig_title !== void 0 ? _itemConfig_title : "", {
|
|
26512
26513
|
value: headerContent === null || headerContent === void 0 ? void 0 : headerContent[key]
|
|
26513
|
-
})
|
|
26514
|
+
})
|
|
26514
26515
|
}), key);
|
|
26515
26516
|
})
|
|
26516
26517
|
})
|