@cloudtower/eagle 0.17.12 → 0.19.2-beta.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/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 -9017
- 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 -143
- package/dist/spec/react-final-form.d.ts +46 -0
- package/dist/store/modal.d.ts +3 -0
- package/dist/style.css +1373 -1437
- package/dist/umd/index.js +2611 -10248
- package/dist/umd/stats1.html +1 -1
- 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 +33 -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/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";
|
|
@@ -173,7 +163,7 @@ export interface TableProps<T extends {
|
|
|
173
163
|
interface TableComponent {
|
|
174
164
|
<TData extends IdObject>(props: React.PropsWithChildren<TableProps<TData>>, context?: unknown): React.ReactElement | null;
|
|
175
165
|
}
|
|
176
|
-
export interface
|
|
166
|
+
export interface BaseEnumProps {
|
|
177
167
|
enumValues: readonly (string | {
|
|
178
168
|
value: string;
|
|
179
169
|
text: string;
|
|
@@ -223,7 +213,7 @@ export interface FloatProps {
|
|
|
223
213
|
export declare type TooltipProps = AntdTooltipProps & {
|
|
224
214
|
followMouse?: boolean;
|
|
225
215
|
};
|
|
226
|
-
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> & {
|
|
227
217
|
disabled?: boolean;
|
|
228
218
|
className?: string;
|
|
229
219
|
};
|
|
@@ -252,24 +242,6 @@ export declare type ModalProps = Omit<AntdModalProps, "okType"> & {
|
|
|
252
242
|
disablePrevStep?: boolean;
|
|
253
243
|
} | boolean;
|
|
254
244
|
};
|
|
255
|
-
export declare type Modal2Props = AntdModalProps & {
|
|
256
|
-
/** Set is fullscreen to display modal */
|
|
257
|
-
fullscreen?: boolean;
|
|
258
|
-
/** Set loading type for ok button */
|
|
259
|
-
okLoading?: boolean;
|
|
260
|
-
/** Set disabled type for ok button */
|
|
261
|
-
okDisabled?: boolean;
|
|
262
|
-
/** Set error in footer */
|
|
263
|
-
footerError?: string | React.ReactNode | Error;
|
|
264
|
-
children?: React.ReactNode;
|
|
265
|
-
/** Display cancel button */
|
|
266
|
-
showCancel?: boolean;
|
|
267
|
-
/** Display ok button */
|
|
268
|
-
showOk?: boolean;
|
|
269
|
-
/** Set is a normal modal, width is 460px. If width is set it will fail */
|
|
270
|
-
normal?: boolean;
|
|
271
|
-
size?: "normal" | "medium" | "fullscreen";
|
|
272
|
-
};
|
|
273
245
|
declare type SearchInputProps = Omit<InputProps, "onChange"> & {
|
|
274
246
|
onChange: (value: string) => void;
|
|
275
247
|
debounceWait?: number;
|
|
@@ -289,7 +261,7 @@ export declare type ButtonGroupType = {
|
|
|
289
261
|
key: string;
|
|
290
262
|
title?: string;
|
|
291
263
|
hideTitle?: boolean;
|
|
292
|
-
icon?:
|
|
264
|
+
icon?: JSX.Element;
|
|
293
265
|
}>;
|
|
294
266
|
};
|
|
295
267
|
export declare type IntegerFieldProps<V = any, T extends HTMLElement = HTMLElement> = FieldBaseProps<V, T> & InputNumberProps & {
|
|
@@ -300,11 +272,15 @@ export declare type IntegerFieldProps<V = any, T extends HTMLElement = HTMLEleme
|
|
|
300
272
|
size?: InputSize;
|
|
301
273
|
onBlur?: (input: FieldBaseProps<number, HTMLInputElement>["input"], event?: React.FocusEvent<HTMLInputElement>) => void;
|
|
302
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
|
+
};
|
|
303
279
|
export declare type ButtonProps = {
|
|
304
|
-
prefixIcon?:
|
|
305
|
-
hoverPrefixIcon?:
|
|
306
|
-
suffixIcon?:
|
|
307
|
-
hoverSuffixIcon?:
|
|
280
|
+
prefixIcon?: JSX.Element;
|
|
281
|
+
hoverPrefixIcon?: JSX.Element;
|
|
282
|
+
suffixIcon?: JSX.Element;
|
|
283
|
+
hoverSuffixIcon?: JSX.Element;
|
|
308
284
|
type?: ButtonType | "secondary" | "tertiary" | "ordinary" | "ordinary-onTint" | "quiet";
|
|
309
285
|
} & Omit<AntdButtonProps, "type">;
|
|
310
286
|
export declare type SwitchProps = Omit<AntdSwitchProps, "size"> & {
|
|
@@ -323,66 +299,22 @@ export declare type RadioButtonProps = AntdRadioButtonProps & {
|
|
|
323
299
|
initialValue?: string | number;
|
|
324
300
|
onInputChange?: (val: number | string | undefined) => void;
|
|
325
301
|
};
|
|
326
|
-
export declare type
|
|
302
|
+
export declare type IStepsProps = StepsProps & {
|
|
327
303
|
stepsConfig?: Array<StepProps>;
|
|
328
304
|
containerClassname?: string;
|
|
329
305
|
showStepCount?: boolean;
|
|
330
306
|
};
|
|
331
|
-
declare type ErrorType = string | React.ReactNode | Error;
|
|
332
|
-
export declare type InitializedModalType = Modal2Props & {
|
|
333
|
-
initLoading: boolean;
|
|
334
|
-
initError: ErrorType;
|
|
335
|
-
analyzeFallbackError: (fallback: unknown) => {
|
|
336
|
-
msg: string;
|
|
337
|
-
originalMsg: string;
|
|
338
|
-
} | null;
|
|
339
|
-
};
|
|
340
|
-
export declare type WizardModalType = Modal2Props & {
|
|
341
|
-
step: number;
|
|
342
|
-
onStepChange?: (step: number) => void;
|
|
343
|
-
steps: {
|
|
344
|
-
title: string;
|
|
345
|
-
render: React.ReactNode;
|
|
346
|
-
prevText?: string | React.ReactNode;
|
|
347
|
-
okText?: string | React.ReactNode;
|
|
348
|
-
onOk?: (e: React.MouseEvent<HTMLElement>) => void;
|
|
349
|
-
disabled?: boolean;
|
|
350
|
-
}[];
|
|
351
|
-
right?: React.ReactNode;
|
|
352
|
-
destroyOtherStep?: boolean;
|
|
353
|
-
disablePrevStep?: boolean;
|
|
354
|
-
stepsPosition?: "top" | "side";
|
|
355
|
-
analyzeFallbackError: (fallback: unknown) => {
|
|
356
|
-
msg: string;
|
|
357
|
-
originalMsg: string;
|
|
358
|
-
} | null;
|
|
359
|
-
};
|
|
360
|
-
export interface Modal2Type extends React.FC<Modal2Props> {
|
|
361
|
-
Initialized: React.FC<InitializedModalType>;
|
|
362
|
-
Wizard: React.FC<WizardModalType>;
|
|
363
|
-
}
|
|
364
307
|
export interface Kit<V = any, T extends HTMLElement = HTMLElement> {
|
|
365
308
|
PAGINATION_SELECTOR: string;
|
|
366
309
|
TABLE_WRAPPER_SELECTOR: string;
|
|
367
310
|
THEAD_SELECTOR: string;
|
|
368
311
|
TBODY_SELECTOR: string;
|
|
369
312
|
MODAL_WHITELIST: string[];
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
}>;
|
|
373
|
-
error: React.FunctionComponent<{
|
|
374
|
-
error: unknown;
|
|
375
|
-
}>;
|
|
376
|
-
pagination: React.FC<PaginationProps>;
|
|
377
|
-
select: React.FunctionComponent<LooseFieldRenderProps<V, T> & KitSelectProps>;
|
|
378
|
-
option: React.FunctionComponent<OptionProps>;
|
|
313
|
+
select: SelectComponentType<V, T>;
|
|
314
|
+
option: OptionComponentType;
|
|
379
315
|
table: TableComponent;
|
|
380
|
-
button: React.FC<ButtonProps>;
|
|
381
316
|
modal: React.FC<ModalProps>;
|
|
382
|
-
modal2: React.FC<Modal2Props> & Modal2Type;
|
|
383
317
|
dropdown: React.FC<DropDownProps>;
|
|
384
|
-
switch: React.FC<SwitchProps>;
|
|
385
|
-
tooltip: React.FC<TooltipProps>;
|
|
386
318
|
input: React.FC<InputProps & {
|
|
387
319
|
error?: boolean;
|
|
388
320
|
}>;
|
|
@@ -394,10 +326,7 @@ export interface Kit<V = any, T extends HTMLElement = HTMLElement> {
|
|
|
394
326
|
fields: {
|
|
395
327
|
Int: React.FunctionComponent<IntFieldProps<V, T>>;
|
|
396
328
|
Integer: React.FunctionComponent<IntegerFieldProps<V, T>>;
|
|
397
|
-
Float: React.FunctionComponent<
|
|
398
|
-
onChange?: FieldBaseProps<V, T>["input"]["onChange"];
|
|
399
|
-
autoComplete?: "on" | "off";
|
|
400
|
-
}>;
|
|
329
|
+
Float: React.FunctionComponent<FloatFieldProps<V, T>>;
|
|
401
330
|
DateTime: React.FunctionComponent<FieldBaseProps<V, T>>;
|
|
402
331
|
Enum: React.FunctionComponent<{
|
|
403
332
|
input: Partial<FieldRenderProps<V, T>["input"]>;
|
|
@@ -405,47 +334,15 @@ export interface Kit<V = any, T extends HTMLElement = HTMLElement> {
|
|
|
405
334
|
disabled?: boolean;
|
|
406
335
|
className?: string;
|
|
407
336
|
dropdownClassName?: string;
|
|
408
|
-
} &
|
|
337
|
+
} & BaseEnumProps>;
|
|
409
338
|
String: React.FunctionComponent<FieldBaseProps<V, T> & StringProps>;
|
|
410
339
|
Boolean: React.FunctionComponent<FieldBaseProps<V, T>>;
|
|
411
340
|
TextArea: React.FC<FieldBaseProps<V, T> & TextAreaProps>;
|
|
412
|
-
Array: React.FunctionComponent<FieldArrayRenderProps<V, T> & {
|
|
413
|
-
child: Child;
|
|
414
|
-
}>;
|
|
415
341
|
DateTimeRange: React.FunctionComponent<FieldBaseProps<V, T> & DatePickerProps>;
|
|
416
342
|
TimePicker: React.FunctionComponent<FieldBaseProps<V, T> & TimePickerProps>;
|
|
417
343
|
};
|
|
418
|
-
|
|
419
|
-
Byte: UnitFn;
|
|
420
|
-
Frequency: UnitFn;
|
|
421
|
-
Percent: UnitFn;
|
|
422
|
-
Speed: UnitFn;
|
|
423
|
-
Second: UnitFn;
|
|
424
|
-
Bps: UnitFn;
|
|
425
|
-
BitPerSecond: UnitFn;
|
|
426
|
-
Bit: UnitFn;
|
|
427
|
-
};
|
|
428
|
-
inputGroup: React.FunctionComponent<{
|
|
429
|
-
compact: boolean;
|
|
430
|
-
}>;
|
|
431
|
-
Empty: React.ReactElement | null;
|
|
432
|
-
alert: React.FunctionComponent<Omit<AlertProps, "type"> & {
|
|
433
|
-
type?: AlertProps["type"] | "normal";
|
|
434
|
-
}>;
|
|
344
|
+
inputGroup: InputGroupComponentType;
|
|
435
345
|
searchInput: React.FC<SearchInputProps>;
|
|
436
|
-
exportButton: React.FC<{
|
|
437
|
-
href?: string;
|
|
438
|
-
}>;
|
|
439
|
-
badge: React.FC<BadgeProps & {
|
|
440
|
-
type?: BadgeTypeProps;
|
|
441
|
-
}>;
|
|
442
|
-
radio: React.FC<RadioProps>;
|
|
443
|
-
radioGroup: React.FC<AntdRadioGroupProps>;
|
|
444
|
-
radioButton: React.FC<RadioButtonProps>;
|
|
445
|
-
tree: React.FC<AntdTreeProps>;
|
|
446
|
-
progress: React.FC<ProgressProps>;
|
|
447
|
-
divider: React.FC<AntdDividerProps>;
|
|
448
|
-
skeleton: React.FC<AntdSkeletonProps>;
|
|
449
346
|
menu: React.ComponentType<MenuProps> & {
|
|
450
347
|
Divider: React.FC<import("rc-menu/lib/Divider").DividerProps>;
|
|
451
348
|
Item: React.ComponentType<MenuItemProps>;
|
|
@@ -456,23 +353,33 @@ export interface Kit<V = any, T extends HTMLElement = HTMLElement> {
|
|
|
456
353
|
menuItemGroup: React.ComponentType<MenuItemGroupProps>;
|
|
457
354
|
list: <T>(props: ListProps<T>) => JSX.Element;
|
|
458
355
|
listItem: React.FC<ListItemProps>;
|
|
459
|
-
listItemMeta: React.FC<ListItemMetaProps>;
|
|
460
|
-
layout: React.ComponentType<BasicProps> & {
|
|
461
|
-
Header: React.ComponentType<BasicProps>;
|
|
462
|
-
Footer: React.ComponentType<BasicProps>;
|
|
463
|
-
Content: React.ComponentType<BasicProps>;
|
|
464
|
-
Sider: React.ComponentType<SiderProps>;
|
|
465
|
-
};
|
|
466
356
|
autoComplete: React.ForwardRefExoticComponent<AutoCompleteProps>;
|
|
467
|
-
message: MessageInstance;
|
|
468
|
-
tag: TagType;
|
|
469
|
-
popover: React.ForwardRefExoticComponent<PopoverProps & React.RefAttributes<unknown>>;
|
|
470
|
-
arch: React.FC<{
|
|
471
|
-
architecture?: Architecture;
|
|
472
|
-
}>;
|
|
473
|
-
buttonGroup: React.ForwardRefExoticComponent<ButtonGroupType & React.RefAttributes<HTMLDivElement>>;
|
|
474
|
-
steps: React.FC<IStepsPorps>;
|
|
475
|
-
form: React.FC<FormProps>;
|
|
476
357
|
}
|
|
477
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;
|
|
478
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 {};
|