@titaui/pc 1.16.29 → 1.16.30-beta.1
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/lib/components/date-picker/BodyItem.js +3 -3
- package/lib/components/date-picker/CalendarHeader.js +3 -3
- package/lib/components/delete-confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/eReport/eReportLists/reportList.js +3 -3
- package/lib/components/emotions-selector/selector-pop.js +3 -3
- package/lib/components/ereport-list/index.js +3 -3
- package/lib/components/keyword-search/index.css +44 -26
- package/lib/components/keyword-search/index.js +52 -30
- package/lib/components/mblog/components/MblogAction.js +3 -3
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/kr-score-editor/edit-pop.js +3 -3
- package/lib/components/okr-excel-create/index.js +2 -2
- package/lib/components/okr-review/components/confirm-pop/ConfirmPop.js +3 -3
- package/lib/components/period-selector/components/selector/style.js +9 -9
- package/lib/components/period-selector/index.js +14 -7
- package/lib/components/range-selector-pop/RangeSelectorPop.js +3 -3
- package/lib/components/rich-editor/models/schema.js +6 -6
- package/lib/components/rich-editor/plugins/block/block-quote/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/heading/index.js +8 -8
- package/lib/components/rich-editor/plugins/block/lists/index.js +14 -14
- package/lib/components/rich-editor/plugins/block/paragraph/index.js +5 -5
- package/lib/components/rich-editor/plugins/core/index.js +4 -4
- package/lib/components/rich-editor/plugins/extension/alignment/index.js +5 -5
- package/lib/components/rich-editor/plugins/extension/placeholder/index.js +4 -4
- package/lib/components/rich-editor/plugins/inline/color/index.js +11 -11
- package/lib/components/rich-editor/plugins/inline/delete-line/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/em/index.js +5 -5
- package/lib/components/rich-editor/plugins/inline/link/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/strong/index.js +8 -8
- package/lib/components/rich-editor/plugins/inline/under-line/index.js +8 -8
- package/lib/components/rich-editor/react/uiProvider.js +3 -3
- package/lib/components/rich-editor/ui/Popup/index.js +3 -3
- package/lib/components/search-input/index.css +22 -27
- package/lib/components/search-input/index.js +47 -58
- package/lib/components/select/Option.js +3 -3
- package/lib/components/table-excel-v2/index.css +0 -1
- package/lib/components/tita-chart/errorBoundary/index.js +3 -3
- package/lib/components-v1/animate/AnimateChild.js +3 -3
- package/lib/components-v1/avatar/index.js +3 -3
- package/lib/components-v1/dropDownSelector/StatelessDropdown.js +3 -3
- package/lib/components-v1/progress/CircleProgress.js +3 -3
- package/lib/components-v1/select/Option.js +3 -3
- package/lib/components-v1/userSelector/UserSelectorPop.js +3 -3
- package/lib/components-v1/userSelector/components/MultiMode/index.js +3 -3
- package/lib/components-v1/userSelector/components/UserItem.js +3 -3
- package/lib/pages/new-okr-list/header/index.js +20 -20
- package/package.json +1 -1
|
@@ -53,7 +53,7 @@ var LinkSchema = /*#__PURE__*/function (_InlineSchema) {
|
|
|
53
53
|
var _super = _createSuper(LinkSchema);
|
|
54
54
|
|
|
55
55
|
function LinkSchema() {
|
|
56
|
-
var _this;
|
|
56
|
+
var _temp, _this;
|
|
57
57
|
|
|
58
58
|
_classCallCheck(this, LinkSchema);
|
|
59
59
|
|
|
@@ -61,7 +61,7 @@ var LinkSchema = /*#__PURE__*/function (_InlineSchema) {
|
|
|
61
61
|
args[_key] = arguments[_key];
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.name = PLUGIN_NAME, _this.priority = 100, _this.inclusive = false, _this.group = 'link', _this.attrs = {
|
|
64
|
+
return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.name = PLUGIN_NAME, _this.priority = 100, _this.inclusive = false, _this.group = 'link', _this.attrs = {
|
|
65
65
|
href: {
|
|
66
66
|
"default": ''
|
|
67
67
|
}
|
|
@@ -82,7 +82,7 @@ var LinkSchema = /*#__PURE__*/function (_InlineSchema) {
|
|
|
82
82
|
return ['a', {
|
|
83
83
|
href: node.attrs.href
|
|
84
84
|
}, 0];
|
|
85
|
-
},
|
|
85
|
+
}, _temp));
|
|
86
86
|
}
|
|
87
87
|
|
|
88
88
|
return _createClass(LinkSchema);
|
|
@@ -96,7 +96,7 @@ var LinkController = /*#__PURE__*/function (_BaseController) {
|
|
|
96
96
|
var _super2 = _createSuper(LinkController);
|
|
97
97
|
|
|
98
98
|
function LinkController() {
|
|
99
|
-
var _this2;
|
|
99
|
+
var _temp2, _this2;
|
|
100
100
|
|
|
101
101
|
_classCallCheck(this, LinkController);
|
|
102
102
|
|
|
@@ -104,7 +104,7 @@ var LinkController = /*#__PURE__*/function (_BaseController) {
|
|
|
104
104
|
args[_key2] = arguments[_key2];
|
|
105
105
|
}
|
|
106
106
|
|
|
107
|
-
return _possibleConstructorReturn(_this2, (_this2 = _super2.call.apply(_super2, [this].concat(args)), _this2.toolbar = {
|
|
107
|
+
return _possibleConstructorReturn(_this2, (_temp2 = _this2 = _super2.call.apply(_super2, [this].concat(args)), _this2.toolbar = {
|
|
108
108
|
title: '链接',
|
|
109
109
|
icon: 'tu-icon-text-link',
|
|
110
110
|
handler: function handler(editor) {
|
|
@@ -118,7 +118,7 @@ var LinkController = /*#__PURE__*/function (_BaseController) {
|
|
|
118
118
|
disabled: function disabled(state) {
|
|
119
119
|
return !_main.stateKey.getState(state).canInsertLink;
|
|
120
120
|
}
|
|
121
|
-
}, _this2.pmPlugins = [_main["default"], _fakeCursorForToolbar["default"]],
|
|
121
|
+
}, _this2.pmPlugins = [_main["default"], _fakeCursorForToolbar["default"]], _temp2));
|
|
122
122
|
}
|
|
123
123
|
|
|
124
124
|
return _createClass(LinkController);
|
|
@@ -132,7 +132,7 @@ var LinkPlugin = /*#__PURE__*/function (_BasePlugin) {
|
|
|
132
132
|
var _super3 = _createSuper(LinkPlugin);
|
|
133
133
|
|
|
134
134
|
function LinkPlugin() {
|
|
135
|
-
var _this3;
|
|
135
|
+
var _temp3, _this3;
|
|
136
136
|
|
|
137
137
|
_classCallCheck(this, LinkPlugin);
|
|
138
138
|
|
|
@@ -140,7 +140,7 @@ var LinkPlugin = /*#__PURE__*/function (_BasePlugin) {
|
|
|
140
140
|
args[_key3] = arguments[_key3];
|
|
141
141
|
}
|
|
142
142
|
|
|
143
|
-
return _possibleConstructorReturn(_this3, (_this3 = _super3.call.apply(_super3, [this].concat(args)), _this3.name = PLUGIN_NAME, _this3.schema = LinkSchema, _this3.controller = LinkController,
|
|
143
|
+
return _possibleConstructorReturn(_this3, (_temp3 = _this3 = _super3.call.apply(_super3, [this].concat(args)), _this3.name = PLUGIN_NAME, _this3.schema = LinkSchema, _this3.controller = LinkController, _temp3));
|
|
144
144
|
}
|
|
145
145
|
|
|
146
146
|
return _createClass(LinkPlugin);
|
|
@@ -49,7 +49,7 @@ var StrongSchema = /*#__PURE__*/function (_InlineSchema) {
|
|
|
49
49
|
var _super = _createSuper(StrongSchema);
|
|
50
50
|
|
|
51
51
|
function StrongSchema() {
|
|
52
|
-
var _this;
|
|
52
|
+
var _temp, _this;
|
|
53
53
|
|
|
54
54
|
_classCallCheck(this, StrongSchema);
|
|
55
55
|
|
|
@@ -57,7 +57,7 @@ var StrongSchema = /*#__PURE__*/function (_InlineSchema) {
|
|
|
57
57
|
args[_key] = arguments[_key];
|
|
58
58
|
}
|
|
59
59
|
|
|
60
|
-
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.name = PLUGIN_NAME, _this.group = 'fontStyle', _this.parseDOM = [{
|
|
60
|
+
return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.name = PLUGIN_NAME, _this.group = 'fontStyle', _this.parseDOM = [{
|
|
61
61
|
tag: "strong"
|
|
62
62
|
}, {
|
|
63
63
|
tag: "b",
|
|
@@ -69,7 +69,7 @@ var StrongSchema = /*#__PURE__*/function (_InlineSchema) {
|
|
|
69
69
|
getAttrs: function getAttrs(value) {
|
|
70
70
|
return /^(bold(er)?|[5-9]\d{2,})$/.test(value) && null;
|
|
71
71
|
}
|
|
72
|
-
}],
|
|
72
|
+
}], _temp));
|
|
73
73
|
}
|
|
74
74
|
|
|
75
75
|
_createClass(StrongSchema, [{
|
|
@@ -90,7 +90,7 @@ var StrongController = /*#__PURE__*/function (_BaseController) {
|
|
|
90
90
|
var _super2 = _createSuper(StrongController);
|
|
91
91
|
|
|
92
92
|
function StrongController() {
|
|
93
|
-
var _this2;
|
|
93
|
+
var _temp2, _this2;
|
|
94
94
|
|
|
95
95
|
_classCallCheck(this, StrongController);
|
|
96
96
|
|
|
@@ -98,7 +98,7 @@ var StrongController = /*#__PURE__*/function (_BaseController) {
|
|
|
98
98
|
args[_key2] = arguments[_key2];
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
return _possibleConstructorReturn(_this2, (_this2 = _super2.call.apply(_super2, [this].concat(args)), _this2.toolbar = {
|
|
101
|
+
return _possibleConstructorReturn(_this2, (_temp2 = _this2 = _super2.call.apply(_super2, [this].concat(args)), _this2.toolbar = {
|
|
102
102
|
title: (0, _getLocale.getLocale)('Rtx_Bold'),
|
|
103
103
|
icon: 'tu-icon-text-blod',
|
|
104
104
|
handler: function handler(editor) {
|
|
@@ -108,7 +108,7 @@ var StrongController = /*#__PURE__*/function (_BaseController) {
|
|
|
108
108
|
active: function active(state) {
|
|
109
109
|
return (0, _mark.selectionContainsMark)(state, PLUGIN_NAME);
|
|
110
110
|
}
|
|
111
|
-
},
|
|
111
|
+
}, _temp2));
|
|
112
112
|
}
|
|
113
113
|
|
|
114
114
|
return _createClass(StrongController);
|
|
@@ -122,7 +122,7 @@ var StrongPlugin = /*#__PURE__*/function (_BasePlugin) {
|
|
|
122
122
|
var _super3 = _createSuper(StrongPlugin);
|
|
123
123
|
|
|
124
124
|
function StrongPlugin() {
|
|
125
|
-
var _this3;
|
|
125
|
+
var _temp3, _this3;
|
|
126
126
|
|
|
127
127
|
_classCallCheck(this, StrongPlugin);
|
|
128
128
|
|
|
@@ -130,7 +130,7 @@ var StrongPlugin = /*#__PURE__*/function (_BasePlugin) {
|
|
|
130
130
|
args[_key3] = arguments[_key3];
|
|
131
131
|
}
|
|
132
132
|
|
|
133
|
-
return _possibleConstructorReturn(_this3, (_this3 = _super3.call.apply(_super3, [this].concat(args)), _this3.name = PLUGIN_NAME, _this3.schema = StrongSchema, _this3.controller = StrongController,
|
|
133
|
+
return _possibleConstructorReturn(_this3, (_temp3 = _this3 = _super3.call.apply(_super3, [this].concat(args)), _this3.name = PLUGIN_NAME, _this3.schema = StrongSchema, _this3.controller = StrongController, _temp3));
|
|
134
134
|
}
|
|
135
135
|
|
|
136
136
|
return _createClass(StrongPlugin);
|
|
@@ -60,7 +60,7 @@ var UnderLineSchema = /*#__PURE__*/function (_InlineSchema) {
|
|
|
60
60
|
var _super = _createSuper(UnderLineSchema);
|
|
61
61
|
|
|
62
62
|
function UnderLineSchema() {
|
|
63
|
-
var _this;
|
|
63
|
+
var _temp, _this;
|
|
64
64
|
|
|
65
65
|
_classCallCheck(this, UnderLineSchema);
|
|
66
66
|
|
|
@@ -68,14 +68,14 @@ var UnderLineSchema = /*#__PURE__*/function (_InlineSchema) {
|
|
|
68
68
|
args[_key] = arguments[_key];
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.name = PLUGIN_NAME, _this.parseDOM = [{
|
|
71
|
+
return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.name = PLUGIN_NAME, _this.parseDOM = [{
|
|
72
72
|
tag: 'ins'
|
|
73
73
|
}, {
|
|
74
74
|
tag: 'u'
|
|
75
75
|
}, {
|
|
76
76
|
tag: 'span',
|
|
77
77
|
getAttrs: getAttrs
|
|
78
|
-
}],
|
|
78
|
+
}], _temp));
|
|
79
79
|
}
|
|
80
80
|
|
|
81
81
|
_createClass(UnderLineSchema, [{
|
|
@@ -98,7 +98,7 @@ var UnderLineController = /*#__PURE__*/function (_BaseController) {
|
|
|
98
98
|
var _super2 = _createSuper(UnderLineController);
|
|
99
99
|
|
|
100
100
|
function UnderLineController() {
|
|
101
|
-
var _this2;
|
|
101
|
+
var _temp2, _this2;
|
|
102
102
|
|
|
103
103
|
_classCallCheck(this, UnderLineController);
|
|
104
104
|
|
|
@@ -106,7 +106,7 @@ var UnderLineController = /*#__PURE__*/function (_BaseController) {
|
|
|
106
106
|
args[_key2] = arguments[_key2];
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
return _possibleConstructorReturn(_this2, (_this2 = _super2.call.apply(_super2, [this].concat(args)), _this2.toolbar = {
|
|
109
|
+
return _possibleConstructorReturn(_this2, (_temp2 = _this2 = _super2.call.apply(_super2, [this].concat(args)), _this2.toolbar = {
|
|
110
110
|
title: (0, _getLocale.getLocale)('Rtx_Underline'),
|
|
111
111
|
icon: 'tu-icon-text-underline',
|
|
112
112
|
handler: function handler(editor) {
|
|
@@ -116,7 +116,7 @@ var UnderLineController = /*#__PURE__*/function (_BaseController) {
|
|
|
116
116
|
active: function active(state) {
|
|
117
117
|
return (0, _mark.selectionContainsMark)(state, PLUGIN_NAME);
|
|
118
118
|
}
|
|
119
|
-
},
|
|
119
|
+
}, _temp2));
|
|
120
120
|
}
|
|
121
121
|
|
|
122
122
|
return _createClass(UnderLineController);
|
|
@@ -130,7 +130,7 @@ var UnderLinePlugin = /*#__PURE__*/function (_BasePlugin) {
|
|
|
130
130
|
var _super3 = _createSuper(UnderLinePlugin);
|
|
131
131
|
|
|
132
132
|
function UnderLinePlugin() {
|
|
133
|
-
var _this3;
|
|
133
|
+
var _temp3, _this3;
|
|
134
134
|
|
|
135
135
|
_classCallCheck(this, UnderLinePlugin);
|
|
136
136
|
|
|
@@ -138,7 +138,7 @@ var UnderLinePlugin = /*#__PURE__*/function (_BasePlugin) {
|
|
|
138
138
|
args[_key3] = arguments[_key3];
|
|
139
139
|
}
|
|
140
140
|
|
|
141
|
-
return _possibleConstructorReturn(_this3, (_this3 = _super3.call.apply(_super3, [this].concat(args)), _this3.name = PLUGIN_NAME, _this3.schema = UnderLineSchema, _this3.controller = UnderLineController,
|
|
141
|
+
return _possibleConstructorReturn(_this3, (_temp3 = _this3 = _super3.call.apply(_super3, [this].concat(args)), _this3.name = PLUGIN_NAME, _this3.schema = UnderLineSchema, _this3.controller = UnderLineController, _temp3));
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
return _createClass(UnderLinePlugin);
|
|
@@ -55,7 +55,7 @@ var PortalProviderAPI = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
55
55
|
var _super = _createSuper(PortalProviderAPI);
|
|
56
56
|
|
|
57
57
|
function PortalProviderAPI() {
|
|
58
|
-
var _this;
|
|
58
|
+
var _temp, _this;
|
|
59
59
|
|
|
60
60
|
_classCallCheck(this, PortalProviderAPI);
|
|
61
61
|
|
|
@@ -63,9 +63,9 @@ var PortalProviderAPI = /*#__PURE__*/function (_EventDispatcher) {
|
|
|
63
63
|
args[_key] = arguments[_key];
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.portals = new Map(), _this.setContext = function (context) {
|
|
66
|
+
return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.portals = new Map(), _this.setContext = function (context) {
|
|
67
67
|
_this.context = context;
|
|
68
|
-
},
|
|
68
|
+
}, _temp));
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
_createClass(PortalProviderAPI, [{
|
|
@@ -53,7 +53,7 @@ var EditorPopup = /*#__PURE__*/function (_React$Component) {
|
|
|
53
53
|
var _super = _createSuper(EditorPopup);
|
|
54
54
|
|
|
55
55
|
function EditorPopup() {
|
|
56
|
-
var _this;
|
|
56
|
+
var _temp, _this;
|
|
57
57
|
|
|
58
58
|
_classCallCheck(this, EditorPopup);
|
|
59
59
|
|
|
@@ -61,7 +61,7 @@ var EditorPopup = /*#__PURE__*/function (_React$Component) {
|
|
|
61
61
|
args[_key] = arguments[_key];
|
|
62
62
|
}
|
|
63
63
|
|
|
64
|
-
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.state = {
|
|
64
|
+
return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.state = {
|
|
65
65
|
overflowScrollParent: false,
|
|
66
66
|
validPosition: true
|
|
67
67
|
}, _this.placement = ['', ''], _this.handleRef = function (popup) {
|
|
@@ -74,7 +74,7 @@ var EditorPopup = /*#__PURE__*/function (_React$Component) {
|
|
|
74
74
|
return _this.updatePosition(props);
|
|
75
75
|
}), _this.onResize = function () {
|
|
76
76
|
return _this.scheduledUpdatePosition();
|
|
77
|
-
},
|
|
77
|
+
}, _temp));
|
|
78
78
|
}
|
|
79
79
|
|
|
80
80
|
_createClass(EditorPopup, [{
|
|
@@ -3,63 +3,58 @@
|
|
|
3
3
|
}
|
|
4
4
|
|
|
5
5
|
.search-input-box .search-input-icon {
|
|
6
|
-
position: absolute;
|
|
7
6
|
font-size: 14px;
|
|
7
|
+
color: rgba(0, 0, 0, 0.3);
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
position: absolute;
|
|
8
10
|
right: 10px;
|
|
9
11
|
top: 50%;
|
|
10
12
|
transform: translate(0, -50%);
|
|
11
|
-
color: rgba(0, 0, 0, 0.3);
|
|
12
13
|
}
|
|
13
14
|
|
|
14
15
|
.search-input-box .search-input-icon:hover {
|
|
15
16
|
color: #2879ff;
|
|
16
|
-
cursor: pointer;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
.search-input-box .search-input-icon-focus {
|
|
20
|
-
color: #2879ff;
|
|
21
17
|
}
|
|
22
18
|
|
|
23
19
|
.search-input-box .clear-input-icon {
|
|
20
|
+
font-size: 16px;
|
|
21
|
+
opacity: 0;
|
|
22
|
+
transition: all .3s ease;
|
|
24
23
|
color: #c2cbd1;
|
|
24
|
+
cursor: pointer;
|
|
25
|
+
visibility: 0;
|
|
25
26
|
position: absolute;
|
|
26
|
-
font-size: 16px;
|
|
27
27
|
right: 32px;
|
|
28
28
|
top: 50%;
|
|
29
|
-
transform: translate(0, -50%);
|
|
29
|
+
transform: translate(0, -50%) scale(0);
|
|
30
30
|
}
|
|
31
31
|
|
|
32
32
|
.search-input-box .clear-input-icon:hover {
|
|
33
33
|
color: #F05E5E;
|
|
34
|
-
cursor: pointer;
|
|
35
34
|
}
|
|
36
35
|
|
|
37
|
-
.search-input-box .
|
|
38
|
-
|
|
36
|
+
.search-input-box .clear-input-icon--visible {
|
|
37
|
+
opacity: 1;
|
|
38
|
+
transform: translate(0, -50%) scale(1);
|
|
39
|
+
visibility: visible;
|
|
39
40
|
}
|
|
40
41
|
|
|
41
|
-
.search-input-
|
|
42
|
-
background: #ffffff;
|
|
43
|
-
border: 1px solid #e9edf0;
|
|
44
|
-
border-radius: 18px;
|
|
42
|
+
.search-input-box__input {
|
|
45
43
|
width: 100%;
|
|
46
44
|
height: 100%;
|
|
47
|
-
padding: 0
|
|
48
|
-
box-sizing: border-box;
|
|
45
|
+
padding: 0 50px 0 11px;
|
|
49
46
|
font-size: 12px;
|
|
50
|
-
|
|
51
|
-
-
|
|
52
|
-
|
|
53
|
-
-
|
|
54
|
-
|
|
55
|
-
-o-transition: border 0.3s;
|
|
56
|
-
/* Opera */
|
|
47
|
+
border: 1px solid #e9edf0;
|
|
48
|
+
border-radius: 18px;
|
|
49
|
+
transition: all 0.3s ease;
|
|
50
|
+
background-color: #ffffff;
|
|
51
|
+
box-sizing: border-box;
|
|
57
52
|
}
|
|
58
53
|
|
|
59
|
-
.search-input-
|
|
54
|
+
.search-input-box__input:hover, .search-input-box__input:focus {
|
|
60
55
|
border: 1px solid #2879ff;
|
|
61
56
|
}
|
|
62
57
|
|
|
63
|
-
.search-input-
|
|
58
|
+
.search-input-box__input::placeholder {
|
|
64
59
|
color: #bfc7d5;
|
|
65
60
|
}
|
|
@@ -5,12 +5,16 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" =
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports["default"] =
|
|
8
|
+
exports["default"] = void 0;
|
|
9
9
|
|
|
10
10
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
11
|
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
12
14
|
require("./index.css");
|
|
13
15
|
|
|
16
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
17
|
+
|
|
14
18
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
15
19
|
|
|
16
20
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -33,28 +37,29 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
33
37
|
|
|
34
38
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
35
39
|
|
|
36
|
-
|
|
37
|
-
|
|
40
|
+
var prefixCls = 'search-input-box';
|
|
41
|
+
|
|
42
|
+
var SearchInput = function SearchInput(props) {
|
|
43
|
+
var _props$autoFocus = props.autoFocus,
|
|
44
|
+
autoFocus = _props$autoFocus === void 0 ? false : _props$autoFocus,
|
|
45
|
+
onSearch = props.onSearch,
|
|
38
46
|
placeholder = props.placeholder,
|
|
39
47
|
setSearchKey = props.setSearchKey,
|
|
40
|
-
propsValue = props.value,
|
|
41
48
|
_props$style = props.style,
|
|
42
|
-
style = _props$style === void 0 ? {} : _props$style
|
|
49
|
+
style = _props$style === void 0 ? {} : _props$style,
|
|
50
|
+
propsValue = props.value;
|
|
43
51
|
|
|
44
|
-
var _useState = (0, _react.useState)(
|
|
52
|
+
var _useState = (0, _react.useState)(false),
|
|
45
53
|
_useState2 = _slicedToArray(_useState, 2),
|
|
46
|
-
|
|
47
|
-
|
|
54
|
+
searched = _useState2[0],
|
|
55
|
+
setSearched = _useState2[1];
|
|
48
56
|
|
|
49
|
-
var _useState3 = (0, _react.useState)(
|
|
57
|
+
var _useState3 = (0, _react.useState)(''),
|
|
50
58
|
_useState4 = _slicedToArray(_useState3, 2),
|
|
51
|
-
|
|
52
|
-
|
|
59
|
+
value = _useState4[0],
|
|
60
|
+
setValue = _useState4[1];
|
|
53
61
|
|
|
54
|
-
var
|
|
55
|
-
_useState6 = _slicedToArray(_useState5, 2),
|
|
56
|
-
clearIconState = _useState6[0],
|
|
57
|
-
setClearIconState = _useState6[1];
|
|
62
|
+
var inputRef = (0, _react.useRef)();
|
|
58
63
|
|
|
59
64
|
var defaultStyle = _objectSpread({
|
|
60
65
|
width: 230,
|
|
@@ -63,23 +68,17 @@ function _default(props) {
|
|
|
63
68
|
|
|
64
69
|
(0, _react.useEffect)(function () {
|
|
65
70
|
setValue(propsValue);
|
|
66
|
-
if (!propsValue) setClearIconState(false);
|
|
67
71
|
}, [propsValue]);
|
|
68
|
-
var inputClassName = focus ? 'search-input-focus' : '';
|
|
69
|
-
var iconClassName = focus ? 'search-input-icon-focus' : '';
|
|
70
|
-
var clearIconStyle = {
|
|
71
|
-
display: clearIconState ? 'inline' : 'none'
|
|
72
|
-
};
|
|
73
72
|
|
|
74
73
|
var handleInputChange = function handleInputChange(e) {
|
|
75
74
|
var evalue = e.target.value;
|
|
76
75
|
setValue(evalue);
|
|
77
76
|
setSearchKey === null || setSearchKey === void 0 ? void 0 : setSearchKey(evalue);
|
|
78
|
-
setClearIconState(evalue != '');
|
|
79
77
|
};
|
|
80
78
|
|
|
81
|
-
var
|
|
82
|
-
|
|
79
|
+
var handleSearch = function handleSearch() {
|
|
80
|
+
setSearched(true);
|
|
81
|
+
onSearch === null || onSearch === void 0 ? void 0 : onSearch(value === null || value === void 0 ? void 0 : value.trim());
|
|
83
82
|
};
|
|
84
83
|
|
|
85
84
|
var handleKeyPress = function handleKeyPress(e) {
|
|
@@ -88,51 +87,41 @@ function _default(props) {
|
|
|
88
87
|
}
|
|
89
88
|
};
|
|
90
89
|
|
|
91
|
-
var
|
|
92
|
-
onSearch === null || onSearch === void 0 ? void 0 : onSearch(value === null || value === void 0 ? void 0 : value.trim());
|
|
93
|
-
};
|
|
94
|
-
|
|
95
|
-
var clearValue = function clearValue(e) {
|
|
90
|
+
var clearValue = function clearValue() {
|
|
96
91
|
setValue('');
|
|
97
92
|
setSearchKey === null || setSearchKey === void 0 ? void 0 : setSearchKey('');
|
|
93
|
+
inputRef.current.focus();
|
|
98
94
|
|
|
99
|
-
if (
|
|
100
|
-
onSearch('');
|
|
95
|
+
if (propsValue || searched) {
|
|
96
|
+
onSearch === null || onSearch === void 0 ? void 0 : onSearch('');
|
|
101
97
|
}
|
|
102
|
-
|
|
103
|
-
setClearIconState(false);
|
|
104
|
-
};
|
|
105
|
-
|
|
106
|
-
var onMouseOver = function onMouseOver(e) {
|
|
107
|
-
setFocus(true);
|
|
108
|
-
};
|
|
109
|
-
|
|
110
|
-
var onMouseLeave = function onMouseLeave(e) {
|
|
111
|
-
setFocus(false);
|
|
112
98
|
};
|
|
113
99
|
|
|
114
100
|
return /*#__PURE__*/_react["default"].createElement("div", {
|
|
115
|
-
className:
|
|
101
|
+
className: prefixCls,
|
|
116
102
|
style: defaultStyle
|
|
117
103
|
}, /*#__PURE__*/_react["default"].createElement("input", {
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
104
|
+
// eslint-disable-next-line jsx-a11y/no-autofocus
|
|
105
|
+
autoFocus: autoFocus,
|
|
106
|
+
className: "".concat(prefixCls, "__input"),
|
|
107
|
+
key: "input",
|
|
121
108
|
onKeyPress: handleKeyPress,
|
|
122
|
-
placeholder: placeholder,
|
|
123
109
|
onChange: handleInputChange,
|
|
124
|
-
|
|
125
|
-
|
|
110
|
+
placeholder: placeholder,
|
|
111
|
+
ref: inputRef,
|
|
112
|
+
value: value
|
|
126
113
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
127
|
-
className: "tu-icon-cross clear-input-icon
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
key: "clear"
|
|
114
|
+
className: (0, _classnames["default"])('tu-icon-cross', 'clear-input-icon', {
|
|
115
|
+
'clear-input-icon--visible': !!value
|
|
116
|
+
}),
|
|
117
|
+
key: "clear",
|
|
118
|
+
onClick: clearValue
|
|
131
119
|
}), /*#__PURE__*/_react["default"].createElement("span", {
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
onMouseLeave: onMouseLeave,
|
|
136
|
-
key: "search"
|
|
120
|
+
className: "tu-icon-search search-input-icon",
|
|
121
|
+
key: "search",
|
|
122
|
+
onClick: handleSearch
|
|
137
123
|
}));
|
|
138
|
-
}
|
|
124
|
+
};
|
|
125
|
+
|
|
126
|
+
var _default = SearchInput;
|
|
127
|
+
exports["default"] = _default;
|
|
@@ -47,7 +47,7 @@ var Option = /*#__PURE__*/function (_Component) {
|
|
|
47
47
|
var _super = _createSuper(Option);
|
|
48
48
|
|
|
49
49
|
function Option() {
|
|
50
|
-
var _this;
|
|
50
|
+
var _temp, _this;
|
|
51
51
|
|
|
52
52
|
_classCallCheck(this, Option);
|
|
53
53
|
|
|
@@ -55,7 +55,7 @@ var Option = /*#__PURE__*/function (_Component) {
|
|
|
55
55
|
args[_key] = arguments[_key];
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.handleSelect = function (e) {
|
|
58
|
+
return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.handleSelect = function (e) {
|
|
59
59
|
e.stopPropagation();
|
|
60
60
|
e.nativeEvent.stopImmediatePropagation();
|
|
61
61
|
var onSelect = _this.props.onSelect;
|
|
@@ -65,7 +65,7 @@ var Option = /*#__PURE__*/function (_Component) {
|
|
|
65
65
|
height: _this.props.height,
|
|
66
66
|
lineHeight: _this.props.height
|
|
67
67
|
};
|
|
68
|
-
},
|
|
68
|
+
}, _temp));
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
_createClass(Option, [{
|
|
@@ -37,7 +37,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
37
37
|
var _super = _createSuper(ErrorBoundary);
|
|
38
38
|
|
|
39
39
|
function ErrorBoundary() {
|
|
40
|
-
var _this;
|
|
40
|
+
var _temp, _this;
|
|
41
41
|
|
|
42
42
|
_classCallCheck(this, ErrorBoundary);
|
|
43
43
|
|
|
@@ -45,7 +45,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
45
45
|
args[_key] = arguments[_key];
|
|
46
46
|
}
|
|
47
47
|
|
|
48
|
-
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.state = {
|
|
48
|
+
return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.state = {
|
|
49
49
|
hasError: false
|
|
50
50
|
}, _this.renderError = function (e) {
|
|
51
51
|
var errorTemplate = _this.props.errorTemplate;
|
|
@@ -55,7 +55,7 @@ var ErrorBoundary = /*#__PURE__*/function (_React$Component) {
|
|
|
55
55
|
// fallback
|
|
56
56
|
return errorTemplate && typeof errorTemplate === "function" ? errorTemplate(e) : /*#__PURE__*/_react["default"].createElement("h5", null, "\u7EC4\u4EF6\u51FA\u9519\u4E86\uFF0C\u8BF7\u6838\u67E5\u540E\u91CD\u8BD5\uFF1A", e.message);
|
|
57
57
|
}
|
|
58
|
-
},
|
|
58
|
+
}, _temp));
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
_createClass(ErrorBoundary, [{
|
|
@@ -45,7 +45,7 @@ var AnimateChild = /*#__PURE__*/function (_Component) {
|
|
|
45
45
|
var _super = _createSuper(AnimateChild);
|
|
46
46
|
|
|
47
47
|
function AnimateChild() {
|
|
48
|
-
var _this;
|
|
48
|
+
var _temp, _this;
|
|
49
49
|
|
|
50
50
|
_classCallCheck(this, AnimateChild);
|
|
51
51
|
|
|
@@ -53,14 +53,14 @@ var AnimateChild = /*#__PURE__*/function (_Component) {
|
|
|
53
53
|
args[_key] = arguments[_key];
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.componentWillEnter = function (done) {
|
|
56
|
+
return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.componentWillEnter = function (done) {
|
|
57
57
|
_this.transition("enter", done);
|
|
58
58
|
}, _this.componentWillLeave = function (done) {
|
|
59
59
|
_this.transition("leave", done);
|
|
60
60
|
}, _this.transition = function (animationType, done) {
|
|
61
61
|
var name = _typeof(_this.props.transitionName) === "object" ? _this.props.transitionName[animationType] : "".concat(_this.props.transitionName, "-").concat(animationType);
|
|
62
62
|
(0, _animate["default"])((0, _reactDom.findDOMNode)(_assertThisInitialized(_this)), name, done);
|
|
63
|
-
},
|
|
63
|
+
}, _temp));
|
|
64
64
|
}
|
|
65
65
|
|
|
66
66
|
_createClass(AnimateChild, [{
|
|
@@ -45,7 +45,7 @@ var Avatar = /*#__PURE__*/function (_PureComponent) {
|
|
|
45
45
|
var _super = _createSuper(Avatar);
|
|
46
46
|
|
|
47
47
|
function Avatar() {
|
|
48
|
-
var _this;
|
|
48
|
+
var _temp, _this;
|
|
49
49
|
|
|
50
50
|
_classCallCheck(this, Avatar);
|
|
51
51
|
|
|
@@ -53,7 +53,7 @@ var Avatar = /*#__PURE__*/function (_PureComponent) {
|
|
|
53
53
|
args[_key] = arguments[_key];
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
-
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.renderImgAvatar = function () {
|
|
56
|
+
return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.renderImgAvatar = function () {
|
|
57
57
|
var src = _this.props.src;
|
|
58
58
|
return /*#__PURE__*/_react["default"].createElement("img", {
|
|
59
59
|
style: {
|
|
@@ -103,7 +103,7 @@ var Avatar = /*#__PURE__*/function (_PureComponent) {
|
|
|
103
103
|
height: size.width,
|
|
104
104
|
background: color
|
|
105
105
|
}, cuttedName);
|
|
106
|
-
},
|
|
106
|
+
}, _temp));
|
|
107
107
|
}
|
|
108
108
|
|
|
109
109
|
_createClass(Avatar, [{
|
|
@@ -47,7 +47,7 @@ var StatelessDropdown = /*#__PURE__*/function (_Component) {
|
|
|
47
47
|
var _super = _createSuper(StatelessDropdown);
|
|
48
48
|
|
|
49
49
|
function StatelessDropdown() {
|
|
50
|
-
var _this;
|
|
50
|
+
var _temp, _this;
|
|
51
51
|
|
|
52
52
|
_classCallCheck(this, StatelessDropdown);
|
|
53
53
|
|
|
@@ -55,7 +55,7 @@ var StatelessDropdown = /*#__PURE__*/function (_Component) {
|
|
|
55
55
|
args[_key] = arguments[_key];
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
-
return _possibleConstructorReturn(_this, (_this = _super.call.apply(_super, [this].concat(args)), _this.renderLabel = function () {
|
|
58
|
+
return _possibleConstructorReturn(_this, (_temp = _this = _super.call.apply(_super, [this].concat(args)), _this.renderLabel = function () {
|
|
59
59
|
if (_this.props.labelText) {
|
|
60
60
|
return /*#__PURE__*/_react["default"].createElement("span", {
|
|
61
61
|
className: "drop-down-label"
|
|
@@ -63,7 +63,7 @@ var StatelessDropdown = /*#__PURE__*/function (_Component) {
|
|
|
63
63
|
}
|
|
64
64
|
|
|
65
65
|
return "";
|
|
66
|
-
},
|
|
66
|
+
}, _temp));
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
_createClass(StatelessDropdown, [{
|