@jetbrains/ring-ui-built 7.0.62 → 7.0.64
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 +4 -3
- 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 +6 -6
- package/components/select/select.js +44 -42
- 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 +5 -3
- package/components/tag/tag.js +14 -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 +1 -1
- 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
|
@@ -11,7 +11,7 @@ import getTabTitles from './collapsible-tab.js';
|
|
|
11
11
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
12
12
|
import '../link/link.js';
|
|
13
13
|
import '../global/data-tests.js';
|
|
14
|
-
import '../link/
|
|
14
|
+
import '../link/clickable-link.js';
|
|
15
15
|
import '../_helpers/link.js';
|
|
16
16
|
import '../popup/popup.consts.js';
|
|
17
17
|
import '../popup-menu/popup-menu.js';
|
|
@@ -42,7 +42,7 @@ import 'util-deprecate';
|
|
|
42
42
|
import 'memoize-one';
|
|
43
43
|
import '../global/memoize.js';
|
|
44
44
|
import '../global/create-stateful-context.js';
|
|
45
|
-
import '../list/
|
|
45
|
+
import '../list/list-item.js';
|
|
46
46
|
import '../avatar/avatar.js';
|
|
47
47
|
import '../global/url.js';
|
|
48
48
|
import '../_helpers/avatar-info.js';
|
|
@@ -52,18 +52,18 @@ import '../checkbox/checkbox.js';
|
|
|
52
52
|
import '@jetbrains/icons/checkmark-12px';
|
|
53
53
|
import '@jetbrains/icons/remove-12px';
|
|
54
54
|
import '../icon/icon.js';
|
|
55
|
-
import '../icon/
|
|
56
|
-
import '../_helpers/
|
|
57
|
-
import '../global/
|
|
55
|
+
import '../icon/icon.constants.js';
|
|
56
|
+
import '../_helpers/icon-svg.js';
|
|
57
|
+
import '../global/compose-refs.js';
|
|
58
58
|
import '../control-help/control-help.js';
|
|
59
59
|
import '../_helpers/list.js';
|
|
60
60
|
import '../list/consts.js';
|
|
61
|
-
import '../list/
|
|
62
|
-
import '../list/
|
|
61
|
+
import '../list/list.classes.js';
|
|
62
|
+
import '../list/list-custom.js';
|
|
63
63
|
import '../global/get-event-key.js';
|
|
64
|
-
import '../list/
|
|
65
|
-
import '../list/
|
|
66
|
-
import '../list/
|
|
64
|
+
import '../list/list-title.js';
|
|
65
|
+
import '../list/list-separator.js';
|
|
66
|
+
import '../list/list-hint.js';
|
|
67
67
|
import '../dropdown/dropdown.js';
|
|
68
68
|
import '../global/typescript-utils.js';
|
|
69
69
|
import '../_helpers/anchor.js';
|
|
@@ -71,7 +71,7 @@ import '../button/button.js';
|
|
|
71
71
|
import '@jetbrains/icons/chevron-down';
|
|
72
72
|
import '@jetbrains/icons/chevron-12px-down';
|
|
73
73
|
import '../global/controls-height.js';
|
|
74
|
-
import '../_helpers/
|
|
74
|
+
import '../_helpers/button.classes.js';
|
|
75
75
|
import './custom-item.js';
|
|
76
76
|
|
|
77
77
|
const DEFAULT_DEBOUNCE_INTERVAL = 100;
|
|
@@ -123,11 +123,11 @@ const CollapsibleTabs = _ref => {
|
|
|
123
123
|
const hiddenElements = useMemo(() => {
|
|
124
124
|
if (preparedElements.ready) {
|
|
125
125
|
return preparedElements.hidden;
|
|
126
|
-
}
|
|
126
|
+
}
|
|
127
|
+
if (initialVisibleItems) {
|
|
127
128
|
return children.filter(item => !visibleElements.some(visibleItem => visibleItem.props.child === item));
|
|
128
|
-
} else {
|
|
129
|
-
return [];
|
|
130
129
|
}
|
|
130
|
+
return [];
|
|
131
131
|
}, [children, preparedElements.hidden, preparedElements.ready, visibleElements, initialVisibleItems]);
|
|
132
132
|
const adjustTabs = useCallback(entry => {
|
|
133
133
|
const containerWidth = entry.contentRect.width;
|
|
@@ -191,11 +191,11 @@ const CollapsibleTabs = _ref => {
|
|
|
191
191
|
}, {
|
|
192
192
|
visible: [],
|
|
193
193
|
hidden: [],
|
|
194
|
-
ready: elements.lastVisibleIndex
|
|
194
|
+
ready: !!elements.lastVisibleIndex
|
|
195
195
|
});
|
|
196
196
|
if (selectedIndex > ((_elements$lastVisible2 = elements.lastVisibleIndex) !== null && _elements$lastVisible2 !== void 0 ? _elements$lastVisible2 : 0)) {
|
|
197
197
|
const selectedItem = children.find(tab => !tab.props.alwaysHidden && tab.props.id === selected);
|
|
198
|
-
if (selectedItem
|
|
198
|
+
if (selectedItem) {
|
|
199
199
|
res.visible.push(selectedItem);
|
|
200
200
|
}
|
|
201
201
|
}
|
|
@@ -219,7 +219,7 @@ const CollapsibleTabs = _ref => {
|
|
|
219
219
|
}, [children]);
|
|
220
220
|
// Initial measure for tabs and more button sizes
|
|
221
221
|
useEffect(() => {
|
|
222
|
-
if (measureRef.current
|
|
222
|
+
if (measureRef.current === null) {
|
|
223
223
|
return undefined;
|
|
224
224
|
}
|
|
225
225
|
const measureTask = fastdom.measure(() => {
|
|
@@ -272,7 +272,7 @@ const CollapsibleTabs = _ref => {
|
|
|
272
272
|
resizeObserver.disconnect();
|
|
273
273
|
};
|
|
274
274
|
}, [adjustTabs]);
|
|
275
|
-
const isAdjusted = elements.lastVisibleIndex
|
|
275
|
+
const isAdjusted = !!elements.lastVisibleIndex && preparedElements.ready || initialVisibleItems;
|
|
276
276
|
const className = classNames(styles.titles, styles.autoCollapse, isAdjusted && styles.adjusted);
|
|
277
277
|
return jsxs("div", {
|
|
278
278
|
className: styles.autoCollapseContainer,
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
import { TabProps } from './tab';
|
|
1
|
+
import { type ReactElement } from 'react';
|
|
2
|
+
import { type TabProps } from './tab';
|
|
3
3
|
export declare const CustomItem: ({ children }: TabProps) => ReactElement;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { PureComponent, ReactElement } from 'react';
|
|
1
|
+
import { PureComponent, type ReactElement } from 'react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { CollapsibleTabsProps } from './collapsible-tabs';
|
|
3
|
+
import { type CollapsibleTabsProps } from './collapsible-tabs';
|
|
4
4
|
import { CustomItem } from './custom-item';
|
|
5
|
-
import { TabProps } from './tab';
|
|
5
|
+
import { type TabProps } from './tab';
|
|
6
6
|
export { CustomItem };
|
|
7
7
|
export type Children = readonly (Children | null | boolean)[] | ReactElement<TabProps> | null | boolean;
|
|
8
8
|
export interface TabsProps extends Omit<CollapsibleTabsProps, 'onSelect' | 'children'> {
|
|
@@ -10,7 +10,7 @@ import { s as styles, T as TabLink } from '../_helpers/tab-link.js';
|
|
|
10
10
|
import CollapsibleTabs from './collapsible-tabs.js';
|
|
11
11
|
import { CustomItem } from './custom-item.js';
|
|
12
12
|
import '../link/link.js';
|
|
13
|
-
import '../link/
|
|
13
|
+
import '../link/clickable-link.js';
|
|
14
14
|
import '../_helpers/link.js';
|
|
15
15
|
import 'core-js/modules/es.regexp.exec.js';
|
|
16
16
|
import 'core-js/modules/es.string.replace.js';
|
|
@@ -44,7 +44,7 @@ import 'react-virtualized/dist/es/CellMeasurer';
|
|
|
44
44
|
import 'util-deprecate';
|
|
45
45
|
import 'memoize-one';
|
|
46
46
|
import '../global/create-stateful-context.js';
|
|
47
|
-
import '../list/
|
|
47
|
+
import '../list/list-item.js';
|
|
48
48
|
import '../avatar/avatar.js';
|
|
49
49
|
import '../global/url.js';
|
|
50
50
|
import '../_helpers/avatar-info.js';
|
|
@@ -54,18 +54,18 @@ import '../checkbox/checkbox.js';
|
|
|
54
54
|
import '@jetbrains/icons/checkmark-12px';
|
|
55
55
|
import '@jetbrains/icons/remove-12px';
|
|
56
56
|
import '../icon/icon.js';
|
|
57
|
-
import '../icon/
|
|
58
|
-
import '../_helpers/
|
|
59
|
-
import '../global/
|
|
57
|
+
import '../icon/icon.constants.js';
|
|
58
|
+
import '../_helpers/icon-svg.js';
|
|
59
|
+
import '../global/compose-refs.js';
|
|
60
60
|
import '../control-help/control-help.js';
|
|
61
61
|
import '../_helpers/list.js';
|
|
62
62
|
import '../list/consts.js';
|
|
63
|
-
import '../list/
|
|
64
|
-
import '../list/
|
|
63
|
+
import '../list/list.classes.js';
|
|
64
|
+
import '../list/list-custom.js';
|
|
65
65
|
import '../global/get-event-key.js';
|
|
66
|
-
import '../list/
|
|
67
|
-
import '../list/
|
|
68
|
-
import '../list/
|
|
66
|
+
import '../list/list-title.js';
|
|
67
|
+
import '../list/list-separator.js';
|
|
68
|
+
import '../list/list-hint.js';
|
|
69
69
|
import '../dropdown/dropdown.js';
|
|
70
70
|
import '../global/typescript-utils.js';
|
|
71
71
|
import '../_helpers/anchor.js';
|
|
@@ -73,7 +73,7 @@ import '../button/button.js';
|
|
|
73
73
|
import '@jetbrains/icons/chevron-down';
|
|
74
74
|
import '@jetbrains/icons/chevron-12px-down';
|
|
75
75
|
import '../global/controls-height.js';
|
|
76
|
-
import '../_helpers/
|
|
76
|
+
import '../_helpers/button.classes.js';
|
|
77
77
|
import './collapsible-tab.js';
|
|
78
78
|
|
|
79
79
|
const _excluded = ["className", "tabContainerClassName", "children", "selected", "autoCollapse", "data-test", "onSelect"];
|
|
@@ -85,7 +85,7 @@ class Tabs extends PureComponent {
|
|
|
85
85
|
return (_this$props$onSelect = (_this$props = this.props).onSelect) === null || _this$props$onSelect === void 0 ? void 0 : _this$props$onSelect.call(_this$props, key);
|
|
86
86
|
}));
|
|
87
87
|
_defineProperty(this, "getTabTitle", (child, i) => {
|
|
88
|
-
if (child
|
|
88
|
+
if (child === null || typeof child !== 'object' || child.type === CustomItem) {
|
|
89
89
|
return child;
|
|
90
90
|
}
|
|
91
91
|
const {
|
|
@@ -112,7 +112,7 @@ class Tabs extends PureComponent {
|
|
|
112
112
|
href: href,
|
|
113
113
|
className: titleClasses,
|
|
114
114
|
disabled: disabled,
|
|
115
|
-
onPlainLeftClick: onSelect
|
|
115
|
+
onPlainLeftClick: onSelect ? this.handleSelect(key) : undefined
|
|
116
116
|
}, titleProps), key);
|
|
117
117
|
});
|
|
118
118
|
}
|
|
@@ -134,7 +134,7 @@ class Tabs extends PureComponent {
|
|
|
134
134
|
className: classes,
|
|
135
135
|
"data-test": joinDataTestAttributes('ring-dumb-tabs', dataTest),
|
|
136
136
|
children: [autoCollapse === true ? jsx(CollapsibleTabs, _objectSpread2(_objectSpread2({}, restProps), {}, {
|
|
137
|
-
onSelect: onSelect
|
|
137
|
+
onSelect: onSelect ? this.handleSelect : undefined,
|
|
138
138
|
selected: selected,
|
|
139
139
|
children: childrenArray
|
|
140
140
|
})) : jsx("div", {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { PureComponent } from 'react';
|
|
2
|
-
import { TabsAttrs, Children } from './dumb-tabs';
|
|
2
|
+
import { type TabsAttrs, type Children } from './dumb-tabs';
|
|
3
3
|
export interface SmartTabsProps extends TabsAttrs {
|
|
4
4
|
children: Children;
|
|
5
5
|
initSelected?: string | null | undefined;
|
|
@@ -8,7 +8,7 @@ import 'classnames';
|
|
|
8
8
|
import '../global/memoize.js';
|
|
9
9
|
import '../_helpers/tab-link.js';
|
|
10
10
|
import '../link/link.js';
|
|
11
|
-
import '../link/
|
|
11
|
+
import '../link/clickable-link.js';
|
|
12
12
|
import '../_helpers/link.js';
|
|
13
13
|
import './collapsible-tabs.js';
|
|
14
14
|
import 'core-js/modules/es.regexp.exec.js';
|
|
@@ -43,7 +43,7 @@ import 'react-virtualized/dist/es/CellMeasurer';
|
|
|
43
43
|
import 'util-deprecate';
|
|
44
44
|
import 'memoize-one';
|
|
45
45
|
import '../global/create-stateful-context.js';
|
|
46
|
-
import '../list/
|
|
46
|
+
import '../list/list-item.js';
|
|
47
47
|
import '../avatar/avatar.js';
|
|
48
48
|
import '../global/url.js';
|
|
49
49
|
import '../_helpers/avatar-info.js';
|
|
@@ -53,18 +53,18 @@ import '../checkbox/checkbox.js';
|
|
|
53
53
|
import '@jetbrains/icons/checkmark-12px';
|
|
54
54
|
import '@jetbrains/icons/remove-12px';
|
|
55
55
|
import '../icon/icon.js';
|
|
56
|
-
import '../icon/
|
|
57
|
-
import '../_helpers/
|
|
58
|
-
import '../global/
|
|
56
|
+
import '../icon/icon.constants.js';
|
|
57
|
+
import '../_helpers/icon-svg.js';
|
|
58
|
+
import '../global/compose-refs.js';
|
|
59
59
|
import '../control-help/control-help.js';
|
|
60
60
|
import '../_helpers/list.js';
|
|
61
61
|
import '../list/consts.js';
|
|
62
|
-
import '../list/
|
|
63
|
-
import '../list/
|
|
62
|
+
import '../list/list.classes.js';
|
|
63
|
+
import '../list/list-custom.js';
|
|
64
64
|
import '../global/get-event-key.js';
|
|
65
|
-
import '../list/
|
|
66
|
-
import '../list/
|
|
67
|
-
import '../list/
|
|
65
|
+
import '../list/list-title.js';
|
|
66
|
+
import '../list/list-separator.js';
|
|
67
|
+
import '../list/list-hint.js';
|
|
68
68
|
import '../dropdown/dropdown.js';
|
|
69
69
|
import '../global/typescript-utils.js';
|
|
70
70
|
import '../_helpers/anchor.js';
|
|
@@ -72,7 +72,7 @@ import '../button/button.js';
|
|
|
72
72
|
import '@jetbrains/icons/chevron-down';
|
|
73
73
|
import '@jetbrains/icons/chevron-12px-down';
|
|
74
74
|
import '../global/controls-height.js';
|
|
75
|
-
import '../_helpers/
|
|
75
|
+
import '../_helpers/button.classes.js';
|
|
76
76
|
import './collapsible-tab.js';
|
|
77
77
|
import './custom-item.js';
|
|
78
78
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { LinkProps } from '../link/link';
|
|
1
|
+
import { type ReactNode } from 'react';
|
|
2
|
+
import { type LinkProps } from '../link/link';
|
|
3
3
|
export interface TabLinkProps extends Omit<LinkProps, 'title' | 'children'> {
|
|
4
4
|
isSelected: boolean;
|
|
5
5
|
collapsed?: boolean;
|
|
@@ -6,5 +6,5 @@ export { T as default } from '../_helpers/tab-link.js';
|
|
|
6
6
|
import 'classnames';
|
|
7
7
|
import '../global/data-tests.js';
|
|
8
8
|
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
9
|
-
import '../link/
|
|
9
|
+
import '../link/clickable-link.js';
|
|
10
10
|
import '../_helpers/link.js';
|
package/components/tabs/tab.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PureComponent, ReactNode } from 'react';
|
|
2
|
-
import { TabLinkProps } from './tab-link';
|
|
1
|
+
import { PureComponent, type ReactNode } from 'react';
|
|
2
|
+
import { type TabLinkProps } from './tab-link';
|
|
3
3
|
export interface TabProps {
|
|
4
4
|
title?: ReactNode | ((isSelected: boolean, collapsed: boolean | undefined) => ReactNode);
|
|
5
5
|
titleProps?: Partial<TabLinkProps>;
|
package/components/tabs/tabs.js
CHANGED
|
@@ -11,7 +11,7 @@ import '../global/memoize.js';
|
|
|
11
11
|
import '../global/data-tests.js';
|
|
12
12
|
import '../_helpers/tab-link.js';
|
|
13
13
|
import '../link/link.js';
|
|
14
|
-
import '../link/
|
|
14
|
+
import '../link/clickable-link.js';
|
|
15
15
|
import '../_helpers/link.js';
|
|
16
16
|
import './collapsible-tabs.js';
|
|
17
17
|
import 'core-js/modules/es.regexp.exec.js';
|
|
@@ -46,7 +46,7 @@ import 'react-virtualized/dist/es/CellMeasurer';
|
|
|
46
46
|
import 'util-deprecate';
|
|
47
47
|
import 'memoize-one';
|
|
48
48
|
import '../global/create-stateful-context.js';
|
|
49
|
-
import '../list/
|
|
49
|
+
import '../list/list-item.js';
|
|
50
50
|
import '../avatar/avatar.js';
|
|
51
51
|
import '../global/url.js';
|
|
52
52
|
import '../_helpers/avatar-info.js';
|
|
@@ -56,18 +56,18 @@ import '../checkbox/checkbox.js';
|
|
|
56
56
|
import '@jetbrains/icons/checkmark-12px';
|
|
57
57
|
import '@jetbrains/icons/remove-12px';
|
|
58
58
|
import '../icon/icon.js';
|
|
59
|
-
import '../icon/
|
|
60
|
-
import '../_helpers/
|
|
61
|
-
import '../global/
|
|
59
|
+
import '../icon/icon.constants.js';
|
|
60
|
+
import '../_helpers/icon-svg.js';
|
|
61
|
+
import '../global/compose-refs.js';
|
|
62
62
|
import '../control-help/control-help.js';
|
|
63
63
|
import '../_helpers/list.js';
|
|
64
64
|
import '../list/consts.js';
|
|
65
|
-
import '../list/
|
|
66
|
-
import '../list/
|
|
65
|
+
import '../list/list.classes.js';
|
|
66
|
+
import '../list/list-custom.js';
|
|
67
67
|
import '../global/get-event-key.js';
|
|
68
|
-
import '../list/
|
|
69
|
-
import '../list/
|
|
70
|
-
import '../list/
|
|
68
|
+
import '../list/list-title.js';
|
|
69
|
+
import '../list/list-separator.js';
|
|
70
|
+
import '../list/list-hint.js';
|
|
71
71
|
import '../dropdown/dropdown.js';
|
|
72
72
|
import '../global/typescript-utils.js';
|
|
73
73
|
import '../_helpers/anchor.js';
|
|
@@ -75,5 +75,5 @@ import '../button/button.js';
|
|
|
75
75
|
import '@jetbrains/icons/chevron-down';
|
|
76
76
|
import '@jetbrains/icons/chevron-12px-down';
|
|
77
77
|
import '../global/controls-height.js';
|
|
78
|
-
import '../_helpers/
|
|
78
|
+
import '../_helpers/button.classes.js';
|
|
79
79
|
import './collapsible-tab.js';
|
package/components/tag/tag.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { HTMLAttributes, PureComponent, ReactNode, RefCallback } from 'react';
|
|
1
|
+
import { type HTMLAttributes, PureComponent, type ReactNode, type RefCallback } from 'react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { IconType } from '../icon/icon';
|
|
3
|
+
import { type IconType } from '../icon/icon';
|
|
4
4
|
export interface TagRenderProps extends HTMLAttributes<HTMLElement> {
|
|
5
5
|
disabled: boolean;
|
|
6
6
|
ref: RefCallback<HTMLElement>;
|
|
7
7
|
'data-test': string;
|
|
8
|
+
interactive?: boolean;
|
|
8
9
|
}
|
|
9
10
|
export declare enum TagType {
|
|
10
11
|
DEFAULT = "default",
|
|
@@ -20,7 +21,7 @@ export interface TagProps {
|
|
|
20
21
|
readOnly: boolean;
|
|
21
22
|
disabled: boolean;
|
|
22
23
|
focused: boolean;
|
|
23
|
-
render: (props: TagRenderProps) => ReactNode;
|
|
24
|
+
render: (props: TagRenderProps, interactive?: boolean) => ReactNode;
|
|
24
25
|
children?: ReactNode;
|
|
25
26
|
className?: string | null | undefined;
|
|
26
27
|
containerClassName?: string | null | undefined;
|
|
@@ -32,6 +33,7 @@ export interface TagProps {
|
|
|
32
33
|
backgroundColor?: string | undefined;
|
|
33
34
|
outline?: boolean;
|
|
34
35
|
tagType?: TagType;
|
|
36
|
+
interactive?: boolean;
|
|
35
37
|
}
|
|
36
38
|
/**
|
|
37
39
|
* @name Tag
|
package/components/tag/tag.js
CHANGED
|
@@ -9,17 +9,17 @@ import { Button } from '../button/button.js';
|
|
|
9
9
|
import '../global/controls-height.js';
|
|
10
10
|
import { ControlsHeight } from '../global/configuration.js';
|
|
11
11
|
import 'util-deprecate';
|
|
12
|
-
import '../icon/
|
|
13
|
-
import '../_helpers/
|
|
12
|
+
import '../icon/icon.constants.js';
|
|
13
|
+
import '../_helpers/icon-svg.js';
|
|
14
14
|
import 'core-js/modules/es.regexp.exec.js';
|
|
15
15
|
import 'core-js/modules/es.string.replace.js';
|
|
16
16
|
import '../global/memoize.js';
|
|
17
17
|
import '@jetbrains/icons/chevron-down';
|
|
18
18
|
import '@jetbrains/icons/chevron-12px-down';
|
|
19
|
-
import '../link/
|
|
20
|
-
import '../_helpers/
|
|
19
|
+
import '../link/clickable-link.js';
|
|
20
|
+
import '../_helpers/button.classes.js';
|
|
21
21
|
|
|
22
|
-
var styles = {"
|
|
22
|
+
var styles = {"interactive":"ring-tag-interactive","tag":"ring-tag-tag ring-global-resetButton","withRemove":"ring-tag-withRemove","container":"ring-tag-container","default":"ring-tag-default","main":"ring-tag-main","success":"ring-tag-success","warning":"ring-tag-warning","error":"ring-tag-error","purple":"ring-tag-purple","outline":"ring-tag-outline","focused":"ring-tag-focused","content":"ring-tag-content ring-global-ellipsis","disabled":"ring-tag-disabled","remove":"ring-tag-remove","icon":"ring-tag-icon","avatarContainer":"ring-tag-avatarContainer","customIcon":"ring-tag-customIcon","avatarIcon":"ring-tag-avatarIcon"};
|
|
23
23
|
|
|
24
24
|
var TagType;
|
|
25
25
|
(function (TagType) {
|
|
@@ -115,9 +115,9 @@ class Tag extends PureComponent {
|
|
|
115
115
|
renderRemoveIcon() {
|
|
116
116
|
if (!this.props.readOnly && this.props.onRemove) {
|
|
117
117
|
return jsx(Button, {
|
|
118
|
-
title:
|
|
118
|
+
title: 'Remove',
|
|
119
119
|
icon: closeIcon,
|
|
120
|
-
"data-test":
|
|
120
|
+
"data-test": 'ring-tag-remove',
|
|
121
121
|
className: styles.remove,
|
|
122
122
|
onClick: this.props.onRemove,
|
|
123
123
|
style: {
|
|
@@ -141,7 +141,8 @@ class Tag extends PureComponent {
|
|
|
141
141
|
} = this.props;
|
|
142
142
|
return jsxs("span", {
|
|
143
143
|
className: classNames(styles.container, this.props.containerClassName, styles[this.props.tagType], {
|
|
144
|
-
[styles.outline]: this.props.outline
|
|
144
|
+
[styles.outline]: this.props.outline,
|
|
145
|
+
[styles.interactive]: this.props.interactive
|
|
145
146
|
}),
|
|
146
147
|
children: [render({
|
|
147
148
|
'data-test': 'ring-tag',
|
|
@@ -159,7 +160,7 @@ class Tag extends PureComponent {
|
|
|
159
160
|
children: this.props.children
|
|
160
161
|
})]
|
|
161
162
|
})
|
|
162
|
-
}), this.renderRemoveIcon()]
|
|
163
|
+
}, this.props.interactive), this.renderRemoveIcon()]
|
|
163
164
|
});
|
|
164
165
|
}
|
|
165
166
|
}
|
|
@@ -168,9 +169,10 @@ _defineProperty(Tag, "defaultProps", {
|
|
|
168
169
|
readOnly: false,
|
|
169
170
|
disabled: false,
|
|
170
171
|
focused: false,
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
172
|
+
interactive: true,
|
|
173
|
+
render: (props, interactive) => interactive ? jsx("button", _objectSpread2({
|
|
174
|
+
type: 'button'
|
|
175
|
+
}, props)) : jsx("span", _objectSpread2({}, props)),
|
|
174
176
|
tagType: TagType.DEFAULT
|
|
175
177
|
});
|
|
176
178
|
_defineProperty(Tag, "Type", TagType);
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { PureComponent, SyntheticEvent, ReactNode, ComponentType } from 'react';
|
|
1
|
+
import { PureComponent, type SyntheticEvent, type ReactNode, type ComponentType } from 'react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import Select, { SelectItem } from '../select/select';
|
|
4
|
-
import { TagType } from '../tags-list/tags-list';
|
|
3
|
+
import Select, { type SelectItem } from '../select/select';
|
|
4
|
+
import { type TagType } from '../tags-list/tags-list';
|
|
5
5
|
import Caret from '../caret/caret';
|
|
6
6
|
import { Size } from '../input/input';
|
|
7
|
-
import { ControlsHeight, ControlsHeightContext } from '../global/controls-height';
|
|
8
|
-
import { Filter } from '../select/
|
|
9
|
-
import { TagAttrs } from '../tag/tag';
|
|
10
|
-
import { LabelType } from '../control-label/control-label';
|
|
7
|
+
import { type ControlsHeight, ControlsHeightContext } from '../global/controls-height';
|
|
8
|
+
import { type Filter } from '../select/select-popup';
|
|
9
|
+
import { type TagAttrs } from '../tag/tag';
|
|
10
|
+
import { type LabelType } from '../control-label/control-label';
|
|
11
11
|
declare function noop(): void;
|
|
12
12
|
export interface ToggleTagParams {
|
|
13
13
|
tag: TagType;
|
|
@@ -104,7 +104,7 @@ export default class TagsInput extends PureComponent<TagsInputProps, TagsInputSt
|
|
|
104
104
|
handleKeyDown: (event: React.KeyboardEvent) => boolean;
|
|
105
105
|
handleClick: (arg: TagType) => () => void;
|
|
106
106
|
handleRemove: (arg: TagType) => () => Promise<void | TagType[]>;
|
|
107
|
-
handleTagCreation: (label: string) => void;
|
|
107
|
+
handleTagCreation: (label: string | undefined) => void;
|
|
108
108
|
select?: Select | null;
|
|
109
109
|
selectRef: (el: Select | null) => void;
|
|
110
110
|
render(): import("react/jsx-runtime").JSX.Element;
|
|
@@ -27,10 +27,10 @@ import '../button/button.js';
|
|
|
27
27
|
import '@jetbrains/icons/chevron-12px-down';
|
|
28
28
|
import 'util-deprecate';
|
|
29
29
|
import '../icon/icon.js';
|
|
30
|
-
import '../icon/
|
|
31
|
-
import '../_helpers/
|
|
32
|
-
import '../link/
|
|
33
|
-
import '../_helpers/
|
|
30
|
+
import '../icon/icon.constants.js';
|
|
31
|
+
import '../_helpers/icon-svg.js';
|
|
32
|
+
import '../link/clickable-link.js';
|
|
33
|
+
import '../_helpers/button.classes.js';
|
|
34
34
|
import '../global/configuration.js';
|
|
35
35
|
import '../avatar/avatar.js';
|
|
36
36
|
import '../global/url.js';
|
|
@@ -60,30 +60,30 @@ 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';
|
|
67
|
-
import '../global/
|
|
67
|
+
import '../global/compose-refs.js';
|
|
68
68
|
import '../control-help/control-help.js';
|
|
69
69
|
import '../link/link.js';
|
|
70
70
|
import '../_helpers/link.js';
|
|
71
71
|
import '../_helpers/list.js';
|
|
72
72
|
import '../list/consts.js';
|
|
73
|
-
import '../list/
|
|
74
|
-
import '../list/
|
|
75
|
-
import '../list/
|
|
76
|
-
import '../list/
|
|
77
|
-
import '../list/
|
|
73
|
+
import '../list/list.classes.js';
|
|
74
|
+
import '../list/list-custom.js';
|
|
75
|
+
import '../list/list-title.js';
|
|
76
|
+
import '../list/list-separator.js';
|
|
77
|
+
import '../list/list-hint.js';
|
|
78
78
|
import '../global/fuzzy-highlight.js';
|
|
79
79
|
import '../i18n/i18n-context.js';
|
|
80
80
|
import '../i18n/i18n.js';
|
|
81
|
-
import '../select/
|
|
81
|
+
import '../select/select-popup.js';
|
|
82
82
|
import '@jetbrains/icons/search';
|
|
83
83
|
import '../loader-inline/loader-inline.js';
|
|
84
84
|
import '../shortcuts/shortcuts-hoc.js';
|
|
85
85
|
import '../text/text.js';
|
|
86
|
-
import '../_helpers/
|
|
86
|
+
import '../_helpers/select-filter.js';
|
|
87
87
|
import '../tag/tag.js';
|
|
88
88
|
|
|
89
89
|
var styles = {"outerContainer":"ring-input-outerContainer","container":"ring-input-container","input":"ring-input-input","tagsInput":"ring-tags-input-tagsInput","tagsInputDisabled":"ring-tags-input-tagsInputDisabled","tagsInputFocused":"ring-tags-input-tagsInputFocused","tagsList":"ring-tags-input-tagsList","tagsSelect":"ring-tags-input-tagsSelect"};
|
|
@@ -124,7 +124,7 @@ class TagsInput extends PureComponent {
|
|
|
124
124
|
});
|
|
125
125
|
_defineProperty(this, "addTag", tag => {
|
|
126
126
|
var _this$select, _this$select2;
|
|
127
|
-
if (tag
|
|
127
|
+
if (tag === null) {
|
|
128
128
|
return;
|
|
129
129
|
}
|
|
130
130
|
const isUniqueTag = this.state.tags.filter(item => tag.key === item.key).length === 0;
|
|
@@ -145,6 +145,7 @@ class TagsInput extends PureComponent {
|
|
|
145
145
|
if (event.target !== this.node && event.target.parentElement !== this.node) {
|
|
146
146
|
return;
|
|
147
147
|
}
|
|
148
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
148
149
|
(_this$select3 = this.select) === null || _this$select3 === void 0 || _this$select3._clickHandler();
|
|
149
150
|
});
|
|
150
151
|
_defineProperty(this, "filterExistingTags", suggestions => {
|
|
@@ -199,6 +200,7 @@ class TagsInput extends PureComponent {
|
|
|
199
200
|
this.setActiveIndex(newActiveIndex);
|
|
200
201
|
}
|
|
201
202
|
});
|
|
203
|
+
// eslint-disable-next-line complexity
|
|
202
204
|
_defineProperty(this, "handleKeyDown", event => {
|
|
203
205
|
var _this$select4;
|
|
204
206
|
const key = getEventKey(event);
|
|
@@ -210,16 +212,18 @@ class TagsInput extends PureComponent {
|
|
|
210
212
|
var _this$getInputNode3;
|
|
211
213
|
event.stopPropagation();
|
|
212
214
|
const value = (_this$getInputNode3 = this.getInputNode()) === null || _this$getInputNode3 === void 0 ? void 0 : _this$getInputNode3.value;
|
|
213
|
-
if (value
|
|
215
|
+
if (value) {
|
|
214
216
|
this.handleTagCreation(value);
|
|
215
217
|
}
|
|
216
218
|
return true;
|
|
217
219
|
}
|
|
220
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
218
221
|
if ((_this$select4 = this.select) !== null && _this$select4 !== void 0 && (_this$select4 = _this$select4._popup) !== null && _this$select4 !== void 0 && _this$select4.isVisible()) {
|
|
219
222
|
return true;
|
|
220
223
|
}
|
|
221
224
|
if (key === 'ArrowLeft') {
|
|
222
|
-
|
|
225
|
+
var _this$caret;
|
|
226
|
+
if (this.getInputNode() && this.caret && Number((_this$caret = this.caret) === null || _this$caret === void 0 ? void 0 : _this$caret.getPosition()) > 0) {
|
|
223
227
|
return true;
|
|
224
228
|
}
|
|
225
229
|
this.selectTag();
|
|
@@ -243,11 +247,12 @@ class TagsInput extends PureComponent {
|
|
|
243
247
|
var _this$select5;
|
|
244
248
|
event.preventDefault();
|
|
245
249
|
const tagsLength = this.state.tags.length;
|
|
250
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
246
251
|
(_this$select5 = this.select) === null || _this$select5 === void 0 || _this$select5._hidePopup(true); // otherwise confirmation may be overlapped by popup
|
|
247
252
|
this.onRemoveTag(this.state.tags[tagsLength - 1]);
|
|
248
253
|
return false;
|
|
249
254
|
}
|
|
250
|
-
if ((key === 'Delete' || key === 'Backspace') && this.state.activeIndex
|
|
255
|
+
if ((key === 'Delete' || key === 'Backspace') && this.state.activeIndex && this.state.tags[this.state.activeIndex]) {
|
|
251
256
|
this.onRemoveTag(this.state.tags[this.state.activeIndex]).then(() => this.selectTag(true));
|
|
252
257
|
return false;
|
|
253
258
|
}
|
|
@@ -280,10 +285,10 @@ class TagsInput extends PureComponent {
|
|
|
280
285
|
const nextState = {
|
|
281
286
|
prevTags: tags
|
|
282
287
|
};
|
|
283
|
-
if (tags
|
|
288
|
+
if (tags && tags !== prevTags) {
|
|
284
289
|
Object.assign(nextState, {
|
|
285
290
|
tags,
|
|
286
|
-
activeIndex: tags.length
|
|
291
|
+
activeIndex: tags === null || tags === void 0 ? void 0 : tags.length
|
|
287
292
|
});
|
|
288
293
|
}
|
|
289
294
|
return nextState;
|
|
@@ -293,6 +298,7 @@ class TagsInput extends PureComponent {
|
|
|
293
298
|
var _this$select6;
|
|
294
299
|
this.focusInput();
|
|
295
300
|
this.loadSuggestions();
|
|
301
|
+
// eslint-disable-next-line no-underscore-dangle
|
|
296
302
|
(_this$select6 = this.select) === null || _this$select6 === void 0 || _this$select6._showPopup();
|
|
297
303
|
}
|
|
298
304
|
}
|
|
@@ -347,7 +353,7 @@ class TagsInput extends PureComponent {
|
|
|
347
353
|
}, this.props.className);
|
|
348
354
|
return jsxs("div", {
|
|
349
355
|
// it transfers focus to input
|
|
350
|
-
role:
|
|
356
|
+
role: 'presentation',
|
|
351
357
|
className: classes,
|
|
352
358
|
onKeyDown: this.handleKeyDown,
|
|
353
359
|
onClick: this.clickHandler,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Component, ComponentType, HTMLAttributes, ReactNode } from 'react';
|
|
1
|
+
import { Component, type ComponentType, type HTMLAttributes, type ReactNode } from 'react';
|
|
2
2
|
import * as React from 'react';
|
|
3
|
-
import { TagAttrs } from '../tag/tag';
|
|
3
|
+
import { type TagAttrs } from '../tag/tag';
|
|
4
4
|
declare function noop(): void;
|
|
5
5
|
export interface TagType extends Omit<TagAttrs, 'onClick' | 'children'> {
|
|
6
6
|
label?: ReactNode;
|