@pnkx-lib/ui 1.1.17 → 1.1.19

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,12 +1,11 @@
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";
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";
3
2
  export {
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
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
12
11
  };
package/dist/index.js CHANGED
@@ -1,39 +1,38 @@
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";
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";
4
4
  export {
5
5
  e as Badge,
6
6
  o as Breadcrumb,
7
7
  r as Button,
8
8
  t as CascaderField,
9
- j as CheckboxField,
10
- l as Col,
11
- i as Container,
12
- f as DatePickerField,
9
+ D as CheckboxField,
10
+ i as Col,
11
+ l as Container,
12
+ L as DatePickerField,
13
13
  p as Dropdown,
14
- h as ErrorMessage,
14
+ R as ErrorMessage,
15
15
  d as Flex,
16
- B as Input,
17
- D as Label,
16
+ E as Input,
17
+ f as Label,
18
18
  n as Layout,
19
19
  F as Menu,
20
20
  c as Modal,
21
21
  C as Pagination,
22
- v as PnkxField,
22
+ w as PnkxField,
23
23
  S as Popover,
24
- G as RadioGroup,
25
- L as RangePickerField,
24
+ I as RadioGroup,
25
+ j as RangePickerField,
26
26
  P as Row,
27
27
  T as SearchFiltersForm,
28
- q as SelectField,
29
- b as Skeleton,
30
- g as Space,
31
- k as Splitter,
32
- u as Steps,
33
- x as Table,
28
+ v as SelectField,
29
+ g as Skeleton,
30
+ k as Space,
31
+ u as Splitter,
32
+ x as Steps,
34
33
  M as Tabs,
35
- E as TinyMCE,
36
- R as Tooltip,
37
- w as Typography,
34
+ G as TinyMCE,
35
+ b as Tooltip,
36
+ h as Typography,
38
37
  m as typeColorMap
39
38
  };
@@ -57,8 +57,6 @@ 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';
62
60
  import { TabsProps as TabsProps_2 } from 'antd';
63
61
  import { TextAreaProps as TextAreaProps_2 } from 'antd/es/input';
64
62
  import { TextProps } from 'antd/es/typography/Text';
@@ -179,8 +177,6 @@ export declare interface ColSize extends ColSize_2 {
179
177
 
180
178
  export declare type ColSpanType = number | string;
181
179
 
182
- declare type ColumnTypes<T> = Exclude<TableProps<T>["columns"], undefined>;
183
-
184
180
  declare type ComponentPropsType<TComponent> = TComponent extends React_2.ComponentType<infer P> ? P : never;
185
181
 
186
182
  declare type CompoundedMenu = FC<MenuComponentProps> & {
@@ -381,10 +377,6 @@ export declare interface RangePickerFieldProps extends Omit<RangePickerProps, "v
381
377
 
382
378
  export declare const Row: (props: RowPropsUnion) => JSX.Element;
383
379
 
384
- declare interface RowCommon {
385
- [x: string]: any;
386
- }
387
-
388
380
  export declare interface RowProps extends RowProps_2 {
389
381
  }
390
382
 
@@ -476,30 +468,6 @@ declare type TabItem = {
476
468
  disabled?: boolean;
477
469
  };
478
470
 
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
-
481
- export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
482
- editable?: boolean;
483
- })[];
484
-
485
- export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
486
- dataSource: T[];
487
- columns: TableColumnsType<T> | TableColumnsTypeEditable<T>;
488
- loading?: boolean;
489
- totalItems: number;
490
- filters: any;
491
- onChangePage: (page: number) => void;
492
- onChangePageSize: (size: number) => void;
493
- onSort?: (sortField: string | number | symbol) => void;
494
- rowsSelected?: default_2.Key[];
495
- onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
496
- onRowClick?: (record: T) => void;
497
- rowKey?: string;
498
- className?: string;
499
- editable?: boolean;
500
- onSave?: (data: T[]) => void;
501
- }
502
-
503
471
  export declare const Tabs: default_2.FC<TabsProps>;
504
472
 
505
473
  export declare type TabsProps = TabsProps_2 & {
@@ -44,8 +44,6 @@ 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';
49
47
  import { TabsProps as TabsProps_2 } from 'antd';
50
48
  import { TextProps } from 'antd/es/typography/Text';
51
49
  import { TitleProps } from 'antd/es/typography/Title';
@@ -150,8 +148,6 @@ export declare interface ColSize extends ColSize_2 {
150
148
 
151
149
  export declare type ColSpanType = number | string;
152
150
 
153
- declare type ColumnTypes<T> = Exclude<TableProps<T>["columns"], undefined>;
154
-
155
151
  declare type CompoundedMenu = FC<MenuComponentProps> & {
156
152
  Item: typeof MenuItem;
157
153
  SubMenu: typeof SubMenu;
@@ -265,10 +261,6 @@ export declare type PopoverPropsUnion = BaseProps_2 & PopoverProps;
265
261
 
266
262
  export declare const Row: (props: RowPropsUnion) => JSX.Element;
267
263
 
268
- declare interface RowCommon {
269
- [x: string]: any;
270
- }
271
-
272
264
  export declare interface RowProps extends RowProps_2 {
273
265
  }
274
266
 
@@ -338,30 +330,6 @@ declare type TabItem = {
338
330
  disabled?: boolean;
339
331
  };
340
332
 
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
-
343
- export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
344
- editable?: boolean;
345
- })[];
346
-
347
- export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
348
- dataSource: T[];
349
- columns: TableColumnsType<T> | TableColumnsTypeEditable<T>;
350
- loading?: boolean;
351
- totalItems: number;
352
- filters: any;
353
- onChangePage: (page: number) => void;
354
- onChangePageSize: (size: number) => void;
355
- onSort?: (sortField: string | number | symbol) => void;
356
- rowsSelected?: default_2.Key[];
357
- onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
358
- onRowClick?: (record: T) => void;
359
- rowKey?: string;
360
- className?: string;
361
- editable?: boolean;
362
- onSave?: (data: T[]) => void;
363
- }
364
-
365
333
  export declare const Tabs: default_2.FC<TabsProps>;
366
334
 
367
335
  export declare type TabsProps = TabsProps_2 & {
package/dist/ui/index.js CHANGED
@@ -1,30 +1,29 @@
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";
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";
3
3
  export {
4
- e as Badge,
5
- o as Breadcrumb,
4
+ o as Badge,
5
+ e as Breadcrumb,
6
6
  r as Button,
7
7
  t as CascaderField,
8
- l as Col,
9
- p as Container,
8
+ p as Col,
9
+ l as Container,
10
10
  i as Dropdown,
11
- x as ErrorMessage,
11
+ h as ErrorMessage,
12
12
  n as Flex,
13
- P as Label,
13
+ x as Label,
14
14
  d as Layout,
15
15
  S as Menu,
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,
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,
23
23
  m as Splitter,
24
24
  u as Steps,
25
- y as Table,
26
- B as Tabs,
27
- L as Tooltip,
28
- k as Typography,
29
- f as typeColorMap
25
+ y as Tabs,
26
+ B as Tooltip,
27
+ P as Typography,
28
+ L as typeColorMap
30
29
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pnkx-lib/ui",
3
3
  "private": false,
4
- "version": "1.1.17",
4
+ "version": "1.1.19",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "exports": {
@@ -1,142 +0,0 @@
1
- import { j as e, C as T, g as j, L as E, E as y, T as P } from "./Switch-DAZukdDR.js";
2
- import * as F from "react";
3
- import { Select as R, Radio as M, Checkbox as N } from "antd";
4
- class G extends F.PureComponent {
5
- render() {
6
- const { name: l, component: d, control: c, ...t } = this.props;
7
- return /* @__PURE__ */ e.jsx(
8
- T,
9
- {
10
- control: c,
11
- name: l,
12
- render: ({ field: r, formState: i }) => /* @__PURE__ */ e.jsx(d, { field: r, formState: i, ...t })
13
- }
14
- );
15
- }
16
- }
17
- const $ = (h) => {
18
- //! State
19
- var s;
20
- const {
21
- field: l,
22
- formState: d,
23
- label: c,
24
- required: t,
25
- afterOnChange: r,
26
- customStyleContainer: i,
27
- ...g
28
- } = h, { name: n, value: S, onChange: o, onBlur: b } = l || {}, { touchedFields: v, errors: C, isSubmitted: x } = d || {}, u = j(v, n), a = (s = j(C, n)) == null ? void 0 : s.message;
29
- //! Function
30
- const f = (m) => {
31
- o == null || o(m), r == null || r(m);
32
- }, p = () => a ? /* @__PURE__ */ e.jsx(
33
- y,
34
- {
35
- errorMessage: a,
36
- isTouched: u,
37
- isSubmitted: x
38
- }
39
- ) : null;
40
- //! Render
41
- return /* @__PURE__ */ e.jsxs("div", { className: i, children: [
42
- c && /* @__PURE__ */ e.jsx(E, { label: c, required: t }),
43
- /* @__PURE__ */ e.jsx(
44
- R,
45
- {
46
- onChange: f,
47
- onBlur: b,
48
- value: S,
49
- style: { width: "100%" },
50
- optionLabelProp: "label",
51
- status: (u || x) && a ? "error" : void 0,
52
- ...g
53
- }
54
- ),
55
- p()
56
- ] });
57
- }, q = (h) => {
58
- //! State
59
- var p;
60
- const {
61
- field: l,
62
- formState: d,
63
- customStyleRadio: c,
64
- customStyleWrap: t = "",
65
- afterOnChange: r,
66
- options: i,
67
- ...g
68
- } = h, { name: n, value: S, onChange: o } = l || {}, { touchedFields: b, errors: v, isSubmitted: C } = d || {}, x = j(b, n), u = (p = j(v, n)) == null ? void 0 : p.message;
69
- //! Function
70
- const a = (s) => {
71
- var m;
72
- o == null || o(s), r == null || r((m = s == null ? void 0 : s.target) == null ? void 0 : m.value);
73
- }, f = () => u ? /* @__PURE__ */ e.jsx(
74
- y,
75
- {
76
- errorMessage: u,
77
- isTouched: x,
78
- isSubmitted: C
79
- }
80
- ) : null;
81
- //! Render
82
- return /* @__PURE__ */ e.jsxs("div", { className: t, children: [
83
- /* @__PURE__ */ e.jsx(M.Group, { onChange: a, value: S, ...g, children: i.map((s) => /* @__PURE__ */ e.jsx(
84
- M,
85
- {
86
- value: s.value,
87
- className: c,
88
- children: /* @__PURE__ */ e.jsxs(P.Text, { children: [
89
- " ",
90
- s.label
91
- ] })
92
- },
93
- `${n}-${s.value}`
94
- )) }),
95
- f()
96
- ] });
97
- }, w = (h) => {
98
- //! State
99
- var s;
100
- const {
101
- field: l,
102
- formState: d,
103
- label: c,
104
- afterOnChange: t,
105
- customStyleContainer: r,
106
- customStyleCheckbox: i,
107
- ...g
108
- } = h, { name: n, value: S, onChange: o, onBlur: b } = l || {}, { touchedFields: v, errors: C, isSubmitted: x } = d || {}, u = j(v, n), a = (s = j(C, n)) == null ? void 0 : s.message;
109
- //! Function
110
- const f = (m) => {
111
- const k = m.target.checked;
112
- o == null || o(k), t == null || t(k);
113
- }, p = () => a ? /* @__PURE__ */ e.jsx(
114
- y,
115
- {
116
- errorMessage: a,
117
- isTouched: u,
118
- isSubmitted: x
119
- }
120
- ) : null;
121
- //! Render
122
- return /* @__PURE__ */ e.jsxs("div", { className: r, children: [
123
- /* @__PURE__ */ e.jsx(
124
- N,
125
- {
126
- onBlur: b,
127
- checked: !!S,
128
- onChange: f,
129
- className: i,
130
- ...g,
131
- children: /* @__PURE__ */ e.jsx(P.Text, { children: c })
132
- }
133
- ),
134
- p()
135
- ] });
136
- };
137
- export {
138
- w as C,
139
- G as P,
140
- q as R,
141
- $ as S
142
- };