@antscorp/antsomi-ui 1.3.5-beta.417 → 1.3.5-beta.418

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.
@@ -1 +1 @@
1
- export { ImageEditor, ImageResizeHandle } from './ImageEditor';
1
+ export { ImageEditor, type ImageResizeHandle } from './ImageEditor';
@@ -55,11 +55,15 @@ export const Table = memo(() => {
55
55
  setState(prev => {
56
56
  var _a;
57
57
  return (Object.assign(Object.assign({}, prev), { columns: (_a = tableProps.columns) === null || _a === void 0 ? void 0 : _a.map((col, index) => {
58
- var _a, _b;
59
- return (Object.assign(Object.assign({}, col), { width: index === (((_a = tableProps.columns) === null || _a === void 0 ? void 0 : _a.length) || 1) - 1
60
- ? calculateLastColWidth(col)
61
- : (columnWidths === null || columnWidths === void 0 ? void 0 : columnWidths[index]) ||
62
- ((_b = col.width) !== null && _b !== void 0 ? _b : (DEFAULT_COLUMN_WIDTHS[index] || DEFAULT_COLUMN_WIDTH)) }));
58
+ var _a;
59
+ return (Object.assign(Object.assign({}, col), {
60
+ // width:
61
+ // index === (tableProps.columns?.length || 1) - 1
62
+ // ? calculateLastColWidth(col)
63
+ // : columnWidths?.[index] ||
64
+ // (col.width ?? (DEFAULT_COLUMN_WIDTHS[index] || DEFAULT_COLUMN_WIDTH)),
65
+ width: (columnWidths === null || columnWidths === void 0 ? void 0 : columnWidths[index]) ||
66
+ ((_a = col.width) !== null && _a !== void 0 ? _a : (DEFAULT_COLUMN_WIDTHS[index] || DEFAULT_COLUMN_WIDTH)) }));
63
67
  }) }));
64
68
  });
65
69
  }
@@ -68,7 +72,8 @@ export const Table = memo(() => {
68
72
  tableRef.current = ref === null || ref === void 0 ? void 0 : ref.nativeElement;
69
73
  }, scroll: Object.assign(Object.assign({}, scroll), { y: (scroll === null || scroll === void 0 ? void 0 : scroll.y) || '500px', x: (scroll === null || scroll === void 0 ? void 0 : scroll.x) || '100%' }), components: {
70
74
  header: Object.assign({ cell: ResizableCell }, (_b = tableProps === null || tableProps === void 0 ? void 0 : tableProps.components) === null || _b === void 0 ? void 0 : _b.header),
71
- } }, (!!(tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource) && {
75
+ } }, (!!(tableProps === null || tableProps === void 0 ? void 0 : tableProps.dataSource) &&
76
+ !!(tableProps === null || tableProps === void 0 ? void 0 : tableProps.rowSelection) && {
72
77
  rowSelection: Object.assign(Object.assign({ fixed: true, columnWidth: DEFAULT_ROW_SELECTION_WIDTH }, tableProps === null || tableProps === void 0 ? void 0 : tableProps.rowSelection), { onChange(selectedRowKeys, selectedRows, info) {
73
78
  var _a, _b;
74
79
  setTable({
@@ -82,11 +87,6 @@ export const Table = memo(() => {
82
87
  fixed: column.fixed,
83
88
  width: column.width,
84
89
  index,
85
- // handleProps: {
86
- // style: {
87
- // height: tableRef?.current?.clientHeight,
88
- // },
89
- // },
90
90
  onResize: onResize(index),
91
91
  onResizeStop: onResizeStop(index),
92
92
  }) }))), bordered: true, pagination: false, loading: {
@@ -250,19 +250,19 @@ export function useDataTableListing(props) {
250
250
  return Object.assign(Object.assign({ key: name, dataIndex: name, title: label, fixed: fixColumn ? 'left' : undefined }, columns === null || columns === void 0 ? void 0 : columns[name]), { render(value, record, index) {
251
251
  var _a;
252
252
  const { link } = (columns === null || columns === void 0 ? void 0 : columns[name]) || {};
253
- const renderComponent = (React.createElement(Text, { ellipsis: { tooltip: true }, style: Object.assign({}, (link
253
+ const RenderComponent = (React.createElement(Text, { ellipsis: { tooltip: true }, style: Object.assign({}, (link
254
254
  ? {
255
255
  fontWeight: globalToken === null || globalToken === void 0 ? void 0 : globalToken.fontWeightStrong,
256
256
  color: globalToken === null || globalToken === void 0 ? void 0 : globalToken.colorPrimary,
257
257
  }
258
258
  : {})) }, typeof value !== 'object' ? value || DEFAULT_CELL_EMPTY : DEFAULT_CELL_EMPTY));
259
259
  if ((_a = columns === null || columns === void 0 ? void 0 : columns[name]) === null || _a === void 0 ? void 0 : _a.render) {
260
- return columns[name].render(value, record, index, renderComponent);
260
+ return columns[name].render(value, record, index, RenderComponent);
261
261
  }
262
262
  if (link) {
263
- return (React.createElement(Link, { to: typeof link === 'function' ? link(record) : link }, renderComponent));
263
+ return (React.createElement(Link, { to: typeof link === 'function' ? link(record) : link }, RenderComponent));
264
264
  }
265
- return renderComponent;
265
+ return RenderComponent;
266
266
  } });
267
267
  })) || []);
268
268
  return data;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.417",
3
+ "version": "1.3.5-beta.418",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",