@jetbrains/ring-ui-built 6.0.32 → 6.0.33
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/_helpers/_rollupPluginBabelHelpers.js +567 -1
- package/components/_helpers/anchor.js +6 -7
- package/components/_helpers/button__classes.js +14 -16
- package/components/_helpers/caption.js +20 -14
- package/components/_helpers/card.js +105 -95
- package/components/_helpers/dialog__body-scroll-preventer.js +19 -11
- package/components/_helpers/icon__svg.js +25 -22
- package/components/_helpers/input.js +177 -146
- package/components/_helpers/query-assist__suggestions.js +90 -74
- package/components/_helpers/select__filter.js +69 -48
- package/components/_helpers/services-link.js +37 -29
- package/components/_helpers/sidebar.js +107 -99
- package/components/_helpers/tab-link.js +7 -7
- package/components/_helpers/theme.js +40 -31
- package/components/_helpers/title.js +72 -57
- package/components/alert/alert.js +202 -150
- package/components/alert/container.js +41 -32
- package/components/alert-service/alert-service.js +170 -105
- package/components/analytics/analytics.js +22 -12
- package/components/analytics/analytics__custom-plugin.js +75 -54
- package/components/auth/auth.js +36 -4
- package/components/auth/auth__core.js +1471 -746
- package/components/auth/background-flow.js +127 -87
- package/components/auth/down-notification.js +73 -30
- package/components/auth/iframe-flow.js +133 -75
- package/components/auth/request-builder.js +82 -46
- package/components/auth/response-parser.js +116 -86
- package/components/auth/storage.js +334 -171
- package/components/auth/token-validator.js +242 -137
- package/components/auth/window-flow.js +134 -92
- package/components/auth-dialog/auth-dialog.js +172 -114
- package/components/auth-dialog-service/auth-dialog-service.js +31 -8
- package/components/avatar/avatar-example-datauri.js +1 -23
- package/components/avatar/avatar.js +152 -119
- package/components/avatar/fallback-avatar.js +38 -22
- package/components/badge/badge.js +45 -35
- package/components/button/button.js +107 -86
- package/components/button-group/button-group.js +33 -19
- package/components/button-set/button-set.js +32 -20
- package/components/button-toolbar/button-toolbar.js +31 -19
- package/components/caret/caret.js +220 -186
- package/components/checkbox/checkbox.js +101 -76
- package/components/clipboard/clipboard-fallback.js +10 -10
- package/components/clipboard/clipboard.js +132 -35
- package/components/code/code.js +166 -92
- package/components/collapse/collapse-content.js +64 -42
- package/components/collapse/collapse-context.js +2 -2
- package/components/collapse/collapse-control.js +14 -12
- package/components/collapse/collapse.js +17 -11
- package/components/collapse/consts.js +4 -4
- package/components/collapse/utils.js +3 -1
- package/components/confirm/confirm.js +104 -66
- package/components/confirm-service/confirm-service.js +59 -37
- package/components/content-layout/content-layout.js +64 -43
- package/components/content-layout/sidebar.js +1 -0
- package/components/contenteditable/contenteditable.js +59 -50
- package/components/control-label/control-label.js +9 -9
- package/components/data-list/data-list.js +182 -129
- package/components/data-list/data-list.mock.js +6 -2
- package/components/data-list/item.js +170 -143
- package/components/data-list/selection.js +136 -76
- package/components/data-list/title.js +12 -1
- package/components/date-picker/consts.js +26 -19
- package/components/date-picker/date-input.js +144 -113
- package/components/date-picker/date-picker.js +282 -227
- package/components/date-picker/date-popup.js +395 -350
- package/components/date-picker/day.js +116 -87
- package/components/date-picker/month-names.js +66 -43
- package/components/date-picker/month-slider.js +76 -51
- package/components/date-picker/month.js +25 -16
- package/components/date-picker/months.js +50 -43
- package/components/date-picker/weekdays.js +22 -12
- package/components/date-picker/years.js +110 -83
- package/components/dialog/dialog.js +190 -142
- package/components/dialog/dialog__body-scroll-preventer.js +4 -0
- package/components/dropdown/anchor.js +9 -0
- package/components/dropdown/dropdown.js +213 -182
- package/components/dropdown-menu/dropdown-menu.js +97 -71
- package/components/editable-heading/editable-heading.js +127 -75
- package/components/error-bubble/error-bubble.js +60 -31
- package/components/error-message/error-message.js +59 -39
- package/components/footer/footer.js +30 -27
- package/components/global/compose.js +10 -1
- package/components/global/composeRefs.js +12 -7
- package/components/global/controls-height.js +2 -2
- package/components/global/create-stateful-context.js +15 -15
- package/components/global/data-tests.js +14 -6
- package/components/global/dom.js +86 -47
- package/components/global/focus-sensor-hoc.js +132 -122
- package/components/global/fuzzy-highlight.js +36 -22
- package/components/global/get-event-key.js +8 -8
- package/components/global/get-uid.js +8 -4
- package/components/global/inject-styles.js +15 -10
- package/components/global/listeners.js +51 -27
- package/components/global/memoize.js +12 -6
- package/components/global/normalize-indent.js +50 -19
- package/components/global/promise-with-timeout.js +8 -6
- package/components/global/prop-types.js +5 -3
- package/components/global/react-dom-renderer.js +44 -28
- package/components/global/react-render-adapter.js +1 -1
- package/components/global/rerender-hoc.js +30 -12
- package/components/global/schedule-raf.js +6 -5
- package/components/global/sniffer.js +1 -1
- package/components/global/theme.js +22 -0
- package/components/global/trivial-template-tag.js +10 -3
- package/components/global/typescript-utils.js +6 -2
- package/components/global/url.js +26 -20
- package/components/global/use-event-callback.js +4 -6
- package/components/grid/col.js +52 -35
- package/components/grid/grid.js +31 -17
- package/components/grid/row.js +47 -35
- package/components/group/group.js +25 -17
- package/components/header/header.js +78 -33
- package/components/header/logo.js +36 -20
- package/components/header/profile.js +199 -166
- package/components/header/services-link.js +4 -0
- package/components/header/services.js +116 -73
- package/components/header/smart-profile.js +203 -111
- package/components/header/smart-services.js +113 -62
- package/components/header/tray-icon.js +37 -21
- package/components/header/tray.js +32 -21
- package/components/heading/heading.js +25 -24
- package/components/http/http.js +353 -203
- package/components/http/http.mock.js +101 -49
- package/components/hub-source/hub-source.js +190 -83
- package/components/hub-source/hub-source__user.js +44 -11
- package/components/hub-source/hub-source__users-groups.js +65 -37
- package/components/i18n/i18n-context.js +10 -7
- package/components/i18n/i18n.js +10 -7
- package/components/icon/icon.js +93 -76
- package/components/icon/icon__svg.js +8 -0
- package/components/icon/index.js +8 -0
- package/components/input/input.js +13 -0
- package/components/island/adaptive-island-hoc.js +43 -30
- package/components/island/content.js +132 -115
- package/components/island/header.js +70 -57
- package/components/island/island.js +40 -28
- package/components/island-legacy/content-legacy.js +25 -17
- package/components/island-legacy/header-legacy.js +27 -19
- package/components/island-legacy/island-legacy.js +25 -17
- package/components/link/clickableLink.js +59 -44
- package/components/link/link.js +68 -57
- package/components/list/consts.js +2 -2
- package/components/list/list.js +698 -611
- package/components/list/list__custom.js +62 -44
- package/components/list/list__hint.js +19 -10
- package/components/list/list__item.js +174 -133
- package/components/list/list__link.js +50 -37
- package/components/list/list__separator.js +24 -14
- package/components/list/list__title.js +32 -22
- package/components/list/list__users-groups-source.js +126 -54
- package/components/loader/loader.js +74 -43
- package/components/loader/loader__core.js +263 -198
- package/components/loader-inline/loader-inline.js +35 -23
- package/components/loader-screen/loader-screen.js +46 -25
- package/components/login-dialog/login-dialog.js +158 -111
- package/components/login-dialog/service.js +34 -8
- package/components/markdown/markdown.js +23 -15
- package/components/message/message.js +203 -161
- package/components/old-browsers-message/old-browsers-message.js +18 -11
- package/components/old-browsers-message/old-browsers-message__stop.js +7 -0
- package/components/old-browsers-message/white-list.js +16 -8
- package/components/pager/pager.js +271 -212
- package/components/panel/panel.js +25 -17
- package/components/permissions/permissions.js +172 -127
- package/components/permissions/permissions__cache.js +224 -194
- package/components/popup/popup.consts.js +1 -1
- package/components/popup/popup.js +343 -284
- package/components/popup/popup.target.js +8 -9
- package/components/popup/position.js +106 -96
- package/components/popup-menu/popup-menu.js +81 -44
- package/components/progress-bar/progress-bar.js +104 -87
- package/components/query-assist/query-assist.js +916 -838
- package/components/query-assist/query-assist__suggestions.js +30 -1
- package/components/radio/radio.js +34 -19
- package/components/radio/radio__item.js +69 -52
- package/components/select/select.js +957 -852
- package/components/select/select__filter.js +30 -0
- package/components/select/select__popup.js +487 -373
- package/components/shortcuts/core.js +217 -166
- package/components/shortcuts/shortcut-title.js +11 -6
- package/components/shortcuts/shortcuts-hoc.js +45 -19
- package/components/shortcuts/shortcuts.js +75 -50
- package/components/slider/slider.js +122 -99
- package/components/slider/slider.utils.js +24 -14
- package/components/storage/storage.js +33 -4
- package/components/storage/storage__fallback.js +224 -149
- package/components/storage/storage__local.js +153 -90
- package/components/tab-trap/tab-trap.js +153 -122
- package/components/table/cell.js +26 -14
- package/components/table/disable-hover-hoc.js +51 -33
- package/components/table/header-cell.js +89 -64
- package/components/table/header.js +132 -104
- package/components/table/multitable.js +125 -107
- package/components/table/row-with-focus-sensor.js +69 -25
- package/components/table/row.js +216 -175
- package/components/table/selection-adapter.js +3 -1
- package/components/table/selection-shortcuts-hoc.js +181 -180
- package/components/table/selection.js +226 -156
- package/components/table/smart-table.js +88 -50
- package/components/table/table.js +358 -289
- package/components/tabs/collapsible-more.js +79 -46
- package/components/tabs/collapsible-tab.js +38 -31
- package/components/tabs/collapsible-tabs.js +153 -88
- package/components/tabs/custom-item.js +2 -4
- package/components/tabs/dumb-tabs.js +117 -74
- package/components/tabs/smart-tabs.js +69 -29
- package/components/tabs/tab-link.js +5 -1
- package/components/tabs/tab.js +31 -19
- package/components/tabs/tabs.js +31 -0
- package/components/tag/tag.js +173 -133
- package/components/tags-input/tags-input.js +427 -329
- package/components/tags-list/tags-list.js +78 -57
- package/components/text/text.js +39 -28
- package/components/toggle/toggle.js +70 -56
- package/components/tooltip/tooltip.js +190 -146
- package/components/user-agreement/service.js +371 -228
- package/components/user-agreement/toolbox.eula.js +1 -160
- package/components/user-agreement/user-agreement.js +120 -85
- package/components/user-card/card.js +29 -0
- package/components/user-card/smart-user-card-tooltip.js +111 -51
- package/components/user-card/tooltip.js +84 -47
- package/components/user-card/user-card.js +29 -0
- package/package.json +1 -1
@@ -1,29 +1,60 @@
|
|
1
|
+
import { k as _toConsumableArray, l as _createForOfIteratorHelper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import 'core-js/modules/es.array.filter.js';
|
3
|
+
import 'core-js/modules/es.array.map.js';
|
4
|
+
import 'core-js/modules/es.array.slice.js';
|
5
|
+
import 'core-js/modules/es.object.to-string.js';
|
6
|
+
import 'core-js/modules/es.regexp.exec.js';
|
7
|
+
import 'core-js/modules/es.string.match.js';
|
8
|
+
import 'core-js/modules/es.string.split.js';
|
9
|
+
|
1
10
|
function normalizeIndent(string) {
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
11
|
+
var nonemptyRE = /\S/;
|
12
|
+
var indentRE = /^\s*/;
|
13
|
+
var lines = string.split(/\n/g);
|
14
|
+
var linesCopy = _toConsumableArray(lines);
|
6
15
|
//remove empty lines at the beginning and the end
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
16
|
+
var _iterator = _createForOfIteratorHelper(linesCopy),
|
17
|
+
_step;
|
18
|
+
try {
|
19
|
+
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
20
|
+
var line = _step.value;
|
21
|
+
if (nonemptyRE.test(line)) {
|
22
|
+
break;
|
23
|
+
} else {
|
24
|
+
lines.shift();
|
25
|
+
}
|
12
26
|
}
|
27
|
+
} catch (err) {
|
28
|
+
_iterator.e(err);
|
29
|
+
} finally {
|
30
|
+
_iterator.f();
|
13
31
|
}
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
32
|
+
var _iterator2 = _createForOfIteratorHelper(linesCopy.reverse()),
|
33
|
+
_step2;
|
34
|
+
try {
|
35
|
+
for (_iterator2.s(); !(_step2 = _iterator2.n()).done;) {
|
36
|
+
var _line = _step2.value;
|
37
|
+
if (nonemptyRE.test(_line)) {
|
38
|
+
break;
|
39
|
+
} else {
|
40
|
+
lines.pop();
|
41
|
+
}
|
19
42
|
}
|
43
|
+
} catch (err) {
|
44
|
+
_iterator2.e(err);
|
45
|
+
} finally {
|
46
|
+
_iterator2.f();
|
20
47
|
}
|
21
|
-
|
22
|
-
|
23
|
-
|
48
|
+
var indents = lines.filter(function (line) {
|
49
|
+
return nonemptyRE.test(line);
|
50
|
+
}).map(function (line) {
|
51
|
+
var _line$match$0$length, _line$match;
|
52
|
+
return (_line$match$0$length = (_line$match = line.match(indentRE)) === null || _line$match === void 0 ? void 0 : _line$match[0].length) !== null && _line$match$0$length !== void 0 ? _line$match$0$length : 0;
|
24
53
|
});
|
25
|
-
|
26
|
-
return lines.map(
|
54
|
+
var minIndent = Math.min.apply(Math, _toConsumableArray(indents));
|
55
|
+
return lines.map(function (line) {
|
56
|
+
return line.slice(minIndent);
|
57
|
+
}).join('\n');
|
27
58
|
}
|
28
59
|
|
29
60
|
export { normalizeIndent as default };
|
@@ -1,12 +1,14 @@
|
|
1
|
+
import 'core-js/modules/es.object.to-string.js';
|
2
|
+
import 'core-js/modules/es.promise.js';
|
3
|
+
|
1
4
|
// Useful for using fetch with timeout
|
2
5
|
// https://github.com/github/fetch/issues/175#issuecomment-284787564
|
3
6
|
function promiseWithTimeout(promise, timeout, _ref) {
|
4
|
-
|
5
|
-
|
6
|
-
onTimeout = ()
|
7
|
-
|
8
|
-
|
9
|
-
setTimeout(() => {
|
7
|
+
var error = _ref.error,
|
8
|
+
_ref$onTimeout = _ref.onTimeout,
|
9
|
+
onTimeout = _ref$onTimeout === void 0 ? function () {} : _ref$onTimeout;
|
10
|
+
return new Promise(function (resolve, reject) {
|
11
|
+
setTimeout(function () {
|
10
12
|
onTimeout();
|
11
13
|
reject(error || new Error('Timeout'));
|
12
14
|
}, timeout);
|
@@ -1,36 +1,52 @@
|
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, f as _classCallCheck, g as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import 'core-js/modules/es.array.concat.js';
|
3
|
+
import 'core-js/modules/es.array.from.js';
|
4
|
+
import 'core-js/modules/es.object.to-string.js';
|
5
|
+
import 'core-js/modules/web.dom-collections.for-each.js';
|
1
6
|
import React, { Component } from 'react';
|
2
7
|
import PropTypes from 'prop-types';
|
3
8
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
const {
|
11
|
-
node
|
12
|
-
} = this;
|
13
|
-
const {
|
14
|
-
nodes
|
15
|
-
} = this.props;
|
16
|
-
if (!node || !nodes || !nodes.length) {
|
17
|
-
return;
|
9
|
+
var Renderer = /*#__PURE__*/function (_Component) {
|
10
|
+
function Renderer() {
|
11
|
+
var _this;
|
12
|
+
_classCallCheck(this, Renderer);
|
13
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
14
|
+
args[_key] = arguments[_key];
|
18
15
|
}
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
this.node = node;
|
24
|
-
};
|
25
|
-
render() {
|
26
|
-
const {
|
27
|
-
className
|
28
|
-
} = this.props;
|
29
|
-
return /*#__PURE__*/React.createElement("div", {
|
30
|
-
className: className,
|
31
|
-
ref: this.nodeRef
|
16
|
+
_this = _callSuper(this, Renderer, [].concat(args));
|
17
|
+
_defineProperty(_this, "node", void 0);
|
18
|
+
_defineProperty(_this, "nodeRef", function (node) {
|
19
|
+
_this.node = node;
|
32
20
|
});
|
21
|
+
return _this;
|
33
22
|
}
|
34
|
-
|
23
|
+
_inherits(Renderer, _Component);
|
24
|
+
return _createClass(Renderer, [{
|
25
|
+
key: "componentDidMount",
|
26
|
+
value: function componentDidMount() {
|
27
|
+
var node = this.node;
|
28
|
+
var nodes = this.props.nodes;
|
29
|
+
if (!node || !nodes || !nodes.length) {
|
30
|
+
return;
|
31
|
+
}
|
32
|
+
Array.from(this.props.nodes).forEach(function (nodeToRender) {
|
33
|
+
return node.appendChild(nodeToRender);
|
34
|
+
});
|
35
|
+
}
|
36
|
+
}, {
|
37
|
+
key: "render",
|
38
|
+
value: function render() {
|
39
|
+
var className = this.props.className;
|
40
|
+
return /*#__PURE__*/React.createElement("div", {
|
41
|
+
className: className,
|
42
|
+
ref: this.nodeRef
|
43
|
+
});
|
44
|
+
}
|
45
|
+
}]);
|
46
|
+
}(Component);
|
47
|
+
_defineProperty(Renderer, "propTypes", {
|
48
|
+
className: PropTypes.string,
|
49
|
+
nodes: PropTypes.oneOfType([PropTypes.array, PropTypes.object])
|
50
|
+
});
|
35
51
|
|
36
52
|
export { Renderer as default };
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import deprecate from 'util-deprecate';
|
2
2
|
|
3
3
|
// TODO remove in 7.0
|
4
|
-
|
4
|
+
var setClient = deprecate(function () {}, 'setClient does nothing in Ring UI 6.0 and will be removed in 7.0');
|
5
5
|
|
6
6
|
export { setClient };
|
@@ -1,20 +1,38 @@
|
|
1
|
-
import {
|
1
|
+
import { a as _inherits, b as _createClass, e as _extends, d as _objectSpread2, f as _classCallCheck, g as _callSuper, _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import 'core-js/modules/es.array.concat.js';
|
2
3
|
import React, { forwardRef, Component } from 'react';
|
3
4
|
import composeRefs from './composeRefs.js';
|
5
|
+
import 'core-js/modules/es.object.to-string.js';
|
6
|
+
import 'core-js/modules/web.dom-collections.for-each.js';
|
4
7
|
|
5
8
|
function rerenderHOC(ComposedComponent) {
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
9
|
+
var Rerenderer = /*#__PURE__*/function (_Component) {
|
10
|
+
function Rerenderer() {
|
11
|
+
var _this;
|
12
|
+
_classCallCheck(this, Rerenderer);
|
13
|
+
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
14
|
+
args[_key] = arguments[_key];
|
15
|
+
}
|
16
|
+
_this = _callSuper(this, Rerenderer, [].concat(args));
|
17
|
+
_defineProperty(_this, "state", _this.props.props);
|
18
|
+
return _this;
|
16
19
|
}
|
17
|
-
|
20
|
+
_inherits(Rerenderer, _Component);
|
21
|
+
return _createClass(Rerenderer, [{
|
22
|
+
key: "render",
|
23
|
+
value: function render() {
|
24
|
+
var _this2 = this;
|
25
|
+
var _ref = composeRefs(this.props.forwardedRef);
|
26
|
+
return /*#__PURE__*/React.createElement(ComposedComponent, _extends({}, this.state, {
|
27
|
+
ref: function ref(instance) {
|
28
|
+
return _ref(instance != null ? _objectSpread2(_objectSpread2({}, instance), {}, {
|
29
|
+
rerender: _this2.setState.bind(_this2)
|
30
|
+
}) : null);
|
31
|
+
}
|
32
|
+
}));
|
33
|
+
}
|
34
|
+
}]);
|
35
|
+
}(Component);
|
18
36
|
return /*#__PURE__*/forwardRef(function RerendererForwardRef(props, ref) {
|
19
37
|
return /*#__PURE__*/React.createElement(Rerenderer, {
|
20
38
|
props: props,
|
@@ -1,10 +1,11 @@
|
|
1
1
|
function scheduleRAF(trailingCall) {
|
2
|
-
|
3
|
-
|
4
|
-
|
2
|
+
var scheduledCb;
|
3
|
+
var RAF;
|
4
|
+
var trailingCallScheduled = false;
|
5
5
|
function doSchedule() {
|
6
|
-
RAF = window.requestAnimationFrame(()
|
7
|
-
|
6
|
+
RAF = window.requestAnimationFrame(function () {
|
7
|
+
var _scheduledCb;
|
8
|
+
(_scheduledCb = scheduledCb) === null || _scheduledCb === void 0 || _scheduledCb();
|
8
9
|
if (trailingCallScheduled) {
|
9
10
|
trailingCallScheduled = false;
|
10
11
|
doSchedule();
|
@@ -7,14 +7,36 @@ import '../popup/popup.js';
|
|
7
7
|
export { a as ThemeProvider, W as WithThemeClasses, c as applyTheme, T as default, u as useTheme, b as useThemeClasses } from '../_helpers/theme.js';
|
8
8
|
import './get-uid.js';
|
9
9
|
import 'prop-types';
|
10
|
+
import 'core-js/modules/es.array.concat.js';
|
11
|
+
import 'core-js/modules/es.object.entries.js';
|
12
|
+
import 'core-js/modules/es.object.to-string.js';
|
13
|
+
import 'core-js/modules/es.regexp.exec.js';
|
14
|
+
import 'core-js/modules/es.regexp.to-string.js';
|
15
|
+
import 'core-js/modules/es.string.replace.js';
|
16
|
+
import 'core-js/modules/web.dom-collections.for-each.js';
|
10
17
|
import './schedule-raf.js';
|
11
18
|
import './dom.js';
|
19
|
+
import 'core-js/modules/es.array.filter.js';
|
20
|
+
import 'core-js/modules/es.array.iterator.js';
|
21
|
+
import 'core-js/modules/es.object.assign.js';
|
22
|
+
import 'core-js/modules/es.set.js';
|
23
|
+
import 'core-js/modules/es.string.split.js';
|
24
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
12
25
|
import '../shortcuts/shortcuts.js';
|
26
|
+
import 'core-js/modules/es.array.map.js';
|
13
27
|
import '../shortcuts/core.js';
|
28
|
+
import 'core-js/modules/es.array.find-index.js';
|
29
|
+
import 'core-js/modules/es.array.includes.js';
|
30
|
+
import 'core-js/modules/es.array.slice.js';
|
31
|
+
import 'core-js/modules/es.array.splice.js';
|
32
|
+
import 'core-js/modules/es.string.includes.js';
|
33
|
+
import 'core-js/modules/es.string.match.js';
|
14
34
|
import 'combokeys';
|
15
35
|
import './sniffer.js';
|
16
36
|
import 'sniffr';
|
17
37
|
import './data-tests.js';
|
38
|
+
import 'core-js/modules/es.array.reduce.js';
|
18
39
|
import '../tab-trap/tab-trap.js';
|
19
40
|
import '../popup/position.js';
|
41
|
+
import 'core-js/modules/es.array.sort.js';
|
20
42
|
import '../popup/popup.consts.js';
|
@@ -1,12 +1,19 @@
|
|
1
|
-
|
1
|
+
import { k as _toConsumableArray } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import 'core-js/modules/es.array.splice.js';
|
3
|
+
import 'core-js/modules/es.object.to-string.js';
|
4
|
+
import 'core-js/modules/web.dom-collections.for-each.js';
|
5
|
+
|
6
|
+
var TWO = 2;
|
2
7
|
function trivialTemplateTag(f) {
|
3
8
|
return function (strings) {
|
4
|
-
|
9
|
+
var chunks = _toConsumableArray(strings);
|
5
10
|
// insert the interpolations where they belong to
|
6
11
|
for (var _len = arguments.length, interpolations = new Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
|
7
12
|
interpolations[_key - 1] = arguments[_key];
|
8
13
|
}
|
9
|
-
interpolations.forEach((value, i)
|
14
|
+
interpolations.forEach(function (value, i) {
|
15
|
+
return chunks.splice(TWO * i + 1, 0, value);
|
16
|
+
});
|
10
17
|
return f(chunks.join(''));
|
11
18
|
};
|
12
19
|
}
|
package/components/global/url.js
CHANGED
@@ -1,24 +1,30 @@
|
|
1
|
+
import 'core-js/modules/es.array.concat.js';
|
2
|
+
import 'core-js/modules/es.array.index-of.js';
|
3
|
+
import 'core-js/modules/es.regexp.exec.js';
|
4
|
+
import 'core-js/modules/es.string.match.js';
|
5
|
+
import 'core-js/modules/es.string.replace.js';
|
6
|
+
|
1
7
|
/**
|
2
8
|
* @description Provides a set of utilities for URL manipulation.
|
3
9
|
*/
|
4
10
|
/**
|
5
11
|
* @const {RegExp}
|
6
12
|
*/
|
7
|
-
|
13
|
+
var ORIGIN_PATTERN = /^[a-z]+:\/\/[^/]+/i;
|
8
14
|
/**
|
9
15
|
* @const {RegExp}
|
10
16
|
*/
|
11
|
-
|
17
|
+
var ABSOLUTE_URL_PATTERN = /^[a-z]+:\/\//i;
|
12
18
|
/**
|
13
19
|
* @const {RegExp}
|
14
20
|
*/
|
15
|
-
|
21
|
+
var ENDING_SLASH_PATTERN = /\/$/;
|
16
22
|
/**
|
17
23
|
* Get URI from the <base> tag
|
18
24
|
* @return {string|undefined} base URI
|
19
25
|
*/
|
20
26
|
function getBaseURI() {
|
21
|
-
|
27
|
+
var baseElement = document.getElementsByTagName('base')[0];
|
22
28
|
return baseElement ? baseElement.href : undefined;
|
23
29
|
}
|
24
30
|
/**
|
@@ -26,9 +32,9 @@ function getBaseURI() {
|
|
26
32
|
* @return {string} absolute base URI
|
27
33
|
*/
|
28
34
|
function getAbsoluteBaseURL() {
|
29
|
-
|
30
|
-
|
31
|
-
|
35
|
+
var baseUrl = getBaseURI();
|
36
|
+
var host = "".concat(window.location.protocol, "//").concat(window.location.host);
|
37
|
+
var uri;
|
32
38
|
if (baseUrl) {
|
33
39
|
uri = ABSOLUTE_URL_PATTERN.test(baseUrl) ? baseUrl : host + baseUrl;
|
34
40
|
} else {
|
@@ -42,7 +48,7 @@ function getAbsoluteBaseURL() {
|
|
42
48
|
* @returns {string|undefined} origin
|
43
49
|
*/
|
44
50
|
function getOrigin(url) {
|
45
|
-
|
51
|
+
var matches = url.match(ORIGIN_PATTERN);
|
46
52
|
if (matches) {
|
47
53
|
return matches[0];
|
48
54
|
}
|
@@ -64,9 +70,9 @@ function getAbsoluteURL() {
|
|
64
70
|
* @return {string} fixed URL
|
65
71
|
*/
|
66
72
|
function fixUrl(url) {
|
67
|
-
|
73
|
+
var baseURIGetter = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : getBaseURI;
|
68
74
|
if (url.indexOf('http://') === -1 && url.indexOf('https://') === -1 && url.indexOf('/') !== 0) {
|
69
|
-
|
75
|
+
var baseUrl = baseURIGetter();
|
70
76
|
if (baseUrl) {
|
71
77
|
return baseUrl + url;
|
72
78
|
}
|
@@ -92,14 +98,14 @@ function parseQueryString(queryString) {
|
|
92
98
|
if (queryString == null) {
|
93
99
|
return {};
|
94
100
|
}
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
101
|
+
var queryParameterPairRE = /([^&;=]+)=?([^&;]*)/g;
|
102
|
+
var FIRST_PAIR_ELEMENT = 1;
|
103
|
+
var SECOND_PAIR_ELEMENT = 2;
|
104
|
+
var urlParams = {};
|
99
105
|
function decode(s) {
|
100
106
|
return decodeURIComponent(s.replace(/\+/g, ' '));
|
101
107
|
}
|
102
|
-
|
108
|
+
var matchedQueryPair;
|
103
109
|
while ((matchedQueryPair = queryParameterPairRE.exec(queryString)) != null) {
|
104
110
|
urlParams[decode(matchedQueryPair[FIRST_PAIR_ELEMENT])] = decode(matchedQueryPair[SECOND_PAIR_ELEMENT]);
|
105
111
|
}
|
@@ -116,11 +122,11 @@ function customEncodeURIComponent(str) {
|
|
116
122
|
* @returns {string} encoded URL
|
117
123
|
*/
|
118
124
|
function encodeURL(url, params) {
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
125
|
+
var equalsSign = '=';
|
126
|
+
var firstSeparator = url.indexOf('?') === -1 ? '?' : '&';
|
127
|
+
var res = url;
|
128
|
+
var k;
|
129
|
+
var i = 0;
|
124
130
|
for (k in params) {
|
125
131
|
if (params.hasOwnProperty(k) && params[k] != null) {
|
126
132
|
res += (i++ === 0 ? firstSeparator : '&') + customEncodeURIComponent(k) + equalsSign + customEncodeURIComponent(params[k]);
|
@@ -1,18 +1,16 @@
|
|
1
1
|
import { useRef, useLayoutEffect, useCallback } from 'react';
|
2
2
|
|
3
3
|
function useEventCallback(fn) {
|
4
|
-
|
5
|
-
useLayoutEffect(()
|
4
|
+
var ref = useRef();
|
5
|
+
useLayoutEffect(function () {
|
6
6
|
ref.current = fn;
|
7
7
|
});
|
8
8
|
return useCallback(function () {
|
9
|
-
|
10
|
-
current
|
11
|
-
} = ref;
|
9
|
+
var current = ref.current;
|
12
10
|
if (current == null) {
|
13
11
|
throw new Error('callback created in useEventCallback can only be called from event handlers');
|
14
12
|
}
|
15
|
-
return current(
|
13
|
+
return current.apply(void 0, arguments);
|
16
14
|
}, []);
|
17
15
|
}
|
18
16
|
|
package/components/grid/col.js
CHANGED
@@ -1,10 +1,17 @@
|
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, j as _slicedToArray, f as _classCallCheck, g as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import 'core-js/modules/es.array.concat.js';
|
3
|
+
import 'core-js/modules/es.array.filter.js';
|
4
|
+
import 'core-js/modules/es.array.map.js';
|
5
|
+
import 'core-js/modules/es.object.entries.js';
|
6
|
+
import 'core-js/modules/es.object.to-string.js';
|
1
7
|
import React, { Component } from 'react';
|
2
8
|
import PropTypes from 'prop-types';
|
3
9
|
import classNames from 'classnames';
|
4
10
|
import { m as modules_855170c0 } from '../_helpers/grid.js';
|
5
11
|
|
6
|
-
|
7
|
-
|
12
|
+
var _excluded = ["children", "className", "reverse"];
|
13
|
+
var ModifierType = PropTypes.oneOfType([PropTypes.number, PropTypes.bool]);
|
14
|
+
var classMap = {
|
8
15
|
xs: 'col-xs',
|
9
16
|
sm: 'col-sm',
|
10
17
|
md: 'col-md',
|
@@ -20,42 +27,52 @@ const classMap = {
|
|
20
27
|
* @returns {Array} result classnames
|
21
28
|
*/
|
22
29
|
function getClassNames(props) {
|
23
|
-
return Object.entries(props).filter(_ref
|
24
|
-
|
30
|
+
return Object.entries(props).filter(function (_ref) {
|
31
|
+
var _ref2 = _slicedToArray(_ref, 1),
|
32
|
+
key = _ref2[0];
|
25
33
|
return classMap[key];
|
26
|
-
}).map(
|
27
|
-
|
28
|
-
|
34
|
+
}).map(function (_ref3) {
|
35
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
36
|
+
key = _ref4[0],
|
37
|
+
value = _ref4[1];
|
38
|
+
return modules_855170c0[Number.isInteger(value) ? "".concat(classMap[key], "-").concat(value) : classMap[key]];
|
29
39
|
});
|
30
40
|
}
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
md: ModifierType,
|
36
|
-
lg: ModifierType,
|
37
|
-
xsOffset: PropTypes.number,
|
38
|
-
smOffset: PropTypes.number,
|
39
|
-
mdOffset: PropTypes.number,
|
40
|
-
lgOffset: PropTypes.number,
|
41
|
-
reverse: PropTypes.bool,
|
42
|
-
className: PropTypes.string,
|
43
|
-
children: PropTypes.node
|
44
|
-
};
|
45
|
-
render() {
|
46
|
-
const {
|
47
|
-
children,
|
48
|
-
className,
|
49
|
-
reverse,
|
50
|
-
...restProps
|
51
|
-
} = this.props;
|
52
|
-
const classes = classNames(modules_855170c0.col, className, getClassNames(restProps), {
|
53
|
-
[modules_855170c0.reverse]: reverse
|
54
|
-
});
|
55
|
-
return /*#__PURE__*/React.createElement("div", {
|
56
|
-
className: classes
|
57
|
-
}, children);
|
41
|
+
var Col = /*#__PURE__*/function (_Component) {
|
42
|
+
function Col() {
|
43
|
+
_classCallCheck(this, Col);
|
44
|
+
return _callSuper(this, Col, arguments);
|
58
45
|
}
|
59
|
-
|
46
|
+
_inherits(Col, _Component);
|
47
|
+
return _createClass(Col, [{
|
48
|
+
key: "render",
|
49
|
+
value: function render() {
|
50
|
+
var _this$props = this.props,
|
51
|
+
children = _this$props.children,
|
52
|
+
className = _this$props.className,
|
53
|
+
reverse = _this$props.reverse,
|
54
|
+
restProps = _objectWithoutProperties(_this$props, _excluded);
|
55
|
+
var classes = classNames(modules_855170c0.col, className, getClassNames(restProps), {
|
56
|
+
[modules_855170c0.reverse]: reverse
|
57
|
+
});
|
58
|
+
return /*#__PURE__*/React.createElement("div", {
|
59
|
+
className: classes
|
60
|
+
}, children);
|
61
|
+
}
|
62
|
+
}]);
|
63
|
+
}(Component);
|
64
|
+
_defineProperty(Col, "propTypes", {
|
65
|
+
xs: ModifierType,
|
66
|
+
sm: ModifierType,
|
67
|
+
md: ModifierType,
|
68
|
+
lg: ModifierType,
|
69
|
+
xsOffset: PropTypes.number,
|
70
|
+
smOffset: PropTypes.number,
|
71
|
+
mdOffset: PropTypes.number,
|
72
|
+
lgOffset: PropTypes.number,
|
73
|
+
reverse: PropTypes.bool,
|
74
|
+
className: PropTypes.string,
|
75
|
+
children: PropTypes.node
|
76
|
+
});
|
60
77
|
|
61
78
|
export { Col as default };
|
package/components/grid/grid.js
CHANGED
@@ -1,30 +1,44 @@
|
|
1
|
-
import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, e as _extends, f as _classCallCheck, g as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
2
|
import React, { Component } from 'react';
|
3
3
|
import PropTypes from 'prop-types';
|
4
4
|
import classNames from 'classnames';
|
5
5
|
import { m as modules_855170c0 } from '../_helpers/grid.js';
|
6
6
|
export { default as Row } from './row.js';
|
7
7
|
export { default as Col } from './col.js';
|
8
|
+
import 'core-js/modules/es.array.concat.js';
|
9
|
+
import 'core-js/modules/es.array.reduce.js';
|
10
|
+
import 'core-js/modules/es.object.to-string.js';
|
11
|
+
import 'core-js/modules/es.array.filter.js';
|
12
|
+
import 'core-js/modules/es.array.map.js';
|
13
|
+
import 'core-js/modules/es.object.entries.js';
|
8
14
|
|
15
|
+
var _excluded = ["children", "className"];
|
9
16
|
/**
|
10
17
|
* @name Grid
|
11
18
|
*/
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
};
|
17
|
-
render() {
|
18
|
-
const {
|
19
|
-
children,
|
20
|
-
className,
|
21
|
-
...restProps
|
22
|
-
} = this.props;
|
23
|
-
const classes = classNames(modules_855170c0['container-fluid'], className);
|
24
|
-
return /*#__PURE__*/React.createElement("div", _extends({}, restProps, {
|
25
|
-
className: classes
|
26
|
-
}), children);
|
19
|
+
var Grid = /*#__PURE__*/function (_Component) {
|
20
|
+
function Grid() {
|
21
|
+
_classCallCheck(this, Grid);
|
22
|
+
return _callSuper(this, Grid, arguments);
|
27
23
|
}
|
28
|
-
|
24
|
+
_inherits(Grid, _Component);
|
25
|
+
return _createClass(Grid, [{
|
26
|
+
key: "render",
|
27
|
+
value: function render() {
|
28
|
+
var _this$props = this.props,
|
29
|
+
children = _this$props.children,
|
30
|
+
className = _this$props.className,
|
31
|
+
restProps = _objectWithoutProperties(_this$props, _excluded);
|
32
|
+
var classes = classNames(modules_855170c0['container-fluid'], className);
|
33
|
+
return /*#__PURE__*/React.createElement("div", _extends({}, restProps, {
|
34
|
+
className: classes
|
35
|
+
}), children);
|
36
|
+
}
|
37
|
+
}]);
|
38
|
+
}(Component);
|
39
|
+
_defineProperty(Grid, "propTypes", {
|
40
|
+
className: PropTypes.string,
|
41
|
+
children: PropTypes.node
|
42
|
+
});
|
29
43
|
|
30
44
|
export { Grid };
|