@jetbrains/ring-ui-built 7.0.61 → 7.0.63
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/card.js +7 -6
- package/components/_helpers/{dialog__body-scroll-preventer.js → dialog-body-scroll-preventer.js} +4 -4
- package/components/_helpers/input.js +8 -8
- package/components/_helpers/{select__filter.js → select-filter.js} +1 -1
- package/components/_helpers/services-link.js +3 -3
- package/components/_helpers/theme.js +2 -2
- package/components/alert/alert.d.ts +1 -1
- package/components/alert/alert.js +9 -8
- package/components/alert/container.d.ts +1 -1
- package/components/alert/container.js +2 -2
- package/components/alert-service/alert-service.d.ts +2 -2
- package/components/alert-service/alert-service.js +4 -4
- package/components/analytics/{analytics__custom-plugin.d.ts → analytics-custom-plugin.d.ts} +1 -1
- package/components/analytics/{analytics__custom-plugin.js → analytics-custom-plugin.js} +2 -2
- package/components/auth/{auth__core.d.ts → auth-core.d.ts} +9 -8
- package/components/auth/{auth__core.js → auth-core.js} +18 -22
- package/components/auth/auth.d.ts +2 -2
- package/components/auth/auth.js +8 -8
- package/components/auth/background-flow.d.ts +2 -2
- package/components/auth/background-flow.js +1 -3
- package/components/auth/down-notification.js +6 -6
- package/components/auth/iframe-flow.d.ts +3 -3
- package/components/auth/iframe-flow.js +9 -11
- package/components/auth/request-builder.d.ts +2 -1
- package/components/auth/request-builder.js +1 -2
- package/components/auth/storage.d.ts +3 -3
- package/components/auth/storage.js +9 -11
- package/components/auth/token-validator.d.ts +2 -1
- package/components/auth/token-validator.js +12 -3
- package/components/auth/window-flow.d.ts +3 -3
- package/components/auth/window-flow.js +5 -7
- package/components/auth-dialog/auth-dialog.js +9 -9
- package/components/auth-dialog-service/auth-dialog-service.d.ts +1 -1
- package/components/auth-dialog-service/auth-dialog-service.js +5 -5
- package/components/avatar/avatar-info.d.ts +1 -1
- package/components/avatar/avatar.d.ts +1 -1
- package/components/avatar/avatar.figma.js +1 -2
- package/components/avatar/avatar.js +16 -17
- package/components/avatar/fallback-avatar.js +17 -18
- package/components/avatar-stack/avatar-stack.d.ts +3 -3
- package/components/avatar-stack/avatar-stack.figma.js +1 -2
- package/components/avatar-stack/avatar-stack.js +12 -12
- package/components/banner/banner.js +4 -4
- package/components/breadcrumbs/breadcrumbs.d.ts +1 -1
- package/components/breadcrumbs/breadcrumbs.figma.js +1 -2
- package/components/button/{button__classes.d.ts → button.classes.d.ts} +1 -1
- package/components/button/button.classes.js +2 -0
- package/components/button/button.d.ts +4 -4
- package/components/button/button.figma.js +1 -2
- package/components/button/button.js +9 -9
- package/components/button-group/button-group.d.ts +1 -1
- package/components/button-group/button-group.js +1 -1
- package/components/button-group/caption.d.ts +1 -1
- package/components/button-set/button-set.d.ts +1 -1
- package/components/button-toolbar/button-toolbar.d.ts +1 -1
- package/components/caret/caret.js +24 -17
- package/components/checkbox/checkbox-group.figma.js +1 -2
- package/components/checkbox/checkbox.d.ts +1 -1
- package/components/checkbox/checkbox.figma.js +1 -2
- package/components/checkbox/checkbox.js +8 -8
- package/components/clipboard/clipboard.js +8 -8
- package/components/code/code.d.ts +1 -1
- package/components/code/code.js +3 -3
- package/components/collapse/collapse-content.d.ts +3 -3
- package/components/collapse/collapse-control.d.ts +2 -2
- package/components/collapse/collapse.d.ts +3 -3
- package/components/confirm/confirm.d.ts +1 -1
- package/components/confirm/confirm.js +8 -8
- package/components/confirm-service/confirm-service.d.ts +3 -3
- package/components/confirm-service/confirm-service.js +5 -5
- package/components/content-layout/content-layout.d.ts +1 -1
- package/components/content-layout/content-layout.js +2 -2
- package/components/content-layout/sidebar.d.ts +1 -1
- package/components/contenteditable/contenteditable.d.ts +1 -1
- package/components/contenteditable/contenteditable.js +2 -1
- package/components/control-help/control-help.d.ts +1 -1
- package/components/control-label/control-label.d.ts +1 -1
- package/components/data-list/data-list.d.ts +5 -5
- package/components/data-list/data-list.js +8 -8
- package/components/data-list/data-list.mock.d.ts +2 -2
- package/components/data-list/data-list.mock.js +24 -24
- package/components/data-list/item.d.ts +3 -3
- package/components/data-list/item.js +9 -9
- package/components/data-list/selection.d.ts +1 -1
- package/components/data-list/selection.js +8 -1
- package/components/data-list/title.d.ts +2 -2
- package/components/data-list/title.js +3 -3
- package/components/date-picker/consts.d.ts +1 -1
- package/components/date-picker/date-input.d.ts +1 -1
- package/components/date-picker/date-input.js +7 -7
- package/components/date-picker/date-picker.d.ts +5 -5
- package/components/date-picker/date-picker.js +27 -22
- package/components/date-picker/date-popup.d.ts +1 -1
- package/components/date-picker/date-popup.js +9 -8
- package/components/date-picker/day.d.ts +2 -2
- package/components/date-picker/day.js +4 -4
- package/components/date-picker/formats.js +1 -0
- package/components/date-picker/month-names.d.ts +1 -1
- package/components/date-picker/month-names.js +1 -1
- package/components/date-picker/month-slider.d.ts +2 -2
- package/components/date-picker/month-slider.js +1 -1
- package/components/date-picker/month.d.ts +1 -1
- package/components/date-picker/months.d.ts +1 -1
- package/components/date-picker/months.js +2 -2
- package/components/date-picker/years.d.ts +1 -1
- package/components/date-picker/years.js +2 -2
- package/components/dialog/{dialog__body-scroll-preventer.js → dialog-body-scroll-preventer.js} +1 -1
- package/components/dialog/dialog.d.ts +1 -1
- package/components/dialog/dialog.js +15 -15
- package/components/dropdown/anchor.d.ts +1 -1
- package/components/dropdown/anchor.js +4 -4
- package/components/dropdown/dropdown.d.ts +2 -2
- package/components/dropdown/dropdown.js +6 -6
- package/components/dropdown-menu/dropdown-menu.d.ts +5 -5
- package/components/dropdown-menu/dropdown-menu.js +11 -11
- package/components/editable-heading/editable-heading.d.ts +1 -1
- package/components/editable-heading/editable-heading.js +8 -7
- package/components/error-bubble/error-bubble.d.ts +1 -1
- package/components/error-bubble/error-bubble.figma.js +1 -2
- package/components/error-bubble/error-bubble.js +2 -2
- package/components/error-message/error-message.d.ts +2 -2
- package/components/error-message/error-message.js +3 -3
- package/components/footer/footer.d.ts +1 -1
- package/components/footer/footer.js +2 -2
- package/components/global/compose-refs.d.ts +2 -0
- package/components/global/compose-refs.js +19 -0
- package/components/global/composeRefs.d.ts +6 -2
- package/components/global/composeRefs.js +6 -16
- package/components/global/create-stateful-context.d.ts +1 -1
- package/components/global/dom.d.ts +1 -1
- package/components/global/dom.js +2 -3
- package/components/global/focus-sensor-hoc.d.ts +1 -1
- package/components/global/focus-sensor-hoc.js +2 -2
- package/components/global/fuzzy-highlight.d.ts +2 -2
- package/components/global/get-event-key.d.ts +1 -1
- package/components/global/memoize.js +1 -1
- package/components/global/rerender-hoc.d.ts +1 -1
- package/components/global/rerender-hoc.js +2 -2
- package/components/global/theme.d.ts +1 -1
- package/components/global/url.js +3 -3
- package/components/global/use-event-callback.js +1 -1
- package/components/grid/col.d.ts +1 -1
- package/components/grid/col.js +1 -1
- package/components/grid/grid.d.ts +1 -1
- package/components/grid/grid.js +1 -1
- package/components/grid/row.d.ts +1 -1
- package/components/grid/row.js +1 -1
- package/components/group/group.d.ts +1 -1
- package/components/group/group.js +1 -1
- package/components/header/header-icon.d.ts +2 -2
- package/components/header/header-icon.js +4 -4
- package/components/header/header.d.ts +1 -1
- package/components/header/header.js +17 -17
- package/components/header/links.d.ts +1 -1
- package/components/header/logo.d.ts +1 -1
- package/components/header/logo.js +2 -2
- package/components/header/profile.d.ts +5 -5
- package/components/header/profile.js +14 -14
- package/components/header/services-link.d.ts +1 -1
- package/components/header/services-link.js +1 -1
- package/components/header/services.d.ts +2 -2
- package/components/header/services.js +7 -7
- package/components/header/smart-profile.d.ts +3 -3
- package/components/header/smart-profile.js +25 -25
- package/components/header/smart-services.d.ts +3 -3
- package/components/header/smart-services.js +4 -4
- package/components/header/tray.d.ts +1 -1
- package/components/heading/heading.d.ts +1 -1
- package/components/http/http.mock.d.ts +1 -1
- package/components/hub-source/{hub-source__user.d.ts → hub-source-user.d.ts} +3 -2
- package/components/hub-source/{hub-source__users-groups.d.ts → hub-source-users-groups.d.ts} +3 -2
- package/components/hub-source/hub-source.d.ts +2 -2
- package/components/icon/{icon__svg.d.ts → icon-svg.d.ts} +1 -1
- package/components/icon/{icon__svg.js → icon-svg.js} +1 -1
- package/components/icon/icon.d.ts +2 -2
- package/components/icon/icon.js +3 -3
- package/components/icon/index.js +2 -2
- package/components/input/input.d.ts +3 -3
- package/components/input/input.figma.js +1 -2
- package/components/input/input.js +5 -5
- package/components/island/adaptive-island-hoc.d.ts +1 -1
- package/components/island/content.d.ts +1 -1
- package/components/island/content.js +2 -2
- package/components/island/header.d.ts +1 -1
- package/components/island/header.js +4 -4
- package/components/island/island.d.ts +1 -1
- package/components/link/clickable-link.d.ts +12 -0
- package/components/link/clickable-link.js +51 -0
- package/components/link/clickableLink.d.ts +11 -12
- package/components/link/clickableLink.js +5 -50
- package/components/link/link.d.ts +2 -2
- package/components/link/link.js +3 -3
- package/components/list/consts.d.ts +4 -5
- package/components/list/{list__custom.d.ts → list-custom.d.ts} +1 -1
- package/components/list/{list__custom.js → list-custom.js} +1 -1
- package/components/list/{list__hint.d.ts → list-hint.d.ts} +1 -1
- package/components/list/{list__hint.js → list-hint.js} +1 -1
- package/components/list/{list__item.d.ts → list-item.d.ts} +2 -2
- package/components/list/{list__item.js → list-item.js} +10 -9
- package/components/list/{list__separator.d.ts → list-separator.d.ts} +1 -1
- package/components/list/{list__separator.js → list-separator.js} +1 -1
- package/components/list/{list__title.d.ts → list-title.d.ts} +1 -1
- package/components/list/{list__title.js → list-title.js} +3 -3
- package/components/list/{list__users-groups-source.d.ts → list-users-groups-source.d.ts} +3 -2
- package/components/list/{list__users-groups-source.js → list-users-groups-source.js} +11 -11
- package/components/list/{list__classes.d.ts → list.classes.d.ts} +1 -1
- package/components/list/list.d.ts +7 -7
- package/components/list/list.js +36 -35
- package/components/loader/{loader__core.js → loader-core.js} +3 -2
- package/components/loader/loader.d.ts +2 -2
- package/components/loader/loader.js +1 -1
- package/components/loader-inline/loader-inline.d.ts +1 -1
- package/components/loader-screen/loader-screen.d.ts +1 -1
- package/components/loader-screen/loader-screen.js +1 -1
- package/components/login-dialog/login-dialog.d.ts +1 -1
- package/components/login-dialog/login-dialog.js +9 -9
- package/components/login-dialog/service.d.ts +1 -1
- package/components/login-dialog/service.js +6 -6
- package/components/markdown/markdown.d.ts +1 -1
- package/components/markdown/markdown.js +1 -1
- package/components/message/message.d.ts +4 -4
- package/components/message/message.js +7 -7
- package/components/old-browsers-message/old-browsers-message.js +1 -1
- package/components/pager/pager.d.ts +2 -2
- package/components/pager/pager.js +28 -27
- package/components/panel/panel.d.ts +1 -1
- package/components/panel/panel.js +1 -1
- package/components/permissions/{permissions__cache.js → permissions-cache.js} +4 -4
- package/components/permissions/permissions.d.ts +2 -2
- package/components/permissions/permissions.js +2 -3
- package/components/popup/popup.d.ts +2 -2
- package/components/popup/popup.js +4 -4
- package/components/popup/popup.target.d.ts +1 -1
- package/components/popup/position-css.js +2 -4
- package/components/popup/position.js +10 -9
- package/components/popup-menu/popup-menu.d.ts +4 -4
- package/components/popup-menu/popup-menu.js +10 -10
- package/components/progress-bar/progress-bar.d.ts +1 -1
- package/components/progress-bar/progress-bar.js +1 -1
- package/components/query-assist/{query-assist__suggestions.d.ts → query-assist-suggestions.d.ts} +1 -1
- package/components/query-assist/{query-assist__suggestions.js → query-assist-suggestions.js} +11 -11
- package/components/query-assist/query-assist.d.ts +4 -4
- package/components/query-assist/query-assist.js +30 -30
- package/components/radio/{radio__item.d.ts → radio-item.d.ts} +1 -1
- package/components/radio/{radio__item.js → radio-item.js} +3 -3
- package/components/radio/radio.d.ts +2 -2
- package/components/radio/radio.js +1 -1
- package/components/scrollable-section/scrollable-section.d.ts +1 -1
- package/components/scrollable-section/scrollable-section.js +1 -1
- package/components/select/{select__filter.d.ts → select-filter.d.ts} +2 -2
- package/components/select/{select__filter.js → select-filter.js} +12 -12
- package/components/select/{select__popup.d.ts → select-popup.d.ts} +8 -8
- package/components/select/{select__popup.js → select-popup.js} +21 -19
- package/components/select/select.d.ts +7 -6
- package/components/select/select.js +49 -44
- package/components/shortcuts/core.js +4 -4
- package/components/shortcuts/shortcuts-hoc.d.ts +2 -2
- package/components/shortcuts/shortcuts.d.ts +1 -1
- package/components/slider/slider.d.ts +5 -5
- package/components/slider/slider.js +7 -6
- package/components/slider/slider.utils.d.ts +1 -1
- package/components/slider/slider.utils.js +2 -3
- package/components/storage/{storage__local.d.ts → storage-local.d.ts} +1 -1
- package/components/storage/{storage__local.js → storage-local.js} +11 -11
- package/components/storage/storage.d.ts +1 -1
- package/components/storage/storage.js +5 -5
- package/components/style.css +1 -1
- package/components/tab-trap/tab-trap.d.ts +1 -1
- package/components/tab-trap/tab-trap.js +1 -1
- package/components/table/cell.d.ts +1 -1
- package/components/table/disable-hover-hoc.d.ts +1 -1
- package/components/table/header-cell.d.ts +1 -1
- package/components/table/header-cell.js +3 -3
- package/components/table/header.d.ts +2 -2
- package/components/table/header.js +7 -7
- package/components/table/multitable.d.ts +3 -3
- package/components/table/multitable.js +1 -1
- package/components/table/row-with-focus-sensor.d.ts +3 -3
- package/components/table/row-with-focus-sensor.js +5 -5
- package/components/table/row.d.ts +4 -4
- package/components/table/row.js +5 -5
- package/components/table/selection-adapter.d.ts +2 -1
- package/components/table/selection-shortcuts-hoc.d.ts +4 -3
- package/components/table/selection-shortcuts-hoc.js +1 -2
- package/components/table/selection.js +5 -6
- package/components/table/simple-table.d.ts +2 -2
- package/components/table/simple-table.js +6 -6
- package/components/table/smart-table.d.ts +2 -2
- package/components/table/smart-table.js +6 -6
- package/components/table/table.d.ts +7 -7
- package/components/table/table.js +11 -11
- package/components/tabs/collapsible-more.d.ts +3 -3
- package/components/tabs/collapsible-more.js +12 -12
- package/components/tabs/collapsible-tab.d.ts +2 -2
- package/components/tabs/collapsible-tab.js +2 -2
- package/components/tabs/collapsible-tabs.d.ts +2 -2
- package/components/tabs/collapsible-tabs.js +18 -18
- package/components/tabs/custom-item.d.ts +2 -2
- package/components/tabs/dumb-tabs.d.ts +3 -3
- package/components/tabs/dumb-tabs.js +14 -14
- package/components/tabs/smart-tabs.d.ts +1 -1
- package/components/tabs/smart-tabs.js +11 -11
- package/components/tabs/tab-link.d.ts +2 -2
- package/components/tabs/tab-link.js +1 -1
- package/components/tabs/tab.d.ts +2 -2
- package/components/tabs/tabs.js +11 -11
- package/components/tag/tag.d.ts +13 -2
- package/components/tag/tag.js +24 -12
- package/components/tags-input/tags-input.d.ts +8 -8
- package/components/tags-input/tags-input.js +26 -20
- package/components/tags-list/tags-list.d.ts +2 -2
- package/components/tags-list/tags-list.js +5 -5
- package/components/text/text.d.ts +1 -1
- package/components/toggle/toggle.d.ts +1 -1
- package/components/toggle/toggle.js +2 -2
- package/components/tooltip/tooltip.d.ts +2 -2
- package/components/tooltip/tooltip.js +1 -1
- package/components/upload/upload.d.ts +3 -3
- package/components/upload/upload.js +7 -7
- package/components/user-agreement/service.d.ts +2 -2
- package/components/user-agreement/service.js +10 -11
- package/components/user-agreement/user-agreement.d.ts +1 -1
- package/components/user-agreement/user-agreement.js +10 -10
- package/components/user-card/card.d.ts +1 -1
- package/components/user-card/card.js +4 -4
- package/components/user-card/smart-user-card-tooltip.d.ts +2 -2
- package/components/user-card/smart-user-card-tooltip.js +4 -4
- package/components/user-card/tooltip.d.ts +3 -3
- package/components/user-card/tooltip.js +4 -4
- package/components/user-card/user-card.js +4 -4
- package/package.json +2 -2
- package/components/button/button__classes.js +0 -2
- /package/components/_helpers/{button__classes.js → button.classes.js} +0 -0
- /package/components/_helpers/{icon__svg.js → icon-svg.js} +0 -0
- /package/components/_helpers/{query-assist__suggestions.js → query-assist-suggestions.js} +0 -0
- /package/components/dialog/{dialog__body-scroll-preventer.d.ts → dialog-body-scroll-preventer.d.ts} +0 -0
- /package/components/global/{variables.d.ts → variables.interface.d.ts} +0 -0
- /package/components/global/{variables.js → variables.interface.js} +0 -0
- /package/components/hub-source/{hub-source__user.js → hub-source-user.js} +0 -0
- /package/components/hub-source/{hub-source__users-groups.js → hub-source-users-groups.js} +0 -0
- /package/components/icon/{icon__constants.d.ts → icon.constants.d.ts} +0 -0
- /package/components/icon/{icon__constants.js → icon.constants.js} +0 -0
- /package/components/list/{list__classes.js → list.classes.js} +0 -0
- /package/components/loader/{loader__core.d.ts → loader-core.d.ts} +0 -0
- /package/components/old-browsers-message/{old-browsers-message__stop.d.ts → old-browsers-message-stop.d.ts} +0 -0
- /package/components/old-browsers-message/{old-browsers-message__stop.js → old-browsers-message-stop.js} +0 -0
- /package/components/permissions/{permissions__cache.d.ts → permissions-cache.d.ts} +0 -0
|
@@ -23,20 +23,20 @@ import rerenderHOC from '../global/rerender-hoc.js';
|
|
|
23
23
|
import fuzzyHighlight from '../global/fuzzy-highlight.js';
|
|
24
24
|
import memoize from '../global/memoize.js';
|
|
25
25
|
import { I18nContext } from '../i18n/i18n-context.js';
|
|
26
|
-
import { createComposedRef } from '../global/
|
|
26
|
+
import { createComposedRef } from '../global/compose-refs.js';
|
|
27
27
|
import { isArray } from '../global/typescript-utils.js';
|
|
28
28
|
import { ControlsHeightContext } from '../global/controls-height.js';
|
|
29
|
-
import SelectPopup from './
|
|
29
|
+
import SelectPopup from './select-popup.js';
|
|
30
30
|
import { ControlsHeight } from '../global/configuration.js';
|
|
31
31
|
import { Size as Size$1 } from '../avatar/avatar-size.js';
|
|
32
32
|
import { A as Anchor } from '../_helpers/anchor.js';
|
|
33
33
|
import '@jetbrains/icons/chevron-12px-down';
|
|
34
34
|
import 'util-deprecate';
|
|
35
35
|
import '../icon/icon.js';
|
|
36
|
-
import '../icon/
|
|
37
|
-
import '../_helpers/
|
|
38
|
-
import '../link/
|
|
39
|
-
import '../_helpers/
|
|
36
|
+
import '../icon/icon.constants.js';
|
|
37
|
+
import '../_helpers/icon-svg.js';
|
|
38
|
+
import '../link/clickable-link.js';
|
|
39
|
+
import '../_helpers/button.classes.js';
|
|
40
40
|
import '../global/url.js';
|
|
41
41
|
import '../global/dom.js';
|
|
42
42
|
import '../_helpers/avatar-info.js';
|
|
@@ -60,7 +60,7 @@ import 'react-virtualized/dist/es/WindowScroller';
|
|
|
60
60
|
import 'react-virtualized/dist/es/CellMeasurer';
|
|
61
61
|
import 'memoize-one';
|
|
62
62
|
import '../global/create-stateful-context.js';
|
|
63
|
-
import '../list/
|
|
63
|
+
import '../list/list-item.js';
|
|
64
64
|
import '../checkbox/checkbox.js';
|
|
65
65
|
import '@jetbrains/icons/checkmark-12px';
|
|
66
66
|
import '@jetbrains/icons/remove-12px';
|
|
@@ -69,12 +69,12 @@ import '../link/link.js';
|
|
|
69
69
|
import '../_helpers/link.js';
|
|
70
70
|
import '../_helpers/list.js';
|
|
71
71
|
import '../list/consts.js';
|
|
72
|
-
import '../list/
|
|
73
|
-
import '../list/
|
|
72
|
+
import '../list/list.classes.js';
|
|
73
|
+
import '../list/list-custom.js';
|
|
74
74
|
import '../global/get-event-key.js';
|
|
75
|
-
import '../list/
|
|
76
|
-
import '../list/
|
|
77
|
-
import '../list/
|
|
75
|
+
import '../list/list-title.js';
|
|
76
|
+
import '../list/list-separator.js';
|
|
77
|
+
import '../list/list-hint.js';
|
|
78
78
|
import '../i18n/i18n.js';
|
|
79
79
|
import '@jetbrains/icons/search';
|
|
80
80
|
import '../loader-inline/loader-inline.js';
|
|
@@ -83,7 +83,7 @@ import '../tags-list/tags-list.js';
|
|
|
83
83
|
import '../tag/tag.js';
|
|
84
84
|
import '../caret/caret.js';
|
|
85
85
|
import '../text/text.js';
|
|
86
|
-
import '../_helpers/
|
|
86
|
+
import '../_helpers/select-filter.js';
|
|
87
87
|
|
|
88
88
|
var styles = {"select":"ring-select-select","value":"ring-select-value ring-global-ellipsis ring-global-font","icons":"ring-select-icons","toolbar":"ring-select-toolbar","button":"ring-select-button","buttonSpaced":"ring-select-buttonSpaced","inputMode":"ring-select-inputMode","heightS":"ring-select-heightS","heightL":"ring-select-heightL","selectedIcon":"ring-select-selectedIcon ring-global-resetButton","clearIcon":"ring-select-clearIcon","sizeS":"ring-select-sizeS","sizeM":"ring-select-sizeM","sizeL":"ring-select-sizeL","sizeFULL":"ring-select-sizeFULL","sizeAUTO":"ring-select-sizeAUTO","buttonMode":"ring-select-buttonMode","open":"ring-select-open","buttonContainer":"ring-select-buttonContainer","buttonValue":"ring-select-buttonValue ring-global-ellipsis","buttonValueOpen":"ring-select-buttonValueOpen","buttonValueEmpty":"ring-select-buttonValueEmpty","label":"ring-select-label","disabled":"ring-select-disabled","avatar":"ring-select-avatar","popup":"ring-select-popup","chevron":"ring-select-chevron","chevronIcon":"ring-select-chevronIcon"};
|
|
89
89
|
|
|
@@ -116,7 +116,7 @@ function getLowerCaseLabel(item) {
|
|
|
116
116
|
}
|
|
117
117
|
function doesLabelMatch(itemToCheck, fn) {
|
|
118
118
|
const lowerCaseLabel = getLowerCaseLabel(itemToCheck);
|
|
119
|
-
if (lowerCaseLabel
|
|
119
|
+
if (lowerCaseLabel === null || lowerCaseLabel === undefined) {
|
|
120
120
|
return true;
|
|
121
121
|
}
|
|
122
122
|
return fn(lowerCaseLabel);
|
|
@@ -138,6 +138,7 @@ function buildMultipleMap(selected) {
|
|
|
138
138
|
return acc;
|
|
139
139
|
}, {});
|
|
140
140
|
}
|
|
141
|
+
// eslint-disable-next-line complexity
|
|
141
142
|
function getListItems(props, state, rawFilterString) {
|
|
142
143
|
let data = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : props.data;
|
|
143
144
|
let filterString = rawFilterString.trim();
|
|
@@ -196,7 +197,7 @@ const getItemLabel = _ref => {
|
|
|
196
197
|
selectedLabel,
|
|
197
198
|
label
|
|
198
199
|
} = _ref;
|
|
199
|
-
if (selectedLabel
|
|
200
|
+
if (selectedLabel !== null && selectedLabel !== undefined) {
|
|
200
201
|
return selectedLabel;
|
|
201
202
|
}
|
|
202
203
|
return typeof label === 'string' ? label : '';
|
|
@@ -295,7 +296,8 @@ class Select extends Component {
|
|
|
295
296
|
var _this$_popup3;
|
|
296
297
|
if (!((_this$_popup3 = this._popup) !== null && _this$_popup3 !== void 0 && _this$_popup3.isVisible())) {
|
|
297
298
|
return true;
|
|
298
|
-
}
|
|
299
|
+
}
|
|
300
|
+
if (this.props.multiple || !this.props.getInitial) {
|
|
299
301
|
return false;
|
|
300
302
|
}
|
|
301
303
|
const selected = {
|
|
@@ -443,7 +445,7 @@ class Select extends Component {
|
|
|
443
445
|
if (!tryKeepOpen) {
|
|
444
446
|
_this._hidePopup(isSelectItemEvent);
|
|
445
447
|
}
|
|
446
|
-
if (selected.key
|
|
448
|
+
if (selected.key === null || selected.key === undefined) {
|
|
447
449
|
throw new Error('Multiple selection requires each item to have the "key" property');
|
|
448
450
|
}
|
|
449
451
|
_this.setState(prevState => {
|
|
@@ -623,7 +625,7 @@ class Select extends Component {
|
|
|
623
625
|
addButton
|
|
624
626
|
});
|
|
625
627
|
}
|
|
626
|
-
const isSelectionEmpty = nextProps.selected
|
|
628
|
+
const isSelectionEmpty = nextProps.selected === null || nextProps.selected === undefined || Array.isArray(nextProps.selected) && nextProps.selected.length === 0;
|
|
627
629
|
if (isSelectionEmpty) {
|
|
628
630
|
nextState.lastInteractedKey = null;
|
|
629
631
|
}
|
|
@@ -658,7 +660,7 @@ class Select extends Component {
|
|
|
658
660
|
lastInteractedKey
|
|
659
661
|
} = this.state;
|
|
660
662
|
const isNonOptionItem = item => item.isResetItem || List.isItemType(List.ListProps.Type.SEPARATOR, item);
|
|
661
|
-
if (lastInteractedKey
|
|
663
|
+
if (lastInteractedKey !== null && lastInteractedKey !== undefined) {
|
|
662
664
|
const index = items.findIndex(item => item.key === lastInteractedKey && !isNonOptionItem(item));
|
|
663
665
|
if (index >= 0) return index;
|
|
664
666
|
}
|
|
@@ -699,7 +701,7 @@ class Select extends Component {
|
|
|
699
701
|
template: jsx(Button, {
|
|
700
702
|
inline: true,
|
|
701
703
|
className: styles.button,
|
|
702
|
-
"data-test":
|
|
704
|
+
"data-test": 'ring-select-reset-tags-button',
|
|
703
705
|
height: ControlsHeight.S,
|
|
704
706
|
children: reset.label
|
|
705
707
|
}),
|
|
@@ -726,6 +728,7 @@ class Select extends Component {
|
|
|
726
728
|
showPopup,
|
|
727
729
|
shownData
|
|
728
730
|
} = this.state;
|
|
731
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
729
732
|
const _shownData = this._prependResetOption(shownData);
|
|
730
733
|
const activeIndex = this._getActiveIndex(_shownData);
|
|
731
734
|
return jsx(I18nContext.Consumer, {
|
|
@@ -805,17 +808,17 @@ class Select extends Component {
|
|
|
805
808
|
className: classNames({
|
|
806
809
|
[styles.toolbar]: Boolean(this.state.addButton || renderBottomToolbar)
|
|
807
810
|
}),
|
|
808
|
-
"data-test":
|
|
811
|
+
"data-test": 'ring-select-toolbar',
|
|
809
812
|
children: [renderBottomToolbar && renderBottomToolbar(), this.state.addButton && jsx(Button, {
|
|
810
813
|
inline: true,
|
|
811
814
|
delayed: delayed,
|
|
812
815
|
className: classNames(styles.button, styles.buttonSpaced),
|
|
813
816
|
onClick: this.addHandler,
|
|
814
|
-
"data-test":
|
|
817
|
+
"data-test": 'ring-select-toolbar-button',
|
|
815
818
|
children: prefix ? "".concat(prefix, " ").concat(label) : label
|
|
816
819
|
}), hint && jsx(List.ListHint, {
|
|
817
820
|
label: hint,
|
|
818
|
-
"data-test":
|
|
821
|
+
"data-test": 'ring-select-toolbar-hint'
|
|
819
822
|
})]
|
|
820
823
|
});
|
|
821
824
|
}
|
|
@@ -842,9 +845,8 @@ class Select extends Component {
|
|
|
842
845
|
filterValue: setValue
|
|
843
846
|
});
|
|
844
847
|
return undefined;
|
|
845
|
-
} else {
|
|
846
|
-
return this.state.filterValue;
|
|
847
848
|
}
|
|
849
|
+
return this.state.filterValue;
|
|
848
850
|
}
|
|
849
851
|
isInputMode() {
|
|
850
852
|
return isInputMode(this.props.type);
|
|
@@ -877,9 +879,11 @@ class Select extends Component {
|
|
|
877
879
|
labels.push(getItemLabel(this.state.selected[i]));
|
|
878
880
|
}
|
|
879
881
|
return labels.filter(Boolean).join(', ');
|
|
880
|
-
} else {
|
|
881
|
-
return this.state.selected != null ? getItemLabel(this.state.selected) : null;
|
|
882
882
|
}
|
|
883
|
+
return this.state.selected !== null && this.state.selected !== undefined ? getItemLabel(this.state.selected) : null;
|
|
884
|
+
}
|
|
885
|
+
getHeight() {
|
|
886
|
+
return this.props.height || (typeof this.context === 'function' ? this.context() : this.context);
|
|
883
887
|
}
|
|
884
888
|
_getIcons() {
|
|
885
889
|
const {
|
|
@@ -891,40 +895,40 @@ class Select extends Component {
|
|
|
891
895
|
hideArrow
|
|
892
896
|
} = this.props;
|
|
893
897
|
const icons = [];
|
|
894
|
-
const height = this.
|
|
898
|
+
const height = this.getHeight();
|
|
895
899
|
if (!Array.isArray(selected) && selected !== null && selected !== void 0 && selected.icon) {
|
|
896
900
|
icons.push(jsx("button", {
|
|
897
|
-
title:
|
|
898
|
-
type:
|
|
901
|
+
title: 'Toggle options popup',
|
|
902
|
+
type: 'button',
|
|
899
903
|
className: styles.selectedIcon,
|
|
900
904
|
disabled: this.props.disabled,
|
|
901
905
|
onClick: this._clickHandler,
|
|
902
906
|
style: {
|
|
903
907
|
backgroundImage: "url(".concat(selected.icon, ")")
|
|
904
908
|
}
|
|
905
|
-
},
|
|
909
|
+
}, 'selected'));
|
|
906
910
|
}
|
|
907
911
|
if (clear && !disabled && !this._selectionIsEmpty()) {
|
|
908
912
|
icons.push(jsx(Button, {
|
|
909
|
-
title:
|
|
910
|
-
"data-test":
|
|
913
|
+
title: 'Clear selection',
|
|
914
|
+
"data-test": 'ring-clear-select',
|
|
911
915
|
className: styles.clearIcon,
|
|
912
916
|
disabled: this.props.disabled,
|
|
913
917
|
onClick: this.clear,
|
|
914
918
|
height: height,
|
|
915
919
|
icon: closeIcon
|
|
916
|
-
},
|
|
920
|
+
}, 'close'));
|
|
917
921
|
}
|
|
918
922
|
if (!hideArrow) {
|
|
919
923
|
icons.push(jsx(Button, {
|
|
920
|
-
title:
|
|
924
|
+
title: 'Toggle options popup',
|
|
921
925
|
className: styles.chevron,
|
|
922
926
|
iconClassName: styles.chevronIcon,
|
|
923
927
|
icon: chevronDownIcon,
|
|
924
928
|
disabled: this.props.disabled,
|
|
925
929
|
height: height,
|
|
926
930
|
onClick: this._clickHandler
|
|
927
|
-
},
|
|
931
|
+
}, 'hide'));
|
|
928
932
|
}
|
|
929
933
|
return icons;
|
|
930
934
|
}
|
|
@@ -950,6 +954,7 @@ class Select extends Component {
|
|
|
950
954
|
space: noop
|
|
951
955
|
};
|
|
952
956
|
}
|
|
957
|
+
// eslint-disable-next-line complexity
|
|
953
958
|
renderSelect(activeItemId) {
|
|
954
959
|
var _ref4, _this$props$label3, _this$_popup5, _this$props$buttonCla;
|
|
955
960
|
const dataTest = this.props['data-test'];
|
|
@@ -959,7 +964,7 @@ class Select extends Component {
|
|
|
959
964
|
const {
|
|
960
965
|
shortcutsEnabled
|
|
961
966
|
} = this.state;
|
|
962
|
-
const classes = classNames(styles.select, 'ring-js-shortcuts', this.props.className, styles["height".concat(this.
|
|
967
|
+
const classes = classNames(styles.select, 'ring-js-shortcuts', this.props.className, styles["height".concat(this.getHeight())], {
|
|
963
968
|
[styles["size".concat(this.props.size)]]: this.props.type !== Type.INLINE,
|
|
964
969
|
[styles.disabled]: this.props.disabled
|
|
965
970
|
});
|
|
@@ -988,7 +993,7 @@ class Select extends Component {
|
|
|
988
993
|
ref: this.nodeRef,
|
|
989
994
|
className: classNames(classes, styles.inputMode),
|
|
990
995
|
"data-test": joinDataTestAttributes('ring-select', dataTest),
|
|
991
|
-
role:
|
|
996
|
+
role: 'presentation' // has interactive elements inside
|
|
992
997
|
,
|
|
993
998
|
onMouseDown: this.mouseDownHandler,
|
|
994
999
|
onMouseUp: this.mouseUpHandler,
|
|
@@ -997,7 +1002,7 @@ class Select extends Component {
|
|
|
997
1002
|
scope: this.shortcutsScope
|
|
998
1003
|
}), jsx(Input, _objectSpread2(_objectSpread2({}, ariaProps), {}, {
|
|
999
1004
|
height: this.props.height,
|
|
1000
|
-
autoComplete:
|
|
1005
|
+
autoComplete: 'off',
|
|
1001
1006
|
id: this.props.id,
|
|
1002
1007
|
onClick: this._clickHandler,
|
|
1003
1008
|
inputRef: this.composedFilterRef(this.filterRef, this.props.filterRef),
|
|
@@ -1010,11 +1015,11 @@ class Select extends Component {
|
|
|
1010
1015
|
onFocus: this._focusHandler,
|
|
1011
1016
|
onBlur: this._blurHandler,
|
|
1012
1017
|
// Input with error style without description
|
|
1013
|
-
error: this.props.error
|
|
1018
|
+
error: this.props.error ? '' : null,
|
|
1014
1019
|
label: this.props.type === Type.INPUT ? this._getLabel() : null,
|
|
1015
1020
|
placeholder: this.props.inputPlaceholder,
|
|
1016
1021
|
onKeyDown: this.props.onKeyDown,
|
|
1017
|
-
"data-test":
|
|
1022
|
+
"data-test": 'ring-select__focus',
|
|
1018
1023
|
enableShortcuts: shortcutsEnabled ? Object.keys(_objectSpread2(_objectSpread2({}, this.getShortcutsMap()), (_this$_popup5 = this._popup) === null || _this$_popup5 === void 0 || (_this$_popup5 = _this$_popup5.list) === null || _this$_popup5 === void 0 ? void 0 : _this$_popup5.shortcutsMap)) : undefined,
|
|
1019
1024
|
icon: this.props.filterIcon,
|
|
1020
1025
|
afterInput: iconsNode
|
|
@@ -1049,7 +1054,7 @@ class Select extends Component {
|
|
|
1049
1054
|
}),
|
|
1050
1055
|
disabled: this.props.disabled,
|
|
1051
1056
|
style: style,
|
|
1052
|
-
"data-test":
|
|
1057
|
+
"data-test": 'ring-select__button ring-select__focus',
|
|
1053
1058
|
children: [this._getAvatar(), this._getPlaceholder()]
|
|
1054
1059
|
})), iconsNode]
|
|
1055
1060
|
}), this._renderPopup()]
|
|
@@ -1066,7 +1071,7 @@ class Select extends Component {
|
|
|
1066
1071
|
className: (_this$props$buttonCla = this.props.buttonClassName) !== null && _this$props$buttonCla !== void 0 ? _this$props$buttonCla : undefined,
|
|
1067
1072
|
id: this.props.id,
|
|
1068
1073
|
onClick: this._clickHandler,
|
|
1069
|
-
"data-test":
|
|
1074
|
+
"data-test": 'ring-select__focus',
|
|
1070
1075
|
disabled: this.props.disabled,
|
|
1071
1076
|
active: this.state.showPopup,
|
|
1072
1077
|
children: this._getPlaceholder()
|
|
@@ -1097,7 +1102,7 @@ class Select extends Component {
|
|
|
1097
1102
|
return jsx("span", {
|
|
1098
1103
|
id: this.props.id,
|
|
1099
1104
|
ref: this.nodeRef,
|
|
1100
|
-
"data-test":
|
|
1105
|
+
"data-test": 'ring-select',
|
|
1101
1106
|
children: this._renderPopup()
|
|
1102
1107
|
});
|
|
1103
1108
|
}
|
|
@@ -20,7 +20,7 @@ class Shortcuts {
|
|
|
20
20
|
for (let i = this._scopeChain.length - 1; i >= 0; i--) {
|
|
21
21
|
const scopeInChain = this._scopeChain[i];
|
|
22
22
|
currentScope = this._scopes[scopeInChain.scopeId];
|
|
23
|
-
if (currentScope && key
|
|
23
|
+
if (currentScope && key !== null && key !== undefined && currentScope[key]) {
|
|
24
24
|
const ret = currentScope[key](e, key, scopeInChain.scopeId);
|
|
25
25
|
// Fall down in chain when returning true
|
|
26
26
|
if (ret !== true) {
|
|
@@ -35,7 +35,7 @@ class Shortcuts {
|
|
|
35
35
|
});
|
|
36
36
|
_defineProperty(this, "_defaultFilter", (e, element, key) => {
|
|
37
37
|
// if the element or its parents have the class "ring-js-shortcuts" then no need to stop
|
|
38
|
-
if (element === document || !(element instanceof HTMLElement) || key
|
|
38
|
+
if (element === document || !(element instanceof HTMLElement) || key === null || element.matches(this.ALLOW_SHORTCUTS_SELECTOR) || (element.dataset.enabledShortcuts ? key && element.dataset.enabledShortcuts.split(',').includes(key) : !!element.closest(this.ALLOW_SHORTCUTS_SELECTOR))) {
|
|
39
39
|
return false;
|
|
40
40
|
}
|
|
41
41
|
const elementContentEditableAttribute = element.contentEditable;
|
|
@@ -91,7 +91,7 @@ class Shortcuts {
|
|
|
91
91
|
throw new Error("Shortcuts map shouldn't be empty");
|
|
92
92
|
}
|
|
93
93
|
for (const key in map) {
|
|
94
|
-
if (
|
|
94
|
+
if (Object.prototype.hasOwnProperty.call(map, key)) {
|
|
95
95
|
this.bind(Object.assign({}, options || {}, {
|
|
96
96
|
key,
|
|
97
97
|
handler: map[key]
|
|
@@ -145,7 +145,7 @@ class Shortcuts {
|
|
|
145
145
|
setScope(scope) {
|
|
146
146
|
if (scope) {
|
|
147
147
|
let scopeChain;
|
|
148
|
-
if (typeof scope === 'string' || !Array.isArray(scope) && typeof scope === 'object'
|
|
148
|
+
if (typeof scope === 'string' || !Array.isArray(scope) && typeof scope === 'object') {
|
|
149
149
|
scopeChain = [scope];
|
|
150
150
|
} else {
|
|
151
151
|
scopeChain = scope;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ComponentClass, ComponentType } from 'react';
|
|
2
|
-
import { ShortcutsMap, ShortcutsScopeOptions } from './core';
|
|
1
|
+
import { type ComponentClass, type ComponentType } from 'react';
|
|
2
|
+
import { type ShortcutsMap, type ShortcutsScopeOptions } from './core';
|
|
3
3
|
export interface ShortcutsHOCOptions extends ShortcutsScopeOptions {
|
|
4
4
|
disabled?: boolean | null | undefined;
|
|
5
5
|
}
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
|
|
3
|
+
interface Mark {
|
|
4
4
|
value: number;
|
|
5
5
|
label?: ReactNode;
|
|
6
|
-
}
|
|
7
|
-
|
|
6
|
+
}
|
|
7
|
+
interface Props {
|
|
8
8
|
defaultValue?: number | number[];
|
|
9
9
|
value?: number | number[];
|
|
10
10
|
min?: number;
|
|
@@ -17,6 +17,6 @@ type Props = {
|
|
|
17
17
|
className?: string;
|
|
18
18
|
renderTag?: (value: number) => ReactNode;
|
|
19
19
|
onChange?: (value: number | number[]) => void;
|
|
20
|
-
}
|
|
20
|
+
}
|
|
21
21
|
export declare const Slider: React.FC<Props>;
|
|
22
22
|
export {};
|
|
@@ -45,7 +45,8 @@ const Slider = _ref => {
|
|
|
45
45
|
return marks.map(mark => _objectSpread2(_objectSpread2({}, mark), {}, {
|
|
46
46
|
value: validateValue(mark.value, min, max)
|
|
47
47
|
}));
|
|
48
|
-
}
|
|
48
|
+
}
|
|
49
|
+
if (marks) {
|
|
49
50
|
return calculateMarks(min, max, validStep);
|
|
50
51
|
}
|
|
51
52
|
return [];
|
|
@@ -116,7 +117,7 @@ const Slider = _ref => {
|
|
|
116
117
|
}
|
|
117
118
|
const index = e.currentTarget.getAttribute('data-index');
|
|
118
119
|
const nextValue = calculateValue(ref, e.pageX, min, max, validStep);
|
|
119
|
-
if (nextValue
|
|
120
|
+
if (nextValue && !isNaN(nextValue) && !index) {
|
|
120
121
|
const rangeIndex = Number(Math.abs(validValues[0] - nextValue) > Math.abs(validValues[1] - nextValue));
|
|
121
122
|
setDraggedIndex(isRange ? rangeIndex : 0);
|
|
122
123
|
} else {
|
|
@@ -167,7 +168,7 @@ const Slider = _ref => {
|
|
|
167
168
|
}, [isDragging, handleMouseMove, handleMouseUp, disabled]);
|
|
168
169
|
return jsxs("div", {
|
|
169
170
|
ref: ref,
|
|
170
|
-
role:
|
|
171
|
+
role: 'presentation' // contains interactive elements
|
|
171
172
|
,
|
|
172
173
|
className: classNames(styles.slider, className, {
|
|
173
174
|
[styles.disabled]: disabled,
|
|
@@ -199,8 +200,8 @@ const Slider = _ref => {
|
|
|
199
200
|
jsxs(Fragment, {
|
|
200
201
|
children: [jsx("div", {
|
|
201
202
|
tabIndex: 0,
|
|
202
|
-
"aria-label":
|
|
203
|
-
role:
|
|
203
|
+
"aria-label": 'Pick value',
|
|
204
|
+
role: 'slider',
|
|
204
205
|
"aria-valuemin": min,
|
|
205
206
|
"aria-valuemax": max,
|
|
206
207
|
"aria-valuenow": numValue,
|
|
@@ -220,7 +221,7 @@ const Slider = _ref => {
|
|
|
220
221
|
className: classNames(styles.tag, {
|
|
221
222
|
[styles.disabled]: disabled
|
|
222
223
|
}),
|
|
223
|
-
role:
|
|
224
|
+
role: 'tooltip',
|
|
224
225
|
children: renderTag ? renderTag(numValue) : numValue
|
|
225
226
|
})]
|
|
226
227
|
}, index)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RefObject } from 'react';
|
|
1
|
+
import { type RefObject } from 'react';
|
|
2
2
|
export declare const HUNDRED = 100;
|
|
3
3
|
export declare function toPercent(value: number, min: number, max: number): number;
|
|
4
4
|
export declare function calculateValue(ref: RefObject<HTMLDivElement | null>, x: number, min: number, max: number, step: number): number | null;
|
|
@@ -41,14 +41,13 @@ function toRange(value, min, max) {
|
|
|
41
41
|
nextValues.reverse();
|
|
42
42
|
}
|
|
43
43
|
return nextValues;
|
|
44
|
-
} else {
|
|
45
|
-
return [validateValue(value, min, max)];
|
|
46
44
|
}
|
|
45
|
+
return [validateValue(value, min, max)];
|
|
47
46
|
}
|
|
48
47
|
function adjustValues(values, ref, index, x, max, min, step) {
|
|
49
48
|
const nextValue = calculateValue(ref, x, min, max, step);
|
|
50
49
|
const nextValues = [...values];
|
|
51
|
-
if (nextValue
|
|
50
|
+
if (nextValue && !isNaN(nextValue)) {
|
|
52
51
|
nextValues[index] = validateValue(nextValue, min, max);
|
|
53
52
|
}
|
|
54
53
|
return nextValues;
|
|
@@ -13,8 +13,8 @@ import '@jetbrains/icons/warning';
|
|
|
13
13
|
import '@jetbrains/icons/close';
|
|
14
14
|
import '../icon/icon.js';
|
|
15
15
|
import 'util-deprecate';
|
|
16
|
-
import '../icon/
|
|
17
|
-
import '../_helpers/
|
|
16
|
+
import '../icon/icon.constants.js';
|
|
17
|
+
import '../_helpers/icon-svg.js';
|
|
18
18
|
import 'core-js/modules/es.regexp.exec.js';
|
|
19
19
|
import 'core-js/modules/es.string.replace.js';
|
|
20
20
|
import '../global/memoize.js';
|
|
@@ -24,10 +24,10 @@ import '../global/dom.js';
|
|
|
24
24
|
import '../button/button.js';
|
|
25
25
|
import '@jetbrains/icons/chevron-down';
|
|
26
26
|
import '@jetbrains/icons/chevron-12px-down';
|
|
27
|
-
import '../link/
|
|
27
|
+
import '../link/clickable-link.js';
|
|
28
28
|
import '../global/controls-height.js';
|
|
29
29
|
import '../global/configuration.js';
|
|
30
|
-
import '../_helpers/
|
|
30
|
+
import '../_helpers/button.classes.js';
|
|
31
31
|
import '../_helpers/theme.js';
|
|
32
32
|
import 'react-dom';
|
|
33
33
|
import '../popup/popup.target.js';
|
|
@@ -73,14 +73,14 @@ class LocalStorage {
|
|
|
73
73
|
get(name) {
|
|
74
74
|
return LocalStorage.safePromise(resolve => {
|
|
75
75
|
const value = window[this.storageType].getItem(name);
|
|
76
|
-
if (value
|
|
76
|
+
if (value) {
|
|
77
77
|
try {
|
|
78
78
|
resolve(JSON.parse(value));
|
|
79
79
|
} catch (e) {
|
|
80
80
|
resolve(value);
|
|
81
81
|
}
|
|
82
82
|
} else {
|
|
83
|
-
resolve(
|
|
83
|
+
resolve(null);
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
}
|
|
@@ -102,7 +102,7 @@ class LocalStorage {
|
|
|
102
102
|
remove(name) {
|
|
103
103
|
const storageType = this.storageType;
|
|
104
104
|
return LocalStorage.safePromise(resolve => {
|
|
105
|
-
if (window[storageType]
|
|
105
|
+
if (Object.prototype.hasOwnProperty.call(window[storageType], name)) {
|
|
106
106
|
window[storageType].removeItem(name);
|
|
107
107
|
}
|
|
108
108
|
resolve();
|
|
@@ -117,10 +117,10 @@ class LocalStorage {
|
|
|
117
117
|
return LocalStorage.safePromise(resolve => {
|
|
118
118
|
const promises = [];
|
|
119
119
|
for (const item in window[storageType]) {
|
|
120
|
-
if (window[storageType]
|
|
120
|
+
if (Object.prototype.hasOwnProperty.call(window[storageType], item)) {
|
|
121
121
|
const value = window[storageType].getItem(item);
|
|
122
122
|
let resolvedValue = null;
|
|
123
|
-
if (value
|
|
123
|
+
if (value) {
|
|
124
124
|
try {
|
|
125
125
|
resolvedValue = JSON.parse(value);
|
|
126
126
|
} catch (e) {
|
|
@@ -141,14 +141,14 @@ class LocalStorage {
|
|
|
141
141
|
on(name, callback) {
|
|
142
142
|
function handleStorage(e) {
|
|
143
143
|
if (e.key === name) {
|
|
144
|
-
if (e.newValue
|
|
144
|
+
if (e.newValue) {
|
|
145
145
|
try {
|
|
146
146
|
callback(JSON.parse(e.newValue));
|
|
147
147
|
} catch (err) {
|
|
148
148
|
callback(e.newValue);
|
|
149
149
|
}
|
|
150
150
|
} else {
|
|
151
|
-
callback(
|
|
151
|
+
callback(null);
|
|
152
152
|
}
|
|
153
153
|
}
|
|
154
154
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import LocalStorage from './
|
|
1
|
+
import LocalStorage from './storage-local.js';
|
|
2
2
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
3
3
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
4
4
|
import '../alert-service/alert-service.js';
|
|
@@ -14,8 +14,8 @@ import '@jetbrains/icons/warning';
|
|
|
14
14
|
import '@jetbrains/icons/close';
|
|
15
15
|
import '../icon/icon.js';
|
|
16
16
|
import 'util-deprecate';
|
|
17
|
-
import '../icon/
|
|
18
|
-
import '../_helpers/
|
|
17
|
+
import '../icon/icon.constants.js';
|
|
18
|
+
import '../_helpers/icon-svg.js';
|
|
19
19
|
import 'core-js/modules/es.regexp.exec.js';
|
|
20
20
|
import 'core-js/modules/es.string.replace.js';
|
|
21
21
|
import '../global/memoize.js';
|
|
@@ -25,10 +25,10 @@ import '../global/dom.js';
|
|
|
25
25
|
import '../button/button.js';
|
|
26
26
|
import '@jetbrains/icons/chevron-down';
|
|
27
27
|
import '@jetbrains/icons/chevron-12px-down';
|
|
28
|
-
import '../link/
|
|
28
|
+
import '../link/clickable-link.js';
|
|
29
29
|
import '../global/controls-height.js';
|
|
30
30
|
import '../global/configuration.js';
|
|
31
|
-
import '../_helpers/
|
|
31
|
+
import '../_helpers/button.classes.js';
|
|
32
32
|
import '../_helpers/theme.js';
|
|
33
33
|
import 'react-dom';
|
|
34
34
|
import '../popup/popup.target.js';
|