@pnkx-lib/ui 1.1.15 → 1.1.17

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-DKxIhHNw.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,40 +1,39 @@
1
- import { e as o, g as r, B as t, C as i, f as l, d as p, D as d, F as n, L as F, j as c, M as C, k as S, P as T, R as P, c as b, S as g, h as k, i as m, l as u, T as x, b as M, a as y, t as R } from "./chunks/Steps-CQhCURd7.js";
2
- import { E as h, L as B, T as D } from "./chunks/AntdIcon-OM3ycq04.js";
3
- import "react";
4
- import { C as E, D as w, I, P as j, R as v, a as G, S as q, T as z } 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 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";
5
4
  export {
6
- o as Badge,
7
- r as Breadcrumb,
8
- t as Button,
9
- i as CascaderField,
10
- E as CheckboxField,
5
+ e as Badge,
6
+ o as Breadcrumb,
7
+ r as Button,
8
+ t as CascaderField,
9
+ j as CheckboxField,
11
10
  l as Col,
12
- p as Container,
13
- w as DatePickerField,
14
- d as Dropdown,
11
+ i as Container,
12
+ f as DatePickerField,
13
+ p as Dropdown,
15
14
  h as ErrorMessage,
16
- n as Flex,
17
- I as Input,
18
- B as Label,
19
- F as Layout,
20
- c as Menu,
21
- C as Modal,
22
- S as Pagination,
23
- j as PnkxField,
24
- T as Popover,
25
- v as RadioGroup,
26
- G as RangePickerField,
15
+ d as Flex,
16
+ B as Input,
17
+ D as Label,
18
+ n as Layout,
19
+ F as Menu,
20
+ c as Modal,
21
+ C as Pagination,
22
+ v as PnkxField,
23
+ S as Popover,
24
+ G as RadioGroup,
25
+ L as RangePickerField,
27
26
  P as Row,
28
- b as SearchFiltersForm,
27
+ T as SearchFiltersForm,
29
28
  q as SelectField,
30
- g as Skeleton,
31
- k as Space,
32
- m as Splitter,
29
+ b as Skeleton,
30
+ g as Space,
31
+ k as Splitter,
33
32
  u as Steps,
34
33
  x as Table,
35
34
  M as Tabs,
36
- z as TinyMCE,
37
- y as Tooltip,
38
- D as Typography,
39
- R as typeColorMap
35
+ E as TinyMCE,
36
+ R as Tooltip,
37
+ w as Typography,
38
+ m as typeColorMap
40
39
  };
@@ -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
 
@@ -419,21 +419,6 @@ export declare interface SelectFieldProps extends SelectProps {
419
419
  customStyleContainer?: string;
420
420
  }
421
421
 
422
- export declare interface SidebarProps {
423
- children?: React.ReactNode;
424
- menu: Array<{
425
- name: string;
426
- href: string;
427
- icon: React.ReactNode;
428
- current: boolean;
429
- children?: Array<{
430
- name: string;
431
- href: string;
432
- }>;
433
- }>;
434
- router: (path: string) => void;
435
- }
436
-
437
422
  declare type SingleCascaderProps = CascaderProps<DefaultOptionType, string> & {
438
423
  multiple?: false;
439
424
  };
@@ -493,9 +478,13 @@ declare type TabItem = {
493
478
 
494
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;
495
480
 
481
+ export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
482
+ editable?: boolean;
483
+ })[];
484
+
496
485
  export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
497
486
  dataSource: T[];
498
- columns: ColumnsType<T>;
487
+ columns: TableColumnsType<T> | TableColumnsTypeEditable<T>;
499
488
  loading?: boolean;
500
489
  totalItems: number;
501
490
  filters: any;
@@ -507,6 +496,8 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
507
496
  onRowClick?: (record: T) => void;
508
497
  rowKey?: string;
509
498
  className?: string;
499
+ editable?: boolean;
500
+ onSave?: (data: T[]) => void;
510
501
  }
511
502
 
512
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;
@@ -291,21 +291,6 @@ export declare interface SearchFiltersFormProps<T extends FieldValues> {
291
291
  onSubmit: (data: T) => void;
292
292
  }
293
293
 
294
- export declare interface SidebarProps {
295
- children?: React.ReactNode;
296
- menu: Array<{
297
- name: string;
298
- href: string;
299
- icon: React.ReactNode;
300
- current: boolean;
301
- children?: Array<{
302
- name: string;
303
- href: string;
304
- }>;
305
- }>;
306
- router: (path: string) => void;
307
- }
308
-
309
294
  declare type SingleCascaderProps = CascaderProps<DefaultOptionType, string> & {
310
295
  multiple?: false;
311
296
  };
@@ -355,9 +340,13 @@ declare type TabItem = {
355
340
 
356
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;
357
342
 
343
+ export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
344
+ editable?: boolean;
345
+ })[];
346
+
358
347
  export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
359
348
  dataSource: T[];
360
- columns: ColumnsType<T>;
349
+ columns: TableColumnsType<T> | TableColumnsTypeEditable<T>;
361
350
  loading?: boolean;
362
351
  totalItems: number;
363
352
  filters: any;
@@ -369,6 +358,8 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
369
358
  onRowClick?: (record: T) => void;
370
359
  rowKey?: string;
371
360
  className?: string;
361
+ editable?: boolean;
362
+ onSave?: (data: T[]) => void;
372
363
  }
373
364
 
374
365
  export declare const Tabs: default_2.FC<TabsProps>;
package/dist/ui/index.js CHANGED
@@ -1,31 +1,30 @@
1
- import { e, g as r, B as t, C as p, f as l, d as i, D as n, F as d, L as S, j as T, M as b, k as c, P as g, R as m, c as C, S as F, h as M, i as u, l as y, T as B, b as L, a as f, t as h } from "../chunks/Steps-CQhCURd7.js";
2
- import { E as P, L as k, T as w } from "../chunks/AntdIcon-OM3ycq04.js";
3
- import "react";
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";
4
3
  export {
5
4
  e as Badge,
6
- r as Breadcrumb,
7
- t as Button,
8
- p as CascaderField,
5
+ o as Breadcrumb,
6
+ r as Button,
7
+ t as CascaderField,
9
8
  l as Col,
10
- i as Container,
11
- n as Dropdown,
12
- P as ErrorMessage,
13
- d as Flex,
14
- k as Label,
15
- S as Layout,
16
- T as Menu,
17
- b as Modal,
18
- c as Pagination,
19
- g as Popover,
20
- m as Row,
9
+ p as Container,
10
+ i as Dropdown,
11
+ x as ErrorMessage,
12
+ n as Flex,
13
+ P as Label,
14
+ d as Layout,
15
+ S as Menu,
16
+ T as Modal,
17
+ b as Pagination,
18
+ c as Popover,
19
+ g as Row,
21
20
  C as SearchFiltersForm,
22
21
  F as Skeleton,
23
22
  M as Space,
24
- u as Splitter,
25
- y as Steps,
26
- B as Table,
27
- L as Tabs,
28
- f as Tooltip,
29
- w as Typography,
30
- h as typeColorMap
23
+ m as Splitter,
24
+ u as Steps,
25
+ y as Table,
26
+ B as Tabs,
27
+ L as Tooltip,
28
+ k as Typography,
29
+ f as typeColorMap
31
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.15",
4
+ "version": "1.1.17",
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
  }