@pnkx-lib/ui 1.9.199 → 1.9.201

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,4 +1,4 @@
1
- import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { forwardRef } from 'react';
3
3
  import { g as get } from '../chunks/get-C880miVG.js';
4
4
  import { Input } from 'antd';
@@ -37,7 +37,7 @@ const Textarea = forwardRef(
37
37
  );
38
38
  };
39
39
  //! Render
40
- return /* @__PURE__ */ jsxs(Fragment, { children: [
40
+ return /* @__PURE__ */ jsxs("div", { children: [
41
41
  label && /* @__PURE__ */ jsx(Label, { label, required }),
42
42
  /* @__PURE__ */ jsx(
43
43
  TextArea,
package/es/ui/Heading.js CHANGED
@@ -14,7 +14,7 @@ const Heading = (props) => {
14
14
  "div",
15
15
  {
16
16
  className: className(
17
- "flex justify-between items-end",
17
+ `flex ${noBreadcum ? "justify-end" : "justify-between"} items-end`,
18
18
  classNameWrapHeading
19
19
  ),
20
20
  children: [
package/es/ui/index.js CHANGED
@@ -5050,6 +5050,8 @@ const Table = ({
5050
5050
  setFilters,
5051
5051
  noBreadcum,
5052
5052
  bulkActionHandlers,
5053
+ size = "small",
5054
+ ellipsisAllColumn = true,
5053
5055
  ...rest
5054
5056
  }) => {
5055
5057
  const status = filters?.status;
@@ -5076,6 +5078,10 @@ const Table = ({
5076
5078
  disabled: status === TypeStatusTable.ALL
5077
5079
  })
5078
5080
  };
5081
+ const ellipsisColumns = columns.map((column) => ({
5082
+ ...column,
5083
+ ellipsis: column?.ellipsis !== void 0 ? column?.ellipsis : ellipsisAllColumn
5084
+ }));
5079
5085
  const startIndex = (filters.page - 1) * filters.size;
5080
5086
  const columnsWithIndex = showIndexColumn ? [
5081
5087
  {
@@ -5086,8 +5092,8 @@ const Table = ({
5086
5092
  align: "center",
5087
5093
  render: (_, __, index) => startIndex + index + 1
5088
5094
  },
5089
- ...columns
5090
- ] : columns;
5095
+ ...ellipsisColumns
5096
+ ] : ellipsisColumns;
5091
5097
  //! Function
5092
5098
  useEffect(() => {
5093
5099
  setData(Array.isArray(dataSource) ? dataSource : []);
@@ -5140,7 +5146,8 @@ const Table = ({
5140
5146
  locale: {
5141
5147
  emptyText: /* @__PURE__ */ jsx(EmptyTable, {})
5142
5148
  },
5143
- rowClassName: (_, index) => `table-row-${index % 2 === 0 ? "even" : "odd"}`,
5149
+ size,
5150
+ scroll: { x: "max-content", y: 45 * 10 },
5144
5151
  ...rest
5145
5152
  }
5146
5153
  ),
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pnkx-lib/ui",
3
3
  "private": false,
4
- "version": "1.9.199",
4
+ "version": "1.9.201",
5
5
  "type": "module",
6
6
  "main": "./es/index.js",
7
7
  "module": "./es/index.js",
@@ -137,6 +137,7 @@
137
137
  "@pnkx-lib/core": "^1.1.66",
138
138
  "@pnkx-lib/icon": "^0.0.35",
139
139
  "@tailwindcss/cli": "^4.1.6",
140
+ "@tanstack/react-query": "^5.80.7",
140
141
  "@tinymce/miniature": "^6.0.0",
141
142
  "@tinymce/tinymce-react": "^6.0.0",
142
143
  "@vitejs/plugin-react-swc": "^3.10.0",
@@ -6,6 +6,7 @@ import { BulkActionHandlers, InitialFiltersSearch } from '@pnkx-lib/core';
6
6
  import { MenuType } from '../Sidebar';
7
7
  import { GroupHeadingButtonItem } from './HeadingTable/components/GroupHeadingButton';
8
8
  import { TypeStatusTable } from '../../../constants';
9
+ import { SizeType } from 'antd/es/config-provider/SizeContext';
9
10
  interface RowCommon {
10
11
  [x: string]: any;
11
12
  }
@@ -39,6 +40,8 @@ export interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
39
40
  setFilters: (nextFilter: InitialFiltersSearch<TFilters>) => void;
40
41
  noBreadcum?: boolean;
41
42
  bulkActionHandlers?: BulkActionHandlers;
43
+ size?: SizeType;
44
+ ellipsisAllColumn?: boolean;
42
45
  }
43
- export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, titleSettingTableModal, showSetting, setColumns, renderHeadingSearch, rightHeadingContent, menu, groupHeadingButtonItems, showIndexColumn, setFilters, noBreadcum, bulkActionHandlers, ...rest }: TableCommonProps<T>) => import("react/jsx-runtime").JSX.Element;
46
+ export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, titleSettingTableModal, showSetting, setColumns, renderHeadingSearch, rightHeadingContent, menu, groupHeadingButtonItems, showIndexColumn, setFilters, noBreadcum, bulkActionHandlers, size, ellipsisAllColumn, ...rest }: TableCommonProps<T>) => import("react/jsx-runtime").JSX.Element;
44
47
  export {};