@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,57 +1,86 @@
|
|
1
|
-
import
|
1
|
+
import { _ as _defineProperty, a as _inherits, b as _createClass, c as _objectWithoutProperties, d as _objectSpread2, f as _classCallCheck, g as _callSuper } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import 'core-js/modules/es.array.map.js';
|
3
|
+
import React, { Children, cloneElement, PureComponent } from 'react';
|
2
4
|
import PropTypes from 'prop-types';
|
3
5
|
import classNames from 'classnames';
|
4
6
|
import Popup from '../popup/popup.js';
|
5
7
|
import { Directions } from '../popup/popup.consts.js';
|
8
|
+
import 'core-js/modules/es.array.concat.js';
|
9
|
+
import 'core-js/modules/es.object.entries.js';
|
10
|
+
import 'core-js/modules/es.object.to-string.js';
|
11
|
+
import 'core-js/modules/es.regexp.exec.js';
|
12
|
+
import 'core-js/modules/es.regexp.to-string.js';
|
13
|
+
import 'core-js/modules/es.string.replace.js';
|
14
|
+
import 'core-js/modules/web.dom-collections.for-each.js';
|
6
15
|
import 'react-dom';
|
7
16
|
import '../global/get-uid.js';
|
8
17
|
import '../global/schedule-raf.js';
|
9
18
|
import '../global/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';
|
10
25
|
import '../shortcuts/shortcuts.js';
|
11
26
|
import '../shortcuts/core.js';
|
27
|
+
import 'core-js/modules/es.array.find-index.js';
|
28
|
+
import 'core-js/modules/es.array.includes.js';
|
29
|
+
import 'core-js/modules/es.array.slice.js';
|
30
|
+
import 'core-js/modules/es.array.splice.js';
|
31
|
+
import 'core-js/modules/es.string.includes.js';
|
32
|
+
import 'core-js/modules/es.string.match.js';
|
12
33
|
import 'combokeys';
|
13
34
|
import '../global/sniffer.js';
|
14
35
|
import 'sniffr';
|
15
36
|
import '../global/data-tests.js';
|
37
|
+
import 'core-js/modules/es.array.reduce.js';
|
16
38
|
import '../tab-trap/tab-trap.js';
|
17
|
-
import '../_helpers/_rollupPluginBabelHelpers.js';
|
18
39
|
import '../popup/position.js';
|
40
|
+
import 'core-js/modules/es.array.sort.js';
|
19
41
|
import '../popup/popup.target.js';
|
20
42
|
|
21
43
|
var modules_ee284100 = {"light":"light_rui_2ac4","errorBubblePopup":"errorBubblePopup_rui_7233","errorBubbleWrapper":"errorBubbleWrapper_rui_7233","errorBubble":"errorBubble_rui_7233"};
|
22
44
|
|
45
|
+
var _excluded = ["children", "className"];
|
23
46
|
/**
|
24
47
|
* @name Error Bubble
|
25
48
|
*/
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
children: PropTypes.node
|
31
|
-
};
|
32
|
-
render() {
|
33
|
-
const {
|
34
|
-
children,
|
35
|
-
className,
|
36
|
-
...restProps
|
37
|
-
} = this.props;
|
38
|
-
const errorBubbleClasses = classNames(modules_ee284100.errorBubble, className);
|
39
|
-
return /*#__PURE__*/React.createElement("div", {
|
40
|
-
className: modules_ee284100.errorBubbleWrapper
|
41
|
-
}, Children.map(children, child => /*#__PURE__*/cloneElement(child, {
|
42
|
-
...child.props,
|
43
|
-
...restProps
|
44
|
-
})), restProps.error && /*#__PURE__*/React.createElement(Popup, {
|
45
|
-
trapFocus: false,
|
46
|
-
className: modules_ee284100.errorBubblePopup,
|
47
|
-
hidden: false,
|
48
|
-
attached: false,
|
49
|
-
directions: [Directions.RIGHT_CENTER, Directions.RIGHT_BOTTOM, Directions.RIGHT_TOP]
|
50
|
-
}, /*#__PURE__*/React.createElement("div", {
|
51
|
-
className: errorBubbleClasses,
|
52
|
-
"data-test": "ring-error-bubble"
|
53
|
-
}, restProps.error)));
|
49
|
+
var ErrorBubble = /*#__PURE__*/function (_PureComponent) {
|
50
|
+
function ErrorBubble() {
|
51
|
+
_classCallCheck(this, ErrorBubble);
|
52
|
+
return _callSuper(this, ErrorBubble, arguments);
|
54
53
|
}
|
55
|
-
|
54
|
+
_inherits(ErrorBubble, _PureComponent);
|
55
|
+
return _createClass(ErrorBubble, [{
|
56
|
+
key: "render",
|
57
|
+
value: function render() {
|
58
|
+
var _this$props = this.props,
|
59
|
+
children = _this$props.children,
|
60
|
+
className = _this$props.className,
|
61
|
+
restProps = _objectWithoutProperties(_this$props, _excluded);
|
62
|
+
var errorBubbleClasses = classNames(modules_ee284100.errorBubble, className);
|
63
|
+
return /*#__PURE__*/React.createElement("div", {
|
64
|
+
className: modules_ee284100.errorBubbleWrapper
|
65
|
+
}, Children.map(children, function (child) {
|
66
|
+
return /*#__PURE__*/cloneElement(child, _objectSpread2(_objectSpread2({}, child.props), restProps));
|
67
|
+
}), restProps.error && /*#__PURE__*/React.createElement(Popup, {
|
68
|
+
trapFocus: false,
|
69
|
+
className: modules_ee284100.errorBubblePopup,
|
70
|
+
hidden: false,
|
71
|
+
attached: false,
|
72
|
+
directions: [Directions.RIGHT_CENTER, Directions.RIGHT_BOTTOM, Directions.RIGHT_TOP]
|
73
|
+
}, /*#__PURE__*/React.createElement("div", {
|
74
|
+
className: errorBubbleClasses,
|
75
|
+
"data-test": "ring-error-bubble"
|
76
|
+
}, restProps.error)));
|
77
|
+
}
|
78
|
+
}]);
|
79
|
+
}(PureComponent);
|
80
|
+
_defineProperty(ErrorBubble, "propTypes", {
|
81
|
+
error: PropTypes.string,
|
82
|
+
className: PropTypes.string,
|
83
|
+
children: PropTypes.node
|
84
|
+
});
|
56
85
|
|
57
86
|
export { ErrorBubble as default };
|
@@ -1,57 +1,77 @@
|
|
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.symbol.js';
|
3
|
+
import 'core-js/modules/es.symbol.description.js';
|
1
4
|
import React, { Component } from 'react';
|
2
5
|
import PropTypes from 'prop-types';
|
3
6
|
import classNames from 'classnames';
|
4
7
|
import Icon from '../icon/icon.js';
|
5
8
|
import { Size } from '../icon/icon__constants.js';
|
6
9
|
import joinDataTestAttributes from '../global/data-tests.js';
|
7
|
-
import '../_helpers/_rollupPluginBabelHelpers.js';
|
8
10
|
import 'util-deprecate';
|
9
11
|
import '../_helpers/icon__svg.js';
|
12
|
+
import 'core-js/modules/es.regexp.exec.js';
|
13
|
+
import 'core-js/modules/es.string.replace.js';
|
14
|
+
import 'core-js/modules/es.string.starts-with.js';
|
10
15
|
import '../global/memoize.js';
|
16
|
+
import 'core-js/modules/es.array.iterator.js';
|
17
|
+
import 'core-js/modules/es.map.js';
|
18
|
+
import 'core-js/modules/es.object.to-string.js';
|
19
|
+
import 'core-js/modules/es.weak-map.js';
|
20
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
21
|
+
import 'core-js/modules/es.array.concat.js';
|
22
|
+
import 'core-js/modules/es.array.reduce.js';
|
23
|
+
import 'core-js/modules/es.object.entries.js';
|
11
24
|
|
12
25
|
var modules_2c5e8509 = {"light":"light_rui_2ac4","errorMessage":"errorMessage_rui_94a5","title":"title_rui_94a5","description":"description_rui_94a5","content":"content_rui_94a5","icon":"icon_rui_94a5"};
|
13
26
|
|
14
27
|
/**
|
15
28
|
* @name Error Message
|
16
29
|
*/
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
message: PropTypes.string,
|
22
|
-
description: PropTypes.string,
|
23
|
-
children: PropTypes.node,
|
24
|
-
className: PropTypes.string,
|
25
|
-
'data-test': PropTypes.string
|
26
|
-
};
|
27
|
-
render() {
|
28
|
-
const {
|
29
|
-
className,
|
30
|
-
icon,
|
31
|
-
code,
|
32
|
-
message,
|
33
|
-
description,
|
34
|
-
children,
|
35
|
-
'data-test': dataTest
|
36
|
-
} = this.props;
|
37
|
-
const classes = classNames(modules_2c5e8509.errorMessage, className);
|
38
|
-
return /*#__PURE__*/React.createElement("div", {
|
39
|
-
className: classes,
|
40
|
-
"data-test": joinDataTestAttributes('ring-error-message', dataTest)
|
41
|
-
}, icon && /*#__PURE__*/React.createElement(Icon, {
|
42
|
-
className: modules_2c5e8509.icon,
|
43
|
-
glyph: icon,
|
44
|
-
size: Size.Size64,
|
45
|
-
suppressSizeWarning: true
|
46
|
-
}), /*#__PURE__*/React.createElement("div", {
|
47
|
-
className: modules_2c5e8509.content
|
48
|
-
}, /*#__PURE__*/React.createElement("div", {
|
49
|
-
className: modules_2c5e8509.title,
|
50
|
-
"data-test": "ring-error-message-title"
|
51
|
-
}, code && `${code}:`, " ", message), description && /*#__PURE__*/React.createElement("div", {
|
52
|
-
className: modules_2c5e8509.description
|
53
|
-
}, description), children));
|
30
|
+
var ErrorMessage = /*#__PURE__*/function (_Component) {
|
31
|
+
function ErrorMessage() {
|
32
|
+
_classCallCheck(this, ErrorMessage);
|
33
|
+
return _callSuper(this, ErrorMessage, arguments);
|
54
34
|
}
|
55
|
-
|
35
|
+
_inherits(ErrorMessage, _Component);
|
36
|
+
return _createClass(ErrorMessage, [{
|
37
|
+
key: "render",
|
38
|
+
value: function render() {
|
39
|
+
var _this$props = this.props,
|
40
|
+
className = _this$props.className,
|
41
|
+
icon = _this$props.icon,
|
42
|
+
code = _this$props.code,
|
43
|
+
message = _this$props.message,
|
44
|
+
description = _this$props.description,
|
45
|
+
children = _this$props.children,
|
46
|
+
dataTest = _this$props['data-test'];
|
47
|
+
var classes = classNames(modules_2c5e8509.errorMessage, className);
|
48
|
+
return /*#__PURE__*/React.createElement("div", {
|
49
|
+
className: classes,
|
50
|
+
"data-test": joinDataTestAttributes('ring-error-message', dataTest)
|
51
|
+
}, icon && /*#__PURE__*/React.createElement(Icon, {
|
52
|
+
className: modules_2c5e8509.icon,
|
53
|
+
glyph: icon,
|
54
|
+
size: Size.Size64,
|
55
|
+
suppressSizeWarning: true
|
56
|
+
}), /*#__PURE__*/React.createElement("div", {
|
57
|
+
className: modules_2c5e8509.content
|
58
|
+
}, /*#__PURE__*/React.createElement("div", {
|
59
|
+
className: modules_2c5e8509.title,
|
60
|
+
"data-test": "ring-error-message-title"
|
61
|
+
}, code && "".concat(code, ":"), " ", message), description && /*#__PURE__*/React.createElement("div", {
|
62
|
+
className: modules_2c5e8509.description
|
63
|
+
}, description), children));
|
64
|
+
}
|
65
|
+
}]);
|
66
|
+
}(Component);
|
67
|
+
_defineProperty(ErrorMessage, "propTypes", {
|
68
|
+
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
|
69
|
+
code: PropTypes.string,
|
70
|
+
message: PropTypes.string,
|
71
|
+
description: PropTypes.string,
|
72
|
+
children: PropTypes.node,
|
73
|
+
className: PropTypes.string,
|
74
|
+
'data-test': PropTypes.string
|
75
|
+
});
|
56
76
|
|
57
77
|
export { ErrorMessage as default };
|
@@ -1,20 +1,23 @@
|
|
1
|
+
import 'core-js/modules/es.array.map.js';
|
1
2
|
import React, { memo, isValidElement } from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
import classNames from 'classnames';
|
4
5
|
import Link from '../link/link.js';
|
5
6
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
6
7
|
import '../global/data-tests.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.entries.js';
|
11
|
+
import 'core-js/modules/es.object.to-string.js';
|
7
12
|
import '../link/clickableLink.js';
|
8
13
|
import '../_helpers/link.js';
|
9
14
|
|
10
15
|
var modules_7385b3fd = {"light":"light_rui_2ac4","footer":"footer_rui_b622 font_rui_f295","footerFloating":"footerFloating_rui_b622 footer_rui_b622 font_rui_f295","column":"column_rui_b622","columnItem":"columnItem_rui_b622","columnLeft":"columnLeft_rui_b622 column_rui_b622","columnCenter":"columnCenter_rui_b622 column_rui_b622","line":"line_rui_b622","columnRight":"columnRight_rui_b622 column_rui_b622","lineCenter":"lineCenter_rui_b622"};
|
11
16
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
} = _ref;
|
17
|
-
const classes = classNames({
|
17
|
+
var FooterColumn = /*#__PURE__*/memo(function FooterColumn(_ref) {
|
18
|
+
var position = _ref.position,
|
19
|
+
children = _ref.children;
|
20
|
+
var classes = classNames({
|
18
21
|
[modules_7385b3fd.columnLeft]: position === 'left',
|
19
22
|
[modules_7385b3fd.columnCenter]: position === 'center',
|
20
23
|
[modules_7385b3fd.columnRight]: position === 'right'
|
@@ -35,9 +38,9 @@ FooterColumn.propTypes = {
|
|
35
38
|
* @returns {string}
|
36
39
|
*/
|
37
40
|
function copyright(year) {
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
+
var currentYear = new Date().getUTCFullYear();
|
42
|
+
var ndash = '–';
|
43
|
+
var ret = 'Copyright © ';
|
41
44
|
if (year >= currentYear) {
|
42
45
|
ret += year;
|
43
46
|
} else {
|
@@ -49,14 +52,14 @@ function copyright(year) {
|
|
49
52
|
* @constructor
|
50
53
|
* @extends {ReactComponent}
|
51
54
|
*/
|
52
|
-
|
53
|
-
|
55
|
+
var FooterLine = /*#__PURE__*/memo(function FooterLine(props) {
|
56
|
+
var items = Array.isArray(props.item) ? props.item : [props.item];
|
54
57
|
function renderItem(item) {
|
55
58
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
56
59
|
if ( /*#__PURE__*/isValidElement(item) || typeof item !== 'object') {
|
57
60
|
return item;
|
58
61
|
}
|
59
|
-
|
62
|
+
var element = (item.copyright ? copyright(item.copyright) : '') + (item.label || item);
|
60
63
|
if (item.url) {
|
61
64
|
return /*#__PURE__*/React.createElement(Link, {
|
62
65
|
href: item.url,
|
@@ -74,14 +77,12 @@ const FooterLine = /*#__PURE__*/memo(function FooterLine(props) {
|
|
74
77
|
FooterLine.propTypes = {
|
75
78
|
item: PropTypes.oneOfType([PropTypes.object, PropTypes.array, PropTypes.string])
|
76
79
|
};
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
right
|
84
|
-
} = _ref2;
|
80
|
+
var Footer = /*#__PURE__*/memo(function Footer(_ref2) {
|
81
|
+
var floating = _ref2.floating,
|
82
|
+
className = _ref2.className,
|
83
|
+
left = _ref2.left,
|
84
|
+
center = _ref2.center,
|
85
|
+
right = _ref2.right;
|
85
86
|
function content(elements, position) {
|
86
87
|
if (!elements) {
|
87
88
|
return false;
|
@@ -89,14 +90,16 @@ const Footer = /*#__PURE__*/memo(function Footer(_ref2) {
|
|
89
90
|
return /*#__PURE__*/React.createElement(FooterColumn, {
|
90
91
|
key: position,
|
91
92
|
position: position
|
92
|
-
}, elements.map((item, idx)
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
93
|
+
}, elements.map(function (item, idx) {
|
94
|
+
return /*#__PURE__*/React.createElement(FooterLine
|
95
|
+
// eslint-disable-next-line react/no-array-index-key
|
96
|
+
, {
|
97
|
+
key: idx,
|
98
|
+
item: item
|
99
|
+
});
|
100
|
+
}));
|
98
101
|
}
|
99
|
-
|
102
|
+
var classes = classNames(modules_7385b3fd.footer, className, {
|
100
103
|
[modules_7385b3fd.footerFloating]: floating
|
101
104
|
});
|
102
105
|
return /*#__PURE__*/React.createElement("footer", {
|
@@ -1,8 +1,17 @@
|
|
1
|
+
import 'core-js/modules/es.array.reduce.js';
|
2
|
+
import 'core-js/modules/es.object.to-string.js';
|
3
|
+
|
1
4
|
function compose() {
|
2
5
|
for (var _len = arguments.length, funcs = new Array(_len), _key = 0; _key < _len; _key++) {
|
3
6
|
funcs[_key] = arguments[_key];
|
4
7
|
}
|
5
|
-
return funcs.reduce((acc, func)
|
8
|
+
return funcs.reduce(function (acc, func) {
|
9
|
+
return function (arg) {
|
10
|
+
return acc(func(arg));
|
11
|
+
};
|
12
|
+
}, function (arg) {
|
13
|
+
return arg;
|
14
|
+
});
|
6
15
|
}
|
7
16
|
|
8
17
|
export { compose as default };
|
@@ -1,14 +1,19 @@
|
|
1
|
+
import 'core-js/modules/es.object.to-string.js';
|
2
|
+
import 'core-js/modules/web.dom-collections.for-each.js';
|
3
|
+
|
1
4
|
var composeRefs = (function () {
|
2
5
|
for (var _len = arguments.length, refs = new Array(_len), _key = 0; _key < _len; _key++) {
|
3
6
|
refs[_key] = arguments[_key];
|
4
7
|
}
|
5
|
-
return
|
6
|
-
|
7
|
-
ref
|
8
|
-
|
9
|
-
ref
|
10
|
-
|
11
|
-
|
8
|
+
return function (value) {
|
9
|
+
return refs.forEach(function (ref) {
|
10
|
+
if (typeof ref === 'function') {
|
11
|
+
ref(value);
|
12
|
+
} else if (ref != null) {
|
13
|
+
ref.current = value;
|
14
|
+
}
|
15
|
+
});
|
16
|
+
};
|
12
17
|
});
|
13
18
|
|
14
19
|
export { composeRefs as default };
|
@@ -6,8 +6,8 @@ var ControlsHeight;
|
|
6
6
|
ControlsHeight["M"] = "M";
|
7
7
|
ControlsHeight["L"] = "L";
|
8
8
|
})(ControlsHeight || (ControlsHeight = {}));
|
9
|
-
|
10
|
-
|
9
|
+
var ControlsHeightContext = /*#__PURE__*/createContext(ControlsHeight.M);
|
10
|
+
var globalControlsHeight = ControlsHeight.M;
|
11
11
|
// This can be used if React Context is not applicable, for example for alertService or Auth dialog
|
12
12
|
function configureGlobalControlsHeight(value) {
|
13
13
|
globalControlsHeight = value;
|
@@ -1,15 +1,17 @@
|
|
1
|
+
import { j as _slicedToArray } from '../_helpers/_rollupPluginBabelHelpers.js';
|
1
2
|
import React, { memo, createContext, useState, useContext, useEffect } from 'react';
|
2
3
|
import PropTypes from 'prop-types';
|
3
4
|
|
4
5
|
function createStatefulContext(initialValue) {
|
5
|
-
|
6
|
-
|
7
|
-
|
6
|
+
var name = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
7
|
+
var ValueContext = /*#__PURE__*/createContext(initialValue);
|
8
|
+
var UpdateContext = /*#__PURE__*/createContext(function () {});
|
8
9
|
function Provider(_ref) {
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
var children = _ref.children;
|
11
|
+
var _useState = useState(initialValue),
|
12
|
+
_useState2 = _slicedToArray(_useState, 2),
|
13
|
+
value = _useState2[0],
|
14
|
+
update = _useState2[1];
|
13
15
|
return /*#__PURE__*/React.createElement(ValueContext.Provider, {
|
14
16
|
value: value
|
15
17
|
}, /*#__PURE__*/React.createElement(UpdateContext.Provider, {
|
@@ -19,24 +21,22 @@ function createStatefulContext(initialValue) {
|
|
19
21
|
Provider.propTypes = {
|
20
22
|
children: PropTypes.node
|
21
23
|
};
|
22
|
-
Provider.displayName =
|
24
|
+
Provider.displayName = "".concat(name, "Provider");
|
23
25
|
function useUpdate(value, skipUpdate) {
|
24
|
-
|
25
|
-
useEffect(()
|
26
|
+
var update = useContext(UpdateContext);
|
27
|
+
useEffect(function () {
|
26
28
|
if (!skipUpdate) {
|
27
29
|
update(value);
|
28
30
|
}
|
29
31
|
}, [update, value, skipUpdate]);
|
30
32
|
}
|
31
33
|
function Updater(_ref2) {
|
32
|
-
|
33
|
-
|
34
|
-
skipUpdate
|
35
|
-
} = _ref2;
|
34
|
+
var value = _ref2.value,
|
35
|
+
skipUpdate = _ref2.skipUpdate;
|
36
36
|
useUpdate(value, skipUpdate);
|
37
37
|
return null;
|
38
38
|
}
|
39
|
-
Updater.displayName =
|
39
|
+
Updater.displayName = "".concat(name, "Updater");
|
40
40
|
return {
|
41
41
|
ValueContext,
|
42
42
|
UpdateContext,
|
@@ -1,21 +1,29 @@
|
|
1
|
+
import { k as _toConsumableArray, j as _slicedToArray } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import 'core-js/modules/es.array.concat.js';
|
3
|
+
import 'core-js/modules/es.array.reduce.js';
|
4
|
+
import 'core-js/modules/es.object.entries.js';
|
5
|
+
import 'core-js/modules/es.object.to-string.js';
|
6
|
+
|
1
7
|
function expandMap(attrsMap) {
|
2
|
-
return Object.entries(attrsMap).reduce((result, _ref)
|
3
|
-
|
4
|
-
|
8
|
+
return Object.entries(attrsMap).reduce(function (result, _ref) {
|
9
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
10
|
+
key = _ref2[0],
|
11
|
+
value = _ref2[1];
|
12
|
+
return value ? [].concat(_toConsumableArray(result), [key]) : result;
|
5
13
|
}, []);
|
6
14
|
}
|
7
15
|
function joinDataTestAttributes() {
|
8
16
|
for (var _len = arguments.length, attrs = new Array(_len), _key = 0; _key < _len; _key++) {
|
9
17
|
attrs[_key] = arguments[_key];
|
10
18
|
}
|
11
|
-
return attrs.reduce((result, attr)
|
19
|
+
return attrs.reduce(function (result, attr) {
|
12
20
|
if (!attr) {
|
13
21
|
return result;
|
14
22
|
}
|
15
23
|
if (typeof attr === 'object') {
|
16
|
-
return [
|
24
|
+
return [].concat(_toConsumableArray(result), _toConsumableArray(expandMap(attr)));
|
17
25
|
}
|
18
|
-
return [
|
26
|
+
return [].concat(_toConsumableArray(result), [attr]);
|
19
27
|
}, []).join(' ');
|
20
28
|
}
|
21
29
|
|
package/components/global/dom.js
CHANGED
@@ -1,14 +1,26 @@
|
|
1
|
+
import { j as _slicedToArray, b as _createClass, f as _classCallCheck, _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
2
|
+
import 'core-js/modules/es.array.filter.js';
|
3
|
+
import 'core-js/modules/es.array.iterator.js';
|
4
|
+
import 'core-js/modules/es.object.assign.js';
|
5
|
+
import 'core-js/modules/es.object.entries.js';
|
6
|
+
import 'core-js/modules/es.object.to-string.js';
|
7
|
+
import 'core-js/modules/es.regexp.exec.js';
|
8
|
+
import 'core-js/modules/es.set.js';
|
9
|
+
import 'core-js/modules/es.string.split.js';
|
10
|
+
import 'core-js/modules/web.dom-collections.for-each.js';
|
11
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
12
|
+
|
1
13
|
/**
|
2
14
|
* @name DOM
|
3
15
|
*/
|
4
|
-
|
16
|
+
var getStyles = window.getComputedStyle.bind(window);
|
5
17
|
function isMounted(node) {
|
6
18
|
if (node === document) {
|
7
19
|
return true;
|
8
20
|
}
|
9
21
|
return node instanceof Node && document.documentElement.contains(node.parentNode);
|
10
22
|
}
|
11
|
-
|
23
|
+
var rectStub = {
|
12
24
|
top: 0,
|
13
25
|
right: 0,
|
14
26
|
bottom: 0,
|
@@ -18,14 +30,13 @@ const rectStub = {
|
|
18
30
|
};
|
19
31
|
function getRect(node) {
|
20
32
|
if (node instanceof Range || node != null && isMounted(node)) {
|
21
|
-
|
22
|
-
top,
|
23
|
-
right,
|
24
|
-
bottom,
|
25
|
-
left,
|
26
|
-
width,
|
27
|
-
height
|
28
|
-
} = node.getBoundingClientRect();
|
33
|
+
var _node$getBoundingClie = node.getBoundingClientRect(),
|
34
|
+
top = _node$getBoundingClie.top,
|
35
|
+
right = _node$getBoundingClie.right,
|
36
|
+
bottom = _node$getBoundingClie.bottom,
|
37
|
+
left = _node$getBoundingClie.left,
|
38
|
+
width = _node$getBoundingClie.width,
|
39
|
+
height = _node$getBoundingClie.height;
|
29
40
|
return {
|
30
41
|
top,
|
31
42
|
right,
|
@@ -48,12 +59,11 @@ function getWindowWidth() {
|
|
48
59
|
return window.innerWidth;
|
49
60
|
}
|
50
61
|
function isNodeInVisiblePartOfPage(node) {
|
51
|
-
|
52
|
-
top,
|
53
|
-
bottom,
|
54
|
-
left,
|
55
|
-
right
|
56
|
-
} = getRect(node);
|
62
|
+
var _getRect = getRect(node),
|
63
|
+
top = _getRect.top,
|
64
|
+
bottom = _getRect.bottom,
|
65
|
+
left = _getRect.left,
|
66
|
+
right = _getRect.right;
|
57
67
|
return !(bottom < 0 || right < 0 || getWindowHeight() - top < 0 || getWindowWidth() - left < 0);
|
58
68
|
}
|
59
69
|
function getDocumentScrollTop() {
|
@@ -62,45 +72,74 @@ function getDocumentScrollTop() {
|
|
62
72
|
function getDocumentScrollLeft() {
|
63
73
|
return document.documentElement && document.documentElement.scrollLeft || document.body.scrollLeft;
|
64
74
|
}
|
65
|
-
|
66
|
-
|
67
|
-
|
75
|
+
var applyMethodToClasses = function applyMethodToClasses(method) {
|
76
|
+
return function (classList) {
|
77
|
+
var classes = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
|
78
|
+
classes.split(/\s+/g).filter(function (className) {
|
79
|
+
return !!className;
|
80
|
+
}).forEach(function (className) {
|
81
|
+
return classList[method](className);
|
82
|
+
});
|
83
|
+
};
|
84
|
+
};
|
85
|
+
var addClasses = applyMethodToClasses('add');
|
86
|
+
var removeClasses = applyMethodToClasses('remove');
|
87
|
+
var toggleClasses = function toggleClasses(classList, classes) {
|
88
|
+
return Object.entries(classes).forEach(function (_ref) {
|
89
|
+
var _ref2 = _slicedToArray(_ref, 2),
|
90
|
+
className = _ref2[0],
|
91
|
+
on = _ref2[1];
|
92
|
+
return classList.toggle(className, on);
|
93
|
+
});
|
68
94
|
};
|
69
|
-
const addClasses = applyMethodToClasses('add');
|
70
|
-
const removeClasses = applyMethodToClasses('remove');
|
71
|
-
const toggleClasses = (classList, classes) => Object.entries(classes).forEach(_ref => {
|
72
|
-
let [className, on] = _ref;
|
73
|
-
return classList.toggle(className, on);
|
74
|
-
});
|
75
95
|
function setRootStyleProperties() {
|
76
|
-
|
77
|
-
|
78
|
-
Object.entries(properties).forEach(
|
79
|
-
|
96
|
+
var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
97
|
+
var rootStyle = document.documentElement.style;
|
98
|
+
Object.entries(properties).forEach(function (_ref3) {
|
99
|
+
var _ref4 = _slicedToArray(_ref3, 2),
|
100
|
+
key = _ref4[0],
|
101
|
+
value = _ref4[1];
|
80
102
|
rootStyle.setProperty(key, value);
|
81
103
|
});
|
82
104
|
}
|
83
105
|
function resetRootStyleProperties() {
|
84
|
-
|
85
|
-
|
86
|
-
Object.keys(properties).forEach(
|
106
|
+
var properties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
107
|
+
var rootStyle = document.documentElement.style;
|
108
|
+
Object.keys(properties).forEach(function (key) {
|
109
|
+
return rootStyle.removeProperty(key);
|
110
|
+
});
|
87
111
|
}
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
const dispatchFn = () => el.removeEventListener(event, handler, options);
|
93
|
-
this._all.add(dispatchFn);
|
94
|
-
return dispatchFn;
|
112
|
+
var Listeners = /*#__PURE__*/function () {
|
113
|
+
function Listeners() {
|
114
|
+
_classCallCheck(this, Listeners);
|
115
|
+
_defineProperty(this, "_all", new Set());
|
95
116
|
}
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
117
|
+
return _createClass(Listeners, [{
|
118
|
+
key: "add",
|
119
|
+
value: function add(el, event, handler, options) {
|
120
|
+
el.addEventListener(event, handler, options);
|
121
|
+
var dispatchFn = function dispatchFn() {
|
122
|
+
return el.removeEventListener(event, handler, options);
|
123
|
+
};
|
124
|
+
this._all.add(dispatchFn);
|
125
|
+
return dispatchFn;
|
126
|
+
}
|
127
|
+
}, {
|
128
|
+
key: "remove",
|
129
|
+
value: function remove(fn) {
|
130
|
+
fn();
|
131
|
+
this._all.delete(fn);
|
132
|
+
}
|
133
|
+
}, {
|
134
|
+
key: "removeAll",
|
135
|
+
value: function removeAll() {
|
136
|
+
var _this = this;
|
137
|
+
this._all.forEach(function (fn) {
|
138
|
+
return _this.remove(fn);
|
139
|
+
});
|
140
|
+
}
|
141
|
+
}]);
|
142
|
+
}();
|
104
143
|
// Synthetic events from Combokeys#trigger are plain objects
|
105
144
|
function preventDefault(e) {
|
106
145
|
if (e.preventDefault) {
|