@pnkx-lib/ui 1.1.16 → 1.1.18

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 { I as P1, _ as E1, b as sn, g as _c, j as pe, L as pn, c as pt, E as Nr, C as I1, T as Wh, d as Nn, e as N1, t as R1, f as J } from "./AntdIcon-OM3ycq04.js";
1
+ import { I as P1, _ as E1, b as sn, g as _c, j as pe, L as pn, c as pt, E as Nr, C as I1, T as Wh, d as Nn, e as N1, t as R1, f as J } from "./AntdIcon-BohCHsd5.js";
2
2
  import * as je from "react";
3
3
  import I, { useRef as jr, useState as ji, useEffect as Fs, useLayoutEffect as A1, useMemo as L1, forwardRef as qh, useCallback as Y1, createElement as F1, Component as W1, createRef as q1 } from "react";
4
4
  import { Input as Bh, Select as B1, Radio as wd, Checkbox as $1, DatePicker as H1, Upload as U1, Image as j1, Switch as V1 } from "antd";
@@ -1,4 +1,4 @@
1
- import { C as i, D as s, I as d, P as l, R as o, a as r, S as F, T as c } from "../chunks/Switch-DKxIhHNw.js";
1
+ import { C as i, D as s, I as d, P as l, R as o, a as r, S as F, T as c } from "../chunks/Switch-Dy3JDxO_.js";
2
2
  export {
3
3
  i as CheckboxField,
4
4
  s as DatePickerField,
package/dist/index.js CHANGED
@@ -1,6 +1,6 @@
1
- import { e, g as o, B as r, C as t, f as l, d as i, D as p, F as d, L as n, j as F, M as c, k as C, P as S, R as T, c as P, S as b, h as g, i as k, l as u, T as x, b as M, a as m, t as y } from "./chunks/Steps-CQhCURd7.js";
2
- import { E as f, L as h, T as B } from "./chunks/AntdIcon-OM3ycq04.js";
3
- import { C as L, D as E, I as w, P as I, R as j, a as v, S as G, T as q } from "./chunks/Switch-DKxIhHNw.js";
1
+ import { e, g as o, B as r, C as t, f as l, d as i, D as p, F as d, L as n, j as F, M as c, k as C, P as S, R as T, c as P, S as b, h as g, i as k, l as u, T as x, b as M, a as m, t as y } from "./chunks/Steps-CNDzmXyL.js";
2
+ import { E as f, L as h, T as B } from "./chunks/AntdIcon-BohCHsd5.js";
3
+ import { C as L, D as E, I as w, P as I, R as j, a as v, S as G, T as q } from "./chunks/Switch-Dy3JDxO_.js";
4
4
  export {
5
5
  e as Badge,
6
6
  o as Breadcrumb,
@@ -9,7 +9,6 @@ import { CascaderProps } from 'antd/es/cascader';
9
9
  import { CheckboxProps } from 'antd';
10
10
  import { ColProps as ColProps_2 } from 'antd';
11
11
  import { ColSize as ColSize_2 } from 'antd/es/grid';
12
- import { ColumnsType as ColumnsType_2 } from 'antd/es/table';
13
12
  import { Control } from 'react-hook-form';
14
13
  import { ControllerFieldState } from 'react-hook-form';
15
14
  import { ControllerRenderProps } from 'react-hook-form';
@@ -58,6 +57,7 @@ import { Steps as Steps_2 } from 'antd';
58
57
  import { StepsProps as StepsProps_2 } from 'antd';
59
58
  import { SubMenuProps as SubMenuProps_2 } from 'antd/es/menu';
60
59
  import { SwitchProps } from 'antd';
60
+ import { TableColumnsType } from 'antd';
61
61
  import { TableProps } from 'antd/lib/table';
62
62
  import { TabsProps as TabsProps_2 } from 'antd';
63
63
  import { TextAreaProps as TextAreaProps_2 } from 'antd/es/input';
@@ -179,7 +179,7 @@ export declare interface ColSize extends ColSize_2 {
179
179
 
180
180
  export declare type ColSpanType = number | string;
181
181
 
182
- export declare type ColumnsType<T> = ColumnsType_2<T>;
182
+ declare type ColumnTypes<T> = Exclude<TableProps<T>["columns"], undefined>;
183
183
 
184
184
  declare type ComponentPropsType<TComponent> = TComponent extends React_2.ComponentType<infer P> ? P : never;
185
185
 
@@ -478,9 +478,13 @@ declare type TabItem = {
478
478
 
479
479
  export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, ...rest }: TableCommonProps<T>) => JSX.Element;
480
480
 
481
+ export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
482
+ editable?: boolean;
483
+ })[];
484
+
481
485
  export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
482
486
  dataSource: T[];
483
- columns: ColumnsType<T>;
487
+ columns: TableColumnsType<T> | TableColumnsTypeEditable<T>;
484
488
  loading?: boolean;
485
489
  totalItems: number;
486
490
  filters: any;
@@ -492,6 +496,8 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
492
496
  onRowClick?: (record: T) => void;
493
497
  rowKey?: string;
494
498
  className?: string;
499
+ editable?: boolean;
500
+ onSave?: (data: T[]) => void;
495
501
  }
496
502
 
497
503
  export declare const Tabs: default_2.FC<TabsProps>;
@@ -8,7 +8,6 @@ import { ButtonProps as ButtonProps_2 } from 'antd';
8
8
  import { CascaderProps } from 'antd/es/cascader';
9
9
  import { ColProps as ColProps_2 } from 'antd';
10
10
  import { ColSize as ColSize_2 } from 'antd/es/grid';
11
- import { ColumnsType as ColumnsType_2 } from 'antd/es/table';
12
11
  import { Control } from 'react-hook-form';
13
12
  import { default as default_2 } from 'react';
14
13
  import { DefaultOptionType } from 'antd/es/cascader';
@@ -45,6 +44,7 @@ import { StepProps as StepProps_2 } from 'antd';
45
44
  import { Steps as Steps_2 } from 'antd';
46
45
  import { StepsProps as StepsProps_2 } from 'antd';
47
46
  import { SubMenuProps as SubMenuProps_2 } from 'antd/es/menu';
47
+ import { TableColumnsType } from 'antd';
48
48
  import { TableProps } from 'antd/lib/table';
49
49
  import { TabsProps as TabsProps_2 } from 'antd';
50
50
  import { TextProps } from 'antd/es/typography/Text';
@@ -150,7 +150,7 @@ export declare interface ColSize extends ColSize_2 {
150
150
 
151
151
  export declare type ColSpanType = number | string;
152
152
 
153
- export declare type ColumnsType<T> = ColumnsType_2<T>;
153
+ declare type ColumnTypes<T> = Exclude<TableProps<T>["columns"], undefined>;
154
154
 
155
155
  declare type CompoundedMenu = FC<MenuComponentProps> & {
156
156
  Item: typeof MenuItem;
@@ -340,9 +340,13 @@ declare type TabItem = {
340
340
 
341
341
  export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, ...rest }: TableCommonProps<T>) => JSX.Element;
342
342
 
343
+ export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
344
+ editable?: boolean;
345
+ })[];
346
+
343
347
  export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
344
348
  dataSource: T[];
345
- columns: ColumnsType<T>;
349
+ columns: TableColumnsType<T> | TableColumnsTypeEditable<T>;
346
350
  loading?: boolean;
347
351
  totalItems: number;
348
352
  filters: any;
@@ -354,6 +358,8 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
354
358
  onRowClick?: (record: T) => void;
355
359
  rowKey?: string;
356
360
  className?: string;
361
+ editable?: boolean;
362
+ onSave?: (data: T[]) => void;
357
363
  }
358
364
 
359
365
  export declare const Tabs: default_2.FC<TabsProps>;
package/dist/ui/index.js CHANGED
@@ -1,5 +1,5 @@
1
- import { e, g as o, B as r, C as t, f as l, d as p, D as i, F as n, L as d, j as S, M as T, k as b, P as c, R as g, c as C, S as F, h as M, i as m, l as u, T as y, b as B, a as L, t as f } from "../chunks/Steps-CQhCURd7.js";
2
- import { E as x, L as P, T as k } from "../chunks/AntdIcon-OM3ycq04.js";
1
+ import { e, g as o, B as r, C as t, f as l, d as p, D as i, F as n, L as d, j as S, M as T, k as b, P as c, R as g, c as C, S as F, h as M, i as m, l as u, T as y, b as B, a as L, t as f } from "../chunks/Steps-CNDzmXyL.js";
2
+ import { E as x, L as P, T as k } from "../chunks/AntdIcon-BohCHsd5.js";
3
3
  export {
4
4
  e as Badge,
5
5
  o as Breadcrumb,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pnkx-lib/ui",
3
3
  "private": false,
4
- "version": "1.1.16",
4
+ "version": "1.1.18",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "exports": {
@@ -91,6 +91,7 @@
91
91
  "react-hook-form": "^7.54.2",
92
92
  "react-number-format": "^5.4.3",
93
93
  "react-router": "^7.6.0",
94
+ "react-router-dom": "^7.6.0",
94
95
  "yup": "^1.6.1",
95
96
  "zustand": "^5.0.3"
96
97
  }