@pnkx-lib/ui 1.0.1 → 1.0.3
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.
@@ -42,12 +42,12 @@ const C = (e) => /* @__PURE__ */ a.jsx(F, { ...e }), ne = (e) => {
|
|
42
42
|
}, v = {
|
43
43
|
selectedRowKeys: m,
|
44
44
|
onChange: o
|
45
|
-
},
|
45
|
+
}, B = (i) => {
|
46
46
|
i && i.field && c && c({}, i.field);
|
47
47
|
};
|
48
|
-
function
|
49
|
-
return (
|
50
|
-
const p =
|
48
|
+
function E(i, h) {
|
49
|
+
return (P) => {
|
50
|
+
const p = P.target;
|
51
51
|
p.closest("input") || // ⛔ Checkbox
|
52
52
|
p.closest("button") || // ⛔ Button trong row
|
53
53
|
p.closest("svg") || // ⛔ Icon
|
@@ -63,9 +63,9 @@ const C = (e) => /* @__PURE__ */ a.jsx(F, { ...e }), ne = (e) => {
|
|
63
63
|
pagination: j,
|
64
64
|
loading: s,
|
65
65
|
rowSelection: v,
|
66
|
-
onChange:
|
66
|
+
onChange: B,
|
67
67
|
onRow: (i) => ({
|
68
|
-
onClick:
|
68
|
+
onClick: E(i, x)
|
69
69
|
}),
|
70
70
|
...l
|
71
71
|
}
|
@@ -153,7 +153,7 @@ const N = (e) => {
|
|
153
153
|
}
|
154
154
|
)
|
155
155
|
] }) : /* @__PURE__ */ a.jsx(b, { children: /* @__PURE__ */ a.jsx("div", { style: { display: "grid", rowGap: 8 }, children: Array.from({ length: 3 }).map((t, s) => /* @__PURE__ */ a.jsx(f.Input, { size: "small", block: !0, active: !0 }, s)) }) }) }), de = (e) => {
|
156
|
-
const {
|
156
|
+
const { containerClassName: t, popoverClassName: s, ...n } = e;
|
157
157
|
return /* @__PURE__ */ a.jsx("div", { className: t, children: /* @__PURE__ */ a.jsx(H, { className: s, ...n }) });
|
158
158
|
};
|
159
159
|
var X = { icon: { tag: "svg", attrs: { viewBox: "64 64 896 896", focusable: "false" }, children: [{ tag: "path", attrs: { d: "M880.1 154H143.9c-24.5 0-39.8 26.7-27.5 48L349 597.4V838c0 17.7 14.2 32 31.8 32h262.4c17.6 0 31.8-14.3 31.8-32V597.4L907.7 202c12.2-21.3-3.1-48-27.6-48zM603.4 798H420.6V642h182.9v156zm9.6-236.6l-9.5 16.6h-183l-9.5-16.6L212.7 226h598.6L613 561.4z" } }] }, name: "filter", theme: "outlined" }, Y = function(t, s) {
|
package/dist/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { e, B as o, C as r, d as t, M as p, P as l, c as T, S as n, T as d, b as i, a as C, t as M } from "./chunks/Badge-
|
1
|
+
import { e, B as o, C as r, d as t, M as p, P as l, c as T, S as n, T as d, b as i, a as C, t as M } from "./chunks/Badge-BNUFNpvB.js";
|
2
2
|
import { E as m, L as x, T as y } from "./chunks/AntdIcon-DV7aA2xc.js";
|
3
3
|
import { I as P, P as c, T as f } from "./chunks/Switch-B0z-9IsF.js";
|
4
4
|
export {
|
package/dist/types/index.d.ts
CHANGED
@@ -22,7 +22,6 @@ import { RangePickerProps } from 'antd/es/date-picker';
|
|
22
22
|
import * as React_2 from 'react';
|
23
23
|
import { ReactDatePickerProps } from 'react-datepicker';
|
24
24
|
import { ReactNode } from 'react';
|
25
|
-
import { RowCommon } from '../../../../../../../../../../src/interface/common';
|
26
25
|
import { SelectProps } from 'antd';
|
27
26
|
import { SkeletonProps as SkeletonProps_2 } from 'antd';
|
28
27
|
import { SwitchProps } from 'antd';
|
@@ -51,8 +50,8 @@ declare type BaseProps = {
|
|
51
50
|
};
|
52
51
|
|
53
52
|
declare type BaseProps_2 = {
|
54
|
-
|
55
|
-
|
53
|
+
containerClassName?: string;
|
54
|
+
popoverClassName?: string;
|
56
55
|
};
|
57
56
|
|
58
57
|
export declare const Button: default_2.FC<ButtonProps>;
|
@@ -142,7 +141,7 @@ export declare type PnkxFieldProps<TComponent extends React_2.ComponentType<any>
|
|
142
141
|
|
143
142
|
export declare const Popover: (props: PopoverPropsUnion) => JSX.Element;
|
144
143
|
|
145
|
-
declare type PopoverProps = PopoverProps_2;
|
144
|
+
export declare type PopoverProps = PopoverProps_2;
|
146
145
|
|
147
146
|
export declare type PopoverPropsUnion = BaseProps_2 & PopoverProps;
|
148
147
|
|
@@ -182,6 +181,10 @@ export declare interface RangePickerFieldProps extends Omit<RangePickerProps, "v
|
|
182
181
|
customStyleDatePicker?: string;
|
183
182
|
}
|
184
183
|
|
184
|
+
declare interface RowCommon {
|
185
|
+
[x: string]: any;
|
186
|
+
}
|
187
|
+
|
185
188
|
export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX.Element;
|
186
189
|
|
187
190
|
export declare interface SearchFiltersFormProps<T extends FieldValues> {
|
package/dist/types/ui.d.ts
CHANGED
@@ -12,7 +12,6 @@ import { ModalProps } from 'antd';
|
|
12
12
|
import { ParagraphProps } from 'antd/es/typography/Paragraph';
|
13
13
|
import { PopoverProps as PopoverProps_2 } from 'antd';
|
14
14
|
import { ReactNode } from 'react';
|
15
|
-
import { RowCommon } from '../../../../../../../../../../src/interface/common';
|
16
15
|
import { SkeletonProps as SkeletonProps_2 } from 'antd';
|
17
16
|
import { TableProps } from 'antd/lib/table';
|
18
17
|
import { TabsProps as TabsProps_2 } from 'antd';
|
@@ -35,8 +34,8 @@ declare type BaseProps = {
|
|
35
34
|
};
|
36
35
|
|
37
36
|
declare type BaseProps_2 = {
|
38
|
-
|
39
|
-
|
37
|
+
containerClassName?: string;
|
38
|
+
popoverClassName?: string;
|
40
39
|
};
|
41
40
|
|
42
41
|
export declare const Button: default_2.FC<ButtonProps>;
|
@@ -83,10 +82,14 @@ declare type MultipleCascaderProps = CascaderProps<DefaultOptionType, string, tr
|
|
83
82
|
|
84
83
|
export declare const Popover: (props: PopoverPropsUnion) => JSX.Element;
|
85
84
|
|
86
|
-
declare type PopoverProps = PopoverProps_2;
|
85
|
+
export declare type PopoverProps = PopoverProps_2;
|
87
86
|
|
88
87
|
export declare type PopoverPropsUnion = BaseProps_2 & PopoverProps;
|
89
88
|
|
89
|
+
declare interface RowCommon {
|
90
|
+
[x: string]: any;
|
91
|
+
}
|
92
|
+
|
90
93
|
export declare const SearchFiltersForm: <T extends FieldValues = FieldValues>({ initialValues, renderFilterFields, onSubmit, onReset, classNamesContainer, classNameWrapperForm, hideDefaultSubmit, hideResetButton, }: SearchFiltersFormProps<T> & Partial<UseFormReturn<T>>) => JSX.Element;
|
91
94
|
|
92
95
|
export declare interface SearchFiltersFormProps<T extends FieldValues> {
|
package/dist/ui/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
import { e, B as o, C as r, d as t, M as l, P as p, c as T, S as d, T as b, b as i, a as n, t as C } from "../chunks/Badge-
|
1
|
+
import { e, B as o, C as r, d as t, M as l, P as p, c as T, S as d, T as b, b as i, a as n, t as C } from "../chunks/Badge-BNUFNpvB.js";
|
2
2
|
import { E as c, L as g, T as m } from "../chunks/AntdIcon-DV7aA2xc.js";
|
3
3
|
export {
|
4
4
|
e as Badge,
|