@pnkx-lib/ui 1.9.6 → 1.9.7
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/dist/style.css +1 -1
- package/es/chunks/{ErrorBoundary-C_kJ-GaS.js → CategoryStatus-vAUuA6Yb.js} +2069 -99
- package/es/chunks/{Radio-D2me1zZ-.js → Radio-DA0U4ozV.js} +1 -1
- package/es/chunks/{Switch-za5Skgtp.js → Switch-DQm0didM.js} +30 -44
- package/es/fields/index.js +2 -2
- package/es/index.js +3 -4
- package/es/ui/index.js +2 -3
- package/package.json +4 -4
- package/types/hooks.d.ts +5 -5
- package/types/index.d.ts +38 -41
- package/types/ui.d.ts +25 -28
@@ -1,4 +1,4 @@
|
|
1
|
-
import { g as get, j as jsxRuntimeExports, L as Label, E as ErrorMessage, T as Typography } from './Switch-
|
1
|
+
import { g as get, j as jsxRuntimeExports, L as Label, E as ErrorMessage, T as Typography } from './Switch-DQm0didM.js';
|
2
2
|
import { Select as Select$1, Radio } from 'antd';
|
3
3
|
|
4
4
|
const Select = (props) => {
|
@@ -3495,8 +3495,6 @@ var getProxyFormState = (formState, control, localProxyFormState, isRoot = true)
|
|
3495
3495
|
return result;
|
3496
3496
|
};
|
3497
3497
|
|
3498
|
-
const useIsomorphicLayoutEffect$1 = typeof window !== 'undefined' ? React.useLayoutEffect : React.useEffect;
|
3499
|
-
|
3500
3498
|
/**
|
3501
3499
|
* This custom hook allows you to subscribe to each form state, and isolate the re-render at the custom hook level. It has its scope in terms of form state subscription, so it would not affect other useFormState and useForm. Using this hook can reduce the re-render impact on large and complex form application.
|
3502
3500
|
*
|
@@ -3541,8 +3539,10 @@ function useFormState(props) {
|
|
3541
3539
|
isValid: false,
|
3542
3540
|
errors: false,
|
3543
3541
|
});
|
3544
|
-
|
3545
|
-
|
3542
|
+
const _name = React__default.useRef(name);
|
3543
|
+
_name.current = name;
|
3544
|
+
React__default.useEffect(() => control._subscribe({
|
3545
|
+
name: _name.current,
|
3546
3546
|
formState: _localProxyFormState.current,
|
3547
3547
|
exact,
|
3548
3548
|
callback: (formState) => {
|
@@ -3552,7 +3552,7 @@ function useFormState(props) {
|
|
3552
3552
|
...formState,
|
3553
3553
|
});
|
3554
3554
|
},
|
3555
|
-
}), [
|
3555
|
+
}), [control, disabled, exact]);
|
3556
3556
|
React__default.useEffect(() => {
|
3557
3557
|
_localProxyFormState.current.isValid && control._setValid(true);
|
3558
3558
|
}, [control]);
|
@@ -3592,17 +3592,19 @@ var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) =>
|
|
3592
3592
|
function useWatch(props) {
|
3593
3593
|
const methods = useFormContext();
|
3594
3594
|
const { control = methods.control, name, defaultValue, disabled, exact, } = props || {};
|
3595
|
+
const _name = React__default.useRef(name);
|
3595
3596
|
const _defaultValue = React__default.useRef(defaultValue);
|
3596
|
-
|
3597
|
-
|
3598
|
-
name:
|
3597
|
+
_name.current = name;
|
3598
|
+
React__default.useEffect(() => control._subscribe({
|
3599
|
+
name: _name.current,
|
3599
3600
|
formState: {
|
3600
3601
|
values: true,
|
3601
3602
|
},
|
3602
3603
|
exact,
|
3603
3604
|
callback: (formState) => !disabled &&
|
3604
|
-
updateValue(generateWatchOutput(
|
3605
|
-
}), [
|
3605
|
+
updateValue(generateWatchOutput(_name.current, control._names, formState.values || control._formValues, false, _defaultValue.current)),
|
3606
|
+
}), [control, disabled, exact]);
|
3607
|
+
const [value, updateValue] = React__default.useState(control._getWatch(name, defaultValue));
|
3606
3608
|
React__default.useEffect(() => control._removeUnmounted());
|
3607
3609
|
return value;
|
3608
3610
|
}
|
@@ -4418,7 +4420,6 @@ function createFormControl(props = {}) {
|
|
4418
4420
|
let _formState = {
|
4419
4421
|
submitCount: 0,
|
4420
4422
|
isDirty: false,
|
4421
|
-
isReady: false,
|
4422
4423
|
isLoading: isFunction$1(_options.defaultValues),
|
4423
4424
|
isValidating: false,
|
4424
4425
|
isSubmitted: false,
|
@@ -4433,7 +4434,7 @@ function createFormControl(props = {}) {
|
|
4433
4434
|
};
|
4434
4435
|
const _fields = {};
|
4435
4436
|
let _defaultValues = isObject(_options.defaultValues) || isObject(_options.values)
|
4436
|
-
? cloneObject(_options.
|
4437
|
+
? cloneObject(_options.values || _options.defaultValues) || {}
|
4437
4438
|
: {};
|
4438
4439
|
let _formValues = _options.shouldUnregister
|
4439
4440
|
? {}
|
@@ -5484,7 +5485,6 @@ function useForm(props = {}) {
|
|
5484
5485
|
validatingFields: {},
|
5485
5486
|
errors: props.errors || {},
|
5486
5487
|
disabled: props.disabled || false,
|
5487
|
-
isReady: false,
|
5488
5488
|
defaultValues: isFunction$1(props.defaultValues)
|
5489
5489
|
? undefined
|
5490
5490
|
: props.defaultValues,
|
@@ -5502,37 +5502,12 @@ function useForm(props = {}) {
|
|
5502
5502
|
}
|
5503
5503
|
const control = _formControl.current.control;
|
5504
5504
|
control._options = props;
|
5505
|
-
|
5506
|
-
|
5507
|
-
|
5508
|
-
|
5509
|
-
|
5510
|
-
});
|
5511
|
-
updateFormState((data) => ({
|
5512
|
-
...data,
|
5513
|
-
isReady: true,
|
5514
|
-
}));
|
5515
|
-
control._formState.isReady = true;
|
5516
|
-
return sub;
|
5517
|
-
}, [control]);
|
5505
|
+
React__default.useLayoutEffect(() => control._subscribe({
|
5506
|
+
formState: control._proxyFormState,
|
5507
|
+
callback: () => updateFormState({ ...control._formState }),
|
5508
|
+
reRenderRoot: true,
|
5509
|
+
}), [control]);
|
5518
5510
|
React__default.useEffect(() => control._disableForm(props.disabled), [control, props.disabled]);
|
5519
|
-
React__default.useEffect(() => {
|
5520
|
-
if (props.mode) {
|
5521
|
-
control._options.mode = props.mode;
|
5522
|
-
}
|
5523
|
-
if (props.reValidateMode) {
|
5524
|
-
control._options.reValidateMode = props.reValidateMode;
|
5525
|
-
}
|
5526
|
-
if (props.errors && !isEmptyObject(props.errors)) {
|
5527
|
-
control._setErrors(props.errors);
|
5528
|
-
}
|
5529
|
-
}, [control, props.errors, props.mode, props.reValidateMode]);
|
5530
|
-
React__default.useEffect(() => {
|
5531
|
-
props.shouldUnregister &&
|
5532
|
-
control._subjects.state.next({
|
5533
|
-
values: control._getWatch(),
|
5534
|
-
});
|
5535
|
-
}, [control, props.shouldUnregister]);
|
5536
5511
|
React__default.useEffect(() => {
|
5537
5512
|
if (control._proxyFormState.isDirty) {
|
5538
5513
|
const isDirty = control._getDirty();
|
@@ -5552,7 +5527,12 @@ function useForm(props = {}) {
|
|
5552
5527
|
else {
|
5553
5528
|
control._resetDefaultValues();
|
5554
5529
|
}
|
5555
|
-
}, [
|
5530
|
+
}, [props.values, control]);
|
5531
|
+
React__default.useEffect(() => {
|
5532
|
+
if (props.errors && !isEmptyObject(props.errors)) {
|
5533
|
+
control._setErrors(props.errors);
|
5534
|
+
}
|
5535
|
+
}, [props.errors, control]);
|
5556
5536
|
React__default.useEffect(() => {
|
5557
5537
|
if (!control._state.mount) {
|
5558
5538
|
control._setValid();
|
@@ -5564,6 +5544,12 @@ function useForm(props = {}) {
|
|
5564
5544
|
}
|
5565
5545
|
control._removeUnmounted();
|
5566
5546
|
});
|
5547
|
+
React__default.useEffect(() => {
|
5548
|
+
props.shouldUnregister &&
|
5549
|
+
control._subjects.state.next({
|
5550
|
+
values: control._getWatch(),
|
5551
|
+
});
|
5552
|
+
}, [props.shouldUnregister, control]);
|
5567
5553
|
_formControl.current.formState = getProxyFormState(formState, control);
|
5568
5554
|
return _formControl.current;
|
5569
5555
|
}
|
package/es/fields/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export { C as CheckboxField, D as DatePickerField, I as Input, P as PnkxField, R as RangePickerField, a as TinyMCE } from '../chunks/Switch-
|
2
|
-
export { R as RadioGroup, S as Select } from '../chunks/Radio-
|
1
|
+
export { C as CheckboxField, D as DatePickerField, I as Input, P as PnkxField, R as RangePickerField, a as TinyMCE } from '../chunks/Switch-DQm0didM.js';
|
2
|
+
export { R as RadioGroup, S as Select } from '../chunks/Radio-DA0U4ozV.js';
|
package/es/index.js
CHANGED
@@ -1,6 +1,5 @@
|
|
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/
|
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-
|
3
|
-
|
4
|
-
export { R as RadioGroup, S as Select } from './chunks/Radio-D2me1zZ-.js';
|
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/CategoryStatus-vAUuA6Yb.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-DQm0didM.js';
|
3
|
+
export { R as RadioGroup, S as Select } from './chunks/Radio-DA0U4ozV.js';
|
5
4
|
export { u as useToast } from './chunks/cloneDeep-BLYi2V0G.js';
|
6
5
|
export { u as useFiltersHandler, a as useMessage } from './chunks/useMessage-D_-VT5B4.js';
|
package/es/ui/index.js
CHANGED
@@ -1,3 +1,2 @@
|
|
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/
|
2
|
-
export { E as ErrorMessage, L as Label, T as Typography } from '../chunks/Switch-
|
3
|
-
import 'react-router';
|
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/CategoryStatus-vAUuA6Yb.js';
|
2
|
+
export { E as ErrorMessage, L as Label, T as Typography } from '../chunks/Switch-DQm0didM.js';
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pnkx-lib/ui",
|
3
3
|
"private": false,
|
4
|
-
"version": "1.9.
|
4
|
+
"version": "1.9.7",
|
5
5
|
"type": "module",
|
6
6
|
"main": "./es/index.js",
|
7
7
|
"module": "./es/index.js",
|
@@ -85,8 +85,7 @@
|
|
85
85
|
"antd": "^5.24.4",
|
86
86
|
"react": "^18.3.1",
|
87
87
|
"react-dom": "^18.3.1",
|
88
|
-
"tailwindcss": "^4.0.17"
|
89
|
-
"react-router": "^7.6.0"
|
88
|
+
"tailwindcss": "^4.0.17"
|
90
89
|
},
|
91
90
|
"dependencies": {
|
92
91
|
"@ant-design/icons": "^5.6.1",
|
@@ -107,8 +106,9 @@
|
|
107
106
|
"react-datepicker": "^4.16.0",
|
108
107
|
"react-hook-form": "^7.54.2",
|
109
108
|
"react-number-format": "^5.4.3",
|
109
|
+
"react-router": "^7.6.0",
|
110
110
|
"tailwind-merge": "^3.3.0",
|
111
111
|
"yup": "^1.6.1",
|
112
112
|
"zustand": "^5.0.3"
|
113
113
|
}
|
114
|
-
}
|
114
|
+
}
|
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/lib/message';
|
2
|
+
import { ArgsProps as ArgsProps_2 } from 'antd/es/notification';
|
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> & {
|
8
|
+
type?: ArgsProps["type"];
|
9
9
|
};
|
10
10
|
|
11
|
-
export declare type OptionalArgsToast = Partial<
|
11
|
+
export declare type OptionalArgsToast = Partial<ArgsProps_2> & {
|
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/lib/message';
|
6
|
+
import { ArgsProps as ArgsProps_2 } from 'antd/es/notification';
|
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 'antd/es/anchor/AnchorLink';
|
27
|
+
import { default as default_3 } from 'react';
|
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_2;
|
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_3.ReactNode;
|
117
117
|
}
|
118
118
|
|
119
119
|
export declare const AutoComplete: React.FC<AutoCompleteProps>;
|
@@ -218,7 +218,7 @@ export declare interface BulkActionProps {
|
|
218
218
|
status?: number;
|
219
219
|
}
|
220
220
|
|
221
|
-
export declare const Button:
|
221
|
+
export declare const Button: default_3.FC<ButtonProps>;
|
222
222
|
|
223
223
|
export declare type ButtonProps = ButtonProps_2;
|
224
224
|
|
@@ -272,15 +272,15 @@ export declare interface ConfirmModalProps extends ModalProps {
|
|
272
272
|
|
273
273
|
export declare type ConfirmModalType = "success" | "error" | "warning" | "info";
|
274
274
|
|
275
|
-
export declare const Container:
|
275
|
+
export declare const Container: default_3.FC<ContainerProps>;
|
276
276
|
|
277
277
|
export declare interface ContainerProps {
|
278
|
-
children:
|
278
|
+
children: default_3.ReactNode;
|
279
279
|
size?: TailwindMaxWidth;
|
280
280
|
className?: string;
|
281
281
|
}
|
282
282
|
|
283
|
-
declare type CustomInputTypeAttribute =
|
283
|
+
declare type CustomInputTypeAttribute = default_3.HTMLInputTypeAttribute | "money";
|
284
284
|
|
285
285
|
export declare interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "onChange"> {
|
286
286
|
field?: ControllerRenderProps<any, any>;
|
@@ -294,7 +294,7 @@ export declare interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "
|
|
294
294
|
label?: string;
|
295
295
|
maxDate?: Date;
|
296
296
|
showTimeSelect?: boolean;
|
297
|
-
customOnChange?: (date: any, event:
|
297
|
+
customOnChange?: (date: any, event: default_3.SyntheticEvent<any>) => void;
|
298
298
|
customValue?: Date | null;
|
299
299
|
size?: TSize;
|
300
300
|
}
|
@@ -337,7 +337,7 @@ declare class ErrorBoundaryClass extends Component<ErrorBoundaryProps, ErrorBoun
|
|
337
337
|
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
338
338
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
339
339
|
handleReload: () => void;
|
340
|
-
render():
|
340
|
+
render(): default_3.ReactNode;
|
341
341
|
}
|
342
342
|
|
343
343
|
export declare interface ErrorBoundaryProps {
|
@@ -350,7 +350,7 @@ export declare interface ErrorBoundaryState {
|
|
350
350
|
errorInfo: ErrorInfo | null;
|
351
351
|
}
|
352
352
|
|
353
|
-
export declare const ErrorMessage:
|
353
|
+
export declare const ErrorMessage: default_3.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
|
354
354
|
|
355
355
|
export declare interface ErrorMessageProps {
|
356
356
|
errorMessage?: string;
|
@@ -393,8 +393,8 @@ export declare interface InputProps extends InputProps_2 {
|
|
393
393
|
customStyleInput?: string;
|
394
394
|
type?: CustomInputTypeAttribute;
|
395
395
|
afterOnChange?: (value: number | string | null) => void;
|
396
|
-
iconStartInput?:
|
397
|
-
iconEndInput?:
|
396
|
+
iconStartInput?: default_3.ReactNode;
|
397
|
+
iconEndInput?: default_3.ReactNode;
|
398
398
|
allowNegative?: boolean;
|
399
399
|
decimalScale?: number;
|
400
400
|
prefix?: string;
|
@@ -414,12 +414,12 @@ export declare interface LabelProps {
|
|
414
414
|
required?: boolean;
|
415
415
|
}
|
416
416
|
|
417
|
-
export declare const Layout:
|
418
|
-
Header:
|
419
|
-
Footer:
|
420
|
-
Content:
|
421
|
-
Sider:
|
422
|
-
_InternalSiderContext:
|
417
|
+
export declare const Layout: default_3.FC<LayoutProps> & {
|
418
|
+
Header: default_3.ForwardRefExoticComponent<BasicProps & default_3.RefAttributes<HTMLElement>>;
|
419
|
+
Footer: default_3.ForwardRefExoticComponent<BasicProps & default_3.RefAttributes<HTMLElement>>;
|
420
|
+
Content: default_3.ForwardRefExoticComponent<BasicProps & default_3.RefAttributes<HTMLElement>>;
|
421
|
+
Sider: default_3.ForwardRefExoticComponent<SiderProps & default_3.RefAttributes<HTMLDivElement>>;
|
422
|
+
_InternalSiderContext: default_3.Context<SiderContextProps>;
|
423
423
|
};
|
424
424
|
|
425
425
|
export declare type LayoutProps = BaseProps_8 & BasicProps;
|
@@ -445,11 +445,11 @@ declare type MultipleCascaderProps = CascaderProps<DefaultOptionType, string, tr
|
|
445
445
|
multiple: true;
|
446
446
|
};
|
447
447
|
|
448
|
-
export declare type OptionalArgsMessage = Partial<
|
449
|
-
type?:
|
448
|
+
export declare type OptionalArgsMessage = Partial<ArgsProps> & {
|
449
|
+
type?: ArgsProps["type"];
|
450
450
|
};
|
451
451
|
|
452
|
-
export declare type OptionalArgsToast = Partial<
|
452
|
+
export declare type OptionalArgsToast = Partial<ArgsProps_2> & {
|
453
453
|
message?: React.ReactNode;
|
454
454
|
};
|
455
455
|
|
@@ -567,7 +567,7 @@ export declare interface SearchFiltersFormProps<T extends FieldValues> {
|
|
567
567
|
setValue?: UseFormSetValue<T>;
|
568
568
|
handleSubmit?: FormEventHandler<any>;
|
569
569
|
reset?: UseFormReset<T>;
|
570
|
-
}) =>
|
570
|
+
}) => default_3.ReactNode;
|
571
571
|
onReset?: () => void;
|
572
572
|
classNamesContainer?: string;
|
573
573
|
classNameWrapperForm?: string;
|
@@ -661,14 +661,14 @@ export declare interface SwitchFieldProps extends Omit<SwitchProps, "onChange" |
|
|
661
661
|
|
662
662
|
declare type TabItem = {
|
663
663
|
key: string;
|
664
|
-
label:
|
665
|
-
children:
|
664
|
+
label: default_3.ReactNode;
|
665
|
+
children: default_3.ReactNode;
|
666
666
|
disabled?: boolean;
|
667
667
|
};
|
668
668
|
|
669
|
-
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave,
|
669
|
+
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;
|
670
670
|
|
671
|
-
export declare type TableColumnsType<T> = TableColumnsType_2<T
|
671
|
+
export declare type TableColumnsType<T> = TableColumnsType_2<T>;
|
672
672
|
|
673
673
|
export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
|
674
674
|
editable?: boolean;
|
@@ -676,26 +676,23 @@ export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
|
|
676
676
|
|
677
677
|
export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
|
678
678
|
dataSource: T[];
|
679
|
-
columns: TableColumnsType<T>;
|
679
|
+
columns: TableColumnsType<T> | TableColumnsTypeEditable<T>;
|
680
680
|
loading?: boolean;
|
681
681
|
totalItems: number;
|
682
682
|
filters: any;
|
683
683
|
onChangePage: (page: number) => void;
|
684
684
|
onChangePageSize: (size: number) => void;
|
685
685
|
onSort?: (sortField: string | number | symbol) => void;
|
686
|
-
rowsSelected?:
|
687
|
-
onSelect: (newSelectedRowKeys:
|
686
|
+
rowsSelected?: default_3.Key[];
|
687
|
+
onSelect: (newSelectedRowKeys: default_3.Key[]) => void;
|
688
688
|
onRowClick?: (record: T) => void;
|
689
689
|
rowKey?: string | ((record: T) => string);
|
690
690
|
className?: string;
|
691
691
|
editable?: boolean;
|
692
692
|
onSave?: (data: T) => void;
|
693
|
-
titleSettingTableModal?: string;
|
694
|
-
showSetting?: boolean;
|
695
|
-
setColumns?: (newColumns: TableColumnsType<T>) => void;
|
696
693
|
}
|
697
694
|
|
698
|
-
export declare const Tabs:
|
695
|
+
export declare const Tabs: default_3.FC<TabsProps>;
|
699
696
|
|
700
697
|
export declare type TabsProps = TabsProps_2 & {
|
701
698
|
items: TabItem[];
|
@@ -741,7 +738,7 @@ export declare interface TinyProps extends IAllProps {
|
|
741
738
|
text_patterns?: any;
|
742
739
|
}
|
743
740
|
|
744
|
-
export declare const Tooltip:
|
741
|
+
export declare const Tooltip: default_3.FC<TooltipProps>;
|
745
742
|
|
746
743
|
export declare type TooltipProps = TooltipProps_2;
|
747
744
|
|
@@ -785,13 +782,13 @@ export declare interface UploadFieldProps extends Omit<UploadProps, "value" | "o
|
|
785
782
|
|
786
783
|
export declare const useFiltersHandler: <T>(initialFilters: InitialFiltersSearch<T>) => {
|
787
784
|
filters: InitialFiltersSearch<T>;
|
788
|
-
rowsSelected:
|
789
|
-
setRowsSelected:
|
790
|
-
setFilters:
|
785
|
+
rowsSelected: default_3.Key[];
|
786
|
+
setRowsSelected: default_3.Dispatch<default_3.SetStateAction<default_3.Key[]>>;
|
787
|
+
setFilters: default_3.Dispatch<default_3.SetStateAction<InitialFiltersSearch<T>>>;
|
791
788
|
goToPage: (PageIndex: number) => void;
|
792
789
|
changeRowlimit: (value: number) => void;
|
793
790
|
resetToInitialFilters: () => void;
|
794
|
-
handleCheckBox: (newSelectedRowKeys:
|
791
|
+
handleCheckBox: (newSelectedRowKeys: default_3.Key[]) => void;
|
795
792
|
handleChangePage: (nextPage: number) => void;
|
796
793
|
handleRequestSort: (sortField: string | number | symbol) => void;
|
797
794
|
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 'antd/es/anchor/AnchorLink';
|
21
|
+
import { default as default_3 } from 'react';
|
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_2;
|
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_3.ReactNode;
|
98
98
|
}
|
99
99
|
|
100
100
|
export declare const AutoComplete: React.FC<AutoCompleteProps>;
|
@@ -199,7 +199,7 @@ export declare interface BulkActionProps {
|
|
199
199
|
status?: number;
|
200
200
|
}
|
201
201
|
|
202
|
-
export declare const Button:
|
202
|
+
export declare const Button: default_3.FC<ButtonProps>;
|
203
203
|
|
204
204
|
export declare type ButtonProps = ButtonProps_2;
|
205
205
|
|
@@ -239,10 +239,10 @@ export declare interface ConfirmModalProps extends ModalProps {
|
|
239
239
|
|
240
240
|
export declare type ConfirmModalType = "success" | "error" | "warning" | "info";
|
241
241
|
|
242
|
-
export declare const Container:
|
242
|
+
export declare const Container: default_3.FC<ContainerProps>;
|
243
243
|
|
244
244
|
export declare interface ContainerProps {
|
245
|
-
children:
|
245
|
+
children: default_3.ReactNode;
|
246
246
|
size?: TailwindMaxWidth;
|
247
247
|
className?: string;
|
248
248
|
}
|
@@ -283,7 +283,7 @@ declare class ErrorBoundaryClass extends Component<ErrorBoundaryProps, ErrorBoun
|
|
283
283
|
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
284
284
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
285
285
|
handleReload: () => void;
|
286
|
-
render():
|
286
|
+
render(): default_3.ReactNode;
|
287
287
|
}
|
288
288
|
|
289
289
|
export declare interface ErrorBoundaryProps {
|
@@ -296,7 +296,7 @@ export declare interface ErrorBoundaryState {
|
|
296
296
|
errorInfo: ErrorInfo | null;
|
297
297
|
}
|
298
298
|
|
299
|
-
export declare const ErrorMessage:
|
299
|
+
export declare const ErrorMessage: default_3.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
|
300
300
|
|
301
301
|
export declare interface ErrorMessageProps {
|
302
302
|
errorMessage?: string;
|
@@ -341,12 +341,12 @@ export declare interface LabelProps {
|
|
341
341
|
required?: boolean;
|
342
342
|
}
|
343
343
|
|
344
|
-
export declare const Layout:
|
345
|
-
Header:
|
346
|
-
Footer:
|
347
|
-
Content:
|
348
|
-
Sider:
|
349
|
-
_InternalSiderContext:
|
344
|
+
export declare const Layout: default_3.FC<LayoutProps> & {
|
345
|
+
Header: default_3.ForwardRefExoticComponent<BasicProps & default_3.RefAttributes<HTMLElement>>;
|
346
|
+
Footer: default_3.ForwardRefExoticComponent<BasicProps & default_3.RefAttributes<HTMLElement>>;
|
347
|
+
Content: default_3.ForwardRefExoticComponent<BasicProps & default_3.RefAttributes<HTMLElement>>;
|
348
|
+
Sider: default_3.ForwardRefExoticComponent<SiderProps & default_3.RefAttributes<HTMLDivElement>>;
|
349
|
+
_InternalSiderContext: default_3.Context<SiderContextProps>;
|
350
350
|
};
|
351
351
|
|
352
352
|
export declare type LayoutProps = BaseProps_8 & BasicProps;
|
@@ -434,7 +434,7 @@ export declare interface SearchFiltersFormProps<T extends FieldValues> {
|
|
434
434
|
setValue?: UseFormSetValue<T>;
|
435
435
|
handleSubmit?: FormEventHandler<any>;
|
436
436
|
reset?: UseFormReset<T>;
|
437
|
-
}) =>
|
437
|
+
}) => default_3.ReactNode;
|
438
438
|
onReset?: () => void;
|
439
439
|
classNamesContainer?: string;
|
440
440
|
classNameWrapperForm?: string;
|
@@ -506,14 +506,14 @@ export declare type SubMenuProps = SubMenuProps_2;
|
|
506
506
|
|
507
507
|
declare type TabItem = {
|
508
508
|
key: string;
|
509
|
-
label:
|
510
|
-
children:
|
509
|
+
label: default_3.ReactNode;
|
510
|
+
children: default_3.ReactNode;
|
511
511
|
disabled?: boolean;
|
512
512
|
};
|
513
513
|
|
514
|
-
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave,
|
514
|
+
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;
|
515
515
|
|
516
|
-
export declare type TableColumnsType<T> = TableColumnsType_2<T
|
516
|
+
export declare type TableColumnsType<T> = TableColumnsType_2<T>;
|
517
517
|
|
518
518
|
export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
|
519
519
|
editable?: boolean;
|
@@ -521,26 +521,23 @@ export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
|
|
521
521
|
|
522
522
|
export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
|
523
523
|
dataSource: T[];
|
524
|
-
columns: TableColumnsType<T>;
|
524
|
+
columns: TableColumnsType<T> | TableColumnsTypeEditable<T>;
|
525
525
|
loading?: boolean;
|
526
526
|
totalItems: number;
|
527
527
|
filters: any;
|
528
528
|
onChangePage: (page: number) => void;
|
529
529
|
onChangePageSize: (size: number) => void;
|
530
530
|
onSort?: (sortField: string | number | symbol) => void;
|
531
|
-
rowsSelected?:
|
532
|
-
onSelect: (newSelectedRowKeys:
|
531
|
+
rowsSelected?: default_3.Key[];
|
532
|
+
onSelect: (newSelectedRowKeys: default_3.Key[]) => void;
|
533
533
|
onRowClick?: (record: T) => void;
|
534
534
|
rowKey?: string | ((record: T) => string);
|
535
535
|
className?: string;
|
536
536
|
editable?: boolean;
|
537
537
|
onSave?: (data: T) => void;
|
538
|
-
titleSettingTableModal?: string;
|
539
|
-
showSetting?: boolean;
|
540
|
-
setColumns?: (newColumns: TableColumnsType<T>) => void;
|
541
538
|
}
|
542
539
|
|
543
|
-
export declare const Tabs:
|
540
|
+
export declare const Tabs: default_3.FC<TabsProps>;
|
544
541
|
|
545
542
|
export declare type TabsProps = TabsProps_2 & {
|
546
543
|
items: TabItem[];
|
@@ -559,7 +556,7 @@ export declare const Timeline: React.FC<TimelineProps>;
|
|
559
556
|
|
560
557
|
export declare type TimelineProps = TimelineProps_2;
|
561
558
|
|
562
|
-
export declare const Tooltip:
|
559
|
+
export declare const Tooltip: default_3.FC<TooltipProps>;
|
563
560
|
|
564
561
|
export declare type TooltipProps = TooltipProps_2;
|
565
562
|
|