@pnkx-lib/ui 1.9.5 → 1.9.6
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.
- package/es/chunks/{ErrorBoundary-DCzyzn6V.js → ErrorBoundary-C_kJ-GaS.js} +4528 -27
- package/es/chunks/{Checkbox-CJ_M7IzZ.js → Radio-D2me1zZ-.js} +3 -52
- package/es/chunks/{Switch-eMq9KkOy.js → Switch-za5Skgtp.js} +51 -2
- package/es/fields/index.js +2 -2
- package/es/index.js +3 -3
- package/es/ui/index.js +2 -2
- package/package.json +1 -1
- package/types/hooks.d.ts +5 -5
- package/types/index.d.ts +54 -48
- package/types/ui.d.ts +41 -35
@@ -1,5 +1,5 @@
|
|
1
|
-
import { g as get, j as jsxRuntimeExports, L as Label, E as ErrorMessage, T as Typography } from './Switch-
|
2
|
-
import { Select as Select$1, Radio
|
1
|
+
import { g as get, j as jsxRuntimeExports, L as Label, E as ErrorMessage, T as Typography } from './Switch-za5Skgtp.js';
|
2
|
+
import { Select as Select$1, Radio } from 'antd';
|
3
3
|
|
4
4
|
const Select = (props) => {
|
5
5
|
//! State
|
@@ -100,53 +100,4 @@ const RadioGroup = (props) => {
|
|
100
100
|
] });
|
101
101
|
};
|
102
102
|
|
103
|
-
|
104
|
-
//! State
|
105
|
-
const {
|
106
|
-
field,
|
107
|
-
formState,
|
108
|
-
label,
|
109
|
-
afterOnChange,
|
110
|
-
customStyleContainer,
|
111
|
-
customStyleCheckbox,
|
112
|
-
...restProps
|
113
|
-
} = props;
|
114
|
-
const { name, value, onChange, onBlur } = field || {};
|
115
|
-
const { touchedFields, errors, isSubmitted } = formState || {};
|
116
|
-
const isTouched = get(touchedFields, name);
|
117
|
-
const errorMessage = get(errors, name)?.message;
|
118
|
-
//! Function
|
119
|
-
const handleChange = (e) => {
|
120
|
-
const checked = e.target.checked;
|
121
|
-
onChange?.(checked);
|
122
|
-
afterOnChange?.(checked);
|
123
|
-
};
|
124
|
-
const renderErrorMessage = () => {
|
125
|
-
if (!errorMessage) return null;
|
126
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
127
|
-
ErrorMessage,
|
128
|
-
{
|
129
|
-
errorMessage,
|
130
|
-
isTouched,
|
131
|
-
isSubmitted
|
132
|
-
}
|
133
|
-
);
|
134
|
-
};
|
135
|
-
//! Render
|
136
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: customStyleContainer, children: [
|
137
|
-
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
138
|
-
Checkbox,
|
139
|
-
{
|
140
|
-
onBlur,
|
141
|
-
checked: !!value,
|
142
|
-
onChange: handleChange,
|
143
|
-
className: customStyleCheckbox,
|
144
|
-
...restProps,
|
145
|
-
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { children: label })
|
146
|
-
}
|
147
|
-
),
|
148
|
-
renderErrorMessage()
|
149
|
-
] });
|
150
|
-
};
|
151
|
-
|
152
|
-
export { CheckboxField as C, RadioGroup as R, Select as S };
|
103
|
+
export { RadioGroup as R, Select as S };
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import * as React from 'react';
|
2
2
|
import React__default, { useRef, useState, useEffect, useLayoutEffect, useMemo, forwardRef, useCallback, createElement, Component, createRef, createContext, useContext } from 'react';
|
3
|
-
import { Typography as Typography$1, Input as Input$1, DatePicker, Upload, Image, Switch } from 'antd';
|
3
|
+
import { Typography as Typography$1, Input as Input$1, Checkbox, DatePicker, Upload, Image, Switch } from 'antd';
|
4
4
|
import { g as require_baseGetTag, h as requireIsObjectLike, k as requireIsArray, d as require_MapCache, o as require_Symbol, p as getDefaultExportFromCjs, q as commonjsGlobal, T as TINY_API } from './common-b3FKGF0Y.js';
|
5
5
|
import * as ReactDOM from 'react-dom';
|
6
6
|
import ReactDOM__default, { findDOMNode } from 'react-dom';
|
@@ -24793,6 +24793,55 @@ const Textarea = forwardRef(
|
|
24793
24793
|
);
|
24794
24794
|
React__default.memo(Textarea);
|
24795
24795
|
|
24796
|
+
const CheckboxField = (props) => {
|
24797
|
+
//! State
|
24798
|
+
const {
|
24799
|
+
field,
|
24800
|
+
formState,
|
24801
|
+
label,
|
24802
|
+
afterOnChange,
|
24803
|
+
customStyleContainer,
|
24804
|
+
customStyleCheckbox,
|
24805
|
+
...restProps
|
24806
|
+
} = props;
|
24807
|
+
const { name, value, onChange, onBlur } = field || {};
|
24808
|
+
const { touchedFields, errors, isSubmitted } = formState || {};
|
24809
|
+
const isTouched = get$1(touchedFields, name);
|
24810
|
+
const errorMessage = get$1(errors, name)?.message;
|
24811
|
+
//! Function
|
24812
|
+
const handleChange = (e) => {
|
24813
|
+
const checked = e.target.checked;
|
24814
|
+
onChange?.(checked);
|
24815
|
+
afterOnChange?.(checked);
|
24816
|
+
};
|
24817
|
+
const renderErrorMessage = () => {
|
24818
|
+
if (!errorMessage) return null;
|
24819
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
24820
|
+
ErrorMessage,
|
24821
|
+
{
|
24822
|
+
errorMessage,
|
24823
|
+
isTouched,
|
24824
|
+
isSubmitted
|
24825
|
+
}
|
24826
|
+
);
|
24827
|
+
};
|
24828
|
+
//! Render
|
24829
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: customStyleContainer, children: [
|
24830
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
24831
|
+
Checkbox,
|
24832
|
+
{
|
24833
|
+
onBlur,
|
24834
|
+
checked: !!value,
|
24835
|
+
onChange: handleChange,
|
24836
|
+
className: customStyleCheckbox,
|
24837
|
+
...restProps,
|
24838
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { children: label })
|
24839
|
+
}
|
24840
|
+
),
|
24841
|
+
renderErrorMessage()
|
24842
|
+
] });
|
24843
|
+
};
|
24844
|
+
|
24796
24845
|
function _typeof(o) {
|
24797
24846
|
"@babel/helpers - typeof";
|
24798
24847
|
|
@@ -39335,4 +39384,4 @@ const SwitchField = (props) => {
|
|
39335
39384
|
};
|
39336
39385
|
React__default.memo(SwitchField);
|
39337
39386
|
|
39338
|
-
export { _createSuper as A, _assertThisInitialized$1 as B,
|
39387
|
+
export { _createSuper as A, _assertThisInitialized$1 as B, CheckboxField as C, DatePickerField as D, ErrorMessage as E, FastColor as F, _objectWithoutProperties as G, IconContext as H, Input as I, Label as L, PnkxField as P, RangePickerField as R, Typography as T, _extends as _, TinyMCE as a, Icon as b, _typeof as c, classNames as d, _arrayLikeToArray as e, _unsupportedIterableToArray as f, get$1 as g, _createClass as h, _classCallCheck as i, jsxRuntimeExports as j, _defineProperty as k, _slicedToArray as l, warning$1 as m, canUseDom as n, _objectSpread2 as o, updateCSS as p, _arrayWithHoles as q, removeCSS as r, _nonIterableRest as s, resetWarned as t, useForm as u, generate$1 as v, warningOnce as w, presetPrimaryColors as x, presetPalettes as y, _inherits as z };
|
package/es/fields/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export { D as DatePickerField, I as Input, P as PnkxField, R as RangePickerField, a as TinyMCE } from '../chunks/Switch-
|
2
|
-
export {
|
1
|
+
export { C as CheckboxField, D as DatePickerField, I as Input, P as PnkxField, R as RangePickerField, a as TinyMCE } from '../chunks/Switch-za5Skgtp.js';
|
2
|
+
export { R as RadioGroup, S as Select } from '../chunks/Radio-D2me1zZ-.js';
|
package/es/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
export { A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from './chunks/ErrorBoundary-
|
2
|
-
export { D as DatePickerField, E as ErrorMessage, I as Input, L as Label, P as PnkxField, R as RangePickerField, a as TinyMCE, T as Typography } from './chunks/Switch-
|
1
|
+
export { A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from './chunks/ErrorBoundary-C_kJ-GaS.js';
|
2
|
+
export { C as CheckboxField, D as DatePickerField, E as ErrorMessage, I as Input, L as Label, P as PnkxField, R as RangePickerField, a as TinyMCE, T as Typography } from './chunks/Switch-za5Skgtp.js';
|
3
3
|
import 'react-router';
|
4
|
-
export {
|
4
|
+
export { R as RadioGroup, S as Select } from './chunks/Radio-D2me1zZ-.js';
|
5
5
|
export { u as useToast } from './chunks/cloneDeep-BLYi2V0G.js';
|
6
6
|
export { u as useFiltersHandler, a as useMessage } from './chunks/useMessage-D_-VT5B4.js';
|
package/es/ui/index.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
export { A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from '../chunks/ErrorBoundary-
|
2
|
-
export { E as ErrorMessage, L as Label, T as Typography } from '../chunks/Switch-
|
1
|
+
export { A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from '../chunks/ErrorBoundary-C_kJ-GaS.js';
|
2
|
+
export { E as ErrorMessage, L as Label, T as Typography } from '../chunks/Switch-za5Skgtp.js';
|
3
3
|
import 'react-router';
|
package/package.json
CHANGED
package/types/hooks.d.ts
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
import { ArgsProps } from 'antd/
|
2
|
-
import { ArgsProps as ArgsProps_2 } from 'antd/
|
1
|
+
import { ArgsProps } from 'antd/es/notification';
|
2
|
+
import { ArgsProps as ArgsProps_2 } from 'antd/lib/message';
|
3
3
|
import { default as default_2 } from 'react';
|
4
4
|
|
5
5
|
export declare type InitialFiltersSearch<T> = T & PaginationFilters;
|
6
6
|
|
7
|
-
export declare type OptionalArgsMessage = Partial<
|
8
|
-
type?:
|
7
|
+
export declare type OptionalArgsMessage = Partial<ArgsProps_2> & {
|
8
|
+
type?: ArgsProps_2["type"];
|
9
9
|
};
|
10
10
|
|
11
|
-
export declare type OptionalArgsToast = Partial<
|
11
|
+
export declare type OptionalArgsToast = Partial<ArgsProps> & {
|
12
12
|
message?: React.ReactNode;
|
13
13
|
};
|
14
14
|
|
package/types/index.d.ts
CHANGED
@@ -2,8 +2,8 @@ import { AffixProps } from 'antd';
|
|
2
2
|
import { AlertProps as AlertProps_2 } from 'antd';
|
3
3
|
import { Anchor as Anchor_2 } from 'antd';
|
4
4
|
import { AnchorProps } from 'antd';
|
5
|
-
import { ArgsProps } from 'antd/
|
6
|
-
import { ArgsProps as ArgsProps_2 } from 'antd/
|
5
|
+
import { ArgsProps } from 'antd/es/notification';
|
6
|
+
import { ArgsProps as ArgsProps_2 } from 'antd/lib/message';
|
7
7
|
import { AutoCompleteProps as AutoCompleteProps_2 } from 'antd';
|
8
8
|
import { BadgeProps as BadgeProps_2 } from 'antd';
|
9
9
|
import { BasicProps } from 'antd/es/layout/layout';
|
@@ -23,8 +23,8 @@ import { Control } from 'react-hook-form';
|
|
23
23
|
import { ControllerFieldState } from 'react-hook-form';
|
24
24
|
import { ControllerRenderProps } from 'react-hook-form';
|
25
25
|
import { Dayjs } from 'dayjs';
|
26
|
-
import { default as default_2 } from '
|
27
|
-
import { default as default_3 } from '
|
26
|
+
import { default as default_2 } from 'react';
|
27
|
+
import { default as default_3 } from 'antd/es/anchor/AnchorLink';
|
28
28
|
import { DefaultOptionType } from 'antd/es/cascader';
|
29
29
|
import { DefaultValues } from 'react-hook-form';
|
30
30
|
import { DividerProps as DividerProps_2 } from 'antd';
|
@@ -105,7 +105,7 @@ export declare const Alert: React.FC<AlertProps>;
|
|
105
105
|
export declare type AlertProps = AlertProps_2;
|
106
106
|
|
107
107
|
export declare const Anchor: typeof Anchor_2 & {
|
108
|
-
Link: typeof
|
108
|
+
Link: typeof default_3;
|
109
109
|
};
|
110
110
|
|
111
111
|
export declare type AnchorPropsUnion = BaseProps_13 & AnchorProps;
|
@@ -113,7 +113,7 @@ export declare type AnchorPropsUnion = BaseProps_13 & AnchorProps;
|
|
113
113
|
export declare const Appfix: ({ children, ...rest }: AppfixProps) => JSX.Element;
|
114
114
|
|
115
115
|
export declare interface AppfixProps extends AffixProps {
|
116
|
-
children:
|
116
|
+
children: default_2.ReactNode;
|
117
117
|
}
|
118
118
|
|
119
119
|
export declare const AutoComplete: React.FC<AutoCompleteProps>;
|
@@ -202,22 +202,23 @@ export declare type BreadcrumbPropsUnion = BaseProps_6 & BreadcrumbProps;
|
|
202
202
|
|
203
203
|
export declare type BreadcrumbSeparatorType = BreadcrumbSeparatorType_2;
|
204
204
|
|
205
|
-
export declare const BulkAction: ({ quantity,
|
205
|
+
export declare const BulkAction: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: BulkActionProps) => JSX.Element;
|
206
206
|
|
207
207
|
export declare interface BulkActionProps {
|
208
208
|
quantity: number;
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
209
|
+
handleRestore?: () => void;
|
210
|
+
handleSendApproval?: () => void;
|
211
|
+
handleCancelSendApproval?: () => void;
|
212
|
+
handleRefuseApproval?: () => void;
|
213
|
+
handleApproval?: () => void;
|
214
|
+
handleCancelApproval?: () => void;
|
215
215
|
handleDelete?: () => void;
|
216
|
-
|
217
|
-
|
216
|
+
handleActivate?: () => void;
|
217
|
+
handleInActivate?: () => void;
|
218
|
+
status?: number;
|
218
219
|
}
|
219
220
|
|
220
|
-
export declare const Button:
|
221
|
+
export declare const Button: default_2.FC<ButtonProps>;
|
221
222
|
|
222
223
|
export declare type ButtonProps = ButtonProps_2;
|
223
224
|
|
@@ -264,20 +265,22 @@ export declare interface ConfirmModalProps extends ModalProps {
|
|
264
265
|
content: string;
|
265
266
|
titleCancelBtn?: string;
|
266
267
|
titleSubmitBtn?: string;
|
267
|
-
typeIcon:
|
268
|
+
typeIcon: ConfirmModalType;
|
268
269
|
handleCancel?: () => void;
|
269
270
|
handleSubmit?: () => void;
|
270
271
|
}
|
271
272
|
|
272
|
-
export declare
|
273
|
+
export declare type ConfirmModalType = "success" | "error" | "warning" | "info";
|
274
|
+
|
275
|
+
export declare const Container: default_2.FC<ContainerProps>;
|
273
276
|
|
274
277
|
export declare interface ContainerProps {
|
275
|
-
children:
|
278
|
+
children: default_2.ReactNode;
|
276
279
|
size?: TailwindMaxWidth;
|
277
280
|
className?: string;
|
278
281
|
}
|
279
282
|
|
280
|
-
declare type CustomInputTypeAttribute =
|
283
|
+
declare type CustomInputTypeAttribute = default_2.HTMLInputTypeAttribute | "money";
|
281
284
|
|
282
285
|
export declare interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "onChange"> {
|
283
286
|
field?: ControllerRenderProps<any, any>;
|
@@ -291,7 +294,7 @@ export declare interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "
|
|
291
294
|
label?: string;
|
292
295
|
maxDate?: Date;
|
293
296
|
showTimeSelect?: boolean;
|
294
|
-
customOnChange?: (date: any, event:
|
297
|
+
customOnChange?: (date: any, event: default_2.SyntheticEvent<any>) => void;
|
295
298
|
customValue?: Date | null;
|
296
299
|
size?: TSize;
|
297
300
|
}
|
@@ -334,7 +337,7 @@ declare class ErrorBoundaryClass extends Component<ErrorBoundaryProps, ErrorBoun
|
|
334
337
|
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
335
338
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
336
339
|
handleReload: () => void;
|
337
|
-
render():
|
340
|
+
render(): default_2.ReactNode;
|
338
341
|
}
|
339
342
|
|
340
343
|
export declare interface ErrorBoundaryProps {
|
@@ -347,7 +350,7 @@ export declare interface ErrorBoundaryState {
|
|
347
350
|
errorInfo: ErrorInfo | null;
|
348
351
|
}
|
349
352
|
|
350
|
-
export declare const ErrorMessage:
|
353
|
+
export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
|
351
354
|
|
352
355
|
export declare interface ErrorMessageProps {
|
353
356
|
errorMessage?: string;
|
@@ -390,8 +393,8 @@ export declare interface InputProps extends InputProps_2 {
|
|
390
393
|
customStyleInput?: string;
|
391
394
|
type?: CustomInputTypeAttribute;
|
392
395
|
afterOnChange?: (value: number | string | null) => void;
|
393
|
-
iconStartInput?:
|
394
|
-
iconEndInput?:
|
396
|
+
iconStartInput?: default_2.ReactNode;
|
397
|
+
iconEndInput?: default_2.ReactNode;
|
395
398
|
allowNegative?: boolean;
|
396
399
|
decimalScale?: number;
|
397
400
|
prefix?: string;
|
@@ -411,12 +414,12 @@ export declare interface LabelProps {
|
|
411
414
|
required?: boolean;
|
412
415
|
}
|
413
416
|
|
414
|
-
export declare const Layout:
|
415
|
-
Header:
|
416
|
-
Footer:
|
417
|
-
Content:
|
418
|
-
Sider:
|
419
|
-
_InternalSiderContext:
|
417
|
+
export declare const Layout: default_2.FC<LayoutProps> & {
|
418
|
+
Header: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
|
419
|
+
Footer: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
|
420
|
+
Content: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
|
421
|
+
Sider: default_2.ForwardRefExoticComponent<SiderProps & default_2.RefAttributes<HTMLDivElement>>;
|
422
|
+
_InternalSiderContext: default_2.Context<SiderContextProps>;
|
420
423
|
};
|
421
424
|
|
422
425
|
export declare type LayoutProps = BaseProps_8 & BasicProps;
|
@@ -442,11 +445,11 @@ declare type MultipleCascaderProps = CascaderProps<DefaultOptionType, string, tr
|
|
442
445
|
multiple: true;
|
443
446
|
};
|
444
447
|
|
445
|
-
export declare type OptionalArgsMessage = Partial<
|
446
|
-
type?:
|
448
|
+
export declare type OptionalArgsMessage = Partial<ArgsProps_2> & {
|
449
|
+
type?: ArgsProps_2["type"];
|
447
450
|
};
|
448
451
|
|
449
|
-
export declare type OptionalArgsToast = Partial<
|
452
|
+
export declare type OptionalArgsToast = Partial<ArgsProps> & {
|
450
453
|
message?: React.ReactNode;
|
451
454
|
};
|
452
455
|
|
@@ -564,7 +567,7 @@ export declare interface SearchFiltersFormProps<T extends FieldValues> {
|
|
564
567
|
setValue?: UseFormSetValue<T>;
|
565
568
|
handleSubmit?: FormEventHandler<any>;
|
566
569
|
reset?: UseFormReset<T>;
|
567
|
-
}) =>
|
570
|
+
}) => default_2.ReactNode;
|
568
571
|
onReset?: () => void;
|
569
572
|
classNamesContainer?: string;
|
570
573
|
classNameWrapperForm?: string;
|
@@ -658,14 +661,14 @@ export declare interface SwitchFieldProps extends Omit<SwitchProps, "onChange" |
|
|
658
661
|
|
659
662
|
declare type TabItem = {
|
660
663
|
key: string;
|
661
|
-
label:
|
662
|
-
children:
|
664
|
+
label: default_2.ReactNode;
|
665
|
+
children: default_2.ReactNode;
|
663
666
|
disabled?: boolean;
|
664
667
|
};
|
665
668
|
|
666
|
-
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave, ...rest }: TableCommonProps<T>) => JSX.Element;
|
669
|
+
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave, titleSettingTableModal, showSetting, setColumns, ...rest }: TableCommonProps<T>) => JSX.Element;
|
667
670
|
|
668
|
-
export declare type TableColumnsType<T> = TableColumnsType_2<T>;
|
671
|
+
export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
|
669
672
|
|
670
673
|
export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
|
671
674
|
editable?: boolean;
|
@@ -673,23 +676,26 @@ export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
|
|
673
676
|
|
674
677
|
export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
|
675
678
|
dataSource: T[];
|
676
|
-
columns: TableColumnsType<T
|
679
|
+
columns: TableColumnsType<T>;
|
677
680
|
loading?: boolean;
|
678
681
|
totalItems: number;
|
679
682
|
filters: any;
|
680
683
|
onChangePage: (page: number) => void;
|
681
684
|
onChangePageSize: (size: number) => void;
|
682
685
|
onSort?: (sortField: string | number | symbol) => void;
|
683
|
-
rowsSelected?:
|
684
|
-
onSelect: (newSelectedRowKeys:
|
686
|
+
rowsSelected?: default_2.Key[];
|
687
|
+
onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
|
685
688
|
onRowClick?: (record: T) => void;
|
686
689
|
rowKey?: string | ((record: T) => string);
|
687
690
|
className?: string;
|
688
691
|
editable?: boolean;
|
689
692
|
onSave?: (data: T) => void;
|
693
|
+
titleSettingTableModal?: string;
|
694
|
+
showSetting?: boolean;
|
695
|
+
setColumns?: (newColumns: TableColumnsType<T>) => void;
|
690
696
|
}
|
691
697
|
|
692
|
-
export declare const Tabs:
|
698
|
+
export declare const Tabs: default_2.FC<TabsProps>;
|
693
699
|
|
694
700
|
export declare type TabsProps = TabsProps_2 & {
|
695
701
|
items: TabItem[];
|
@@ -735,7 +741,7 @@ export declare interface TinyProps extends IAllProps {
|
|
735
741
|
text_patterns?: any;
|
736
742
|
}
|
737
743
|
|
738
|
-
export declare const Tooltip:
|
744
|
+
export declare const Tooltip: default_2.FC<TooltipProps>;
|
739
745
|
|
740
746
|
export declare type TooltipProps = TooltipProps_2;
|
741
747
|
|
@@ -779,13 +785,13 @@ export declare interface UploadFieldProps extends Omit<UploadProps, "value" | "o
|
|
779
785
|
|
780
786
|
export declare const useFiltersHandler: <T>(initialFilters: InitialFiltersSearch<T>) => {
|
781
787
|
filters: InitialFiltersSearch<T>;
|
782
|
-
rowsSelected:
|
783
|
-
setRowsSelected:
|
784
|
-
setFilters:
|
788
|
+
rowsSelected: default_2.Key[];
|
789
|
+
setRowsSelected: default_2.Dispatch<default_2.SetStateAction<default_2.Key[]>>;
|
790
|
+
setFilters: default_2.Dispatch<default_2.SetStateAction<InitialFiltersSearch<T>>>;
|
785
791
|
goToPage: (PageIndex: number) => void;
|
786
792
|
changeRowlimit: (value: number) => void;
|
787
793
|
resetToInitialFilters: () => void;
|
788
|
-
handleCheckBox: (newSelectedRowKeys:
|
794
|
+
handleCheckBox: (newSelectedRowKeys: default_2.Key[]) => void;
|
789
795
|
handleChangePage: (nextPage: number) => void;
|
790
796
|
handleRequestSort: (sortField: string | number | symbol) => void;
|
791
797
|
handleSearch: (nextFilters: InitialFiltersSearch<T>) => void;
|
package/types/ui.d.ts
CHANGED
@@ -17,8 +17,8 @@ import { ColProps as ColProps_2 } from 'antd';
|
|
17
17
|
import { ColSize } from 'antd/es/grid';
|
18
18
|
import { Component } from 'react';
|
19
19
|
import { Control } from 'react-hook-form';
|
20
|
-
import { default as default_2 } from '
|
21
|
-
import { default as default_3 } from '
|
20
|
+
import { default as default_2 } from 'react';
|
21
|
+
import { default as default_3 } from 'antd/es/anchor/AnchorLink';
|
22
22
|
import { DefaultOptionType } from 'antd/es/cascader';
|
23
23
|
import { DefaultValues } from 'react-hook-form';
|
24
24
|
import { DividerProps as DividerProps_2 } from 'antd';
|
@@ -86,7 +86,7 @@ export declare const Alert: React.FC<AlertProps>;
|
|
86
86
|
export declare type AlertProps = AlertProps_2;
|
87
87
|
|
88
88
|
export declare const Anchor: typeof Anchor_2 & {
|
89
|
-
Link: typeof
|
89
|
+
Link: typeof default_3;
|
90
90
|
};
|
91
91
|
|
92
92
|
export declare type AnchorPropsUnion = BaseProps_13 & AnchorProps;
|
@@ -94,7 +94,7 @@ export declare type AnchorPropsUnion = BaseProps_13 & AnchorProps;
|
|
94
94
|
export declare const Appfix: ({ children, ...rest }: AppfixProps) => JSX.Element;
|
95
95
|
|
96
96
|
export declare interface AppfixProps extends AffixProps {
|
97
|
-
children:
|
97
|
+
children: default_2.ReactNode;
|
98
98
|
}
|
99
99
|
|
100
100
|
export declare const AutoComplete: React.FC<AutoCompleteProps>;
|
@@ -183,22 +183,23 @@ export declare type BreadcrumbPropsUnion = BaseProps_6 & BreadcrumbProps;
|
|
183
183
|
|
184
184
|
export declare type BreadcrumbSeparatorType = BreadcrumbSeparatorType_2;
|
185
185
|
|
186
|
-
export declare const BulkAction: ({ quantity,
|
186
|
+
export declare const BulkAction: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: BulkActionProps) => JSX.Element;
|
187
187
|
|
188
188
|
export declare interface BulkActionProps {
|
189
189
|
quantity: number;
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
190
|
+
handleRestore?: () => void;
|
191
|
+
handleSendApproval?: () => void;
|
192
|
+
handleCancelSendApproval?: () => void;
|
193
|
+
handleRefuseApproval?: () => void;
|
194
|
+
handleApproval?: () => void;
|
195
|
+
handleCancelApproval?: () => void;
|
196
196
|
handleDelete?: () => void;
|
197
|
-
|
198
|
-
|
197
|
+
handleActivate?: () => void;
|
198
|
+
handleInActivate?: () => void;
|
199
|
+
status?: number;
|
199
200
|
}
|
200
201
|
|
201
|
-
export declare const Button:
|
202
|
+
export declare const Button: default_2.FC<ButtonProps>;
|
202
203
|
|
203
204
|
export declare type ButtonProps = ButtonProps_2;
|
204
205
|
|
@@ -231,15 +232,17 @@ export declare interface ConfirmModalProps extends ModalProps {
|
|
231
232
|
content: string;
|
232
233
|
titleCancelBtn?: string;
|
233
234
|
titleSubmitBtn?: string;
|
234
|
-
typeIcon:
|
235
|
+
typeIcon: ConfirmModalType;
|
235
236
|
handleCancel?: () => void;
|
236
237
|
handleSubmit?: () => void;
|
237
238
|
}
|
238
239
|
|
239
|
-
export declare
|
240
|
+
export declare type ConfirmModalType = "success" | "error" | "warning" | "info";
|
241
|
+
|
242
|
+
export declare const Container: default_2.FC<ContainerProps>;
|
240
243
|
|
241
244
|
export declare interface ContainerProps {
|
242
|
-
children:
|
245
|
+
children: default_2.ReactNode;
|
243
246
|
size?: TailwindMaxWidth;
|
244
247
|
className?: string;
|
245
248
|
}
|
@@ -280,7 +283,7 @@ declare class ErrorBoundaryClass extends Component<ErrorBoundaryProps, ErrorBoun
|
|
280
283
|
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
281
284
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
282
285
|
handleReload: () => void;
|
283
|
-
render():
|
286
|
+
render(): default_2.ReactNode;
|
284
287
|
}
|
285
288
|
|
286
289
|
export declare interface ErrorBoundaryProps {
|
@@ -293,7 +296,7 @@ export declare interface ErrorBoundaryState {
|
|
293
296
|
errorInfo: ErrorInfo | null;
|
294
297
|
}
|
295
298
|
|
296
|
-
export declare const ErrorMessage:
|
299
|
+
export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
|
297
300
|
|
298
301
|
export declare interface ErrorMessageProps {
|
299
302
|
errorMessage?: string;
|
@@ -338,12 +341,12 @@ export declare interface LabelProps {
|
|
338
341
|
required?: boolean;
|
339
342
|
}
|
340
343
|
|
341
|
-
export declare const Layout:
|
342
|
-
Header:
|
343
|
-
Footer:
|
344
|
-
Content:
|
345
|
-
Sider:
|
346
|
-
_InternalSiderContext:
|
344
|
+
export declare const Layout: default_2.FC<LayoutProps> & {
|
345
|
+
Header: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
|
346
|
+
Footer: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
|
347
|
+
Content: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
|
348
|
+
Sider: default_2.ForwardRefExoticComponent<SiderProps & default_2.RefAttributes<HTMLDivElement>>;
|
349
|
+
_InternalSiderContext: default_2.Context<SiderContextProps>;
|
347
350
|
};
|
348
351
|
|
349
352
|
export declare type LayoutProps = BaseProps_8 & BasicProps;
|
@@ -431,7 +434,7 @@ export declare interface SearchFiltersFormProps<T extends FieldValues> {
|
|
431
434
|
setValue?: UseFormSetValue<T>;
|
432
435
|
handleSubmit?: FormEventHandler<any>;
|
433
436
|
reset?: UseFormReset<T>;
|
434
|
-
}) =>
|
437
|
+
}) => default_2.ReactNode;
|
435
438
|
onReset?: () => void;
|
436
439
|
classNamesContainer?: string;
|
437
440
|
classNameWrapperForm?: string;
|
@@ -503,14 +506,14 @@ export declare type SubMenuProps = SubMenuProps_2;
|
|
503
506
|
|
504
507
|
declare type TabItem = {
|
505
508
|
key: string;
|
506
|
-
label:
|
507
|
-
children:
|
509
|
+
label: default_2.ReactNode;
|
510
|
+
children: default_2.ReactNode;
|
508
511
|
disabled?: boolean;
|
509
512
|
};
|
510
513
|
|
511
|
-
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave, ...rest }: TableCommonProps<T>) => JSX.Element;
|
514
|
+
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave, titleSettingTableModal, showSetting, setColumns, ...rest }: TableCommonProps<T>) => JSX.Element;
|
512
515
|
|
513
|
-
export declare type TableColumnsType<T> = TableColumnsType_2<T>;
|
516
|
+
export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
|
514
517
|
|
515
518
|
export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
|
516
519
|
editable?: boolean;
|
@@ -518,23 +521,26 @@ export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
|
|
518
521
|
|
519
522
|
export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
|
520
523
|
dataSource: T[];
|
521
|
-
columns: TableColumnsType<T
|
524
|
+
columns: TableColumnsType<T>;
|
522
525
|
loading?: boolean;
|
523
526
|
totalItems: number;
|
524
527
|
filters: any;
|
525
528
|
onChangePage: (page: number) => void;
|
526
529
|
onChangePageSize: (size: number) => void;
|
527
530
|
onSort?: (sortField: string | number | symbol) => void;
|
528
|
-
rowsSelected?:
|
529
|
-
onSelect: (newSelectedRowKeys:
|
531
|
+
rowsSelected?: default_2.Key[];
|
532
|
+
onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
|
530
533
|
onRowClick?: (record: T) => void;
|
531
534
|
rowKey?: string | ((record: T) => string);
|
532
535
|
className?: string;
|
533
536
|
editable?: boolean;
|
534
537
|
onSave?: (data: T) => void;
|
538
|
+
titleSettingTableModal?: string;
|
539
|
+
showSetting?: boolean;
|
540
|
+
setColumns?: (newColumns: TableColumnsType<T>) => void;
|
535
541
|
}
|
536
542
|
|
537
|
-
export declare const Tabs:
|
543
|
+
export declare const Tabs: default_2.FC<TabsProps>;
|
538
544
|
|
539
545
|
export declare type TabsProps = TabsProps_2 & {
|
540
546
|
items: TabItem[];
|
@@ -553,7 +559,7 @@ export declare const Timeline: React.FC<TimelineProps>;
|
|
553
559
|
|
554
560
|
export declare type TimelineProps = TimelineProps_2;
|
555
561
|
|
556
|
-
export declare const Tooltip:
|
562
|
+
export declare const Tooltip: default_2.FC<TooltipProps>;
|
557
563
|
|
558
564
|
export declare type TooltipProps = TooltipProps_2;
|
559
565
|
|