@pnkx-lib/ui 1.9.14 → 1.9.16
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/{CategoryStatus-D8gu9DFK.js → CategoryStatus-5u7yUN20.js} +10 -6
- package/es/chunks/{Radio-DA0U4ozV.js → Radio-C3c5Olf1.js} +1 -1
- package/es/chunks/{Switch-DQm0didM.js → Switch-BUaKQ4cU.js} +83 -63
- 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 +35 -35
- package/types/ui.d.ts +22 -22
@@ -1,4 +1,4 @@
|
|
1
|
-
import { j as jsxRuntimeExports, b as Icon, _ as _extends, c as _typeof, P as PnkxField, C as CheckboxField, u as useForm, I as Input, d as classNames, e as _arrayLikeToArray, f as _unsupportedIterableToArray, w as warningOnce, h as _createClass, i as _classCallCheck, k as _defineProperty, l as _slicedToArray, m as warning$1, n as canUseDom, o as _objectSpread2, p as updateCSS, r as removeCSS, q as _arrayWithHoles, s as _nonIterableRest, t as resetWarned$1, F as FastColor, v as generate, x as presetPrimaryColors, y as presetPalettes, z as _inherits, A as _createSuper, B as _assertThisInitialized, G as _objectWithoutProperties, H as IconContext } from './Switch-
|
1
|
+
import { j as jsxRuntimeExports, b as Icon, _ as _extends, c as _typeof, P as PnkxField, C as CheckboxField, u as useForm, I as Input, d as classNames, e as _arrayLikeToArray, f as _unsupportedIterableToArray, w as warningOnce, h as _createClass, i as _classCallCheck, k as _defineProperty, l as _slicedToArray, m as warning$1, n as canUseDom, o as _objectSpread2, p as updateCSS, r as removeCSS, q as _arrayWithHoles, s as _nonIterableRest, t as resetWarned$1, F as FastColor, v as generate, x as presetPrimaryColors, y as presetPalettes, z as _inherits, A as _createSuper, B as _assertThisInitialized, G as _objectWithoutProperties, H as IconContext } from './Switch-BUaKQ4cU.js';
|
2
2
|
import { Button as Button$1, Cascader, Space as Space$1, Card, Skeleton as Skeleton$1, Modal as Modal$1, Tooltip as Tooltip$1, Popconfirm as Popconfirm$1, Typography, Table as Table$1, Tabs as Tabs$1, Popover as Popover$1, Badge as Badge$1, Col as Col$1, Row as Row$1, Dropdown as Dropdown$1, Breadcrumb as Breadcrumb$1, Flex as Flex$1, Splitter as Splitter$1, Menu as Menu$1, Pagination as Pagination$1, Steps as Steps$1, Tag as Tag$1, Divider as Divider$2, Alert as Alert$1, Spin as Spin$1, Drawer as Drawer$1, QRCode as QRCode$1, Result as Result$1, Rate as Rate$1, Segmented as Segmented$1, Statistic as Statistic$1, Timeline as Timeline$1, Tour as Tour$1, Tree as Tree$1, Watermark as Watermark$1, Anchor as Anchor$1, Affix, AutoComplete as AutoComplete$1, Input as Input$1, Collapse, ColorPicker, Empty as Empty$2, Image as Image$1 } from 'antd';
|
3
3
|
import * as React from 'react';
|
4
4
|
import React__default, { version as version$1, isValidElement, useLayoutEffect as useLayoutEffect$1, useEffect, useRef, useMemo as useMemo$1, useCallback, useState, createContext, memo, useReducer, useContext, Component } from 'react';
|
@@ -9592,13 +9592,17 @@ const SettingTable = (props) => {
|
|
9592
9592
|
};
|
9593
9593
|
const footer = () => {
|
9594
9594
|
const handleCancel = () => {
|
9595
|
-
|
9595
|
+
if (setDefaultSettingColumnItems) {
|
9596
|
+
setDefaultSettingColumnItems(defaultSettingColumnItems);
|
9597
|
+
}
|
9596
9598
|
setColumns(defaultSettingColumnItems);
|
9597
9599
|
setOpen(false);
|
9598
9600
|
};
|
9599
9601
|
const handleSubmit2 = () => {
|
9600
9602
|
setOpen(false);
|
9601
|
-
|
9603
|
+
if (setDefaultSettingColumnItems) {
|
9604
|
+
setDefaultSettingColumnItems(columns);
|
9605
|
+
}
|
9602
9606
|
};
|
9603
9607
|
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
|
9604
9608
|
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
@@ -9637,7 +9641,7 @@ const SettingTable = (props) => {
|
|
9637
9641
|
{
|
9638
9642
|
items: columns.map((item) => String(item.key)),
|
9639
9643
|
strategy: verticalListSortingStrategy,
|
9640
|
-
children: columns.map((item, index) => {
|
9644
|
+
children: columns.filter((i) => i.key).map((item, index) => {
|
9641
9645
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
9642
9646
|
SortableItem,
|
9643
9647
|
{
|
@@ -9776,7 +9780,7 @@ const Table = ({
|
|
9776
9780
|
};
|
9777
9781
|
//! Function
|
9778
9782
|
useEffect(() => {
|
9779
|
-
setData(dataSource);
|
9783
|
+
setData(Array.isArray(dataSource) ? dataSource : []);
|
9780
9784
|
}, [JSON.stringify(dataSource)]);
|
9781
9785
|
const columnsEditable = [
|
9782
9786
|
...columns,
|
@@ -9905,7 +9909,7 @@ const Table = ({
|
|
9905
9909
|
setOpen: setOpenStting,
|
9906
9910
|
title: titleSettingTableModal,
|
9907
9911
|
showSetting,
|
9908
|
-
defaultSettingColumnItems: columns,
|
9912
|
+
defaultSettingColumnItems: editable ? mergedColumns : columns,
|
9909
9913
|
setDefaultSettingColumnItems: setColumns
|
9910
9914
|
}
|
9911
9915
|
)
|
@@ -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-BUaKQ4cU.js';
|
2
2
|
import { Select as Select$1, Radio } from 'antd';
|
3
3
|
|
4
4
|
const Select = (props) => {
|
@@ -3495,6 +3495,48 @@ var getProxyFormState = (formState, control, localProxyFormState, isRoot = true)
|
|
3495
3495
|
return result;
|
3496
3496
|
};
|
3497
3497
|
|
3498
|
+
var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
|
3499
|
+
|
3500
|
+
function deepEqual(object1, object2) {
|
3501
|
+
if (isPrimitive(object1) || isPrimitive(object2)) {
|
3502
|
+
return object1 === object2;
|
3503
|
+
}
|
3504
|
+
if (isDateObject(object1) && isDateObject(object2)) {
|
3505
|
+
return object1.getTime() === object2.getTime();
|
3506
|
+
}
|
3507
|
+
const keys1 = Object.keys(object1);
|
3508
|
+
const keys2 = Object.keys(object2);
|
3509
|
+
if (keys1.length !== keys2.length) {
|
3510
|
+
return false;
|
3511
|
+
}
|
3512
|
+
for (const key of keys1) {
|
3513
|
+
const val1 = object1[key];
|
3514
|
+
if (!keys2.includes(key)) {
|
3515
|
+
return false;
|
3516
|
+
}
|
3517
|
+
if (key !== 'ref') {
|
3518
|
+
const val2 = object2[key];
|
3519
|
+
if ((isDateObject(val1) && isDateObject(val2)) ||
|
3520
|
+
(isObject(val1) && isObject(val2)) ||
|
3521
|
+
(Array.isArray(val1) && Array.isArray(val2))
|
3522
|
+
? !deepEqual(val1, val2)
|
3523
|
+
: val1 !== val2) {
|
3524
|
+
return false;
|
3525
|
+
}
|
3526
|
+
}
|
3527
|
+
}
|
3528
|
+
return true;
|
3529
|
+
}
|
3530
|
+
|
3531
|
+
const useDeepEqualEffect = (effect, deps) => {
|
3532
|
+
const ref = useRef(deps);
|
3533
|
+
if (!deepEqual(deps, ref.current)) {
|
3534
|
+
ref.current = deps;
|
3535
|
+
}
|
3536
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
3537
|
+
useEffect(effect, ref.current);
|
3538
|
+
};
|
3539
|
+
|
3498
3540
|
/**
|
3499
3541
|
* 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.
|
3500
3542
|
*
|
@@ -3539,10 +3581,8 @@ function useFormState(props) {
|
|
3539
3581
|
isValid: false,
|
3540
3582
|
errors: false,
|
3541
3583
|
});
|
3542
|
-
|
3543
|
-
|
3544
|
-
React__default.useEffect(() => control._subscribe({
|
3545
|
-
name: _name.current,
|
3584
|
+
useDeepEqualEffect(() => control._subscribe({
|
3585
|
+
name: name,
|
3546
3586
|
formState: _localProxyFormState.current,
|
3547
3587
|
exact,
|
3548
3588
|
callback: (formState) => {
|
@@ -3552,7 +3592,7 @@ function useFormState(props) {
|
|
3552
3592
|
...formState,
|
3553
3593
|
});
|
3554
3594
|
},
|
3555
|
-
}), [
|
3595
|
+
}), [name, disabled, exact]);
|
3556
3596
|
React__default.useEffect(() => {
|
3557
3597
|
_localProxyFormState.current.isValid && control._setValid(true);
|
3558
3598
|
}, [control]);
|
@@ -3592,19 +3632,16 @@ var generateWatchOutput = (names, _names, formValues, isGlobal, defaultValue) =>
|
|
3592
3632
|
function useWatch(props) {
|
3593
3633
|
const methods = useFormContext();
|
3594
3634
|
const { control = methods.control, name, defaultValue, disabled, exact, } = props || {};
|
3595
|
-
const
|
3596
|
-
|
3597
|
-
|
3598
|
-
React__default.useEffect(() => control._subscribe({
|
3599
|
-
name: _name.current,
|
3635
|
+
const [value, updateValue] = React__default.useState(control._getWatch(name, defaultValue));
|
3636
|
+
useDeepEqualEffect(() => control._subscribe({
|
3637
|
+
name: name,
|
3600
3638
|
formState: {
|
3601
3639
|
values: true,
|
3602
3640
|
},
|
3603
3641
|
exact,
|
3604
3642
|
callback: (formState) => !disabled &&
|
3605
|
-
updateValue(generateWatchOutput(
|
3606
|
-
}), [
|
3607
|
-
const [value, updateValue] = React__default.useState(control._getWatch(name, defaultValue));
|
3643
|
+
updateValue(generateWatchOutput(name, control._names, formState.values || control._formValues, false, defaultValue)),
|
3644
|
+
}), [name, defaultValue, disabled, exact]);
|
3608
3645
|
React__default.useEffect(() => control._removeUnmounted());
|
3609
3646
|
return value;
|
3610
3647
|
}
|
@@ -3839,39 +3876,6 @@ var createSubject = () => {
|
|
3839
3876
|
};
|
3840
3877
|
};
|
3841
3878
|
|
3842
|
-
var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
|
3843
|
-
|
3844
|
-
function deepEqual(object1, object2) {
|
3845
|
-
if (isPrimitive(object1) || isPrimitive(object2)) {
|
3846
|
-
return object1 === object2;
|
3847
|
-
}
|
3848
|
-
if (isDateObject(object1) && isDateObject(object2)) {
|
3849
|
-
return object1.getTime() === object2.getTime();
|
3850
|
-
}
|
3851
|
-
const keys1 = Object.keys(object1);
|
3852
|
-
const keys2 = Object.keys(object2);
|
3853
|
-
if (keys1.length !== keys2.length) {
|
3854
|
-
return false;
|
3855
|
-
}
|
3856
|
-
for (const key of keys1) {
|
3857
|
-
const val1 = object1[key];
|
3858
|
-
if (!keys2.includes(key)) {
|
3859
|
-
return false;
|
3860
|
-
}
|
3861
|
-
if (key !== 'ref') {
|
3862
|
-
const val2 = object2[key];
|
3863
|
-
if ((isDateObject(val1) && isDateObject(val2)) ||
|
3864
|
-
(isObject(val1) && isObject(val2)) ||
|
3865
|
-
(Array.isArray(val1) && Array.isArray(val2))
|
3866
|
-
? !deepEqual(val1, val2)
|
3867
|
-
: val1 !== val2) {
|
3868
|
-
return false;
|
3869
|
-
}
|
3870
|
-
}
|
3871
|
-
}
|
3872
|
-
return true;
|
3873
|
-
}
|
3874
|
-
|
3875
3879
|
var isEmptyObject = (value) => isObject(value) && !Object.keys(value).length;
|
3876
3880
|
|
3877
3881
|
var isFileInput = (element) => element.type === 'file';
|
@@ -4420,6 +4424,7 @@ function createFormControl(props = {}) {
|
|
4420
4424
|
let _formState = {
|
4421
4425
|
submitCount: 0,
|
4422
4426
|
isDirty: false,
|
4427
|
+
isReady: false,
|
4423
4428
|
isLoading: isFunction$1(_options.defaultValues),
|
4424
4429
|
isValidating: false,
|
4425
4430
|
isSubmitted: false,
|
@@ -5439,6 +5444,7 @@ function createFormControl(props = {}) {
|
|
5439
5444
|
};
|
5440
5445
|
}
|
5441
5446
|
|
5447
|
+
const useIsomorphicLayoutEffect$1 = typeof window !== 'undefined' ? React__default.useLayoutEffect : React__default.useEffect;
|
5442
5448
|
/**
|
5443
5449
|
* Custom hook to manage the entire form.
|
5444
5450
|
*
|
@@ -5485,6 +5491,7 @@ function useForm(props = {}) {
|
|
5485
5491
|
validatingFields: {},
|
5486
5492
|
errors: props.errors || {},
|
5487
5493
|
disabled: props.disabled || false,
|
5494
|
+
isReady: false,
|
5488
5495
|
defaultValues: isFunction$1(props.defaultValues)
|
5489
5496
|
? undefined
|
5490
5497
|
: props.defaultValues,
|
@@ -5502,12 +5509,36 @@ function useForm(props = {}) {
|
|
5502
5509
|
}
|
5503
5510
|
const control = _formControl.current.control;
|
5504
5511
|
control._options = props;
|
5505
|
-
|
5506
|
-
|
5507
|
-
|
5508
|
-
|
5509
|
-
|
5512
|
+
useIsomorphicLayoutEffect$1(() => {
|
5513
|
+
const sub = control._subscribe({
|
5514
|
+
formState: control._proxyFormState,
|
5515
|
+
callback: () => updateFormState({ ...control._formState }),
|
5516
|
+
reRenderRoot: true,
|
5517
|
+
});
|
5518
|
+
updateFormState((data) => ({
|
5519
|
+
...data,
|
5520
|
+
isReady: true,
|
5521
|
+
}));
|
5522
|
+
return sub;
|
5523
|
+
}, [control]);
|
5510
5524
|
React__default.useEffect(() => control._disableForm(props.disabled), [control, props.disabled]);
|
5525
|
+
React__default.useEffect(() => {
|
5526
|
+
if (props.mode) {
|
5527
|
+
control._options.mode = props.mode;
|
5528
|
+
}
|
5529
|
+
if (props.reValidateMode) {
|
5530
|
+
control._options.reValidateMode = props.reValidateMode;
|
5531
|
+
}
|
5532
|
+
if (props.errors && !isEmptyObject(props.errors)) {
|
5533
|
+
control._setErrors(props.errors);
|
5534
|
+
}
|
5535
|
+
}, [control, props.errors, props.mode, props.reValidateMode]);
|
5536
|
+
React__default.useEffect(() => {
|
5537
|
+
props.shouldUnregister &&
|
5538
|
+
control._subjects.state.next({
|
5539
|
+
values: control._getWatch(),
|
5540
|
+
});
|
5541
|
+
}, [control, props.shouldUnregister]);
|
5511
5542
|
React__default.useEffect(() => {
|
5512
5543
|
if (control._proxyFormState.isDirty) {
|
5513
5544
|
const isDirty = control._getDirty();
|
@@ -5527,12 +5558,7 @@ function useForm(props = {}) {
|
|
5527
5558
|
else {
|
5528
5559
|
control._resetDefaultValues();
|
5529
5560
|
}
|
5530
|
-
}, [props.values
|
5531
|
-
React__default.useEffect(() => {
|
5532
|
-
if (props.errors && !isEmptyObject(props.errors)) {
|
5533
|
-
control._setErrors(props.errors);
|
5534
|
-
}
|
5535
|
-
}, [props.errors, control]);
|
5561
|
+
}, [control, props.values]);
|
5536
5562
|
React__default.useEffect(() => {
|
5537
5563
|
if (!control._state.mount) {
|
5538
5564
|
control._setValid();
|
@@ -5544,12 +5570,6 @@ function useForm(props = {}) {
|
|
5544
5570
|
}
|
5545
5571
|
control._removeUnmounted();
|
5546
5572
|
});
|
5547
|
-
React__default.useEffect(() => {
|
5548
|
-
props.shouldUnregister &&
|
5549
|
-
control._subjects.state.next({
|
5550
|
-
values: control._getWatch(),
|
5551
|
-
});
|
5552
|
-
}, [props.shouldUnregister, control]);
|
5553
5573
|
_formControl.current.formState = getProxyFormState(formState, control);
|
5554
5574
|
return _formControl.current;
|
5555
5575
|
}
|
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-BUaKQ4cU.js';
|
2
|
+
export { R as RadioGroup, S as Select } from '../chunks/Radio-C3c5Olf1.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/CategoryStatus-
|
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-
|
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-5u7yUN20.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-BUaKQ4cU.js';
|
3
3
|
import 'react-router';
|
4
|
-
export { R as RadioGroup, S as Select } from './chunks/Radio-
|
4
|
+
export { R as RadioGroup, S as Select } from './chunks/Radio-C3c5Olf1.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/CategoryStatus-
|
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/CategoryStatus-5u7yUN20.js';
|
2
|
+
export { E as ErrorMessage, L as Label, T as Typography } from '../chunks/Switch-BUaKQ4cU.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>;
|
@@ -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_2.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_2.FC<ContainerProps>;
|
276
276
|
|
277
277
|
export declare interface ContainerProps {
|
278
|
-
children:
|
278
|
+
children: default_2.ReactNode;
|
279
279
|
size?: TailwindMaxWidth;
|
280
280
|
className?: string;
|
281
281
|
}
|
282
282
|
|
283
|
-
declare type CustomInputTypeAttribute =
|
283
|
+
declare type CustomInputTypeAttribute = default_2.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_2.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_2.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_2.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_2.ReactNode;
|
397
|
+
iconEndInput?: default_2.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_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>;
|
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_2> & {
|
449
|
+
type?: ArgsProps_2["type"];
|
450
450
|
};
|
451
451
|
|
452
|
-
export declare type OptionalArgsToast = Partial<
|
452
|
+
export declare type OptionalArgsToast = Partial<ArgsProps> & {
|
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_2.ReactNode;
|
571
571
|
onReset?: () => void;
|
572
572
|
classNamesContainer?: string;
|
573
573
|
classNameWrapperForm?: string;
|
@@ -661,8 +661,8 @@ 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_2.ReactNode;
|
665
|
+
children: default_2.ReactNode;
|
666
666
|
disabled?: boolean;
|
667
667
|
};
|
668
668
|
|
@@ -683,8 +683,8 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
|
|
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_2.Key[];
|
687
|
+
onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
|
688
688
|
onRowClick?: (record: T) => void;
|
689
689
|
rowKey?: string | ((record: T) => string);
|
690
690
|
className?: string;
|
@@ -695,7 +695,7 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
|
|
695
695
|
setColumns?: (newColumns: TableColumnsType<T>) => void;
|
696
696
|
}
|
697
697
|
|
698
|
-
export declare const Tabs:
|
698
|
+
export declare const Tabs: default_2.FC<TabsProps>;
|
699
699
|
|
700
700
|
export declare type TabsProps = TabsProps_2 & {
|
701
701
|
items: TabItem[];
|
@@ -741,7 +741,7 @@ export declare interface TinyProps extends IAllProps {
|
|
741
741
|
text_patterns?: any;
|
742
742
|
}
|
743
743
|
|
744
|
-
export declare const Tooltip:
|
744
|
+
export declare const Tooltip: default_2.FC<TooltipProps>;
|
745
745
|
|
746
746
|
export declare type TooltipProps = TooltipProps_2;
|
747
747
|
|
@@ -785,13 +785,13 @@ export declare interface UploadFieldProps extends Omit<UploadProps, "value" | "o
|
|
785
785
|
|
786
786
|
export declare const useFiltersHandler: <T>(initialFilters: InitialFiltersSearch<T>) => {
|
787
787
|
filters: InitialFiltersSearch<T>;
|
788
|
-
rowsSelected:
|
789
|
-
setRowsSelected:
|
790
|
-
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>>>;
|
791
791
|
goToPage: (PageIndex: number) => void;
|
792
792
|
changeRowlimit: (value: number) => void;
|
793
793
|
resetToInitialFilters: () => void;
|
794
|
-
handleCheckBox: (newSelectedRowKeys:
|
794
|
+
handleCheckBox: (newSelectedRowKeys: default_2.Key[]) => void;
|
795
795
|
handleChangePage: (nextPage: number) => void;
|
796
796
|
handleRequestSort: (sortField: string | number | symbol) => void;
|
797
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>;
|
@@ -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_2.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_2.FC<ContainerProps>;
|
243
243
|
|
244
244
|
export declare interface ContainerProps {
|
245
|
-
children:
|
245
|
+
children: default_2.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_2.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_2.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_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>;
|
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_2.ReactNode;
|
438
438
|
onReset?: () => void;
|
439
439
|
classNamesContainer?: string;
|
440
440
|
classNameWrapperForm?: string;
|
@@ -506,8 +506,8 @@ export declare type SubMenuProps = SubMenuProps_2;
|
|
506
506
|
|
507
507
|
declare type TabItem = {
|
508
508
|
key: string;
|
509
|
-
label:
|
510
|
-
children:
|
509
|
+
label: default_2.ReactNode;
|
510
|
+
children: default_2.ReactNode;
|
511
511
|
disabled?: boolean;
|
512
512
|
};
|
513
513
|
|
@@ -528,8 +528,8 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
|
|
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_2.Key[];
|
532
|
+
onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
|
533
533
|
onRowClick?: (record: T) => void;
|
534
534
|
rowKey?: string | ((record: T) => string);
|
535
535
|
className?: string;
|
@@ -540,7 +540,7 @@ export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "column
|
|
540
540
|
setColumns?: (newColumns: TableColumnsType<T>) => void;
|
541
541
|
}
|
542
542
|
|
543
|
-
export declare const Tabs:
|
543
|
+
export declare const Tabs: default_2.FC<TabsProps>;
|
544
544
|
|
545
545
|
export declare type TabsProps = TabsProps_2 & {
|
546
546
|
items: TabItem[];
|
@@ -559,7 +559,7 @@ export declare const Timeline: React.FC<TimelineProps>;
|
|
559
559
|
|
560
560
|
export declare type TimelineProps = TimelineProps_2;
|
561
561
|
|
562
|
-
export declare const Tooltip:
|
562
|
+
export declare const Tooltip: default_2.FC<TooltipProps>;
|
563
563
|
|
564
564
|
export declare type TooltipProps = TooltipProps_2;
|
565
565
|
|