@jetbrains/ring-ui-built 7.0.0-beta.1 → 7.0.0-beta.10
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 +1 -504
- package/components/_helpers/anchor.js +7 -10
- package/components/_helpers/button__classes.js +23 -20
- package/components/_helpers/caption.js +11 -21
- package/components/_helpers/card.js +91 -123
- package/components/_helpers/dialog__body-scroll-preventer.js +10 -17
- package/components/_helpers/header.js +1 -1
- package/components/_helpers/icon__svg.js +27 -29
- package/components/_helpers/input.js +151 -193
- package/components/_helpers/query-assist__suggestions.js +79 -94
- package/components/_helpers/select__filter.js +56 -75
- package/components/_helpers/services-link.js +23 -39
- package/components/_helpers/sidebar.js +91 -102
- package/components/_helpers/tab-link.js +8 -12
- package/components/_helpers/theme.js +61 -51
- package/components/_helpers/title.js +59 -84
- package/components/alert/alert.d.ts +7 -24
- package/components/alert/alert.js +111 -179
- package/components/alert/container.d.ts +0 -5
- package/components/alert/container.js +32 -44
- package/components/alert-service/alert-service.js +104 -162
- package/components/analytics/analytics.js +12 -20
- package/components/analytics/analytics__custom-plugin.js +52 -68
- package/components/auth/auth.js +2 -31
- package/components/auth/auth__core.d.ts +4 -4
- package/components/auth/auth__core.js +755 -1433
- package/components/auth/background-flow.js +84 -121
- package/components/auth/down-notification.js +32 -79
- package/components/auth/iframe-flow.js +71 -125
- package/components/auth/request-builder.js +46 -77
- package/components/auth/response-parser.js +84 -112
- package/components/auth/storage.js +162 -324
- package/components/auth/token-validator.js +132 -227
- package/components/auth/window-flow.js +84 -121
- package/components/auth-dialog/auth-dialog.d.ts +0 -18
- package/components/auth-dialog/auth-dialog.js +107 -176
- package/components/auth-dialog-service/auth-dialog-service.js +12 -33
- package/components/avatar/avatar-example-datauri.js +1 -1
- package/components/avatar/avatar.d.ts +0 -13
- package/components/avatar/avatar.js +94 -136
- package/components/avatar/fallback-avatar.d.ts +1 -10
- package/components/avatar/fallback-avatar.js +20 -40
- package/components/badge/badge.d.ts +0 -10
- package/components/badge/badge.js +32 -48
- package/components/breadcrumbs/breadcrumbs.js +13 -17
- package/components/button/button.d.ts +0 -21
- package/components/button/button.js +68 -104
- package/components/button/button__classes.d.ts +1 -1
- package/components/button-group/button-group.d.ts +0 -5
- package/components/button-group/button-group.js +27 -41
- package/components/button-group/caption.d.ts +0 -4
- package/components/button-group/caption.js +0 -1
- package/components/button-set/button-set.d.ts +0 -6
- package/components/button-set/button-set.js +19 -33
- package/components/button-toolbar/button-toolbar.d.ts +0 -6
- package/components/button-toolbar/button-toolbar.js +17 -31
- package/components/caret/caret.js +184 -211
- package/components/checkbox/checkbox.d.ts +0 -19
- package/components/checkbox/checkbox.js +69 -104
- package/components/clipboard/clipboard-fallback.js +7 -7
- package/components/clipboard/clipboard.js +36 -129
- package/components/code/code.d.ts +0 -12
- package/components/code/code.js +83 -163
- package/components/collapse/collapse-content.js +42 -60
- package/components/collapse/collapse-context.js +2 -2
- package/components/collapse/collapse-control.js +12 -12
- package/components/collapse/collapse.js +12 -17
- package/components/collapse/consts.js +4 -4
- package/components/collapse/utils.js +1 -3
- package/components/confirm/confirm.d.ts +0 -14
- package/components/confirm/confirm.js +68 -112
- package/components/confirm-service/confirm-service.js +25 -47
- package/components/content-layout/content-layout.d.ts +0 -7
- package/components/content-layout/content-layout.js +41 -63
- package/components/content-layout/sidebar.d.ts +0 -9
- package/components/content-layout/sidebar.js +1 -2
- package/components/contenteditable/contenteditable.d.ts +1 -22
- package/components/contenteditable/contenteditable.js +37 -60
- package/components/control-help/control-help.js +5 -3
- package/components/control-label/control-label.js +9 -14
- package/components/data-list/data-list.d.ts +0 -2
- package/components/data-list/data-list.js +115 -179
- package/components/data-list/data-list.mock.js +3 -6
- package/components/data-list/item.js +119 -165
- package/components/data-list/selection.js +77 -135
- package/components/data-list/title.d.ts +2 -2
- package/components/data-list/title.js +2 -12
- package/components/date-picker/consts.d.ts +0 -2
- package/components/date-picker/consts.js +16 -24
- package/components/date-picker/date-input.d.ts +0 -20
- package/components/date-picker/date-input.js +100 -148
- package/components/date-picker/date-picker.d.ts +0 -29
- package/components/date-picker/date-picker.js +143 -224
- package/components/date-picker/date-popup.d.ts +0 -22
- package/components/date-picker/date-popup.js +282 -352
- package/components/date-picker/day.d.ts +0 -14
- package/components/date-picker/day.js +72 -109
- package/components/date-picker/month-names.d.ts +1 -11
- package/components/date-picker/month-names.js +42 -72
- package/components/date-picker/month-slider.d.ts +0 -9
- package/components/date-picker/month-slider.js +43 -71
- package/components/date-picker/month.d.ts +1 -9
- package/components/date-picker/month.js +18 -30
- package/components/date-picker/months.d.ts +1 -9
- package/components/date-picker/months.js +45 -55
- package/components/date-picker/weekdays.d.ts +2 -8
- package/components/date-picker/weekdays.js +12 -25
- package/components/date-picker/years.d.ts +0 -6
- package/components/date-picker/years.js +77 -104
- package/components/dialog/dialog.d.ts +0 -20
- package/components/dialog/dialog.js +153 -211
- package/components/dialog/dialog__body-scroll-preventer.js +0 -3
- package/components/dropdown/anchor.d.ts +1 -8
- package/components/dropdown/anchor.js +0 -7
- package/components/dropdown/dropdown.d.ts +4 -22
- package/components/dropdown/dropdown.js +134 -176
- package/components/dropdown-menu/dropdown-menu.js +51 -103
- package/components/editable-heading/editable-heading.js +69 -118
- package/components/error-bubble/error-bubble.d.ts +0 -6
- package/components/error-bubble/error-bubble.js +30 -60
- package/components/error-message/error-message.d.ts +0 -10
- package/components/error-message/error-message.js +34 -59
- package/components/footer/footer.js +28 -44
- package/components/form/form.js +1 -1
- package/components/global/compose.js +1 -8
- package/components/global/composeRefs.d.ts +0 -3
- package/components/global/composeRefs.js +8 -15
- package/components/global/controls-height.js +2 -2
- package/components/global/create-stateful-context.d.ts +0 -4
- package/components/global/create-stateful-context.js +14 -17
- package/components/global/data-tests.js +7 -12
- package/components/global/dom.js +49 -82
- package/components/global/focus-sensor-hoc.js +95 -122
- package/components/global/fuzzy-highlight.js +23 -34
- package/components/global/get-event-key.js +8 -8
- package/components/global/get-uid.js +3 -7
- package/components/global/inject-styles.js +7 -14
- package/components/global/listeners.js +28 -47
- package/components/global/memoize.js +6 -10
- package/components/global/normalize-indent.js +19 -46
- package/components/global/promise-with-timeout.js +6 -8
- package/components/global/react-dom-renderer.d.ts +0 -5
- package/components/global/react-dom-renderer.js +29 -45
- package/components/global/rerender-hoc.d.ts +2 -2
- package/components/global/rerender-hoc.js +16 -32
- package/components/global/schedule-raf.js +4 -4
- package/components/global/sniffer.js +1 -1
- package/components/global/theme.d.ts +8 -2
- package/components/global/theme.js +2 -20
- package/components/global/trivial-template-tag.js +4 -9
- package/components/global/typescript-utils.js +2 -6
- package/components/global/url.js +20 -23
- package/components/global/use-event-callback.js +7 -4
- package/components/grid/col.d.ts +0 -14
- package/components/grid/col.js +27 -53
- package/components/grid/grid.d.ts +0 -5
- package/components/grid/grid.js +20 -32
- package/components/grid/row.d.ts +0 -18
- package/components/grid/row.js +23 -47
- package/components/group/group.d.ts +0 -5
- package/components/group/group.js +18 -27
- package/components/header/header-icon.d.ts +0 -22
- package/components/header/header-icon.js +20 -37
- package/components/header/header.d.ts +0 -7
- package/components/header/header.js +30 -74
- package/components/header/links.d.ts +2 -0
- package/components/header/links.js +20 -0
- package/components/header/logo.d.ts +0 -4
- package/components/header/logo.js +15 -30
- package/components/header/profile.d.ts +1 -39
- package/components/header/profile.js +126 -191
- package/components/header/services-link.d.ts +0 -10
- package/components/header/services-link.js +1 -4
- package/components/header/services.d.ts +0 -14
- package/components/header/services.js +65 -110
- package/components/header/smart-profile.d.ts +0 -9
- package/components/header/smart-profile.js +116 -205
- package/components/header/smart-services.d.ts +0 -4
- package/components/header/smart-services.js +72 -141
- package/components/header/tray.d.ts +0 -5
- package/components/header/tray.js +21 -35
- package/components/heading/heading.js +21 -26
- package/components/http/http.js +162 -319
- package/components/http/http.mock.js +50 -98
- package/components/hub-source/hub-source.js +77 -182
- package/components/hub-source/hub-source__user.js +9 -37
- package/components/hub-source/hub-source__users-groups.js +34 -60
- package/components/i18n/i18n-context.js +7 -8
- package/components/i18n/i18n.js +3 -6
- package/components/icon/icon.d.ts +0 -11
- package/components/icon/icon.js +60 -85
- package/components/icon/icon__svg.d.ts +0 -8
- package/components/icon/icon__svg.js +0 -6
- package/components/icon/index.js +0 -6
- package/components/input/input-legacy.js +1 -1
- package/components/input/input.js +2 -14
- package/components/input-size/input-size.js +1 -1
- package/components/island/adaptive-island-hoc.d.ts +0 -1
- package/components/island/adaptive-island-hoc.js +30 -39
- package/components/island/content.d.ts +0 -10
- package/components/island/content.js +99 -119
- package/components/island/header.js +55 -73
- package/components/island/island.d.ts +0 -9
- package/components/island/island.js +25 -41
- package/components/island-legacy/content-legacy.d.ts +0 -5
- package/components/island-legacy/content-legacy.js +16 -27
- package/components/island-legacy/header-legacy.d.ts +0 -5
- package/components/island-legacy/header-legacy.js +19 -30
- package/components/island-legacy/island-legacy.d.ts +0 -5
- package/components/island-legacy/island-legacy.js +16 -27
- package/components/link/clickableLink.d.ts +0 -9
- package/components/link/clickableLink.js +33 -51
- package/components/link/link.d.ts +0 -25
- package/components/link/link.js +47 -68
- package/components/list/consts.js +2 -2
- package/components/list/list.d.ts +0 -32
- package/components/list/list.js +399 -516
- package/components/list/list__custom.js +51 -78
- package/components/list/list__hint.d.ts +0 -4
- package/components/list/list__hint.js +8 -21
- package/components/list/list__item.js +147 -211
- package/components/list/list__link.js +39 -59
- package/components/list/list__separator.js +15 -30
- package/components/list/list__title.js +25 -41
- package/components/list/list__users-groups-source.js +55 -123
- package/components/loader/loader.d.ts +0 -10
- package/components/loader/loader.js +38 -70
- package/components/loader/loader__core.js +123 -184
- package/components/loader-inline/loader-inline.d.ts +0 -6
- package/components/loader-inline/loader-inline.js +24 -38
- package/components/loader-screen/loader-screen.d.ts +0 -6
- package/components/loader-screen/loader-screen.js +24 -46
- package/components/login-dialog/login-dialog.d.ts +0 -11
- package/components/login-dialog/login-dialog.js +94 -145
- package/components/login-dialog/service.js +11 -33
- package/components/markdown/markdown.js +16 -29
- package/components/message/message.js +171 -218
- package/components/old-browsers-message/old-browsers-message.js +11 -14
- package/components/old-browsers-message/old-browsers-message__stop.js +1 -4
- package/components/old-browsers-message/white-list.js +8 -13
- package/components/pager/pager.js +211 -275
- package/components/panel/panel.d.ts +0 -5
- package/components/panel/panel.js +16 -27
- package/components/permissions/permissions.js +118 -161
- package/components/permissions/permissions__cache.js +191 -218
- package/components/popup/popup.consts.js +1 -1
- package/components/popup/popup.js +237 -329
- package/components/popup/popup.target.js +9 -12
- package/components/popup/position.js +94 -101
- package/components/popup-menu/popup-menu.js +31 -76
- package/components/progress-bar/progress-bar.d.ts +19 -33
- package/components/progress-bar/progress-bar.js +55 -99
- package/components/query-assist/query-assist.d.ts +63 -93
- package/components/query-assist/query-assist.js +585 -748
- package/components/query-assist/query-assist__suggestions.js +2 -28
- package/components/radio/radio.d.ts +0 -8
- package/components/radio/radio.js +15 -35
- package/components/radio/radio__item.d.ts +0 -9
- package/components/radio/radio__item.js +52 -72
- package/components/scrollable-section/scrollable-section.js +53 -0
- package/components/select/select.d.ts +3 -0
- package/components/select/select.js +714 -863
- package/components/select/select__filter.js +2 -29
- package/components/select/select__popup.js +317 -465
- package/components/shortcuts/core.js +147 -195
- package/components/shortcuts/shortcut-title.js +6 -10
- package/components/shortcuts/shortcuts-hoc.d.ts +0 -5
- package/components/shortcuts/shortcuts-hoc.js +23 -46
- package/components/shortcuts/shortcuts.d.ts +0 -8
- package/components/shortcuts/shortcuts.js +41 -72
- package/components/slider/slider.js +93 -113
- package/components/slider/slider.utils.js +16 -23
- package/components/storage/storage.d.ts +2 -3
- package/components/storage/storage.js +2 -46
- package/components/storage/storage__local.js +89 -148
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.js +35 -61
- package/components/table/cell.d.ts +0 -6
- package/components/table/cell.js +11 -27
- package/components/table/disable-hover-hoc.d.ts +0 -1
- package/components/table/disable-hover-hoc.js +27 -42
- package/components/table/header-cell.d.ts +0 -10
- package/components/table/header-cell.js +59 -85
- package/components/table/header.d.ts +1 -23
- package/components/table/header.js +89 -126
- package/components/table/multitable.d.ts +0 -4
- package/components/table/multitable.js +83 -93
- package/components/table/row-with-focus-sensor.d.ts +2 -2
- package/components/table/row-with-focus-sensor.js +26 -60
- package/components/table/row.js +170 -235
- package/components/table/selection-adapter.js +2 -2
- package/components/table/selection-shortcuts-hoc.js +102 -126
- package/components/table/selection.js +150 -217
- package/components/table/simple-table.d.ts +0 -44
- package/components/table/simple-table.js +18 -59
- package/components/table/smart-table.d.ts +0 -48
- package/components/table/smart-table.js +41 -83
- package/components/table/table.d.ts +0 -2
- package/components/table/table.js +269 -377
- package/components/tabs/collapsible-more.d.ts +1 -9
- package/components/tabs/collapsible-more.js +47 -97
- package/components/tabs/collapsible-tab.js +32 -44
- package/components/tabs/collapsible-tabs.d.ts +2 -29
- package/components/tabs/collapsible-tabs.js +89 -161
- package/components/tabs/custom-item.d.ts +1 -7
- package/components/tabs/custom-item.js +4 -7
- package/components/tabs/dumb-tabs.d.ts +0 -11
- package/components/tabs/dumb-tabs.js +60 -104
- package/components/tabs/smart-tabs.d.ts +0 -6
- package/components/tabs/smart-tabs.js +29 -68
- package/components/tabs/tab-link.d.ts +0 -8
- package/components/tabs/tab-link.js +1 -4
- package/components/tabs/tab.d.ts +0 -8
- package/components/tabs/tab.js +14 -32
- package/components/tabs/tabs.js +1 -28
- package/components/tag/tag.d.ts +0 -19
- package/components/tag/tag.js +120 -179
- package/components/tags-input/tags-input.d.ts +7 -33
- package/components/tags-input/tags-input.js +224 -339
- package/components/tags-list/tags-list.d.ts +0 -13
- package/components/tags-list/tags-list.js +45 -74
- package/components/text/text.d.ts +0 -7
- package/components/text/text.js +27 -43
- package/components/toggle/toggle.d.ts +0 -15
- package/components/toggle/toggle.js +52 -77
- package/components/tooltip/tooltip.d.ts +4 -10
- package/components/tooltip/tooltip.js +105 -137
- package/components/user-agreement/service.d.ts +2 -1
- package/components/user-agreement/service.js +260 -405
- package/components/user-agreement/user-agreement.d.ts +0 -18
- package/components/user-agreement/user-agreement.js +92 -138
- package/components/user-card/card.d.ts +0 -35
- package/components/user-card/card.js +2 -27
- package/components/user-card/smart-user-card-tooltip.d.ts +0 -5
- package/components/user-card/smart-user-card-tooltip.js +52 -108
- package/components/user-card/tooltip.d.ts +0 -9
- package/components/user-card/tooltip.js +35 -74
- package/components/user-card/user-card.js +1 -26
- package/package.json +4 -6
- package/components/global/prop-types.d.ts +0 -4
- package/components/global/prop-types.js +0 -9
- package/components/global/react-render-adapter.d.ts +0 -1
- package/components/global/react-render-adapter.js +0 -6
- package/components/header/scrollable-section.js +0 -47
- package/components/header/tray-icon.d.ts +0 -1
- package/components/header/tray-icon.js +0 -26
- package/components/storage/storage__fallback.d.ts +0 -79
- package/components/storage/storage__fallback.js +0 -253
- /package/components/{header → scrollable-section}/scrollable-section.d.ts +0 -0
@@ -1,11 +1,7 @@
|
|
1
|
-
import { _ as _defineProperty,
|
2
|
-
import 'core-js/modules/es.symbol.js';
|
1
|
+
import { _ as _defineProperty, b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
3
2
|
import 'core-js/modules/es.symbol.description.js';
|
4
|
-
import 'core-js/modules/
|
5
|
-
import 'core-js/modules/es.array.includes.js';
|
6
|
-
import 'core-js/modules/es.string.includes.js';
|
3
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
7
4
|
import { Component } from 'react';
|
8
|
-
import PropTypes from 'prop-types';
|
9
5
|
import classNames from 'classnames';
|
10
6
|
import gift from '@jetbrains/icons/gift';
|
11
7
|
import Popup from '../popup/popup.js';
|
@@ -15,29 +11,14 @@ import { Button } from '../button/button.js';
|
|
15
11
|
import { I18nContext } from '../i18n/i18n-context.js';
|
16
12
|
import { T as Theme, m as modules_59717246, W as WithThemeClasses, a as ThemeProvider } from '../_helpers/theme.js';
|
17
13
|
import { jsx, jsxs } from 'react/jsx-runtime';
|
18
|
-
import 'core-js/modules/es.object.entries.js';
|
19
|
-
import 'core-js/modules/es.object.to-string.js';
|
20
14
|
import 'core-js/modules/es.regexp.exec.js';
|
21
|
-
import 'core-js/modules/es.regexp.to-string.js';
|
22
15
|
import 'core-js/modules/es.string.replace.js';
|
23
|
-
import 'core-js/modules/web.dom-collections.for-each.js';
|
24
16
|
import 'react-dom';
|
25
17
|
import '../global/get-uid.js';
|
26
18
|
import '../global/schedule-raf.js';
|
27
19
|
import '../global/dom.js';
|
28
|
-
import 'core-js/modules/es.array.filter.js';
|
29
|
-
import 'core-js/modules/es.array.iterator.js';
|
30
|
-
import 'core-js/modules/es.object.assign.js';
|
31
|
-
import 'core-js/modules/es.set.js';
|
32
|
-
import 'core-js/modules/es.string.split.js';
|
33
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
34
20
|
import '../shortcuts/shortcuts.js';
|
35
|
-
import 'core-js/modules/es.array.map.js';
|
36
21
|
import '../shortcuts/core.js';
|
37
|
-
import 'core-js/modules/es.array.find-index.js';
|
38
|
-
import 'core-js/modules/es.array.slice.js';
|
39
|
-
import 'core-js/modules/es.array.splice.js';
|
40
|
-
import 'core-js/modules/es.string.match.js';
|
41
22
|
import 'combokeys';
|
42
23
|
import '../global/sniffer.js';
|
43
24
|
import 'sniffr';
|
@@ -50,204 +31,191 @@ import '../popup/popup.target.js';
|
|
50
31
|
import 'util-deprecate';
|
51
32
|
import '../icon/icon__constants.js';
|
52
33
|
import '../_helpers/icon__svg.js';
|
53
|
-
import 'core-js/modules/es.string.starts-with.js';
|
54
34
|
import '../global/memoize.js';
|
55
|
-
import 'core-js/modules/es.map.js';
|
56
|
-
import 'core-js/modules/es.weak-map.js';
|
57
35
|
import '@jetbrains/icons/chevron-down';
|
58
36
|
import '../link/clickableLink.js';
|
59
37
|
import '../global/controls-height.js';
|
60
38
|
import '../_helpers/button__classes.js';
|
61
39
|
import '../i18n/i18n.js';
|
62
40
|
|
63
|
-
var modules_8b837449 = {"light":"light_rui_2ac4","container":"container_rui_a216","message":"message_rui_a216","icon":"icon_rui_a216","title":"title_rui_a216 font-lower_rui_f295 font_rui_f295","description":"description_rui_a216","
|
41
|
+
var modules_8b837449 = {"light":"light_rui_2ac4","container":"container_rui_a216","message":"message_rui_a216","icon":"icon_rui_a216","title":"title_rui_a216 font-lower_rui_f295 font_rui_f295","description":"description_rui_a216","gotIt":"gotIt_rui_a216","tail":"tail_rui_a216"};
|
64
42
|
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
87
|
-
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
};
|
130
|
-
};
|
43
|
+
const UNIT = 8;
|
44
|
+
const TAIL_SIZE = 11;
|
45
|
+
const getTailOffsets = offset => ({
|
46
|
+
[Directions.BOTTOM_RIGHT]: {
|
47
|
+
top: 0,
|
48
|
+
left: offset + UNIT,
|
49
|
+
transform: 'rotate(135deg)'
|
50
|
+
},
|
51
|
+
[Directions.BOTTOM_LEFT]: {
|
52
|
+
top: 0,
|
53
|
+
right: offset - UNIT - TAIL_SIZE,
|
54
|
+
transform: 'rotate(135deg)'
|
55
|
+
},
|
56
|
+
[Directions.BOTTOM_CENTER]: {
|
57
|
+
top: 0,
|
58
|
+
left: offset + UNIT,
|
59
|
+
transform: 'rotate(135deg)'
|
60
|
+
},
|
61
|
+
[Directions.TOP_RIGHT]: {
|
62
|
+
bottom: -TAIL_SIZE,
|
63
|
+
left: offset - UNIT,
|
64
|
+
transform: 'rotate(-45deg)'
|
65
|
+
},
|
66
|
+
[Directions.TOP_LEFT]: {
|
67
|
+
bottom: -TAIL_SIZE,
|
68
|
+
right: offset + UNIT - TAIL_SIZE,
|
69
|
+
transform: 'rotate(-45deg)'
|
70
|
+
},
|
71
|
+
[Directions.TOP_CENTER]: {
|
72
|
+
bottom: -TAIL_SIZE,
|
73
|
+
left: offset - UNIT,
|
74
|
+
transform: 'rotate(-45deg)'
|
75
|
+
},
|
76
|
+
[Directions.RIGHT_TOP]: {
|
77
|
+
bottom: offset + UNIT - TAIL_SIZE,
|
78
|
+
left: 0,
|
79
|
+
transform: 'rotate(45deg)'
|
80
|
+
},
|
81
|
+
[Directions.RIGHT_BOTTOM]: {
|
82
|
+
top: offset - UNIT,
|
83
|
+
left: 0,
|
84
|
+
transform: 'rotate(45deg)'
|
85
|
+
},
|
86
|
+
[Directions.RIGHT_CENTER]: {
|
87
|
+
top: offset - UNIT,
|
88
|
+
left: 0,
|
89
|
+
transform: 'rotate(45deg)'
|
90
|
+
},
|
91
|
+
[Directions.LEFT_TOP]: {
|
92
|
+
bottom: offset - UNIT - TAIL_SIZE,
|
93
|
+
right: -TAIL_SIZE,
|
94
|
+
transform: 'rotate(-135deg)'
|
95
|
+
},
|
96
|
+
[Directions.LEFT_BOTTOM]: {
|
97
|
+
top: offset + UNIT,
|
98
|
+
right: -TAIL_SIZE,
|
99
|
+
transform: 'rotate(-135deg)'
|
100
|
+
},
|
101
|
+
[Directions.LEFT_CENTER]: {
|
102
|
+
top: offset + UNIT,
|
103
|
+
right: -TAIL_SIZE,
|
104
|
+
transform: 'rotate(-135deg)'
|
105
|
+
}
|
106
|
+
});
|
131
107
|
/**
|
132
108
|
* Displays a popup containing a message.
|
133
109
|
*/
|
134
|
-
|
135
|
-
|
136
|
-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
}
|
141
|
-
|
142
|
-
_defineProperty(
|
143
|
-
_defineProperty(
|
144
|
-
return _this.setState({
|
145
|
-
direction
|
146
|
-
});
|
147
|
-
});
|
148
|
-
_defineProperty(_this, "popup", void 0);
|
149
|
-
_defineProperty(_this, "node", void 0);
|
150
|
-
_defineProperty(_this, "popupRef", function (el) {
|
110
|
+
class Message extends Component {
|
111
|
+
constructor() {
|
112
|
+
super(...arguments);
|
113
|
+
_defineProperty(this, "state", {});
|
114
|
+
_defineProperty(this, "_onDirectionChange", direction => this.setState({
|
115
|
+
direction
|
116
|
+
}));
|
117
|
+
_defineProperty(this, "popup", void 0);
|
118
|
+
_defineProperty(this, "node", void 0);
|
119
|
+
_defineProperty(this, "popupRef", el => {
|
151
120
|
var _this$popup;
|
152
|
-
|
153
|
-
|
121
|
+
this.popup = el;
|
122
|
+
this.node = (_this$popup = this.popup) === null || _this$popup === void 0 ? void 0 : _this$popup.node;
|
154
123
|
});
|
155
|
-
return _this;
|
156
124
|
}
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
164
|
-
|
165
|
-
return this.props.tailOffset;
|
166
|
-
}
|
167
|
-
var anchor = (popupProps === null || popupProps === void 0 ? void 0 : popupProps.anchorElement) || ((_this$popup2 = this.popup) === null || _this$popup2 === void 0 ? void 0 : _this$popup2.parent);
|
168
|
-
if (!anchor) {
|
169
|
-
return DEFAULT_OFFSET;
|
170
|
-
}
|
171
|
-
var offset = Math.floor(anchor.offsetWidth / 2);
|
172
|
-
var isOpenedToRight = this.state.direction != null && [Directions.TOP_RIGHT, Directions.BOTTOM_RIGHT].includes(this.state.direction);
|
173
|
-
if (popupProps !== null && popupProps !== void 0 && popupProps.left && isOpenedToRight) {
|
174
|
-
return offset - (popupProps === null || popupProps === void 0 ? void 0 : popupProps.left);
|
175
|
-
}
|
176
|
-
return offset;
|
125
|
+
getTailOffset() {
|
126
|
+
var _this$popup2;
|
127
|
+
const DEFAULT_OFFSET = 32;
|
128
|
+
const {
|
129
|
+
popupProps
|
130
|
+
} = this.props;
|
131
|
+
if (this.props.tailOffset != null) {
|
132
|
+
return this.props.tailOffset;
|
177
133
|
}
|
178
|
-
|
179
|
-
|
180
|
-
|
181
|
-
var _this2 = this;
|
182
|
-
var _this$props = this.props,
|
183
|
-
_children = _this$props.children,
|
184
|
-
className = _this$props.className,
|
185
|
-
tailClassName = _this$props.tailClassName,
|
186
|
-
title = _this$props.title,
|
187
|
-
icon = _this$props.icon,
|
188
|
-
popupProps = _this$props.popupProps,
|
189
|
-
buttonProps = _this$props.buttonProps,
|
190
|
-
onClose = _this$props.onClose,
|
191
|
-
onDismiss = _this$props.onDismiss,
|
192
|
-
translations = _this$props.translations,
|
193
|
-
theme = _this$props.theme;
|
194
|
-
var classes = classNames(modules_8b837449.message, className, {
|
195
|
-
[modules_59717246.dark]: theme === Theme.DARK
|
196
|
-
});
|
197
|
-
var tailClasses = classNames(modules_8b837449.tail, tailClassName);
|
198
|
-
var popupDirections = this.props.direction ? [this.props.direction] : this.props.directions;
|
199
|
-
var direction = this.state.direction;
|
200
|
-
return /*#__PURE__*/jsx(I18nContext.Consumer, {
|
201
|
-
children: function children(_ref) {
|
202
|
-
var translate = _ref.translate;
|
203
|
-
return /*#__PURE__*/jsx(WithThemeClasses, {
|
204
|
-
theme: theme,
|
205
|
-
children: function children(themeClasses) {
|
206
|
-
var _translations$gotIt, _translations$dismiss;
|
207
|
-
return /*#__PURE__*/jsx(Popup, _objectSpread2(_objectSpread2({
|
208
|
-
ref: _this2.popupRef,
|
209
|
-
hidden: false,
|
210
|
-
directions: popupDirections,
|
211
|
-
className: classNames(classes, themeClasses),
|
212
|
-
offset: UNIT * 2,
|
213
|
-
onDirectionChange: _this2._onDirectionChange
|
214
|
-
}, popupProps), {}, {
|
215
|
-
children: /*#__PURE__*/jsxs(ThemeProvider, {
|
216
|
-
theme: theme,
|
217
|
-
passToPopups: true,
|
218
|
-
children: [direction && /*#__PURE__*/jsx("div", {
|
219
|
-
className: tailClasses,
|
220
|
-
style: getTailOffsets(_this2.getTailOffset())[direction]
|
221
|
-
}), icon && /*#__PURE__*/jsx(Icon, {
|
222
|
-
className: modules_8b837449.icon,
|
223
|
-
glyph: icon
|
224
|
-
}), title && /*#__PURE__*/jsx("h1", {
|
225
|
-
"data-test": "rgMessageTitle",
|
226
|
-
className: modules_8b837449.title,
|
227
|
-
children: title
|
228
|
-
}), _children && /*#__PURE__*/jsx("div", {
|
229
|
-
className: modules_8b837449.description,
|
230
|
-
children: _children
|
231
|
-
}), (onClose || buttonProps) && /*#__PURE__*/jsx(Button, _objectSpread2(_objectSpread2({
|
232
|
-
className: modules_8b837449.button,
|
233
|
-
onClick: onClose,
|
234
|
-
primary: true
|
235
|
-
}, buttonProps), {}, {
|
236
|
-
children: (_translations$gotIt = translations === null || translations === void 0 ? void 0 : translations.gotIt) !== null && _translations$gotIt !== void 0 ? _translations$gotIt : translate('gotIt')
|
237
|
-
})), onDismiss && /*#__PURE__*/jsx(Button, {
|
238
|
-
onClick: onDismiss,
|
239
|
-
text: true,
|
240
|
-
children: (_translations$dismiss = translations === null || translations === void 0 ? void 0 : translations.dismiss) !== null && _translations$dismiss !== void 0 ? _translations$dismiss : translate('dismiss')
|
241
|
-
})]
|
242
|
-
})
|
243
|
-
}));
|
244
|
-
}
|
245
|
-
});
|
246
|
-
}
|
247
|
-
});
|
134
|
+
const anchor = (popupProps === null || popupProps === void 0 ? void 0 : popupProps.anchorElement) || ((_this$popup2 = this.popup) === null || _this$popup2 === void 0 ? void 0 : _this$popup2.parent);
|
135
|
+
if (!anchor) {
|
136
|
+
return DEFAULT_OFFSET;
|
248
137
|
}
|
249
|
-
|
250
|
-
|
138
|
+
const offset = Math.floor(anchor.offsetWidth / 2);
|
139
|
+
const isOpenedToRight = this.state.direction != null && [Directions.TOP_RIGHT, Directions.BOTTOM_RIGHT].includes(this.state.direction);
|
140
|
+
if (popupProps !== null && popupProps !== void 0 && popupProps.left && isOpenedToRight) {
|
141
|
+
return offset - (popupProps === null || popupProps === void 0 ? void 0 : popupProps.left);
|
142
|
+
}
|
143
|
+
return offset;
|
144
|
+
}
|
145
|
+
render() {
|
146
|
+
const {
|
147
|
+
children,
|
148
|
+
className,
|
149
|
+
tailClassName,
|
150
|
+
title,
|
151
|
+
icon,
|
152
|
+
popupProps,
|
153
|
+
buttonProps,
|
154
|
+
onClose,
|
155
|
+
onDismiss,
|
156
|
+
translations,
|
157
|
+
theme
|
158
|
+
} = this.props;
|
159
|
+
const classes = classNames(modules_8b837449.message, className, {
|
160
|
+
[modules_59717246.dark]: theme === Theme.DARK
|
161
|
+
});
|
162
|
+
const tailClasses = classNames(modules_8b837449.tail, tailClassName);
|
163
|
+
const popupDirections = this.props.direction ? [this.props.direction] : this.props.directions;
|
164
|
+
const {
|
165
|
+
direction
|
166
|
+
} = this.state;
|
167
|
+
return /*#__PURE__*/jsx(I18nContext.Consumer, {
|
168
|
+
children: _ref => {
|
169
|
+
let {
|
170
|
+
translate
|
171
|
+
} = _ref;
|
172
|
+
return /*#__PURE__*/jsx(WithThemeClasses, {
|
173
|
+
theme: theme,
|
174
|
+
children: themeClasses => {
|
175
|
+
var _translations$gotIt, _translations$dismiss;
|
176
|
+
return /*#__PURE__*/jsx(Popup, _objectSpread2(_objectSpread2({
|
177
|
+
ref: this.popupRef,
|
178
|
+
hidden: false,
|
179
|
+
directions: popupDirections,
|
180
|
+
className: classNames(classes, themeClasses),
|
181
|
+
offset: UNIT * 2,
|
182
|
+
onDirectionChange: this._onDirectionChange
|
183
|
+
}, popupProps), {}, {
|
184
|
+
children: /*#__PURE__*/jsxs(ThemeProvider, {
|
185
|
+
theme: theme,
|
186
|
+
passToPopups: true,
|
187
|
+
children: [direction && /*#__PURE__*/jsx("div", {
|
188
|
+
className: tailClasses,
|
189
|
+
style: getTailOffsets(this.getTailOffset())[direction]
|
190
|
+
}), icon && /*#__PURE__*/jsx(Icon, {
|
191
|
+
className: modules_8b837449.icon,
|
192
|
+
glyph: icon
|
193
|
+
}), title && /*#__PURE__*/jsx("h1", {
|
194
|
+
"data-test": "rgMessageTitle",
|
195
|
+
className: modules_8b837449.title,
|
196
|
+
children: title
|
197
|
+
}), children && /*#__PURE__*/jsx("div", {
|
198
|
+
className: modules_8b837449.description,
|
199
|
+
children: children
|
200
|
+
}), (onClose || buttonProps) && /*#__PURE__*/jsx(Button, _objectSpread2(_objectSpread2({
|
201
|
+
className: modules_8b837449.gotIt,
|
202
|
+
onClick: onClose,
|
203
|
+
primary: true
|
204
|
+
}, buttonProps), {}, {
|
205
|
+
children: (_translations$gotIt = translations === null || translations === void 0 ? void 0 : translations.gotIt) !== null && _translations$gotIt !== void 0 ? _translations$gotIt : translate('gotIt')
|
206
|
+
})), onDismiss && /*#__PURE__*/jsx(Button, {
|
207
|
+
onClick: onDismiss,
|
208
|
+
text: true,
|
209
|
+
children: (_translations$dismiss = translations === null || translations === void 0 ? void 0 : translations.dismiss) !== null && _translations$dismiss !== void 0 ? _translations$dismiss : translate('dismiss')
|
210
|
+
})]
|
211
|
+
})
|
212
|
+
}));
|
213
|
+
}
|
214
|
+
});
|
215
|
+
}
|
216
|
+
});
|
217
|
+
}
|
218
|
+
}
|
251
219
|
_defineProperty(Message, "defaultProps", {
|
252
220
|
icon: gift,
|
253
221
|
directions: [Directions.TOP_RIGHT, Directions.TOP_LEFT, Directions.TOP_CENTER, Directions.BOTTOM_RIGHT, Directions.BOTTOM_LEFT, Directions.BOTTOM_CENTER, Directions.RIGHT_TOP, Directions.RIGHT_BOTTOM, Directions.RIGHT_CENTER, Directions.LEFT_TOP, Directions.LEFT_BOTTOM, Directions.LEFT_CENTER],
|
@@ -255,20 +223,5 @@ _defineProperty(Message, "defaultProps", {
|
|
255
223
|
});
|
256
224
|
_defineProperty(Message, "Directions", Directions);
|
257
225
|
_defineProperty(Message, "PopupProps", Popup.PopupProps);
|
258
|
-
Message.propTypes = {
|
259
|
-
children: PropTypes.node,
|
260
|
-
className: PropTypes.string,
|
261
|
-
tailClassName: PropTypes.string,
|
262
|
-
title: PropTypes.string,
|
263
|
-
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
|
264
|
-
directions: PropTypes.arrayOf(PropTypes.string),
|
265
|
-
direction: PropTypes.string,
|
266
|
-
popupProps: PropTypes.object,
|
267
|
-
buttonProps: PropTypes.object,
|
268
|
-
tailOffset: PropTypes.number,
|
269
|
-
onClose: PropTypes.func,
|
270
|
-
onDismiss: PropTypes.func,
|
271
|
-
translations: PropTypes.object
|
272
|
-
};
|
273
226
|
|
274
227
|
export { Message as default };
|
@@ -1,11 +1,8 @@
|
|
1
|
-
import 'core-js/modules/es.array.concat.js';
|
2
1
|
import { isBrowserInWhiteList } from './white-list.js';
|
3
2
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
4
|
-
import 'core-js/modules/es.array.includes.js';
|
5
3
|
import 'core-js/modules/es.array.reduce.js';
|
6
|
-
import 'core-js/modules/es.object.to-string.js';
|
7
4
|
import 'core-js/modules/es.regexp.exec.js';
|
8
|
-
import 'core-js/modules/
|
5
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
9
6
|
import '../global/sniffer.js';
|
10
7
|
import 'sniffr';
|
11
8
|
|
@@ -17,12 +14,12 @@ import 'sniffr';
|
|
17
14
|
won't be displayed for those and higher versions even when a JS error occurs
|
18
15
|
on application start.
|
19
16
|
*/
|
20
|
-
|
21
|
-
|
22
|
-
|
17
|
+
let smileChanges = 0;
|
18
|
+
const MAX_SMILE_CHANGES = 50;
|
19
|
+
let previousWindowErrorHandler;
|
23
20
|
function changeSmileClickListener(event) {
|
24
|
-
|
25
|
-
|
21
|
+
const eyes = ['O', 'o', '-', '>', '<'];
|
22
|
+
const target = event.target || event.srcElement;
|
26
23
|
smileChanges++;
|
27
24
|
function rand(min, max) {
|
28
25
|
return Math.round(Math.random() * (max - min)) + min;
|
@@ -66,11 +63,11 @@ function stopOldBrowserDetector() {
|
|
66
63
|
window.onerror = previousWindowErrorHandler;
|
67
64
|
}
|
68
65
|
//Start javascript error detection
|
69
|
-
startOldBrowsersDetector(
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
66
|
+
startOldBrowsersDetector(() => {
|
67
|
+
const oldBrowsersMessageContainer = document.getElementById('ring-old-browsers-message');
|
68
|
+
const browserMessage = document.getElementById('ring-old-browsers-message__browser-message');
|
69
|
+
const errorMessage = document.getElementById('ring-old-browsers-message__error-message');
|
70
|
+
const smileNode = document.getElementById('ring-old-browsers-message__smile');
|
74
71
|
if (browserMessage != null && errorMessage != null) {
|
75
72
|
if (isBrowserInWhiteList()) {
|
76
73
|
browserMessage.style.display = 'none';
|
@@ -1,11 +1,8 @@
|
|
1
1
|
export { stop as default } from './old-browsers-message.js';
|
2
|
-
import 'core-js/modules/es.array.concat.js';
|
3
2
|
import './white-list.js';
|
4
3
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
5
|
-
import 'core-js/modules/es.array.includes.js';
|
6
4
|
import 'core-js/modules/es.array.reduce.js';
|
7
|
-
import 'core-js/modules/es.object.to-string.js';
|
8
5
|
import 'core-js/modules/es.regexp.exec.js';
|
9
|
-
import 'core-js/modules/
|
6
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
10
7
|
import '../global/sniffer.js';
|
11
8
|
import 'sniffr';
|
@@ -1,28 +1,23 @@
|
|
1
|
-
import {
|
2
|
-
import 'core-js/modules/es.array.includes.js';
|
1
|
+
import { b as _objectSpread2 } from '../_helpers/_rollupPluginBabelHelpers.js';
|
3
2
|
import 'core-js/modules/es.array.reduce.js';
|
4
|
-
import 'core-js/modules/es.object.to-string.js';
|
5
3
|
import 'core-js/modules/es.regexp.exec.js';
|
6
|
-
import 'core-js/modules/
|
4
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
7
5
|
import sniffr from '../global/sniffer.js';
|
8
6
|
import 'sniffr';
|
9
7
|
|
10
|
-
|
8
|
+
const MAJOR_VERSION_INDEX = 0;
|
11
9
|
/**
|
12
10
|
* SUPPORTED_BROWSERS are defined by Babel plugin, see babel config
|
13
11
|
*/
|
14
|
-
if (!["and_chr
|
12
|
+
if (!["and_chr 129", "and_uc 15.5", "chrome 128", "chrome 127", "chrome 126", "chrome 109", "edge 127", "firefox 129", "ios_saf 17.6", "ios_saf 17.5", "op_mob 80", "safari 17.5", "samsung 25"]) {
|
15
13
|
// eslint-disable-next-line no-console
|
16
14
|
console.warn('Ring UI: no SUPPORTED_BROWSERS passed. Please check babel config.');
|
17
15
|
}
|
18
|
-
|
19
|
-
|
20
|
-
|
16
|
+
const SUPPORTED = ["and_chr 129", "and_uc 15.5", "chrome 128", "chrome 127", "chrome 126", "chrome 109", "edge 127", "firefox 129", "ios_saf 17.6", "ios_saf 17.5", "op_mob 80", "safari 17.5", "samsung 25"] || [];
|
17
|
+
const WHITE_LISTED_BROWSERS = ['chrome', 'firefox', 'safari', 'edge'];
|
18
|
+
const WHITE_LIST = SUPPORTED.reduce((acc, item) => {
|
21
19
|
var _item$match;
|
22
|
-
|
23
|
-
_ref2 = _slicedToArray(_ref, 3),
|
24
|
-
browserName = _ref2[1],
|
25
|
-
version = _ref2[2];
|
20
|
+
const [, browserName, version] = (_item$match = item.match(/(\S+)\s(\S+)/)) !== null && _item$match !== void 0 ? _item$match : [];
|
26
21
|
if (!WHITE_LISTED_BROWSERS.includes(browserName)) {
|
27
22
|
return acc;
|
28
23
|
}
|