@pnkx-lib/ui 1.9.35 → 1.9.36
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 +2 -2
- package/es/assets/{ui-Jiyqh2vu.css → ui-CY4SzUee.css} +35 -0
- package/es/chunks/{index-DqaASOI_.js → CategoryStatus-DdH8iIZs.js} +554 -207
- package/es/chunks/Radio-BI84-zGV.js +53 -0
- package/es/chunks/{Switch-Ck9WdQgt.js → Switch-DIm0IBxH.js} +69 -14
- package/es/chunks/{table-B28OPA57.js → cloneDeep-BLYi2V0G.js} +5 -32
- package/es/chunks/{_MapCache-hm6_DB7i.js → common-b3FKGF0Y.js} +7 -1
- package/es/chunks/{useToggle-C5Y4aFUQ.js → useMessage-D_-VT5B4.js} +3 -15
- package/es/fields/index.js +2 -2
- package/es/hooks/index.js +2 -2
- package/es/index.js +5 -5
- package/es/ui/index.js +2 -3
- package/package.json +3 -7
- package/types/fields.d.ts +11 -11
- package/types/hooks.d.ts +6 -19
- package/types/index.d.ts +75 -132
- package/types/ui.d.ts +51 -95
- package/es/chunks/Radio-5j1KNRlx.js +0 -103
@@ -0,0 +1,53 @@
|
|
1
|
+
import { g as get, j as jsxRuntimeExports, T as Typography, E as ErrorMessage } from './Switch-DIm0IBxH.js';
|
2
|
+
import { Radio } from 'antd';
|
3
|
+
|
4
|
+
const RadioGroup = (props) => {
|
5
|
+
//! State
|
6
|
+
const {
|
7
|
+
field,
|
8
|
+
formState,
|
9
|
+
customStyleRadio,
|
10
|
+
customStyleWrap = "",
|
11
|
+
afterOnChange,
|
12
|
+
options,
|
13
|
+
...restProps
|
14
|
+
} = props;
|
15
|
+
const { name, value, onChange } = field || {};
|
16
|
+
const { touchedFields, errors, isSubmitted } = formState || {};
|
17
|
+
const isTouched = get(touchedFields, name);
|
18
|
+
const errorMessage = get(errors, name)?.message;
|
19
|
+
//! Function
|
20
|
+
const handleChange = (e) => {
|
21
|
+
onChange?.(e);
|
22
|
+
afterOnChange?.(e?.target?.value);
|
23
|
+
};
|
24
|
+
const renderErrorMessage = () => {
|
25
|
+
if (!errorMessage) return null;
|
26
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
27
|
+
ErrorMessage,
|
28
|
+
{
|
29
|
+
errorMessage,
|
30
|
+
isTouched,
|
31
|
+
isSubmitted
|
32
|
+
}
|
33
|
+
);
|
34
|
+
};
|
35
|
+
//! Render
|
36
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: customStyleWrap, children: [
|
37
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(Radio.Group, { onChange: handleChange, value, ...restProps, children: options.map((item) => /* @__PURE__ */ jsxRuntimeExports.jsx(
|
38
|
+
Radio,
|
39
|
+
{
|
40
|
+
value: item.value,
|
41
|
+
className: customStyleRadio,
|
42
|
+
children: /* @__PURE__ */ jsxRuntimeExports.jsxs(Typography.Text, { children: [
|
43
|
+
" ",
|
44
|
+
item.label
|
45
|
+
] })
|
46
|
+
},
|
47
|
+
`${name}-${item.value}`
|
48
|
+
)) }),
|
49
|
+
renderErrorMessage()
|
50
|
+
] });
|
51
|
+
};
|
52
|
+
|
53
|
+
export { RadioGroup as R };
|
@@ -1,7 +1,7 @@
|
|
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, Checkbox, DatePicker, Upload, Image, Switch } from 'antd';
|
4
|
-
import {
|
3
|
+
import { Typography as Typography$1, Input as Input$1, Select as Select$1, Checkbox, DatePicker, Upload, Image, Switch } from 'antd';
|
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';
|
7
7
|
|
@@ -4468,8 +4468,6 @@ function createFormControl(props = {}) {
|
|
4468
4468
|
array: createSubject(),
|
4469
4469
|
state: createSubject(),
|
4470
4470
|
};
|
4471
|
-
const validationModeBeforeSubmit = getValidationModes(_options.mode);
|
4472
|
-
const validationModeAfterSubmit = getValidationModes(_options.reValidateMode);
|
4473
4471
|
const shouldDisplayAllAssociatedErrors = _options.criteriaMode === VALIDATION_MODE.all;
|
4474
4472
|
const debounce = (callback) => (wait) => {
|
4475
4473
|
clearTimeout(timer);
|
@@ -4740,13 +4738,17 @@ function createFormControl(props = {}) {
|
|
4740
4738
|
}
|
4741
4739
|
else if (fieldReference.refs) {
|
4742
4740
|
if (isCheckBoxInput(fieldReference.ref)) {
|
4743
|
-
fieldReference.refs.
|
4744
|
-
|
4745
|
-
(
|
4746
|
-
|
4747
|
-
|
4748
|
-
|
4749
|
-
|
4741
|
+
fieldReference.refs.forEach((checkboxRef) => {
|
4742
|
+
if (!checkboxRef.defaultChecked || !checkboxRef.disabled) {
|
4743
|
+
if (Array.isArray(fieldValue)) {
|
4744
|
+
checkboxRef.checked = !!fieldValue.find((data) => data === checkboxRef.value);
|
4745
|
+
}
|
4746
|
+
else {
|
4747
|
+
checkboxRef.checked =
|
4748
|
+
fieldValue === checkboxRef.value || !!fieldValue;
|
4749
|
+
}
|
4750
|
+
}
|
4751
|
+
});
|
4750
4752
|
}
|
4751
4753
|
else {
|
4752
4754
|
fieldReference.refs.forEach((radioRef) => (radioRef.checked = radioRef.value === fieldValue));
|
@@ -4772,6 +4774,9 @@ function createFormControl(props = {}) {
|
|
4772
4774
|
};
|
4773
4775
|
const setValues = (name, value, options) => {
|
4774
4776
|
for (const fieldKey in value) {
|
4777
|
+
if (!value.hasOwnProperty(fieldKey)) {
|
4778
|
+
return;
|
4779
|
+
}
|
4775
4780
|
const fieldValue = value[fieldKey];
|
4776
4781
|
const fieldName = `${name}.${fieldKey}`;
|
4777
4782
|
const field = get(_fields, fieldName);
|
@@ -4828,6 +4833,8 @@ function createFormControl(props = {}) {
|
|
4828
4833
|
(isDateObject(fieldValue) && isNaN(fieldValue.getTime())) ||
|
4829
4834
|
deepEqual(fieldValue, get(_formValues, name, fieldValue));
|
4830
4835
|
};
|
4836
|
+
const validationModeBeforeSubmit = getValidationModes(_options.mode);
|
4837
|
+
const validationModeAfterSubmit = getValidationModes(_options.reValidateMode);
|
4831
4838
|
if (field) {
|
4832
4839
|
let error;
|
4833
4840
|
let isValid;
|
@@ -5582,6 +5589,56 @@ class PnkxField extends React.PureComponent {
|
|
5582
5589
|
}
|
5583
5590
|
}
|
5584
5591
|
|
5592
|
+
const Select = (props) => {
|
5593
|
+
//! State
|
5594
|
+
const {
|
5595
|
+
field,
|
5596
|
+
formState,
|
5597
|
+
label,
|
5598
|
+
required,
|
5599
|
+
afterOnChange,
|
5600
|
+
customStyleContainer,
|
5601
|
+
...restProps
|
5602
|
+
} = props;
|
5603
|
+
const { name, value, onChange, onBlur } = field || {};
|
5604
|
+
const { touchedFields, errors, isSubmitted } = formState || {};
|
5605
|
+
const isTouched = get$1(touchedFields, name);
|
5606
|
+
const errorMessage = get$1(errors, name)?.message;
|
5607
|
+
//! Function
|
5608
|
+
const handleChange = (val) => {
|
5609
|
+
onChange?.(val);
|
5610
|
+
afterOnChange?.(val);
|
5611
|
+
};
|
5612
|
+
const renderErrorMessage = () => {
|
5613
|
+
if (!errorMessage) return null;
|
5614
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(
|
5615
|
+
ErrorMessage,
|
5616
|
+
{
|
5617
|
+
errorMessage,
|
5618
|
+
isTouched,
|
5619
|
+
isSubmitted
|
5620
|
+
}
|
5621
|
+
);
|
5622
|
+
};
|
5623
|
+
//! Render
|
5624
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: customStyleContainer, children: [
|
5625
|
+
label && /* @__PURE__ */ jsxRuntimeExports.jsx(Label, { label, required }),
|
5626
|
+
/* @__PURE__ */ jsxRuntimeExports.jsx(
|
5627
|
+
Select$1,
|
5628
|
+
{
|
5629
|
+
onChange: handleChange,
|
5630
|
+
onBlur,
|
5631
|
+
value,
|
5632
|
+
style: { width: "100%" },
|
5633
|
+
optionLabelProp: "label",
|
5634
|
+
status: (isTouched || isSubmitted) && Boolean(errorMessage) ? "error" : void 0,
|
5635
|
+
...restProps
|
5636
|
+
}
|
5637
|
+
),
|
5638
|
+
renderErrorMessage()
|
5639
|
+
] });
|
5640
|
+
};
|
5641
|
+
|
5585
5642
|
var propTypes = {exports: {}};
|
5586
5643
|
|
5587
5644
|
var reactIs = {exports: {}};
|
@@ -7462,8 +7519,6 @@ var Editor = /** @class */ (function (_super) {
|
|
7462
7519
|
return Editor;
|
7463
7520
|
}(React.Component));
|
7464
7521
|
|
7465
|
-
const TINY_API = "miai0qn3c79adm555yoxd9kz6j6a323ek760nf7qd81nv1p5";
|
7466
|
-
|
7467
7522
|
var lodash$1 = {exports: {}};
|
7468
7523
|
|
7469
7524
|
/**
|
@@ -39386,4 +39441,4 @@ const SwitchField = (props) => {
|
|
39386
39441
|
};
|
39387
39442
|
React__default.memo(SwitchField);
|
39388
39443
|
|
39389
|
-
export {
|
39444
|
+
export { presetPalettes as A, _inherits as B, CheckboxField as C, DatePickerField as D, ErrorMessage as E, FastColor as F, _createSuper as G, _assertThisInitialized$1 as H, Input as I, _objectWithoutProperties as J, IconContext as K, Label as L, PnkxField as P, RangePickerField as R, Select as S, Typography as T, _extends as _, TinyMCE as a, Icon as b, _typeof as c, classNames as d, RefIcon as e, _arrayLikeToArray as f, get$1 as g, _unsupportedIterableToArray as h, _createClass as i, jsxRuntimeExports as j, _classCallCheck as k, lodashExports as l, _defineProperty as m, _slicedToArray as n, warning$1 as o, canUseDom as p, _objectSpread2 as q, updateCSS as r, removeCSS as s, _arrayWithHoles as t, useForm as u, _nonIterableRest as v, warningOnce as w, resetWarned as x, generate$1 as y, presetPrimaryColors as z };
|
@@ -1,23 +1,17 @@
|
|
1
1
|
import { notification } from 'antd';
|
2
|
-
import { r as require_ListCache,
|
2
|
+
import { r as require_ListCache, c as require_Map, d as require_MapCache, e as require_getNative, f as requireEq, g as require_baseGetTag, h as requireIsObjectLike, i as require_root, j as require_freeGlobal, k as requireIsArray, l as requireIsFunction, m as requireIsObject, n as require_toSource, o as require_Symbol, p as getDefaultExportFromCjs } from './common-b3FKGF0Y.js';
|
3
3
|
|
4
4
|
const useToast = (defaultProps) => {
|
5
|
-
|
6
|
-
const { type = "info", ...rest } = { ...defaultProps, ...overrideProps };
|
5
|
+
return (overrideProps) => {
|
7
6
|
const mergedProps = {
|
8
7
|
message: defaultProps?.message,
|
9
8
|
showProgress: true,
|
10
9
|
pauseOnHover: false,
|
11
10
|
...defaultProps,
|
12
|
-
...
|
11
|
+
...overrideProps
|
13
12
|
};
|
14
|
-
notification
|
13
|
+
notification.open(mergedProps);
|
15
14
|
};
|
16
|
-
toast.success = (props) => toast({ ...props, type: "success" });
|
17
|
-
toast.error = (props) => toast({ ...props, type: "error" });
|
18
|
-
toast.info = (props) => toast({ ...props, type: "info" });
|
19
|
-
toast.warning = (props) => toast({ ...props, type: "warning" });
|
20
|
-
return toast;
|
21
15
|
};
|
22
16
|
|
23
17
|
var _stackClear;
|
@@ -2424,25 +2418,4 @@ function requireCloneDeep () {
|
|
2424
2418
|
var cloneDeepExports = requireCloneDeep();
|
2425
2419
|
const cloneDeep = /*@__PURE__*/getDefaultExportFromCjs(cloneDeepExports);
|
2426
2420
|
|
2427
|
-
|
2428
|
-
const START_PAGE_SIZE = 10;
|
2429
|
-
const PAGE_INDEX = "PageIndex";
|
2430
|
-
const PAGE_SIZE = "PageSize";
|
2431
|
-
const SORT_BY = "SortBy";
|
2432
|
-
const SORT_DESC = "SortDesc";
|
2433
|
-
var TypeActionRowTable = /* @__PURE__ */ ((TypeActionRowTable2) => {
|
2434
|
-
TypeActionRowTable2["DELETE"] = "DELETE";
|
2435
|
-
TypeActionRowTable2["EDIT"] = "EDIT";
|
2436
|
-
TypeActionRowTable2["UNDO"] = "UNDO";
|
2437
|
-
TypeActionRowTable2["CANCELUNDO"] = "CANCELUNDO";
|
2438
|
-
TypeActionRowTable2["CHECKIN"] = "CHECKIN";
|
2439
|
-
TypeActionRowTable2["PRINT"] = "PRINT";
|
2440
|
-
TypeActionRowTable2["PAYMENT"] = "PAYMENT";
|
2441
|
-
TypeActionRowTable2["PLAY"] = "PLAY";
|
2442
|
-
TypeActionRowTable2["PAUSE"] = "PAUSE";
|
2443
|
-
TypeActionRowTable2["DOWNLOAD"] = "DOWNLOAD";
|
2444
|
-
TypeActionRowTable2["VIEW"] = "VIEW";
|
2445
|
-
return TypeActionRowTable2;
|
2446
|
-
})(TypeActionRowTable || {});
|
2447
|
-
|
2448
|
-
export { PAGE_INDEX as P, START_PAGE as S, TypeActionRowTable as T, START_PAGE_SIZE as a, PAGE_SIZE as b, SORT_BY as c, SORT_DESC as d, cloneDeep as e, useToast as u };
|
2421
|
+
export { cloneDeep as c, useToast as u };
|
@@ -1252,4 +1252,10 @@ function require_MapCache () {
|
|
1252
1252
|
return _MapCache;
|
1253
1253
|
}
|
1254
1254
|
|
1255
|
-
|
1255
|
+
const TINY_API = "miai0qn3c79adm555yoxd9kz6j6a323ek760nf7qd81nv1p5";
|
1256
|
+
const START_PAGE = 1;
|
1257
|
+
const PAGE_INDEX = "PageIndex";
|
1258
|
+
const SORT_BY = "SortBy";
|
1259
|
+
const SORT_DESC = "SortDesc";
|
1260
|
+
|
1261
|
+
export { PAGE_INDEX as P, START_PAGE as S, TINY_API as T, SORT_DESC as a, SORT_BY as b, require_Map as c, require_MapCache as d, require_getNative as e, requireEq as f, require_baseGetTag as g, requireIsObjectLike as h, require_root as i, require_freeGlobal as j, requireIsArray as k, requireIsFunction as l, requireIsObject as m, require_toSource as n, require_Symbol as o, getDefaultExportFromCjs as p, commonjsGlobal as q, require_ListCache as r };
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { useState, useCallback } from 'react';
|
2
|
-
import {
|
2
|
+
import { c as cloneDeep } from './cloneDeep-BLYi2V0G.js';
|
3
|
+
import { P as PAGE_INDEX, S as START_PAGE, a as SORT_DESC, b as SORT_BY } from './common-b3FKGF0Y.js';
|
3
4
|
import { message } from 'antd';
|
4
5
|
|
5
6
|
const useFiltersHandler = (initialFilters) => {
|
@@ -90,17 +91,4 @@ const useMessage = (defaultProps) => {
|
|
90
91
|
};
|
91
92
|
};
|
92
93
|
|
93
|
-
|
94
|
-
const [open, setOpen] = useState(false);
|
95
|
-
const [close, setClose] = useState(false);
|
96
|
-
const toggle = useCallback(() => {
|
97
|
-
setOpen((prev) => !prev);
|
98
|
-
setTimeout(() => {
|
99
|
-
setClose((prev) => !prev);
|
100
|
-
}, 500);
|
101
|
-
}, []);
|
102
|
-
const shouldRender = open || close;
|
103
|
-
return { open, toggle, shouldRender };
|
104
|
-
};
|
105
|
-
|
106
|
-
export { useMessage as a, useToggle as b, useFiltersHandler as u };
|
94
|
+
export { useMessage as a, useFiltersHandler as u };
|
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,
|
2
|
-
export { R as RadioGroup
|
1
|
+
export { C as CheckboxField, D as DatePickerField, I as Input, P as PnkxField, R as RangePickerField, S as Select, a as TinyMCE } from '../chunks/Switch-DIm0IBxH.js';
|
2
|
+
export { R as RadioGroup } from '../chunks/Radio-BI84-zGV.js';
|
package/es/hooks/index.js
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
export { u as useToast } from '../chunks/
|
2
|
-
export { u as useFiltersHandler, a as useMessage
|
1
|
+
export { u as useToast } from '../chunks/cloneDeep-BLYi2V0G.js';
|
2
|
+
export { u as useFiltersHandler, a as useMessage } from '../chunks/useMessage-D_-VT5B4.js';
|
package/es/index.js
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
export {
|
2
|
-
export { C as CheckboxField, D as DatePickerField, E as ErrorMessage, I as Input, L as Label, P as PnkxField, R as RangePickerField,
|
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, Y as CategoryStatus, 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-DdH8iIZs.js';
|
2
|
+
export { C as CheckboxField, D as DatePickerField, E as ErrorMessage, I as Input, L as Label, P as PnkxField, R as RangePickerField, S as Select, a as TinyMCE, T as Typography } from './chunks/Switch-DIm0IBxH.js';
|
3
3
|
import 'react-router';
|
4
|
-
export {
|
5
|
-
export {
|
6
|
-
export { u as useFiltersHandler, a as useMessage
|
4
|
+
export { R as RadioGroup } from './chunks/Radio-BI84-zGV.js';
|
5
|
+
export { u as useToast } from './chunks/cloneDeep-BLYi2V0G.js';
|
6
|
+
export { u as useFiltersHandler, a as useMessage } from './chunks/useMessage-D_-VT5B4.js';
|
package/es/ui/index.js
CHANGED
@@ -1,4 +1,3 @@
|
|
1
|
-
export {
|
2
|
-
export { E as ErrorMessage, L as Label,
|
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, Y as CategoryStatus, 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-DdH8iIZs.js';
|
2
|
+
export { E as ErrorMessage, L as Label, T as Typography } from '../chunks/Switch-DIm0IBxH.js';
|
3
3
|
import 'react-router';
|
4
|
-
export { P as PAGE_INDEX, b as PAGE_SIZE, c as SORT_BY, d as SORT_DESC, S as START_PAGE, a as START_PAGE_SIZE, T as TypeActionRowTable } from '../chunks/table-B28OPA57.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.36",
|
5
5
|
"type": "module",
|
6
6
|
"main": "./es/index.js",
|
7
7
|
"module": "./es/index.js",
|
@@ -42,11 +42,7 @@
|
|
42
42
|
"build": "npm run build:css && vite build",
|
43
43
|
"serve": "vite preview",
|
44
44
|
"lint": "eslint .",
|
45
|
-
"build-storybook": "storybook build"
|
46
|
-
"clean": "rm -rf types es dist",
|
47
|
-
"release:patch": "npm run clean && npm version patch && npm run build && npm publish",
|
48
|
-
"release:minor": "npm run clean && npm version minor && npm run build && npm publish",
|
49
|
-
"release:major": "npm run clean && npm version major && npm run build && npm publish"
|
45
|
+
"build-storybook": "storybook build"
|
50
46
|
},
|
51
47
|
"devDependencies": {
|
52
48
|
"@chromatic-com/storybook": "^3.2.6",
|
@@ -115,4 +111,4 @@
|
|
115
111
|
"yup": "^1.6.1",
|
116
112
|
"zustand": "^5.0.3"
|
117
113
|
}
|
118
|
-
}
|
114
|
+
}
|
package/types/fields.d.ts
CHANGED
@@ -6,8 +6,8 @@ import { Dayjs } from 'dayjs';
|
|
6
6
|
import { default as default_2 } from 'react';
|
7
7
|
import { IAllProps } from '@tinymce/tinymce-react';
|
8
8
|
import { InputProps as InputProps_2 } from 'antd';
|
9
|
-
import { JSX } from 'react/jsx-runtime';
|
10
|
-
import { JSX as
|
9
|
+
import { JSX as JSX_2 } from 'react/jsx-runtime';
|
10
|
+
import { JSX as JSX_3 } from 'react';
|
11
11
|
import { RadioGroupProps } from 'antd';
|
12
12
|
import { RangePickerProps } from 'antd/es/date-picker';
|
13
13
|
import * as React_2 from 'react';
|
@@ -20,7 +20,7 @@ import { UploadProps } from 'antd';
|
|
20
20
|
import { UseFormSetValue } from 'react-hook-form';
|
21
21
|
import { UseFormStateReturn } from 'react-hook-form';
|
22
22
|
|
23
|
-
export declare const CheckboxField: (props: CheckboxFieldProps) =>
|
23
|
+
export declare const CheckboxField: (props: CheckboxFieldProps) => JSX_2.Element;
|
24
24
|
|
25
25
|
export declare interface CheckboxFieldProps extends Omit<CheckboxProps, "onChange" | "checked"> {
|
26
26
|
field?: ControllerRenderProps<any, any>;
|
@@ -53,9 +53,9 @@ export declare interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "
|
|
53
53
|
size?: TSize;
|
54
54
|
}
|
55
55
|
|
56
|
-
export declare const DatePickerField: (props: DatePickerDMYProps) =>
|
56
|
+
export declare const DatePickerField: (props: DatePickerDMYProps) => JSX_2.Element;
|
57
57
|
|
58
|
-
export declare const Input: (props: InputProps) =>
|
58
|
+
export declare const Input: (props: InputProps) => JSX_2.Element;
|
59
59
|
|
60
60
|
export declare interface InputProps extends InputProps_2 {
|
61
61
|
field?: ControllerRenderProps<any, any>;
|
@@ -73,7 +73,7 @@ export declare interface InputProps extends InputProps_2 {
|
|
73
73
|
}
|
74
74
|
|
75
75
|
export declare class PnkxField<TComponent extends React_2.ComponentType<any>> extends React_2.PureComponent<PnkxFieldProps<TComponent>> {
|
76
|
-
render():
|
76
|
+
render(): JSX_2.Element;
|
77
77
|
}
|
78
78
|
|
79
79
|
export declare type PnkxFieldProps<TComponent extends React_2.ComponentType<any>> = {
|
@@ -91,10 +91,10 @@ export declare interface PropsNumberFormat extends Omit<InputProps, "onChange" |
|
|
91
91
|
type?: TInputNumberType;
|
92
92
|
prefix?: string;
|
93
93
|
suffix?: string;
|
94
|
-
helperText?: () =>
|
94
|
+
helperText?: () => JSX_3.Element | null;
|
95
95
|
}
|
96
96
|
|
97
|
-
export declare const RadioGroup: (props: RadioProps) =>
|
97
|
+
export declare const RadioGroup: (props: RadioProps) => JSX_2.Element;
|
98
98
|
|
99
99
|
export declare interface RadioProps extends Omit<RadioGroupProps, "options" | "onChange"> {
|
100
100
|
field?: ControllerRenderProps<any, any>;
|
@@ -107,7 +107,7 @@ export declare interface RadioProps extends Omit<RadioGroupProps, "options" | "o
|
|
107
107
|
position?: TPositionRadio;
|
108
108
|
}
|
109
109
|
|
110
|
-
export declare const RangePickerField: (props: RangePickerFieldProps) =>
|
110
|
+
export declare const RangePickerField: (props: RangePickerFieldProps) => JSX_2.Element;
|
111
111
|
|
112
112
|
export declare interface RangePickerFieldProps extends Omit<RangePickerProps, "value" | "onChange"> {
|
113
113
|
field?: ControllerRenderProps<any, any>;
|
@@ -119,7 +119,7 @@ export declare interface RangePickerFieldProps extends Omit<RangePickerProps, "v
|
|
119
119
|
customStyleDatePicker?: string;
|
120
120
|
}
|
121
121
|
|
122
|
-
export declare const Select: (props: SelectFieldProps) =>
|
122
|
+
export declare const Select: (props: SelectFieldProps) => JSX_2.Element;
|
123
123
|
|
124
124
|
export declare interface SelectFieldProps extends SelectProps {
|
125
125
|
field?: ControllerRenderProps<any, any>;
|
@@ -153,7 +153,7 @@ export declare interface TextAreaProps extends TextAreaProps_2 {
|
|
153
153
|
declare type TInputNumberType = "number" | "money";
|
154
154
|
|
155
155
|
export declare const TinyMCE: {
|
156
|
-
(props: TinyProps):
|
156
|
+
(props: TinyProps): JSX_2.Element;
|
157
157
|
displayName: string;
|
158
158
|
};
|
159
159
|
|
package/types/hooks.d.ts
CHANGED
@@ -1,16 +1,15 @@
|
|
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
|
-
type?: "success" | "error" | "info" | "warning";
|
14
13
|
};
|
15
14
|
|
16
15
|
export declare interface PaginationFilters {
|
@@ -34,18 +33,6 @@ export declare const useFiltersHandler: <T>(initialFilters: InitialFiltersSearch
|
|
34
33
|
|
35
34
|
export declare const useMessage: (defaultProps?: OptionalArgsMessage) => (overrideProps?: OptionalArgsMessage) => void;
|
36
35
|
|
37
|
-
export declare const useToast: (defaultProps?: OptionalArgsToast) =>
|
38
|
-
(overrideProps?: OptionalArgsToast): void;
|
39
|
-
success(props?: OptionalArgsToast): void;
|
40
|
-
error(props?: OptionalArgsToast): void;
|
41
|
-
info(props?: OptionalArgsToast): void;
|
42
|
-
warning(props?: OptionalArgsToast): void;
|
43
|
-
};
|
44
|
-
|
45
|
-
export declare const useToggle: () => {
|
46
|
-
open: boolean;
|
47
|
-
toggle: () => void;
|
48
|
-
shouldRender: boolean;
|
49
|
-
};
|
36
|
+
export declare const useToast: (defaultProps?: OptionalArgsToast) => (overrideProps?: OptionalArgsToast) => void;
|
50
37
|
|
51
38
|
export { }
|