@titaui/pc 1.11.18 → 1.11.21-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/avatar/name-avatar/index.css +1 -0
- package/lib/components/avatar/name-avatar/index.js +22 -13
- package/lib/components/button/rect-btn/index.css +25 -11
- package/lib/components/button/rect-btn/index.js +8 -4
- package/lib/components/communication/index.js +30 -29
- package/lib/components/create-okr-modal/request-api.js +1 -1
- package/lib/components/drawer/headerAction.js +5 -1
- package/lib/components/drawer/headerDrop.js +41 -4
- package/lib/components/drawer/index.css +44 -0
- package/lib/components/drawer/index.js +36 -7
- package/lib/components/dynamic/dynamic-item/components/feed-operate/index.css +0 -2
- package/lib/components/mblog/index.js +31 -30
- package/lib/components/nav-top/index.js +6 -2
- package/lib/components/okr-detail/base-info/other-infos/date-cycle/index.js +16 -4
- package/lib/components/okr-detail/base-info/other-infos/principal/index.js +9 -1
- package/lib/components/okr-detail/components/header/index.js +9 -3
- package/lib/components/okr-detail/components/header/o-name.js +9 -3
- package/lib/components/okr-detail/components/o-classify.js +5 -1
- package/lib/components/okr-detail/components/okr-tree/tree-node/kr-node/index.js +9 -6
- package/lib/components/okr-detail/detail-header/constant.js +53 -0
- package/lib/components/okr-detail/detail-header/index.js +12 -1
- package/lib/components/okr-detail/helper.js +62 -0
- package/lib/components/okr-detail/index.js +21 -2
- package/lib/components/okr-detail/okr-list/index.js +8 -3
- package/lib/components/okr-detail/request-apis.js +7 -1
- package/lib/components/okr-flow/child-node/index.css +2 -1
- package/lib/components/okr-flow/export-modal/index.js +2 -2
- package/lib/components/okr-flow/okr-map/index.js +2 -2
- package/lib/components/okr-flow/utils/index.js +5 -6
- package/lib/components/okr-period-selector/select-cycle.js +23 -19
- package/lib/components/period-selector/index.css +6 -0
- package/lib/components/period-selector/index.js +1 -1
- package/lib/components/scroll-container/index.js +423 -0
- package/lib/components/scroll-container/style.css +35 -0
- package/lib/components/superset-charts/components/chart/index.js +1 -1
- package/lib/components/textarea/index.css +120 -0
- package/lib/components/textarea/index.js +257 -0
- package/lib/index.js +48 -0
- package/lib/pages/new-okr-list/header/common.js +52 -0
- package/lib/pages/new-okr-list/header/index.css +45 -0
- package/lib/pages/new-okr-list/header/index.js +38 -16
- package/lib/pages/new-okr-list/header/operate-record.js +124 -0
- package/lib/pages/new-okr-list/index.js +3 -1
- package/lib/pages/new-okr-list/list/index.js +19 -2
- package/lib/pages/new-okr-list/request-api.js +8 -2
- package/lib/pages/okr-map/export-modules/okr-map/header/index.css +1 -1
- package/lib/pages/okr-map/export-modules/okr-map/header/index.js +2 -2
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.css +24 -12
- package/lib/pages/okr-map/export-modules/share-okr-page/header/index.js +51 -11
- package/lib/pages/okr-map/export-modules/share-okr-page/share-okr-map.js +20 -12
- package/lib/utils/format-time.js +8 -1
- package/lib/utils/open-data.js +5 -1
- package/package.json +2 -1
|
@@ -0,0 +1,423 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
+
|
|
5
|
+
Object.defineProperty(exports, "__esModule", {
|
|
6
|
+
value: true
|
|
7
|
+
});
|
|
8
|
+
exports["default"] = void 0;
|
|
9
|
+
|
|
10
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
+
|
|
12
|
+
var _classnames = _interopRequireDefault(require("classnames"));
|
|
13
|
+
|
|
14
|
+
var _lodash = _interopRequireDefault(require("lodash.debounce"));
|
|
15
|
+
|
|
16
|
+
var _easyBem = _interopRequireDefault(require("easy-bem"));
|
|
17
|
+
|
|
18
|
+
require("./style.css");
|
|
19
|
+
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
21
|
+
|
|
22
|
+
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); }
|
|
23
|
+
|
|
24
|
+
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; }
|
|
25
|
+
|
|
26
|
+
function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
|
|
27
|
+
|
|
28
|
+
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
29
|
+
|
|
30
|
+
function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); Object.defineProperty(Constructor, "prototype", { writable: false }); return Constructor; }
|
|
31
|
+
|
|
32
|
+
function _inherits(subClass, superClass) { if (typeof superClass !== "function" && superClass !== null) { throw new TypeError("Super expression must either be null or a function"); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, writable: true, configurable: true } }); Object.defineProperty(subClass, "prototype", { writable: false }); if (superClass) _setPrototypeOf(subClass, superClass); }
|
|
33
|
+
|
|
34
|
+
function _setPrototypeOf(o, p) { _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) { o.__proto__ = p; return o; }; return _setPrototypeOf(o, p); }
|
|
35
|
+
|
|
36
|
+
function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
|
|
37
|
+
|
|
38
|
+
function _possibleConstructorReturn(self, call) { if (call && (_typeof(call) === "object" || typeof call === "function")) { return call; } else if (call !== void 0) { throw new TypeError("Derived constructors may only return object or undefined"); } return _assertThisInitialized(self); }
|
|
39
|
+
|
|
40
|
+
function _assertThisInitialized(self) { if (self === void 0) { throw new ReferenceError("this hasn't been initialised - super() hasn't been called"); } return self; }
|
|
41
|
+
|
|
42
|
+
function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
|
|
43
|
+
|
|
44
|
+
function _getPrototypeOf(o) { _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf : function _getPrototypeOf(o) { return o.__proto__ || Object.getPrototypeOf(o); }; return _getPrototypeOf(o); }
|
|
45
|
+
|
|
46
|
+
var cn = (0, _easyBem["default"])('indiana-scroll-container');
|
|
47
|
+
var SCROLL_END_DEBOUNCE = 300;
|
|
48
|
+
var LEFT_BUTTON = 0;
|
|
49
|
+
|
|
50
|
+
var ScrollContainer = /*#__PURE__*/function (_PureComponent) {
|
|
51
|
+
_inherits(ScrollContainer, _PureComponent);
|
|
52
|
+
|
|
53
|
+
var _super = _createSuper(ScrollContainer);
|
|
54
|
+
|
|
55
|
+
function ScrollContainer(props) {
|
|
56
|
+
var _this;
|
|
57
|
+
|
|
58
|
+
_classCallCheck(this, ScrollContainer);
|
|
59
|
+
|
|
60
|
+
_this = _super.call(this, props);
|
|
61
|
+
|
|
62
|
+
_this.onEndScroll = function () {
|
|
63
|
+
_this.scrolling = false;
|
|
64
|
+
|
|
65
|
+
if (!_this.pressed && _this.started) {
|
|
66
|
+
_this.processEnd();
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
_this.onScroll = function (e) {
|
|
71
|
+
var container = _this.container.current; // Ignore the internal scrolls
|
|
72
|
+
|
|
73
|
+
if (container.scrollLeft !== _this.scrollLeft || container.scrollTop !== _this.scrollTop) {
|
|
74
|
+
_this.scrolling = true;
|
|
75
|
+
|
|
76
|
+
_this.processScroll(e);
|
|
77
|
+
|
|
78
|
+
_this.onEndScroll();
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
_this.onTouchStart = function (e) {
|
|
83
|
+
var nativeMobileScroll = _this.props.nativeMobileScroll;
|
|
84
|
+
|
|
85
|
+
if (_this.isDraggable(e.target)) {
|
|
86
|
+
_this.internal = true;
|
|
87
|
+
|
|
88
|
+
if (nativeMobileScroll && _this.scrolling) {
|
|
89
|
+
_this.pressed = true;
|
|
90
|
+
} else {
|
|
91
|
+
var touch = e.touches[0];
|
|
92
|
+
|
|
93
|
+
_this.processClick(e, touch.clientX, touch.clientY);
|
|
94
|
+
|
|
95
|
+
if (!nativeMobileScroll && _this.props.stopPropagation) {
|
|
96
|
+
e.stopPropagation();
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
};
|
|
101
|
+
|
|
102
|
+
_this.onTouchEnd = function (e) {
|
|
103
|
+
var nativeMobileScroll = _this.props.nativeMobileScroll;
|
|
104
|
+
|
|
105
|
+
if (_this.pressed) {
|
|
106
|
+
if (_this.started && (!_this.scrolling || !nativeMobileScroll)) {
|
|
107
|
+
_this.processEnd();
|
|
108
|
+
} else {
|
|
109
|
+
_this.pressed = false;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
_this.forceUpdate();
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
_this.onTouchMove = function (e) {
|
|
117
|
+
var nativeMobileScroll = _this.props.nativeMobileScroll;
|
|
118
|
+
|
|
119
|
+
if (_this.pressed && (!nativeMobileScroll || !_this.isMobile)) {
|
|
120
|
+
var touch = e.touches[0];
|
|
121
|
+
|
|
122
|
+
if (touch) {
|
|
123
|
+
_this.processMove(e, touch.clientX, touch.clientY);
|
|
124
|
+
} // e.preventDefault(); // 处理无法拖动选中文字的问题,先屏蔽禁止默认事件
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
if (_this.props.stopPropagation) {
|
|
128
|
+
e.stopPropagation();
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
};
|
|
132
|
+
|
|
133
|
+
_this.onMouseDown = function (e) {
|
|
134
|
+
if (_this.isDraggable(e.target) && _this.isScrollable()) {
|
|
135
|
+
_this.internal = true;
|
|
136
|
+
|
|
137
|
+
if (_this.props.buttons.indexOf(e.button) !== -1) {
|
|
138
|
+
_this.processClick(e, e.clientX, e.clientY); // e.preventDefault();
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
if (_this.props.stopPropagation) {
|
|
142
|
+
e.stopPropagation();
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
};
|
|
147
|
+
|
|
148
|
+
_this.onMouseMove = function (e) {
|
|
149
|
+
if (_this.pressed) {
|
|
150
|
+
_this.processMove(e, e.clientX, e.clientY); // e.preventDefault();
|
|
151
|
+
|
|
152
|
+
|
|
153
|
+
if (_this.props.stopPropagation) {
|
|
154
|
+
e.stopPropagation();
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
_this.onMouseUp = function (e) {
|
|
160
|
+
if (_this.pressed) {
|
|
161
|
+
if (_this.started) {
|
|
162
|
+
_this.processEnd();
|
|
163
|
+
} else {
|
|
164
|
+
_this.internal = false;
|
|
165
|
+
_this.pressed = false;
|
|
166
|
+
|
|
167
|
+
_this.forceUpdate();
|
|
168
|
+
|
|
169
|
+
if (_this.props.onClick) {
|
|
170
|
+
_this.props.onClick(e);
|
|
171
|
+
}
|
|
172
|
+
} // e.preventDefault();
|
|
173
|
+
|
|
174
|
+
|
|
175
|
+
if (_this.props.stopPropagation) {
|
|
176
|
+
e.stopPropagation();
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
};
|
|
180
|
+
|
|
181
|
+
_this.container = /*#__PURE__*/_react["default"].createRef();
|
|
182
|
+
_this.onEndScroll = (0, _lodash["default"])(_this.onEndScroll, SCROLL_END_DEBOUNCE); // Is container scrolling now (for example by inertia)
|
|
183
|
+
|
|
184
|
+
_this.scrolling = false; // Is scrolling started
|
|
185
|
+
|
|
186
|
+
_this.started = false; // Is touch active or mouse pressed down
|
|
187
|
+
|
|
188
|
+
_this.pressed = false; // Is event internal
|
|
189
|
+
|
|
190
|
+
_this.internal = false; // Bind callbacks
|
|
191
|
+
|
|
192
|
+
_this.getRef = _this.getRef.bind(_assertThisInitialized(_this));
|
|
193
|
+
return _this;
|
|
194
|
+
}
|
|
195
|
+
|
|
196
|
+
_createClass(ScrollContainer, [{
|
|
197
|
+
key: "componentDidMount",
|
|
198
|
+
value: function componentDidMount() {
|
|
199
|
+
var nativeMobileScroll = this.props.nativeMobileScroll;
|
|
200
|
+
var container = this.container.current;
|
|
201
|
+
window.addEventListener('mouseup', this.onMouseUp, {
|
|
202
|
+
capture: true
|
|
203
|
+
});
|
|
204
|
+
window.addEventListener('mousemove', this.onMouseMove, {
|
|
205
|
+
capture: true
|
|
206
|
+
});
|
|
207
|
+
window.addEventListener('touchmove', this.onTouchMove, {
|
|
208
|
+
passive: false,
|
|
209
|
+
capture: true
|
|
210
|
+
});
|
|
211
|
+
window.addEventListener('touchend', this.onTouchEnd, {
|
|
212
|
+
capture: true
|
|
213
|
+
}); // due to https://github.com/facebook/react/issues/9809#issuecomment-414072263
|
|
214
|
+
|
|
215
|
+
container.addEventListener('touchstart', this.onTouchStart, {
|
|
216
|
+
passive: false
|
|
217
|
+
});
|
|
218
|
+
container.addEventListener('mousedown', this.onMouseDown, {
|
|
219
|
+
passive: false
|
|
220
|
+
});
|
|
221
|
+
|
|
222
|
+
if (nativeMobileScroll) {
|
|
223
|
+
// We should check if it's the mobile device after page was loaded
|
|
224
|
+
// to prevent breaking SSR
|
|
225
|
+
this.isMobile = this.isMobileDevice(); // If it's the mobile device, we should rerender to change styles
|
|
226
|
+
|
|
227
|
+
if (this.isMobile) {
|
|
228
|
+
this.forceUpdate();
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}
|
|
232
|
+
}, {
|
|
233
|
+
key: "componentWillUnmount",
|
|
234
|
+
value: function componentWillUnmount() {
|
|
235
|
+
window.removeEventListener('mouseup', this.onMouseUp);
|
|
236
|
+
window.removeEventListener('mousemove', this.onMouseMove);
|
|
237
|
+
window.removeEventListener('touchmove', this.onTouchMove);
|
|
238
|
+
window.removeEventListener('touchend', this.onTouchEnd);
|
|
239
|
+
}
|
|
240
|
+
}, {
|
|
241
|
+
key: "getElement",
|
|
242
|
+
value: function getElement() {
|
|
243
|
+
return this.container.current;
|
|
244
|
+
}
|
|
245
|
+
}, {
|
|
246
|
+
key: "isMobileDevice",
|
|
247
|
+
value: function isMobileDevice() {
|
|
248
|
+
return typeof window.orientation !== 'undefined' || navigator.userAgent.indexOf('IEMobile') !== -1;
|
|
249
|
+
}
|
|
250
|
+
}, {
|
|
251
|
+
key: "isDraggable",
|
|
252
|
+
value: function isDraggable(target) {
|
|
253
|
+
var ignoreElements = this.props.ignoreElements;
|
|
254
|
+
|
|
255
|
+
if (ignoreElements) {
|
|
256
|
+
var closest = target.closest(ignoreElements);
|
|
257
|
+
return closest === null || closest.contains(this.getElement());
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
return true;
|
|
261
|
+
}
|
|
262
|
+
}, {
|
|
263
|
+
key: "isScrollable",
|
|
264
|
+
value: function isScrollable() {
|
|
265
|
+
var container = this.container.current;
|
|
266
|
+
return container && (container.scrollWidth > container.clientWidth || container.scrollHeight > container.clientHeight);
|
|
267
|
+
} // Simulate 'onEndScroll' event that fires when scrolling is stopped
|
|
268
|
+
|
|
269
|
+
}, {
|
|
270
|
+
key: "processClick",
|
|
271
|
+
value: function processClick(e, clientX, clientY) {
|
|
272
|
+
var container = this.container.current;
|
|
273
|
+
this.scrollLeft = container.scrollLeft;
|
|
274
|
+
this.scrollTop = container.scrollTop;
|
|
275
|
+
this.clientX = clientX;
|
|
276
|
+
this.clientY = clientY;
|
|
277
|
+
this.pressed = true;
|
|
278
|
+
}
|
|
279
|
+
}, {
|
|
280
|
+
key: "processStart",
|
|
281
|
+
value: function processStart() {
|
|
282
|
+
var changeCursor = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;
|
|
283
|
+
var onStartScroll = this.props.onStartScroll;
|
|
284
|
+
this.started = true; // Add the class to change displayed cursor
|
|
285
|
+
|
|
286
|
+
if (changeCursor) {
|
|
287
|
+
document.body.classList.add('indiana-dragging');
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
if (onStartScroll) {
|
|
291
|
+
onStartScroll({
|
|
292
|
+
external: !this.internal
|
|
293
|
+
});
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
this.forceUpdate();
|
|
297
|
+
} // Process native scroll (scrollbar, mobile scroll)
|
|
298
|
+
|
|
299
|
+
}, {
|
|
300
|
+
key: "processScroll",
|
|
301
|
+
value: function processScroll(e) {
|
|
302
|
+
if (this.started) {
|
|
303
|
+
var onScroll = this.props.onScroll;
|
|
304
|
+
|
|
305
|
+
if (onScroll) {
|
|
306
|
+
onScroll({
|
|
307
|
+
external: !this.internal
|
|
308
|
+
});
|
|
309
|
+
}
|
|
310
|
+
} else {
|
|
311
|
+
this.processStart(false);
|
|
312
|
+
}
|
|
313
|
+
} // Process non-native scroll
|
|
314
|
+
|
|
315
|
+
}, {
|
|
316
|
+
key: "processMove",
|
|
317
|
+
value: function processMove(e, newClientX, newClientY) {
|
|
318
|
+
var _this$props = this.props,
|
|
319
|
+
horizontal = _this$props.horizontal,
|
|
320
|
+
vertical = _this$props.vertical,
|
|
321
|
+
activationDistance = _this$props.activationDistance,
|
|
322
|
+
onScroll = _this$props.onScroll;
|
|
323
|
+
var container = this.container.current;
|
|
324
|
+
|
|
325
|
+
if (!this.started) {
|
|
326
|
+
if (horizontal && Math.abs(newClientX - this.clientX) > activationDistance || vertical && Math.abs(newClientY - this.clientY) > activationDistance) {
|
|
327
|
+
this.clientX = newClientX;
|
|
328
|
+
this.clientY = newClientY;
|
|
329
|
+
this.processStart();
|
|
330
|
+
}
|
|
331
|
+
} else {
|
|
332
|
+
if (horizontal) {
|
|
333
|
+
container.scrollLeft -= newClientX - this.clientX;
|
|
334
|
+
}
|
|
335
|
+
|
|
336
|
+
if (vertical) {
|
|
337
|
+
container.scrollTop -= newClientY - this.clientY;
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
if (onScroll) {
|
|
341
|
+
onScroll({
|
|
342
|
+
external: !this.internal
|
|
343
|
+
});
|
|
344
|
+
}
|
|
345
|
+
|
|
346
|
+
this.clientX = newClientX;
|
|
347
|
+
this.clientY = newClientY;
|
|
348
|
+
this.scrollLeft = container.scrollLeft;
|
|
349
|
+
this.scrollTop = container.scrollTop;
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}, {
|
|
353
|
+
key: "processEnd",
|
|
354
|
+
value: function processEnd() {
|
|
355
|
+
var onEndScroll = this.props.onEndScroll;
|
|
356
|
+
var container = this.container.current;
|
|
357
|
+
|
|
358
|
+
if (container && onEndScroll) {
|
|
359
|
+
onEndScroll({
|
|
360
|
+
external: !this.internal
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
this.pressed = false;
|
|
365
|
+
this.started = false;
|
|
366
|
+
this.scrolling = false;
|
|
367
|
+
this.internal = false;
|
|
368
|
+
document.body.classList.remove('indiana-dragging');
|
|
369
|
+
this.forceUpdate();
|
|
370
|
+
}
|
|
371
|
+
}, {
|
|
372
|
+
key: "getRef",
|
|
373
|
+
value: function getRef(el) {
|
|
374
|
+
;
|
|
375
|
+
[this.container, this.props.innerRef].forEach(function (ref) {
|
|
376
|
+
if (ref) {
|
|
377
|
+
if (typeof ref === 'function') {
|
|
378
|
+
ref(el);
|
|
379
|
+
} else {
|
|
380
|
+
;
|
|
381
|
+
ref.current = el;
|
|
382
|
+
}
|
|
383
|
+
}
|
|
384
|
+
});
|
|
385
|
+
}
|
|
386
|
+
}, {
|
|
387
|
+
key: "render",
|
|
388
|
+
value: function render() {
|
|
389
|
+
var _this$props2 = this.props,
|
|
390
|
+
children = _this$props2.children,
|
|
391
|
+
draggingClassName = _this$props2.draggingClassName,
|
|
392
|
+
className = _this$props2.className,
|
|
393
|
+
style = _this$props2.style,
|
|
394
|
+
hideScrollbars = _this$props2.hideScrollbars,
|
|
395
|
+
Component = _this$props2.component;
|
|
396
|
+
return /*#__PURE__*/_react["default"].createElement(Component, {
|
|
397
|
+
className: (0, _classnames["default"])(className, this.pressed && draggingClassName, cn({
|
|
398
|
+
dragging: this.pressed,
|
|
399
|
+
'hide-scrollbars': hideScrollbars,
|
|
400
|
+
'native-scroll': this.isMobile
|
|
401
|
+
})),
|
|
402
|
+
style: style,
|
|
403
|
+
ref: this.getRef,
|
|
404
|
+
onScroll: this.onScroll
|
|
405
|
+
}, children);
|
|
406
|
+
}
|
|
407
|
+
}]);
|
|
408
|
+
|
|
409
|
+
return ScrollContainer;
|
|
410
|
+
}(_react.PureComponent);
|
|
411
|
+
|
|
412
|
+
exports["default"] = ScrollContainer;
|
|
413
|
+
ScrollContainer.defaultProps = {
|
|
414
|
+
nativeMobileScroll: true,
|
|
415
|
+
hideScrollbars: true,
|
|
416
|
+
activationDistance: 10,
|
|
417
|
+
vertical: true,
|
|
418
|
+
horizontal: true,
|
|
419
|
+
stopPropagation: false,
|
|
420
|
+
style: {},
|
|
421
|
+
component: 'div',
|
|
422
|
+
buttons: [LEFT_BUTTON]
|
|
423
|
+
};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.indiana-scroll-container {
|
|
2
|
+
overflow: auto;
|
|
3
|
+
}
|
|
4
|
+
|
|
5
|
+
.indiana-scroll-container--dragging {
|
|
6
|
+
scroll-behavior: auto !important;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
.indiana-scroll-container--dragging > * {
|
|
10
|
+
pointer-events: none;
|
|
11
|
+
cursor: grab;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.indiana-scroll-container--hide-scrollbars {
|
|
15
|
+
overflow: hidden;
|
|
16
|
+
overflow: -moz-scrollbars-none;
|
|
17
|
+
-ms-overflow-style: none;
|
|
18
|
+
scrollbar-width: none;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.indiana-scroll-container--hide-scrollbars::-webkit-scrollbar {
|
|
22
|
+
display: none !important;
|
|
23
|
+
height: 0 !important;
|
|
24
|
+
width: 0 !important;
|
|
25
|
+
background: transparent !important;
|
|
26
|
+
-webkit-appearance: none !important;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
.indiana-scroll-container--native-scroll {
|
|
30
|
+
overflow: auto;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
.indiana-dragging {
|
|
34
|
+
cursor: grab;
|
|
35
|
+
}
|
|
@@ -19,7 +19,7 @@ var Chart = function Chart(props) {
|
|
|
19
19
|
// });
|
|
20
20
|
// }, []);
|
|
21
21
|
var Chart = (_window = window) === null || _window === void 0 ? void 0 : (_window$SupersetChart = _window.SupersetChart) === null || _window$SupersetChart === void 0 ? void 0 : _window$SupersetChart.SupersetChart;
|
|
22
|
-
return Chart
|
|
22
|
+
return Chart ? /*#__PURE__*/_react["default"].createElement(Chart, props) : /*#__PURE__*/_react["default"].createElement("div", null);
|
|
23
23
|
};
|
|
24
24
|
|
|
25
25
|
var _default = Chart;
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
.titaui-textArea {
|
|
2
|
+
box-sizing: border-box;
|
|
3
|
+
position: relative;
|
|
4
|
+
min-height: 36px;
|
|
5
|
+
background: #ffffff;
|
|
6
|
+
cursor: text;
|
|
7
|
+
border-radius: 4px;
|
|
8
|
+
display: flex;
|
|
9
|
+
align-items: center;
|
|
10
|
+
padding: 7px 0;
|
|
11
|
+
transition: border 0.2s ease 0.2s, box-shadow 0.2s ease 0.2s;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
.titaui-textArea.has-error {
|
|
15
|
+
border: 1px solid #f05e5e !important;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
.titaui-textArea:hover {
|
|
19
|
+
border: 1px solid #2879ff;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
.titaui-textArea > input {
|
|
23
|
+
flex-grow: 1;
|
|
24
|
+
border: none;
|
|
25
|
+
padding: 0 12px;
|
|
26
|
+
margin: 0;
|
|
27
|
+
outline: none;
|
|
28
|
+
width: 0;
|
|
29
|
+
box-sizing: border-box;
|
|
30
|
+
background-color: transparent;
|
|
31
|
+
color: #3f4755;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
.titaui-textArea > input ::-webkit-input-placeholder {
|
|
35
|
+
color: #bfc7d5;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
.titaui-textArea > input :-ms-input-placeholder {
|
|
39
|
+
color: #bfc7d5;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
.titaui-textArea > input :-moz-input-placeholder {
|
|
43
|
+
color: #bfc7d5;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.titaui-textArea textarea {
|
|
47
|
+
flex: 1;
|
|
48
|
+
line-height: 20px;
|
|
49
|
+
min-height: 20px;
|
|
50
|
+
border: none;
|
|
51
|
+
padding: 0;
|
|
52
|
+
margin: 0;
|
|
53
|
+
outline: none;
|
|
54
|
+
resize: none;
|
|
55
|
+
padding: 0 12px;
|
|
56
|
+
width: 100%;
|
|
57
|
+
box-sizing: border-box;
|
|
58
|
+
background-color: transparent;
|
|
59
|
+
color: #3f4755;
|
|
60
|
+
word-break: break-all;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
.titaui-textArea textarea ::-webkit-input-placeholder {
|
|
64
|
+
color: #bfc7d5;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
.titaui-textArea textarea :-ms-input-placeholder {
|
|
68
|
+
color: #bfc7d5;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
.titaui-textArea textarea :-moz-input-placeholder {
|
|
72
|
+
color: #bfc7d5;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
.titaui-textArea.disabled {
|
|
76
|
+
background-color: rgba(240, 242, 245, 0.4);
|
|
77
|
+
border-color: #f0f2f5;
|
|
78
|
+
color: #bfc7d5;
|
|
79
|
+
cursor: default;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
.titaui-textArea.disabled > input,
|
|
83
|
+
.titaui-textArea.disabled textarea,
|
|
84
|
+
.titaui-textArea.disabled .tail-wrapper {
|
|
85
|
+
color: #bfc7d5;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.titaui-textArea.disabled:hover {
|
|
89
|
+
border-color: #f0f2f5;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
.area-error {
|
|
93
|
+
border: 1px solid #f05e5e !important;
|
|
94
|
+
box-shadow: 0px 0px 6px 0px rgba(240, 94, 94, 0.3);
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
.area-focus {
|
|
98
|
+
border: 1px solid #2879ff !important;
|
|
99
|
+
box-shadow: 0px 0px 6px 0px rgba(40, 121, 255, 0.3);
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.area-normal {
|
|
103
|
+
border: 1px solid #e9ecf0 !important;
|
|
104
|
+
box-shadow: none;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
.inner {
|
|
108
|
+
overflow: auto;
|
|
109
|
+
display: flex;
|
|
110
|
+
flex: 1;
|
|
111
|
+
width: 0;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
.err-color {
|
|
115
|
+
font-size: 12px;
|
|
116
|
+
font-weight: 400;
|
|
117
|
+
color: #f05e5e;
|
|
118
|
+
line-height: 18px;
|
|
119
|
+
padding-left: 12px;
|
|
120
|
+
}
|