@pnkx-lib/ui 1.9.488 → 1.9.490

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.
Files changed (40) hide show
  1. package/es/chunks/{AntdIcon--fhhlrN2.js → AntdIcon-Bve8mGNz.js} +2 -12
  2. package/es/chunks/{CloseCircleFilled-CFf9JuKT.js → CloseCircleFilled-Bo29sDEQ.js} +1 -1
  3. package/es/chunks/{CloseOutlined-Dr0OzVF3.js → CloseOutlined-CZUJ_3tW.js} +1 -1
  4. package/es/chunks/{DownOutlined-DeqIkZcf.js → DownOutlined-O2mPkovb.js} +1 -1
  5. package/es/chunks/{GenericUploadModal-M5Stp4up.js → GenericUploadModal-ncG7n1M5.js} +1896 -1916
  6. package/es/chunks/{InboxOutlined-BSPALM_S.js → InboxOutlined-BBuIJe6u.js} +1 -1
  7. package/es/chunks/{LoadingOutlined-RxqeOpLJ.js → LoadingOutlined-DCtDXz9K.js} +1 -1
  8. package/es/chunks/{createSuper-DsoUqJ1E.js → createSuper-C9_dQ5Zr.js} +2 -2
  9. package/es/chunks/{defineProperty-CnMPreZi.js → defineProperty-CTLrw71t.js} +1 -1
  10. package/es/chunks/{toArray-DA_RJdbk.js → toArray-2LkvUaha.js} +4 -4
  11. package/es/constants/index.js +7 -1
  12. package/es/fields/DatePicker.js +51 -3
  13. package/es/fields/Select.js +2 -2
  14. package/es/fields/Upload.js +18 -1
  15. package/es/index.js +7 -7
  16. package/es/ui/ExportFile.js +64 -6
  17. package/es/ui/GenericUploadModal.js +2 -2
  18. package/es/ui/ImportFile.js +2 -2
  19. package/es/ui/Layout.js +598 -2
  20. package/es/ui/SearchFilterForm.js +88 -4
  21. package/es/ui/Sidebar/index.js +655 -1
  22. package/es/ui/UploadComponent.js +1 -1
  23. package/es/ui/UploadMultiple.js +1 -1
  24. package/es/ui/index.js +20541 -129989
  25. package/package.json +1 -1
  26. package/types/components/ui/TableCategory/HeadingTable/components/GroupHeadingButton.d.ts +15 -0
  27. package/types/components/ui/TableCategory/HeadingTable/index.d.ts +18 -0
  28. package/types/components/ui/TableCategory/SettingTable/IconSettingTable.d.ts +6 -0
  29. package/types/components/ui/TableCategory/SettingTable/SettingColumnItem.d.ts +7 -0
  30. package/types/components/ui/TableCategory/SettingTable/SortTableItem.d.ts +7 -0
  31. package/types/components/ui/TableCategory/SettingTable/index.d.ts +11 -0
  32. package/types/components/ui/TableCategory/index.d.ts +19 -0
  33. package/types/components/ui/index.d.ts +1 -0
  34. package/types/constants/table.d.ts +1 -0
  35. package/es/chunks/ExportFile-HZ8zFqRV.js +0 -64
  36. package/es/chunks/Layout-CRPluSOs.js +0 -598
  37. package/es/chunks/PlusOutlined-BTNAWDVD.js +0 -20
  38. package/es/chunks/SearchFilterForm-dvW624w0.js +0 -88
  39. package/es/chunks/createForOfIteratorHelper-DEc7rz3b.js +0 -52
  40. package/es/chunks/index-skybeDDP.js +0 -655
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pnkx-lib/ui",
3
3
  "private": false,
4
- "version": "1.9.488",
4
+ "version": "1.9.490",
5
5
  "type": "module",
6
6
  "main": "./es/index.js",
7
7
  "module": "./es/index.js",
@@ -0,0 +1,15 @@
1
+ import { TFilters } from '@pnkx-lib/ui';
2
+ import { InitialFiltersSearch } from '@pnkx-lib/core';
3
+ export interface GroupHeadingButtonItem {
4
+ label: string;
5
+ quantity: number;
6
+ status: unknown;
7
+ }
8
+ export interface GroupHeadingButtonProps {
9
+ groupHeadingButtonItems?: GroupHeadingButtonItem[];
10
+ setFilters: (nextFilter: InitialFiltersSearch<TFilters>) => void;
11
+ filters: InitialFiltersSearch<TFilters>;
12
+ setRowsSelected?: (newSelectedRowKeys: React.Key[]) => void;
13
+ isApproved?: boolean;
14
+ }
15
+ export declare const GroupHeadingButton: (props: GroupHeadingButtonProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,18 @@
1
+ import { GroupHeadingButtonItem } from './components/GroupHeadingButton';
2
+ import { ReactNode } from 'react';
3
+ import { InitialFiltersSearch } from '@pnkx-lib/core';
4
+ import { MenuType, TFilters } from '@pnkx-lib/ui';
5
+ export interface IHeadingCatgoryProps {
6
+ setOpenStting: (value: boolean) => void;
7
+ showSetting?: boolean;
8
+ renderHeadingSearch?: () => ReactNode;
9
+ rightHeadingContent?: ReactNode;
10
+ menu: Array<MenuType>;
11
+ groupHeadingButtonItems?: GroupHeadingButtonItem[];
12
+ setFilters: (nextFilter: InitialFiltersSearch<TFilters>) => void;
13
+ filters: InitialFiltersSearch<TFilters>;
14
+ noBreadcum?: boolean;
15
+ setRowsSelected?: (newSelectedRowKeys: React.Key[]) => void;
16
+ isApproved?: boolean;
17
+ }
18
+ export declare const HeadingTable: (props: IHeadingCatgoryProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,6 @@
1
+ interface IconSettingTableProps {
2
+ showSetting?: boolean;
3
+ setOpenStting: (value: boolean) => void;
4
+ }
5
+ export declare const IconSettingTable: (props: IconSettingTableProps) => import("react/jsx-runtime").JSX.Element | null;
6
+ export {};
@@ -0,0 +1,7 @@
1
+ interface Props {
2
+ lable: string;
3
+ control: any;
4
+ name: string;
5
+ }
6
+ export declare const SettingColumnItem: ({ lable, name, control }: Props) => import("react/jsx-runtime").JSX.Element;
7
+ export {};
@@ -0,0 +1,7 @@
1
+ import { ReactNode } from 'react';
2
+ export declare const SortTableItem: ({ id, children, isLastIndex, index, }: {
3
+ id: string;
4
+ children: ReactNode;
5
+ isLastIndex: boolean;
6
+ index: number;
7
+ }) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { ReactNode } from 'react';
2
+ import { TableColumnsType } from '@pnkx-lib/ui';
3
+ export interface SettingTableProps<T> {
4
+ open: boolean;
5
+ setOpen: (open: boolean) => void;
6
+ title?: ReactNode;
7
+ showSetting?: boolean;
8
+ defaultSettingColumnItems: TableColumnsType<T>;
9
+ setDefaultSettingColumnItems?: (newColumns: TableColumnsType<T>) => void;
10
+ }
11
+ export declare const SettingTable: <T>(props: SettingTableProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,19 @@
1
+ import { default as React, ReactNode } from 'react';
2
+ import { BulkActionHandlers, InitialFiltersSearch } from '@pnkx-lib/core';
3
+ import { GroupHeadingButtonItem } from './HeadingTable/components/GroupHeadingButton';
4
+ import { RowCommon, TableColumnsType, TableCommonProps, TFilters, MenuType } from '@pnkx-lib/ui';
5
+ export interface TableCategoryProps<T> extends TableCommonProps<T> {
6
+ titleSettingTableModal?: string;
7
+ showSetting?: boolean;
8
+ setColumns?: (newColumns: TableColumnsType<T>) => void;
9
+ renderHeadingSearch?: () => ReactNode;
10
+ rightHeadingContent?: ReactNode;
11
+ menu: Array<MenuType>;
12
+ groupHeadingButtonItems?: GroupHeadingButtonItem[];
13
+ setFilters: (nextFilter: InitialFiltersSearch<TFilters>) => void;
14
+ noBreadcum?: boolean;
15
+ bulkActionHandlers?: BulkActionHandlers;
16
+ setRowsSelected?: (newSelectedRowKeys: React.Key[]) => void;
17
+ isApproved?: boolean;
18
+ }
19
+ export declare const TableCategory: <T extends RowCommon>({ columns, filters, rowsSelected, titleSettingTableModal, showSetting, setColumns, renderHeadingSearch, rightHeadingContent, menu, groupHeadingButtonItems, setFilters, noBreadcum, bulkActionHandlers, setRowsSelected, isApproved, ...rest }: TableCategoryProps<T>) => import("react/jsx-runtime").JSX.Element;
@@ -69,3 +69,4 @@ export * from './SelectTable';
69
69
  export * from './LoadingWrapper';
70
70
  export * from './SelectSingleTable';
71
71
  export * from './GenericUploadModal';
72
+ export * from './TableCategory';
@@ -30,3 +30,4 @@ export declare enum TypeStatusTable {
30
30
  REJECTED = 4,// Từ chối duyệt
31
31
  DELETED = 5
32
32
  }
33
+ export declare const ListStatusApproved: TypeStatusTable[];
@@ -1,64 +0,0 @@
1
- import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
2
- import { Spin } from '../ui/Spin.js';
3
- import { R as RefIcon$1 } from './LoadingOutlined-RxqeOpLJ.js';
4
- import { PnkxField } from '../fields/PnkxField.js';
5
- import { RadioGroup } from '../fields/Radio.js';
6
- import { I as Icon, _ as _extends } from './AntdIcon--fhhlrN2.js';
7
- import * as React from 'react';
8
-
9
- // This icon file is generated automatically.
10
- var InfoCircleFilled$1 = { "icon": { "tag": "svg", "attrs": { "viewBox": "64 64 896 896", "focusable": "false" }, "children": [{ "tag": "path", "attrs": { "d": "M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zm32 664c0 4.4-3.6 8-8 8h-48c-4.4 0-8-3.6-8-8V456c0-4.4 3.6-8 8-8h48c4.4 0 8 3.6 8 8v272zm-32-344a48.01 48.01 0 010-96 48.01 48.01 0 010 96z" } }] }, "name": "info-circle", "theme": "filled" };
11
-
12
- var InfoCircleFilled = function InfoCircleFilled(props, ref) {
13
- return /*#__PURE__*/React.createElement(Icon, _extends({}, props, {
14
- ref: ref,
15
- icon: InfoCircleFilled$1
16
- }));
17
- };
18
-
19
- /**![info-circle](data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTAiIGhlaWdodD0iNTAiIGZpbGw9IiNjYWNhY2EiIHZpZXdCb3g9IjY0IDY0IDg5NiA4OTYiIGZvY3VzYWJsZT0iZmFsc2UiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PHBhdGggZD0iTTUxMiA2NEMyNjQuNiA2NCA2NCAyNjQuNiA2NCA1MTJzMjAwLjYgNDQ4IDQ0OCA0NDggNDQ4LTIwMC42IDQ0OC00NDhTNzU5LjQgNjQgNTEyIDY0em0zMiA2NjRjMCA0LjQtMy42IDgtOCA4aC00OGMtNC40IDAtOC0zLjYtOC04VjQ1NmMwLTQuNCAzLjYtOCA4LThoNDhjNC40IDAgOCAzLjYgOCA4djI3MnptLTMyLTM0NGE0OC4wMSA0OC4wMSAwIDAxMC05NiA0OC4wMSA0OC4wMSAwIDAxMCA5NnoiIC8+PC9zdmc+) */
20
- var RefIcon = /*#__PURE__*/React.forwardRef(InfoCircleFilled);
21
- if (process.env.NODE_ENV !== 'production') {
22
- RefIcon.displayName = 'InfoCircleFilled';
23
- }
24
-
25
- const ExportFile = ({
26
- loading,
27
- children,
28
- control,
29
- watch
30
- }) => {
31
- const isShowChid = watch("export");
32
- return /* @__PURE__ */ jsx("div", { children: loading ? /* @__PURE__ */ jsxs("div", { className: "text-center mt-4", children: [
33
- /* @__PURE__ */ jsx(Spin, { indicator: /* @__PURE__ */ jsx(RefIcon$1, { spin: true }), size: "large" }),
34
- /* @__PURE__ */ jsx("p", { className: "text-sm mt-2", children: "Vui lòng chờ trong giây lát. Chúng tôi đang chuẩn bị file của bạn!" })
35
- ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
36
- /* @__PURE__ */ jsx("p", { className: "text-sm text-[#5C657D] mt-4", children: "Chọn kiểu export file" }),
37
- /* @__PURE__ */ jsxs("div", { className: "mt-2", children: [
38
- /* @__PURE__ */ jsx(
39
- PnkxField,
40
- {
41
- name: "export",
42
- control,
43
- className: "!flex-col !flex gap-2",
44
- options: [
45
- { label: "Export toàn bộ bản ghi", value: "all" },
46
- { label: "Export theo bộ lọc", value: "filter" }
47
- ],
48
- defaultValue: "all",
49
- component: RadioGroup
50
- }
51
- ),
52
- /* @__PURE__ */ jsxs("div", { className: "mt-2", children: [
53
- " ",
54
- isShowChid === "filter" && children
55
- ] })
56
- ] }),
57
- /* @__PURE__ */ jsxs("div", { className: "mt-2 flex items-center gap-2", children: [
58
- /* @__PURE__ */ jsx(RefIcon, { className: "!text-[#1677FF] mt-1 text-[24px]" }),
59
- /* @__PURE__ */ jsx("p", { className: "text-[14px] font-[400]", children: "Lưu ý: Hệ thống sẽ xuất file dưới định dạng .xlsx (Excel). Vui lòng đảm bảo thiết bị của bạn hỗ trợ đọc định dạng này trước khi tiếp tục." })
60
- ] })
61
- ] }) });
62
- };
63
-
64
- export { ExportFile as E, RefIcon as R };