@king-design/intact 3.5.2 → 3.6.0-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/components/button/index.md +1 -0
- package/components/datepicker/basepicker.ts +60 -13
- package/components/datepicker/calendar.ts +5 -1
- package/components/datepicker/calendar.vdt +20 -6
- package/components/datepicker/dayjs.ts +22 -2
- package/components/datepicker/demos/multiple.md +0 -5
- package/components/datepicker/demos/nowrap.md +35 -0
- package/components/datepicker/demos/yearMonth.md +8 -2
- package/components/datepicker/helpers.ts +5 -5
- package/components/datepicker/index.md +3 -2
- package/components/datepicker/index.spec.ts +107 -90
- package/components/datepicker/index.ts +23 -5
- package/components/datepicker/index.vdt +34 -35
- package/components/datepicker/styles.ts +102 -3
- package/components/datepicker/useDisabled.ts +3 -3
- package/components/datepicker/useFormats.ts +2 -0
- package/components/datepicker/useMergeRange.ts +54 -0
- package/components/datepicker/usePosition.ts +169 -0
- package/components/datepicker/useQuarters.ts +47 -0
- package/components/datepicker/useShowDate.ts +42 -11
- package/components/datepicker/useValue.ts +35 -4
- package/components/datepicker/useWeeks.ts +58 -0
- package/components/dialog/useFixBody.ts +7 -64
- package/components/ellipsis/styles.ts +4 -0
- package/components/form/styles.ts +1 -0
- package/components/scrollSelect/index.spec.ts +3 -3
- package/components/scrollSelect/useMouseEvents.ts +23 -10
- package/components/select/base.vdt +2 -1
- package/components/select/demos/creatable.md +13 -0
- package/components/select/index.md +1 -0
- package/components/select/index.spec.ts +146 -0
- package/components/select/option.ts +9 -1
- package/components/select/select.ts +2 -0
- package/components/select/useFilterable.ts +1 -1
- package/components/select/useInput.ts +4 -2
- package/components/select/useSearchable.ts +2 -2
- package/components/timepicker/demos/step.md +1 -1
- package/components/timepicker/panelPicker.vdt +5 -1
- package/components/timepicker/styles.ts +0 -1
- package/components/tour/demos/basic.md +73 -0
- package/components/tour/demos/beforeChange.md +109 -0
- package/components/tour/demos/closable.md +70 -0
- package/components/tour/demos/custom.md +98 -0
- package/components/tour/demos/customText.md +94 -0
- package/components/tour/demos/declarative.md +72 -0
- package/components/tour/demos/events.md +101 -0
- package/components/tour/demos/maskClosable.md +76 -0
- package/components/tour/demos/notarget.md +59 -0
- package/components/tour/index.md +48 -0
- package/components/tour/index.spec.ts +259 -0
- package/components/tour/index.ts +2 -0
- package/components/tour/step.ts +55 -0
- package/components/tour/step.vdt +75 -0
- package/components/tour/styles.ts +283 -0
- package/components/tour/tour.ts +107 -0
- package/components/tour/tour.vdt +83 -0
- package/components/tour/useArrow.ts +46 -0
- package/components/tour/useFixBody.ts +22 -0
- package/components/tour/useHighlight.ts +36 -0
- package/components/tour/useMaskClosable.ts +26 -0
- package/components/tour/useNavigation.ts +46 -0
- package/components/tour/usePosition.ts +91 -0
- package/components/tour/useSteps.ts +80 -0
- package/es/components/datepicker/basepicker.d.ts +4 -2
- package/es/components/datepicker/basepicker.js +46 -13
- package/es/components/datepicker/calendar.d.ts +34 -6
- package/es/components/datepicker/calendar.js +4 -0
- package/es/components/datepicker/calendar.vdt.js +21 -5
- package/es/components/datepicker/dayjs.d.ts +13 -2
- package/es/components/datepicker/dayjs.js +6 -0
- package/es/components/datepicker/helpers.d.ts +5 -5
- package/es/components/datepicker/index.d.ts +17 -2
- package/es/components/datepicker/index.js +23 -5
- package/es/components/datepicker/index.spec.js +356 -355
- package/es/components/datepicker/index.vdt.js +25 -29
- package/es/components/datepicker/styles.d.ts +17 -0
- package/es/components/datepicker/styles.js +29 -2
- package/es/components/datepicker/useDisabled.d.ts +2 -2
- package/es/components/datepicker/useDisabled.js +1 -1
- package/es/components/datepicker/useFormats.js +3 -1
- package/es/components/datepicker/useMergeRange.d.ts +5 -0
- package/es/components/datepicker/useMergeRange.js +50 -0
- package/es/components/datepicker/usePosition.d.ts +10 -0
- package/es/components/datepicker/usePosition.js +166 -0
- package/es/components/datepicker/useQuarters.d.ts +15 -0
- package/es/components/datepicker/useQuarters.js +36 -0
- package/es/components/datepicker/useShowDate.d.ts +1 -1
- package/es/components/datepicker/useShowDate.js +42 -9
- package/es/components/datepicker/useStatus.d.ts +1 -1
- package/es/components/datepicker/useValue.d.ts +1 -0
- package/es/components/datepicker/useValue.js +26 -2
- package/es/components/datepicker/useWeeks.d.ts +19 -0
- package/es/components/datepicker/useWeeks.js +48 -0
- package/es/components/dialog/useFixBody.js +6 -58
- package/es/components/ellipsis/styles.js +1 -1
- package/es/components/form/styles.js +1 -1
- package/es/components/scrollSelect/index.spec.js +4 -6
- package/es/components/scrollSelect/useMouseEvents.js +21 -9
- package/es/components/select/base.vdt.js +4 -2
- package/es/components/select/index.spec.js +235 -62
- package/es/components/select/option.d.ts +1 -0
- package/es/components/select/option.js +9 -2
- package/es/components/select/select.d.ts +1 -0
- package/es/components/select/select.js +2 -1
- package/es/components/select/useFilterable.js +2 -1
- package/es/components/select/useInput.js +5 -2
- package/es/components/select/useSearchable.js +1 -0
- package/es/components/timepicker/panelPicker.d.ts +2 -1
- package/es/components/timepicker/panelPicker.vdt.js +12 -4
- package/es/components/timepicker/selectPicker.d.ts +1 -1
- package/es/components/timepicker/styles.js +1 -1
- package/es/components/timepicker/useDisabled.d.ts +1 -1
- package/es/components/timepicker/useValue.d.ts +1 -0
- package/es/components/tour/index.d.ts +2 -0
- package/es/components/tour/index.js +2 -0
- package/es/components/tour/index.spec.d.ts +1 -0
- package/es/components/tour/index.spec.js +356 -0
- package/es/components/tour/step.d.ts +23 -0
- package/es/components/tour/step.js +46 -0
- package/es/components/tour/step.vdt.js +74 -0
- package/es/components/tour/styles.d.ts +7 -0
- package/es/components/tour/styles.js +84 -0
- package/es/components/tour/tour.d.ts +73 -0
- package/es/components/tour/tour.js +70 -0
- package/es/components/tour/tour.vdt.js +66 -0
- package/es/components/tour/useArrow.d.ts +4 -0
- package/es/components/tour/useArrow.js +40 -0
- package/es/components/tour/useFixBody.d.ts +4 -0
- package/es/components/tour/useFixBody.js +17 -0
- package/es/components/tour/useHighlight.d.ts +4 -0
- package/es/components/tour/useHighlight.js +31 -0
- package/es/components/tour/useMaskClosable.d.ts +1 -0
- package/es/components/tour/useMaskClosable.js +25 -0
- package/es/components/tour/useNavigation.d.ts +5 -0
- package/es/components/tour/useNavigation.js +103 -0
- package/es/components/tour/usePosition.d.ts +6 -0
- package/es/components/tour/usePosition.js +93 -0
- package/es/components/tour/useSteps.d.ts +6 -0
- package/es/components/tour/useSteps.js +68 -0
- package/es/hooks/useFixBody.d.ts +11 -0
- package/es/hooks/useFixBody.js +72 -0
- package/es/index.d.ts +3 -2
- package/es/index.js +3 -2
- package/es/site/data/components/datepicker/demos/multiple/index.d.ts +0 -1
- package/es/site/data/components/datepicker/demos/multiple/index.js +1 -2
- package/es/site/data/components/datepicker/demos/multiple/react.d.ts +0 -1
- package/es/site/data/components/datepicker/demos/multiple/react.js +2 -13
- package/es/site/data/components/datepicker/demos/nowrap/index.d.ts +10 -0
- package/es/site/data/components/datepicker/demos/nowrap/index.js +19 -0
- package/es/site/data/components/datepicker/demos/nowrap/react.d.ts +10 -0
- package/es/site/data/components/datepicker/demos/nowrap/react.js +49 -0
- package/es/site/data/components/datepicker/demos/yearMonth/index.d.ts +2 -0
- package/es/site/data/components/datepicker/demos/yearMonth/index.js +3 -1
- package/es/site/data/components/datepicker/demos/yearMonth/react.d.ts +2 -0
- package/es/site/data/components/datepicker/demos/yearMonth/react.js +21 -1
- package/es/site/data/components/select/demos/creatable/index.d.ts +1 -0
- package/es/site/data/components/select/demos/creatable/index.js +2 -1
- package/es/site/data/components/select/demos/creatable/react.d.ts +1 -0
- package/es/site/data/components/select/demos/creatable/react.js +31 -2
- package/es/site/data/components/select/demos/searchable/index.js +1 -1
- package/es/site/data/components/select/demos/searchable/react.js +1 -1
- package/es/site/data/components/tour/demos/basic/index.d.ts +17 -0
- package/es/site/data/components/tour/demos/basic/index.js +46 -0
- package/es/site/data/components/tour/demos/basic/react.d.ts +16 -0
- package/es/site/data/components/tour/demos/basic/react.js +82 -0
- package/es/site/data/components/tour/demos/beforeChange/index.d.ts +20 -0
- package/es/site/data/components/tour/demos/beforeChange/index.js +69 -0
- package/es/site/data/components/tour/demos/beforeChange/react.d.ts +19 -0
- package/es/site/data/components/tour/demos/beforeChange/react.js +129 -0
- package/es/site/data/components/tour/demos/closable/index.d.ts +18 -0
- package/es/site/data/components/tour/demos/closable/index.js +42 -0
- package/es/site/data/components/tour/demos/closable/react.d.ts +17 -0
- package/es/site/data/components/tour/demos/closable/react.js +85 -0
- package/es/site/data/components/tour/demos/custom/index.d.ts +11 -0
- package/es/site/data/components/tour/demos/custom/index.js +35 -0
- package/es/site/data/components/tour/demos/custom/react.d.ts +11 -0
- package/es/site/data/components/tour/demos/custom/react.js +108 -0
- package/es/site/data/components/tour/demos/customButtons/index.d.ts +33 -0
- package/es/site/data/components/tour/demos/customButtons/index.js +55 -0
- package/es/site/data/components/tour/demos/customButtons/react.d.ts +33 -0
- package/es/site/data/components/tour/demos/customButtons/react.js +99 -0
- package/es/site/data/components/tour/demos/customText/index.d.ts +20 -0
- package/es/site/data/components/tour/demos/customText/index.js +54 -0
- package/es/site/data/components/tour/demos/customText/react.d.ts +19 -0
- package/es/site/data/components/tour/demos/customText/react.js +95 -0
- package/es/site/data/components/tour/demos/declarative/index.d.ts +11 -0
- package/es/site/data/components/tour/demos/declarative/index.js +36 -0
- package/es/site/data/components/tour/demos/declarative/react.d.ts +10 -0
- package/es/site/data/components/tour/demos/declarative/react.js +80 -0
- package/es/site/data/components/tour/demos/events/index.d.ts +18 -0
- package/es/site/data/components/tour/demos/events/index.js +58 -0
- package/es/site/data/components/tour/demos/events/react.d.ts +18 -0
- package/es/site/data/components/tour/demos/events/react.js +101 -0
- package/es/site/data/components/tour/demos/maskClosable/index.d.ts +18 -0
- package/es/site/data/components/tour/demos/maskClosable/index.js +47 -0
- package/es/site/data/components/tour/demos/maskClosable/react.d.ts +17 -0
- package/es/site/data/components/tour/demos/maskClosable/react.js +95 -0
- package/es/site/data/components/tour/demos/notarget/index.d.ts +11 -0
- package/es/site/data/components/tour/demos/notarget/index.js +35 -0
- package/es/site/data/components/tour/demos/notarget/react.d.ts +10 -0
- package/es/site/data/components/tour/demos/notarget/react.js +61 -0
- package/es/site/data/components/tour/index.d.ts +57 -0
- package/es/site/data/components/tour/index.js +32 -0
- package/hooks/useFixBody.ts +87 -0
- package/index.ts +3 -2
- package/package.json +1 -1
package/es/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* @king-design v3.
|
|
2
|
+
* @king-design v3.6.0-beta.0
|
|
3
3
|
*
|
|
4
4
|
* Copyright (c) Kingsoft Cloud
|
|
5
5
|
* Released under the MIT License
|
|
@@ -59,6 +59,7 @@ export * from './components/timeline';
|
|
|
59
59
|
export * from './components/timepicker';
|
|
60
60
|
export * from './components/tip';
|
|
61
61
|
export * from './components/tooltip';
|
|
62
|
+
export * from './components/tour';
|
|
62
63
|
export * from './components/transfer';
|
|
63
64
|
export * from './components/tree';
|
|
64
65
|
export * from './components/treeSelect';
|
|
@@ -66,5 +67,5 @@ export * from './components/upload';
|
|
|
66
67
|
export * from './components/view';
|
|
67
68
|
export * from './components/virtualList';
|
|
68
69
|
export * from './components/wave';
|
|
69
|
-
export var version = '3.
|
|
70
|
+
export var version = '3.6.0-beta.0';
|
|
70
71
|
/* generate end */
|
|
@@ -17,8 +17,7 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
17
17
|
datetime: [],
|
|
18
18
|
year: [],
|
|
19
19
|
month: [],
|
|
20
|
-
dateRange: []
|
|
21
|
-
datetimeRange: []
|
|
20
|
+
dateRange: []
|
|
22
21
|
};
|
|
23
22
|
return _this;
|
|
24
23
|
}
|
|
@@ -70,17 +69,7 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
70
69
|
dateRange: dateRange
|
|
71
70
|
});
|
|
72
71
|
}
|
|
73
|
-
}), "You selected: ", _JSON$stringify(this.state.dateRange), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null)
|
|
74
|
-
multiple: true,
|
|
75
|
-
range: true,
|
|
76
|
-
value: this.state.datetimeRange,
|
|
77
|
-
onChangeValue: function onChangeValue(datetimeRange) {
|
|
78
|
-
return _this2.setState({
|
|
79
|
-
datetimeRange: datetimeRange
|
|
80
|
-
});
|
|
81
|
-
},
|
|
82
|
-
type: "datetime"
|
|
83
|
-
}), "You selected: ", _JSON$stringify(this.state.datetimeRange), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null));
|
|
72
|
+
}), "You selected: ", _JSON$stringify(this.state.dateRange), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null));
|
|
84
73
|
};
|
|
85
74
|
return Demo;
|
|
86
75
|
}(React.Component);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
interface Props {
|
|
4
|
+
dateRange?: [string, string][];
|
|
5
|
+
mergeDateRange?: [string, string][];
|
|
6
|
+
}
|
|
7
|
+
export default class extends Component<Props> {
|
|
8
|
+
static template: string | import("intact").Template<any>;
|
|
9
|
+
static defaults(): Props;
|
|
10
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
export { default as data } from './index.json';
|
|
3
|
+
import { Component } from 'intact';
|
|
4
|
+
import template from './index.vdt';
|
|
5
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
6
|
+
_inheritsLoose(default_1, _Component);
|
|
7
|
+
function default_1() {
|
|
8
|
+
return _Component.apply(this, arguments) || this;
|
|
9
|
+
}
|
|
10
|
+
default_1.defaults = function defaults() {
|
|
11
|
+
return {
|
|
12
|
+
dateRange: [],
|
|
13
|
+
mergeDateRange: []
|
|
14
|
+
};
|
|
15
|
+
};
|
|
16
|
+
return default_1;
|
|
17
|
+
}(Component);
|
|
18
|
+
default_1.template = template;
|
|
19
|
+
export { default_1 as default };
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
3
|
+
import _JSON$stringify from "@babel/runtime-corejs3/core-js/json/stringify";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { Datepicker } from '@king-design/react';
|
|
6
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
7
|
+
_inheritsLoose(Demo, _React$Component);
|
|
8
|
+
function Demo() {
|
|
9
|
+
var _context;
|
|
10
|
+
var _this;
|
|
11
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
12
|
+
args[_key] = arguments[_key];
|
|
13
|
+
}
|
|
14
|
+
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
15
|
+
_this.state = {
|
|
16
|
+
dateRange: [],
|
|
17
|
+
mergeDateRange: []
|
|
18
|
+
};
|
|
19
|
+
return _this;
|
|
20
|
+
}
|
|
21
|
+
var _proto = Demo.prototype;
|
|
22
|
+
_proto.render = function render() {
|
|
23
|
+
var _this2 = this;
|
|
24
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement(Datepicker, {
|
|
25
|
+
multiple: true,
|
|
26
|
+
nowrap: true,
|
|
27
|
+
range: true,
|
|
28
|
+
value: this.state.dateRange,
|
|
29
|
+
onChangeValue: function onChangeValue(dateRange) {
|
|
30
|
+
return _this2.setState({
|
|
31
|
+
dateRange: dateRange
|
|
32
|
+
});
|
|
33
|
+
}
|
|
34
|
+
}), "You selected: ", _JSON$stringify(this.state.dateRange), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Datepicker, {
|
|
35
|
+
multiple: true,
|
|
36
|
+
nowrap: true,
|
|
37
|
+
isMerge: true,
|
|
38
|
+
range: true,
|
|
39
|
+
value: this.state.mergeDateRange,
|
|
40
|
+
onChangeValue: function onChangeValue(mergeDateRange) {
|
|
41
|
+
return _this2.setState({
|
|
42
|
+
mergeDateRange: mergeDateRange
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
}), "You selected: ", _JSON$stringify(this.state.mergeDateRange), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null));
|
|
46
|
+
};
|
|
47
|
+
return Demo;
|
|
48
|
+
}(React.Component);
|
|
49
|
+
export { Demo as default };
|
|
@@ -14,7 +14,9 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
14
14
|
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
15
15
|
_this.state = {
|
|
16
16
|
year: null,
|
|
17
|
-
month: null
|
|
17
|
+
month: null,
|
|
18
|
+
week: null,
|
|
19
|
+
quarter: null
|
|
18
20
|
};
|
|
19
21
|
return _this;
|
|
20
22
|
}
|
|
@@ -38,6 +40,24 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
38
40
|
});
|
|
39
41
|
},
|
|
40
42
|
clearable: true
|
|
43
|
+
}), /*#__PURE__*/React.createElement(Datepicker, {
|
|
44
|
+
type: "week",
|
|
45
|
+
value: this.state.week,
|
|
46
|
+
onChangeValue: function onChangeValue(week) {
|
|
47
|
+
return _this2.setState({
|
|
48
|
+
week: week
|
|
49
|
+
});
|
|
50
|
+
},
|
|
51
|
+
clearable: true
|
|
52
|
+
}), /*#__PURE__*/React.createElement(Datepicker, {
|
|
53
|
+
type: "quarter",
|
|
54
|
+
value: this.state.quarter,
|
|
55
|
+
onChangeValue: function onChangeValue(quarter) {
|
|
56
|
+
return _this2.setState({
|
|
57
|
+
quarter: quarter
|
|
58
|
+
});
|
|
59
|
+
},
|
|
60
|
+
clearable: true
|
|
41
61
|
}));
|
|
42
62
|
};
|
|
43
63
|
return Demo;
|
|
@@ -14,7 +14,8 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
14
14
|
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
15
15
|
_this.state = {
|
|
16
16
|
day: null,
|
|
17
|
-
days: []
|
|
17
|
+
days: [],
|
|
18
|
+
dayWithKeywords: []
|
|
18
19
|
};
|
|
19
20
|
return _this;
|
|
20
21
|
}
|
|
@@ -75,7 +76,35 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
75
76
|
value: "Saturday"
|
|
76
77
|
}, "\u661F\u671F\u516D"), /*#__PURE__*/React.createElement(Option, {
|
|
77
78
|
value: "Sunday"
|
|
78
|
-
}, "\u661F\u671F\u5929")), "Days: ", _JSON$stringify(this.state.days))
|
|
79
|
+
}, "\u661F\u671F\u5929")), "Days: ", _JSON$stringify(this.state.days), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement("br", null), /*#__PURE__*/React.createElement(Select, {
|
|
80
|
+
value: this.state.dayWithKeywords,
|
|
81
|
+
onChangeValue: function onChangeValue(dayWithKeywords) {
|
|
82
|
+
return _this2.setState({
|
|
83
|
+
dayWithKeywords: dayWithKeywords
|
|
84
|
+
});
|
|
85
|
+
},
|
|
86
|
+
filterable: true,
|
|
87
|
+
multiple: true,
|
|
88
|
+
creatable: true,
|
|
89
|
+
keepKeywords: true,
|
|
90
|
+
style: {
|
|
91
|
+
"marginRight": "10px"
|
|
92
|
+
}
|
|
93
|
+
}, /*#__PURE__*/React.createElement(Option, {
|
|
94
|
+
value: "Monday"
|
|
95
|
+
}, "\u661F\u671F\u4E00"), /*#__PURE__*/React.createElement(Option, {
|
|
96
|
+
value: "Tuesday"
|
|
97
|
+
}, "\u661F\u671F\u4E8C"), /*#__PURE__*/React.createElement(Option, {
|
|
98
|
+
value: "Wednesday"
|
|
99
|
+
}, "\u661F\u671F\u4E09"), /*#__PURE__*/React.createElement(Option, {
|
|
100
|
+
value: "Thursday"
|
|
101
|
+
}, "\u661F\u671F\u56DB"), /*#__PURE__*/React.createElement(Option, {
|
|
102
|
+
value: "Friday"
|
|
103
|
+
}, "\u661F\u671F\u4E94"), /*#__PURE__*/React.createElement(Option, {
|
|
104
|
+
value: "Saturday"
|
|
105
|
+
}, "\u661F\u671F\u516D"), /*#__PURE__*/React.createElement(Option, {
|
|
106
|
+
value: "Sunday"
|
|
107
|
+
}, "\u661F\u671F\u5929")), "Day with keepKeywords: ", _JSON$stringify(this.state.dayWithKeywords));
|
|
79
108
|
};
|
|
80
109
|
return Demo;
|
|
81
110
|
}(React.Component);
|
|
@@ -14,7 +14,7 @@ var Demo = /*#__PURE__*/function (_React$Component) {
|
|
|
14
14
|
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
15
15
|
_this.state = {
|
|
16
16
|
day: null,
|
|
17
|
-
days: []
|
|
17
|
+
days: ['Tuesday']
|
|
18
18
|
};
|
|
19
19
|
return _this;
|
|
20
20
|
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
export default class extends Component {
|
|
4
|
+
static template: string | import("intact").Template<any>;
|
|
5
|
+
static defaults(): {
|
|
6
|
+
currentStep: number;
|
|
7
|
+
showTour: boolean;
|
|
8
|
+
tourData: {
|
|
9
|
+
target: string;
|
|
10
|
+
title: string;
|
|
11
|
+
content: string;
|
|
12
|
+
position: string;
|
|
13
|
+
}[];
|
|
14
|
+
};
|
|
15
|
+
settour(): void;
|
|
16
|
+
close(): void;
|
|
17
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import { __decorate } from "tslib";
|
|
3
|
+
export { default as data } from './index.json';
|
|
4
|
+
import { Component } from 'intact';
|
|
5
|
+
import template from './index.vdt';
|
|
6
|
+
import { bind } from 'kpc';
|
|
7
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
8
|
+
_inheritsLoose(default_1, _Component);
|
|
9
|
+
function default_1() {
|
|
10
|
+
return _Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
default_1.defaults = function defaults() {
|
|
13
|
+
return {
|
|
14
|
+
currentStep: 0,
|
|
15
|
+
showTour: false,
|
|
16
|
+
tourData: [{
|
|
17
|
+
target: '#btn1',
|
|
18
|
+
title: '第一步',
|
|
19
|
+
content: '这是第一步的引导说明',
|
|
20
|
+
position: 'bottom'
|
|
21
|
+
}, {
|
|
22
|
+
target: '#btn2',
|
|
23
|
+
title: '第二步',
|
|
24
|
+
content: '这是第二步的引导说明',
|
|
25
|
+
position: 'right'
|
|
26
|
+
}]
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
var _proto = default_1.prototype;
|
|
30
|
+
_proto.settour = function settour() {
|
|
31
|
+
this.set({
|
|
32
|
+
showTour: true,
|
|
33
|
+
currentStep: 0
|
|
34
|
+
});
|
|
35
|
+
};
|
|
36
|
+
_proto.close = function close() {
|
|
37
|
+
this.set({
|
|
38
|
+
showTour: false
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
return default_1;
|
|
42
|
+
}(Component);
|
|
43
|
+
default_1.template = template;
|
|
44
|
+
export { default_1 as default };
|
|
45
|
+
__decorate([bind], default_1.prototype, "settour", null);
|
|
46
|
+
__decorate([bind], default_1.prototype, "close", null);
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export default class Demo extends React.Component {
|
|
3
|
+
state: {
|
|
4
|
+
currentStep: number;
|
|
5
|
+
showTour: boolean;
|
|
6
|
+
tourData: {
|
|
7
|
+
target: string;
|
|
8
|
+
title: string;
|
|
9
|
+
content: string;
|
|
10
|
+
position: string;
|
|
11
|
+
}[];
|
|
12
|
+
};
|
|
13
|
+
settour(): void;
|
|
14
|
+
close(): void;
|
|
15
|
+
render(): React.JSX.Element;
|
|
16
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import _concatInstanceProperty from "@babel/runtime-corejs3/core-js/instance/concat";
|
|
3
|
+
import { __decorate } from "tslib";
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { Tour, Button } from '@king-design/react';
|
|
6
|
+
import { bind } from '@king-design/react';
|
|
7
|
+
var Demo = /*#__PURE__*/function (_React$Component) {
|
|
8
|
+
_inheritsLoose(Demo, _React$Component);
|
|
9
|
+
function Demo() {
|
|
10
|
+
var _context;
|
|
11
|
+
var _this;
|
|
12
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
13
|
+
args[_key] = arguments[_key];
|
|
14
|
+
}
|
|
15
|
+
_this = _React$Component.call.apply(_React$Component, _concatInstanceProperty(_context = [this]).call(_context, args)) || this;
|
|
16
|
+
_this.state = {
|
|
17
|
+
currentStep: 0,
|
|
18
|
+
showTour: false,
|
|
19
|
+
tourData: [{
|
|
20
|
+
target: '#btn1',
|
|
21
|
+
title: '第一步',
|
|
22
|
+
content: '这是第一步的引导说明',
|
|
23
|
+
position: 'bottom'
|
|
24
|
+
}, {
|
|
25
|
+
target: '#btn2',
|
|
26
|
+
title: '第二步',
|
|
27
|
+
content: '这是第二步的引导说明',
|
|
28
|
+
position: 'right'
|
|
29
|
+
}]
|
|
30
|
+
};
|
|
31
|
+
return _this;
|
|
32
|
+
}
|
|
33
|
+
var _proto = Demo.prototype;
|
|
34
|
+
_proto.settour = function settour() {
|
|
35
|
+
this.setState({
|
|
36
|
+
showTour: true,
|
|
37
|
+
currentStep: 0
|
|
38
|
+
});
|
|
39
|
+
};
|
|
40
|
+
_proto.close = function close() {
|
|
41
|
+
this.setState({
|
|
42
|
+
showTour: false
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
_proto.render = function render() {
|
|
46
|
+
var _this2 = this;
|
|
47
|
+
return /*#__PURE__*/React.createElement("div", null, /*#__PURE__*/React.createElement("div", {
|
|
48
|
+
className: "example-container"
|
|
49
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
50
|
+
id: "btn1"
|
|
51
|
+
}, "\u793A\u4F8B\u5143\u7D201"), /*#__PURE__*/React.createElement(Button, {
|
|
52
|
+
id: "btn2",
|
|
53
|
+
style: {
|
|
54
|
+
"marginLeft": "20px"
|
|
55
|
+
}
|
|
56
|
+
}, "\u793A\u4F8B\u5143\u7D202")), /*#__PURE__*/React.createElement(Tour, {
|
|
57
|
+
value: this.state.currentStep,
|
|
58
|
+
onChangeValue: function onChangeValue(currentStep) {
|
|
59
|
+
return _this2.setState({
|
|
60
|
+
currentStep: currentStep
|
|
61
|
+
});
|
|
62
|
+
},
|
|
63
|
+
visible: this.state.showTour,
|
|
64
|
+
data: this.state.tourData,
|
|
65
|
+
onFinish: this.close
|
|
66
|
+
}), /*#__PURE__*/React.createElement("div", {
|
|
67
|
+
style: {
|
|
68
|
+
"marginTop": "20px"
|
|
69
|
+
}
|
|
70
|
+
}, /*#__PURE__*/React.createElement(Button, {
|
|
71
|
+
onClick: this.settour
|
|
72
|
+
}, "\u542F\u52A8\u5F15\u5BFC"), /*#__PURE__*/React.createElement("span", {
|
|
73
|
+
style: {
|
|
74
|
+
"marginLeft": "10px"
|
|
75
|
+
}
|
|
76
|
+
}, "\u5F53\u524D\u6B65\u9AA4: ", this.state.currentStep >= 0 ? this.state.currentStep + 1 : '未启动')));
|
|
77
|
+
};
|
|
78
|
+
return Demo;
|
|
79
|
+
}(React.Component);
|
|
80
|
+
export { Demo as default };
|
|
81
|
+
__decorate([bind], Demo.prototype, "settour", null);
|
|
82
|
+
__decorate([bind], Demo.prototype, "close", null);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
export { default as data } from './index.json';
|
|
2
|
+
import { Component } from 'intact';
|
|
3
|
+
export default class extends Component {
|
|
4
|
+
static template: string | import("intact").Template<any>;
|
|
5
|
+
static defaults(): {
|
|
6
|
+
currentStep: number;
|
|
7
|
+
showTour: boolean;
|
|
8
|
+
inputValue: string;
|
|
9
|
+
errorMsg: string;
|
|
10
|
+
tourData: {
|
|
11
|
+
target: string;
|
|
12
|
+
title: string;
|
|
13
|
+
content: string;
|
|
14
|
+
position: string;
|
|
15
|
+
}[];
|
|
16
|
+
};
|
|
17
|
+
startTour(): void;
|
|
18
|
+
finishTour(): void;
|
|
19
|
+
handleBeforeChange(current: number): boolean;
|
|
20
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import _inheritsLoose from "@babel/runtime-corejs3/helpers/inheritsLoose";
|
|
2
|
+
import { __decorate } from "tslib";
|
|
3
|
+
export { default as data } from './index.json';
|
|
4
|
+
import { Component } from 'intact';
|
|
5
|
+
import template from './index.vdt';
|
|
6
|
+
import { bind, Message } from 'kpc';
|
|
7
|
+
var default_1 = /*#__PURE__*/function (_Component) {
|
|
8
|
+
_inheritsLoose(default_1, _Component);
|
|
9
|
+
function default_1() {
|
|
10
|
+
return _Component.apply(this, arguments) || this;
|
|
11
|
+
}
|
|
12
|
+
default_1.defaults = function defaults() {
|
|
13
|
+
return {
|
|
14
|
+
currentStep: 0,
|
|
15
|
+
showTour: false,
|
|
16
|
+
inputValue: '',
|
|
17
|
+
errorMsg: '',
|
|
18
|
+
tourData: [{
|
|
19
|
+
target: '#step1',
|
|
20
|
+
title: '第一步',
|
|
21
|
+
content: '这是第一步的引导说明',
|
|
22
|
+
position: 'bottom'
|
|
23
|
+
}, {
|
|
24
|
+
target: '#step2',
|
|
25
|
+
title: '第二步',
|
|
26
|
+
content: '这是第二步的引导说明',
|
|
27
|
+
position: 'right'
|
|
28
|
+
}, {
|
|
29
|
+
target: '.step3-input',
|
|
30
|
+
title: '第三步',
|
|
31
|
+
content: '请在输入框中输入"next"以继续',
|
|
32
|
+
position: 'bottom'
|
|
33
|
+
}, {
|
|
34
|
+
target: '#step4',
|
|
35
|
+
title: '最后一步',
|
|
36
|
+
content: '恭喜您完成了所有步骤',
|
|
37
|
+
position: 'top'
|
|
38
|
+
}]
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
var _proto = default_1.prototype;
|
|
42
|
+
_proto.startTour = function startTour() {
|
|
43
|
+
this.set({
|
|
44
|
+
showTour: true,
|
|
45
|
+
currentStep: 0
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
_proto.finishTour = function finishTour() {
|
|
49
|
+
this.set({
|
|
50
|
+
showTour: false
|
|
51
|
+
});
|
|
52
|
+
};
|
|
53
|
+
_proto.handleBeforeChange = function handleBeforeChange(current) {
|
|
54
|
+
var inputValue = this.get('inputValue');
|
|
55
|
+
if (current === 3) {
|
|
56
|
+
if (inputValue !== 'next') {
|
|
57
|
+
Message.error('请在输入框中输入"next"才能进入下一步');
|
|
58
|
+
return false;
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
return true;
|
|
62
|
+
};
|
|
63
|
+
return default_1;
|
|
64
|
+
}(Component);
|
|
65
|
+
default_1.template = template;
|
|
66
|
+
export { default_1 as default };
|
|
67
|
+
__decorate([bind], default_1.prototype, "startTour", null);
|
|
68
|
+
__decorate([bind], default_1.prototype, "finishTour", null);
|
|
69
|
+
__decorate([bind], default_1.prototype, "handleBeforeChange", null);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export default class Demo extends React.Component {
|
|
3
|
+
state: {
|
|
4
|
+
currentStep: number;
|
|
5
|
+
showTour: boolean;
|
|
6
|
+
inputValue: string;
|
|
7
|
+
errorMsg: string;
|
|
8
|
+
tourData: {
|
|
9
|
+
target: string;
|
|
10
|
+
title: string;
|
|
11
|
+
content: string;
|
|
12
|
+
position: string;
|
|
13
|
+
}[];
|
|
14
|
+
};
|
|
15
|
+
startTour(): void;
|
|
16
|
+
finishTour(): void;
|
|
17
|
+
handleBeforeChange(current: number): boolean;
|
|
18
|
+
render(): React.JSX.Element;
|
|
19
|
+
}
|