@jetbrains/ring-ui 5.0.28 → 5.0.29
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/dist/_helpers/button__classes.js +1 -1
- package/dist/_helpers/dialog__body-scroll-preventer.js +1 -2
- package/dist/_helpers/select__filter.js +0 -1
- package/dist/_helpers/services-link.js +1 -1
- package/dist/_helpers/sidebar.js +1 -2
- package/dist/_helpers/theme.js +0 -1
- package/dist/_helpers/title.js +0 -1
- package/dist/alert/alert.js +0 -2
- package/dist/alert-service/alert-service.js +0 -2
- package/dist/analytics/analytics.js +3 -4
- package/dist/analytics/analytics__custom-plugin.js +1 -2
- package/dist/analytics/analytics__fus-plugin.js +0 -1
- package/dist/analytics/analytics__plugin-utils.js +3 -4
- package/dist/analytics-ng/analytics-ng.js +2 -3
- package/dist/auth/auth.js +0 -2
- package/dist/auth/auth__core.js +10 -12
- package/dist/auth/background-flow.js +1 -2
- package/dist/auth/down-notification.js +0 -2
- package/dist/auth/iframe-flow.js +0 -2
- package/dist/auth/landing.js +4 -6
- package/dist/auth/request-builder.js +0 -1
- package/dist/auth/response-parser.js +0 -1
- package/dist/auth/storage.js +0 -2
- package/dist/auth/token-validator.js +0 -2
- package/dist/auth/window-flow.js +1 -2
- package/dist/auth-dialog/auth-dialog.js +1 -3
- package/dist/auth-dialog-service/auth-dialog-service.js +0 -2
- package/dist/auth-ng/auth-ng.js +1 -3
- package/dist/autofocus-ng/autofocus-ng.js +0 -1
- package/dist/avatar/avatar-example-datauri.js +23 -1
- package/dist/avatar/avatar.js +2 -4
- package/dist/avatar/fallback-avatar.js +3 -4
- package/dist/avatar-editor-ng/avatar-editor-ng.js +0 -2
- package/dist/avatar-editor-ng/avatar-editor-ng__template.js +28 -1
- package/dist/avatar-ng/avatar-ng.js +0 -2
- package/dist/badge/badge.js +0 -1
- package/dist/badge-ng/badge-ng.js +0 -1
- package/dist/breadcrumb-ng/breadcrumb-ng.js +27 -3
- package/dist/button/button.js +0 -2
- package/dist/button-group/button-group.js +0 -1
- package/dist/button-group-ng/button-group-ng.js +0 -1
- package/dist/button-ng/button-ng.js +10 -4
- package/dist/button-set/button-set.js +0 -1
- package/dist/button-set-ng/button-set-ng.js +1 -1
- package/dist/button-toolbar/button-toolbar.js +0 -1
- package/dist/button-toolbar-ng/button-toolbar-ng.js +0 -1
- package/dist/caret/caret.js +0 -2
- package/dist/checkbox/checkbox.js +0 -2
- package/dist/checkbox-ng/checkbox-ng.js +21 -4
- package/dist/code/code.js +1 -2
- package/dist/confirm/confirm.js +0 -2
- package/dist/confirm-ng/confirm-ng.js +0 -2
- package/dist/confirm-service/confirm-service.js +0 -2
- package/dist/content-layout/content-layout.js +0 -1
- package/dist/content-layout/sidebar.js +0 -1
- package/dist/data-list/data-list.js +0 -2
- package/dist/data-list/data-list.mock.js +0 -1
- package/dist/data-list/item.js +0 -2
- package/dist/data-list/selection.js +0 -1
- package/dist/data-list/title.js +0 -2
- package/dist/data-list-ng/data-list-ng.js +0 -2
- package/dist/date-picker/consts.js +1 -1
- package/dist/date-picker/date-input.js +1 -3
- package/dist/date-picker/date-picker.js +7 -9
- package/dist/date-picker/date-popup.js +0 -2
- package/dist/date-picker/day.js +0 -1
- package/dist/date-picker/month-names.js +0 -1
- package/dist/date-picker/month-slider.js +0 -1
- package/dist/date-picker/month.js +0 -1
- package/dist/date-picker/months.js +0 -1
- package/dist/date-picker/years.js +0 -1
- package/dist/dialog/dialog.js +0 -2
- package/dist/dialog/dialog__body-scroll-preventer.js +0 -1
- package/dist/dialog-ng/dialog-ng.js +3 -6
- package/dist/dialog-ng/dialog-ng__template.js +70 -1
- package/dist/docked-panel-ng/docked-panel-ng.js +0 -1
- package/dist/dropdown/anchor.js +0 -2
- package/dist/dropdown/dropdown.js +0 -2
- package/dist/dropdown-menu/dropdown-menu.js +1 -3
- package/dist/error-bubble/error-bubble.js +0 -2
- package/dist/error-message/error-message.js +1 -3
- package/dist/error-message-ng/error-message-ng.js +21 -3
- package/dist/footer/footer.js +0 -1
- package/dist/footer-ng/footer-ng.js +14 -3
- package/dist/form-ng/form-ng.js +4 -2
- package/dist/global/angular-component-factory.js +2 -3
- package/dist/global/create-stateful-context.js +2 -3
- package/dist/global/data-tests.js +0 -2
- package/dist/global/dom.js +0 -1
- package/dist/global/focus-sensor-hoc.js +0 -1
- package/dist/global/fuzzy-highlight.js +1 -1
- package/dist/global/inject-styles.js +7 -5
- package/dist/global/listeners.js +0 -1
- package/dist/global/memoize.js +0 -2
- package/dist/global/normalize-indent.js +0 -2
- package/dist/global/react-dom-renderer.js +0 -1
- package/dist/global/react-render-adapter.js +0 -1
- package/dist/global/rerender-hoc.js +1 -2
- package/dist/global/theme.js +0 -2
- package/dist/global/trivial-template-tag.js +0 -2
- package/dist/global/url.js +1 -3
- package/dist/grid/col.js +1 -2
- package/dist/grid/grid.js +0 -1
- package/dist/grid/row.js +1 -1
- package/dist/group-ng/group-ng.js +1 -1
- package/dist/header/header.js +0 -2
- package/dist/header/logo.js +0 -2
- package/dist/header/profile.js +0 -2
- package/dist/header/services-link.js +0 -1
- package/dist/header/services.js +0 -2
- package/dist/header/smart-profile.js +2 -4
- package/dist/header/smart-services.js +1 -3
- package/dist/header/tray-icon.js +0 -2
- package/dist/heading/heading.js +2 -2
- package/dist/heading-ng/heading-ng.js +0 -1
- package/dist/http/http.js +2 -4
- package/dist/http/http.mock.js +0 -2
- package/dist/hub-source/hub-source.js +1 -1
- package/dist/hub-source/hub-source__user.js +2 -4
- package/dist/hub-source/hub-source__users-groups.js +2 -3
- package/dist/icon/icon.js +3 -3
- package/dist/icon/icon__svg.js +0 -2
- package/dist/icon/index.js +0 -2
- package/dist/icon-ng/icon-ng.js +5 -7
- package/dist/input/input.js +2 -4
- package/dist/input-ng/input-ng.js +58 -5
- package/dist/island/adaptive-island-hoc.js +0 -1
- package/dist/island/content.js +0 -1
- package/dist/island/header.js +2 -3
- package/dist/island/island.js +0 -1
- package/dist/island-ng/island-content-ng.js +16 -2
- package/dist/island-ng/island-header-ng.js +8 -2
- package/dist/island-ng/island-ng-class-fixer.js +0 -2
- package/dist/island-ng/island-ng.js +8 -2
- package/dist/link/clickableLink.js +0 -1
- package/dist/link/link.js +0 -1
- package/dist/link-ng/link-ng.js +4 -1
- package/dist/list/list.js +8 -10
- package/dist/list/list__custom.js +0 -1
- package/dist/list/list__item.js +2 -4
- package/dist/list/list__link.js +0 -1
- package/dist/list/list__users-groups-source.js +1 -3
- package/dist/loader/loader.js +0 -1
- package/dist/loader/loader__core.js +3 -4
- package/dist/loader-inline/loader-inline.js +0 -1
- package/dist/loader-inline-ng/loader-inline-ng.js +1 -1
- package/dist/loader-ng/loader-ng.js +0 -1
- package/dist/loader-screen/loader-screen.js +0 -1
- package/dist/loader-screen-ng/loader-screen-ng.js +6 -2
- package/dist/login-dialog/login-dialog.js +0 -2
- package/dist/login-dialog/service.js +0 -2
- package/dist/markdown/code.js +0 -2
- package/dist/markdown/link.js +0 -1
- package/dist/markdown/markdown.js +0 -2
- package/dist/message/message.js +0 -2
- package/dist/old-browsers-message/old-browsers-message.js +1 -2
- package/dist/old-browsers-message/old-browsers-message__stop.js +0 -1
- package/dist/old-browsers-message/white-list.js +2 -3
- package/dist/pager/pager.js +1 -3
- package/dist/pager-ng/pager-ng.js +0 -2
- package/dist/panel-ng/panel-ng.js +0 -1
- package/dist/permissions/permissions.js +1 -1
- package/dist/permissions-ng/permissions-ng.js +1 -3
- package/dist/place-under-ng/place-under-ng.js +2 -3
- package/dist/popup/popup.js +2 -4
- package/dist/popup/position.js +0 -1
- package/dist/popup-menu/popup-menu.js +0 -2
- package/dist/progress-bar/progress-bar.js +1 -2
- package/dist/progress-bar-ng/progress-bar-ng.js +0 -1
- package/dist/promised-click-ng/promised-click-ng.js +0 -2
- package/dist/proxy-attrs/proxy-attrs.js +3 -5
- package/dist/query-assist/query-assist.js +2 -4
- package/dist/query-assist/query-assist__suggestions.js +0 -2
- package/dist/query-assist-ng/query-assist-ng.js +0 -2
- package/dist/radio/radio.js +0 -1
- package/dist/radio/radio__item.js +0 -1
- package/dist/radio-ng/radio-ng.js +18 -2
- package/dist/save-field-ng/save-field-ng.js +1 -3
- package/dist/save-field-ng/save-field-ng__template.js +32 -1
- package/dist/select/select.js +5 -7
- package/dist/select/select__filter.js +0 -2
- package/dist/select/select__popup.js +1 -3
- package/dist/select-ng/select-ng.js +0 -2
- package/dist/select-ng/select-ng__lazy.js +0 -2
- package/dist/select-ng/select-ng__options.js +2 -2
- package/dist/shortcuts/shortcuts-hoc.js +0 -1
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +0 -3
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng__template.js +48 -1
- package/dist/shortcuts-ng/shortcuts-ng.js +3 -4
- package/dist/sidebar-ng/sidebar-ng.js +0 -2
- package/dist/sidebar-ng/sidebar-ng__button-template.js +18 -1
- package/dist/sidebar-ng/sidebar-ng__template.js +10 -1
- package/dist/storage/storage.js +0 -2
- package/dist/storage/storage__fallback.js +3 -4
- package/dist/storage/storage__local.js +0 -2
- package/dist/style.css +1 -1
- package/dist/tab-trap/tab-trap.js +0 -1
- package/dist/table/cell.js +0 -1
- package/dist/table/disable-hover-hoc.js +0 -1
- package/dist/table/header-cell.js +0 -2
- package/dist/table/header.js +0 -2
- package/dist/table/multitable.js +0 -1
- package/dist/table/row-with-focus-sensor.js +0 -2
- package/dist/table/row.js +1 -3
- package/dist/table/selection-adapter.js +0 -2
- package/dist/table/selection-shortcuts-hoc.js +0 -1
- package/dist/table/selection.js +0 -1
- package/dist/table/smart-table.js +0 -2
- package/dist/table/table.js +0 -2
- package/dist/table-legacy-ng/table-legacy-ng.js +45 -10
- package/dist/table-legacy-ng/table-legacy-ng__pager.js +7 -3
- package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +1 -2
- package/dist/table-ng/smart-table-ng.js +0 -2
- package/dist/table-ng/table-ng.js +0 -2
- package/dist/tabs/collapsible-more.js +0 -2
- package/dist/tabs/collapsible-tab.js +0 -1
- package/dist/tabs/collapsible-tabs.js +0 -2
- package/dist/tabs/dumb-tabs.js +0 -2
- package/dist/tabs/smart-tabs.js +0 -2
- package/dist/tabs/tab-link.js +0 -1
- package/dist/tabs/tab.js +0 -1
- package/dist/tabs/tabs.js +0 -2
- package/dist/tabs-ng/tabs-ng.js +0 -1
- package/dist/tabs-ng/tabs-ng__template.js +38 -1
- package/dist/tag/tag.js +0 -2
- package/dist/tags-input/tags-input.js +0 -2
- package/dist/tags-input-ng/tags-input-ng.js +0 -2
- package/dist/tags-list/tags-list.js +0 -2
- package/dist/template-ng/template-ng.js +0 -1
- package/dist/theme-ng/theme-ng.js +0 -1
- package/dist/toggle/toggle.js +0 -1
- package/dist/toggle-ng/toggle-ng.js +0 -1
- package/dist/tooltip/tooltip.js +0 -2
- package/dist/tooltip-ng/tooltip-ng.js +0 -2
- package/dist/user-agreement/service.js +0 -2
- package/dist/user-agreement/toolbox.eula.js +160 -1
- package/dist/user-agreement/user-agreement.js +0 -2
- package/dist/user-card/card.js +0 -2
- package/dist/user-card/smart-user-card-tooltip.js +0 -2
- package/dist/user-card/tooltip.js +0 -2
- package/dist/user-card/user-card.js +0 -2
- package/dist/user-card-ng/user-card-ng.js +0 -2
- package/package.json +25 -25
|
@@ -18,7 +18,7 @@ function getButtonClasses(_ref) {
|
|
|
18
18
|
height
|
|
19
19
|
} = _ref;
|
|
20
20
|
const withNormalIcon = icon && !active && !danger && !primary && !disabled;
|
|
21
|
-
return classNames(modules_e81895c9.button, className, modules_e81895c9[
|
|
21
|
+
return classNames(modules_e81895c9.button, className, modules_e81895c9[`height${height}`], {
|
|
22
22
|
[modules_e81895c9.active]: active,
|
|
23
23
|
[modules_e81895c9.danger]: danger,
|
|
24
24
|
[modules_e81895c9.delayed]: delayed,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
1
|
import scrollbarWidth from 'scrollbar-width';
|
|
3
2
|
|
|
4
3
|
var modules_5e9b8c03 = {"unit":"8px","header":"header_rui_1d72","container":"container_rui_381e","innerContainer":"innerContainer_rui_381e","content":"content_rui_381e","panel":"panel_rui_381e","clickableOverlay":"clickableOverlay_rui_381e","closeIcon":"closeIcon_rui_381e","closeButton":"closeButton_rui_381e","closeButtonOutside":"closeButtonOutside_rui_381e","closeButtonInside":"closeButtonInside_rui_381e","documentWithoutScroll":"documentWithoutScroll_rui_381e","popupTarget":"popupTarget_rui_381e"};
|
|
@@ -23,7 +22,7 @@ const prevent = key => {
|
|
|
23
22
|
|
|
24
23
|
if (documentHasScroll && scrollWidth != null && scrollWidth > 0) {
|
|
25
24
|
previousDocumentWidth = document.documentElement.style.width;
|
|
26
|
-
document.documentElement.style.width =
|
|
25
|
+
document.documentElement.style.width = `calc(100% - ${scrollWidth}px)`;
|
|
27
26
|
}
|
|
28
27
|
};
|
|
29
28
|
|
|
@@ -18,7 +18,7 @@ class ServicesLink extends PureComponent {
|
|
|
18
18
|
key: "icon",
|
|
19
19
|
className: modules_74a7bf8b.itemLogo,
|
|
20
20
|
style: {
|
|
21
|
-
backgroundImage:
|
|
21
|
+
backgroundImage: `url(${service.iconUrl})`
|
|
22
22
|
}
|
|
23
23
|
}), /*#__PURE__*/React.createElement("div", {
|
|
24
24
|
key: "text"
|
package/dist/_helpers/sidebar.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { _ as _defineProperty, a as _extends } from './_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
2
|
import React, { Component } from 'react';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
5
4
|
import classNames from 'classnames';
|
|
@@ -96,7 +95,7 @@ class Sidebar extends Component {
|
|
|
96
95
|
[fixedClassName !== null && fixedClassName !== void 0 ? fixedClassName : '']: shouldFixateTop || shouldFixateBottom
|
|
97
96
|
});
|
|
98
97
|
const style = {
|
|
99
|
-
maxHeight: shouldFixateBottom && sidebarVisibleHeight ?
|
|
98
|
+
maxHeight: shouldFixateBottom && sidebarVisibleHeight ? `${sidebarVisibleHeight}px` : undefined
|
|
100
99
|
};
|
|
101
100
|
return /*#__PURE__*/React.createElement("aside", {
|
|
102
101
|
className: containerClasses,
|
package/dist/_helpers/theme.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { a as _extends } from './_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
2
|
import React, { useState, useEffect, forwardRef, useMemo, useContext } from 'react';
|
|
4
3
|
import classNames from 'classnames';
|
|
5
4
|
import { createPortal } from 'react-dom';
|
package/dist/_helpers/title.js
CHANGED
package/dist/alert/alert.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
2
|
import React, { PureComponent } from 'react';
|
|
4
3
|
import classNames from 'classnames';
|
|
5
4
|
import PropTypes from 'prop-types';
|
|
@@ -18,7 +17,6 @@ import { Color } from '../icon/icon__constants.js';
|
|
|
18
17
|
import 'util-deprecate';
|
|
19
18
|
import '../_helpers/icon.js';
|
|
20
19
|
import '../icon/icon__svg.js';
|
|
21
|
-
import 'core-js/modules/es.string.replace.js';
|
|
22
20
|
import '../global/memoize.js';
|
|
23
21
|
import '../_helpers/loader-inline.js';
|
|
24
22
|
import 'focus-visible';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
2
|
import React from 'react';
|
|
4
3
|
import { render } from '../global/react-render-adapter.js';
|
|
5
4
|
import getUID from '../global/get-uid.js';
|
|
@@ -17,7 +16,6 @@ import 'util-deprecate';
|
|
|
17
16
|
import '../icon/icon__constants.js';
|
|
18
17
|
import '../_helpers/icon.js';
|
|
19
18
|
import '../icon/icon__svg.js';
|
|
20
|
-
import 'core-js/modules/es.string.replace.js';
|
|
21
19
|
import '../global/memoize.js';
|
|
22
20
|
import '../loader-inline/loader-inline.js';
|
|
23
21
|
import '../global/data-tests.js';
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/es.string.replace.js';
|
|
3
2
|
|
|
4
3
|
/**
|
|
5
4
|
* @name Analytics
|
|
@@ -59,7 +58,7 @@ class Analytics {
|
|
|
59
58
|
|
|
60
59
|
trackShortcutEvent(category, action, additionalData) {
|
|
61
60
|
this.trackEvent(category, action, additionalData);
|
|
62
|
-
this.trackEvent('ring-shortcut',
|
|
61
|
+
this.trackEvent('ring-shortcut', `${category}$${action}`, additionalData);
|
|
63
62
|
}
|
|
64
63
|
|
|
65
64
|
trackEntityProperties(entityName, entity, propertiesNames, additionalData) {
|
|
@@ -84,7 +83,7 @@ class Analytics {
|
|
|
84
83
|
value = value.toLowerCase().replace(/[._]+/g, '-');
|
|
85
84
|
}
|
|
86
85
|
|
|
87
|
-
const resultAction =
|
|
86
|
+
const resultAction = `${keys.join('-')}__${value}`;
|
|
88
87
|
this.trackEvent(entityName, resultAction, additionalData);
|
|
89
88
|
}
|
|
90
89
|
}
|
|
@@ -99,7 +98,7 @@ class Analytics {
|
|
|
99
98
|
|
|
100
99
|
for (key in additionalData) {
|
|
101
100
|
if (additionalData.hasOwnProperty(key)) {
|
|
102
|
-
suffix +=
|
|
101
|
+
suffix += `__${key}$${additionalData[key]}`;
|
|
103
102
|
}
|
|
104
103
|
}
|
|
105
104
|
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import AnalyticsPluginUtils from './analytics__plugin-utils.js';
|
|
3
|
-
import 'core-js/modules/es.string.replace.js';
|
|
4
3
|
import '../global/sniffer.js';
|
|
5
4
|
import 'sniffr';
|
|
6
5
|
|
|
@@ -122,7 +121,7 @@ class AnalyticsCustomPlugin {
|
|
|
122
121
|
if (this._lastPageViewTime) {
|
|
123
122
|
const duration = AnalyticsPluginUtils.getPageViewDurationPresentation(currentTime - this._lastPageViewTime);
|
|
124
123
|
|
|
125
|
-
this._processEvent(
|
|
124
|
+
this._processEvent(`ring-pageview-duration_${this._lastPagePath}`, duration);
|
|
126
125
|
}
|
|
127
126
|
}
|
|
128
127
|
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import 'core-js/modules/es.string.replace.js';
|
|
2
1
|
import sniffr from '../global/sniffer.js';
|
|
3
2
|
import 'sniffr';
|
|
4
3
|
|
|
@@ -43,7 +42,7 @@ const AnalyticsPluginUtils = {
|
|
|
43
42
|
|
|
44
43
|
let roundedDuration = Math.floor(Math.pow(2, Math.floor(Math.log2(duration)) + 1));
|
|
45
44
|
roundedDuration = roundedDuration > 0 ? roundedDuration : 1;
|
|
46
|
-
return
|
|
45
|
+
return `less-than-${roundedDuration}-sec`;
|
|
47
46
|
},
|
|
48
47
|
getScreenWidthPresentation: () => {
|
|
49
48
|
/**
|
|
@@ -54,7 +53,7 @@ const AnalyticsPluginUtils = {
|
|
|
54
53
|
|
|
55
54
|
for (let i = 1; i < sizes.length; ++i) {
|
|
56
55
|
if (window.innerWidth < sizes[i]) {
|
|
57
|
-
return
|
|
56
|
+
return `[${sizes[i - 1]}px;${sizes[i]}px)`;
|
|
58
57
|
}
|
|
59
58
|
}
|
|
60
59
|
|
|
@@ -65,7 +64,7 @@ const AnalyticsPluginUtils = {
|
|
|
65
64
|
const name = AnalyticsPluginUtils.npeSaveLowerCase(sniffr.browser.name || 'unknown');
|
|
66
65
|
const majorVersion = sniffr.browser.version[0];
|
|
67
66
|
const version = majorVersion || 'unknown';
|
|
68
|
-
return
|
|
67
|
+
return `${name}$${version}`;
|
|
69
68
|
},
|
|
70
69
|
getDevicePixelRatioPresentation: () => {
|
|
71
70
|
if (!window.devicePixelRatio || !window.devicePixelRatio.toFixed) {
|
|
@@ -4,7 +4,6 @@ import AnalyticsGAPlugin from '../analytics/analytics__ga-plugin.js';
|
|
|
4
4
|
import AnalyticsFUSPlugin from '../analytics/analytics__fus-plugin.js';
|
|
5
5
|
import AnalyticsCustomPlugin from '../analytics/analytics__custom-plugin.js';
|
|
6
6
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
7
|
-
import 'core-js/modules/es.string.replace.js';
|
|
8
7
|
import '../analytics/analytics__plugin-utils.js';
|
|
9
8
|
import '../global/sniffer.js';
|
|
10
9
|
import 'sniffr';
|
|
@@ -37,9 +36,9 @@ angularModule.provider('analytics', function provider() {
|
|
|
37
36
|
try {
|
|
38
37
|
const plugin = $injector.get(configPlugins[i]);
|
|
39
38
|
loadedPlugins.push(plugin);
|
|
40
|
-
$log.debug(
|
|
39
|
+
$log.debug(`analytics: loaded plugin ${configPlugins[i]}`);
|
|
41
40
|
} catch (err) {
|
|
42
|
-
$log.debug(
|
|
41
|
+
$log.debug(`analytics: unable to load factory ${configPlugins[i]}`);
|
|
43
42
|
}
|
|
44
43
|
} else {
|
|
45
44
|
loadedPlugins.push(configPlugins[i]);
|
package/dist/auth/auth.js
CHANGED
|
@@ -4,13 +4,11 @@ import Auth from './auth__core.js';
|
|
|
4
4
|
export { DEFAULT_BACKGROUND_TIMEOUT, DEFAULT_EXPIRES_TIMEOUT, DOMAIN_USER_CHANGED_EVENT, LOGOUT_EVENT, LOGOUT_POSTPONED_EVENT, USER_CHANGED_EVENT, USER_CHANGE_POSTPONED_EVENT, default } from './auth__core.js';
|
|
5
5
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
6
6
|
import './response-parser.js';
|
|
7
|
-
import 'core-js/modules/es.string.replace.js';
|
|
8
7
|
import 'es6-error';
|
|
9
8
|
import '../global/url.js';
|
|
10
9
|
import 'react';
|
|
11
10
|
import 'prop-types';
|
|
12
11
|
import '../alert-service/alert-service.js';
|
|
13
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
14
12
|
import '../global/react-render-adapter.js';
|
|
15
13
|
import 'react-dom';
|
|
16
14
|
import '../global/get-uid.js';
|
package/dist/auth/auth__core.js
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
|
-
import 'core-js/modules/es.string.replace.js';
|
|
4
2
|
import { getAbsoluteBaseURL, fixUrl } from '../global/url.js';
|
|
5
3
|
import Listeners from '../global/listeners.js';
|
|
6
4
|
import HTTP from '../http/http.js';
|
|
@@ -158,7 +156,7 @@ class Auth {
|
|
|
158
156
|
const unsupportedParams = ['redirect_uri', 'request_credentials', 'client_id'].filter(param => config.hasOwnProperty(param));
|
|
159
157
|
|
|
160
158
|
if (unsupportedParams.length !== 0) {
|
|
161
|
-
throw new Error(
|
|
159
|
+
throw new Error(`The following parameters are no longer supported: ${unsupportedParams.join(', ')}. Please change them from snake_case to camelCase.`);
|
|
162
160
|
}
|
|
163
161
|
|
|
164
162
|
config.userFields = config.userFields || [];
|
|
@@ -189,10 +187,10 @@ class Auth {
|
|
|
189
187
|
}
|
|
190
188
|
|
|
191
189
|
this._storage = new AuthStorage({
|
|
192
|
-
messagePrefix:
|
|
193
|
-
stateKeyPrefix:
|
|
194
|
-
tokenKey:
|
|
195
|
-
userKey:
|
|
190
|
+
messagePrefix: `${clientId}-message-`,
|
|
191
|
+
stateKeyPrefix: `${clientId}-states-`,
|
|
192
|
+
tokenKey: `${clientId}-token`,
|
|
193
|
+
userKey: `${clientId}-user-`
|
|
196
194
|
});
|
|
197
195
|
this._domainStorage = new AuthStorage({
|
|
198
196
|
messagePrefix: 'domain-message-'
|
|
@@ -377,7 +375,7 @@ class Auth {
|
|
|
377
375
|
// Check if there is a valid token
|
|
378
376
|
await ((_this$_tokenValidator = this._tokenValidator) === null || _this$_tokenValidator === void 0 ? void 0 : _this$_tokenValidator.validateToken()); // Checking if there is a message left by another app on this domain
|
|
379
377
|
|
|
380
|
-
const message = await this._domainStorage._messagesStorage.get(
|
|
378
|
+
const message = await this._domainStorage._messagesStorage.get(`domain-message-${DOMAIN_USER_CHANGED_EVENT}`);
|
|
381
379
|
|
|
382
380
|
if (message) {
|
|
383
381
|
var _this$user;
|
|
@@ -591,7 +589,7 @@ class Auth {
|
|
|
591
589
|
const {
|
|
592
590
|
serviceName,
|
|
593
591
|
iconUrl: serviceImage
|
|
594
|
-
} = (await this.http.get(
|
|
592
|
+
} = (await this.http.get(`oauth2/interactive/login/settings?client_id=${this.config.clientId}`)) || {};
|
|
595
593
|
this.setCurrentService({
|
|
596
594
|
serviceImage,
|
|
597
595
|
serviceName
|
|
@@ -843,7 +841,7 @@ class Auth {
|
|
|
843
841
|
// https://www.jetbrains.com/help/youtrack/devportal/OAuth-2.0-Errors.html
|
|
844
842
|
if ('code' in error && error.code && typeof error.code === 'object' && 'code' in error.code && typeof error.code.code === 'string') {
|
|
845
843
|
const readableCode = error.code.code.split('_').join(' ');
|
|
846
|
-
return
|
|
844
|
+
return `Authorization error: ${readableCode}`;
|
|
847
845
|
}
|
|
848
846
|
} catch {// noop
|
|
849
847
|
}
|
|
@@ -1142,8 +1140,8 @@ class Auth {
|
|
|
1142
1140
|
// NB! URL to redirect is formed manually because baseURI could be messed up,
|
|
1143
1141
|
// in which case it's not obvious where redirect will lead.
|
|
1144
1142
|
const cleanedUrl = [window.location.pathname, window.location.search].join('');
|
|
1145
|
-
const hashIfExist = hash ?
|
|
1146
|
-
history.replaceState(undefined, '',
|
|
1143
|
+
const hashIfExist = hash ? `#${hash}` : '';
|
|
1144
|
+
history.replaceState(undefined, '', `${cleanedUrl}${hashIfExist}`);
|
|
1147
1145
|
} else {
|
|
1148
1146
|
window.location.hash = hash;
|
|
1149
1147
|
}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import AuthResponseParser from './response-parser.js';
|
|
3
|
-
import 'core-js/modules/es.string.replace.js';
|
|
4
3
|
import 'es6-error';
|
|
5
4
|
import '../global/url.js';
|
|
6
5
|
|
|
@@ -44,7 +43,7 @@ class BackgroundFlow {
|
|
|
44
43
|
|
|
45
44
|
|
|
46
45
|
_redirectFrame(iframe, url) {
|
|
47
|
-
iframe.src =
|
|
46
|
+
iframe.src = `${url}&rnd=${Math.random()}`;
|
|
48
47
|
}
|
|
49
48
|
/**
|
|
50
49
|
* Refreshes the access token in an iframe.
|
|
@@ -5,7 +5,6 @@ import Alert from '../alert/alert.js';
|
|
|
5
5
|
import Link from '../link/link.js';
|
|
6
6
|
import Group from '../group/group.js';
|
|
7
7
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
8
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
9
8
|
import '../global/react-render-adapter.js';
|
|
10
9
|
import 'react-dom';
|
|
11
10
|
import '../global/get-uid.js';
|
|
@@ -20,7 +19,6 @@ import 'util-deprecate';
|
|
|
20
19
|
import '../icon/icon__constants.js';
|
|
21
20
|
import '../_helpers/icon.js';
|
|
22
21
|
import '../icon/icon__svg.js';
|
|
23
|
-
import 'core-js/modules/es.string.replace.js';
|
|
24
22
|
import '../global/memoize.js';
|
|
25
23
|
import '../loader-inline/loader-inline.js';
|
|
26
24
|
import '../global/data-tests.js';
|
package/dist/auth/iframe-flow.js
CHANGED
|
@@ -4,7 +4,6 @@ import showAuthDialog from '../login-dialog/service.js';
|
|
|
4
4
|
import Link from '../link/link.js';
|
|
5
5
|
import AuthResponseParser from './response-parser.js';
|
|
6
6
|
import '../global/react-render-adapter.js';
|
|
7
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
8
7
|
import 'react-dom';
|
|
9
8
|
import '../login-dialog/login-dialog.js';
|
|
10
9
|
import 'prop-types';
|
|
@@ -36,7 +35,6 @@ import 'util-deprecate';
|
|
|
36
35
|
import '../icon/icon__constants.js';
|
|
37
36
|
import '../_helpers/icon.js';
|
|
38
37
|
import '../icon/icon__svg.js';
|
|
39
|
-
import 'core-js/modules/es.string.replace.js';
|
|
40
38
|
import '../global/memoize.js';
|
|
41
39
|
import '../link/clickableLink.js';
|
|
42
40
|
import '../global/controls-height.js';
|
package/dist/auth/landing.js
CHANGED
|
@@ -6,9 +6,7 @@ import { DEFAULT_EXPIRES_TIMEOUT } from './auth__core.js';
|
|
|
6
6
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
7
7
|
import 'es6-error';
|
|
8
8
|
import '../http/http.js';
|
|
9
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
10
9
|
import '../global/url.js';
|
|
11
|
-
import 'core-js/modules/es.string.replace.js';
|
|
12
10
|
import './window-flow.js';
|
|
13
11
|
import './down-notification.js';
|
|
14
12
|
import 'react';
|
|
@@ -73,10 +71,10 @@ async function parseAndStoreResponse(clientId) {
|
|
|
73
71
|
var _this$_storage;
|
|
74
72
|
|
|
75
73
|
const storage = new AuthStorage({
|
|
76
|
-
messagePrefix:
|
|
77
|
-
stateKeyPrefix:
|
|
78
|
-
tokenKey:
|
|
79
|
-
userKey:
|
|
74
|
+
messagePrefix: `${clientId}-message-`,
|
|
75
|
+
stateKeyPrefix: `${clientId}-states-`,
|
|
76
|
+
tokenKey: `${clientId}-token`,
|
|
77
|
+
userKey: `${clientId}-user-`
|
|
80
78
|
});
|
|
81
79
|
|
|
82
80
|
if (!authResponse) {
|
package/dist/auth/storage.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
2
|
import ActualStorage from '../storage/storage.js';
|
|
4
3
|
import '../storage/storage__local.js';
|
|
5
4
|
import '../alert-service/alert-service.js';
|
|
@@ -19,7 +18,6 @@ import 'util-deprecate';
|
|
|
19
18
|
import '../icon/icon__constants.js';
|
|
20
19
|
import '../_helpers/icon.js';
|
|
21
20
|
import '../icon/icon__svg.js';
|
|
22
|
-
import 'core-js/modules/es.string.replace.js';
|
|
23
21
|
import '../global/memoize.js';
|
|
24
22
|
import '../loader-inline/loader-inline.js';
|
|
25
23
|
import '../global/data-tests.js';
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import ExtendableError from 'es6-error';
|
|
3
3
|
import { CODE } from '../http/http.js';
|
|
4
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
4
|
import '../global/url.js';
|
|
6
|
-
import 'core-js/modules/es.string.replace.js';
|
|
7
5
|
|
|
8
6
|
class TokenValidationError extends ExtendableError {
|
|
9
7
|
constructor(message, cause) {
|
package/dist/auth/window-flow.js
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import AuthResponseParser from './response-parser.js';
|
|
3
|
-
import 'core-js/modules/es.string.replace.js';
|
|
4
3
|
import 'es6-error';
|
|
5
4
|
import '../global/url.js';
|
|
6
5
|
|
|
@@ -55,7 +54,7 @@ class WindowFlow {
|
|
|
55
54
|
const screenHalves = 2;
|
|
56
55
|
const top = (window.screen.height - height - NAVBAR_HEIGHT) / screenHalves;
|
|
57
56
|
const left = (window.screen.width - width) / screenHalves;
|
|
58
|
-
return window.open(url, 'HubLoginWindow',
|
|
57
|
+
return window.open(url, 'HubLoginWindow', `height=${height}, width=${width}, left=${left}, top=${top}`);
|
|
59
58
|
}
|
|
60
59
|
/**
|
|
61
60
|
* Initiates authorization in window
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
|
-
import 'core-js/modules/es.string.replace.js';
|
|
4
2
|
import React, { Component } from 'react';
|
|
5
3
|
import PropTypes from 'prop-types';
|
|
6
4
|
import classNames from 'classnames';
|
|
@@ -117,7 +115,7 @@ class AuthDialog extends Component {
|
|
|
117
115
|
}, /*#__PURE__*/React.createElement(ContentWrapper, null, /*#__PURE__*/React.createElement("div", {
|
|
118
116
|
className: modules_ae521deb.content
|
|
119
117
|
}, serviceImage && /*#__PURE__*/React.createElement("img", {
|
|
120
|
-
alt:
|
|
118
|
+
alt: `${serviceName} logo`,
|
|
121
119
|
className: modules_ae521deb.logo,
|
|
122
120
|
src: serviceImage
|
|
123
121
|
}), /*#__PURE__*/React.createElement(H2, {
|
|
@@ -1,10 +1,8 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import { render } from '../global/react-render-adapter.js';
|
|
3
3
|
import AuthDialog from '../auth-dialog/auth-dialog.js';
|
|
4
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
4
|
import 'react-dom';
|
|
6
5
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
7
|
-
import 'core-js/modules/es.string.replace.js';
|
|
8
6
|
import 'prop-types';
|
|
9
7
|
import 'classnames';
|
|
10
8
|
import '../island/island.js';
|
package/dist/auth-ng/auth-ng.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import 'core-js/modules/es.string.replace.js';
|
|
2
1
|
import angular from 'angular';
|
|
3
2
|
import '../auth/auth.js';
|
|
4
3
|
import Auth from '../auth/auth__core.js';
|
|
@@ -11,7 +10,6 @@ import '../auth/down-notification.js';
|
|
|
11
10
|
import 'react';
|
|
12
11
|
import 'prop-types';
|
|
13
12
|
import '../alert-service/alert-service.js';
|
|
14
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
15
13
|
import '../global/react-render-adapter.js';
|
|
16
14
|
import 'react-dom';
|
|
17
15
|
import '../global/get-uid.js';
|
|
@@ -119,7 +117,7 @@ angularModule.provider('auth', ["$httpProvider", function provider($httpProvider
|
|
|
119
117
|
|
|
120
118
|
return authInstance.promise.then(() => authInstance.auth.requestToken()).then(accessToken => {
|
|
121
119
|
if (accessToken) {
|
|
122
|
-
config.headers.Authorization =
|
|
120
|
+
config.headers.Authorization = `Bearer ${accessToken}`;
|
|
123
121
|
}
|
|
124
122
|
|
|
125
123
|
return config;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import angular from 'angular';
|
|
2
2
|
import { FOCUSABLE_ELEMENTS } from '../tab-trap/tab-trap.js';
|
|
3
3
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
4
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
5
4
|
import 'react';
|
|
6
5
|
import 'prop-types';
|
|
7
6
|
import '../global/dom.js';
|
|
@@ -1,4 +1,26 @@
|
|
|
1
1
|
// Taken from https://hub.jetbrains.com/api/rest/avatar/default?username=Jet%20Brains&dpr=2&size=56
|
|
2
|
-
const avatarDataUri =
|
|
2
|
+
const avatarDataUri = `data:image/svg+xml,${encodeURIComponent(`
|
|
3
|
+
<svg viewBox="0 0 40 40" xmlns="http://www.w3.org/2000/svg">
|
|
4
|
+
<defs>
|
|
5
|
+
<linearGradient id="gradient" x1="0" y1="0" x2="0" y2="1">
|
|
6
|
+
<stop stop-color="#D50F6B" offset="0"/>
|
|
7
|
+
<stop stop-color="#E73AE8" offset="1"/>
|
|
8
|
+
</linearGradient>
|
|
9
|
+
</defs>
|
|
10
|
+
<g>
|
|
11
|
+
<rect fill="url(#gradient)"
|
|
12
|
+
x="0" y="0" width="40" height="40"
|
|
13
|
+
rx="3" ry="3"/>
|
|
14
|
+
<text x="5" y="19"
|
|
15
|
+
font-family="Arial, Helvetica, sans-serif"
|
|
16
|
+
font-size="15px"
|
|
17
|
+
letter-spacing="1"
|
|
18
|
+
fill="#FFFFFF">
|
|
19
|
+
<tspan>JB</tspan>
|
|
20
|
+
<tspan x="6" y="28">_</tspan>
|
|
21
|
+
</text>
|
|
22
|
+
</g>
|
|
23
|
+
</svg>
|
|
24
|
+
`)}`;
|
|
3
25
|
|
|
4
26
|
export { avatarDataUri };
|
package/dist/avatar/avatar.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import { _ as _defineProperty, a as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
2
|
import React, { PureComponent } from 'react';
|
|
4
3
|
import PropTypes from 'prop-types';
|
|
5
4
|
import classNames from 'classnames';
|
|
6
5
|
import { isDataURI, parseQueryString, encodeURL } from '../global/url.js';
|
|
7
6
|
import { getPixelRatio } from '../global/dom.js';
|
|
8
7
|
import FallbackAvatar from './fallback-avatar.js';
|
|
9
|
-
import 'core-js/modules/es.string.replace.js';
|
|
10
8
|
import '../global/get-uid.js';
|
|
11
9
|
|
|
12
10
|
var modules_61ca8c75 = {"avatar":"avatar_rui_a03e","subavatar":"subavatar_rui_a03e","empty":"empty_rui_a03e"};
|
|
@@ -62,8 +60,8 @@ class Avatar extends PureComponent {
|
|
|
62
60
|
skipParams,
|
|
63
61
|
...restProps
|
|
64
62
|
} = this.props;
|
|
65
|
-
const sizeString =
|
|
66
|
-
const subavatarSizeString =
|
|
63
|
+
const sizeString = `${size}px`;
|
|
64
|
+
const subavatarSizeString = `${subavatarSize}px`;
|
|
67
65
|
const borderRadius = size <= Size.Size18 ? 'var(--ring-border-radius-small)' : 'var(--ring-border-radius)';
|
|
68
66
|
const styleObj = {
|
|
69
67
|
borderRadius: round ? '50%' : borderRadius,
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
2
1
|
import React, { useMemo } from 'react';
|
|
3
2
|
import PropTypes from 'prop-types';
|
|
4
3
|
import getUID from '../global/get-uid.js';
|
|
@@ -64,7 +63,7 @@ function extractLetters(name) {
|
|
|
64
63
|
if (names[0].length >= 2) {
|
|
65
64
|
return names[0].slice(0, 2).join('').toUpperCase();
|
|
66
65
|
} else {
|
|
67
|
-
return
|
|
66
|
+
return `${names[0][0].toUpperCase()}X`;
|
|
68
67
|
}
|
|
69
68
|
} else {
|
|
70
69
|
return 'XX';
|
|
@@ -98,7 +97,7 @@ function FallbackAvatar(_ref) {
|
|
|
98
97
|
const radius = round ? '50%' : sizes.radius;
|
|
99
98
|
const gradientId = useMemo(() => getUID('gradient-'), []);
|
|
100
99
|
return /*#__PURE__*/React.createElement("svg", {
|
|
101
|
-
viewBox:
|
|
100
|
+
viewBox: `0 0 ${sizeKey} ${sizeKey}`,
|
|
102
101
|
xmlns: "http://www.w3.org/2000/svg"
|
|
103
102
|
}, /*#__PURE__*/React.createElement("defs", null, /*#__PURE__*/React.createElement("linearGradient", {
|
|
104
103
|
id: gradientId,
|
|
@@ -113,7 +112,7 @@ function FallbackAvatar(_ref) {
|
|
|
113
112
|
stopColor: toColor,
|
|
114
113
|
offset: "1"
|
|
115
114
|
}))), /*#__PURE__*/React.createElement("g", null, /*#__PURE__*/React.createElement("rect", {
|
|
116
|
-
fill:
|
|
115
|
+
fill: `url(#${gradientId})`,
|
|
117
116
|
x: "0",
|
|
118
117
|
y: "0",
|
|
119
118
|
width: sizeKey,
|
|
@@ -5,7 +5,6 @@ import alertService from '../alert-service/alert-service.js';
|
|
|
5
5
|
import IconNG from '../icon-ng/icon-ng.js';
|
|
6
6
|
import template from './avatar-editor-ng__template.js';
|
|
7
7
|
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
8
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
9
8
|
import 'react';
|
|
10
9
|
import '../global/react-render-adapter.js';
|
|
11
10
|
import 'react-dom';
|
|
@@ -22,7 +21,6 @@ import 'util-deprecate';
|
|
|
22
21
|
import '../icon/icon__constants.js';
|
|
23
22
|
import '../_helpers/icon.js';
|
|
24
23
|
import '../icon/icon__svg.js';
|
|
25
|
-
import 'core-js/modules/es.string.replace.js';
|
|
26
24
|
import '../global/memoize.js';
|
|
27
25
|
import '../loader-inline/loader-inline.js';
|
|
28
26
|
import '../global/data-tests.js';
|
|
@@ -1,3 +1,30 @@
|
|
|
1
|
-
var template =
|
|
1
|
+
var template = `<div>
|
|
2
|
+
<div ng-click="!ngDisabled && controls.select()" class="ring-avatar-editor__frame" ng-class="{
|
|
3
|
+
'ring-avatar-editor_controlled': controlled,
|
|
4
|
+
'ring-avatar-editor': !ngDisabled
|
|
5
|
+
}" ng-show="model || default">
|
|
6
|
+
<img alt="Avatar" class="ring-avatar-editor__img" ng-src="{{ model }}" ng-show="model">
|
|
7
|
+
<img alt="Default avatar" class="ring-avatar-editor__img" ng-src="{{ default }}"
|
|
8
|
+
ng-show="!model && default" ng-click="!ngDisabled && controls.select()">
|
|
9
|
+
<rg-icon glyph="{{editIcon}}" size="16" class="ring-avatar-editor__icon" ng-if="!ngDisabled"></rg-icon>
|
|
10
|
+
</div>
|
|
11
|
+
<input class="ring-avatar-editor__file-input" rg-avatar-editor-file-input type="file" ng-model="fileInput" accept="image/*" ng-if="!ngDisabled">
|
|
12
|
+
|
|
13
|
+
<rg-button
|
|
14
|
+
delayed="true"
|
|
15
|
+
ng-disabled="ngDisabled"
|
|
16
|
+
ng-if="showAddButton && !model && !default"
|
|
17
|
+
ng-click="controls.select()"
|
|
18
|
+
>{{ getAddMessage() }}</rg-button>
|
|
19
|
+
|
|
20
|
+
<rg-button
|
|
21
|
+
ng-if="showDeleteButton&& model && !ngDisabled"
|
|
22
|
+
danger="true"
|
|
23
|
+
class="ring-avatar-editor__remove"
|
|
24
|
+
ng-click="controls.remove()"
|
|
25
|
+
>
|
|
26
|
+
<span translate>{{ getDeleteLabel() }}</span>
|
|
27
|
+
</rg-button>
|
|
28
|
+
</div>`;
|
|
2
29
|
|
|
3
30
|
export { template as default };
|