@pnkx-lib/ui 1.1.19 → 1.1.20

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,11 +1,12 @@
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";
1
+ import { D as i, I as s, R as o, a as r } from "../chunks/Switch-DAZukdDR.js";
2
+ import { C as l, P as t, R as F, S as c } from "../chunks/Checkbox-CXb4qF1Z.js";
2
3
  export {
3
- i as CheckboxField,
4
- s as DatePickerField,
5
- d as Input,
6
- l as PnkxField,
7
- o as RadioGroup,
8
- r as RangePickerField,
9
- F as SelectField,
10
- c as TinyMCE
4
+ l as CheckboxField,
5
+ i as DatePickerField,
6
+ s as Input,
7
+ t as PnkxField,
8
+ F as RadioGroup,
9
+ o as RangePickerField,
10
+ c as SelectField,
11
+ r as TinyMCE
11
12
  };
package/dist/index.js CHANGED
@@ -1,38 +1,39 @@
1
- import { d as e, f as o, B as r, C as t, e as i, c as l, D as p, F as d, L as n, i as F, M as c, j as C, P as S, R as P, b as T, S as g, g as k, h as u, k as x, a as M, T as b, t as m } from "./chunks/Steps-Bfcmz8iH.js";
2
- import { E as R, L as f, T as h } from "./chunks/AntdIcon-BohCHsd5.js";
3
- import { C as D, D as L, I as E, P as w, R as I, a as j, S as v, T as G } from "./chunks/Switch-Dy3JDxO_.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 P, c as T, S as b, h as g, i as k, l as u, T as x, b as M, a as R, t as m } from "./chunks/Steps-BpS9WTjP.js";
2
+ import { D as f, E as h, I as B, L as D, R as L, a as E, T as w } from "./chunks/Switch-DAZukdDR.js";
3
+ import { C as j, P as v, R as G, S as q } from "./chunks/Checkbox-CXb4qF1Z.js";
4
4
  export {
5
5
  e as Badge,
6
6
  o as Breadcrumb,
7
7
  r as Button,
8
8
  t as CascaderField,
9
- D as CheckboxField,
10
- i as Col,
11
- l as Container,
12
- L as DatePickerField,
9
+ j as CheckboxField,
10
+ l as Col,
11
+ i as Container,
12
+ f as DatePickerField,
13
13
  p as Dropdown,
14
- R as ErrorMessage,
14
+ h as ErrorMessage,
15
15
  d as Flex,
16
- E as Input,
17
- f as Label,
16
+ B as Input,
17
+ D as Label,
18
18
  n as Layout,
19
19
  F as Menu,
20
20
  c as Modal,
21
21
  C as Pagination,
22
- w as PnkxField,
22
+ v as PnkxField,
23
23
  S as Popover,
24
- I as RadioGroup,
25
- j as RangePickerField,
24
+ G as RadioGroup,
25
+ L as RangePickerField,
26
26
  P as Row,
27
27
  T as SearchFiltersForm,
28
- v as SelectField,
29
- g as Skeleton,
30
- k as Space,
31
- u as Splitter,
32
- x as Steps,
28
+ q as SelectField,
29
+ b as Skeleton,
30
+ g as Space,
31
+ k as Splitter,
32
+ u as Steps,
33
+ x as Table,
33
34
  M as Tabs,
34
- G as TinyMCE,
35
- b as Tooltip,
36
- h as Typography,
35
+ E as TinyMCE,
36
+ R as Tooltip,
37
+ w as Typography,
37
38
  m as typeColorMap
38
39
  };
@@ -57,6 +57,8 @@ import { Steps as Steps_2 } from 'antd';
57
57
  import { StepsProps as StepsProps_2 } from 'antd';
58
58
  import { SubMenuProps as SubMenuProps_2 } from 'antd/es/menu';
59
59
  import { SwitchProps } from 'antd';
60
+ import { TableColumnsType } from 'antd';
61
+ import { TableProps } from 'antd/lib/table';
60
62
  import { TabsProps as TabsProps_2 } from 'antd';
61
63
  import { TextAreaProps as TextAreaProps_2 } from 'antd/es/input';
62
64
  import { TextProps } from 'antd/es/typography/Text';
@@ -177,6 +179,8 @@ export declare interface ColSize extends ColSize_2 {
177
179
 
178
180
  export declare type ColSpanType = number | string;
179
181
 
182
+ declare type ColumnTypes<T> = Exclude<TableProps<T>["columns"], undefined>;
183
+
180
184
  declare type ComponentPropsType<TComponent> = TComponent extends React_2.ComponentType<infer P> ? P : never;
181
185
 
182
186
  declare type CompoundedMenu = FC<MenuComponentProps> & {
@@ -377,6 +381,10 @@ export declare interface RangePickerFieldProps extends Omit<RangePickerProps, "v
377
381
 
378
382
  export declare const Row: (props: RowPropsUnion) => JSX.Element;
379
383
 
384
+ declare interface RowCommon {
385
+ [x: string]: any;
386
+ }
387
+
380
388
  export declare interface RowProps extends RowProps_2 {
381
389
  }
382
390
 
@@ -436,7 +444,8 @@ export declare interface SplitterProps extends SplitterProps_2 {
436
444
 
437
445
  export declare type SplitterPropsUnion = BaseProps_10 & SplitterProps;
438
446
 
439
- export declare type StepProps = StepProps_2;
447
+ export declare interface StepProps extends StepProps_2 {
448
+ }
440
449
 
441
450
  export declare const Steps: typeof Steps_2;
442
451
 
@@ -468,6 +477,30 @@ declare type TabItem = {
468
477
  disabled?: boolean;
469
478
  };
470
479
 
480
+ 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;
481
+
482
+ export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
483
+ editable?: boolean;
484
+ })[];
485
+
486
+ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
487
+ dataSource: T[];
488
+ columns: TableColumnsType<T> | TableColumnsTypeEditable<T>;
489
+ loading?: boolean;
490
+ totalItems: number;
491
+ filters: any;
492
+ onChangePage: (page: number) => void;
493
+ onChangePageSize: (size: number) => void;
494
+ onSort?: (sortField: string | number | symbol) => void;
495
+ rowsSelected?: default_2.Key[];
496
+ onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
497
+ onRowClick?: (record: T) => void;
498
+ rowKey?: string;
499
+ className?: string;
500
+ editable?: boolean;
501
+ onSave?: (data: T[]) => void;
502
+ }
503
+
471
504
  export declare const Tabs: default_2.FC<TabsProps>;
472
505
 
473
506
  export declare type TabsProps = TabsProps_2 & {
@@ -44,6 +44,8 @@ import { StepProps as StepProps_2 } from 'antd';
44
44
  import { Steps as Steps_2 } from 'antd';
45
45
  import { StepsProps as StepsProps_2 } from 'antd';
46
46
  import { SubMenuProps as SubMenuProps_2 } from 'antd/es/menu';
47
+ import { TableColumnsType } from 'antd';
48
+ import { TableProps } from 'antd/lib/table';
47
49
  import { TabsProps as TabsProps_2 } from 'antd';
48
50
  import { TextProps } from 'antd/es/typography/Text';
49
51
  import { TitleProps } from 'antd/es/typography/Title';
@@ -148,6 +150,8 @@ export declare interface ColSize extends ColSize_2 {
148
150
 
149
151
  export declare type ColSpanType = number | string;
150
152
 
153
+ declare type ColumnTypes<T> = Exclude<TableProps<T>["columns"], undefined>;
154
+
151
155
  declare type CompoundedMenu = FC<MenuComponentProps> & {
152
156
  Item: typeof MenuItem;
153
157
  SubMenu: typeof SubMenu;
@@ -261,6 +265,10 @@ export declare type PopoverPropsUnion = BaseProps_2 & PopoverProps;
261
265
 
262
266
  export declare const Row: (props: RowPropsUnion) => JSX.Element;
263
267
 
268
+ declare interface RowCommon {
269
+ [x: string]: any;
270
+ }
271
+
264
272
  export declare interface RowProps extends RowProps_2 {
265
273
  }
266
274
 
@@ -308,7 +316,8 @@ export declare interface SplitterProps extends SplitterProps_2 {
308
316
 
309
317
  export declare type SplitterPropsUnion = BaseProps_10 & SplitterProps;
310
318
 
311
- export declare type StepProps = StepProps_2;
319
+ export declare interface StepProps extends StepProps_2 {
320
+ }
312
321
 
313
322
  export declare const Steps: typeof Steps_2;
314
323
 
@@ -330,6 +339,30 @@ declare type TabItem = {
330
339
  disabled?: boolean;
331
340
  };
332
341
 
342
+ 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;
343
+
344
+ export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
345
+ editable?: boolean;
346
+ })[];
347
+
348
+ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
349
+ dataSource: T[];
350
+ columns: TableColumnsType<T> | TableColumnsTypeEditable<T>;
351
+ loading?: boolean;
352
+ totalItems: number;
353
+ filters: any;
354
+ onChangePage: (page: number) => void;
355
+ onChangePageSize: (size: number) => void;
356
+ onSort?: (sortField: string | number | symbol) => void;
357
+ rowsSelected?: default_2.Key[];
358
+ onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
359
+ onRowClick?: (record: T) => void;
360
+ rowKey?: string;
361
+ className?: string;
362
+ editable?: boolean;
363
+ onSave?: (data: T[]) => void;
364
+ }
365
+
333
366
  export declare const Tabs: default_2.FC<TabsProps>;
334
367
 
335
368
  export declare type TabsProps = TabsProps_2 & {
package/dist/ui/index.js CHANGED
@@ -1,29 +1,30 @@
1
- import { d as o, f as e, B as r, C as t, e as p, c as l, D as i, F as n, L as d, i as S, M as c, j as g, P as C, R as F, b as M, S as T, g as b, h as m, k as u, a as y, T as B, t as L } from "../chunks/Steps-Bfcmz8iH.js";
2
- import { E as h, L as x, T as P } from "../chunks/AntdIcon-BohCHsd5.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-BpS9WTjP.js";
2
+ import { E as x, L as P, T as k } from "../chunks/Switch-DAZukdDR.js";
3
3
  export {
4
- o as Badge,
5
- e as Breadcrumb,
4
+ e as Badge,
5
+ o as Breadcrumb,
6
6
  r as Button,
7
7
  t as CascaderField,
8
- p as Col,
9
- l as Container,
8
+ l as Col,
9
+ p as Container,
10
10
  i as Dropdown,
11
- h as ErrorMessage,
11
+ x as ErrorMessage,
12
12
  n as Flex,
13
- x as Label,
13
+ P as Label,
14
14
  d as Layout,
15
15
  S as Menu,
16
- c as Modal,
17
- g as Pagination,
18
- C as Popover,
19
- F as Row,
20
- M as SearchFiltersForm,
21
- T as Skeleton,
22
- b as Space,
16
+ T as Modal,
17
+ b as Pagination,
18
+ c as Popover,
19
+ g as Row,
20
+ C as SearchFiltersForm,
21
+ F as Skeleton,
22
+ M as Space,
23
23
  m as Splitter,
24
24
  u as Steps,
25
- y as Tabs,
26
- B as Tooltip,
27
- P as Typography,
28
- L as typeColorMap
25
+ y as Table,
26
+ B as Tabs,
27
+ L as Tooltip,
28
+ k as Typography,
29
+ f as typeColorMap
29
30
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pnkx-lib/ui",
3
3
  "private": false,
4
- "version": "1.1.19",
4
+ "version": "1.1.20",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "exports": {
@@ -90,8 +90,7 @@
90
90
  "react-datepicker": "^4.16.0",
91
91
  "react-hook-form": "^7.54.2",
92
92
  "react-number-format": "^5.4.3",
93
- "react-router": "^7.6.0",
94
- "react-router-dom": "^7.6.0",
93
+ "react-router-dom": "^7.5.3",
95
94
  "yup": "^1.6.1",
96
95
  "zustand": "^5.0.3"
97
96
  }