@pnkx-lib/ui 1.9.4 → 1.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/chunks/{ErrorBoundary-CB-74GLK.js → ErrorBoundary-C_kJ-GaS.js} +30 -6
- package/es/index.js +1 -1
- package/es/ui/index.js +1 -1
- package/package.json +1 -1
- package/types/hooks.d.ts +5 -5
- package/types/index.d.ts +54 -48
- package/types/ui.d.ts +41 -35
@@ -1,5 +1,5 @@
|
|
1
|
-
import { j as jsxRuntimeExports, b as Icon, _ as _extends, c as _typeof, P as PnkxField, C as CheckboxField, u as useForm, 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-za5Skgtp.js';
|
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, Collapse, ColorPicker, Empty as Empty$2, Image as Image$1 } from 'antd';
|
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-za5Skgtp.js';
|
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';
|
5
5
|
import ReactDOM__default, { unstable_batchedUpdates, createPortal } from 'react-dom';
|
@@ -1695,6 +1695,7 @@ var classnames = function classnames(args) {
|
|
1695
1695
|
var _createEmotion = createEmotion({
|
1696
1696
|
key: 'css'
|
1697
1697
|
}),
|
1698
|
+
cx = _createEmotion.cx,
|
1698
1699
|
css = _createEmotion.css;
|
1699
1700
|
|
1700
1701
|
// This icon file is generated automatically.
|
@@ -9664,7 +9665,25 @@ const Tooltip = ({ children, ...props }) => {
|
|
9664
9665
|
return /* @__PURE__ */ jsxRuntimeExports.jsx(Tooltip$1, { ...props, children });
|
9665
9666
|
};
|
9666
9667
|
|
9667
|
-
|
9668
|
+
const EditableCell = ({
|
9669
|
+
editing,
|
9670
|
+
dataIndex,
|
9671
|
+
inputType,
|
9672
|
+
children,
|
9673
|
+
control,
|
9674
|
+
...restProps
|
9675
|
+
}) => {
|
9676
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx("td", { ...restProps, children: editing ? /* @__PURE__ */ jsxRuntimeExports.jsx(
|
9677
|
+
PnkxField,
|
9678
|
+
{
|
9679
|
+
name: dataIndex,
|
9680
|
+
control,
|
9681
|
+
component: Input,
|
9682
|
+
type: inputType
|
9683
|
+
}
|
9684
|
+
) : children });
|
9685
|
+
};
|
9686
|
+
const tableCss = css`
|
9668
9687
|
.ant-table-cell::before {
|
9669
9688
|
display: none !important;
|
9670
9689
|
}
|
@@ -9801,7 +9820,7 @@ const Table = ({
|
|
9801
9820
|
}
|
9802
9821
|
}
|
9803
9822
|
];
|
9804
|
-
columnsEditable.map(
|
9823
|
+
const mergedColumns = columnsEditable.map(
|
9805
9824
|
(col) => {
|
9806
9825
|
if (!col.editable) return col;
|
9807
9826
|
return {
|
@@ -9860,7 +9879,7 @@ const Table = ({
|
|
9860
9879
|
{
|
9861
9880
|
rowKey,
|
9862
9881
|
dataSource: data,
|
9863
|
-
columns,
|
9882
|
+
columns: mergedColumns,
|
9864
9883
|
pagination: paginationConfig,
|
9865
9884
|
loading,
|
9866
9885
|
rowSelection,
|
@@ -9871,6 +9890,11 @@ const Table = ({
|
|
9871
9890
|
locale: {
|
9872
9891
|
emptyText: /* @__PURE__ */ jsxRuntimeExports.jsx(EmptyTable, {})
|
9873
9892
|
},
|
9893
|
+
rowClassName: (_, index) => `table-row-${index % 2 === 0 ? "even" : "odd"}`,
|
9894
|
+
className: cx(tableCss, className),
|
9895
|
+
components: editable ? {
|
9896
|
+
body: { cell: EditableCell }
|
9897
|
+
} : void 0,
|
9874
9898
|
...rest
|
9875
9899
|
}
|
9876
9900
|
),
|
@@ -16748,7 +16772,7 @@ const Appfix = ({ children, ...rest }) => {
|
|
16748
16772
|
};
|
16749
16773
|
|
16750
16774
|
const AutoComplete = (props) => {
|
16751
|
-
return /* @__PURE__ */ jsxRuntimeExports.jsx(AutoComplete$1, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input, {}) });
|
16775
|
+
return /* @__PURE__ */ jsxRuntimeExports.jsx(AutoComplete$1, { ...props, children: /* @__PURE__ */ jsxRuntimeExports.jsx(Input$1, {}) });
|
16752
16776
|
};
|
16753
16777
|
|
16754
16778
|
const PnkxCollapse = (props) => {
|
package/es/index.js
CHANGED
@@ -1,4 +1,4 @@
|
|
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-
|
1
|
+
export { A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from './chunks/ErrorBoundary-C_kJ-GaS.js';
|
2
2
|
export { C as CheckboxField, D as DatePickerField, E as ErrorMessage, I as Input, L as Label, P as PnkxField, R as RangePickerField, a as TinyMCE, T as Typography } from './chunks/Switch-za5Skgtp.js';
|
3
3
|
import 'react-router';
|
4
4
|
export { R as RadioGroup, S as Select } from './chunks/Radio-D2me1zZ-.js';
|
package/es/ui/index.js
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
export { A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from '../chunks/ErrorBoundary-
|
1
|
+
export { A as Alert, E as Anchor, G as Appfix, I as AutoComplete, e as Badge, g as Breadcrumb, U as BulkAction, B as Button, C as CascaderField, f as Col, V as ConfirmModal, d as Container, o as Divider, q as Drawer, D as Dropdown, N as Empty, X as ErrorBoundary, F as Flex, H as Heading, O as Image, L as Layout, j as Menu, M as Modal, k as Pagination, J as PnkxCollapse, K as PnkxColorPicker, r as Popconfirm, P as Popover, Q as QRCode, u as Rate, s as Result, R as Row, c as SearchFiltersForm, v as Segmented, m as Sidebar, S as Skeleton, h as Space, p as Spin, i as Splitter, w as Statistic, l as Steps, T as Table, b as Tabs, n as Tag, x as Timeline, a as Tooltip, y as Tour, z as Tree, W as Watermark, t as typeColorMap } from '../chunks/ErrorBoundary-C_kJ-GaS.js';
|
2
2
|
export { E as ErrorMessage, L as Label, T as Typography } from '../chunks/Switch-za5Skgtp.js';
|
3
3
|
import 'react-router';
|
package/package.json
CHANGED
package/types/hooks.d.ts
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
import { ArgsProps } from 'antd/
|
2
|
-
import { ArgsProps as ArgsProps_2 } from 'antd/
|
1
|
+
import { ArgsProps } from 'antd/es/notification';
|
2
|
+
import { ArgsProps as ArgsProps_2 } from 'antd/lib/message';
|
3
3
|
import { default as default_2 } from 'react';
|
4
4
|
|
5
5
|
export declare type InitialFiltersSearch<T> = T & PaginationFilters;
|
6
6
|
|
7
|
-
export declare type OptionalArgsMessage = Partial<
|
8
|
-
type?:
|
7
|
+
export declare type OptionalArgsMessage = Partial<ArgsProps_2> & {
|
8
|
+
type?: ArgsProps_2["type"];
|
9
9
|
};
|
10
10
|
|
11
|
-
export declare type OptionalArgsToast = Partial<
|
11
|
+
export declare type OptionalArgsToast = Partial<ArgsProps> & {
|
12
12
|
message?: React.ReactNode;
|
13
13
|
};
|
14
14
|
|
package/types/index.d.ts
CHANGED
@@ -2,8 +2,8 @@ import { AffixProps } from 'antd';
|
|
2
2
|
import { AlertProps as AlertProps_2 } from 'antd';
|
3
3
|
import { Anchor as Anchor_2 } from 'antd';
|
4
4
|
import { AnchorProps } from 'antd';
|
5
|
-
import { ArgsProps } from 'antd/
|
6
|
-
import { ArgsProps as ArgsProps_2 } from 'antd/
|
5
|
+
import { ArgsProps } from 'antd/es/notification';
|
6
|
+
import { ArgsProps as ArgsProps_2 } from 'antd/lib/message';
|
7
7
|
import { AutoCompleteProps as AutoCompleteProps_2 } from 'antd';
|
8
8
|
import { BadgeProps as BadgeProps_2 } from 'antd';
|
9
9
|
import { BasicProps } from 'antd/es/layout/layout';
|
@@ -23,8 +23,8 @@ import { Control } from 'react-hook-form';
|
|
23
23
|
import { ControllerFieldState } from 'react-hook-form';
|
24
24
|
import { ControllerRenderProps } from 'react-hook-form';
|
25
25
|
import { Dayjs } from 'dayjs';
|
26
|
-
import { default as default_2 } from '
|
27
|
-
import { default as default_3 } from '
|
26
|
+
import { default as default_2 } from 'react';
|
27
|
+
import { default as default_3 } from 'antd/es/anchor/AnchorLink';
|
28
28
|
import { DefaultOptionType } from 'antd/es/cascader';
|
29
29
|
import { DefaultValues } from 'react-hook-form';
|
30
30
|
import { DividerProps as DividerProps_2 } from 'antd';
|
@@ -105,7 +105,7 @@ export declare const Alert: React.FC<AlertProps>;
|
|
105
105
|
export declare type AlertProps = AlertProps_2;
|
106
106
|
|
107
107
|
export declare const Anchor: typeof Anchor_2 & {
|
108
|
-
Link: typeof
|
108
|
+
Link: typeof default_3;
|
109
109
|
};
|
110
110
|
|
111
111
|
export declare type AnchorPropsUnion = BaseProps_13 & AnchorProps;
|
@@ -113,7 +113,7 @@ export declare type AnchorPropsUnion = BaseProps_13 & AnchorProps;
|
|
113
113
|
export declare const Appfix: ({ children, ...rest }: AppfixProps) => JSX.Element;
|
114
114
|
|
115
115
|
export declare interface AppfixProps extends AffixProps {
|
116
|
-
children:
|
116
|
+
children: default_2.ReactNode;
|
117
117
|
}
|
118
118
|
|
119
119
|
export declare const AutoComplete: React.FC<AutoCompleteProps>;
|
@@ -202,22 +202,23 @@ export declare type BreadcrumbPropsUnion = BaseProps_6 & BreadcrumbProps;
|
|
202
202
|
|
203
203
|
export declare type BreadcrumbSeparatorType = BreadcrumbSeparatorType_2;
|
204
204
|
|
205
|
-
export declare const BulkAction: ({ quantity,
|
205
|
+
export declare const BulkAction: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: BulkActionProps) => JSX.Element;
|
206
206
|
|
207
207
|
export declare interface BulkActionProps {
|
208
208
|
quantity: number;
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
209
|
+
handleRestore?: () => void;
|
210
|
+
handleSendApproval?: () => void;
|
211
|
+
handleCancelSendApproval?: () => void;
|
212
|
+
handleRefuseApproval?: () => void;
|
213
|
+
handleApproval?: () => void;
|
214
|
+
handleCancelApproval?: () => void;
|
215
215
|
handleDelete?: () => void;
|
216
|
-
|
217
|
-
|
216
|
+
handleActivate?: () => void;
|
217
|
+
handleInActivate?: () => void;
|
218
|
+
status?: number;
|
218
219
|
}
|
219
220
|
|
220
|
-
export declare const Button:
|
221
|
+
export declare const Button: default_2.FC<ButtonProps>;
|
221
222
|
|
222
223
|
export declare type ButtonProps = ButtonProps_2;
|
223
224
|
|
@@ -264,20 +265,22 @@ export declare interface ConfirmModalProps extends ModalProps {
|
|
264
265
|
content: string;
|
265
266
|
titleCancelBtn?: string;
|
266
267
|
titleSubmitBtn?: string;
|
267
|
-
typeIcon:
|
268
|
+
typeIcon: ConfirmModalType;
|
268
269
|
handleCancel?: () => void;
|
269
270
|
handleSubmit?: () => void;
|
270
271
|
}
|
271
272
|
|
272
|
-
export declare
|
273
|
+
export declare type ConfirmModalType = "success" | "error" | "warning" | "info";
|
274
|
+
|
275
|
+
export declare const Container: default_2.FC<ContainerProps>;
|
273
276
|
|
274
277
|
export declare interface ContainerProps {
|
275
|
-
children:
|
278
|
+
children: default_2.ReactNode;
|
276
279
|
size?: TailwindMaxWidth;
|
277
280
|
className?: string;
|
278
281
|
}
|
279
282
|
|
280
|
-
declare type CustomInputTypeAttribute =
|
283
|
+
declare type CustomInputTypeAttribute = default_2.HTMLInputTypeAttribute | "money";
|
281
284
|
|
282
285
|
export declare interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "onChange"> {
|
283
286
|
field?: ControllerRenderProps<any, any>;
|
@@ -291,7 +294,7 @@ export declare interface DatePickerDMYProps extends Omit<ReactDatePickerProps, "
|
|
291
294
|
label?: string;
|
292
295
|
maxDate?: Date;
|
293
296
|
showTimeSelect?: boolean;
|
294
|
-
customOnChange?: (date: any, event:
|
297
|
+
customOnChange?: (date: any, event: default_2.SyntheticEvent<any>) => void;
|
295
298
|
customValue?: Date | null;
|
296
299
|
size?: TSize;
|
297
300
|
}
|
@@ -334,7 +337,7 @@ declare class ErrorBoundaryClass extends Component<ErrorBoundaryProps, ErrorBoun
|
|
334
337
|
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
335
338
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
336
339
|
handleReload: () => void;
|
337
|
-
render():
|
340
|
+
render(): default_2.ReactNode;
|
338
341
|
}
|
339
342
|
|
340
343
|
export declare interface ErrorBoundaryProps {
|
@@ -347,7 +350,7 @@ export declare interface ErrorBoundaryState {
|
|
347
350
|
errorInfo: ErrorInfo | null;
|
348
351
|
}
|
349
352
|
|
350
|
-
export declare const ErrorMessage:
|
353
|
+
export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
|
351
354
|
|
352
355
|
export declare interface ErrorMessageProps {
|
353
356
|
errorMessage?: string;
|
@@ -390,8 +393,8 @@ export declare interface InputProps extends InputProps_2 {
|
|
390
393
|
customStyleInput?: string;
|
391
394
|
type?: CustomInputTypeAttribute;
|
392
395
|
afterOnChange?: (value: number | string | null) => void;
|
393
|
-
iconStartInput?:
|
394
|
-
iconEndInput?:
|
396
|
+
iconStartInput?: default_2.ReactNode;
|
397
|
+
iconEndInput?: default_2.ReactNode;
|
395
398
|
allowNegative?: boolean;
|
396
399
|
decimalScale?: number;
|
397
400
|
prefix?: string;
|
@@ -411,12 +414,12 @@ export declare interface LabelProps {
|
|
411
414
|
required?: boolean;
|
412
415
|
}
|
413
416
|
|
414
|
-
export declare const Layout:
|
415
|
-
Header:
|
416
|
-
Footer:
|
417
|
-
Content:
|
418
|
-
Sider:
|
419
|
-
_InternalSiderContext:
|
417
|
+
export declare const Layout: default_2.FC<LayoutProps> & {
|
418
|
+
Header: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
|
419
|
+
Footer: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
|
420
|
+
Content: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
|
421
|
+
Sider: default_2.ForwardRefExoticComponent<SiderProps & default_2.RefAttributes<HTMLDivElement>>;
|
422
|
+
_InternalSiderContext: default_2.Context<SiderContextProps>;
|
420
423
|
};
|
421
424
|
|
422
425
|
export declare type LayoutProps = BaseProps_8 & BasicProps;
|
@@ -442,11 +445,11 @@ declare type MultipleCascaderProps = CascaderProps<DefaultOptionType, string, tr
|
|
442
445
|
multiple: true;
|
443
446
|
};
|
444
447
|
|
445
|
-
export declare type OptionalArgsMessage = Partial<
|
446
|
-
type?:
|
448
|
+
export declare type OptionalArgsMessage = Partial<ArgsProps_2> & {
|
449
|
+
type?: ArgsProps_2["type"];
|
447
450
|
};
|
448
451
|
|
449
|
-
export declare type OptionalArgsToast = Partial<
|
452
|
+
export declare type OptionalArgsToast = Partial<ArgsProps> & {
|
450
453
|
message?: React.ReactNode;
|
451
454
|
};
|
452
455
|
|
@@ -564,7 +567,7 @@ export declare interface SearchFiltersFormProps<T extends FieldValues> {
|
|
564
567
|
setValue?: UseFormSetValue<T>;
|
565
568
|
handleSubmit?: FormEventHandler<any>;
|
566
569
|
reset?: UseFormReset<T>;
|
567
|
-
}) =>
|
570
|
+
}) => default_2.ReactNode;
|
568
571
|
onReset?: () => void;
|
569
572
|
classNamesContainer?: string;
|
570
573
|
classNameWrapperForm?: string;
|
@@ -658,14 +661,14 @@ export declare interface SwitchFieldProps extends Omit<SwitchProps, "onChange" |
|
|
658
661
|
|
659
662
|
declare type TabItem = {
|
660
663
|
key: string;
|
661
|
-
label:
|
662
|
-
children:
|
664
|
+
label: default_2.ReactNode;
|
665
|
+
children: default_2.ReactNode;
|
663
666
|
disabled?: boolean;
|
664
667
|
};
|
665
668
|
|
666
|
-
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave, ...rest }: TableCommonProps<T>) => JSX.Element;
|
669
|
+
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave, titleSettingTableModal, showSetting, setColumns, ...rest }: TableCommonProps<T>) => JSX.Element;
|
667
670
|
|
668
|
-
export declare type TableColumnsType<T> = TableColumnsType_2<T>;
|
671
|
+
export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
|
669
672
|
|
670
673
|
export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
|
671
674
|
editable?: boolean;
|
@@ -673,23 +676,26 @@ export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
|
|
673
676
|
|
674
677
|
export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
|
675
678
|
dataSource: T[];
|
676
|
-
columns: TableColumnsType<T
|
679
|
+
columns: TableColumnsType<T>;
|
677
680
|
loading?: boolean;
|
678
681
|
totalItems: number;
|
679
682
|
filters: any;
|
680
683
|
onChangePage: (page: number) => void;
|
681
684
|
onChangePageSize: (size: number) => void;
|
682
685
|
onSort?: (sortField: string | number | symbol) => void;
|
683
|
-
rowsSelected?:
|
684
|
-
onSelect: (newSelectedRowKeys:
|
686
|
+
rowsSelected?: default_2.Key[];
|
687
|
+
onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
|
685
688
|
onRowClick?: (record: T) => void;
|
686
689
|
rowKey?: string | ((record: T) => string);
|
687
690
|
className?: string;
|
688
691
|
editable?: boolean;
|
689
692
|
onSave?: (data: T) => void;
|
693
|
+
titleSettingTableModal?: string;
|
694
|
+
showSetting?: boolean;
|
695
|
+
setColumns?: (newColumns: TableColumnsType<T>) => void;
|
690
696
|
}
|
691
697
|
|
692
|
-
export declare const Tabs:
|
698
|
+
export declare const Tabs: default_2.FC<TabsProps>;
|
693
699
|
|
694
700
|
export declare type TabsProps = TabsProps_2 & {
|
695
701
|
items: TabItem[];
|
@@ -735,7 +741,7 @@ export declare interface TinyProps extends IAllProps {
|
|
735
741
|
text_patterns?: any;
|
736
742
|
}
|
737
743
|
|
738
|
-
export declare const Tooltip:
|
744
|
+
export declare const Tooltip: default_2.FC<TooltipProps>;
|
739
745
|
|
740
746
|
export declare type TooltipProps = TooltipProps_2;
|
741
747
|
|
@@ -779,13 +785,13 @@ export declare interface UploadFieldProps extends Omit<UploadProps, "value" | "o
|
|
779
785
|
|
780
786
|
export declare const useFiltersHandler: <T>(initialFilters: InitialFiltersSearch<T>) => {
|
781
787
|
filters: InitialFiltersSearch<T>;
|
782
|
-
rowsSelected:
|
783
|
-
setRowsSelected:
|
784
|
-
setFilters:
|
788
|
+
rowsSelected: default_2.Key[];
|
789
|
+
setRowsSelected: default_2.Dispatch<default_2.SetStateAction<default_2.Key[]>>;
|
790
|
+
setFilters: default_2.Dispatch<default_2.SetStateAction<InitialFiltersSearch<T>>>;
|
785
791
|
goToPage: (PageIndex: number) => void;
|
786
792
|
changeRowlimit: (value: number) => void;
|
787
793
|
resetToInitialFilters: () => void;
|
788
|
-
handleCheckBox: (newSelectedRowKeys:
|
794
|
+
handleCheckBox: (newSelectedRowKeys: default_2.Key[]) => void;
|
789
795
|
handleChangePage: (nextPage: number) => void;
|
790
796
|
handleRequestSort: (sortField: string | number | symbol) => void;
|
791
797
|
handleSearch: (nextFilters: InitialFiltersSearch<T>) => void;
|
package/types/ui.d.ts
CHANGED
@@ -17,8 +17,8 @@ import { ColProps as ColProps_2 } from 'antd';
|
|
17
17
|
import { ColSize } from 'antd/es/grid';
|
18
18
|
import { Component } from 'react';
|
19
19
|
import { Control } from 'react-hook-form';
|
20
|
-
import { default as default_2 } from '
|
21
|
-
import { default as default_3 } from '
|
20
|
+
import { default as default_2 } from 'react';
|
21
|
+
import { default as default_3 } from 'antd/es/anchor/AnchorLink';
|
22
22
|
import { DefaultOptionType } from 'antd/es/cascader';
|
23
23
|
import { DefaultValues } from 'react-hook-form';
|
24
24
|
import { DividerProps as DividerProps_2 } from 'antd';
|
@@ -86,7 +86,7 @@ export declare const Alert: React.FC<AlertProps>;
|
|
86
86
|
export declare type AlertProps = AlertProps_2;
|
87
87
|
|
88
88
|
export declare const Anchor: typeof Anchor_2 & {
|
89
|
-
Link: typeof
|
89
|
+
Link: typeof default_3;
|
90
90
|
};
|
91
91
|
|
92
92
|
export declare type AnchorPropsUnion = BaseProps_13 & AnchorProps;
|
@@ -94,7 +94,7 @@ export declare type AnchorPropsUnion = BaseProps_13 & AnchorProps;
|
|
94
94
|
export declare const Appfix: ({ children, ...rest }: AppfixProps) => JSX.Element;
|
95
95
|
|
96
96
|
export declare interface AppfixProps extends AffixProps {
|
97
|
-
children:
|
97
|
+
children: default_2.ReactNode;
|
98
98
|
}
|
99
99
|
|
100
100
|
export declare const AutoComplete: React.FC<AutoCompleteProps>;
|
@@ -183,22 +183,23 @@ export declare type BreadcrumbPropsUnion = BaseProps_6 & BreadcrumbProps;
|
|
183
183
|
|
184
184
|
export declare type BreadcrumbSeparatorType = BreadcrumbSeparatorType_2;
|
185
185
|
|
186
|
-
export declare const BulkAction: ({ quantity,
|
186
|
+
export declare const BulkAction: ({ quantity, handleRestore, handleSendApproval, handleCancelSendApproval, handleRefuseApproval, handleApproval, handleCancelApproval, handleDelete, handleActivate, handleInActivate, status, }: BulkActionProps) => JSX.Element;
|
187
187
|
|
188
188
|
export declare interface BulkActionProps {
|
189
189
|
quantity: number;
|
190
|
-
|
191
|
-
|
192
|
-
|
193
|
-
|
194
|
-
|
195
|
-
|
190
|
+
handleRestore?: () => void;
|
191
|
+
handleSendApproval?: () => void;
|
192
|
+
handleCancelSendApproval?: () => void;
|
193
|
+
handleRefuseApproval?: () => void;
|
194
|
+
handleApproval?: () => void;
|
195
|
+
handleCancelApproval?: () => void;
|
196
196
|
handleDelete?: () => void;
|
197
|
-
|
198
|
-
|
197
|
+
handleActivate?: () => void;
|
198
|
+
handleInActivate?: () => void;
|
199
|
+
status?: number;
|
199
200
|
}
|
200
201
|
|
201
|
-
export declare const Button:
|
202
|
+
export declare const Button: default_2.FC<ButtonProps>;
|
202
203
|
|
203
204
|
export declare type ButtonProps = ButtonProps_2;
|
204
205
|
|
@@ -231,15 +232,17 @@ export declare interface ConfirmModalProps extends ModalProps {
|
|
231
232
|
content: string;
|
232
233
|
titleCancelBtn?: string;
|
233
234
|
titleSubmitBtn?: string;
|
234
|
-
typeIcon:
|
235
|
+
typeIcon: ConfirmModalType;
|
235
236
|
handleCancel?: () => void;
|
236
237
|
handleSubmit?: () => void;
|
237
238
|
}
|
238
239
|
|
239
|
-
export declare
|
240
|
+
export declare type ConfirmModalType = "success" | "error" | "warning" | "info";
|
241
|
+
|
242
|
+
export declare const Container: default_2.FC<ContainerProps>;
|
240
243
|
|
241
244
|
export declare interface ContainerProps {
|
242
|
-
children:
|
245
|
+
children: default_2.ReactNode;
|
243
246
|
size?: TailwindMaxWidth;
|
244
247
|
className?: string;
|
245
248
|
}
|
@@ -280,7 +283,7 @@ declare class ErrorBoundaryClass extends Component<ErrorBoundaryProps, ErrorBoun
|
|
280
283
|
static getDerivedStateFromError(error: Error): ErrorBoundaryState;
|
281
284
|
componentDidCatch(error: Error, errorInfo: ErrorInfo): void;
|
282
285
|
handleReload: () => void;
|
283
|
-
render():
|
286
|
+
render(): default_2.ReactNode;
|
284
287
|
}
|
285
288
|
|
286
289
|
export declare interface ErrorBoundaryProps {
|
@@ -293,7 +296,7 @@ export declare interface ErrorBoundaryState {
|
|
293
296
|
errorInfo: ErrorInfo | null;
|
294
297
|
}
|
295
298
|
|
296
|
-
export declare const ErrorMessage:
|
299
|
+
export declare const ErrorMessage: default_2.MemoExoticComponent<({ errorMessage, isTouched, isSubmitted }: ErrorMessageProps) => JSX.Element | null>;
|
297
300
|
|
298
301
|
export declare interface ErrorMessageProps {
|
299
302
|
errorMessage?: string;
|
@@ -338,12 +341,12 @@ export declare interface LabelProps {
|
|
338
341
|
required?: boolean;
|
339
342
|
}
|
340
343
|
|
341
|
-
export declare const Layout:
|
342
|
-
Header:
|
343
|
-
Footer:
|
344
|
-
Content:
|
345
|
-
Sider:
|
346
|
-
_InternalSiderContext:
|
344
|
+
export declare const Layout: default_2.FC<LayoutProps> & {
|
345
|
+
Header: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
|
346
|
+
Footer: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
|
347
|
+
Content: default_2.ForwardRefExoticComponent<BasicProps & default_2.RefAttributes<HTMLElement>>;
|
348
|
+
Sider: default_2.ForwardRefExoticComponent<SiderProps & default_2.RefAttributes<HTMLDivElement>>;
|
349
|
+
_InternalSiderContext: default_2.Context<SiderContextProps>;
|
347
350
|
};
|
348
351
|
|
349
352
|
export declare type LayoutProps = BaseProps_8 & BasicProps;
|
@@ -431,7 +434,7 @@ export declare interface SearchFiltersFormProps<T extends FieldValues> {
|
|
431
434
|
setValue?: UseFormSetValue<T>;
|
432
435
|
handleSubmit?: FormEventHandler<any>;
|
433
436
|
reset?: UseFormReset<T>;
|
434
|
-
}) =>
|
437
|
+
}) => default_2.ReactNode;
|
435
438
|
onReset?: () => void;
|
436
439
|
classNamesContainer?: string;
|
437
440
|
classNameWrapperForm?: string;
|
@@ -503,14 +506,14 @@ export declare type SubMenuProps = SubMenuProps_2;
|
|
503
506
|
|
504
507
|
declare type TabItem = {
|
505
508
|
key: string;
|
506
|
-
label:
|
507
|
-
children:
|
509
|
+
label: default_2.ReactNode;
|
510
|
+
children: default_2.ReactNode;
|
508
511
|
disabled?: boolean;
|
509
512
|
};
|
510
513
|
|
511
|
-
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave, ...rest }: TableCommonProps<T>) => JSX.Element;
|
514
|
+
export declare const Table: <T extends RowCommon>({ dataSource, columns, loading, totalItems, filters, onChangePage, onChangePageSize, onSort, rowsSelected, onSelect, onRowClick, rowKey, className, editable, onSave, titleSettingTableModal, showSetting, setColumns, ...rest }: TableCommonProps<T>) => JSX.Element;
|
512
515
|
|
513
|
-
export declare type TableColumnsType<T> = TableColumnsType_2<T>;
|
516
|
+
export declare type TableColumnsType<T> = TableColumnsType_2<T> & TableColumnsTypeEditable<T>;
|
514
517
|
|
515
518
|
export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
|
516
519
|
editable?: boolean;
|
@@ -518,23 +521,26 @@ export declare type TableColumnsTypeEditable<T> = (ColumnTypes<T>[number] & {
|
|
518
521
|
|
519
522
|
export declare interface TableCommonProps<T> extends Omit<TableProps<T>, "columns"> {
|
520
523
|
dataSource: T[];
|
521
|
-
columns: TableColumnsType<T
|
524
|
+
columns: TableColumnsType<T>;
|
522
525
|
loading?: boolean;
|
523
526
|
totalItems: number;
|
524
527
|
filters: any;
|
525
528
|
onChangePage: (page: number) => void;
|
526
529
|
onChangePageSize: (size: number) => void;
|
527
530
|
onSort?: (sortField: string | number | symbol) => void;
|
528
|
-
rowsSelected?:
|
529
|
-
onSelect: (newSelectedRowKeys:
|
531
|
+
rowsSelected?: default_2.Key[];
|
532
|
+
onSelect: (newSelectedRowKeys: default_2.Key[]) => void;
|
530
533
|
onRowClick?: (record: T) => void;
|
531
534
|
rowKey?: string | ((record: T) => string);
|
532
535
|
className?: string;
|
533
536
|
editable?: boolean;
|
534
537
|
onSave?: (data: T) => void;
|
538
|
+
titleSettingTableModal?: string;
|
539
|
+
showSetting?: boolean;
|
540
|
+
setColumns?: (newColumns: TableColumnsType<T>) => void;
|
535
541
|
}
|
536
542
|
|
537
|
-
export declare const Tabs:
|
543
|
+
export declare const Tabs: default_2.FC<TabsProps>;
|
538
544
|
|
539
545
|
export declare type TabsProps = TabsProps_2 & {
|
540
546
|
items: TabItem[];
|
@@ -553,7 +559,7 @@ export declare const Timeline: React.FC<TimelineProps>;
|
|
553
559
|
|
554
560
|
export declare type TimelineProps = TimelineProps_2;
|
555
561
|
|
556
|
-
export declare const Tooltip:
|
562
|
+
export declare const Tooltip: default_2.FC<TooltipProps>;
|
557
563
|
|
558
564
|
export declare type TooltipProps = TooltipProps_2;
|
559
565
|
|