@king-design/intact 2.0.3 → 2.0.4
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/components/cascader/index.d.ts +34 -0
- package/es/components/datepicker/index.d.ts +63 -0
- package/es/components/diagram/index.d.ts +1 -1
- package/es/components/select/select.d.ts +33 -0
- package/es/components/steps/context.d.ts +2 -2
- package/es/components/timepicker/panelPicker.d.ts +54 -0
- package/es/components/treeSelect/index.d.ts +27 -0
- package/es/index.d.ts +2 -2
- package/es/index.js +2 -2
- package/es/site/data/components/menu/demos/collapse/react.d.ts +1 -1
- package/es/site/data/components/menu/demos/size/react.d.ts +1 -1
- package/index.ts +2 -2
- package/package.json +2 -2
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { TypeDefs } from 'intact';
|
|
2
|
+
import { BaseSelect, BaseSelectProps, BaseSelectEvents, BaseSelectBlocks } from '../select/base';
|
|
3
|
+
export interface CascaderProps<V = any, Multipe extends boolean = boolean> extends BaseSelectProps<V[], Multipe> {
|
|
4
|
+
data?: CascaderData<V>[];
|
|
5
|
+
trigger?: 'click' | 'hover';
|
|
6
|
+
changeOnSelect?: boolean;
|
|
7
|
+
format?: (labels: string[]) => string;
|
|
8
|
+
loadData?: (data: CascaderData<V>) => any;
|
|
9
|
+
filter?: (keywords: string, data: CascaderData<V>) => boolean;
|
|
10
|
+
}
|
|
11
|
+
export declare type CascaderData<V> = {
|
|
12
|
+
value: V;
|
|
13
|
+
label: string;
|
|
14
|
+
disabled?: boolean;
|
|
15
|
+
loaded?: boolean;
|
|
16
|
+
children?: CascaderData<V>[];
|
|
17
|
+
};
|
|
18
|
+
export interface CascaderEvents extends BaseSelectEvents {
|
|
19
|
+
}
|
|
20
|
+
export interface CascaderBlocks<V> extends BaseSelectBlocks<V> {
|
|
21
|
+
}
|
|
22
|
+
export declare class Cascader<V = any, Multipe extends boolean = false> extends BaseSelect<CascaderProps<V, Multipe>, CascaderEvents, CascaderBlocks<V>> {
|
|
23
|
+
static template: string | import("intact").Template<any>;
|
|
24
|
+
static typeDefs: Required<TypeDefs<CascaderProps<any, boolean>>>;
|
|
25
|
+
static defaults: () => Partial<CascaderProps<any, boolean>>;
|
|
26
|
+
private value;
|
|
27
|
+
private label;
|
|
28
|
+
private load;
|
|
29
|
+
private filterable;
|
|
30
|
+
private positionObj;
|
|
31
|
+
protected getPlaceholder(): string | number | boolean | import("misstime/dist/utils/types").VNode<any> | import("intact").Children[];
|
|
32
|
+
protected getLabel(): import("intact").Children;
|
|
33
|
+
protected hasValue(): any;
|
|
34
|
+
}
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
import { TypeDefs } from 'intact';
|
|
2
|
+
import dayjs from './dayjs';
|
|
3
|
+
import { State } from '../../hooks/useState';
|
|
4
|
+
import { Shortcut } from './shortcuts';
|
|
5
|
+
import { BasePicker, BasePickerProps, BasePickerEvents, BasePickerBlocks, Value } from './basepicker';
|
|
6
|
+
export * as shortcuts from './shortcuts';
|
|
7
|
+
export interface DatepickerProps<V extends Value = Value, M extends boolean = boolean, R extends boolean = boolean> extends BasePickerProps<V extends string ? V : V | string, M, R> {
|
|
8
|
+
type?: 'date' | 'datetime' | 'year' | 'month';
|
|
9
|
+
shortcuts?: Shortcut[];
|
|
10
|
+
}
|
|
11
|
+
export interface DatepickerEvents extends BasePickerEvents {
|
|
12
|
+
}
|
|
13
|
+
export interface DatepickerBlocks<V extends Value = Value, R extends boolean = boolean> extends BasePickerBlocks<V, R> {
|
|
14
|
+
}
|
|
15
|
+
export declare class Datepicker<V extends Value = Value, M extends boolean = false, R extends boolean = false> extends BasePicker<DatepickerProps<V, M, R>, DatepickerEvents, DatepickerBlocks<V, R>> {
|
|
16
|
+
static template: string | import("intact").Template<any>;
|
|
17
|
+
static typeDefs: Required<TypeDefs<DatepickerProps<Value, boolean, boolean>>>;
|
|
18
|
+
static defaults: () => Partial<DatepickerProps<Value, boolean, boolean>>;
|
|
19
|
+
formats: {
|
|
20
|
+
getValueFormat: () => string;
|
|
21
|
+
getShowFormat: () => string;
|
|
22
|
+
createDateByValueFormat: (value: Value) => dayjs.Dayjs;
|
|
23
|
+
createDateByShowFormat: (value: string) => dayjs.Dayjs;
|
|
24
|
+
getShowString: (value: dayjs.Dayjs) => string;
|
|
25
|
+
getValueString: (value: dayjs.Dayjs) => string;
|
|
26
|
+
};
|
|
27
|
+
disabled: {
|
|
28
|
+
isDisabled: (value: dayjs.Dayjs, type?: dayjs.OpUnitType) => boolean;
|
|
29
|
+
isDisabledTime: (value: dayjs.Dayjs, flag: import("./usePanel").PanelFlags) => boolean;
|
|
30
|
+
isDisabledConfirm: () => boolean;
|
|
31
|
+
maxDate: State<dayjs.Dayjs | null>;
|
|
32
|
+
minDate: State<dayjs.Dayjs | null>;
|
|
33
|
+
};
|
|
34
|
+
panel: {
|
|
35
|
+
startPanel: State<import("./usePanel").PanelTypes>;
|
|
36
|
+
endPanel: State<import("./usePanel").PanelTypes>;
|
|
37
|
+
changePanel: (type: import("./usePanel").PanelTypes, flag?: import("./usePanel").PanelFlags) => void;
|
|
38
|
+
getPanel: (flag: import("./usePanel").PanelFlags) => State<import("./usePanel").PanelTypes>;
|
|
39
|
+
reset: () => void;
|
|
40
|
+
startRef: import("intact").RefObject<import("./calendar").DatepickerCalendar>;
|
|
41
|
+
endRef: import("intact").RefObject<import("./calendar").DatepickerCalendar>;
|
|
42
|
+
};
|
|
43
|
+
focusDate: {
|
|
44
|
+
focusDate: State<dayjs.Dayjs | null>;
|
|
45
|
+
reset: () => void;
|
|
46
|
+
};
|
|
47
|
+
value: {
|
|
48
|
+
format: () => string | string[];
|
|
49
|
+
onConfirm: () => void;
|
|
50
|
+
onChangeTime: (date: dayjs.Dayjs, flag: import("./usePanel").PanelFlags) => void;
|
|
51
|
+
getTimeValue: (flag: import("./usePanel").PanelFlags) => dayjs.Dayjs | null | undefined;
|
|
52
|
+
convertToDayjs: (v: Value | [Value, Value] | Value[] | [Value, Value][] | null | undefined) => import("./basepicker").DayjsValue;
|
|
53
|
+
getDayjsValue: () => import("./basepicker").DayjsValue;
|
|
54
|
+
value: State<import("./basepicker").StateValue>;
|
|
55
|
+
setValue: (v: import("./basepicker").StateValueItem, fromInput: boolean) => void;
|
|
56
|
+
onChangeDate: (v: dayjs.Dayjs, flag: import("./usePanel").PanelFlags) => void;
|
|
57
|
+
};
|
|
58
|
+
init(): void;
|
|
59
|
+
protected getPlaceholder(): string | number | boolean | import("misstime/dist/utils/types").VNode<any> | import("intact").Children[];
|
|
60
|
+
protected getLabel(): string | string[];
|
|
61
|
+
protected clear(e: MouseEvent): void;
|
|
62
|
+
private setByShortcut;
|
|
63
|
+
}
|
|
@@ -10,7 +10,7 @@ export * from './shapes/rectangle';
|
|
|
10
10
|
export * from './shapes/square';
|
|
11
11
|
export * from './shapes/text';
|
|
12
12
|
export * from './shapes/line';
|
|
13
|
-
declare const DDiamond: import("
|
|
13
|
+
declare const DDiamond: import("misstime").ComponentConstructor<import("./shapes/shape").DShape<import("./shapes/shape").DShapeProps>>, DTriangle: import("misstime").ComponentConstructor<import("./shapes/shape").DShape<import("./shapes/shape").DShapeProps>>, DCylinder: import("misstime").ComponentConstructor<import("./shapes/shape").DShape<import("./shapes/shape").DShapeProps>>, DCloud: import("misstime").ComponentConstructor<import("./shapes/shape").DShape<import("./shapes/shape").DShapeProps>>;
|
|
14
14
|
export { DDiamond, DTriangle, DCylinder, DCloud };
|
|
15
15
|
export * from './layouts/layout';
|
|
16
16
|
export * from './layouts/circle';
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Children, TypeDefs } from 'intact';
|
|
2
|
+
import { Option } from './option';
|
|
3
|
+
import { BaseSelect, BaseSelectProps, BaseSelectEvents, BaseSelectBlocks } from './base';
|
|
4
|
+
export interface SelectProps<T = string, Multipe extends boolean = boolean> extends BaseSelectProps<T, Multipe> {
|
|
5
|
+
filter?: (keywords: string, props: any) => boolean;
|
|
6
|
+
searchable?: boolean;
|
|
7
|
+
creatable?: boolean;
|
|
8
|
+
labelMap?: Map<any, Children>;
|
|
9
|
+
card?: boolean;
|
|
10
|
+
autoDisableArrow?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface SelectEvents extends BaseSelectEvents {
|
|
13
|
+
}
|
|
14
|
+
export interface SelectBlocks<T> extends BaseSelectBlocks<T> {
|
|
15
|
+
menu: null;
|
|
16
|
+
}
|
|
17
|
+
export declare class Select<T = string, Multipe extends boolean = false> extends BaseSelect<SelectProps<T, Multipe>, SelectEvents, SelectBlocks<T>> {
|
|
18
|
+
static template: string | import("intact").Template<any>;
|
|
19
|
+
static typeDefs: Required<TypeDefs<SelectProps<string, boolean>>>;
|
|
20
|
+
static defaults: () => Partial<SelectProps<string, boolean>>;
|
|
21
|
+
filterable: {
|
|
22
|
+
getCreatedVNode: (children: (string | number | import("intact").VNode<import("intact").VNodeTag>)[]) => import("intact").VNode<typeof Option> | undefined;
|
|
23
|
+
filter: (children: Children) => Children;
|
|
24
|
+
};
|
|
25
|
+
label: {
|
|
26
|
+
getLabel: () => Children;
|
|
27
|
+
activeIndices: import("intact").NonNullableRefObject<number[]>;
|
|
28
|
+
};
|
|
29
|
+
init(): void;
|
|
30
|
+
protected getPlaceholder(): string | number | boolean | import("misstime/dist/utils/types").VNode<any> | Children[];
|
|
31
|
+
protected getLabel(): Children;
|
|
32
|
+
private getAllShowedValues;
|
|
33
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const context: {
|
|
2
|
-
Provider: import("
|
|
3
|
-
Consumer: import("
|
|
2
|
+
Provider: import("misstime").ComponentConstructor<import("intact").Component<import("../context").ProviderProps<any>, {}, {}, {}>>;
|
|
3
|
+
Consumer: import("misstime").ComponentConstructor<import("intact").Component<import("../context").ConsumerProps<any>, {}, {}, {}>>;
|
|
4
4
|
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { TypeDefs } from 'intact';
|
|
2
|
+
import { BasePicker } from '../datepicker/basepicker';
|
|
3
|
+
import dayjs from '../datepicker/dayjs';
|
|
4
|
+
import { State } from '../../hooks/useState';
|
|
5
|
+
import { PanelTypes } from '../datepicker/usePanel';
|
|
6
|
+
import { TimepickerProps, TimepickerEvents, TimepickerBlocks } from './constants';
|
|
7
|
+
export declare class PanelPicker<Multipe extends boolean = false, Range extends boolean = false> extends BasePicker<TimepickerProps<Multipe, Range>, TimepickerEvents, TimepickerBlocks> {
|
|
8
|
+
static template: string | import("intact").Template<any>;
|
|
9
|
+
static typeDefs: Required<TypeDefs<TimepickerProps<boolean, boolean>>>;
|
|
10
|
+
formats: {
|
|
11
|
+
getValueFormat: () => string;
|
|
12
|
+
getShowFormat: () => string;
|
|
13
|
+
createDateByValueFormat: (value: import("../datepicker/basepicker").Value) => dayjs.Dayjs;
|
|
14
|
+
createDateByShowFormat: (value: import("../datepicker/basepicker").Value) => dayjs.Dayjs;
|
|
15
|
+
getShowString: (value: dayjs.Dayjs) => string;
|
|
16
|
+
getValueString: (value: dayjs.Dayjs) => string;
|
|
17
|
+
};
|
|
18
|
+
disabled: {
|
|
19
|
+
isDisabled: (value: dayjs.Dayjs, type?: dayjs.OpUnitType) => boolean;
|
|
20
|
+
isDisabledConfirm: () => boolean;
|
|
21
|
+
maxDate: State<dayjs.Dayjs | null>;
|
|
22
|
+
minDate: State<dayjs.Dayjs | null>;
|
|
23
|
+
isDisabledTime: (value: dayjs.Dayjs, flag: import("../datepicker/usePanel").PanelFlags) => boolean;
|
|
24
|
+
isDisabledTimeByStep: (value: string, flag: import("../datepicker/usePanel").PanelFlags) => boolean;
|
|
25
|
+
};
|
|
26
|
+
panel: {
|
|
27
|
+
startPanel: State<PanelTypes>;
|
|
28
|
+
endPanel: State<PanelTypes>;
|
|
29
|
+
changePanel: (type: PanelTypes, flag?: import("../datepicker/usePanel").PanelFlags) => void;
|
|
30
|
+
getPanel: (flag: import("../datepicker/usePanel").PanelFlags) => State<PanelTypes>;
|
|
31
|
+
reset: () => void;
|
|
32
|
+
startRef: import("intact").RefObject<import("../datepicker/calendar").DatepickerCalendar>;
|
|
33
|
+
endRef: import("intact").RefObject<import("../datepicker/calendar").DatepickerCalendar>;
|
|
34
|
+
};
|
|
35
|
+
value: {
|
|
36
|
+
format: () => string | string[];
|
|
37
|
+
onConfirm: () => void;
|
|
38
|
+
getTimeValue: (flag: import("../datepicker/usePanel").PanelFlags) => dayjs.Dayjs | null | undefined;
|
|
39
|
+
convertToDayjs: (v: import("../datepicker/basepicker").Value | [import("../datepicker/basepicker").Value, import("../datepicker/basepicker").Value] | import("../datepicker/basepicker").Value[] | [import("../datepicker/basepicker").Value, import("../datepicker/basepicker").Value][] | null | undefined) => import("../datepicker/basepicker").DayjsValue;
|
|
40
|
+
value: State<import("../datepicker/basepicker").StateValue>;
|
|
41
|
+
setValue: (v: import("../datepicker/basepicker").StateValueItem, fromInput: boolean) => void;
|
|
42
|
+
getDayjsValue: () => import("../datepicker/basepicker").DayjsValue;
|
|
43
|
+
onChangeTime: (date: dayjs.Dayjs, flag: import("../datepicker/usePanel").PanelFlags) => void;
|
|
44
|
+
onChangeTimeByStep: (v: string, flag: import("../datepicker/usePanel").PanelFlags) => void;
|
|
45
|
+
};
|
|
46
|
+
step: {
|
|
47
|
+
options: State<{
|
|
48
|
+
value: string;
|
|
49
|
+
label: string;
|
|
50
|
+
}[] | null>;
|
|
51
|
+
};
|
|
52
|
+
protected getPlaceholder(): string | number | boolean | import("misstime/dist/utils/types").VNode<any> | import("intact").Children[];
|
|
53
|
+
protected getLabel(): string | string[];
|
|
54
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { TypeDefs, Children, Key } from 'intact';
|
|
2
|
+
import { BaseSelect, BaseSelectProps, BaseSelectEvents, BaseSelectBlocks } from '../select/base';
|
|
3
|
+
import { TreeProps } from '../tree';
|
|
4
|
+
import type { DataItem } from '../tree/useNodes';
|
|
5
|
+
export interface TreeSelectProps<K extends Key = Key, Multipe extends boolean = boolean, Checkbox extends boolean = boolean> extends BaseSelectProps<K, Multipe, Checkbox extends true ? K[] : K | null> {
|
|
6
|
+
data?: TreeProps<K>['data'];
|
|
7
|
+
uncorrelated?: boolean;
|
|
8
|
+
load?: TreeProps<K>['load'];
|
|
9
|
+
showLine?: boolean;
|
|
10
|
+
defaultExpandAll?: boolean;
|
|
11
|
+
checkbox?: Checkbox;
|
|
12
|
+
filter?: (keywords: string, data: DataItem<K>) => boolean;
|
|
13
|
+
}
|
|
14
|
+
export interface TreeSelectEvents extends BaseSelectEvents {
|
|
15
|
+
}
|
|
16
|
+
export interface TreeSelectBlocks<K> extends BaseSelectBlocks<K> {
|
|
17
|
+
}
|
|
18
|
+
export declare class TreeSelect<K extends Key = Key, Checkbox extends boolean = false, Multipe extends boolean = Checkbox extends true ? true : false> extends BaseSelect<TreeSelectProps<K, Multipe, Checkbox>, TreeSelectEvents, TreeSelectBlocks<K>> {
|
|
19
|
+
static template: string | import("intact").Template<any>;
|
|
20
|
+
static typeDefs: Required<TypeDefs<TreeSelectProps<Key, boolean, boolean>>>;
|
|
21
|
+
static defaults: () => Partial<TreeSelectProps<Key, boolean, boolean>>;
|
|
22
|
+
private value;
|
|
23
|
+
init(): void;
|
|
24
|
+
protected getPlaceholder(): string | number | boolean | import("misstime/dist/utils/types").VNode<any> | Children[];
|
|
25
|
+
protected getLabel(): Children;
|
|
26
|
+
private filter;
|
|
27
|
+
}
|
package/es/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.0.
|
|
2
|
+
* @king-design v2.0.4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -57,4 +57,4 @@ export * from './components/tree';
|
|
|
57
57
|
export * from './components/treeSelect';
|
|
58
58
|
export * from './components/upload';
|
|
59
59
|
export * from './components/wave';
|
|
60
|
-
export declare const version = "2.0.
|
|
60
|
+
export declare const version = "2.0.4";
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.0.
|
|
2
|
+
* @king-design v2.0.4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -59,5 +59,5 @@ export * from './components/tree';
|
|
|
59
59
|
export * from './components/treeSelect';
|
|
60
60
|
export * from './components/upload';
|
|
61
61
|
export * from './components/wave';
|
|
62
|
-
export var version = '2.0.
|
|
62
|
+
export var version = '2.0.4';
|
|
63
63
|
/* generate end */
|
|
@@ -3,7 +3,7 @@ import { MenuProps } from '@king-design/react';
|
|
|
3
3
|
interface Props extends MenuProps {
|
|
4
4
|
}
|
|
5
5
|
export default class Demo extends React.Component<{}, Props> {
|
|
6
|
-
state: MenuProps<import("
|
|
6
|
+
state: MenuProps<import("misstime").Key>;
|
|
7
7
|
private __test;
|
|
8
8
|
setTheme(theme?: string): void;
|
|
9
9
|
render(): JSX.Element;
|
|
@@ -2,6 +2,6 @@ import React from 'react';
|
|
|
2
2
|
import './index.styl';
|
|
3
3
|
import type { MenuProps } from '@king-design/react';
|
|
4
4
|
export default class Demo extends React.Component {
|
|
5
|
-
state: MenuProps<import("
|
|
5
|
+
state: MenuProps<import("misstime").Key>;
|
|
6
6
|
render(): JSX.Element;
|
|
7
7
|
}
|
package/index.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v2.0.
|
|
2
|
+
* @king-design v2.0.4
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -62,6 +62,6 @@ export * from './components/treeSelect';
|
|
|
62
62
|
export * from './components/upload';
|
|
63
63
|
export * from './components/wave';
|
|
64
64
|
|
|
65
|
-
export const version = '2.0.
|
|
65
|
+
export const version = '2.0.4';
|
|
66
66
|
|
|
67
67
|
/* generate end */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@king-design/intact",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.4",
|
|
4
4
|
"description": "A component library written in Intact for Intact, Vue, React and Angular",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -114,7 +114,7 @@
|
|
|
114
114
|
"highlight.js": "^10.4.1",
|
|
115
115
|
"history": "^5.0.0",
|
|
116
116
|
"html-webpack-plugin": "5.3.1",
|
|
117
|
-
"intact-react": "^3.0.
|
|
117
|
+
"intact-react": "^3.0.5",
|
|
118
118
|
"istanbul-instrumenter-loader": "^3.0.0",
|
|
119
119
|
"js-yaml": "^4.1.0",
|
|
120
120
|
"karma": "^6.3.2",
|