@cloudtower/eagle 0.17.13 → 0.20.0
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/UIKitProvider/index.d.ts +8 -0
- package/dist/components/Alert/index.d.ts +3 -0
- package/dist/components/Arch/index.d.ts +3 -0
- package/dist/components/Badge/index.d.ts +3 -0
- package/dist/components/BaseIcon/BaseIcon.stories.d.ts +5 -0
- package/dist/components/Bit/index.d.ts +3 -0
- package/dist/components/BitPerSecond/index.d.ts +3 -0
- package/dist/components/Bps/index.d.ts +3 -0
- package/dist/components/Button/Button.stories.d.ts +18 -0
- package/dist/components/Button/HoverableElement.d.ts +9 -0
- package/dist/components/Button/HoverableElement.stories.d.ts +5 -0
- package/dist/components/Button/index.d.ts +6 -6
- package/dist/components/Byte/index.d.ts +3 -0
- package/dist/components/Checkbox/__test__/h5_css.test.d.ts +1 -0
- package/dist/components/Checkbox/index.d.ts +8 -0
- package/dist/components/Empty/index.d.ts +3 -0
- package/dist/components/Fields/FieldsBoolean/FieldsBoolean.stories.d.ts +5 -0
- package/dist/components/Fields/FieldsBoolean/__test__/h5_css.test.d.ts +1 -0
- package/dist/components/Fields/FieldsBoolean/index.d.ts +4 -0
- package/dist/components/Fields/FieldsDateTime/index.d.ts +4 -0
- package/dist/components/Fields/FieldsDateTimeRange/FieldsDateTimeRange.stories.d.ts +11 -0
- package/dist/components/Fields/FieldsDateTimeRange/__test__/h5_css.test.d.ts +1 -0
- package/dist/components/Fields/FieldsDateTimeRange/index.d.ts +5 -0
- package/dist/components/Fields/FieldsEnum/FieldsEnum.stories.d.ts +7 -0
- package/dist/components/Fields/FieldsEnum/__test__/h5_css.test.d.ts +1 -0
- package/dist/components/Fields/FieldsEnum/index.d.ts +4 -0
- package/dist/components/Fields/FieldsFloat/__test__/h5_css.test.d.ts +1 -0
- package/dist/components/Fields/FieldsFloat/index.d.ts +4 -0
- package/dist/components/Fields/FieldsInt/__test__/h5_css.test.d.ts +1 -0
- package/dist/components/Fields/FieldsInt/index.d.ts +4 -0
- package/dist/components/Fields/FieldsInteger/FieldsInteger.stories.d.ts +6 -0
- package/dist/components/Fields/FieldsInteger/__test__/h5_css.test.d.ts +1 -0
- package/dist/components/Fields/FieldsInteger/index.d.ts +4 -0
- package/dist/components/Fields/FieldsString/FieldsString.stories.d.ts +19 -0
- package/dist/components/Fields/FieldsString/__test__/h5_css.test.d.ts +1 -0
- package/dist/components/Fields/FieldsString/index.d.ts +4 -0
- package/dist/components/Fields/FieldsTextArea/index.d.ts +5 -0
- package/dist/components/Fields/FieldsTimePicker/FieldsTimePicker.stories.d.ts +11 -0
- package/dist/components/Fields/FieldsTimePicker/__test__/h5_css.test.d.ts +1 -0
- package/dist/components/Fields/FieldsTimePicker/index.d.ts +5 -0
- package/dist/components/Fields/index.d.ts +26 -0
- package/dist/components/Frequency/index.d.ts +3 -0
- package/dist/components/Icon/Icon.stories.d.ts +39 -0
- package/dist/components/Icon/index.d.ts +14 -15
- package/dist/components/Input/Input.stories.d.ts +29 -0
- package/dist/components/Input/__test__/h5_css.test.d.ts +1 -0
- package/dist/components/Input/index.d.ts +6 -0
- package/dist/components/InputGroup/__test__/h5_css.test.d.ts +1 -0
- package/dist/components/InputGroup/index.d.ts +3 -0
- package/dist/components/InputInteger/__test__/unit.test.d.ts +1 -0
- package/dist/components/InputInteger/formatterInteger.d.ts +2 -0
- package/dist/components/InputNumber/index.d.ts +12 -0
- package/dist/components/InputTagItem/index.d.ts +5 -0
- package/dist/components/Loading/index.d.ts +2 -2
- package/dist/components/Metric/Metric.stories.d.ts +6 -0
- package/dist/components/Metric/mockMetric.d.ts +3 -0
- package/dist/components/Metric/mockMetric2.d.ts +3 -0
- package/dist/components/Modal/ImmersiveModal.d.ts +5 -0
- package/dist/components/Modal/Modal.stories.d.ts +5 -0
- package/dist/components/Pagination/index.d.ts +0 -1
- package/dist/components/Percent/index.d.ts +3 -0
- package/dist/components/Progress/index.d.ts +3 -0
- package/dist/components/SearchInput/SearchInput.stories.d.ts +4 -0
- package/dist/components/SearchInput/__test__/h5_css.test.d.ts +1 -0
- package/dist/components/SearchInput/index.d.ts +3 -0
- package/dist/components/Second/index.d.ts +3 -0
- package/dist/components/Select/Select.stories.d.ts +16 -0
- package/dist/components/Select/index.d.ts +3 -0
- package/dist/components/Speed/index.d.ts +3 -0
- package/dist/components/Steps/index.d.ts +2 -2
- package/dist/components/Styled/index.d.ts +11 -0
- package/dist/components/Table/SearchWidget.d.ts +3 -3
- package/dist/components/Table/TableWidget.d.ts +1 -1
- package/dist/components/Table/__test__/h5_css.test.d.ts +1 -0
- package/dist/components/TextArea/index.d.ts +4 -0
- package/dist/components/TimePicker/index.d.ts +6 -0
- package/dist/components/TowerTable/TowerTable.stories.d.ts +12 -0
- package/dist/components/TowerTable/WrapperComponent.d.ts +2 -2
- package/dist/components/antd.d.ts +0 -24
- package/dist/components/images/index.d.ts +15 -1123
- package/dist/components/index.d.ts +0 -8
- package/dist/esm/index.js +2674 -9086
- package/dist/esm/stats1.html +1 -1
- package/dist/hooks/useLocalStorage.d.ts +1 -1
- package/dist/hooks/useSearch.d.ts +1 -1
- package/dist/hooks/utils.d.ts +1 -1
- package/dist/index.d.ts +7 -5
- package/dist/spec/base.d.ts +50 -151
- package/dist/spec/react-final-form.d.ts +46 -0
- package/dist/store/modal.d.ts +3 -0
- package/dist/style.css +774 -848
- package/dist/umd/index.js +2611 -10318
- package/dist/umd/stats1.html +1 -1
- package/dist/utils/__test__/tower.test.d.ts +1 -0
- package/dist/utils/icon.d.ts +1 -2
- package/dist/utils/isEmpty.d.ts +2 -0
- package/dist/utils/router.d.ts +1 -1
- package/dist/utils/tower.d.ts +62 -0
- package/package.json +32 -13
- package/README.md +0 -26
- package/dist/components/Form/index.d.ts +0 -154
- package/dist/components/FormError/index.d.ts +0 -29
- package/dist/components/HoverableIcon/index.d.ts +0 -10
- package/dist/components/Modal2/Error.d.ts +0 -14
- package/dist/components/Modal2/InitializedModal.d.ts +0 -4
- package/dist/components/Modal2/Modal.d.ts +0 -9
- package/dist/components/Modal2/WizardModal.d.ts +0 -4
- package/dist/components/Modal2/index.d.ts +0 -10
- package/dist/components/SimplePagination/index.d.ts +0 -4
- package/dist/components/images/images-type.d.ts +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Serializable, SerializableObject } from "@tower/utils";
|
|
2
1
|
import { UserSource } from "../spec";
|
|
3
2
|
import { GlobalSearchHistory, PastTime } from "../utils";
|
|
3
|
+
import { Serializable, SerializableObject } from "../utils/tower";
|
|
4
4
|
declare type SetValue<T> = (obj: T | ((val: T) => T)) => void;
|
|
5
5
|
export declare enum SupportLanguage {
|
|
6
6
|
zh = "zh-CN",
|
package/dist/hooks/utils.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Serializable } from "
|
|
1
|
+
import { Serializable } from "../utils/tower";
|
|
2
2
|
export declare const getSearch: <T extends Serializable>(searchString: string, defaultValue: T) => T;
|
|
3
3
|
export declare function getValue<T extends Serializable>(val: T | Function, params?: T): T;
|
package/dist/index.d.ts
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import "./styles/index.scss";
|
|
2
|
-
export
|
|
3
|
-
export
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
2
|
+
export type { DateRange, GraphType, IconProps, IDataPoint } from "./components";
|
|
3
|
+
export { antdKit, KitStoreProvider, tableStyleCover, tickFormatter, useKitDispatch, useKitSelector, } from "./components";
|
|
4
|
+
export type { Kit, KitSelectProps, SorterOrder } from "./spec";
|
|
5
|
+
export { kitContext } from "./spec";
|
|
6
|
+
export type { KitRootState } from "./store";
|
|
7
|
+
export { closeModal, popModal, pushModal } from "./store";
|
|
8
|
+
export type { SelectProps } from "./utils";
|
|
7
9
|
export * from "@cloudtower/parrot";
|
|
8
10
|
export type { DropDownProps } from "antd/lib/dropdown";
|
|
9
11
|
export type { ColumnsType, ColumnType, TableRowSelection, } from "antd/lib/table/interface";
|
package/dist/spec/base.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FieldArrayRenderProps } from "@smartx/react-final-form-arrays";
|
|
3
|
-
import { SerializableObject } from "@tower/utils";
|
|
1
|
+
import { StyledMeta } from "@linaria/react";
|
|
4
2
|
import { SizeType } from "antd/es/config-provider/SizeContext";
|
|
5
3
|
import { AlertProps } from "antd/lib/alert";
|
|
6
4
|
import { AutoCompleteProps } from "antd/lib/auto-complete";
|
|
@@ -8,41 +6,33 @@ import { BadgeProps } from "antd/lib/badge";
|
|
|
8
6
|
import { ButtonProps as AntdButtonProps, ButtonType } from "antd/lib/button";
|
|
9
7
|
import { CheckboxProps } from "antd/lib/checkbox";
|
|
10
8
|
import { DatePickerProps } from "antd/lib/date-picker";
|
|
11
|
-
import { DividerProps as AntdDividerProps } from "antd/lib/divider";
|
|
12
9
|
import { DropDownProps } from "antd/lib/dropdown";
|
|
13
|
-
import {
|
|
14
|
-
import { InputProps } from "antd/lib/input";
|
|
10
|
+
import { GroupProps, InputProps } from "antd/lib/input";
|
|
15
11
|
import { TextAreaProps as AntdTextAreaProps } from "antd/lib/input/TextArea";
|
|
16
12
|
import { InputNumberProps } from "antd/lib/input-number";
|
|
17
|
-
import { SiderProps } from "antd/lib/layout";
|
|
18
|
-
import { BasicProps } from "antd/lib/layout/layout";
|
|
19
13
|
import { ListProps } from "antd/lib/list";
|
|
20
|
-
import {
|
|
14
|
+
import { ListItemProps } from "antd/lib/list/Item";
|
|
21
15
|
import { MenuItemGroupProps, MenuProps } from "antd/lib/menu";
|
|
22
16
|
import { MenuItemProps } from "antd/lib/menu/MenuItem";
|
|
23
17
|
import { SubMenuProps } from "antd/lib/menu/SubMenu";
|
|
24
|
-
import { MessageInstance } from "antd/lib/message";
|
|
25
18
|
import { ModalProps as AntdModalProps } from "antd/lib/modal";
|
|
26
|
-
import { PopoverProps } from "antd/lib/popover";
|
|
27
19
|
import { ProgressProps } from "antd/lib/progress";
|
|
28
|
-
import {
|
|
20
|
+
import { RadioProps as AntdRadioProps } from "antd/lib/radio";
|
|
29
21
|
import { RadioButtonProps as AntdRadioButtonProps } from "antd/lib/radio/radioButton";
|
|
30
22
|
import { SelectProps as AntdSelectProps } from "antd/lib/select";
|
|
31
|
-
import { SkeletonProps as AntdSkeletonProps } from "antd/lib/skeleton";
|
|
32
23
|
import { StepProps, StepsProps } from "antd/lib/steps";
|
|
33
24
|
import { SwitchProps as AntdSwitchProps } from "antd/lib/switch";
|
|
34
25
|
import { ColumnsType, ColumnType, TableProps as AntdTableProps } from "antd/lib/table";
|
|
35
26
|
import { TableRowSelection } from "antd/lib/table/interface";
|
|
36
|
-
import { TagType } from "antd/lib/tag";
|
|
37
27
|
import { TimePickerProps } from "antd/lib/time-picker";
|
|
38
28
|
import { TooltipProps as AntdTooltipProps } from "antd/lib/tooltip";
|
|
39
|
-
import { TreeProps as AntdTreeProps } from "antd/lib/tree";
|
|
40
29
|
import React, { ReactNode } from "react";
|
|
41
|
-
import {
|
|
30
|
+
import { SerializableObject } from "../utils/tower";
|
|
31
|
+
import { FieldRenderProps } from "./react-final-form";
|
|
42
32
|
import { Architecture } from "./type";
|
|
43
33
|
declare type BadgeTypeProps = "warning" | "error" | "info";
|
|
44
34
|
declare type Primitive = "Int" | "Float" | "DateTime" | "Enum" | "String" | "Boolean";
|
|
45
|
-
declare type Child = {
|
|
35
|
+
export declare type Child = {
|
|
46
36
|
type: Exclude<Primitive, "Enum">;
|
|
47
37
|
} | {
|
|
48
38
|
type: "Enum";
|
|
@@ -69,13 +59,6 @@ interface LooseFieldRenderProps<V, T extends HTMLElement> {
|
|
|
69
59
|
meta?: FieldRenderProps<V, T>["meta"];
|
|
70
60
|
focusIndicator?: boolean;
|
|
71
61
|
}
|
|
72
|
-
export interface ISimplePaginationProps {
|
|
73
|
-
className?: string;
|
|
74
|
-
current: number;
|
|
75
|
-
count: number;
|
|
76
|
-
size: number;
|
|
77
|
-
onPageChange?: (page: number) => void;
|
|
78
|
-
}
|
|
79
62
|
export interface PaginationProps {
|
|
80
63
|
current: number;
|
|
81
64
|
count: number;
|
|
@@ -180,7 +163,7 @@ export interface TableProps<T extends {
|
|
|
180
163
|
interface TableComponent {
|
|
181
164
|
<TData extends IdObject>(props: React.PropsWithChildren<TableProps<TData>>, context?: unknown): React.ReactElement | null;
|
|
182
165
|
}
|
|
183
|
-
export interface
|
|
166
|
+
export interface BaseEnumProps {
|
|
184
167
|
enumValues: readonly (string | {
|
|
185
168
|
value: string;
|
|
186
169
|
text: string;
|
|
@@ -230,7 +213,7 @@ export interface FloatProps {
|
|
|
230
213
|
export declare type TooltipProps = AntdTooltipProps & {
|
|
231
214
|
followMouse?: boolean;
|
|
232
215
|
};
|
|
233
|
-
export declare type FieldBaseProps<V, T extends HTMLElement = HTMLElement> = FieldRenderProps<V, T> & {
|
|
216
|
+
export declare type FieldBaseProps<V = any, T extends HTMLElement = HTMLElement> = FieldRenderProps<V, T> & {
|
|
234
217
|
disabled?: boolean;
|
|
235
218
|
className?: string;
|
|
236
219
|
};
|
|
@@ -259,24 +242,6 @@ export declare type ModalProps = Omit<AntdModalProps, "okType"> & {
|
|
|
259
242
|
disablePrevStep?: boolean;
|
|
260
243
|
} | boolean;
|
|
261
244
|
};
|
|
262
|
-
export declare type Modal2Props = AntdModalProps & {
|
|
263
|
-
/** Set is fullscreen to display modal */
|
|
264
|
-
fullscreen?: boolean;
|
|
265
|
-
/** Set loading type for ok button */
|
|
266
|
-
okLoading?: boolean;
|
|
267
|
-
/** Set disabled type for ok button */
|
|
268
|
-
okDisabled?: boolean;
|
|
269
|
-
/** Set error in footer */
|
|
270
|
-
footerError?: string | React.ReactNode | Error;
|
|
271
|
-
children?: React.ReactNode;
|
|
272
|
-
/** Display cancel button */
|
|
273
|
-
showCancel?: boolean;
|
|
274
|
-
/** Display ok button */
|
|
275
|
-
showOk?: boolean;
|
|
276
|
-
/** Set is a normal modal, width is 460px. If width is set it will fail */
|
|
277
|
-
normal?: boolean;
|
|
278
|
-
size?: "normal" | "medium" | "fullscreen";
|
|
279
|
-
};
|
|
280
245
|
declare type SearchInputProps = Omit<InputProps, "onChange"> & {
|
|
281
246
|
onChange: (value: string) => void;
|
|
282
247
|
debounceWait?: number;
|
|
@@ -296,7 +261,7 @@ export declare type ButtonGroupType = {
|
|
|
296
261
|
key: string;
|
|
297
262
|
title?: string;
|
|
298
263
|
hideTitle?: boolean;
|
|
299
|
-
icon?:
|
|
264
|
+
icon?: JSX.Element;
|
|
300
265
|
}>;
|
|
301
266
|
};
|
|
302
267
|
export declare type IntegerFieldProps<V = any, T extends HTMLElement = HTMLElement> = FieldBaseProps<V, T> & InputNumberProps & {
|
|
@@ -307,11 +272,15 @@ export declare type IntegerFieldProps<V = any, T extends HTMLElement = HTMLEleme
|
|
|
307
272
|
size?: InputSize;
|
|
308
273
|
onBlur?: (input: FieldBaseProps<number, HTMLInputElement>["input"], event?: React.FocusEvent<HTMLInputElement>) => void;
|
|
309
274
|
};
|
|
275
|
+
export declare type FloatFieldProps<V = any, T extends HTMLElement = HTMLElement> = FieldBaseProps<V, T> & FloatProps & {
|
|
276
|
+
onChange?: FieldBaseProps<V, T>["input"]["onChange"];
|
|
277
|
+
autoComplete?: "on" | "off";
|
|
278
|
+
};
|
|
310
279
|
export declare type ButtonProps = {
|
|
311
|
-
prefixIcon?:
|
|
312
|
-
hoverPrefixIcon?:
|
|
313
|
-
suffixIcon?:
|
|
314
|
-
hoverSuffixIcon?:
|
|
280
|
+
prefixIcon?: JSX.Element;
|
|
281
|
+
hoverPrefixIcon?: JSX.Element;
|
|
282
|
+
suffixIcon?: JSX.Element;
|
|
283
|
+
hoverSuffixIcon?: JSX.Element;
|
|
315
284
|
type?: ButtonType | "secondary" | "tertiary" | "ordinary" | "ordinary-onTint" | "quiet";
|
|
316
285
|
} & Omit<AntdButtonProps, "type">;
|
|
317
286
|
export declare type SwitchProps = Omit<AntdSwitchProps, "size"> & {
|
|
@@ -330,66 +299,22 @@ export declare type RadioButtonProps = AntdRadioButtonProps & {
|
|
|
330
299
|
initialValue?: string | number;
|
|
331
300
|
onInputChange?: (val: number | string | undefined) => void;
|
|
332
301
|
};
|
|
333
|
-
export declare type
|
|
302
|
+
export declare type IStepsProps = StepsProps & {
|
|
334
303
|
stepsConfig?: Array<StepProps>;
|
|
335
304
|
containerClassname?: string;
|
|
336
305
|
showStepCount?: boolean;
|
|
337
306
|
};
|
|
338
|
-
declare type ErrorType = string | React.ReactNode | Error;
|
|
339
|
-
export declare type InitializedModalType = Modal2Props & {
|
|
340
|
-
initLoading: boolean;
|
|
341
|
-
initError: ErrorType;
|
|
342
|
-
analyzeFallbackError: (fallback: unknown) => {
|
|
343
|
-
msg: string;
|
|
344
|
-
originalMsg: string;
|
|
345
|
-
} | null;
|
|
346
|
-
};
|
|
347
|
-
export declare type WizardModalType = Modal2Props & {
|
|
348
|
-
step: number;
|
|
349
|
-
onStepChange?: (step: number) => void;
|
|
350
|
-
steps: {
|
|
351
|
-
title: string;
|
|
352
|
-
render: React.ReactNode;
|
|
353
|
-
prevText?: string | React.ReactNode;
|
|
354
|
-
okText?: string | React.ReactNode;
|
|
355
|
-
onOk?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
356
|
-
disabled?: boolean;
|
|
357
|
-
}[];
|
|
358
|
-
right?: React.ReactNode;
|
|
359
|
-
destroyOtherStep?: boolean;
|
|
360
|
-
disablePrevStep?: boolean;
|
|
361
|
-
stepsPosition?: "top" | "side";
|
|
362
|
-
analyzeFallbackError: (fallback: unknown) => {
|
|
363
|
-
msg: string;
|
|
364
|
-
originalMsg: string;
|
|
365
|
-
} | null;
|
|
366
|
-
};
|
|
367
|
-
export interface Modal2Type extends React.FC<Modal2Props> {
|
|
368
|
-
Initialized: React.FC<InitializedModalType>;
|
|
369
|
-
Wizard: React.FC<WizardModalType>;
|
|
370
|
-
}
|
|
371
307
|
export interface Kit<V = any, T extends HTMLElement = HTMLElement> {
|
|
372
308
|
PAGINATION_SELECTOR: string;
|
|
373
309
|
TABLE_WRAPPER_SELECTOR: string;
|
|
374
310
|
THEAD_SELECTOR: string;
|
|
375
311
|
TBODY_SELECTOR: string;
|
|
376
312
|
MODAL_WHITELIST: string[];
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
}>;
|
|
380
|
-
error: React.FunctionComponent<{
|
|
381
|
-
error: unknown;
|
|
382
|
-
}>;
|
|
383
|
-
pagination: React.FC<PaginationProps>;
|
|
384
|
-
select: React.FunctionComponent<LooseFieldRenderProps<V, T> & KitSelectProps>;
|
|
385
|
-
option: React.FunctionComponent<OptionProps>;
|
|
313
|
+
select: SelectComponentType<V, T>;
|
|
314
|
+
option: OptionComponentType;
|
|
386
315
|
table: TableComponent;
|
|
387
|
-
button: React.FC<ButtonProps>;
|
|
388
316
|
modal: React.FC<ModalProps>;
|
|
389
|
-
modal2: React.FC<Modal2Props> & Modal2Type;
|
|
390
317
|
dropdown: React.FC<DropDownProps>;
|
|
391
|
-
switch: React.FC<SwitchProps>;
|
|
392
|
-
tooltip: React.FC<TooltipProps>;
|
|
393
318
|
input: React.FC<InputProps & {
|
|
394
319
|
error?: boolean;
|
|
395
320
|
}>;
|
|
@@ -401,10 +326,7 @@ export interface Kit<V = any, T extends HTMLElement = HTMLElement> {
|
|
|
401
326
|
fields: {
|
|
402
327
|
Int: React.FunctionComponent<IntFieldProps<V, T>>;
|
|
403
328
|
Integer: React.FunctionComponent<IntegerFieldProps<V, T>>;
|
|
404
|
-
Float: React.FunctionComponent<
|
|
405
|
-
onChange?: FieldBaseProps<V, T>["input"]["onChange"];
|
|
406
|
-
autoComplete?: "on" | "off";
|
|
407
|
-
}>;
|
|
329
|
+
Float: React.FunctionComponent<FloatFieldProps<V, T>>;
|
|
408
330
|
DateTime: React.FunctionComponent<FieldBaseProps<V, T>>;
|
|
409
331
|
Enum: React.FunctionComponent<{
|
|
410
332
|
input: Partial<FieldRenderProps<V, T>["input"]>;
|
|
@@ -412,47 +334,15 @@ export interface Kit<V = any, T extends HTMLElement = HTMLElement> {
|
|
|
412
334
|
disabled?: boolean;
|
|
413
335
|
className?: string;
|
|
414
336
|
dropdownClassName?: string;
|
|
415
|
-
} &
|
|
337
|
+
} & BaseEnumProps>;
|
|
416
338
|
String: React.FunctionComponent<FieldBaseProps<V, T> & StringProps>;
|
|
417
339
|
Boolean: React.FunctionComponent<FieldBaseProps<V, T>>;
|
|
418
340
|
TextArea: React.FC<FieldBaseProps<V, T> & TextAreaProps>;
|
|
419
|
-
Array: React.FunctionComponent<FieldArrayRenderProps<V, T> & {
|
|
420
|
-
child: Child;
|
|
421
|
-
}>;
|
|
422
341
|
DateTimeRange: React.FunctionComponent<FieldBaseProps<V, T> & DatePickerProps>;
|
|
423
342
|
TimePicker: React.FunctionComponent<FieldBaseProps<V, T> & TimePickerProps>;
|
|
424
343
|
};
|
|
425
|
-
|
|
426
|
-
Byte: UnitFn;
|
|
427
|
-
Frequency: UnitFn;
|
|
428
|
-
Percent: UnitFn;
|
|
429
|
-
Speed: UnitFn;
|
|
430
|
-
Second: UnitFn;
|
|
431
|
-
Bps: UnitFn;
|
|
432
|
-
BitPerSecond: UnitFn;
|
|
433
|
-
Bit: UnitFn;
|
|
434
|
-
};
|
|
435
|
-
inputGroup: React.FunctionComponent<{
|
|
436
|
-
compact: boolean;
|
|
437
|
-
}>;
|
|
438
|
-
Empty: React.ReactElement | null;
|
|
439
|
-
alert: React.FunctionComponent<Omit<AlertProps, "type"> & {
|
|
440
|
-
type?: AlertProps["type"] | "normal";
|
|
441
|
-
}>;
|
|
344
|
+
inputGroup: InputGroupComponentType;
|
|
442
345
|
searchInput: React.FC<SearchInputProps>;
|
|
443
|
-
exportButton: React.FC<{
|
|
444
|
-
href?: string;
|
|
445
|
-
}>;
|
|
446
|
-
badge: React.FC<BadgeProps & {
|
|
447
|
-
type?: BadgeTypeProps;
|
|
448
|
-
}>;
|
|
449
|
-
radio: React.FC<RadioProps>;
|
|
450
|
-
radioGroup: React.FC<AntdRadioGroupProps>;
|
|
451
|
-
radioButton: React.FC<RadioButtonProps>;
|
|
452
|
-
tree: React.FC<AntdTreeProps>;
|
|
453
|
-
progress: React.FC<ProgressProps>;
|
|
454
|
-
divider: React.FC<AntdDividerProps>;
|
|
455
|
-
skeleton: React.FC<AntdSkeletonProps>;
|
|
456
346
|
menu: React.ComponentType<MenuProps> & {
|
|
457
347
|
Divider: React.FC<import("rc-menu/lib/Divider").DividerProps>;
|
|
458
348
|
Item: React.ComponentType<MenuItemProps>;
|
|
@@ -463,24 +353,33 @@ export interface Kit<V = any, T extends HTMLElement = HTMLElement> {
|
|
|
463
353
|
menuItemGroup: React.ComponentType<MenuItemGroupProps>;
|
|
464
354
|
list: <T>(props: ListProps<T>) => JSX.Element;
|
|
465
355
|
listItem: React.FC<ListItemProps>;
|
|
466
|
-
listItemMeta: React.FC<ListItemMetaProps>;
|
|
467
|
-
layout: React.ComponentType<BasicProps> & {
|
|
468
|
-
Header: React.ComponentType<BasicProps>;
|
|
469
|
-
Footer: React.ComponentType<BasicProps>;
|
|
470
|
-
Content: React.ComponentType<BasicProps>;
|
|
471
|
-
Sider: React.ComponentType<SiderProps>;
|
|
472
|
-
};
|
|
473
356
|
autoComplete: React.ForwardRefExoticComponent<AutoCompleteProps>;
|
|
474
|
-
message: MessageInstance;
|
|
475
|
-
tag: TagType;
|
|
476
|
-
popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<unknown>>;
|
|
477
|
-
arch: React.FC<{
|
|
478
|
-
architecture?: Architecture;
|
|
479
|
-
}>;
|
|
480
|
-
buttonGroup: React.ForwardRefExoticComponent<ButtonGroupType & React.RefAttributes<HTMLDivElement>>;
|
|
481
|
-
steps: React.FC<IStepsPorps>;
|
|
482
|
-
form: React.FC<FormProps>;
|
|
483
|
-
simplePagination: React.FC<ISimplePaginationProps>;
|
|
484
357
|
}
|
|
485
358
|
export declare const kitContext: React.Context<Kit<any, HTMLElement>>;
|
|
359
|
+
export declare type ArchComponentType = React.FC<{
|
|
360
|
+
architecture?: Architecture;
|
|
361
|
+
}>;
|
|
362
|
+
export declare type SelectComponentType<V = any, T extends HTMLElement = HTMLElement> = React.FunctionComponent<LooseFieldRenderProps<V, T> & KitSelectProps>;
|
|
363
|
+
export declare type OptionComponentType = React.FC<OptionProps> & {
|
|
364
|
+
isSelectOption: boolean;
|
|
365
|
+
};
|
|
366
|
+
export declare type BadgeComponentType = React.FC<BadgeProps & {
|
|
367
|
+
type?: BadgeTypeProps;
|
|
368
|
+
}>;
|
|
369
|
+
export declare type ProgressComponentType = React.FC<ProgressProps>;
|
|
370
|
+
export declare type InputGroupComponentType = StyledMeta & React.FC<GroupProps>;
|
|
371
|
+
export declare type AlertComponentType = React.FunctionComponent<Omit<AlertProps, "type"> & {
|
|
372
|
+
type?: AlertProps["type"] | "normal";
|
|
373
|
+
}>;
|
|
374
|
+
export declare type SearchInputComponentType = React.FC<SearchInputProps>;
|
|
375
|
+
export declare type LoadingComponentType = React.FunctionComponent<{
|
|
376
|
+
fullView?: boolean;
|
|
377
|
+
}>;
|
|
378
|
+
export declare type EnumProps<V = any, T extends HTMLElement = HTMLElement> = {
|
|
379
|
+
input: Partial<FieldRenderProps<V, T>["input"]>;
|
|
380
|
+
meta: FieldRenderProps<V, T>["meta"];
|
|
381
|
+
disabled?: boolean;
|
|
382
|
+
className?: string;
|
|
383
|
+
dropdownClassName?: string;
|
|
384
|
+
} & BaseEnumProps;
|
|
486
385
|
export {};
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
interface AnyObject {
|
|
3
|
+
[key: string]: any;
|
|
4
|
+
}
|
|
5
|
+
interface FieldInputProps<FieldValue, T extends HTMLElement = HTMLElement> extends AnyObject {
|
|
6
|
+
name: string;
|
|
7
|
+
onBlur: (event?: React.FocusEvent<T>) => void;
|
|
8
|
+
onChange: (event: React.ChangeEvent<T> | any) => void;
|
|
9
|
+
onFocus: (event?: React.FocusEvent<T>) => void;
|
|
10
|
+
type?: string;
|
|
11
|
+
value: FieldValue;
|
|
12
|
+
checked?: boolean;
|
|
13
|
+
multiple?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface FieldState<FieldValue> {
|
|
16
|
+
active?: boolean;
|
|
17
|
+
blur: () => void;
|
|
18
|
+
change: (value: any) => void;
|
|
19
|
+
data?: AnyObject;
|
|
20
|
+
dirty?: boolean;
|
|
21
|
+
dirtySinceLastSubmit?: boolean;
|
|
22
|
+
error?: any;
|
|
23
|
+
focus: () => void;
|
|
24
|
+
initial?: FieldValue;
|
|
25
|
+
invalid?: boolean;
|
|
26
|
+
length?: number;
|
|
27
|
+
modified?: boolean;
|
|
28
|
+
name: string;
|
|
29
|
+
pristine?: boolean;
|
|
30
|
+
submitError?: any;
|
|
31
|
+
submitFailed?: boolean;
|
|
32
|
+
submitSucceeded?: boolean;
|
|
33
|
+
submitting?: boolean;
|
|
34
|
+
touched?: boolean;
|
|
35
|
+
valid?: boolean;
|
|
36
|
+
validating?: boolean;
|
|
37
|
+
value?: FieldValue;
|
|
38
|
+
visited?: boolean;
|
|
39
|
+
}
|
|
40
|
+
export declare type FieldMetaState<FieldValue> = Pick<FieldState<FieldValue>, Exclude<keyof FieldState<FieldValue>, "blur" | "change" | "focus" | "name" | "value">>;
|
|
41
|
+
export interface FieldRenderProps<FieldValue, T extends HTMLElement = HTMLElement> {
|
|
42
|
+
input: FieldInputProps<FieldValue, T>;
|
|
43
|
+
meta: FieldMetaState<FieldValue>;
|
|
44
|
+
[otherProp: string]: any;
|
|
45
|
+
}
|
|
46
|
+
export {};
|
package/dist/store/modal.d.ts
CHANGED
|
@@ -50,6 +50,9 @@ export declare type Actions = PUSH_MODAL<unknown> | POP_MODAL | REMOVE_MODAL | C
|
|
|
50
50
|
export declare const initialModalState: ModalState;
|
|
51
51
|
export declare const modalReducer: (state: ModalState | undefined, action: Actions) => ModalState;
|
|
52
52
|
export interface IModalProps {
|
|
53
|
+
[key: string]: Partial<{
|
|
54
|
+
[key: string]: unknown;
|
|
55
|
+
}>;
|
|
53
56
|
}
|
|
54
57
|
export declare type GetModalProps<K extends keyof IModalProps> = IModalProps[K] & CloseCb;
|
|
55
58
|
export {};
|