@pnkx-lib/ui 1.8.2 → 1.8.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/dist/assets/ui-TI_LyW6Y.css +1 -0
- package/dist/chunks/Switch-B9j33qoL.js +14880 -0
- package/dist/chunks/Tag-BhJhbXqW.js +4206 -0
- package/dist/chunks/createSuper-xZMa0AcQ.js +2769 -0
- package/dist/fields/index.js +11 -0
- package/dist/index.js +40 -0
- package/dist/style.css +1 -1
- package/dist/types/fields.d.ts +193 -0
- package/dist/types/index.d.ts +574 -0
- package/dist/types/ui.d.ts +387 -0
- package/dist/ui/index.js +31 -0
- package/dist/vite.svg +1 -0
- package/es/chunks/{ErrorBoundary-BxrzfgtL.js → ErrorBoundary-C5g427OM.js} +11495 -6899
- package/es/chunks/{Checkbox-CJ_M7IzZ.js → Radio-C3c5Olf1.js} +3 -52
- package/es/chunks/{Switch-eMq9KkOy.js → Switch-BUaKQ4cU.js} +99 -44
- package/es/fields/index.js +2 -2
- package/es/index.js +3 -3
- package/es/ui/index.js +2 -2
- package/package.json +5 -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-BUaKQ4cU.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';
|
@@ -3495,7 +3495,47 @@ var getProxyFormState = (formState, control, localProxyFormState, isRoot = true)
|
|
3495
3495
|
return result;
|
3496
3496
|
};
|
3497
3497
|
|
3498
|
-
|
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
|
+
};
|
3499
3539
|
|
3500
3540
|
/**
|
3501
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.
|
@@ -3541,7 +3581,7 @@ function useFormState(props) {
|
|
3541
3581
|
isValid: false,
|
3542
3582
|
errors: false,
|
3543
3583
|
});
|
3544
|
-
|
3584
|
+
useDeepEqualEffect(() => control._subscribe({
|
3545
3585
|
name: name,
|
3546
3586
|
formState: _localProxyFormState.current,
|
3547
3587
|
exact,
|
@@ -3592,17 +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
|
-
useIsomorphicLayoutEffect$1(() => control._subscribe({
|
3635
|
+
const [value, updateValue] = React__default.useState(control._getWatch(name, defaultValue));
|
3636
|
+
useDeepEqualEffect(() => control._subscribe({
|
3598
3637
|
name: name,
|
3599
3638
|
formState: {
|
3600
3639
|
values: true,
|
3601
3640
|
},
|
3602
3641
|
exact,
|
3603
3642
|
callback: (formState) => !disabled &&
|
3604
|
-
updateValue(generateWatchOutput(name, control._names, formState.values || control._formValues, false,
|
3605
|
-
}), [name,
|
3643
|
+
updateValue(generateWatchOutput(name, control._names, formState.values || control._formValues, false, defaultValue)),
|
3644
|
+
}), [name, defaultValue, disabled, exact]);
|
3606
3645
|
React__default.useEffect(() => control._removeUnmounted());
|
3607
3646
|
return value;
|
3608
3647
|
}
|
@@ -3837,39 +3876,6 @@ var createSubject = () => {
|
|
3837
3876
|
};
|
3838
3877
|
};
|
3839
3878
|
|
3840
|
-
var isPrimitive = (value) => isNullOrUndefined(value) || !isObjectType(value);
|
3841
|
-
|
3842
|
-
function deepEqual(object1, object2) {
|
3843
|
-
if (isPrimitive(object1) || isPrimitive(object2)) {
|
3844
|
-
return object1 === object2;
|
3845
|
-
}
|
3846
|
-
if (isDateObject(object1) && isDateObject(object2)) {
|
3847
|
-
return object1.getTime() === object2.getTime();
|
3848
|
-
}
|
3849
|
-
const keys1 = Object.keys(object1);
|
3850
|
-
const keys2 = Object.keys(object2);
|
3851
|
-
if (keys1.length !== keys2.length) {
|
3852
|
-
return false;
|
3853
|
-
}
|
3854
|
-
for (const key of keys1) {
|
3855
|
-
const val1 = object1[key];
|
3856
|
-
if (!keys2.includes(key)) {
|
3857
|
-
return false;
|
3858
|
-
}
|
3859
|
-
if (key !== 'ref') {
|
3860
|
-
const val2 = object2[key];
|
3861
|
-
if ((isDateObject(val1) && isDateObject(val2)) ||
|
3862
|
-
(isObject(val1) && isObject(val2)) ||
|
3863
|
-
(Array.isArray(val1) && Array.isArray(val2))
|
3864
|
-
? !deepEqual(val1, val2)
|
3865
|
-
: val1 !== val2) {
|
3866
|
-
return false;
|
3867
|
-
}
|
3868
|
-
}
|
3869
|
-
}
|
3870
|
-
return true;
|
3871
|
-
}
|
3872
|
-
|
3873
3879
|
var isEmptyObject = (value) => isObject(value) && !Object.keys(value).length;
|
3874
3880
|
|
3875
3881
|
var isFileInput = (element) => element.type === 'file';
|
@@ -4433,7 +4439,7 @@ function createFormControl(props = {}) {
|
|
4433
4439
|
};
|
4434
4440
|
const _fields = {};
|
4435
4441
|
let _defaultValues = isObject(_options.defaultValues) || isObject(_options.values)
|
4436
|
-
? cloneObject(_options.
|
4442
|
+
? cloneObject(_options.values || _options.defaultValues) || {}
|
4437
4443
|
: {};
|
4438
4444
|
let _formValues = _options.shouldUnregister
|
4439
4445
|
? {}
|
@@ -5438,6 +5444,7 @@ function createFormControl(props = {}) {
|
|
5438
5444
|
};
|
5439
5445
|
}
|
5440
5446
|
|
5447
|
+
const useIsomorphicLayoutEffect$1 = typeof window !== 'undefined' ? React__default.useLayoutEffect : React__default.useEffect;
|
5441
5448
|
/**
|
5442
5449
|
* Custom hook to manage the entire form.
|
5443
5450
|
*
|
@@ -5512,7 +5519,6 @@ function useForm(props = {}) {
|
|
5512
5519
|
...data,
|
5513
5520
|
isReady: true,
|
5514
5521
|
}));
|
5515
|
-
control._formState.isReady = true;
|
5516
5522
|
return sub;
|
5517
5523
|
}, [control]);
|
5518
5524
|
React__default.useEffect(() => control._disableForm(props.disabled), [control, props.disabled]);
|
@@ -24793,6 +24799,55 @@ const Textarea = forwardRef(
|
|
24793
24799
|
);
|
24794
24800
|
React__default.memo(Textarea);
|
24795
24801
|
|
24802
|
+
const CheckboxField = (props) => {
|
24803
|
+
//! State
|
24804
|
+
const {
|
24805
|
+
field,
|
24806
|
+
formState,
|
24807
|
+
label,
|
24808
|
+
afterOnChange,
|
24809
|
+
customStyleContainer,
|
24810
|
+
customStyleCheckbox,
|
24811
|
+
...restProps
|
24812
|
+
} = props;
|
24813
|
+
const { name, value, onChange, onBlur } = field || {};
|
24814
|
+
const { touchedFields, errors, isSubmitted } = formState || {};
|
24815
|
+
const isTouched = get$1(touchedFields, name);
|
24816
|
+
const errorMessage = get$1(errors, name)?.message;
|
24817
|
+
//! Function
|
24818
|
+
const handleChange = (e) => {
|
24819
|
+
const checked = e.target.checked;
|
24820
|
+
onChange?.(checked);
|
24821
|
+
afterOnChange?.(checked);
|
24822
|
+
};
|
24823
|
+
const renderErrorMessage = () => {
|
24824
|
+
if (!errorMessage) return null;
|
24825
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
24826
|
+
ErrorMessage,
|
24827
|
+
{
|
24828
|
+
errorMessage,
|
24829
|
+
isTouched,
|
24830
|
+
isSubmitted
|
24831
|
+
}
|
24832
|
+
);
|
24833
|
+
};
|
24834
|
+
//! Render
|
24835
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: customStyleContainer, children: [
|
24836
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
24837
|
+
Checkbox,
|
24838
|
+
{
|
24839
|
+
onBlur,
|
24840
|
+
checked: !!value,
|
24841
|
+
onChange: handleChange,
|
24842
|
+
className: customStyleCheckbox,
|
24843
|
+
...restProps,
|
24844
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsx(Typography.Text, { children: label })
|
24845
|
+
}
|
24846
|
+
),
|
24847
|
+
renderErrorMessage()
|
24848
|
+
] });
|
24849
|
+
};
|
24850
|
+
|
24796
24851
|
function _typeof(o) {
|
24797
24852
|
"@babel/helpers - typeof";
|
24798
24853
|
|
@@ -39335,4 +39390,4 @@ const SwitchField = (props) => {
|
|
39335
39390
|
};
|
39336
39391
|
React__default.memo(SwitchField);
|
39337
39392
|
|
39338
|
-
export { _createSuper as A, _assertThisInitialized$1 as B,
|
39393
|
+
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-BUaKQ4cU.js';
|
2
|
+
export { R as RadioGroup, S as Select } from '../chunks/Radio-C3c5Olf1.js';
|
package/es/index.js
CHANGED
@@ -1,5 +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/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-
|
3
|
-
export {
|
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-C5g427OM.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
|
+
export { R as RadioGroup, S as Select } from './chunks/Radio-C3c5Olf1.js';
|
4
4
|
export { u as useToast } from './chunks/cloneDeep-BLYi2V0G.js';
|
5
5
|
export { u as useFiltersHandler, a as useMessage } from './chunks/useMessage-D_-VT5B4.js';
|
package/es/ui/index.js
CHANGED
@@ -1,2 +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/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-C5g427OM.js';
|
2
|
+
export { E as ErrorMessage, L as Label, T as Typography } from '../chunks/Switch-BUaKQ4cU.js';
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"name": "@pnkx-lib/ui",
|
3
3
|
"private": false,
|
4
|
-
"version": "1.8.
|
4
|
+
"version": "1.8.6",
|
5
5
|
"type": "module",
|
6
6
|
"main": "./es/index.js",
|
7
7
|
"module": "./es/index.js",
|
@@ -90,6 +90,10 @@
|
|
90
90
|
},
|
91
91
|
"dependencies": {
|
92
92
|
"@ant-design/icons": "^5.6.1",
|
93
|
+
"@dnd-kit/core": "^6.3.1",
|
94
|
+
"@dnd-kit/modifiers": "^9.0.0",
|
95
|
+
"@dnd-kit/sortable": "^10.0.0",
|
96
|
+
"@dnd-kit/utilities": "^3.2.2",
|
93
97
|
"@emotion/css": "^11.13.5",
|
94
98
|
"@headlessui/react": "^2.2.2",
|
95
99
|
"@heroicons/react": "^2.2.0",
|
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>;
|
@@ -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_3.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_3.FC<ContainerProps>;
|
273
276
|
|
274
277
|
export declare interface ContainerProps {
|
275
|
-
children:
|
278
|
+
children: default_3.ReactNode;
|
276
279
|
size?: TailwindMaxWidth;
|
277
280
|
className?: string;
|
278
281
|
}
|
279
282
|
|
280
|
-
declare type CustomInputTypeAttribute =
|
283
|
+
declare type CustomInputTypeAttribute = default_3.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_3.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_3.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_3.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_3.ReactNode;
|
397
|
+
iconEndInput?: default_3.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_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>;
|
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> & {
|
449
|
+
type?: ArgsProps["type"];
|
447
450
|
};
|
448
451
|
|
449
|
-
export declare type OptionalArgsToast = Partial<
|
452
|
+
export declare type OptionalArgsToast = Partial<ArgsProps_2> & {
|
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_3.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_3.ReactNode;
|
665
|
+
children: default_3.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_3.Key[];
|
687
|
+
onSelect: (newSelectedRowKeys: default_3.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_3.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_3.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_3.Key[];
|
789
|
+
setRowsSelected: default_3.Dispatch<default_3.SetStateAction<default_3.Key[]>>;
|
790
|
+
setFilters: default_3.Dispatch<default_3.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_3.Key[]) => void;
|
789
795
|
handleChangePage: (nextPage: number) => void;
|
790
796
|
handleRequestSort: (sortField: string | number | symbol) => void;
|
791
797
|
handleSearch: (nextFilters: InitialFiltersSearch<T>) => void;
|