@antscorp/antsomi-ui 1.3.5-beta.523 → 1.3.5-beta.526

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.
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { IconProps } from './type';
3
+ export declare const ExpandLessIcon: React.ForwardRefExoticComponent<IconProps & React.RefAttributes<SVGSVGElement>>;
@@ -0,0 +1,8 @@
1
+ import React, { forwardRef } from 'react';
2
+ import { useIcon } from './hooks/useIcon';
3
+ export const ExpandLessIcon = forwardRef((props, ref) => {
4
+ const { width, height } = useIcon(props);
5
+ return (React.createElement("svg", Object.assign({ viewBox: "0 0 24 24", fill: "currentColor", xmlns: "http://www.w3.org/2000/svg" }, props, { ref: ref, height: height, width: width }),
6
+ React.createElement("path", { d: "M0 0h24v24H0V0z", fill: "none" }),
7
+ React.createElement("path", { d: "M12 8l-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14l-6-6z" })));
8
+ });
@@ -56,3 +56,4 @@ export { LocalMallIcon } from './LocalMallIcon';
56
56
  export { LoadingIcon } from './LoadingIcon';
57
57
  export { DataIcon } from './DataIcon';
58
58
  export { TableIcon } from './TableIcon';
59
+ export { ExpandLessIcon } from './ExpandLessIcon';
@@ -56,3 +56,4 @@ export { LocalMallIcon } from './LocalMallIcon';
56
56
  export { LoadingIcon } from './LoadingIcon';
57
57
  export { DataIcon } from './DataIcon';
58
58
  export { TableIcon } from './TableIcon';
59
+ export { ExpandLessIcon } from './ExpandLessIcon';
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ import React, { ReactNode } from 'react';
2
2
  import { FlexProps } from 'antd/lib';
3
3
  export type TChangePageSizePayload = {
4
4
  pageSize: number;
@@ -8,6 +8,7 @@ export interface PaginationProps extends Omit<FlexProps, 'children' | 'onChange'
8
8
  page?: number;
9
9
  pageSize?: number;
10
10
  total?: number;
11
+ extraContent?: ReactNode;
11
12
  onChange?: (payload: TChangePageSizePayload) => void;
12
13
  }
13
14
  export declare const Pagination: React.FC<PaginationProps>;
@@ -25,7 +25,7 @@ import { DEFAULT_PAGE, DEFAULT_PAGE_SIZE, PAGE_SIZE_OPTIONS } from '../../consta
25
25
  const { Text } = Typography;
26
26
  export const Pagination = props => {
27
27
  // Props
28
- const { pageSize = DEFAULT_PAGE_SIZE, page = DEFAULT_PAGE, total = 0, onChange } = props, restProps = __rest(props, ["pageSize", "page", "total", "onChange"]);
28
+ const { pageSize = DEFAULT_PAGE_SIZE, page = DEFAULT_PAGE, total = 0, extraContent, onChange } = props, restProps = __rest(props, ["pageSize", "page", "total", "extraContent", "onChange"]);
29
29
  // Instance
30
30
  const { t } = i18nInstance;
31
31
  // Memo
@@ -40,20 +40,22 @@ export const Pagination = props => {
40
40
  pageSize }, payload));
41
41
  }
42
42
  };
43
- return (React.createElement(PaginationWrapper, Object.assign({ align: "center", gap: 10 }, restProps),
44
- React.createElement(Flex, { align: "center", gap: 10 },
45
- React.createElement(Text, null,
46
- t(translations.pagination.showRow).toString(),
47
- ":"),
48
- React.createElement(Select, { defaultValue: DEFAULT_PAGE_SIZE, value: pageSize, className: "show-row-select", options: paginationSizeOptions, popupMatchSelectWidth: 70, onChange: value => onChangePagination({ pageSize: value, page: 1 }) })),
49
- React.createElement(Text, null, `${total ? page * pageSize - pageSize + 1 : 0} - ${Math.min(page * pageSize, total)} of ${total}`),
50
- React.createElement(Flex, { align: "center", gap: 10 },
51
- React.createElement(ActionButton, { onClick: () => onChangePagination({ page: 1 }), disabled: disabledPrevious },
52
- React.createElement(Icon, { type: "icon-ants-first-page", size: 12 })),
53
- React.createElement(ActionButton, { disabled: disabledPrevious, onClick: () => onChangePagination({ page: page - 1 }) },
54
- React.createElement(Icon, { type: "icon-ants-angle-left", size: 12 })),
55
- React.createElement(ActionButton, { disabled: disabledNext, onClick: () => onChangePagination({ page: page + 1 }) },
56
- React.createElement(Icon, { type: "icon-ants-angle-right", size: 12 })),
57
- React.createElement(ActionButton, { onClick: () => onChangePagination({ page: Math.ceil(total / pageSize) }), disabled: disabledNext },
58
- React.createElement(Icon, { type: "icon-ants-last-page", size: 12 })))));
43
+ return (React.createElement(PaginationWrapper, Object.assign({ align: "center", justify: extraContent ? 'space-between' : 'flex-end', gap: 10 }, restProps),
44
+ extraContent,
45
+ React.createElement(Flex, { align: "center", gap: 10, style: { flexShrink: 0, height: 'fit-content', alignSelf: 'flex-end' } },
46
+ React.createElement(Flex, { align: "center", gap: 10 },
47
+ React.createElement(Text, null,
48
+ t(translations.pagination.showRow).toString(),
49
+ ":"),
50
+ React.createElement(Select, { defaultValue: DEFAULT_PAGE_SIZE, value: pageSize, className: "show-row-select", options: paginationSizeOptions, popupMatchSelectWidth: 70, onChange: value => onChangePagination({ pageSize: value, page: 1 }) })),
51
+ React.createElement(Text, null, `${total ? page * pageSize - pageSize + 1 : 0} - ${Math.min(page * pageSize, total)} of ${total}`),
52
+ React.createElement(Flex, { align: "center", gap: 10 },
53
+ React.createElement(ActionButton, { onClick: () => onChangePagination({ page: 1 }), disabled: disabledPrevious },
54
+ React.createElement(Icon, { type: "icon-ants-first-page", size: 12 })),
55
+ React.createElement(ActionButton, { disabled: disabledPrevious, onClick: () => onChangePagination({ page: page - 1 }) },
56
+ React.createElement(Icon, { type: "icon-ants-angle-left", size: 12 })),
57
+ React.createElement(ActionButton, { disabled: disabledNext, onClick: () => onChangePagination({ page: page + 1 }) },
58
+ React.createElement(Icon, { type: "icon-ants-angle-right", size: 12 })),
59
+ React.createElement(ActionButton, { onClick: () => onChangePagination({ page: Math.ceil(total / pageSize) }), disabled: disabledNext },
60
+ React.createElement(Icon, { type: "icon-ants-last-page", size: 12 }))))));
59
61
  };
@@ -5,7 +5,8 @@ import { Flex } from '@antscorp/antsomi-ui/es/components/atoms';
5
5
  // Constants
6
6
  import { globalToken } from '@antscorp/antsomi-ui/es/constants';
7
7
  export const PaginationWrapper = styled(Flex) `
8
- height: 60px;
8
+ flex-shrink: 0;
9
+ min-height: 40px;
9
10
 
10
11
  .show-row-select {
11
12
  width: 50px;
@@ -37,7 +37,7 @@ export const ResizableCell = props => {
37
37
  var _a, _b;
38
38
  (_b = (_a = tableRef === null || tableRef === void 0 ? void 0 : tableRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll('.antsomi-table-row')) === null || _b === void 0 ? void 0 : _b.forEach(rowEl => {
39
39
  var _a;
40
- const cell = (_a = rowEl.querySelectorAll(`.antsomi-table-cell:not(.antsomi-table-selection-column)`)) === null || _a === void 0 ? void 0 : _a[index !== null && index !== void 0 ? index : 0];
40
+ const cell = (_a = rowEl.querySelectorAll(`.antsomi-table-cell:not(.antsomi-table-selection-column):not(.antsomi-table-row-expand-icon-cell)`)) === null || _a === void 0 ? void 0 : _a[index !== null && index !== void 0 ? index : 0];
41
41
  if (cell) {
42
42
  if (type === 'add') {
43
43
  return cell.setAttribute('aria-resizable', 'true');
@@ -55,7 +55,7 @@ export const ResizableCell = props => {
55
55
  // Update the state with the new width
56
56
  setWidth(size.width);
57
57
  // Select all column elements within the table body colgroup
58
- const resizeColEls = (_a = tableRef === null || tableRef === void 0 ? void 0 : tableRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll(`.antsomi-table-body colgroup > col:not(.antsomi-table-selection-col)`);
58
+ const resizeColEls = (_a = tableRef === null || tableRef === void 0 ? void 0 : tableRef.current) === null || _a === void 0 ? void 0 : _a.querySelectorAll(`.antsomi-table-body colgroup > col:not(.antsomi-table-selection-col):not(.antsomi-table-expand-icon-col)`);
59
59
  // Select the specific column element to resize
60
60
  const resizeColEl = resizeColEls === null || resizeColEls === void 0 ? void 0 : resizeColEls[index !== null && index !== void 0 ? index : 0];
61
61
  // If the column element exists, update its width style
@@ -69,6 +69,30 @@ export const StyledTable = styled(Table) `
69
69
  .antsomi-table-cell[aria-resizable='true'] {
70
70
  border-inline-end: 2px solid ${blue1} !important;
71
71
  }
72
+
73
+ .antsomi-table-cell {
74
+ overflow: hidden;
75
+ }
76
+ }
77
+
78
+ .antsomi-table-expanded-row-fixed {
79
+ padding: 15px;
80
+
81
+ &::after {
82
+ display: none;
83
+ }
84
+ }
85
+
86
+ .antsomi-table-container {
87
+ &::after {
88
+ box-shadow: none !important;
89
+ }
90
+ }
91
+
92
+ .antsomi-table-cell-fix-left {
93
+ &::after {
94
+ box-shadow: none !important;
95
+ }
72
96
  }
73
97
  }
74
98
 
@@ -17,7 +17,7 @@ export const DATA_TABLE_THEME = {
17
17
  cellPaddingBlock: 10,
18
18
  cellPaddingInline: 10,
19
19
  borderColor: '#E5E5E5',
20
- rowHoverBg: '#DEEFFE',
20
+ rowHoverBg: '#F2F9FF',
21
21
  borderRadius: 0,
22
22
  headerBorderRadius: 0,
23
23
  rowSelectedBg: '#DEEFFE',
@@ -73,7 +73,11 @@ export interface UseDataTableListingProps<TTableType = any, TSearchType = any> {
73
73
  getSearchListing?: TGetSearchListing['options'];
74
74
  };
75
75
  table?: Omit<TableProps<TTableType>, 'columns'> & {
76
+ /** Main key for map ids */
76
77
  mainColumnKey: keyof TTableType;
78
+ /** Expand column key for show icon expand row */
79
+ expandColumnKey?: keyof TTableType;
80
+ /** columns?: Partial<Record<keyof TTableType, ColumnType<TTableType>>>; */
77
81
  columns?: {
78
82
  [K in keyof TTableType | 'toggle']?: TTableColumnType<TTableType, K>;
79
83
  };
@@ -48,6 +48,7 @@ type TState<TTableType = any> = {
48
48
  searchValue?: string;
49
49
  sorter?: SorterResult<TTableType>;
50
50
  selectedFilterItem?: FilterItem;
51
+ expandedRowKeys?: React.Key[];
51
52
  };
52
53
  export declare function useDataTableListing<TTableType = Record<string, any>, TSearchType = any>(props: UseDataTableListingProps<TTableType, TSearchType>): TUseDataTableListing<TTableType>;
53
54
  export {};
@@ -21,7 +21,7 @@ var __rest = (this && this.__rest) || function (s, e) {
21
21
  // Libraries
22
22
  import React, { useCallback, useMemo, useState } from 'react';
23
23
  import { Link } from 'react-router-dom';
24
- import { flatMap, isEmpty, pick } from 'lodash';
24
+ import { flatMap, isEmpty, pick, xor } from 'lodash';
25
25
  import { useQueryClient } from '@tanstack/react-query';
26
26
  // Types
27
27
  import { useAppConfigContext } from '@antscorp/antsomi-ui/es/providers';
@@ -38,6 +38,7 @@ import { useCreateModifyColumn, useDeleteModifyColumn, useDeleteSavedFilter, use
38
38
  import { flatTree, mapResponseSearchToGeneral, parseJSONFromLocalStorage, } from '@antscorp/antsomi-ui/es/utils';
39
39
  import { METRIC_MAP_NUMBER_TYPE } from '../../constants/filter';
40
40
  import { mapFiltersToApiFilters, mapFiltersToRules, mapRulesToFilters } from '../../utils';
41
+ import { ExpandLessIcon } from '@antscorp/antsomi-ui/es/components/icons';
41
42
  const { Text } = Typography;
42
43
  const { MATCHES, MATCHES_ANY, NOT_MATCHES } = OPERATORS_CODE;
43
44
  const initialState = {
@@ -60,6 +61,7 @@ const initialState = {
60
61
  searchValue: '',
61
62
  sorter: {},
62
63
  selectedFilterItem: undefined,
64
+ expandedRowKeys: [],
63
65
  };
64
66
  export function useDataTableListing(props) {
65
67
  var _a, _b, _c;
@@ -77,9 +79,9 @@ export function useDataTableListing(props) {
77
79
  const _e = apiFilter || {}, { url: filterUrl = `${COLUMN_DOMAIN[env || 'development']}/api/filter`, enabled: enabledApiFilter = true } = _e, restOfApiFilterRequest = __rest(_e, ["url", "enabled"]);
78
80
  const _f = apiListing || {}, { url: listingUrl = '', enabled: enabledApiListing = true } = _f, restOfApiListingRequest = __rest(_f, ["url", "enabled"]);
79
81
  const _g = apiSearch || {}, { url: searchUrl = '', enabled: enabledApiSearch = true } = _g, restOfApiSearchRequest = __rest(_g, ["url", "enabled"]);
80
- const { filters, selectedFilterId, pagination, selectedRowKeys, searchValue, table, sorter, selectedRow, selectedFilterItem, } = state;
82
+ const { filters, selectedFilterId, pagination, selectedRowKeys, searchValue, table, sorter, selectedRow, selectedFilterItem, expandedRowKeys, } = state;
81
83
  const { externalFilters, includeDataType = false, matchesAny, formatFilterValue, } = filterProps || {};
82
- const { sortDirectionKey = 'az', mainColumnKey } = tableProps || {};
84
+ const { sortDirectionKey = 'az', mainColumnKey, expandColumnKey, expandable } = tableProps || {};
83
85
  const modifyColumnAuth = Object.assign(Object.assign({}, auth), { url: columnUrl });
84
86
  const filterAuth = Object.assign(Object.assign({}, auth), { url: filterUrl });
85
87
  const listingAuth = Object.assign(Object.assign({}, auth), { url: listingUrl });
@@ -285,6 +287,34 @@ export function useDataTableListing(props) {
285
287
  name: filterName,
286
288
  removable: true,
287
289
  }))) || []), [savedFiltersData]);
290
+ const renderColumnWithExpandIcon = useCallback((children, // The content of the column
291
+ headerCol, // The header configuration for the column
292
+ record) => {
293
+ const { name } = headerCol || {}; // Destructure the name from the headerCol, with a fallback to an empty object
294
+ if (expandColumnKey === name) {
295
+ // Check if the current column is the expand column
296
+ const expanded = expandedRowKeys === null || expandedRowKeys === void 0 ? void 0 : expandedRowKeys.includes(
297
+ // Check if the current row is expanded
298
+ (record === null || record === void 0 ? void 0 : record[mainColumnKey]) || '');
299
+ return (React.createElement(Flex, { align: "center", gap: 4 },
300
+ React.createElement(ExpandLessIcon, { size: 20, style: {
301
+ flexShrink: 0,
302
+ color: globalToken === null || globalToken === void 0 ? void 0 : globalToken.bw8,
303
+ transform: `rotate(${expanded ? 0 : 180}deg)`,
304
+ cursor: 'pointer',
305
+ transition: 'transform 0.3s ease',
306
+ }, onClick: () => {
307
+ if (expandable && expandable.onExpand) {
308
+ expandable.onExpand(!expanded, record);
309
+ }
310
+ setState(prev => (Object.assign(Object.assign({}, prev), { expandedRowKeys: xor(expandedRowKeys, [
311
+ record[mainColumnKey],
312
+ ]) })));
313
+ } }),
314
+ children));
315
+ }
316
+ return children;
317
+ }, [expandColumnKey, expandable, expandedRowKeys, mainColumnKey]);
288
318
  const tableColumns = useDeepCompareMemo(() => {
289
319
  let data = [];
290
320
  const { columns } = tableProps || {};
@@ -318,16 +348,16 @@ export function useDataTableListing(props) {
318
348
  }
319
349
  : {})) }, typeof value !== 'object' ? value || DEFAULT_CELL_EMPTY : DEFAULT_CELL_EMPTY));
320
350
  if ((_a = columns === null || columns === void 0 ? void 0 : columns[name]) === null || _a === void 0 ? void 0 : _a.render) {
321
- return columns[name].render(value, record, index, RenderComponent);
351
+ return renderColumnWithExpandIcon(columns[name].render(value, record, index, RenderComponent), headerCol, record);
322
352
  }
323
353
  if (link) {
324
- return (React.createElement(Link, { to: typeof link === 'function' ? link(record) : link }, RenderComponent));
354
+ return renderColumnWithExpandIcon(React.createElement(Link, { to: typeof link === 'function' ? link(record) : link }, RenderComponent), headerCol, record);
325
355
  }
326
- return RenderComponent;
356
+ return renderColumnWithExpandIcon(RenderComponent, headerCol, record);
327
357
  } });
328
358
  })) || []);
329
359
  return data;
330
- }, [tableHeader, tableProps, sorter]);
360
+ }, [tableProps, tableHeader, sorter === null || sorter === void 0 ? void 0 : sorter.columnKey, sorter === null || sorter === void 0 ? void 0 : sorter.order, renderColumnWithExpandIcon]);
331
361
  const tableData = useDeepCompareMemo(() => ((Array === null || Array === void 0 ? void 0 : Array.isArray(tableBody)) &&
332
362
  (tableBody === null || tableBody === void 0 ? void 0 : tableBody.map((row) => (Object.assign(Object.assign({}, row), { key: row === null || row === void 0 ? void 0 : row[tableProps === null || tableProps === void 0 ? void 0 : tableProps.mainColumnKey] }))))) ||
333
363
  [], [tableBody]);
@@ -580,23 +610,15 @@ export function useDataTableListing(props) {
580
610
  /* Pagination */
581
611
  pagination: Object.assign(Object.assign({}, pagination), { total, onChange: onChangePagination }),
582
612
  /* Table */
583
- table: {
584
- loading: isTableListingLoading || isTableListingRefetching,
585
- columns: tableColumns,
586
- dataSource: tableData,
587
- columnWidths: table.columnWidths || {},
588
- rowSelection: {
613
+ table: Object.assign(Object.assign({}, tableProps), { loading: isTableListingLoading || isTableListingRefetching, columns: tableColumns, dataSource: tableData, columnWidths: table.columnWidths || {}, expandable: Object.assign({ showExpandColumn: false, expandedRowKeys: expandedRowKeys || [] }, tableProps === null || tableProps === void 0 ? void 0 : tableProps.expandable), rowSelection: {
589
614
  selectedRowKeys: selectedRow.keys || [],
590
615
  onChange: onChangeSelectedRow,
591
- },
592
- onChange: onChangeTable,
593
- onColumnResize(data) {
616
+ }, onChange: onChangeTable, onColumnResize(data) {
594
617
  const { index, width } = data;
595
618
  handleUpdateTable({
596
619
  columnWidths: Object.assign(Object.assign({}, table.columnWidths), { [index]: width }),
597
620
  });
598
- },
599
- },
621
+ } }),
600
622
  /* Selected row */
601
623
  selectedRowKeys,
602
624
  selectedRow,
@@ -9,11 +9,6 @@ export const DataTableWrapper = styled.div `
9
9
  position: relative;
10
10
  width: 100%;
11
11
  height: 100%;
12
-
13
- #data-table-pagination {
14
- margin-top: 5px;
15
- justify-content: flex-end;
16
- }
17
12
  `;
18
13
  export const IconButton = styled.div `
19
14
  width: 20px;
@@ -244,5 +244,23 @@ THEME.components = {
244
244
  Form: {
245
245
  itemMarginBottom: 15,
246
246
  },
247
+ Table: {
248
+ headerBg: '#F9F9F9',
249
+ headerSortActiveBg: '#F9F9F9',
250
+ headerSortHoverBg: '#F9F9F9',
251
+ headerFilterHoverBg: '#F9F9F9',
252
+ fixedHeaderSortActiveBg: '#F9F9F9',
253
+ bodySortBg: '#ffffff',
254
+ fontWeightStrong: 700,
255
+ cellPaddingBlock: 10,
256
+ cellPaddingInline: 10,
257
+ borderColor: '#E5E5E5',
258
+ rowHoverBg: '#F2F9FF',
259
+ borderRadius: 0,
260
+ headerBorderRadius: 0,
261
+ rowSelectedBg: '#DEEFFE',
262
+ rowSelectedHoverBg: '#F2F9FF',
263
+ rowExpandedBg: '#F9F9F9',
264
+ },
247
265
  };
248
266
  export const globalToken = theme.getDesignToken(THEME);
@@ -10,6 +10,7 @@ export type DataTableHeaderItem = {
10
10
  label: string;
11
11
  name: string;
12
12
  sortable: boolean;
13
+ isSort?: string;
13
14
  type: number;
14
15
  };
15
16
  export type DataTableColumnDefItem = {
@@ -118,6 +118,10 @@ export const DataTableTest = () => {
118
118
  // },
119
119
  // },
120
120
  },
121
+ table: {
122
+ mainColumnKey: 'survey_id',
123
+ expandColumnKey: 'survey_name',
124
+ },
121
125
  });
122
126
  return (React.createElement(BrowserRouter, null,
123
127
  React.createElement(TableTestWrapper, null,
@@ -1,5 +1,6 @@
1
1
  import { DataTableColumnDefItem, DataTableHeaderItem } from '../models/DataTable/DataTableListing';
2
2
  export declare const mapColumnDefItemToGeneral: (columnDefItem: DataTableColumnDefItem) => DataTableHeaderItem;
3
+ export declare const mapColumnToGeneral: ({ sortable, isSort, ...restOfColumn }: DataTableHeaderItem) => DataTableHeaderItem;
3
4
  export declare const mapResponseListingToGeneral: (response: Record<string, any>) => {
4
5
  body: any;
5
6
  header: any;
@@ -1,3 +1,14 @@
1
+ var __rest = (this && this.__rest) || function (s, e) {
2
+ var t = {};
3
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
4
+ t[p] = s[p];
5
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
6
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
7
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
8
+ t[p[i]] = s[p[i]];
9
+ }
10
+ return t;
11
+ };
1
12
  export const mapColumnDefItemToGeneral = (columnDefItem) => ({
2
13
  editable: false,
3
14
  fixColumn: false,
@@ -6,13 +17,19 @@ export const mapColumnDefItemToGeneral = (columnDefItem) => ({
6
17
  sortable: !!parseInt(columnDefItem.enableSorting),
7
18
  type: parseInt(columnDefItem.type),
8
19
  });
20
+ export const mapColumnToGeneral = (_a) => {
21
+ var { sortable, isSort } = _a, restOfColumn = __rest(_a, ["sortable", "isSort"]);
22
+ return (Object.assign(Object.assign({}, restOfColumn), {
23
+ /** Convert isSort to boolean */
24
+ sortable: isSort === '1' ? true : sortable }));
25
+ };
9
26
  // NOTES: Improve typescript
10
27
  export const mapResponseListingToGeneral = (response) => {
11
28
  const { body, header, total, entries, column_defs, rows, total_records } = response || {};
12
29
  return {
13
30
  body: body || entries || rows || [],
14
- header: header ||
15
- column_defs.map(columnDefItem => mapColumnDefItemToGeneral(columnDefItem || {})) ||
31
+ header: (header === null || header === void 0 ? void 0 : header.map(col => mapColumnToGeneral(col || {}))) ||
32
+ (column_defs === null || column_defs === void 0 ? void 0 : column_defs.map(columnDefItem => mapColumnDefItemToGeneral(columnDefItem || {}))) ||
16
33
  [],
17
34
  total: total || total_records || 0,
18
35
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@antscorp/antsomi-ui",
3
- "version": "1.3.5-beta.523",
3
+ "version": "1.3.5-beta.526",
4
4
  "description": "An enterprise-class UI design language and React UI library.",
5
5
  "sideEffects": [
6
6
  "dist/*",