@pnkx-lib/ui 1.9.45 → 1.9.46

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.
@@ -9957,9 +9957,6 @@ const breadCrumb = [
9957
9957
  ];
9958
9958
  const HeadingTable = (props) => {
9959
9959
  const {
9960
- filters,
9961
- handleSearch,
9962
- resetToInitialFilters,
9963
9960
  setOpenStting,
9964
9961
  showSetting,
9965
9962
  renderHeadingSearch,
@@ -9970,9 +9967,9 @@ const HeadingTable = (props) => {
9970
9967
  {
9971
9968
  breadcrumbItems: breadCrumb,
9972
9969
  classNameWrapHeading: "justify-between",
9973
- rightContent: rightHeadingContent,
9970
+ rightContent: rightHeadingContent && rightHeadingContent,
9974
9971
  children: [
9975
- renderHeadingSearch(filters, handleSearch, resetToInitialFilters),
9972
+ renderHeadingSearch && renderHeadingSearch(),
9976
9973
  /* @__PURE__ */ jsxRuntimeExports.jsx(Divider$1, { className: "!my-5 !mb-4" }),
9977
9974
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-between items-center", children: [
9978
9975
  /* @__PURE__ */ jsxRuntimeExports.jsx(GroupHeadingButton, {}),
@@ -10277,32 +10274,6 @@ const EditableCell = ({
10277
10274
  }
10278
10275
  ) : children });
10279
10276
  };
10280
- const tableCss = css`
10281
- .ant-table-cell::before {
10282
- display: none !important;
10283
- }
10284
- .ant-table-thead .ant-table-cell {
10285
- background-color: #d6e6fe;
10286
- font-weight: 500;
10287
- border-start-start-radius: 0 !important;
10288
- border-start-end-radius: 0 !important;
10289
- }
10290
-
10291
- .ant-table-thead th.ant-table-column-has-sorters:hover {
10292
- background-color: #d6e6fe;
10293
- }
10294
-
10295
- .ant-table-row.table-row-even {
10296
- background-color: #f7f7f8;
10297
- }
10298
-
10299
- .ant-table-row.table-row-odd {
10300
- background-color: #ffffff;
10301
- }
10302
- .ant-table-row:hover {
10303
- background-color: #e7f0ff;
10304
- }
10305
- `;
10306
10277
  const Table = ({
10307
10278
  dataSource,
10308
10279
  columns,
@@ -10322,8 +10293,6 @@ const Table = ({
10322
10293
  titleSettingTableModal,
10323
10294
  showSetting,
10324
10295
  setColumns,
10325
- resetToInitialFilters,
10326
- handleSearch,
10327
10296
  renderHeadingSearch,
10328
10297
  rightHeadingContent,
10329
10298
  status,
@@ -10467,9 +10436,6 @@ const Table = ({
10467
10436
  {
10468
10437
  rightHeadingContent,
10469
10438
  renderHeadingSearch,
10470
- filters,
10471
- handleSearch,
10472
- resetToInitialFilters,
10473
10439
  setOpenStting,
10474
10440
  showSetting
10475
10441
  }
@@ -10521,6 +10487,32 @@ const Table = ({
10521
10487
  if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx(Skeleton, { type: "table" });
10522
10488
  return renderTableContent();
10523
10489
  };
10490
+ const tableCss = css`
10491
+ .ant-table-cell::before {
10492
+ display: none !important;
10493
+ }
10494
+ .ant-table-thead .ant-table-cell {
10495
+ background-color: #d6e6fe;
10496
+ font-weight: 500;
10497
+ border-start-start-radius: 0 !important;
10498
+ border-start-end-radius: 0 !important;
10499
+ }
10500
+
10501
+ .ant-table-thead th.ant-table-column-has-sorters:hover {
10502
+ background-color: #d6e6fe;
10503
+ }
10504
+
10505
+ .ant-table-row.table-row-even {
10506
+ background-color: #f7f7f8;
10507
+ }
10508
+
10509
+ .ant-table-row.table-row-odd {
10510
+ background-color: #ffffff;
10511
+ }
10512
+ .ant-table-row:hover {
10513
+ background-color: #e7f0ff;
10514
+ }
10515
+ `;
10524
10516
 
10525
10517
  const createStoreImpl = (createState) => {
10526
10518
  let state;
package/es/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { Z as ActionRowTable, A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, Y as CategoryStatus, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from './chunks/index-mc9VTeSd.js';
1
+ export { Z as ActionRowTable, A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, Y as CategoryStatus, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from './chunks/index-DZ3ID9ce.js';
2
2
  export { C as CheckboxField, D as DatePickerField, E as ErrorMessage, I as Input, L as Label, P as PnkxField, R as RangePickerField, a as TINY_API, b as TinyMCE, T as Typography } from './chunks/Switch-Ck9WdQgt.js';
3
3
  import 'react-router';
4
4
  export { P as PAGE_INDEX, b as PAGE_SIZE, c as SORT_BY, d as SORT_DESC, S as START_PAGE, a as START_PAGE_SIZE, T as TypeActionRowTable, u as useToast } from './chunks/table-B28OPA57.js';
package/es/ui/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { Z as ActionRowTable, A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, Y as CategoryStatus, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from '../chunks/index-mc9VTeSd.js';
1
+ export { Z as ActionRowTable, A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, Y as CategoryStatus, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from '../chunks/index-DZ3ID9ce.js';
2
2
  export { E as ErrorMessage, L as Label, a as TINY_API, T as Typography } from '../chunks/Switch-Ck9WdQgt.js';
3
3
  import 'react-router';
4
4
  export { P as PAGE_INDEX, b as PAGE_SIZE, c as SORT_BY, d as SORT_DESC, S as START_PAGE, a as START_PAGE_SIZE, T as TypeActionRowTable } from '../chunks/table-B28OPA57.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pnkx-lib/ui",
3
3
  "private": false,
4
- "version": "1.9.45",
4
+ "version": "1.9.46",
5
5
  "type": "module",
6
6
  "main": "./es/index.js",
7
7
  "module": "./es/index.js",
package/types/index.d.ts CHANGED
@@ -41,7 +41,6 @@ import { FormEventHandler } from 'react';
41
41
  import { ForwardRefExoticComponent } from 'react';
42
42
  import { IAllProps } from '@tinymce/tinymce-react';
43
43
  import { ImageProps } from 'antd';
44
- import { InitialFiltersSearch as InitialFiltersSearch_2 } from '../../../../../../../../../../../src/components/hooks';
45
44
  import { InputProps as InputProps_2 } from 'antd';
46
45
  import { JSX } from 'react/jsx-runtime';
47
46
  import { JSX as JSX_2 } from 'react';
@@ -51,6 +50,7 @@ import { MenuItemProps as MenuItemProps_2 } from 'antd/es/menu';
51
50
  import { MenuProps as MenuProps_2 } from 'antd/es/menu';
52
51
  import { ModalProps as ModalProps_2 } from 'antd';
53
52
  import { Pagination as Pagination_2 } from 'antd';
53
+ import { PaginationFilters as PaginationFilters_2 } from '../../../../../../../../../../../src/components/hooks';
54
54
  import { PaginationLocale } from 'rc-pagination';
55
55
  import { PaginationProps as PaginationProps_2 } from 'antd';
56
56
  import { ParagraphProps } from 'antd/es/typography/Paragraph';
@@ -425,13 +425,6 @@ declare const ItemGroup: ForwardRefExoticComponent<Omit<MenuItemGroupProps, "ref
425
425
 
426
426
  export declare type ItemType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
427
427
 
428
- declare type IValueSearch = {
429
- keyword: string | undefined;
430
- attributeType: string | null | undefined;
431
- PageIndex: number;
432
- PageSize: number;
433
- };
434
-
435
428
  export declare const Label: ({ label, required }: LabelProps) => JSX.Element;
436
429
 
437
430
  export declare interface LabelProps {
@@ -703,7 +696,7 @@ declare type TabItem = {
703
696
  disabled?: boolean;
704
697
  };
705
698
 
706
- export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave, titleSettingTableModal, showSetting, setColumns, resetToInitialFilters, handleSearch, renderHeadingSearch, rightHeadingContent, status, ...rest }: TableCommonProps<T>) => JSX.Element;
699
+ export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave, titleSettingTableModal, showSetting, setColumns, renderHeadingSearch, rightHeadingContent, status, ...rest }: TableCommonProps<T>) => JSX.Element;
707
700
 
708
701
  export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
709
702
 
@@ -716,7 +709,7 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
716
709
  columns: TableColumnsType<T>;
717
710
  loading?: boolean;
718
711
  totalItems: number;
719
- filters: any;
712
+ filters: PaginationFilters_2;
720
713
  onChangePage: (page: number) => void;
721
714
  onChangePageSize: (size: number) => void;
722
715
  onSort?: (sortField: string | number | symbol) => void;
@@ -730,9 +723,7 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
730
723
  titleSettingTableModal?: string;
731
724
  showSetting?: boolean;
732
725
  setColumns?: (newColumns: TableColumnsType<T>) => void;
733
- resetToInitialFilters: () => void;
734
- handleSearch: (nextFilters: InitialFiltersSearch_2<IValueSearch>) => void;
735
- renderHeadingSearch: (filters: InitialFiltersSearch_2<IValueSearch>, handleSearch: (nextFilters: InitialFiltersSearch_2<IValueSearch>) => void, resetToInitialFilters: () => void) => JSX_2.Element;
726
+ renderHeadingSearch: () => ReactNode;
736
727
  rightHeadingContent: ReactNode;
737
728
  status?: number;
738
729
  }
package/types/ui.d.ts CHANGED
@@ -34,15 +34,14 @@ import { FlexProps as FlexProps_2 } from 'antd';
34
34
  import { FormEventHandler } from 'react';
35
35
  import { ForwardRefExoticComponent } from 'react';
36
36
  import { ImageProps } from 'antd';
37
- import { InitialFiltersSearch } from '../../../../../../../../../../../src/components/hooks';
38
37
  import { JSX } from 'react/jsx-runtime';
39
- import { JSX as JSX_2 } from 'react';
40
38
  import { MenuDividerProps } from 'antd/es/menu';
41
39
  import { MenuItemGroupProps } from 'rc-menu/lib/MenuItemGroup';
42
40
  import { MenuItemProps as MenuItemProps_2 } from 'antd/es/menu';
43
41
  import { MenuProps as MenuProps_2 } from 'antd/es/menu';
44
42
  import { ModalProps as ModalProps_2 } from 'antd';
45
43
  import { Pagination as Pagination_2 } from 'antd';
44
+ import { PaginationFilters } from '../../../../../../../../../../../src/components/hooks';
46
45
  import { PaginationLocale } from 'rc-pagination';
47
46
  import { PaginationProps as PaginationProps_2 } from 'antd';
48
47
  import { ParagraphProps } from 'antd/es/typography/Paragraph';
@@ -353,13 +352,6 @@ declare const ItemGroup: ForwardRefExoticComponent<Omit<MenuItemGroupProps, "ref
353
352
 
354
353
  export declare type ItemType = Partial<BreadcrumbItemType & BreadcrumbSeparatorType>;
355
354
 
356
- declare type IValueSearch = {
357
- keyword: string | undefined;
358
- attributeType: string | null | undefined;
359
- PageIndex: number;
360
- PageSize: number;
361
- };
362
-
363
355
  export declare const Label: ({ label, required }: LabelProps) => JSX.Element;
364
356
 
365
357
  export declare interface LabelProps {
@@ -548,7 +540,7 @@ declare type TabItem = {
548
540
  disabled?: boolean;
549
541
  };
550
542
 
551
- export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave, titleSettingTableModal, showSetting, setColumns, resetToInitialFilters, handleSearch, renderHeadingSearch, rightHeadingContent, status, ...rest }: TableCommonProps<T>) => JSX.Element;
543
+ export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave, titleSettingTableModal, showSetting, setColumns, renderHeadingSearch, rightHeadingContent, status, ...rest }: TableCommonProps<T>) => JSX.Element;
552
544
 
553
545
  export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
554
546
 
@@ -561,7 +553,7 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
561
553
  columns: TableColumnsType<T>;
562
554
  loading?: boolean;
563
555
  totalItems: number;
564
- filters: any;
556
+ filters: PaginationFilters;
565
557
  onChangePage: (page: number) => void;
566
558
  onChangePageSize: (size: number) => void;
567
559
  onSort?: (sortField: string | number | symbol) => void;
@@ -575,9 +567,7 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
575
567
  titleSettingTableModal?: string;
576
568
  showSetting?: boolean;
577
569
  setColumns?: (newColumns: TableColumnsType<T>) => void;
578
- resetToInitialFilters: () => void;
579
- handleSearch: (nextFilters: InitialFiltersSearch<IValueSearch>) => void;
580
- renderHeadingSearch: (filters: InitialFiltersSearch<IValueSearch>, handleSearch: (nextFilters: InitialFiltersSearch<IValueSearch>) => void, resetToInitialFilters: () => void) => JSX_2.Element;
570
+ renderHeadingSearch: () => ReactNode;
581
571
  rightHeadingContent: ReactNode;
582
572
  status?: number;
583
573
  }