@jetbrains/ring-ui 4.1.0-beta.4 → 4.1.2
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 +13 -0
- package/README.md +17 -15
- package/babel.config.js +3 -2
- package/components/alert/alert.js +9 -3
- package/components/alert/alert.test.js +21 -48
- package/components/alert/container.css +1 -1
- package/components/alert/container.test.js +3 -13
- package/components/alert-service/alert-service.examples.css +18 -0
- package/components/alert-service/alert-service.examples.js +21 -0
- package/components/alert-service/alert-service.js +10 -3
- package/components/analytics/analytics__fus-plugin.js +3 -3
- package/components/analytics/analytics__ga-plugin.js +2 -2
- package/components/auth/auth.test.js +14 -7
- package/components/auth/auth__core.js +64 -33
- package/components/auth-dialog/auth-dialog.css +2 -3
- package/components/auth-dialog/auth-dialog.js +4 -1
- package/components/auth-dialog/auth-dialog.test.js +3 -19
- package/components/avatar/avatar.css +4 -1
- package/components/avatar/avatar.examples.js +3 -2
- package/components/avatar/avatar.js +34 -6
- package/components/avatar/avatar.test.js +20 -17
- package/components/avatar/fallback-avatar.js +136 -0
- package/components/avatar-editor-ng/avatar-editor-ng.css +2 -2
- package/components/avatar-editor-ng/avatar-editor-ng.js +2 -1
- package/components/avatar-editor-ng/{avatar-editor-ng.html → avatar-editor-ng__template.js} +2 -2
- package/components/badge/badge.test.js +13 -20
- package/components/button/button.css +2 -2
- package/components/button/button.js +4 -1
- package/components/button/button.test.js +32 -33
- package/components/button-group/button-group.js +1 -1
- package/components/button-group/caption.js +1 -1
- package/components/button-ng/button-ng.js +1 -1
- package/components/button-set-ng/button-set-ng.js +3 -1
- package/components/checkbox/checkbox.css +1 -1
- package/components/code/code.js +2 -5
- package/components/confirm/confirm.js +1 -0
- package/components/confirm-service/confirm-service.js +5 -5
- package/components/content-layout/content-layout.css +1 -1
- package/components/data-list/data-list.css +1 -1
- package/components/date-picker/date-input.js +5 -4
- package/components/date-picker/date-picker.css +34 -22
- package/components/date-picker/date-picker.js +16 -14
- package/components/date-picker/date-popup.js +22 -7
- package/components/date-picker/month-names.js +8 -5
- package/components/date-picker/month.js +6 -2
- package/components/date-picker/weekdays.js +10 -2
- package/components/dialog/dialog.examples.js +3 -1
- package/components/dialog/dialog.js +10 -5
- package/components/dialog/dialog.test.js +1 -1
- package/components/dialog/dialog__body-scroll-preventer.js +51 -31
- package/components/dialog-ng/dialog-ng.js +10 -10
- package/components/dialog-ng/{dialog-ng.html → dialog-ng__template.js} +2 -2
- package/components/dropdown/dropdown.examples.js +36 -1
- package/components/dropdown/dropdown.test.js +2 -2
- package/components/dropdown-menu/dropdown-menu.examples.js +47 -0
- package/components/dropdown-menu/dropdown-menu.js +117 -0
- package/components/dropdown-menu/dropdown-menu.test.js +76 -0
- package/components/error-bubble/error-bubble-legacy.css +1 -1
- package/components/error-bubble/error-bubble.css +1 -1
- package/components/error-bubble/error-bubble.examples.js +1 -1
- package/components/error-page/error-page.css +2 -2
- package/components/footer-ng/footer-ng.js +13 -3
- package/components/form/form.css +2 -2
- package/components/form-ng/form-ng.js +3 -1
- package/components/global/global.css +1 -1
- package/components/global/theme.js +1 -1
- package/components/global/variables.css +8 -1
- package/components/grid/grid.css +10 -9
- package/components/header/header.css +1 -1
- package/components/header/header.examples.js +7 -8
- package/components/header/profile.js +10 -11
- package/components/http/http.js +1 -1
- package/components/icon/icon.css +5 -4
- package/components/input/input-legacy.css +7 -7
- package/components/island/header.js +2 -2
- package/components/island/island.css +8 -3
- package/components/island-legacy/island-legacy.css +3 -1
- package/components/list/list.js +6 -1
- package/components/list/list__custom.js +9 -3
- package/components/list/list__item.js +8 -2
- package/components/list/list__link.js +2 -1
- package/components/loader-inline/loader-inline.css +1 -1
- package/components/loader-screen/loader-screen.css +1 -1
- package/components/message/message.css +1 -1
- package/components/message/message.examples.js +8 -7
- package/components/pager/pager.js +5 -3
- package/components/permissions/permissions.js +1 -1
- package/components/popup/popup.js +1 -1
- package/components/popup/popup.test.js +15 -13
- package/components/progress-bar/progress-bar.css +1 -1
- package/components/progress-bar/progress-bar.examples.js +3 -3
- package/components/progress-bar/progress-bar.js +5 -2
- package/components/progress-bar/progress-bar.test.js +12 -13
- package/components/progress-bar-ng/progress-bar-ng.examples.js +3 -3
- package/components/query-assist/query-assist.css +13 -3
- package/components/query-assist/query-assist.examples.js +3 -4
- package/components/query-assist/query-assist.js +56 -12
- package/components/query-assist/query-assist.test.js +37 -5
- package/components/save-field-ng/save-field-ng.css +0 -3
- package/components/save-field-ng/save-field-ng.js +3 -1
- package/components/save-field-ng/{save-field-ng.html → save-field-ng__template.js} +2 -2
- package/components/select/select.css +12 -7
- package/components/select/select.examples.js +13 -0
- package/components/select/select.js +30 -43
- package/components/select/select.test.js +4 -5
- package/components/select/select__popup.js +1 -0
- package/components/shortcuts-hint-ng/shortcuts-hint-ng.css +1 -1
- package/components/shortcuts-hint-ng/shortcuts-hint-ng.js +1 -1
- package/components/shortcuts-hint-ng/{shortcuts-hint-ng.html → shortcuts-hint-ng__template.js} +2 -2
- package/components/sidebar/sidebar.css +1 -0
- package/components/sidebar-ng/sidebar-ng.js +6 -2
- package/components/sidebar-ng/{sidebar-ng__button.html → sidebar-ng__button-template.js} +2 -2
- package/components/sidebar-ng/{sidebar-ng.html → sidebar-ng__template.js} +2 -2
- package/components/table/header.js +9 -1
- package/components/table/row.js +2 -1
- package/components/table/table.css +2 -1
- package/components/table-legacy/table-legacy.css +2 -2
- package/components/table-legacy/table-legacy__toolbar.css +2 -2
- package/components/table-legacy-ng/table-legacy-ng.js +38 -5
- package/components/table-legacy-ng/table-legacy-ng__pager.js +7 -1
- package/components/tabs/collapsible-tab.js +2 -2
- package/components/tabs/collapsible-tabs.js +5 -9
- package/components/tabs/tab-link.js +4 -2
- package/components/tabs/tabs.css +32 -5
- package/components/tabs-ng/tabs-ng.js +4 -2
- package/components/tabs-ng/{tabs-ng.html → tabs-ng__template.js} +6 -2
- package/components/tag/tag.css +5 -2
- package/components/tag/tag.examples.js +3 -0
- package/components/tag/tag.js +19 -16
- package/components/tags-input/tag-input.examples.js +1 -1
- package/components/tags-input/tags-input.js +5 -2
- package/components/template-ng/template-ng.js +1 -1
- package/components/tooltip/tooltip.js +7 -2
- package/components/user-agreement/user-agreement.css +1 -5
- package/components/user-agreement/user-agreement.examples.js +7 -6
- package/components/user-agreement/user-agreement.js +11 -3
- package/dist/_helpers/_rollupPluginBabelHelpers.js +1 -90
- package/dist/_helpers/anchor.js +6 -7
- package/dist/_helpers/badge.js +1 -1
- package/dist/_helpers/button-group.js +3 -0
- package/dist/_helpers/button-set.js +3 -0
- package/dist/_helpers/button-toolbar.js +3 -0
- package/dist/_helpers/button__classes.js +16 -15
- package/dist/_helpers/card.js +6 -8
- package/dist/_helpers/checkbox.js +3 -0
- package/dist/_helpers/date-picker.js +1 -1
- package/dist/_helpers/dialog__body-scroll-preventer.js +49 -32
- package/dist/_helpers/error-message.js +3 -0
- package/dist/_helpers/footer.js +121 -0
- package/dist/_helpers/grid.js +1 -1
- package/dist/_helpers/group.js +3 -0
- package/dist/_helpers/header.js +1 -1
- package/dist/_helpers/icon.js +3 -0
- package/dist/_helpers/inject-styles.js +1 -1
- package/dist/_helpers/input.js +3 -0
- package/dist/_helpers/island.js +1 -1
- package/dist/_helpers/link.js +3 -0
- package/dist/_helpers/list.js +1 -1
- package/dist/_helpers/loader-screen.js +3 -0
- package/dist/_helpers/panel.js +3 -0
- package/dist/_helpers/query-assist__suggestions.js +1 -1
- package/dist/_helpers/radio.js +3 -0
- package/dist/_helpers/select__filter.js +8 -10
- package/dist/_helpers/services-link.js +6 -8
- package/dist/_helpers/sidebar.js +17 -17
- package/dist/_helpers/table.js +1 -1
- package/dist/_helpers/tabs.js +1 -1
- package/dist/_helpers/title.js +3 -3
- package/dist/alert/alert.js +20 -9
- package/dist/alert/container.js +7 -9
- package/dist/alert-service/alert-service.js +26 -13
- package/dist/analytics/analytics.js +2 -2
- package/dist/analytics/analytics__custom-plugin.js +1 -1
- package/dist/analytics/analytics__fus-plugin.js +13 -11
- package/dist/analytics/analytics__ga-plugin.js +3 -3
- package/dist/analytics/analytics__plugin-utils.js +1 -1
- package/dist/analytics-ng/analytics-ng.js +94 -0
- package/dist/auth/auth.js +7 -4
- package/dist/auth/auth__core.js +106 -63
- package/dist/auth/background-flow.js +1 -2
- package/dist/auth/down-notification.js +19 -12
- package/dist/auth/iframe-flow.js +5 -2
- package/dist/auth/landing-entry.js +1 -1
- package/dist/auth/landing.js +5 -2
- package/dist/auth/request-builder.js +1 -1
- package/dist/auth/response-parser.js +3 -2
- package/dist/auth/storage.js +5 -3
- package/dist/auth/token-validator.js +6 -5
- package/dist/auth/window-flow.js +1 -1
- package/dist/auth-dialog/auth-dialog.js +9 -6
- package/dist/auth-dialog-service/auth-dialog-service.js +9 -6
- package/dist/auth-ng/auth-ng.js +203 -0
- package/dist/auth-ng/auth-ng.mock.js +33 -0
- package/dist/autofocus-ng/autofocus-ng.js +50 -0
- package/dist/avatar/avatar.js +41 -32
- package/dist/avatar/fallback-avatar.js +141 -0
- package/dist/avatar-editor-ng/avatar-editor-ng.js +164 -0
- package/dist/avatar-editor-ng/avatar-editor-ng__template.js +30 -0
- package/dist/avatar-ng/avatar-ng.js +18 -0
- package/dist/badge/badge.js +6 -8
- package/dist/badge-ng/badge-ng.js +16 -0
- package/dist/breadcrumb-ng/breadcrumb-ng.js +61 -0
- package/dist/button/button.js +16 -10
- package/dist/button-group/button-group.js +4 -4
- package/dist/button-group/caption.js +24 -5
- package/dist/button-group-ng/button-group-ng.js +38 -0
- package/dist/button-ng/button-ng.js +223 -0
- package/dist/button-set/button-set.js +3 -4
- package/dist/button-set-ng/button-set-ng.js +19 -0
- package/dist/button-toolbar/button-toolbar.js +3 -4
- package/dist/button-toolbar-ng/button-toolbar-ng.js +23 -0
- package/dist/caret/caret.js +4 -2
- package/dist/checkbox/checkbox.js +11 -13
- package/dist/checkbox-ng/checkbox-ng.js +55 -0
- package/dist/code/code.js +136 -0
- package/dist/compiler-ng/compiler-ng.js +53 -0
- package/dist/confirm/confirm.js +8 -5
- package/dist/confirm-ng/confirm-ng.js +66 -0
- package/dist/confirm-service/confirm-service.js +21 -18
- package/dist/content-layout/content-layout.js +8 -10
- package/dist/contenteditable/contenteditable.js +14 -17
- package/dist/data-list/data-list.js +12 -9
- package/dist/data-list/data-list.mock.js +2 -2
- package/dist/data-list/item.js +7 -5
- package/dist/data-list/selection.js +7 -3
- package/dist/data-list/title.js +3 -1
- package/dist/data-list-ng/data-list-ng.js +59 -0
- package/dist/date-picker/consts.js +1 -2
- package/dist/date-picker/date-input.js +17 -12
- package/dist/date-picker/date-picker.js +41 -32
- package/dist/date-picker/date-popup.js +51 -28
- package/dist/date-picker/day.js +4 -4
- package/dist/date-picker/formats.js +1 -1
- package/dist/date-picker/month-names.js +18 -11
- package/dist/date-picker/month-slider.js +4 -4
- package/dist/date-picker/month.js +13 -7
- package/dist/date-picker/months.js +3 -3
- package/dist/date-picker/weekdays.js +12 -4
- package/dist/date-picker/years.js +4 -4
- package/dist/dialog/dialog.js +21 -16
- package/dist/dialog/dialog__body-scroll-preventer.js +1 -1
- package/dist/dialog-ng/dialog-ng.js +601 -0
- package/dist/dialog-ng/dialog-ng__template.js +71 -0
- package/dist/docked-panel-ng/docked-panel-ng.js +170 -0
- package/dist/dropdown/anchor.js +2 -1
- package/dist/dropdown/dropdown.js +22 -18
- package/dist/dropdown-menu/dropdown-menu.js +175 -0
- package/dist/error-bubble/error-bubble.js +7 -9
- package/dist/error-message/error-message.js +4 -4
- package/dist/error-message-ng/error-message-ng.js +53 -0
- package/dist/footer/footer.js +6 -119
- package/dist/footer-ng/footer-ng.js +75 -0
- package/dist/form-ng/form-ng.js +169 -0
- package/dist/global/angular-component-factory.js +6 -4
- package/dist/global/compose.js +8 -2
- package/dist/global/composeRefs.js +13 -7
- package/dist/global/conic-gradient.js +13 -12
- package/dist/global/create-stateful-context.js +12 -9
- package/dist/global/data-tests.js +10 -3
- package/dist/global/dom.js +12 -5
- package/dist/global/focus-sensor-hoc.js +20 -19
- package/dist/global/fuzzy-highlight.js +10 -6
- package/dist/global/get-event-key.js +1 -1
- package/dist/global/get-uid.js +1 -1
- package/dist/global/inject-styles.js +4 -1
- package/dist/global/linear-function.js +1 -2
- package/dist/global/listeners.js +1 -1
- package/dist/global/memoize.js +3 -2
- package/dist/global/normalize-indent.js +1 -1
- package/dist/global/promise-with-timeout.js +5 -4
- package/dist/global/radial-gradient-mask.js +6 -3
- package/dist/global/react-dom-renderer.js +3 -3
- package/dist/global/rerender-hoc.js +14 -12
- package/dist/global/ring-angular-component.js +6 -2
- package/dist/global/schedule-raf.js +1 -1
- package/dist/global/sniffer.js +1 -1
- package/dist/global/supports-css.js +1 -1
- package/dist/global/theme.js +27 -26
- package/dist/global/trivial-template-tag.js +6 -2
- package/dist/global/url.js +3 -1
- package/dist/global/variables_dark.js +1 -1
- package/dist/grid/col.js +6 -8
- package/dist/grid/grid.js +5 -7
- package/dist/grid/row.js +6 -8
- package/dist/group/group.js +7 -10
- package/dist/group-ng/group-ng.js +11 -0
- package/dist/header/header.js +29 -26
- package/dist/header/logo.js +8 -9
- package/dist/header/profile.js +54 -46
- package/dist/header/services-link.js +1 -0
- package/dist/header/services.js +23 -19
- package/dist/header/smart-profile.js +29 -26
- package/dist/header/smart-services.js +12 -11
- package/dist/header/tray-icon.js +12 -12
- package/dist/header/tray.js +6 -8
- package/dist/heading/heading.js +10 -13
- package/dist/http/http.js +53 -44
- package/dist/http/http.mock.js +4 -4
- 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 +5 -3
- package/dist/icon/icon.js +8 -8
- package/dist/icon/icon__svg.js +81 -6
- package/dist/icon/index.js +2 -1
- package/dist/icon-ng/icon-ng.js +89 -0
- package/dist/input/input.js +11 -14
- package/dist/input-ng/input-ng.js +166 -0
- package/dist/island/adaptive-island-hoc.js +10 -9
- package/dist/island/content.js +8 -10
- package/dist/island/header.js +7 -9
- package/dist/island/island.js +6 -9
- package/dist/island-legacy/content-legacy.js +6 -8
- package/dist/island-legacy/header-legacy.js +6 -8
- package/dist/island-legacy/island-legacy.js +6 -8
- package/dist/island-ng/island-content-ng.js +56 -0
- package/dist/island-ng/island-header-ng.js +32 -0
- package/dist/island-ng/island-ng-class-fixer.js +9 -0
- package/dist/island-ng/island-ng.js +31 -0
- package/dist/link/clickableLink.js +8 -10
- package/dist/link/link.js +12 -15
- package/dist/link-ng/link-ng.js +25 -0
- package/dist/list/list.js +100 -76
- package/dist/list/list__custom.js +15 -12
- package/dist/list/list__hint.js +1 -1
- package/dist/list/list__item.js +22 -15
- package/dist/list/list__link.js +11 -12
- package/dist/list/list__separator.js +1 -1
- package/dist/list/list__title.js +1 -1
- package/dist/list/list__users-groups-source.js +13 -8
- package/dist/loader/loader.js +8 -10
- package/dist/loader/loader__core.js +9 -8
- package/dist/loader-inline/inject-styles.js +1 -1
- package/dist/loader-inline/loader-inline.js +6 -8
- package/dist/loader-inline-ng/loader-inline-ng.js +42 -0
- package/dist/loader-ng/loader-ng.js +43 -0
- package/dist/loader-screen/loader-screen.js +7 -10
- package/dist/loader-screen-ng/loader-screen-ng.js +99 -0
- package/dist/login-dialog/login-dialog.js +7 -5
- package/dist/login-dialog/service.js +9 -6
- package/dist/markdown/code.js +30 -0
- package/dist/markdown/heading.js +23 -0
- package/dist/markdown/link.js +30 -0
- package/dist/markdown/markdown.js +73 -0
- package/dist/message/message.js +7 -6
- package/dist/message-bundle-ng/message-bundle-ng.js +111 -0
- package/dist/old-browsers-message/old-browsers-message.js +0 -1
- package/dist/old-browsers-message/old-browsers-message__stop.js +0 -1
- package/dist/old-browsers-message/white-list.js +4 -5
- package/dist/pager/pager.js +20 -11
- package/dist/pager-ng/pager-ng.js +96 -0
- package/dist/panel/panel.js +7 -10
- package/dist/panel-ng/panel-ng.js +16 -0
- package/dist/permissions/permissions.js +4 -2
- package/dist/permissions/permissions__cache.js +1 -1
- package/dist/permissions-ng/permissions-ng.js +274 -0
- package/dist/place-under-ng/place-under-ng.js +157 -0
- package/dist/popup/popup.js +11 -11
- package/dist/popup/popup.target.js +4 -5
- package/dist/popup/position.js +18 -16
- package/dist/popup-menu/popup-menu.js +23 -16
- package/dist/progress-bar/progress-bar.js +14 -12
- package/dist/progress-bar-ng/progress-bar-ng.js +15 -0
- package/dist/promised-click-ng/promised-click-ng.js +126 -0
- package/dist/proxy-attrs/proxy-attrs.js +1 -1
- package/dist/query-assist/query-assist.js +156 -76
- package/dist/query-assist/query-assist__suggestions.js +5 -1
- package/dist/query-assist-ng/query-assist-ng.js +82 -0
- package/dist/radio/radio.js +9 -7
- package/dist/radio/radio__item.js +13 -18
- package/dist/radio-ng/radio-ng.js +63 -0
- package/dist/save-field-ng/save-field-ng.js +335 -0
- package/dist/save-field-ng/save-field-ng__template.js +34 -0
- package/dist/select/select.js +118 -95
- package/dist/select/select__filter.js +6 -1
- package/dist/select/select__popup.js +12 -6
- package/dist/select-ng/select-ng.js +621 -0
- package/dist/select-ng/select-ng__lazy.js +150 -0
- package/dist/select-ng/select-ng__options.js +145 -0
- package/dist/shortcuts/core.js +7 -4
- package/dist/shortcuts/shortcuts-hoc.js +8 -10
- package/dist/shortcuts/shortcuts.js +6 -6
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +120 -0
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng__template.js +50 -0
- package/dist/shortcuts-ng/shortcuts-ng.js +261 -0
- package/dist/sidebar-ng/sidebar-ng.js +111 -0
- package/dist/sidebar-ng/sidebar-ng__button-template.js +20 -0
- package/dist/sidebar-ng/sidebar-ng__template.js +12 -0
- package/dist/storage/storage.js +3 -2
- package/dist/storage/storage__fallback.js +3 -2
- package/dist/storage/storage__local.js +5 -3
- package/dist/style.css +1 -1
- package/dist/tab-trap/tab-trap.js +15 -13
- package/dist/table/cell.js +2 -2
- package/dist/table/disable-hover-hoc.js +4 -4
- package/dist/table/header-cell.js +10 -11
- package/dist/table/header.js +19 -12
- package/dist/table/multitable.js +33 -25
- package/dist/table/row-with-focus-sensor.js +7 -5
- package/dist/table/row.js +17 -15
- package/dist/table/selection-adapter.js +1 -1
- package/dist/table/selection-shortcuts-hoc.js +10 -8
- package/dist/table/selection.js +25 -17
- package/dist/table/smart-table.js +16 -10
- package/dist/table/table.js +38 -33
- package/dist/table-legacy-ng/table-legacy-ng.js +501 -0
- package/dist/table-legacy-ng/table-legacy-ng__pager.js +122 -0
- package/dist/table-legacy-ng/table-legacy-ng__selection-navigate-actions.js +123 -0
- package/dist/table-legacy-ng/table-legacy-ng__selection.js +179 -0
- package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +56 -0
- package/dist/table-ng/smart-table-ng.js +65 -0
- package/dist/table-ng/table-ng.js +64 -0
- package/dist/tabs/collapsible-more.js +37 -30
- package/dist/tabs/collapsible-tab.js +16 -14
- package/dist/tabs/collapsible-tabs.js +83 -80
- package/dist/tabs/custom-item.js +6 -3
- package/dist/tabs/dumb-tabs.js +19 -14
- package/dist/tabs/smart-tabs.js +13 -11
- package/dist/tabs/tab-link.js +13 -7
- package/dist/tabs/tab.js +1 -1
- package/dist/tabs/tabs.js +5 -1
- package/dist/tabs-ng/tabs-ng.js +193 -0
- package/dist/tabs-ng/tabs-ng__template.js +40 -0
- package/dist/tag/tag.js +22 -16
- package/dist/tags-input/tags-input.js +48 -36
- package/dist/tags-input-ng/tags-input-ng.js +89 -0
- package/dist/tags-list/tags-list.js +8 -9
- package/dist/template-ng/template-ng.js +70 -0
- package/dist/text/text.js +7 -9
- package/dist/theme-ng/theme-ng.js +44 -0
- package/dist/title-ng/title-ng.js +114 -0
- package/dist/toggle/toggle.js +8 -11
- package/dist/toggle-ng/toggle-ng.js +16 -0
- package/dist/tooltip/tooltip.js +16 -14
- package/dist/tooltip-ng/tooltip-ng.js +98 -0
- package/dist/user-agreement/service.js +409 -0
- package/dist/user-agreement/toolbox.eula.js +162 -0
- package/dist/user-agreement/user-agreement.js +167 -0
- package/dist/user-card/card.js +3 -0
- package/dist/user-card/smart-user-card-tooltip.js +16 -16
- package/dist/user-card/tooltip.js +9 -7
- package/dist/user-card/user-card.js +5 -2
- package/dist/user-card-ng/user-card-ng.js +59 -0
- package/package.json +83 -81
- package/webpack.config.js +14 -10
- package/components/button-set-ng/button-set-ng.html +0 -1
- package/components/footer-ng/footer-ng.html +0 -13
- package/components/form-ng/form-ng__error-bubble.html +0 -3
- package/components/table-legacy-ng/table-legacy-ng.html +0 -4
- package/components/table-legacy-ng/table-legacy-ng__column.html +0 -12
- package/components/table-legacy-ng/table-legacy-ng__header.html +0 -4
- package/components/table-legacy-ng/table-legacy-ng__pager.html +0 -7
- package/components/table-legacy-ng/table-legacy-ng__row.html +0 -12
- package/components/table-legacy-ng/table-legacy-ng__title.html +0 -9
- package/dist/_helpers/caption.js +0 -25
- package/dist/_helpers/icon__svg.js +0 -83
|
@@ -23,6 +23,7 @@ export default class ProgressBar extends PureComponent {
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
static propTypes = {
|
|
26
|
+
label: PropTypes.string,
|
|
26
27
|
theme: PropTypes.string,
|
|
27
28
|
|
|
28
29
|
/**
|
|
@@ -58,7 +59,8 @@ export default class ProgressBar extends PureComponent {
|
|
|
58
59
|
static defaultProps = {
|
|
59
60
|
max: 1.0,
|
|
60
61
|
value: 0,
|
|
61
|
-
theme: Theme.LIGHT
|
|
62
|
+
theme: Theme.LIGHT,
|
|
63
|
+
label: 'Progress'
|
|
62
64
|
};
|
|
63
65
|
|
|
64
66
|
progressbarWrapperRef = el => {
|
|
@@ -70,7 +72,7 @@ export default class ProgressBar extends PureComponent {
|
|
|
70
72
|
};
|
|
71
73
|
|
|
72
74
|
render() {
|
|
73
|
-
const {theme, className, global, max, value, ...otherProps} = this.props;
|
|
75
|
+
const {theme, className, global, max, value, label, ...otherProps} = this.props;
|
|
74
76
|
|
|
75
77
|
const width = value ? `${ProgressBar.toPercent(value, max)}%` : null;
|
|
76
78
|
const classes = classNames(styles.progressBar, className, {
|
|
@@ -89,6 +91,7 @@ export default class ProgressBar extends PureComponent {
|
|
|
89
91
|
className={styles.line}
|
|
90
92
|
ref={this.progressbarRef}
|
|
91
93
|
role="progressbar"
|
|
94
|
+
aria-label={label}
|
|
92
95
|
aria-valuenow={value}
|
|
93
96
|
aria-valuemin={0}
|
|
94
97
|
aria-valuemax={max}
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
/* eslint-disable react/no-find-dom-node */
|
|
2
1
|
import React from 'react';
|
|
3
|
-
import {findDOMNode} from 'react-dom';
|
|
4
2
|
import {shallow, mount} from 'enzyme';
|
|
5
3
|
|
|
6
4
|
import Theme from '../global/theme';
|
|
@@ -9,8 +7,9 @@ import ProgressBar from './progress-bar';
|
|
|
9
7
|
import styles from './progress-bar.css';
|
|
10
8
|
|
|
11
9
|
describe('Progress Bar', () => {
|
|
12
|
-
const shallowProgressBar = props => shallow(<ProgressBar {...props}/>);
|
|
13
|
-
const mountProgressBar = props =>
|
|
10
|
+
const shallowProgressBar = props => shallow(<ProgressBar label="Progress" {...props}/>);
|
|
11
|
+
const mountProgressBar = props =>
|
|
12
|
+
mount(<ProgressBar label="Progress" {...props}/>).find('ProgressBar');
|
|
14
13
|
|
|
15
14
|
it('should create component', () => {
|
|
16
15
|
shallowProgressBar().should.exist;
|
|
@@ -48,14 +47,14 @@ describe('Progress Bar', () => {
|
|
|
48
47
|
className: 'test-class'
|
|
49
48
|
});
|
|
50
49
|
|
|
51
|
-
|
|
50
|
+
wrapper.instance().progressbarWrapper.should.have.class('test-class');
|
|
52
51
|
});
|
|
53
52
|
|
|
54
53
|
it('should set light modifier', () => {
|
|
55
54
|
const wrapper = mountProgressBar({
|
|
56
55
|
theme: Theme.DARK
|
|
57
56
|
});
|
|
58
|
-
|
|
57
|
+
wrapper.instance().progressbarWrapper.
|
|
59
58
|
should.have.class(styles.dark);
|
|
60
59
|
});
|
|
61
60
|
|
|
@@ -64,7 +63,7 @@ describe('Progress Bar', () => {
|
|
|
64
63
|
global: true
|
|
65
64
|
});
|
|
66
65
|
|
|
67
|
-
|
|
66
|
+
wrapper.instance().progressbarWrapper.
|
|
68
67
|
should.have.class(styles.globalMode);
|
|
69
68
|
});
|
|
70
69
|
});
|
|
@@ -76,7 +75,7 @@ describe('Progress Bar', () => {
|
|
|
76
75
|
describe('#render', () => {
|
|
77
76
|
it('should set min value to equal zero', () => {
|
|
78
77
|
const wrapper = mountProgressBar();
|
|
79
|
-
|
|
78
|
+
wrapper.instance().progressbar.should.have.attr('aria-valuemin', '0');
|
|
80
79
|
});
|
|
81
80
|
|
|
82
81
|
it('should update max value in DOM', () => {
|
|
@@ -84,7 +83,7 @@ describe('Progress Bar', () => {
|
|
|
84
83
|
max: 100
|
|
85
84
|
});
|
|
86
85
|
|
|
87
|
-
|
|
86
|
+
wrapper.instance().progressbar.should.have.attr('aria-valuemax', '100');
|
|
88
87
|
});
|
|
89
88
|
|
|
90
89
|
it('should update progress value in DOM', () => {
|
|
@@ -92,8 +91,8 @@ describe('Progress Bar', () => {
|
|
|
92
91
|
value: 0.5
|
|
93
92
|
});
|
|
94
93
|
|
|
95
|
-
|
|
96
|
-
|
|
94
|
+
wrapper.instance().progressbar.should.have.attr('aria-valuenow', '0.5');
|
|
95
|
+
wrapper.instance().progressbar.should.have.attr('style').match(/width: 50%;/);
|
|
97
96
|
});
|
|
98
97
|
|
|
99
98
|
it('should set width equal 100% if progress value more than max value', () => {
|
|
@@ -102,14 +101,14 @@ describe('Progress Bar', () => {
|
|
|
102
101
|
value: 10
|
|
103
102
|
});
|
|
104
103
|
|
|
105
|
-
|
|
104
|
+
wrapper.instance().progressbar.should.have.attr('style').match(/width: 100%;/);
|
|
106
105
|
});
|
|
107
106
|
|
|
108
107
|
it('should not set style if value is not a number', () => {
|
|
109
108
|
const wrapper = mountProgressBar({
|
|
110
109
|
value: null
|
|
111
110
|
});
|
|
112
|
-
|
|
111
|
+
wrapper.instance().progressbar.should.not.have.attr('style');
|
|
113
112
|
});
|
|
114
113
|
});
|
|
115
114
|
});
|
|
@@ -31,13 +31,13 @@ export const basic = () => {
|
|
|
31
31
|
return `
|
|
32
32
|
<div ng-controller="ExampleCtrl as ctrl">
|
|
33
33
|
<div style="height: 25px; padding-top: 25px;">
|
|
34
|
-
<rg-progress-bar value="ctrl.value" class="example-progress"></rg-progress-bar>
|
|
34
|
+
<rg-progress-bar label="'Progress'" value="ctrl.value" class="example-progress"></rg-progress-bar>
|
|
35
35
|
</div>
|
|
36
36
|
<div style="height: 25px; background: #000; padding-top: 25px;">
|
|
37
|
-
<rg-progress-bar value="ctrl.value" theme="'dark'" class="example-progress"></rg-progress-bar>
|
|
37
|
+
<rg-progress-bar label="'Progress'" value="ctrl.value" theme="'dark'" class="example-progress"></rg-progress-bar>
|
|
38
38
|
</div>
|
|
39
39
|
<div style="height: 25px; background: #F0F0F0; padding-top: 25px;">
|
|
40
|
-
<rg-progress-bar value="ctrl.value" class="example-progress"></rg-progress-bar>
|
|
40
|
+
<rg-progress-bar label="'Progress'" value="ctrl.value" class="example-progress"></rg-progress-bar>
|
|
41
41
|
</div>
|
|
42
42
|
</div>
|
|
43
43
|
`;
|
|
@@ -161,7 +161,7 @@
|
|
|
161
161
|
}
|
|
162
162
|
|
|
163
163
|
.queryAssist {
|
|
164
|
-
composes: font from
|
|
164
|
+
composes: font from "../global/global.css";
|
|
165
165
|
|
|
166
166
|
position: relative;
|
|
167
167
|
|
|
@@ -176,7 +176,7 @@
|
|
|
176
176
|
top: 1px;
|
|
177
177
|
left: 1px;
|
|
178
178
|
|
|
179
|
-
overflow:
|
|
179
|
+
overflow: auto;
|
|
180
180
|
|
|
181
181
|
box-sizing: border-box;
|
|
182
182
|
|
|
@@ -194,6 +194,8 @@
|
|
|
194
194
|
|
|
195
195
|
line-height: 16px;
|
|
196
196
|
|
|
197
|
+
scrollbar-width: none;
|
|
198
|
+
|
|
197
199
|
&:active,
|
|
198
200
|
&:focus {
|
|
199
201
|
outline: 0;
|
|
@@ -227,8 +229,12 @@
|
|
|
227
229
|
}
|
|
228
230
|
|
|
229
231
|
&.inputDisabled {
|
|
230
|
-
color: var(--ring-disabled-color);
|
|
231
232
|
border-color: var(--ring-line-color);
|
|
233
|
+
box-shadow: 0 0 0 1px var(--ring-line-color);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
&.inputDisabled span > span {
|
|
237
|
+
color: var(--ring-disabled-color);
|
|
232
238
|
}
|
|
233
239
|
}
|
|
234
240
|
|
|
@@ -326,3 +332,7 @@
|
|
|
326
332
|
.input:active ~ .focusUnderline {
|
|
327
333
|
width: 100%;
|
|
328
334
|
}
|
|
335
|
+
|
|
336
|
+
.input::-webkit-scrollbar {
|
|
337
|
+
display: none;
|
|
338
|
+
}
|
|
@@ -22,9 +22,6 @@ export default {
|
|
|
22
22
|
framework: 'react'
|
|
23
23
|
},
|
|
24
24
|
args: {
|
|
25
|
-
// https://github.com/storybookjs/storybook/issues/12635#issuecomment-703392498
|
|
26
|
-
theme: undefined,
|
|
27
|
-
translations: undefined,
|
|
28
25
|
placeholder: 'placeholder',
|
|
29
26
|
glass: true,
|
|
30
27
|
clear: true,
|
|
@@ -80,7 +77,8 @@ basic.args = {
|
|
|
80
77
|
focus: true,
|
|
81
78
|
hint: 'lol',
|
|
82
79
|
hintOnSelection: 'lol selected',
|
|
83
|
-
popupClassName: 'test'
|
|
80
|
+
popupClassName: 'test',
|
|
81
|
+
className: 'custom-class'
|
|
84
82
|
};
|
|
85
83
|
|
|
86
84
|
export const noAuth = args => <QueryAssist {...args}/>;
|
|
@@ -248,6 +246,7 @@ darkThemeNoAuth.parameters = {
|
|
|
248
246
|
actions: [
|
|
249
247
|
{type: 'capture', name: 'queryAssist', selector: ['[data-test~=ring-query-assist]']},
|
|
250
248
|
{type: 'click', selector: '[data-test=ring-query-assist-input]'},
|
|
249
|
+
{type: 'sendKeys', selector: '[data-test=ring-query-assist-input]', value: 'test '},
|
|
251
250
|
{
|
|
252
251
|
type: 'capture',
|
|
253
252
|
name: 'withPopup',
|
|
@@ -30,7 +30,7 @@ const ngModelStateField = 'query';
|
|
|
30
30
|
function noop() {}
|
|
31
31
|
|
|
32
32
|
function cleanText(text) {
|
|
33
|
-
return text.
|
|
33
|
+
return text.replace(/([\n\r])+/g, ' ');
|
|
34
34
|
}
|
|
35
35
|
|
|
36
36
|
/**
|
|
@@ -203,7 +203,7 @@ export default class QueryAssist extends Component {
|
|
|
203
203
|
|
|
204
204
|
this.setupRequestHandler(this.props.delay);
|
|
205
205
|
|
|
206
|
-
if (this.props.autoOpen) {
|
|
206
|
+
if (this.props.autoOpen && query.length > 0) {
|
|
207
207
|
this.requestHandler().
|
|
208
208
|
catch(noop);
|
|
209
209
|
} else {
|
|
@@ -211,6 +211,7 @@ export default class QueryAssist extends Component {
|
|
|
211
211
|
}
|
|
212
212
|
|
|
213
213
|
this.setCaretPosition();
|
|
214
|
+
this._pushHistory(this.state);
|
|
214
215
|
}
|
|
215
216
|
|
|
216
217
|
shouldComponentUpdate(props, state) {
|
|
@@ -245,7 +246,7 @@ export default class QueryAssist extends Component {
|
|
|
245
246
|
if (typeof query === 'string' && queryChanged && query !== this.immediateState.query) {
|
|
246
247
|
this.immediateState.query = query;
|
|
247
248
|
|
|
248
|
-
if (query && prevProps.autoOpen) {
|
|
249
|
+
if (query && prevProps.autoOpen && query.length > 0) {
|
|
249
250
|
this.requestData();
|
|
250
251
|
} else if (query) {
|
|
251
252
|
this.requestStyleRanges();
|
|
@@ -257,6 +258,8 @@ export default class QueryAssist extends Component {
|
|
|
257
258
|
static Theme = Theme;
|
|
258
259
|
|
|
259
260
|
ngModelStateField = ngModelStateField;
|
|
261
|
+
// An array of {query: string; caret: number}[]
|
|
262
|
+
historyStack = [];
|
|
260
263
|
|
|
261
264
|
handleFocusChange = e => {
|
|
262
265
|
// otherwise it's blur and false
|
|
@@ -370,7 +373,9 @@ export default class QueryAssist extends Component {
|
|
|
370
373
|
|
|
371
374
|
this.immediateState = props;
|
|
372
375
|
this.props.onChange(props);
|
|
373
|
-
|
|
376
|
+
if (props.query.length > 0) {
|
|
377
|
+
this.requestData();
|
|
378
|
+
}
|
|
374
379
|
};
|
|
375
380
|
|
|
376
381
|
// It's necessary to prevent new element creation before any other hooks
|
|
@@ -402,6 +407,38 @@ export default class QueryAssist extends Component {
|
|
|
402
407
|
return true;
|
|
403
408
|
};
|
|
404
409
|
|
|
410
|
+
setState = (state, resolve) => {
|
|
411
|
+
super.setState(state, () => {
|
|
412
|
+
this._pushHistory(state);
|
|
413
|
+
resolve?.();
|
|
414
|
+
});
|
|
415
|
+
};
|
|
416
|
+
|
|
417
|
+
_pushHistory(state) {
|
|
418
|
+
const queryIsSet = 'query' in state;
|
|
419
|
+
const queryIsSame = this.historyStack[0]?.query === state.query;
|
|
420
|
+
|
|
421
|
+
if (queryIsSet && !queryIsSame) {
|
|
422
|
+
this.historyStack.unshift({
|
|
423
|
+
query: state.query,
|
|
424
|
+
caret: this.caret?.getPosition({avoidFocus: true}) ?? -1
|
|
425
|
+
});
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
undo = e => {
|
|
430
|
+
// eslint-disable-next-line no-unused-vars
|
|
431
|
+
const [current, previous] = this.historyStack.splice(0, 2);
|
|
432
|
+
if (!previous) {
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
|
|
436
|
+
this.setState({query: previous.query}, () => {
|
|
437
|
+
this.caret.setPosition(previous.caret);
|
|
438
|
+
this.handleInput(e);
|
|
439
|
+
});
|
|
440
|
+
};
|
|
441
|
+
|
|
405
442
|
handlePaste = e => {
|
|
406
443
|
const INSERT_COMMAND = 'insertText';
|
|
407
444
|
if (e.clipboardData && document.queryCommandSupported(INSERT_COMMAND)) {
|
|
@@ -426,7 +463,13 @@ export default class QueryAssist extends Component {
|
|
|
426
463
|
if (!this.props.disabled && (caret !== this.immediateState.caret || popupHidden)) {
|
|
427
464
|
this.immediateState.caret = caret;
|
|
428
465
|
this.scrollInput();
|
|
429
|
-
this.
|
|
466
|
+
if (this.immediateState.query.length > 0) {
|
|
467
|
+
this.requestData();
|
|
468
|
+
}
|
|
469
|
+
}
|
|
470
|
+
|
|
471
|
+
if (this.immediateState.query.length < 1) {
|
|
472
|
+
this.setState({showPopup: false});
|
|
430
473
|
}
|
|
431
474
|
};
|
|
432
475
|
|
|
@@ -437,7 +480,7 @@ export default class QueryAssist extends Component {
|
|
|
437
480
|
caret = 0,
|
|
438
481
|
styleRanges,
|
|
439
482
|
suggestions = []
|
|
440
|
-
}) => new Promise((resolve, reject) => {
|
|
483
|
+
}, afterCompletion = false) => new Promise((resolve, reject) => {
|
|
441
484
|
if (
|
|
442
485
|
query === this.getQuery() &&
|
|
443
486
|
(caret === this.immediateState.caret ||
|
|
@@ -454,7 +497,7 @@ export default class QueryAssist extends Component {
|
|
|
454
497
|
placeholderEnabled: !query,
|
|
455
498
|
query,
|
|
456
499
|
suggestions,
|
|
457
|
-
showPopup: !!suggestions.length
|
|
500
|
+
showPopup: !!suggestions.length && !afterCompletion
|
|
458
501
|
};
|
|
459
502
|
|
|
460
503
|
this.immediateState.suggestionsQuery = query;
|
|
@@ -526,7 +569,7 @@ export default class QueryAssist extends Component {
|
|
|
526
569
|
}
|
|
527
570
|
|
|
528
571
|
this.closePopup();
|
|
529
|
-
this.requestData();
|
|
572
|
+
this.requestData(true);
|
|
530
573
|
};
|
|
531
574
|
|
|
532
575
|
requestStyleRanges = () => {
|
|
@@ -541,7 +584,7 @@ export default class QueryAssist extends Component {
|
|
|
541
584
|
catch(noop);
|
|
542
585
|
};
|
|
543
586
|
|
|
544
|
-
requestHandler = () => {
|
|
587
|
+
requestHandler = (afterCompletion = false) => {
|
|
545
588
|
if (this.props.disabled) {
|
|
546
589
|
return Promise.reject(new Error('QueryAssist(@jetbrains/ring-ui): null exception'));
|
|
547
590
|
}
|
|
@@ -549,7 +592,7 @@ export default class QueryAssist extends Component {
|
|
|
549
592
|
const {query, caret} = this.immediateState;
|
|
550
593
|
|
|
551
594
|
return this.sendRequest({query, caret}).
|
|
552
|
-
then(this.handleResponse).
|
|
595
|
+
then(data => this.handleResponse(data, afterCompletion)).
|
|
553
596
|
catch(noop);
|
|
554
597
|
};
|
|
555
598
|
|
|
@@ -801,6 +844,7 @@ export default class QueryAssist extends Component {
|
|
|
801
844
|
'ctrl+enter': this.handleComplete,
|
|
802
845
|
'ctrl+space': this.handleCtrlSpace,
|
|
803
846
|
tab: this.handleTab,
|
|
847
|
+
'meta+z': this.undo,
|
|
804
848
|
right: noop,
|
|
805
849
|
left: noop,
|
|
806
850
|
space: noop,
|
|
@@ -831,7 +875,7 @@ export default class QueryAssist extends Component {
|
|
|
831
875
|
}
|
|
832
876
|
|
|
833
877
|
render() {
|
|
834
|
-
const {theme, glass, 'data-test': dataTest, useCustomItemRender} = this.props;
|
|
878
|
+
const {theme, glass, 'data-test': dataTest, className, useCustomItemRender} = this.props;
|
|
835
879
|
const renderPlaceholder = !!this.props.placeholder && this.state.placeholderEnabled;
|
|
836
880
|
const renderLoader = this.props.loader !== false && this.state.loading;
|
|
837
881
|
const renderGlass = glass && !renderLoader;
|
|
@@ -849,7 +893,7 @@ export default class QueryAssist extends Component {
|
|
|
849
893
|
return (
|
|
850
894
|
<div
|
|
851
895
|
data-test={dataTests('ring-query-assist', dataTest)}
|
|
852
|
-
className={classNames(styles.queryAssist, styles[theme])}
|
|
896
|
+
className={classNames(className, styles.queryAssist, styles[theme])}
|
|
853
897
|
role="presentation"
|
|
854
898
|
ref={this.nodeRef}
|
|
855
899
|
>
|
|
@@ -1,7 +1,6 @@
|
|
|
1
|
-
/* eslint-disable no-magic-numbers
|
|
1
|
+
/* eslint-disable no-magic-numbers */
|
|
2
2
|
|
|
3
3
|
import React from 'react';
|
|
4
|
-
import {findDOMNode} from 'react-dom';
|
|
5
4
|
import {Simulate} from 'react-dom/test-utils';
|
|
6
5
|
import {mount} from 'enzyme';
|
|
7
6
|
|
|
@@ -243,6 +242,12 @@ describe('Query Assist', () => {
|
|
|
243
242
|
describe('rendering', () => {
|
|
244
243
|
const LETTER_CLASS = styles.letter;
|
|
245
244
|
|
|
245
|
+
it('should pass className', () => {
|
|
246
|
+
const instance = mountQueryAssist({className: 'test-class'}).find('QueryAssist').instance();
|
|
247
|
+
|
|
248
|
+
instance.node.className.should.contain('test-class');
|
|
249
|
+
});
|
|
250
|
+
|
|
246
251
|
it('should render letters', () => {
|
|
247
252
|
const instance = mountQueryAssist().find('QueryAssist').instance();
|
|
248
253
|
|
|
@@ -251,6 +256,19 @@ describe('Query Assist', () => {
|
|
|
251
256
|
should.have.length(testQueryLength);
|
|
252
257
|
});
|
|
253
258
|
|
|
259
|
+
it('should support undo', done => {
|
|
260
|
+
const instance = mountQueryAssist().find('QueryAssist').instance();
|
|
261
|
+
|
|
262
|
+
instance.setState({query: 'newQuery'}, () => {
|
|
263
|
+
simulateCombo('meta+z');
|
|
264
|
+
|
|
265
|
+
setTimeout(() => {
|
|
266
|
+
instance.state.query.should.equal(testQuery);
|
|
267
|
+
done();
|
|
268
|
+
});
|
|
269
|
+
});
|
|
270
|
+
});
|
|
271
|
+
|
|
254
272
|
|
|
255
273
|
it('should render nothing on empty query', () => {
|
|
256
274
|
const instance = mountQueryAssist({
|
|
@@ -474,7 +492,7 @@ describe('Query Assist', () => {
|
|
|
474
492
|
|
|
475
493
|
instance.requestData().
|
|
476
494
|
then(() => {
|
|
477
|
-
const list =
|
|
495
|
+
const list = instance._popup.list.container;
|
|
478
496
|
const {length} = suggestions;
|
|
479
497
|
|
|
480
498
|
list.querySelectorAll('[data-test~=ring-list-item]').should.have.length(length);
|
|
@@ -560,6 +578,20 @@ describe('Query Assist', () => {
|
|
|
560
578
|
instance.input.should.have.text(getSuggestionText(suggestions[2]));
|
|
561
579
|
});
|
|
562
580
|
});
|
|
581
|
+
|
|
582
|
+
it('should undo last applied completion', () => {
|
|
583
|
+
const instance = mountQueryAssist({
|
|
584
|
+
query: completeQuery,
|
|
585
|
+
caret: middleCaret
|
|
586
|
+
}).find('QueryAssist').instance();
|
|
587
|
+
|
|
588
|
+
return instance.requestData().then(() => {
|
|
589
|
+
simulateCombo('down down down tab');
|
|
590
|
+
instance.input.should.not.have.text(completeQuery);
|
|
591
|
+
simulateCombo('meta+z');
|
|
592
|
+
instance.input.should.have.text(completeQuery);
|
|
593
|
+
});
|
|
594
|
+
});
|
|
563
595
|
});
|
|
564
596
|
|
|
565
597
|
describe('callbacks', () => {
|
|
@@ -598,7 +630,7 @@ describe('Query Assist', () => {
|
|
|
598
630
|
onApply
|
|
599
631
|
}).find('QueryAssist').instance();
|
|
600
632
|
|
|
601
|
-
Simulate.click(
|
|
633
|
+
Simulate.click(instance.glass.buttonRef.current);
|
|
602
634
|
onApply.should.have.been.calledWithMatch({
|
|
603
635
|
query: testQuery,
|
|
604
636
|
caret: testQueryLength
|
|
@@ -612,7 +644,7 @@ describe('Query Assist', () => {
|
|
|
612
644
|
onClear
|
|
613
645
|
}).find('QueryAssist').instance();
|
|
614
646
|
|
|
615
|
-
Simulate.click(
|
|
647
|
+
Simulate.click(instance.clear.buttonRef.current);
|
|
616
648
|
onClear.should.have.been.calledWithExactly();
|
|
617
649
|
});
|
|
618
650
|
});
|
|
@@ -13,6 +13,8 @@ import Shortcuts from '../shortcuts-ng/shortcuts-ng';
|
|
|
13
13
|
import Button from '../button-ng/button-ng';
|
|
14
14
|
import PromisedClick from '../promised-click-ng/promised-click-ng';
|
|
15
15
|
|
|
16
|
+
import template from './save-field-ng__template';
|
|
17
|
+
|
|
16
18
|
const angularModule = angular.module('Ring.save-field', [
|
|
17
19
|
MessageBundle,
|
|
18
20
|
|
|
@@ -64,7 +66,7 @@ angularModule.directive(
|
|
|
64
66
|
return {
|
|
65
67
|
require: 'rgSaveField',
|
|
66
68
|
transclude: true,
|
|
67
|
-
template
|
|
69
|
+
template,
|
|
68
70
|
scope: {
|
|
69
71
|
api: '=?',
|
|
70
72
|
value: '=',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
export default `<div class="ring-save-field" ng-form="saveFieldForm" rg-shortcuts="ring-save-field" shortcuts-map="keyMap" shortcuts-focus="focus">
|
|
2
2
|
<span class="ring-save-field__transclude-placeholder" ng-transclude=""></span>
|
|
3
3
|
|
|
4
4
|
<rg-button
|
|
@@ -29,4 +29,4 @@
|
|
|
29
29
|
>
|
|
30
30
|
{{wording.saved}}
|
|
31
31
|
</rg-button>
|
|
32
|
-
</div
|
|
32
|
+
</div>`;
|
|
@@ -158,9 +158,15 @@
|
|
|
158
158
|
}
|
|
159
159
|
}
|
|
160
160
|
|
|
161
|
+
.buttonContainer {
|
|
162
|
+
position: relative;
|
|
163
|
+
}
|
|
164
|
+
|
|
161
165
|
.buttonValue {
|
|
162
166
|
composes: ellipsis from "../global/global.css";
|
|
163
167
|
|
|
168
|
+
display: block;
|
|
169
|
+
|
|
164
170
|
width: 100%;
|
|
165
171
|
|
|
166
172
|
text-align: left;
|
|
@@ -170,12 +176,6 @@
|
|
|
170
176
|
.buttonValueOpen {
|
|
171
177
|
border-color: var(--ring-selected-background-color);
|
|
172
178
|
background-color: var(--ring-selected-background-color);
|
|
173
|
-
|
|
174
|
-
& .icons {
|
|
175
|
-
transition: none;
|
|
176
|
-
|
|
177
|
-
color: var(--ring-main-color);
|
|
178
|
-
}
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
.label {
|
|
@@ -189,7 +189,8 @@
|
|
|
189
189
|
.value:focus,
|
|
190
190
|
.value:focus + .icons,
|
|
191
191
|
.open,
|
|
192
|
-
.open + .icons
|
|
192
|
+
.open + .icons,
|
|
193
|
+
.buttonValueOpen + .icons {
|
|
193
194
|
transition: none;
|
|
194
195
|
|
|
195
196
|
color: var(--ring-main-color);
|
|
@@ -247,3 +248,7 @@
|
|
|
247
248
|
|
|
248
249
|
color: inherit;
|
|
249
250
|
}
|
|
251
|
+
|
|
252
|
+
.avatar {
|
|
253
|
+
vertical-align: -6px;
|
|
254
|
+
}
|
|
@@ -36,6 +36,7 @@ export default {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
export const withAFilterAndTags = args => <Select {...args}/>;
|
|
39
|
+
export const withAvatars = args => <Select {...args}/>;
|
|
39
40
|
|
|
40
41
|
{
|
|
41
42
|
const avatarUrl = `${hubConfig.serverUri}/api/rest/avatar/default?username=blue`;
|
|
@@ -53,6 +54,12 @@ export const withAFilterAndTags = args => <Select {...args}/>;
|
|
|
53
54
|
label: 'With avatar',
|
|
54
55
|
key: 5,
|
|
55
56
|
avatar: avatarUrl
|
|
57
|
+
},
|
|
58
|
+
{
|
|
59
|
+
label: 'With generated avatar',
|
|
60
|
+
showGeneratedAvatar: true,
|
|
61
|
+
username: 'With generated avatar',
|
|
62
|
+
key: 6
|
|
56
63
|
}
|
|
57
64
|
];
|
|
58
65
|
|
|
@@ -71,6 +78,12 @@ export const withAFilterAndTags = args => <Select {...args}/>;
|
|
|
71
78
|
data: tags,
|
|
72
79
|
selected: [tags[0]]
|
|
73
80
|
};
|
|
81
|
+
|
|
82
|
+
withAvatars.args = {
|
|
83
|
+
data: tags,
|
|
84
|
+
selected: tags[4],
|
|
85
|
+
type: Select.Type.BUTTON
|
|
86
|
+
};
|
|
74
87
|
}
|
|
75
88
|
|
|
76
89
|
withAFilterAndTags.storyName = 'with a filter and tags';
|