@jetbrains/ring-ui 5.0.0-beta.9 → 5.0.3
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/CHANGELOG.md +20 -0
- package/components/alert/alert.css +1 -1
- package/components/alert-service/alert-service.js +1 -1
- package/components/analytics/analytics__ga-plugin.d.ts +1 -1
- package/components/analytics/analytics__ga-plugin.js +12 -3
- package/components/auth/auth__core.js +5 -1
- package/components/auth-dialog-service/auth-dialog-service.js +1 -1
- package/components/avatar/avatar.d.ts +1 -0
- package/components/avatar/fallback-avatar.js +2 -2
- package/components/button/button.css +2 -2
- package/components/button/button.d.ts +2 -1
- package/components/button-group/button-group.css +4 -2
- package/components/checkbox/checkbox.css +8 -12
- package/components/checkbox/checkbox.js +1 -1
- package/components/checkbox-ng/checkbox-ng.js +1 -1
- package/components/confirm-service/confirm-service.js +1 -1
- package/components/data-list/data-list.d.ts +4 -8
- package/components/date-picker/date-picker.css +1 -0
- package/components/date-picker/date-popup.js +0 -1
- package/components/dialog/dialog.d.ts +1 -1
- package/components/dropdown/dropdown.d.ts +2 -2
- package/components/global/angular-component-factory.js +1 -1
- package/components/global/promise-with-timeout.d.ts +2 -1
- package/components/global/promise-with-timeout.js +5 -2
- package/components/global/react-render-adapter.d.ts +29 -0
- package/components/global/react-render-adapter.js +36 -0
- package/components/global/rerender-hoc.d.ts +5 -9
- package/components/global/rerender-hoc.js +4 -2
- package/components/global/theme.d.ts +1 -0
- package/components/global/theme.js +19 -4
- package/components/global/variables.css +0 -1
- package/components/global/variables.d.ts +0 -1
- package/components/global/variables_dark.css +0 -1
- package/components/header/profile.d.ts +3 -3
- package/components/input/input.css +1 -1
- package/components/input/input.d.ts +3 -1
- package/components/input/input.js +1 -1
- package/components/island/adaptive-island-hoc.d.ts +4 -8
- package/components/island/content.d.ts +33 -2
- package/components/island/content.js +5 -4
- package/components/island/island.d.ts +4 -8
- package/components/link/clickableLink.d.ts +1 -1
- package/components/link/link.d.ts +14 -22
- package/components/link/link.js +2 -2
- package/components/list/consts.d.ts +3 -1
- package/components/list/list.css +1 -0
- package/components/list/list.d.ts +2 -0
- package/components/list/list.js +12 -13
- package/components/list/list__link.js +2 -2
- package/components/login-dialog/service.js +1 -1
- package/components/message/message.css +12 -26
- package/components/message/message.js +27 -14
- package/components/popup/popup.d.ts +7 -1
- package/components/popup/popup.js +4 -3
- package/components/popup/popup.target.d.ts +1 -1
- package/components/popup/position.d.ts +1 -1
- package/components/popup/position.js +2 -2
- package/components/popup-menu/popup-menu.d.ts +1 -0
- package/components/query-assist/query-assist.d.ts +5 -9
- package/components/query-assist/query-assist.js +2 -2
- package/components/radio/radio.d.ts +1 -1
- package/components/select/select.css +4 -1
- package/components/select/select.d.ts +12 -14
- package/components/select/select.js +20 -17
- package/components/select/select__popup.d.ts +4 -1
- package/components/select/select__popup.js +4 -3
- package/components/select-ng/select-ng.js +16 -5
- package/components/select-ng/select-ng__lazy.js +19 -8
- package/components/select-ng/select-ng__lazy.test.js +3 -1
- package/components/shortcuts/shortcuts-hoc.d.ts +4 -8
- package/components/shortcuts/shortcuts.d.ts +1 -1
- package/components/tab-trap/tab-trap.d.ts +1 -1
- package/components/table/disable-hover-hoc.d.ts +4 -8
- package/components/table/header.d.ts +8 -1
- package/components/table/row-with-focus-sensor.d.ts +4 -4
- package/components/table/row-with-focus-sensor.js +4 -4
- package/components/table/row.d.ts +1 -0
- package/components/table/smart-table.d.ts +1 -0
- package/components/table/smart-table.js +7 -3
- package/components/table/table.d.ts +4 -8
- package/components/tabs/collapsible-more.js +2 -2
- package/components/tabs/collapsible-tabs.d.ts +2 -2
- package/components/tabs/collapsible-tabs.js +1 -1
- package/components/tabs/custom-item.d.ts +1 -1
- package/components/tabs/dumb-tabs.d.ts +2 -2
- package/components/tabs/smart-tabs.d.ts +4 -4
- package/components/tabs/smart-tabs.js +9 -3
- package/components/tabs/tab-link.d.ts +1 -1
- package/components/tabs/tab.d.ts +1 -1
- package/components/tabs/tabs.css +10 -1
- package/components/tag/tag.css +1 -1
- package/components/tag/tag.js +1 -2
- package/components/tags-input/tags-input.d.ts +4 -8
- package/components/tags-list/tags-list.d.ts +1 -1
- package/components/tooltip-ng/tooltip-ng.js +13 -10
- package/components/user-agreement/service.d.ts +14 -62
- package/components/user-agreement/service.js +1 -1
- package/dist/_helpers/anchor.js +1 -1
- package/dist/_helpers/badge.js +1 -1
- package/dist/_helpers/button-group.js +1 -1
- package/dist/_helpers/button-set.js +1 -1
- package/dist/_helpers/button-toolbar.js +1 -1
- package/dist/_helpers/button__classes.js +2 -2
- package/dist/_helpers/card.js +1 -1
- package/dist/_helpers/checkbox.js +1 -1
- package/dist/_helpers/date-picker.js +1 -1
- package/dist/_helpers/dialog__body-scroll-preventer.js +3 -2
- package/dist/_helpers/error-message.js +1 -1
- package/dist/_helpers/footer.js +1 -1
- package/dist/_helpers/grid.js +1 -1
- package/dist/_helpers/group.js +1 -1
- package/dist/_helpers/header.js +1 -1
- package/dist/_helpers/icon.js +1 -1
- package/dist/_helpers/input.js +1 -1
- package/dist/_helpers/island.js +1 -1
- package/dist/_helpers/link.js +1 -1
- package/dist/_helpers/list.js +1 -1
- package/dist/_helpers/loader-inline.js +1 -1
- package/dist/_helpers/loader-screen.js +1 -1
- package/dist/_helpers/panel.js +1 -1
- package/dist/_helpers/query-assist__suggestions.js +1 -1
- package/dist/_helpers/radio.js +1 -1
- package/dist/_helpers/select__filter.js +2 -1
- package/dist/_helpers/services-link.js +2 -2
- package/dist/_helpers/sidebar.js +3 -2
- package/dist/_helpers/table.js +1 -1
- package/dist/_helpers/tabs.js +1 -1
- package/dist/_helpers/theme.js +20 -8
- package/dist/_helpers/title.js +2 -1
- package/dist/alert/alert.js +15 -3
- package/dist/alert/container.js +1 -1
- package/dist/alert-service/alert-service.js +14 -1
- package/dist/analytics/analytics.js +4 -3
- package/dist/analytics/analytics__custom-plugin.js +2 -1
- package/dist/analytics/analytics__fus-plugin.js +1 -0
- package/dist/analytics/analytics__ga-plugin.d.ts +1 -1
- package/dist/analytics/analytics__ga-plugin.js +16 -7
- package/dist/analytics/analytics__plugin-utils.js +4 -3
- package/dist/analytics-ng/analytics-ng.js +3 -2
- package/dist/auth/auth.js +13 -0
- package/dist/auth/auth__core.js +29 -12
- package/dist/auth/background-flow.js +2 -1
- package/dist/auth/down-notification.js +14 -1
- package/dist/auth/iframe-flow.js +3 -0
- package/dist/auth/landing.js +17 -4
- package/dist/auth/request-builder.js +1 -0
- package/dist/auth/response-parser.js +1 -0
- package/dist/auth/storage.js +13 -0
- package/dist/auth/token-validator.js +2 -0
- package/dist/auth/window-flow.js +2 -1
- package/dist/auth-dialog/auth-dialog.js +4 -2
- package/dist/auth-dialog-service/auth-dialog-service.js +4 -1
- package/dist/auth-ng/auth-ng.js +14 -1
- package/dist/autofocus-ng/autofocus-ng.js +1 -0
- package/dist/avatar/avatar-example-datauri.js +1 -23
- package/dist/avatar/avatar.d.ts +1 -0
- package/dist/avatar/avatar.js +5 -3
- package/dist/avatar/fallback-avatar.js +6 -5
- package/dist/avatar-editor-ng/avatar-editor-ng.js +13 -0
- package/dist/avatar-editor-ng/avatar-editor-ng__template.js +1 -28
- package/dist/avatar-ng/avatar-ng.js +3 -0
- package/dist/badge/badge.js +1 -0
- package/dist/badge-ng/badge-ng.js +2 -0
- package/dist/breadcrumb-ng/breadcrumb-ng.js +4 -28
- package/dist/button/button.d.ts +2 -1
- package/dist/button/button.js +2 -0
- package/dist/button-group-ng/button-group-ng.js +2 -1
- package/dist/button-ng/button-ng.js +5 -11
- package/dist/button-set-ng/button-set-ng.js +1 -1
- package/dist/button-toolbar-ng/button-toolbar-ng.js +1 -0
- package/dist/caret/caret.js +2 -0
- package/dist/checkbox/checkbox.js +3 -1
- package/dist/checkbox-ng/checkbox-ng.js +4 -21
- package/dist/code/code.js +4 -3
- package/dist/confirm/confirm.js +3 -1
- package/dist/confirm-ng/confirm-ng.js +3 -0
- package/dist/confirm-service/confirm-service.js +4 -1
- package/dist/content-layout/content-layout.js +1 -0
- package/dist/content-layout/sidebar.js +1 -0
- package/dist/data-list/data-list.d.ts +4 -8
- package/dist/data-list/data-list.js +3 -1
- package/dist/data-list/data-list.mock.js +1 -0
- package/dist/data-list/item.js +3 -1
- package/dist/data-list/selection.js +1 -0
- package/dist/data-list/title.js +3 -1
- package/dist/data-list-ng/data-list-ng.js +4 -1
- package/dist/date-picker/consts.js +1 -1
- package/dist/date-picker/date-input.js +4 -2
- package/dist/date-picker/date-picker.js +10 -8
- package/dist/date-picker/date-popup.js +4 -3
- package/dist/date-picker/day.js +1 -0
- package/dist/date-picker/month-names.js +1 -0
- package/dist/date-picker/month-slider.js +1 -0
- package/dist/date-picker/month.js +1 -0
- package/dist/date-picker/months.js +1 -0
- package/dist/date-picker/years.js +1 -0
- package/dist/dialog/dialog.d.ts +1 -1
- package/dist/dialog/dialog.js +2 -0
- package/dist/dialog/dialog__body-scroll-preventer.js +1 -0
- package/dist/dialog-ng/dialog-ng.js +7 -4
- package/dist/dialog-ng/dialog-ng__template.js +1 -70
- package/dist/docked-panel-ng/docked-panel-ng.js +2 -1
- package/dist/dropdown/anchor.js +2 -0
- package/dist/dropdown/dropdown.d.ts +2 -2
- package/dist/dropdown/dropdown.js +2 -0
- package/dist/dropdown-menu/dropdown-menu.js +4 -2
- package/dist/error-bubble/error-bubble.js +3 -1
- package/dist/error-message/error-message.js +3 -1
- package/dist/error-message-ng/error-message-ng.js +3 -21
- package/dist/footer/footer.js +1 -0
- package/dist/footer-ng/footer-ng.js +3 -14
- package/dist/form-ng/form-ng.js +2 -4
- package/dist/global/angular-component-factory.js +8 -6
- package/dist/global/create-stateful-context.js +3 -2
- package/dist/global/data-tests.js +2 -0
- package/dist/global/dom.js +1 -0
- package/dist/global/focus-sensor-hoc.js +1 -0
- package/dist/global/fuzzy-highlight.js +1 -1
- package/dist/global/inject-styles.js +5 -7
- package/dist/global/listeners.js +1 -0
- package/dist/global/memoize.js +2 -0
- package/dist/global/normalize-indent.js +2 -0
- package/dist/global/promise-with-timeout.d.ts +2 -1
- package/dist/global/promise-with-timeout.js +6 -2
- package/dist/global/react-dom-renderer.js +1 -0
- package/dist/global/react-render-adapter.d.ts +29 -0
- package/dist/global/react-render-adapter.js +41 -0
- package/dist/global/rerender-hoc.d.ts +5 -9
- package/dist/global/rerender-hoc.js +7 -3
- package/dist/global/theme.d.ts +1 -0
- package/dist/global/theme.js +16 -1
- package/dist/global/trivial-template-tag.js +2 -0
- package/dist/global/url.js +3 -1
- package/dist/global/variables.d.ts +0 -1
- package/dist/grid/col.js +2 -1
- package/dist/grid/grid.js +1 -0
- package/dist/grid/row.js +1 -1
- package/dist/group-ng/group-ng.js +1 -1
- package/dist/header/header.js +18 -14
- package/dist/header/logo.js +2 -0
- package/dist/header/profile.d.ts +3 -3
- package/dist/header/profile.js +3 -1
- package/dist/header/services-link.js +1 -0
- package/dist/header/services.js +2 -0
- package/dist/header/smart-profile.js +17 -13
- package/dist/header/smart-services.js +14 -11
- package/dist/header/tray-icon.js +2 -0
- package/dist/heading/heading.js +3 -3
- package/dist/http/http.js +4 -2
- package/dist/http/http.mock.js +2 -0
- package/dist/hub-source/hub-source.js +1 -1
- package/dist/hub-source/hub-source__user.js +4 -2
- package/dist/hub-source/hub-source__users-groups.js +3 -2
- package/dist/icon/icon.js +3 -3
- package/dist/icon/icon__svg.js +2 -0
- package/dist/icon/index.js +2 -0
- package/dist/icon-ng/icon-ng.js +7 -5
- package/dist/input/input.d.ts +3 -1
- package/dist/input/input.js +5 -3
- package/dist/input-ng/input-ng.js +6 -59
- package/dist/island/adaptive-island-hoc.d.ts +4 -8
- package/dist/island/adaptive-island-hoc.js +4 -3
- package/dist/island/content.d.ts +33 -2
- package/dist/island/content.js +8 -4
- package/dist/island/header.js +3 -2
- package/dist/island/island.d.ts +4 -8
- package/dist/island/island.js +1 -0
- package/dist/island-ng/island-content-ng.js +2 -16
- package/dist/island-ng/island-header-ng.js +2 -8
- package/dist/island-ng/island-ng-class-fixer.js +2 -0
- package/dist/island-ng/island-ng.js +2 -8
- package/dist/link/clickableLink.d.ts +1 -1
- package/dist/link/clickableLink.js +1 -0
- package/dist/link/link.d.ts +14 -22
- package/dist/link/link.js +5 -4
- package/dist/link-ng/link-ng.js +1 -4
- package/dist/list/consts.d.ts +3 -1
- package/dist/list/list.d.ts +2 -0
- package/dist/list/list.js +30 -23
- package/dist/list/list__custom.js +1 -0
- package/dist/list/list__item.js +6 -4
- package/dist/list/list__link.js +3 -1
- package/dist/list/list__users-groups-source.js +4 -2
- package/dist/loader/loader.js +1 -0
- package/dist/loader/loader__core.js +5 -4
- package/dist/loader-inline/loader-inline.js +1 -0
- package/dist/loader-inline-ng/loader-inline-ng.js +1 -1
- package/dist/loader-ng/loader-ng.js +1 -0
- package/dist/loader-screen/loader-screen.js +1 -0
- package/dist/loader-screen-ng/loader-screen-ng.js +2 -6
- package/dist/login-dialog/login-dialog.js +3 -1
- package/dist/login-dialog/service.js +4 -1
- package/dist/markdown/code.js +1 -0
- package/dist/markdown/link.js +1 -0
- package/dist/markdown/markdown.js +2 -1
- package/dist/message/message.js +39 -33
- package/dist/old-browsers-message/old-browsers-message.js +2 -1
- package/dist/old-browsers-message/old-browsers-message__stop.js +1 -0
- package/dist/old-browsers-message/white-list.js +1 -0
- package/dist/pager/pager.js +7 -4
- package/dist/pager-ng/pager-ng.js +5 -2
- package/dist/panel-ng/panel-ng.js +1 -0
- package/dist/permissions/permissions.js +1 -1
- package/dist/permissions-ng/permissions-ng.js +14 -1
- package/dist/place-under-ng/place-under-ng.js +3 -2
- package/dist/popup/popup.d.ts +7 -1
- package/dist/popup/popup.js +11 -7
- package/dist/popup/popup.target.d.ts +1 -1
- package/dist/popup/position.d.ts +1 -1
- package/dist/popup/position.js +3 -2
- package/dist/popup-menu/popup-menu.d.ts +1 -0
- package/dist/popup-menu/popup-menu.js +3 -1
- package/dist/progress-bar/progress-bar.js +3 -2
- package/dist/progress-bar-ng/progress-bar-ng.js +2 -0
- package/dist/promised-click-ng/promised-click-ng.js +2 -0
- package/dist/proxy-attrs/proxy-attrs.js +5 -3
- package/dist/query-assist/query-assist.d.ts +5 -9
- package/dist/query-assist/query-assist.js +9 -5
- package/dist/query-assist/query-assist__suggestions.js +3 -1
- package/dist/query-assist-ng/query-assist-ng.js +7 -3
- package/dist/radio/radio.d.ts +1 -1
- package/dist/radio/radio.js +1 -0
- package/dist/radio/radio__item.js +1 -0
- package/dist/radio-ng/radio-ng.js +2 -18
- package/dist/save-field-ng/save-field-ng.js +3 -1
- package/dist/save-field-ng/save-field-ng__template.js +1 -32
- package/dist/select/select.d.ts +12 -14
- package/dist/select/select.js +33 -22
- package/dist/select/select__filter.js +4 -2
- package/dist/select/select__popup.d.ts +4 -1
- package/dist/select/select__popup.js +9 -4
- package/dist/select-ng/select-ng.js +23 -8
- package/dist/select-ng/select-ng__lazy.js +30 -12
- package/dist/select-ng/select-ng__options.js +2 -2
- package/dist/shortcuts/shortcuts-hoc.d.ts +4 -8
- package/dist/shortcuts/shortcuts-hoc.js +4 -3
- package/dist/shortcuts/shortcuts.d.ts +1 -1
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +3 -0
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng__template.js +1 -48
- package/dist/shortcuts-ng/shortcuts-ng.js +4 -3
- package/dist/sidebar-ng/sidebar-ng.js +2 -0
- package/dist/sidebar-ng/sidebar-ng__button-template.js +1 -18
- package/dist/sidebar-ng/sidebar-ng__template.js +1 -10
- package/dist/storage/storage.js +13 -0
- package/dist/storage/storage__fallback.js +4 -3
- package/dist/storage/storage__local.js +13 -0
- package/dist/style.css +1 -1
- package/dist/tab-trap/tab-trap.d.ts +1 -1
- package/dist/tab-trap/tab-trap.js +2 -1
- package/dist/table/cell.js +1 -0
- package/dist/table/disable-hover-hoc.d.ts +4 -8
- package/dist/table/disable-hover-hoc.js +4 -3
- package/dist/table/header-cell.js +2 -0
- package/dist/table/header.d.ts +8 -1
- package/dist/table/header.js +3 -1
- package/dist/table/multitable.js +1 -0
- package/dist/table/row-with-focus-sensor.d.ts +4 -4
- package/dist/table/row-with-focus-sensor.js +15 -5
- package/dist/table/row.d.ts +1 -0
- package/dist/table/row.js +4 -2
- package/dist/table/selection-adapter.js +2 -0
- package/dist/table/selection-shortcuts-hoc.js +1 -0
- package/dist/table/selection.js +1 -0
- package/dist/table/smart-table.d.ts +1 -0
- package/dist/table/smart-table.js +13 -7
- package/dist/table/table.d.ts +4 -8
- package/dist/table/table.js +3 -1
- package/dist/table-legacy-ng/table-legacy-ng.js +13 -47
- package/dist/table-legacy-ng/table-legacy-ng__pager.js +6 -9
- package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +2 -1
- package/dist/table-ng/smart-table-ng.js +4 -1
- package/dist/table-ng/table-ng.js +4 -1
- package/dist/tabs/collapsible-more.js +4 -2
- package/dist/tabs/collapsible-tab.js +1 -0
- package/dist/tabs/collapsible-tabs.d.ts +2 -2
- package/dist/tabs/collapsible-tabs.js +3 -1
- package/dist/tabs/custom-item.d.ts +1 -1
- package/dist/tabs/dumb-tabs.d.ts +2 -2
- package/dist/tabs/dumb-tabs.js +3 -1
- package/dist/tabs/smart-tabs.d.ts +4 -4
- package/dist/tabs/smart-tabs.js +10 -6
- package/dist/tabs/tab-link.d.ts +1 -1
- package/dist/tabs/tab-link.js +1 -0
- package/dist/tabs/tab.d.ts +1 -1
- package/dist/tabs/tab.js +1 -0
- package/dist/tabs/tabs.js +3 -1
- package/dist/tabs-ng/tabs-ng.js +1 -0
- package/dist/tabs-ng/tabs-ng__template.js +1 -38
- package/dist/tag/tag.js +4 -3
- package/dist/tags-input/tags-input.d.ts +4 -8
- package/dist/tags-input/tags-input.js +6 -3
- package/dist/tags-input-ng/tags-input-ng.js +5 -2
- package/dist/tags-list/tags-list.d.ts +1 -1
- package/dist/tags-list/tags-list.js +3 -1
- package/dist/template-ng/template-ng.js +1 -0
- package/dist/text/text.js +1 -1
- package/dist/theme-ng/theme-ng.js +1 -0
- package/dist/toggle/toggle.js +2 -1
- package/dist/toggle-ng/toggle-ng.js +2 -0
- package/dist/tooltip/tooltip.js +3 -1
- package/dist/tooltip-ng/tooltip-ng.js +12 -6
- package/dist/user-agreement/service.d.ts +14 -62
- package/dist/user-agreement/service.js +14 -8
- package/dist/user-agreement/toolbox.eula.js +1 -160
- package/dist/user-agreement/user-agreement.js +3 -1
- package/dist/user-card/card.js +2 -0
- package/dist/user-card/smart-user-card-tooltip.js +2 -0
- package/dist/user-card/tooltip.js +2 -0
- package/dist/user-card/user-card.js +2 -0
- package/dist/user-card-ng/user-card-ng.js +3 -0
- package/package.json +74 -66
|
@@ -12,6 +12,7 @@ import 'react';
|
|
|
12
12
|
import 'classnames';
|
|
13
13
|
import 'prop-types';
|
|
14
14
|
import '../global/data-tests.js';
|
|
15
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
15
16
|
import '../_helpers/loader-inline.js';
|
|
16
17
|
import '../_helpers/button-set.js';
|
|
17
18
|
import '@jetbrains/angular-elastic';
|
|
@@ -22,6 +23,7 @@ import '../global/sniffer.js';
|
|
|
22
23
|
import 'sniffr';
|
|
23
24
|
import '../global/ring-angular-component.js';
|
|
24
25
|
import '../icon-ng/icon-ng.js';
|
|
26
|
+
import 'core-js/modules/es.string.replace.js';
|
|
25
27
|
import '../icon/icon__constants.js';
|
|
26
28
|
import '../template-ng/template-ng.js';
|
|
27
29
|
import '../_helpers/icon.js';
|
|
@@ -164,7 +166,7 @@ angularModule.directive('rgSaveField', ["RingMessageBundle", "$timeout", "$q", "
|
|
|
164
166
|
}
|
|
165
167
|
|
|
166
168
|
function addMultilineProcessing(controlName) {
|
|
167
|
-
const stopWatch = scope.$watch(
|
|
169
|
+
const stopWatch = scope.$watch("saveFieldForm.".concat(controlName), control => {
|
|
168
170
|
if (!control || !control.$formatters || !control.$parsers) {
|
|
169
171
|
return;
|
|
170
172
|
}
|
|
@@ -1,34 +1,3 @@
|
|
|
1
|
-
var template =
|
|
2
|
-
<span class="ring-save-field__transclude-placeholder" ng-transclude=""></span>
|
|
3
|
-
|
|
4
|
-
<rg-button
|
|
5
|
-
ng-show="saveFieldForm.$dirty && saveFieldForm.$valid"
|
|
6
|
-
mode="primary"
|
|
7
|
-
class="ring-save-field__button ng-hide"
|
|
8
|
-
ng-mousedown="cancelBlur()"
|
|
9
|
-
|
|
10
|
-
rg-promised-click="submitChanges($event)"
|
|
11
|
-
promised-mode="loader"
|
|
12
|
-
>
|
|
13
|
-
{{wording.save}}
|
|
14
|
-
</rg-button>
|
|
15
|
-
|
|
16
|
-
<rg-button
|
|
17
|
-
ng-show="saveFieldForm.$dirty && !loading"
|
|
18
|
-
class="ring-save-field__button ng-hide"
|
|
19
|
-
ng-click="cancelChanges($event)"
|
|
20
|
-
ng-mousedown="cancelBlur()"
|
|
21
|
-
>
|
|
22
|
-
{{wording.cancel}}
|
|
23
|
-
</rg-button>
|
|
24
|
-
|
|
25
|
-
<rg-button
|
|
26
|
-
ng-show="done"
|
|
27
|
-
ng-disabled="true"
|
|
28
|
-
class="ring-save-field__button ng-hide"
|
|
29
|
-
>
|
|
30
|
-
{{wording.saved}}
|
|
31
|
-
</rg-button>
|
|
32
|
-
</div>`;
|
|
1
|
+
var template = "<div class=\"ring-save-field\" ng-form=\"saveFieldForm\" rg-shortcuts=\"ring-save-field\" shortcuts-map=\"keyMap\" shortcuts-focus=\"focus\">\n <span class=\"ring-save-field__transclude-placeholder\" ng-transclude=\"\"></span>\n\n <rg-button\n ng-show=\"saveFieldForm.$dirty && saveFieldForm.$valid\"\n mode=\"primary\"\n class=\"ring-save-field__button ng-hide\"\n ng-mousedown=\"cancelBlur()\"\n\n rg-promised-click=\"submitChanges($event)\"\n promised-mode=\"loader\"\n >\n {{wording.save}}\n </rg-button>\n\n <rg-button\n ng-show=\"saveFieldForm.$dirty && !loading\"\n class=\"ring-save-field__button ng-hide\"\n ng-click=\"cancelChanges($event)\"\n ng-mousedown=\"cancelBlur()\"\n >\n {{wording.cancel}}\n </rg-button>\n\n <rg-button\n ng-show=\"done\"\n ng-disabled=\"true\"\n class=\"ring-save-field__button ng-hide\"\n >\n {{wording.saved}}\n </rg-button>\n</div>";
|
|
33
2
|
|
|
34
3
|
export { template as default };
|
package/dist/select/select.d.ts
CHANGED
|
@@ -45,6 +45,7 @@ export interface CustomAnchorProps {
|
|
|
45
45
|
buttonProps: ButtonHTMLAttributes<HTMLButtonElement> & DataTestProps;
|
|
46
46
|
popup: ReactNode;
|
|
47
47
|
}
|
|
48
|
+
export declare type CustomAnchor = ((props: CustomAnchorProps) => ReactNode);
|
|
48
49
|
export interface BaseSelectProps<T = unknown> {
|
|
49
50
|
data: readonly SelectItem<T>[];
|
|
50
51
|
filter: boolean | Filter<T>;
|
|
@@ -60,7 +61,7 @@ export interface BaseSelectProps<T = unknown> {
|
|
|
60
61
|
maxHeight: number;
|
|
61
62
|
hideArrow: boolean;
|
|
62
63
|
directions: readonly Directions[];
|
|
63
|
-
label: string;
|
|
64
|
+
label: string | null;
|
|
64
65
|
selectedLabel: ReactNode;
|
|
65
66
|
inputPlaceholder: string;
|
|
66
67
|
shortcutsEnabled: boolean;
|
|
@@ -68,7 +69,7 @@ export interface BaseSelectProps<T = unknown> {
|
|
|
68
69
|
onLoadMore: () => void;
|
|
69
70
|
onOpen: () => void;
|
|
70
71
|
onFilter: (value: string) => void;
|
|
71
|
-
onFocus: () => void;
|
|
72
|
+
onFocus: (e: React.FocusEvent<HTMLInputElement>) => void;
|
|
72
73
|
onBlur: () => void;
|
|
73
74
|
onKeyDown: (event: React.KeyboardEvent<HTMLInputElement>) => void;
|
|
74
75
|
onSelect: (selected: SelectItem<T> | null, event?: Event | SyntheticEvent) => void;
|
|
@@ -77,6 +78,7 @@ export interface BaseSelectProps<T = unknown> {
|
|
|
77
78
|
onDone: () => void;
|
|
78
79
|
onReset: () => void;
|
|
79
80
|
dir: 'ltr' | 'rtl';
|
|
81
|
+
renderBottomToolbar?: () => ReactNode;
|
|
80
82
|
height?: ControlsHeight | undefined;
|
|
81
83
|
targetElement?: HTMLElement | null | undefined;
|
|
82
84
|
className?: string | null | undefined;
|
|
@@ -93,7 +95,7 @@ export interface BaseSelectProps<T = unknown> {
|
|
|
93
95
|
hint?: ReactNode;
|
|
94
96
|
add?: Add | null | undefined;
|
|
95
97
|
compact?: boolean | null | undefined;
|
|
96
|
-
customAnchor?:
|
|
98
|
+
customAnchor?: CustomAnchor | null | undefined;
|
|
97
99
|
disableMoveOverflow?: boolean | null | undefined;
|
|
98
100
|
disableScrollToActive?: boolean | null | undefined;
|
|
99
101
|
'data-test'?: string | null | undefined;
|
|
@@ -112,7 +114,7 @@ export interface MultipleSelectProps<T = unknown> extends BaseSelectProps<T> {
|
|
|
112
114
|
onChange: (selected: SelectItem<T>[], event?: Event | SyntheticEvent) => void;
|
|
113
115
|
tags?: Tags | boolean | null | undefined;
|
|
114
116
|
}
|
|
115
|
-
declare type SelectProps<T = unknown> = SingleSelectProps<T> | MultipleSelectProps<T>;
|
|
117
|
+
export declare type SelectProps<T = unknown> = SingleSelectProps<T> | MultipleSelectProps<T>;
|
|
116
118
|
interface AddButton {
|
|
117
119
|
prefix: string | null | undefined;
|
|
118
120
|
label: string;
|
|
@@ -161,8 +163,8 @@ export default class Select<T = unknown> extends Component<SelectProps<T>, Selec
|
|
|
161
163
|
maxHeight: number;
|
|
162
164
|
directions: Directions[];
|
|
163
165
|
selected: null;
|
|
164
|
-
label:
|
|
165
|
-
selectedLabel:
|
|
166
|
+
label: null;
|
|
167
|
+
selectedLabel: null;
|
|
166
168
|
inputPlaceholder: string;
|
|
167
169
|
hint: null;
|
|
168
170
|
shortcutsEnabled: boolean;
|
|
@@ -256,18 +258,14 @@ export declare type MultipleSelectAttrs<T = unknown> = JSX.LibraryManagedAttribu
|
|
|
256
258
|
export declare type SelectAttrs<T = unknown> = JSX.LibraryManagedAttributes<typeof Select, SelectProps<T>>;
|
|
257
259
|
export declare const RerenderableSelect: {
|
|
258
260
|
new (props: SelectProps<unknown>): {
|
|
259
|
-
_propsCache:
|
|
260
|
-
|
|
261
|
-
}>;
|
|
262
|
-
rerender(props?: Partial<SelectProps<unknown>>, callback?: (() => void) | undefined): void | Element | React.Component<SelectProps<unknown>, any, any>;
|
|
261
|
+
_propsCache: SelectProps<unknown> & React.RefAttributes<unknown>;
|
|
262
|
+
rerender(props?: Partial<SelectProps<unknown>>, callback?: (() => void) | undefined): void;
|
|
263
263
|
node?: HTMLElement | null | undefined;
|
|
264
|
-
context:
|
|
264
|
+
context: unknown;
|
|
265
265
|
setState<K extends keyof SelectState<unknown>>(state: SelectState<unknown> | ((prevState: Readonly<SelectState<unknown>>, props: Readonly<SelectProps<unknown>>) => SelectState<unknown> | Pick<SelectState<unknown>, K> | null) | Pick<SelectState<unknown>, K> | null, callback?: (() => void) | undefined): void;
|
|
266
266
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
267
267
|
render(): React.ReactNode;
|
|
268
|
-
readonly props: Readonly<SelectProps<unknown
|
|
269
|
-
children?: React.ReactNode;
|
|
270
|
-
}>;
|
|
268
|
+
readonly props: Readonly<SelectProps<unknown>>;
|
|
271
269
|
state: Readonly<SelectState<unknown>>;
|
|
272
270
|
refs: {
|
|
273
271
|
[key: string]: React.ReactInstance;
|
package/dist/select/select.js
CHANGED
|
@@ -1,9 +1,11 @@
|
|
|
1
1
|
import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
|
+
import 'core-js/modules/es.string.replace.js';
|
|
2
4
|
import React, { Component, Fragment } from 'react';
|
|
3
5
|
import classNames from 'classnames';
|
|
4
6
|
import PropTypes from 'prop-types';
|
|
5
7
|
import chevronDownIcon from '@jetbrains/icons/chevron-down';
|
|
6
|
-
import closeIcon from '@jetbrains/icons/close';
|
|
8
|
+
import closeIcon from '@jetbrains/icons/close-12px';
|
|
7
9
|
import deepEqual from 'deep-equal';
|
|
8
10
|
import '../dropdown/dropdown.js';
|
|
9
11
|
import Avatar, { Size as Size$1 } from '../avatar/avatar.js';
|
|
@@ -55,7 +57,7 @@ import '../_helpers/link.js';
|
|
|
55
57
|
import '../_helpers/list.js';
|
|
56
58
|
import '../list/list__item.js';
|
|
57
59
|
import '../checkbox/checkbox.js';
|
|
58
|
-
import '@jetbrains/icons/checkmark';
|
|
60
|
+
import '@jetbrains/icons/checkmark-14px';
|
|
59
61
|
import '@jetbrains/icons/remove-10px';
|
|
60
62
|
import '../_helpers/checkbox.js';
|
|
61
63
|
import '../list/list__custom.js';
|
|
@@ -67,6 +69,7 @@ import '../list/consts.js';
|
|
|
67
69
|
import '../global/prop-types.js';
|
|
68
70
|
import '../global/composeRefs.js';
|
|
69
71
|
import '../_helpers/input.js';
|
|
72
|
+
import '../global/react-render-adapter.js';
|
|
70
73
|
import '@jetbrains/icons/search';
|
|
71
74
|
import '../loader-inline/loader-inline.js';
|
|
72
75
|
import '../_helpers/loader-inline.js';
|
|
@@ -77,7 +80,7 @@ import '../caret/caret.js';
|
|
|
77
80
|
import '../text/text.js';
|
|
78
81
|
import '../_helpers/select__filter.js';
|
|
79
82
|
|
|
80
|
-
var modules_9d0de074 = {"unit":"8px","button-shadow":"inset 0 0 0 1px","select":"
|
|
83
|
+
var modules_9d0de074 = {"unit":"8px","button-shadow":"inset 0 0 0 1px","select":"select_rui_11de","value":"value_rui_11de ellipsis_rui_8bff font_rui_8bff","icons":"icons_rui_11de","toolbar":"toolbar_rui_11de","button":"button_rui_11de","buttonSpaced":"buttonSpaced_rui_11de","inputMode":"inputMode_rui_11de","selectedIcon":"selectedIcon_rui_11de resetButton_rui_8bff","clearIcon":"clearIcon_rui_11de","sizeS":"sizeS_rui_11de","sizeM":"sizeM_rui_11de","sizeL":"sizeL_rui_11de","sizeFULL":"sizeFULL_rui_11de","sizeAUTO":"sizeAUTO_rui_11de","buttonMode":"buttonMode_rui_11de","open":"open_rui_11de","buttonContainer":"buttonContainer_rui_11de","buttonValue":"buttonValue_rui_11de ellipsis_rui_8bff","buttonValueOpen":"buttonValueOpen_rui_11de","label":"label_rui_11de","disabled":"disabled_rui_11de","avatar":"avatar_rui_11de","popup":"popup_rui_11de","chevron":"chevron_rui_11de","chevronIcon":"chevronIcon_rui_11de","heightS":"heightS_rui_11de"};
|
|
81
84
|
|
|
82
85
|
/**
|
|
83
86
|
* @name Select
|
|
@@ -150,7 +153,7 @@ function getListItems(props, state, rawFilterString) {
|
|
|
150
153
|
let data = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : props.data;
|
|
151
154
|
let filterString = rawFilterString.trim();
|
|
152
155
|
|
|
153
|
-
if (isInputMode(props.type) && state.selected && !Array.isArray(state.selected) && filterString === state.selected.label) {
|
|
156
|
+
if (isInputMode(props.type) && !props.allowAny && state.selected && !Array.isArray(state.selected) && filterString === state.selected.label) {
|
|
154
157
|
filterString = ''; // ignore multiple if it is exactly the selected item
|
|
155
158
|
}
|
|
156
159
|
|
|
@@ -302,10 +305,10 @@ class Select extends Component {
|
|
|
302
305
|
|
|
303
306
|
_defineProperty(this, "shortcutsScope", this.id);
|
|
304
307
|
|
|
305
|
-
_defineProperty(this, "listId",
|
|
308
|
+
_defineProperty(this, "listId", "".concat(this.id, ":list"));
|
|
306
309
|
|
|
307
|
-
_defineProperty(this, "_focusHandler",
|
|
308
|
-
this.props.onFocus();
|
|
310
|
+
_defineProperty(this, "_focusHandler", e => {
|
|
311
|
+
this.props.onFocus(e);
|
|
309
312
|
this.setState({
|
|
310
313
|
shortcutsEnabled: true,
|
|
311
314
|
focused: true
|
|
@@ -714,6 +717,10 @@ class Select extends Component {
|
|
|
714
717
|
nextState.selected = multiple ? [] : null;
|
|
715
718
|
}
|
|
716
719
|
|
|
720
|
+
if (multiple && !nextState.selected) {
|
|
721
|
+
nextState.selected = prevState.selected;
|
|
722
|
+
}
|
|
723
|
+
|
|
717
724
|
const {
|
|
718
725
|
selected
|
|
719
726
|
} = { ...prevState,
|
|
@@ -894,13 +901,14 @@ class Select extends Component {
|
|
|
894
901
|
|
|
895
902
|
_hidePopup(tryFocusAnchor) {
|
|
896
903
|
if (this.node && this.state.showPopup) {
|
|
897
|
-
this.setState({
|
|
904
|
+
this.setState(prevState => ({
|
|
898
905
|
showPopup: false,
|
|
899
|
-
filterValue: ''
|
|
900
|
-
});
|
|
906
|
+
filterValue: this.props.allowAny ? prevState.filterValue : ''
|
|
907
|
+
}));
|
|
901
908
|
|
|
902
909
|
if (tryFocusAnchor) {
|
|
903
|
-
const
|
|
910
|
+
const focusableSelectExists = this.node && this.node.querySelector('[data-test~=ring-select__focus]');
|
|
911
|
+
const restoreFocusNode = this.props.targetElement || focusableSelectExists;
|
|
904
912
|
|
|
905
913
|
if (restoreFocusNode) {
|
|
906
914
|
restoreFocusNode.focus();
|
|
@@ -911,14 +919,15 @@ class Select extends Component {
|
|
|
911
919
|
|
|
912
920
|
getToolbar() {
|
|
913
921
|
const {
|
|
914
|
-
hint
|
|
922
|
+
hint,
|
|
923
|
+
renderBottomToolbar
|
|
915
924
|
} = this.props;
|
|
916
925
|
const {
|
|
917
926
|
prefix,
|
|
918
927
|
label,
|
|
919
928
|
delayed
|
|
920
929
|
} = this.state.addButton || {};
|
|
921
|
-
const isToolbarHasElements = this.state.addButton || hint;
|
|
930
|
+
const isToolbarHasElements = this.state.addButton || hint || renderBottomToolbar;
|
|
922
931
|
|
|
923
932
|
if (!isToolbarHasElements) {
|
|
924
933
|
return null;
|
|
@@ -926,16 +935,16 @@ class Select extends Component {
|
|
|
926
935
|
|
|
927
936
|
return /*#__PURE__*/React.createElement("div", {
|
|
928
937
|
className: classNames({
|
|
929
|
-
[modules_9d0de074.toolbar]:
|
|
938
|
+
[modules_9d0de074.toolbar]: Boolean(this.state.addButton || renderBottomToolbar)
|
|
930
939
|
}),
|
|
931
940
|
"data-test": "ring-select-toolbar"
|
|
932
|
-
}, this.state.addButton && /*#__PURE__*/React.createElement(Button, {
|
|
941
|
+
}, renderBottomToolbar && renderBottomToolbar(), this.state.addButton && /*#__PURE__*/React.createElement(Button, {
|
|
933
942
|
text: true,
|
|
934
943
|
delayed: delayed,
|
|
935
944
|
className: classNames(modules_9d0de074.button, modules_9d0de074.buttonSpaced),
|
|
936
945
|
onClick: this.addHandler,
|
|
937
946
|
"data-test": "ring-select-toolbar-button"
|
|
938
|
-
}, prefix ?
|
|
947
|
+
}, prefix ? "".concat(prefix, " ").concat(label) : label), hint && /*#__PURE__*/React.createElement(List.ListHint, {
|
|
939
948
|
label: hint,
|
|
940
949
|
"data-test": "ring-select-toolbar-hint"
|
|
941
950
|
}));
|
|
@@ -984,7 +993,9 @@ class Select extends Component {
|
|
|
984
993
|
}
|
|
985
994
|
|
|
986
995
|
_getLabel() {
|
|
987
|
-
|
|
996
|
+
var _ref2, _this$props$label;
|
|
997
|
+
|
|
998
|
+
return (_ref2 = (_this$props$label = this.props.label) !== null && _this$props$label !== void 0 ? _this$props$label : this.props.selectedLabel) !== null && _ref2 !== void 0 ? _ref2 : 'Select an option';
|
|
988
999
|
}
|
|
989
1000
|
|
|
990
1001
|
_getSelectedString() {
|
|
@@ -1021,7 +1032,7 @@ class Select extends Component {
|
|
|
1021
1032
|
disabled: this.props.disabled,
|
|
1022
1033
|
onClick: this._clickHandler,
|
|
1023
1034
|
style: {
|
|
1024
|
-
backgroundImage:
|
|
1035
|
+
backgroundImage: "url(".concat(selected.icon, ")")
|
|
1025
1036
|
}
|
|
1026
1037
|
}));
|
|
1027
1038
|
}
|
|
@@ -1085,8 +1096,8 @@ class Select extends Component {
|
|
|
1085
1096
|
const {
|
|
1086
1097
|
shortcutsEnabled
|
|
1087
1098
|
} = this.state;
|
|
1088
|
-
const classes = classNames(modules_9d0de074.select, 'ring-js-shortcuts', this.props.className, modules_9d0de074[
|
|
1089
|
-
[modules_9d0de074[
|
|
1099
|
+
const classes = classNames(modules_9d0de074.select, 'ring-js-shortcuts', this.props.className, modules_9d0de074["height".concat(this.props.height || this.context)], {
|
|
1100
|
+
[modules_9d0de074["size".concat(this.props.size)]]: this.props.type !== Type.INLINE,
|
|
1090
1101
|
[modules_9d0de074.disabled]: this.props.disabled
|
|
1091
1102
|
});
|
|
1092
1103
|
|
|
@@ -1226,8 +1237,8 @@ _defineProperty(Select, "defaultProps", {
|
|
|
1226
1237
|
maxHeight: 600,
|
|
1227
1238
|
directions: [Popup.PopupProps.Directions.BOTTOM_RIGHT, Popup.PopupProps.Directions.BOTTOM_LEFT, Popup.PopupProps.Directions.TOP_LEFT, Popup.PopupProps.Directions.TOP_RIGHT],
|
|
1228
1239
|
selected: null,
|
|
1229
|
-
label:
|
|
1230
|
-
selectedLabel:
|
|
1240
|
+
label: null,
|
|
1241
|
+
selectedLabel: null,
|
|
1231
1242
|
inputPlaceholder: '',
|
|
1232
1243
|
hint: null,
|
|
1233
1244
|
shortcutsEnabled: false,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
3
|
import 'react';
|
|
3
4
|
import 'prop-types';
|
|
4
5
|
import 'classnames';
|
|
@@ -7,7 +8,7 @@ import '../global/sniffer.js';
|
|
|
7
8
|
import '../list/list.js';
|
|
8
9
|
import '../global/controls-height.js';
|
|
9
10
|
export { S as default } from '../_helpers/select__filter.js';
|
|
10
|
-
import '@jetbrains/icons/close';
|
|
11
|
+
import '@jetbrains/icons/close-12px';
|
|
11
12
|
import '../global/prop-types.js';
|
|
12
13
|
import '../button/button.js';
|
|
13
14
|
import 'focus-visible';
|
|
@@ -17,6 +18,7 @@ import 'util-deprecate';
|
|
|
17
18
|
import '../icon/icon__constants.js';
|
|
18
19
|
import '../_helpers/icon.js';
|
|
19
20
|
import '../icon/icon__svg.js';
|
|
21
|
+
import 'core-js/modules/es.string.replace.js';
|
|
20
22
|
import '../global/memoize.js';
|
|
21
23
|
import '../link/clickableLink.js';
|
|
22
24
|
import '../_helpers/button__classes.js';
|
|
@@ -45,7 +47,7 @@ import '../avatar/avatar.js';
|
|
|
45
47
|
import '../global/url.js';
|
|
46
48
|
import '../avatar/fallback-avatar.js';
|
|
47
49
|
import '../checkbox/checkbox.js';
|
|
48
|
-
import '@jetbrains/icons/checkmark';
|
|
50
|
+
import '@jetbrains/icons/checkmark-14px';
|
|
49
51
|
import '@jetbrains/icons/remove-10px';
|
|
50
52
|
import '../_helpers/checkbox.js';
|
|
51
53
|
import '../list/list__custom.js';
|
|
@@ -21,6 +21,9 @@ export interface Multiple {
|
|
|
21
21
|
label?: string | null | undefined;
|
|
22
22
|
limit?: number | null | undefined;
|
|
23
23
|
selectAll?: boolean | null | undefined;
|
|
24
|
+
renderSelectedItemsDescription?: (selectedItems: SelectItem[], total: number) => ReactNode;
|
|
25
|
+
selectAllLabel?: string;
|
|
26
|
+
deselectAllLabel?: string;
|
|
24
27
|
removeSelectedItems?: boolean | null | undefined;
|
|
25
28
|
}
|
|
26
29
|
export interface TagsReset {
|
|
@@ -105,7 +108,7 @@ export default class SelectPopup<T = unknown> extends PureComponent<SelectPopupP
|
|
|
105
108
|
getFilterWithTags(): JSX.Element | null;
|
|
106
109
|
getBottomLine(): "" | JSX.Element | null;
|
|
107
110
|
handleListResize: () => void;
|
|
108
|
-
getList(ringPopupTarget: string | undefined): JSX.Element | null;
|
|
111
|
+
getList(ringPopupTarget: string | Element | undefined): JSX.Element | null;
|
|
109
112
|
handleSelectAll: () => void;
|
|
110
113
|
getSelectAll: () => false | JSX.Element;
|
|
111
114
|
private _adjustListMaxHeight;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
3
|
import React, { PureComponent } from 'react';
|
|
3
4
|
import classNames from 'classnames';
|
|
4
5
|
import searchIcon from '@jetbrains/icons/search';
|
|
@@ -25,6 +26,7 @@ import 'util-deprecate';
|
|
|
25
26
|
import '../icon/icon__constants.js';
|
|
26
27
|
import '../_helpers/icon.js';
|
|
27
28
|
import '../icon/icon__svg.js';
|
|
29
|
+
import 'core-js/modules/es.string.replace.js';
|
|
28
30
|
import 'react-dom';
|
|
29
31
|
import '../global/schedule-raf.js';
|
|
30
32
|
import '../global/data-tests.js';
|
|
@@ -49,7 +51,7 @@ import '../avatar/avatar.js';
|
|
|
49
51
|
import '../global/url.js';
|
|
50
52
|
import '../avatar/fallback-avatar.js';
|
|
51
53
|
import '../checkbox/checkbox.js';
|
|
52
|
-
import '@jetbrains/icons/checkmark';
|
|
54
|
+
import '@jetbrains/icons/checkmark-14px';
|
|
53
55
|
import '@jetbrains/icons/remove-10px';
|
|
54
56
|
import '../_helpers/checkbox.js';
|
|
55
57
|
import '../list/list__custom.js';
|
|
@@ -60,7 +62,7 @@ import '../list/list__hint.js';
|
|
|
60
62
|
import '../list/consts.js';
|
|
61
63
|
import '../_helpers/loader-inline.js';
|
|
62
64
|
import '../tag/tag.js';
|
|
63
|
-
import '@jetbrains/icons/close';
|
|
65
|
+
import '@jetbrains/icons/close-12px';
|
|
64
66
|
import '@jetbrains/icons/chevron-10px';
|
|
65
67
|
import '../global/controls-height.js';
|
|
66
68
|
import '../_helpers/button__classes.js';
|
|
@@ -164,6 +166,9 @@ class SelectPopup extends PureComponent {
|
|
|
164
166
|
});
|
|
165
167
|
|
|
166
168
|
_defineProperty(this, "getSelectAll", () => {
|
|
169
|
+
var _multiple$renderSelec;
|
|
170
|
+
|
|
171
|
+
const multiple = this.props.multiple;
|
|
167
172
|
const activeFilters = this.props.data.filter(item => !item.disabled);
|
|
168
173
|
return Array.isArray(this.props.selected) && /*#__PURE__*/React.createElement("div", {
|
|
169
174
|
className: modules_b607bec2.selectAll
|
|
@@ -171,9 +176,9 @@ class SelectPopup extends PureComponent {
|
|
|
171
176
|
text: true,
|
|
172
177
|
inline: true,
|
|
173
178
|
onClick: this.handleSelectAll
|
|
174
|
-
}, activeFilters.length !== this.props.selected.length ? 'Select all' : 'Deselect all'), /*#__PURE__*/React.createElement(Text, {
|
|
179
|
+
}, activeFilters.length !== this.props.selected.length ? multiple.selectAllLabel || 'Select all' : multiple.deselectAllLabel || 'Deselect all'), ((_multiple$renderSelec = multiple.renderSelectedItemsDescription) === null || _multiple$renderSelec === void 0 ? void 0 : _multiple$renderSelec.call(multiple, this.props.selected, activeFilters.length)) || /*#__PURE__*/React.createElement(Text, {
|
|
175
180
|
info: true
|
|
176
|
-
},
|
|
181
|
+
}, "".concat(this.props.selected.length, " selected")));
|
|
177
182
|
});
|
|
178
183
|
|
|
179
184
|
_defineProperty(this, "_adjustListMaxHeight", memoizeOne((hidden, userDefinedMaxHeight, ringPopupTarget) => {
|
|
@@ -1,17 +1,20 @@
|
|
|
1
|
+
import { a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
1
2
|
import angular from 'angular';
|
|
2
3
|
import React from 'react';
|
|
3
|
-
import { unmountComponentAtNode, render } from 'react-
|
|
4
|
+
import { unmountComponentAtNode, render } from '../global/react-render-adapter.js';
|
|
4
5
|
import getEventKey from '../global/get-event-key.js';
|
|
5
6
|
import Select, { RerenderableSelect } from '../select/select.js';
|
|
6
7
|
import MessageBundle from '../message-bundle-ng/message-bundle-ng.js';
|
|
7
8
|
import { ControlsHeight } from '../global/controls-height.js';
|
|
8
9
|
import SelectNgOptions from './select-ng__options.js';
|
|
9
10
|
import SelectLazy from './select-ng__lazy.js';
|
|
10
|
-
import '
|
|
11
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
12
|
+
import 'react-dom';
|
|
13
|
+
import 'core-js/modules/es.string.replace.js';
|
|
11
14
|
import 'classnames';
|
|
12
15
|
import 'prop-types';
|
|
13
16
|
import '@jetbrains/icons/chevron-down';
|
|
14
|
-
import '@jetbrains/icons/close';
|
|
17
|
+
import '@jetbrains/icons/close-12px';
|
|
15
18
|
import 'deep-equal';
|
|
16
19
|
import '../dropdown/dropdown.js';
|
|
17
20
|
import '../global/data-tests.js';
|
|
@@ -57,7 +60,7 @@ import '../_helpers/link.js';
|
|
|
57
60
|
import '../_helpers/list.js';
|
|
58
61
|
import '../list/list__item.js';
|
|
59
62
|
import '../checkbox/checkbox.js';
|
|
60
|
-
import '@jetbrains/icons/checkmark';
|
|
63
|
+
import '@jetbrains/icons/checkmark-14px';
|
|
61
64
|
import '@jetbrains/icons/remove-10px';
|
|
62
65
|
import '../_helpers/checkbox.js';
|
|
63
66
|
import '../list/list__custom.js';
|
|
@@ -435,9 +438,19 @@ angularModule.directive('rgSelect', function rgSelectDirective() {
|
|
|
435
438
|
return sizes[ctrl.size] || sizes.FULL;
|
|
436
439
|
}
|
|
437
440
|
|
|
441
|
+
function selectRef(instance) {
|
|
442
|
+
if (instance != null) {
|
|
443
|
+
ctrl.selectInstance = instance;
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
|
|
438
447
|
function reRenderSelect(props) {
|
|
439
|
-
|
|
440
|
-
|
|
448
|
+
var _ctrl$selectInstance;
|
|
449
|
+
|
|
450
|
+
if ((_ctrl$selectInstance = ctrl.selectInstance) !== null && _ctrl$selectInstance !== void 0 && _ctrl$selectInstance.node) {
|
|
451
|
+
ctrl.selectInstance.rerender({ ...props,
|
|
452
|
+
ref: selectRef
|
|
453
|
+
});
|
|
441
454
|
}
|
|
442
455
|
}
|
|
443
456
|
/**
|
|
@@ -585,9 +598,11 @@ angularModule.directive('rgSelect', function rgSelectDirective() {
|
|
|
585
598
|
ctrl.config = angular.extend({}, ctrl.defaultConfig, ctrl.config || {});
|
|
586
599
|
|
|
587
600
|
if (getType() === 'suggest' || getType() === 'input') {
|
|
588
|
-
|
|
601
|
+
render( /*#__PURE__*/React.createElement(RerenderableSelect, _extends({
|
|
602
|
+
ref: selectRef
|
|
603
|
+
}, ctrl.config)), container);
|
|
589
604
|
} else {
|
|
590
|
-
ctrl.selectInstance = new SelectLazy(container, ctrl.config, ctrl, getType());
|
|
605
|
+
ctrl.selectInstance = new SelectLazy(container, ctrl.config, ctrl, getType(), selectRef);
|
|
591
606
|
} // Preserve existing contents of the directive
|
|
592
607
|
|
|
593
608
|
|
|
@@ -1,12 +1,15 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
1
|
+
import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import angular from 'angular';
|
|
3
|
-
import { render, hydrate } from 'react-dom';
|
|
4
3
|
import React from 'react';
|
|
4
|
+
import { render, hydrate } from '../global/react-render-adapter.js';
|
|
5
5
|
import { RerenderableSelect } from '../select/select.js';
|
|
6
|
+
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
7
|
+
import 'react-dom';
|
|
8
|
+
import 'core-js/modules/es.string.replace.js';
|
|
6
9
|
import 'classnames';
|
|
7
10
|
import 'prop-types';
|
|
8
11
|
import '@jetbrains/icons/chevron-down';
|
|
9
|
-
import '@jetbrains/icons/close';
|
|
12
|
+
import '@jetbrains/icons/close-12px';
|
|
10
13
|
import 'deep-equal';
|
|
11
14
|
import '../dropdown/dropdown.js';
|
|
12
15
|
import '../global/data-tests.js';
|
|
@@ -53,7 +56,7 @@ import '../_helpers/link.js';
|
|
|
53
56
|
import '../_helpers/list.js';
|
|
54
57
|
import '../list/list__item.js';
|
|
55
58
|
import '../checkbox/checkbox.js';
|
|
56
|
-
import '@jetbrains/icons/checkmark';
|
|
59
|
+
import '@jetbrains/icons/checkmark-14px';
|
|
57
60
|
import '@jetbrains/icons/remove-10px';
|
|
58
61
|
import '../_helpers/checkbox.js';
|
|
59
62
|
import '../list/list__custom.js';
|
|
@@ -80,7 +83,7 @@ import '../text/text.js';
|
|
|
80
83
|
import '../_helpers/select__filter.js';
|
|
81
84
|
|
|
82
85
|
class SelectLazy {
|
|
83
|
-
constructor(container, props, ctrl, type) {
|
|
86
|
+
constructor(container, props, ctrl, type, selectRef) {
|
|
84
87
|
_defineProperty(this, "onClick", () => {
|
|
85
88
|
this._clickHandler();
|
|
86
89
|
});
|
|
@@ -90,6 +93,13 @@ class SelectLazy {
|
|
|
90
93
|
this.props = props || {};
|
|
91
94
|
this.type = type;
|
|
92
95
|
this.node = container;
|
|
96
|
+
this.selectInstance = null;
|
|
97
|
+
|
|
98
|
+
this.selectRef = node => {
|
|
99
|
+
this.selectInstance = node;
|
|
100
|
+
selectRef(node);
|
|
101
|
+
};
|
|
102
|
+
|
|
93
103
|
this._popup = {
|
|
94
104
|
isVisible: angular.noop
|
|
95
105
|
};
|
|
@@ -114,15 +124,21 @@ class SelectLazy {
|
|
|
114
124
|
}
|
|
115
125
|
|
|
116
126
|
attachEvents() {
|
|
117
|
-
this.container.addEventListener('click', this.onClick
|
|
127
|
+
this.container.addEventListener('click', this.onClick, {
|
|
128
|
+
capture: true
|
|
129
|
+
});
|
|
118
130
|
}
|
|
119
131
|
|
|
120
132
|
detachEvents() {
|
|
121
|
-
this.container.removeEventListener('click', this.onClick
|
|
133
|
+
this.container.removeEventListener('click', this.onClick, {
|
|
134
|
+
capture: true
|
|
135
|
+
});
|
|
122
136
|
}
|
|
123
137
|
|
|
124
138
|
render(props) {
|
|
125
|
-
this.reactSelect = /*#__PURE__*/React.createElement(RerenderableSelect, Object.assign({}, this.props, props || {})
|
|
139
|
+
this.reactSelect = /*#__PURE__*/React.createElement(RerenderableSelect, _extends({}, Object.assign({}, this.props, props || {}), {
|
|
140
|
+
ref: this.selectRef
|
|
141
|
+
}));
|
|
126
142
|
this.props = this.reactSelect.props;
|
|
127
143
|
|
|
128
144
|
if (this.type !== 'dropdown') {
|
|
@@ -136,12 +152,14 @@ class SelectLazy {
|
|
|
136
152
|
this.detachEvents();
|
|
137
153
|
|
|
138
154
|
if (this.type === 'dropdown') {
|
|
139
|
-
|
|
155
|
+
var _this$selectInstance, _this$selectInstance$;
|
|
156
|
+
|
|
157
|
+
render(this.reactSelect, this.container); // Hack for React17, where click event is not triggered on just rendered Select node
|
|
158
|
+
|
|
159
|
+
(_this$selectInstance = this.selectInstance) === null || _this$selectInstance === void 0 ? void 0 : (_this$selectInstance$ = _this$selectInstance._openPopupIfClosed) === null || _this$selectInstance$ === void 0 ? void 0 : _this$selectInstance$.call(_this$selectInstance);
|
|
140
160
|
} else {
|
|
141
|
-
|
|
161
|
+
hydrate(this.reactSelect, this.container);
|
|
142
162
|
}
|
|
143
|
-
|
|
144
|
-
this.ctrl.selectInstance._openPopupIfClosed();
|
|
145
163
|
}
|
|
146
164
|
|
|
147
165
|
}
|
|
@@ -10,7 +10,7 @@ class Options {
|
|
|
10
10
|
let match;
|
|
11
11
|
|
|
12
12
|
if (!(match = optionsString.match(this.constructor.OPTIONS_REGEXP))) {
|
|
13
|
-
throw new Error('Bad rgSelect expression format. Expected: [{item}] [[as] item.text] [select as item.selectLabel]' +
|
|
13
|
+
throw new Error('Bad rgSelect expression format. Expected: [{item}] [[as] item.text] [select as item.selectLabel]' + " [describe as {item.description}] [for] {item} in {items|dataSource(query)} [track by item.id], Received: ".concat(optionsString));
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
16
|
* Now we can write only `item.value as item.label for item in items`
|
|
@@ -83,7 +83,7 @@ class Options {
|
|
|
83
83
|
});
|
|
84
84
|
|
|
85
85
|
if (matchedOptions.length > 1) {
|
|
86
|
-
throw new Error(
|
|
86
|
+
throw new Error("Error(rg-select): You can not have two options with same value(".concat(toString(value), ")"));
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
return matchedOptions[0];
|
|
@@ -12,12 +12,10 @@ export default function shortcutsHOC<P>(ComposedComponent: ComponentType<P> | st
|
|
|
12
12
|
new (props: (P & ShortcutsHOCProps) | Readonly<P & ShortcutsHOCProps>): {
|
|
13
13
|
_shortcutsScopeUid: string;
|
|
14
14
|
render(): JSX.Element;
|
|
15
|
-
context:
|
|
15
|
+
context: unknown;
|
|
16
16
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P & ShortcutsHOCProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
17
17
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
18
|
-
readonly props: Readonly<P & ShortcutsHOCProps
|
|
19
|
-
children?: React.ReactNode;
|
|
20
|
-
}>;
|
|
18
|
+
readonly props: Readonly<P & ShortcutsHOCProps>;
|
|
21
19
|
state: Readonly<{}>;
|
|
22
20
|
refs: {
|
|
23
21
|
[key: string]: React.ReactInstance;
|
|
@@ -38,12 +36,10 @@ export default function shortcutsHOC<P>(ComposedComponent: ComponentType<P> | st
|
|
|
38
36
|
new (props: P & ShortcutsHOCProps, context: any): {
|
|
39
37
|
_shortcutsScopeUid: string;
|
|
40
38
|
render(): JSX.Element;
|
|
41
|
-
context:
|
|
39
|
+
context: unknown;
|
|
42
40
|
setState<K extends never>(state: {} | ((prevState: Readonly<{}>, props: Readonly<P & ShortcutsHOCProps>) => {} | Pick<{}, K> | null) | Pick<{}, K> | null, callback?: (() => void) | undefined): void;
|
|
43
41
|
forceUpdate(callback?: (() => void) | undefined): void;
|
|
44
|
-
readonly props: Readonly<P & ShortcutsHOCProps
|
|
45
|
-
children?: React.ReactNode;
|
|
46
|
-
}>;
|
|
42
|
+
readonly props: Readonly<P & ShortcutsHOCProps>;
|
|
47
43
|
state: Readonly<{}>;
|
|
48
44
|
refs: {
|
|
49
45
|
[key: string]: React.ReactInstance;
|