@jetbrains/ring-ui 5.0.126 → 5.0.128
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/alert/alert.js +2 -1
- package/components/alert/container.js +2 -1
- package/components/auth/auth__core.js +2 -1
- package/components/auth/request-builder.js +2 -1
- package/components/auth/response-parser.js +2 -1
- package/components/auth/token-validator.js +2 -1
- package/components/auth-dialog/auth-dialog.js +2 -1
- package/components/avatar/avatar.js +2 -1
- package/components/badge/badge.js +2 -1
- package/components/button/button.js +2 -1
- package/components/button-group/button-group.js +2 -1
- package/components/button-group/caption.js +2 -1
- package/components/button-set/button-set.js +2 -1
- package/components/button-toolbar/button-toolbar.js +2 -1
- package/components/caret/caret.js +2 -1
- package/components/checkbox/checkbox.js +2 -1
- package/components/code/code.js +2 -1
- package/components/confirm/confirm.js +2 -1
- package/components/content-layout/content-layout.js +2 -1
- package/components/content-layout/sidebar.js +2 -1
- package/components/data-list/data-list.js +2 -1
- package/components/data-list/item.js +2 -1
- package/components/date-picker/date-input.js +2 -1
- package/components/date-picker/date-picker.js +2 -1
- package/components/date-picker/date-popup.js +2 -1
- package/components/date-picker/day.js +2 -1
- package/components/date-picker/month-slider.js +2 -1
- package/components/date-picker/years.js +2 -1
- package/components/dialog/dialog.d.ts +4 -16
- package/components/dialog/dialog.js +6 -3
- package/components/dropdown/dropdown.js +2 -1
- package/components/editable-heading/editable-heading.css +2 -0
- package/components/error-bubble/error-bubble.js +2 -1
- package/components/error-message/error-message.js +2 -1
- package/components/footer/footer.js +1 -0
- package/components/global/react-dom-renderer.js +2 -1
- package/components/grid/col.js +2 -1
- package/components/grid/grid.js +2 -1
- package/components/grid/row.js +2 -1
- package/components/group/group.js +2 -1
- package/components/header/logo.js +2 -1
- package/components/header/profile.js +2 -1
- package/components/header/services-link.js +2 -1
- package/components/header/services.js +2 -1
- package/components/header/smart-profile.js +2 -1
- package/components/header/smart-services.js +2 -1
- package/components/header/tray-icon.js +2 -1
- package/components/header/tray.js +2 -1
- package/components/hub-source/hub-source.js +2 -1
- package/components/icon/icon.js +2 -1
- package/components/input/input.js +2 -1
- package/components/island/island.js +2 -1
- package/components/island-legacy/content-legacy.js +2 -1
- package/components/island-legacy/header-legacy.js +2 -1
- package/components/island-legacy/island-legacy.js +2 -1
- package/components/link/clickableLink.js +2 -1
- package/components/list/list.js +2 -1
- package/components/list/list__hint.js +2 -1
- package/components/list/list__users-groups-source.js +2 -1
- package/components/loader/loader.js +2 -1
- package/components/loader/loader__core.js +2 -1
- package/components/loader-screen/loader-screen.js +2 -1
- package/components/login-dialog/login-dialog.js +2 -1
- package/components/message/message.js +2 -1
- package/components/pager/pager.js +2 -1
- package/components/panel/panel.js +2 -1
- package/components/permissions/permissions.js +2 -1
- package/components/permissions/permissions__cache.js +2 -1
- package/components/popup/popup.js +2 -1
- package/components/popup-menu/popup-menu.js +2 -1
- package/components/progress-bar/progress-bar.js +2 -1
- package/components/query-assist/query-assist.js +4 -3
- package/components/radio/radio.js +2 -1
- package/components/radio/radio__item.js +2 -1
- package/components/select/select.js +3 -2
- package/components/select/select__filter.js +2 -1
- package/components/select/select__popup.js +4 -2
- package/components/shortcuts/shortcuts.js +2 -1
- package/components/storage/storage__fallback.js +2 -1
- package/components/tab-trap/tab-trap.js +2 -1
- package/components/table/cell.js +2 -1
- package/components/table/header-cell.js +2 -1
- package/components/table/header.js +2 -1
- package/components/table/multitable.js +2 -1
- package/components/table/row.js +3 -2
- package/components/table/table.js +4 -2
- package/components/tabs/smart-tabs.js +2 -1
- package/components/tabs/tab.js +2 -1
- package/components/tag/tag.js +2 -1
- package/components/tags-input/tags-input.d.ts +1 -1
- package/components/tags-input/tags-input.js +3 -2
- package/components/tags-list/tags-list.js +2 -1
- package/components/text/text.js +2 -1
- package/components/tooltip/tooltip.js +2 -1
- package/components/user-agreement/user-agreement.js +2 -1
- package/components/user-card/card.js +2 -1
- package/components/user-card/smart-user-card-tooltip.d.ts +1 -1
- package/components/user-card/smart-user-card-tooltip.js +2 -1
- package/components/user-card/tooltip.js +2 -1
- package/dist/_helpers/_rollupPluginBabelHelpers.js +1 -29
- package/dist/_helpers/anchor.js +1 -1
- package/dist/_helpers/card.js +44 -47
- package/dist/_helpers/footer.js +1 -0
- package/dist/_helpers/select__filter.js +10 -13
- package/dist/_helpers/services-link.js +10 -10
- package/dist/_helpers/sidebar.js +34 -37
- package/dist/_helpers/theme.js +1 -1
- package/dist/_helpers/title.js +12 -16
- package/dist/alert/alert.js +63 -66
- package/dist/alert/container.js +5 -5
- package/dist/alert-service/alert-service.js +5 -7
- package/dist/analytics/analytics.js +1 -2
- package/dist/analytics/analytics__custom-plugin.js +6 -8
- package/dist/auth/auth.js +1 -1
- package/dist/auth/auth__core.js +26 -26
- package/dist/auth/background-flow.js +4 -5
- package/dist/auth/iframe-flow.js +12 -12
- package/dist/auth/landing.js +1 -1
- package/dist/auth/request-builder.js +3 -5
- package/dist/auth/response-parser.js +5 -6
- package/dist/auth/storage.js +12 -12
- package/dist/auth/token-validator.js +13 -16
- package/dist/auth/window-flow.js +18 -19
- package/dist/auth-dialog/auth-dialog.js +54 -57
- package/dist/auth-dialog-service/auth-dialog-service.js +1 -1
- package/dist/auth-ng/auth-ng.js +1 -1
- package/dist/avatar/avatar.js +30 -33
- package/dist/avatar-ng/avatar-ng.js +1 -1
- package/dist/badge/badge.js +10 -10
- package/dist/badge-ng/badge-ng.js +1 -1
- package/dist/breadcrumb-ng/breadcrumb-ng.js +0 -1
- package/dist/button/button.js +24 -27
- package/dist/button-group/button-group.js +5 -5
- package/dist/button-group/caption.js +4 -4
- package/dist/button-ng/button-ng.js +68 -69
- package/dist/button-set/button-set.js +6 -6
- package/dist/button-toolbar/button-toolbar.js +6 -6
- package/dist/caret/caret.js +2 -4
- package/dist/checkbox/checkbox.js +27 -30
- package/dist/checkbox-ng/checkbox-ng.js +0 -1
- package/dist/code/code.js +17 -21
- package/dist/confirm/confirm.js +31 -34
- package/dist/confirm-ng/confirm-ng.js +1 -1
- package/dist/confirm-service/confirm-service.js +1 -1
- package/dist/content-layout/content-layout.js +17 -20
- package/dist/contenteditable/contenteditable.js +11 -11
- package/dist/data-list/data-list.js +49 -55
- package/dist/data-list/item.js +64 -67
- package/dist/data-list/selection.js +0 -1
- package/dist/data-list/title.js +1 -1
- package/dist/data-list-ng/data-list-ng.js +1 -1
- package/dist/date-picker/date-input.js +39 -42
- package/dist/date-picker/date-picker.js +162 -165
- package/dist/date-picker/date-popup.js +119 -119
- package/dist/date-picker/day.js +34 -38
- package/dist/date-picker/month-names.js +11 -14
- package/dist/date-picker/month-slider.js +24 -28
- package/dist/date-picker/month.js +1 -1
- package/dist/date-picker/months.js +1 -1
- package/dist/date-picker/years.js +9 -13
- package/dist/dialog/dialog.d.ts +4 -16
- package/dist/dialog/dialog.js +68 -65
- package/dist/dialog-ng/dialog-ng.js +21 -22
- package/dist/docked-panel-ng/docked-panel-ng.js +0 -1
- package/dist/dropdown/dropdown.js +101 -104
- package/dist/dropdown-menu/dropdown-menu.js +1 -1
- package/dist/editable-heading/editable-heading.js +1 -1
- package/dist/error-bubble/error-bubble.js +6 -6
- package/dist/error-message/error-message.js +10 -10
- package/dist/error-message-ng/error-message-ng.js +0 -1
- package/dist/footer-ng/footer-ng.js +19 -21
- package/dist/global/angular-component-factory.js +2 -3
- package/dist/global/dom.js +1 -5
- package/dist/global/focus-sensor-hoc.js +58 -61
- package/dist/global/listeners.js +1 -5
- package/dist/global/react-dom-renderer.js +8 -12
- package/dist/global/rerender-hoc.js +1 -5
- package/dist/global/ring-angular-component.js +1 -3
- package/dist/grid/col.js +13 -14
- package/dist/grid/grid.js +5 -5
- package/dist/grid/row.js +16 -17
- package/dist/group/group.js +5 -5
- package/dist/header/header.js +10 -10
- package/dist/header/logo.js +9 -9
- package/dist/header/profile.js +58 -58
- package/dist/header/services.js +19 -22
- package/dist/header/smart-profile.js +40 -43
- package/dist/header/smart-services.js +28 -31
- package/dist/header/tray-icon.js +6 -6
- package/dist/header/tray.js +5 -5
- package/dist/heading/heading.js +1 -1
- package/dist/heading-ng/heading-ng.js +1 -1
- package/dist/http/http.js +111 -107
- package/dist/http/http.mock.js +3 -4
- package/dist/hub-source/hub-source.js +7 -9
- package/dist/hub-source/hub-source__user.js +0 -1
- package/dist/hub-source/hub-source__users-groups.js +4 -5
- package/dist/icon/icon.js +18 -18
- package/dist/icon/icon__svg.js +1 -1
- package/dist/icon-ng/icon-ng.js +0 -1
- package/dist/input/input.js +35 -38
- package/dist/input-ng/input-ng.js +25 -26
- package/dist/island/adaptive-island-hoc.js +21 -25
- package/dist/island/content.js +62 -65
- package/dist/island/header.js +11 -11
- package/dist/island/island.js +8 -8
- package/dist/island-legacy/content-legacy.js +5 -5
- package/dist/island-legacy/header-legacy.js +5 -5
- package/dist/island-legacy/island-legacy.js +5 -5
- package/dist/link/clickableLink.js +27 -30
- package/dist/link/link.js +16 -16
- package/dist/list/list.js +389 -391
- package/dist/list/list__custom.js +6 -10
- package/dist/list/list__hint.js +3 -4
- package/dist/list/list__item.js +4 -7
- package/dist/list/list__link.js +1 -1
- package/dist/list/list__users-groups-source.js +3 -3
- package/dist/loader/loader.js +16 -19
- package/dist/loader/loader__core.js +62 -62
- package/dist/loader-inline/loader-inline.js +6 -6
- package/dist/loader-ng/loader-ng.js +3 -4
- package/dist/loader-screen/loader-screen.js +6 -6
- package/dist/loader-screen-ng/loader-screen-ng.js +0 -1
- package/dist/login-dialog/login-dialog.js +55 -58
- package/dist/login-dialog/service.js +1 -1
- package/dist/markdown/code.js +0 -1
- package/dist/markdown/markdown.js +1 -1
- package/dist/message/message.js +22 -25
- package/dist/old-browsers-message/white-list.js +2 -2
- package/dist/pager/pager.js +55 -58
- package/dist/pager-ng/pager-ng.js +1 -1
- package/dist/panel/panel.js +5 -5
- package/dist/panel-ng/panel-ng.js +0 -1
- package/dist/permissions/permissions.js +14 -16
- package/dist/permissions/permissions__cache.js +4 -6
- package/dist/permissions-ng/permissions-ng.js +1 -1
- package/dist/place-under-ng/place-under-ng.js +0 -1
- package/dist/popup/popup.js +118 -121
- package/dist/popup/popup.target.js +1 -1
- package/dist/popup/position.js +0 -1
- package/dist/popup-menu/popup-menu.js +19 -22
- package/dist/progress-bar/progress-bar.js +41 -44
- package/dist/progress-bar-ng/progress-bar-ng.js +1 -1
- package/dist/promised-click-ng/promised-click-ng.js +0 -1
- package/dist/query-assist/query-assist.js +507 -501
- package/dist/query-assist/query-assist__suggestions.js +1 -1
- package/dist/query-assist-ng/query-assist-ng.js +1 -1
- package/dist/radio/radio.js +10 -13
- package/dist/radio/radio__item.js +19 -22
- package/dist/select/select.js +351 -350
- package/dist/select/select__popup.js +148 -152
- package/dist/select-ng/select-ng.js +1 -1
- package/dist/select-ng/select-ng__lazy.js +4 -4
- package/dist/select-ng/select-ng__options.js +14 -15
- package/dist/shortcuts/core.js +35 -36
- package/dist/shortcuts/shortcuts-hoc.js +7 -11
- package/dist/shortcuts/shortcuts.js +10 -11
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +0 -1
- package/dist/shortcuts-ng/shortcuts-ng.js +0 -1
- package/dist/sidebar-ng/sidebar-ng.js +0 -1
- package/dist/storage/storage.js +1 -1
- package/dist/storage/storage__fallback.js +8 -10
- package/dist/storage/storage__local.js +2 -2
- package/dist/style.css +1 -1
- package/dist/tab-trap/tab-trap.js +84 -86
- package/dist/table/cell.js +6 -6
- package/dist/table/disable-hover-hoc.js +23 -25
- package/dist/table/header-cell.js +28 -31
- package/dist/table/header.js +58 -61
- package/dist/table/multitable.js +91 -95
- package/dist/table/row-with-focus-sensor.js +15 -18
- package/dist/table/row.js +51 -54
- package/dist/table/selection-shortcuts-hoc.js +145 -147
- package/dist/table/selection.js +7 -9
- package/dist/table/smart-table.js +21 -24
- package/dist/table/table.js +103 -109
- package/dist/table-legacy-ng/table-legacy-ng.js +1 -1
- package/dist/table-legacy-ng/table-legacy-ng__pager.js +1 -1
- package/dist/table-legacy-ng/table-legacy-ng__selection.js +1 -3
- package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +0 -1
- package/dist/table-ng/smart-table-ng.js +1 -1
- package/dist/table-ng/table-ng.js +1 -1
- package/dist/tabs/collapsible-more.js +1 -1
- package/dist/tabs/collapsible-tab.js +1 -1
- package/dist/tabs/dumb-tabs.js +46 -49
- package/dist/tabs/smart-tabs.js +10 -10
- package/dist/tabs/tab.js +7 -8
- package/dist/tag/tag.js +42 -45
- package/dist/tags-input/tags-input.d.ts +1 -1
- package/dist/tags-input/tags-input.js +214 -213
- package/dist/tags-input-ng/tags-input-ng.js +1 -1
- package/dist/tags-list/tags-list.js +20 -20
- package/dist/template-ng/template-ng.js +25 -26
- package/dist/text/text.js +6 -6
- package/dist/toggle/toggle.js +19 -19
- package/dist/toggle-ng/toggle-ng.js +1 -1
- package/dist/tooltip/tooltip.js +86 -89
- package/dist/tooltip-ng/tooltip-ng.js +1 -1
- package/dist/user-agreement/service.js +207 -205
- package/dist/user-agreement/user-agreement.js +39 -42
- package/dist/user-card/smart-user-card-tooltip.d.ts +1 -1
- package/dist/user-card/smart-user-card-tooltip.js +32 -35
- package/dist/user-card/tooltip.js +26 -26
- package/dist/user-card-ng/user-card-ng.js +1 -1
- package/package.json +15 -15
package/dist/dialog/dialog.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React, { PureComponent } from 'react';
|
|
3
3
|
import { createPortal } from 'react-dom';
|
|
4
4
|
import PropTypes from 'prop-types';
|
|
@@ -42,37 +42,45 @@ import 'scrollbar-width';
|
|
|
42
42
|
*/
|
|
43
43
|
function noop() {}
|
|
44
44
|
class Dialog extends PureComponent {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
45
|
+
static propTypes = {
|
|
46
|
+
label: PropTypes.string,
|
|
47
|
+
className: PropTypes.string,
|
|
48
|
+
contentClassName: PropTypes.string,
|
|
49
|
+
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
50
|
+
show: PropTypes.bool.isRequired,
|
|
51
|
+
showCloseButton: PropTypes.bool,
|
|
52
|
+
closeButtonInside: PropTypes.bool,
|
|
53
|
+
closeButtonTitle: PropTypes.string,
|
|
54
|
+
onOverlayClick: PropTypes.func,
|
|
55
|
+
onEscPress: PropTypes.func,
|
|
56
|
+
onCloseClick: PropTypes.func,
|
|
57
|
+
shortcutOptions: PropTypes.object,
|
|
58
|
+
// onCloseAttempt is a common callback for ESC pressing and overlay clicking.
|
|
59
|
+
// Use it if you don't need different behaviors for this cases.
|
|
60
|
+
onCloseAttempt: PropTypes.func,
|
|
61
|
+
// focusTrap may break popups inside dialog, so use it carefully
|
|
62
|
+
trapFocus: PropTypes.bool,
|
|
63
|
+
portalTarget: PropTypes.instanceOf(HTMLElement),
|
|
64
|
+
autoFocusFirst: PropTypes.bool,
|
|
65
|
+
'data-test': PropTypes.string
|
|
66
|
+
};
|
|
67
|
+
static defaultProps = {
|
|
68
|
+
label: 'Dialog',
|
|
69
|
+
onOverlayClick: noop,
|
|
70
|
+
onEscPress: noop,
|
|
71
|
+
onCloseClick: noop,
|
|
72
|
+
onCloseAttempt: noop,
|
|
73
|
+
showCloseButton: false,
|
|
74
|
+
closeButtonInside: false,
|
|
75
|
+
shortcutOptions: {
|
|
76
|
+
modal: false
|
|
77
|
+
},
|
|
78
|
+
trapFocus: false,
|
|
79
|
+
autoFocusFirst: true
|
|
80
|
+
};
|
|
81
|
+
state = {
|
|
82
|
+
shortcutsScope: getUID('ring-dialog-')
|
|
83
|
+
};
|
|
76
84
|
componentDidMount() {
|
|
77
85
|
this.toggleScrollPreventer();
|
|
78
86
|
}
|
|
@@ -84,6 +92,8 @@ class Dialog extends PureComponent {
|
|
|
84
92
|
componentWillUnmount() {
|
|
85
93
|
this.scrollPreventer.reset();
|
|
86
94
|
}
|
|
95
|
+
scrollPreventer = preventerFactory(getUID('preventer-'));
|
|
96
|
+
uid = getUID('dialog-');
|
|
87
97
|
toggleScrollPreventer() {
|
|
88
98
|
if (this.props.show) {
|
|
89
99
|
this.scrollPreventer.prevent();
|
|
@@ -91,6 +101,29 @@ class Dialog extends PureComponent {
|
|
|
91
101
|
this.scrollPreventer.reset();
|
|
92
102
|
}
|
|
93
103
|
}
|
|
104
|
+
handleClick = event => {
|
|
105
|
+
this.props.onOverlayClick(event);
|
|
106
|
+
this.props.onCloseAttempt(event);
|
|
107
|
+
};
|
|
108
|
+
onCloseClick = event => {
|
|
109
|
+
this.props.onCloseClick(event);
|
|
110
|
+
this.props.onCloseAttempt(event);
|
|
111
|
+
};
|
|
112
|
+
getShortcutsMap = () => {
|
|
113
|
+
const onEscape = event => {
|
|
114
|
+
if (this.props.show) {
|
|
115
|
+
this.props.onEscPress(event);
|
|
116
|
+
this.props.onCloseAttempt(event);
|
|
117
|
+
}
|
|
118
|
+
};
|
|
119
|
+
return {
|
|
120
|
+
esc: onEscape
|
|
121
|
+
};
|
|
122
|
+
};
|
|
123
|
+
dialog;
|
|
124
|
+
dialogRef = tabTrap => {
|
|
125
|
+
this.dialog = tabTrap && tabTrap.node;
|
|
126
|
+
};
|
|
94
127
|
render() {
|
|
95
128
|
const {
|
|
96
129
|
show,
|
|
@@ -109,6 +142,7 @@ class Dialog extends PureComponent {
|
|
|
109
142
|
label,
|
|
110
143
|
closeButtonTitle,
|
|
111
144
|
dense,
|
|
145
|
+
shortcutOptions,
|
|
112
146
|
...restProps
|
|
113
147
|
} = this.props;
|
|
114
148
|
const classes = classNames(modules_5e9b8c03.container, className);
|
|
@@ -124,7 +158,8 @@ class Dialog extends PureComponent {
|
|
|
124
158
|
role: "presentation"
|
|
125
159
|
}, restProps), /*#__PURE__*/React.createElement(Shortcuts, {
|
|
126
160
|
map: shortcutsMap,
|
|
127
|
-
scope: this.state.shortcutsScope
|
|
161
|
+
scope: this.state.shortcutsScope,
|
|
162
|
+
options: this.props.shortcutOptions
|
|
128
163
|
}), (onOverlayClick !== noop || onCloseAttempt !== noop) && /*#__PURE__*/React.createElement("div", {
|
|
129
164
|
// click handler is duplicated in close button
|
|
130
165
|
role: "presentation",
|
|
@@ -153,37 +188,5 @@ class Dialog extends PureComponent {
|
|
|
153
188
|
}))), target)), portalTarget instanceof HTMLElement ? portalTarget : document.body);
|
|
154
189
|
}
|
|
155
190
|
}
|
|
156
|
-
_defineProperty(Dialog, "propTypes", {
|
|
157
|
-
label: PropTypes.string,
|
|
158
|
-
className: PropTypes.string,
|
|
159
|
-
contentClassName: PropTypes.string,
|
|
160
|
-
children: PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.node), PropTypes.node]),
|
|
161
|
-
show: PropTypes.bool.isRequired,
|
|
162
|
-
showCloseButton: PropTypes.bool,
|
|
163
|
-
closeButtonInside: PropTypes.bool,
|
|
164
|
-
closeButtonTitle: PropTypes.string,
|
|
165
|
-
onOverlayClick: PropTypes.func,
|
|
166
|
-
onEscPress: PropTypes.func,
|
|
167
|
-
onCloseClick: PropTypes.func,
|
|
168
|
-
// onCloseAttempt is a common callback for ESC pressing and overlay clicking.
|
|
169
|
-
// Use it if you don't need different behaviors for this cases.
|
|
170
|
-
onCloseAttempt: PropTypes.func,
|
|
171
|
-
// focusTrap may break popups inside dialog, so use it carefully
|
|
172
|
-
trapFocus: PropTypes.bool,
|
|
173
|
-
portalTarget: PropTypes.instanceOf(HTMLElement),
|
|
174
|
-
autoFocusFirst: PropTypes.bool,
|
|
175
|
-
'data-test': PropTypes.string
|
|
176
|
-
});
|
|
177
|
-
_defineProperty(Dialog, "defaultProps", {
|
|
178
|
-
label: 'Dialog',
|
|
179
|
-
onOverlayClick: noop,
|
|
180
|
-
onEscPress: noop,
|
|
181
|
-
onCloseClick: noop,
|
|
182
|
-
onCloseAttempt: noop,
|
|
183
|
-
showCloseButton: false,
|
|
184
|
-
closeButtonInside: false,
|
|
185
|
-
trapFocus: false,
|
|
186
|
-
autoFocusFirst: true
|
|
187
|
-
});
|
|
188
191
|
|
|
189
192
|
export { Dialog as default };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import angular from 'angular';
|
|
3
2
|
import { createFocusTrap } from 'focus-trap';
|
|
4
3
|
import { getStyles, getRect } from '../global/dom.js';
|
|
@@ -36,21 +35,6 @@ const angularModule = angular.module('Ring.dialog', [Button, PromisedClick, rgCo
|
|
|
36
35
|
class DialogController extends RingAngularComponent {
|
|
37
36
|
constructor() {
|
|
38
37
|
super(...arguments);
|
|
39
|
-
_defineProperty(this, "hide", () => {
|
|
40
|
-
if (!this.inSidebar) {
|
|
41
|
-
this.scrollPreventer.reset();
|
|
42
|
-
}
|
|
43
|
-
this.active = false;
|
|
44
|
-
this.content = '';
|
|
45
|
-
this.focusTrap.deactivate();
|
|
46
|
-
Reflect.deleteProperty(this, 'DIALOG_NAMESPACE');
|
|
47
|
-
if (shortcuts.indexOfScope(this.dialogService.DIALOG_NAMESPACE) > -1) {
|
|
48
|
-
shortcuts.setScope(this.currentShortcutsScope);
|
|
49
|
-
}
|
|
50
|
-
this._resetFormState();
|
|
51
|
-
this.$inject.$scope.$broadcast('dialog.hide');
|
|
52
|
-
});
|
|
53
|
-
_defineProperty(this, "serverErrorFields", []);
|
|
54
38
|
this.styles = modules_b378ce5a;
|
|
55
39
|
this.dialogStyles = modules_5e9b8c03;
|
|
56
40
|
this.islandStyles = modules_e6a056e1;
|
|
@@ -189,6 +173,20 @@ class DialogController extends RingAngularComponent {
|
|
|
189
173
|
Object.assign(this.data, config.data);
|
|
190
174
|
Object.assign(this.buttons, config.buttons);
|
|
191
175
|
}
|
|
176
|
+
hide = () => {
|
|
177
|
+
if (!this.inSidebar) {
|
|
178
|
+
this.scrollPreventer.reset();
|
|
179
|
+
}
|
|
180
|
+
this.active = false;
|
|
181
|
+
this.content = '';
|
|
182
|
+
this.focusTrap.deactivate();
|
|
183
|
+
Reflect.deleteProperty(this, 'DIALOG_NAMESPACE');
|
|
184
|
+
if (shortcuts.indexOfScope(this.dialogService.DIALOG_NAMESPACE) > -1) {
|
|
185
|
+
shortcuts.setScope(this.currentShortcutsScope);
|
|
186
|
+
}
|
|
187
|
+
this._resetFormState();
|
|
188
|
+
this.$inject.$scope.$broadcast('dialog.hide');
|
|
189
|
+
};
|
|
192
190
|
_resetFormState() {
|
|
193
191
|
const dialogForm = this.dialogForm;
|
|
194
192
|
if (!dialogForm) {
|
|
@@ -223,6 +221,7 @@ class DialogController extends RingAngularComponent {
|
|
|
223
221
|
}
|
|
224
222
|
return null;
|
|
225
223
|
}
|
|
224
|
+
serverErrorFields = [];
|
|
226
225
|
action(button) {
|
|
227
226
|
if (button.inProgress) {
|
|
228
227
|
return undefined;
|
|
@@ -284,15 +283,12 @@ class DialogController extends RingAngularComponent {
|
|
|
284
283
|
DialogController.$inject = [];
|
|
285
284
|
DialogController.$inject = ['$scope', '$q', 'dialog', '$element', 'dialogInSidebar', '$compile', '$injector', '$controller', 'rgCompiler', '$sce'];
|
|
286
285
|
class DialogService extends RingAngularComponent {
|
|
286
|
+
DIALOG_NAMESPACE = 'ring-dialog';
|
|
287
|
+
fallbackDialog = null;
|
|
287
288
|
constructor() {
|
|
288
289
|
super(...arguments);
|
|
289
290
|
|
|
290
291
|
// Binding proxy methods to a service instance
|
|
291
|
-
_defineProperty(this, "DIALOG_NAMESPACE", 'ring-dialog');
|
|
292
|
-
_defineProperty(this, "fallbackDialog", null);
|
|
293
|
-
_defineProperty(this, "unregister", () => {
|
|
294
|
-
Reflect.deleteProperty(this, 'ctrl');
|
|
295
|
-
});
|
|
296
292
|
['show', 'hide', 'update', 'done', 'reset'].forEach(key => {
|
|
297
293
|
this[key] = function methodWrapper() {
|
|
298
294
|
if (this.ctrl) {
|
|
@@ -309,13 +305,16 @@ class DialogService extends RingAngularComponent {
|
|
|
309
305
|
register(ctrl) {
|
|
310
306
|
this.ctrl = ctrl;
|
|
311
307
|
}
|
|
308
|
+
unregister = () => {
|
|
309
|
+
Reflect.deleteProperty(this, 'ctrl');
|
|
310
|
+
};
|
|
312
311
|
}
|
|
313
312
|
DialogService.$inject = [];
|
|
314
313
|
DialogService.$inject = ['$log'];
|
|
315
314
|
class DialogInSidebarService extends DialogService {
|
|
315
|
+
DIALOG_NAMESPACE = 'ring-dialog-in-sidebar';
|
|
316
316
|
constructor() {
|
|
317
317
|
super(...arguments);
|
|
318
|
-
_defineProperty(this, "DIALOG_NAMESPACE", 'ring-dialog-in-sidebar');
|
|
319
318
|
this.fallbackDialog = this.$inject.dialog;
|
|
320
319
|
}
|
|
321
320
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import angular from 'angular';
|
|
2
2
|
import scheduleRAF from '../global/schedule-raf.js';
|
|
3
3
|
import { getDocumentScrollTop, getWindowHeight } from '../global/dom.js';
|
|
4
|
-
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
5
4
|
|
|
6
5
|
var modules_655b40c7 = {"unit":"i__const_unit_0","light":"light_rui_f45d","dockedPanel":"dockedPanel_rui_f45d","fixed":"fixed_rui_f45d"};
|
|
7
6
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { _ as
|
|
1
|
+
import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React, { Component, cloneElement } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import classNames from 'classnames';
|
|
@@ -22,82 +22,112 @@ import '../_helpers/button__classes.js';
|
|
|
22
22
|
* @name Dropdown
|
|
23
23
|
*/
|
|
24
24
|
class Dropdown extends Component {
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
25
|
+
static propTypes = {
|
|
26
|
+
/**
|
|
27
|
+
* Can be string, React element, or a function accepting an object with {active, pinned} properties and returning a React element
|
|
28
|
+
* React element should render some interactive HTML element like `button` or `a`
|
|
29
|
+
*/
|
|
30
|
+
anchor: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
|
|
31
|
+
children: PropTypes.oneOfType([PropTypes.element, PropTypes.func]).isRequired,
|
|
32
|
+
initShown: PropTypes.bool,
|
|
33
|
+
className: PropTypes.string,
|
|
34
|
+
activeClassName: PropTypes.string,
|
|
35
|
+
clickMode: PropTypes.bool,
|
|
36
|
+
hoverMode: PropTypes.bool,
|
|
37
|
+
hoverShowTimeOut: PropTypes.number,
|
|
38
|
+
hoverHideTimeOut: PropTypes.number,
|
|
39
|
+
disabled: PropTypes.bool,
|
|
40
|
+
onShow: PropTypes.func,
|
|
41
|
+
onHide: PropTypes.func,
|
|
42
|
+
onMouseEnter: PropTypes.func,
|
|
43
|
+
onMouseLeave: PropTypes.func,
|
|
44
|
+
'data-test': PropTypes.string
|
|
45
|
+
};
|
|
46
|
+
static defaultProps = {
|
|
47
|
+
initShown: false,
|
|
48
|
+
clickMode: true,
|
|
49
|
+
hoverMode: false,
|
|
50
|
+
hoverShowTimeOut: 300,
|
|
51
|
+
hoverHideTimeOut: 600,
|
|
52
|
+
disabled: false,
|
|
53
|
+
onShow: () => {},
|
|
54
|
+
onHide: () => {},
|
|
55
|
+
onMouseEnter: () => {},
|
|
56
|
+
onMouseLeave: () => {}
|
|
57
|
+
};
|
|
58
|
+
state = {
|
|
59
|
+
show: this.props.initShown,
|
|
60
|
+
pinned: false
|
|
61
|
+
};
|
|
62
|
+
onClick = () => {
|
|
63
|
+
if (this.props.disabled) {
|
|
64
|
+
return;
|
|
65
|
+
}
|
|
66
|
+
const {
|
|
67
|
+
show,
|
|
68
|
+
pinned
|
|
69
|
+
} = this.state;
|
|
70
|
+
let nextPinned = pinned;
|
|
71
|
+
if (this.props.hoverMode) {
|
|
72
|
+
if (!pinned) {
|
|
73
|
+
nextPinned = true;
|
|
74
|
+
if (show) {
|
|
75
|
+
this.setState({
|
|
76
|
+
pinned: true
|
|
77
|
+
});
|
|
78
|
+
return;
|
|
51
79
|
}
|
|
52
|
-
}
|
|
53
|
-
this._toggle(!show, nextPinned);
|
|
54
|
-
});
|
|
55
|
-
_defineProperty(this, "onChildCloseAttempt", () => {
|
|
56
|
-
let nextPinned = this.state.pinned;
|
|
57
|
-
if (this.props.hoverMode) {
|
|
80
|
+
} else {
|
|
58
81
|
nextPinned = false;
|
|
59
82
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
83
|
+
}
|
|
84
|
+
this._toggle(!show, nextPinned);
|
|
85
|
+
};
|
|
86
|
+
onChildCloseAttempt = () => {
|
|
87
|
+
let nextPinned = this.state.pinned;
|
|
88
|
+
if (this.props.hoverMode) {
|
|
89
|
+
nextPinned = false;
|
|
90
|
+
}
|
|
91
|
+
this._toggle(false, nextPinned);
|
|
92
|
+
};
|
|
93
|
+
hoverTimer;
|
|
94
|
+
onMouseEnter = event => {
|
|
95
|
+
if (this.props.disabled) {
|
|
96
|
+
return;
|
|
97
|
+
}
|
|
98
|
+
this._clearTimer();
|
|
99
|
+
this.props.onMouseEnter?.(event);
|
|
100
|
+
this.hoverTimer = window.setTimeout(() => {
|
|
101
|
+
if (!this.state.show) {
|
|
102
|
+
this._toggle(true);
|
|
78
103
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
104
|
+
}, this.props.hoverShowTimeOut);
|
|
105
|
+
};
|
|
106
|
+
onMouseLeave = event => {
|
|
107
|
+
if (this.props.disabled) {
|
|
108
|
+
return;
|
|
109
|
+
}
|
|
110
|
+
this.props.onMouseLeave?.(event);
|
|
111
|
+
if (this.state.pinned) {
|
|
112
|
+
return;
|
|
113
|
+
}
|
|
114
|
+
this._clearTimer();
|
|
115
|
+
this.hoverTimer = window.setTimeout(() => {
|
|
116
|
+
if (this.state.show) {
|
|
117
|
+
this._toggle(false);
|
|
82
118
|
}
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
pinned
|
|
94
|
-
} = _ref;
|
|
95
|
-
return pinned ? null : {
|
|
96
|
-
pinned: true
|
|
97
|
-
};
|
|
98
|
-
});
|
|
119
|
+
}, this.props.hoverHideTimeOut);
|
|
120
|
+
};
|
|
121
|
+
handlePopupInteraction = () => {
|
|
122
|
+
this.setState(_ref => {
|
|
123
|
+
let {
|
|
124
|
+
pinned
|
|
125
|
+
} = _ref;
|
|
126
|
+
return pinned ? null : {
|
|
127
|
+
pinned: true
|
|
128
|
+
};
|
|
99
129
|
});
|
|
100
|
-
}
|
|
130
|
+
};
|
|
101
131
|
toggle() {
|
|
102
132
|
let show = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : !this.state.show;
|
|
103
133
|
this._toggle(show);
|
|
@@ -182,38 +212,5 @@ class Dropdown extends Component {
|
|
|
182
212
|
}), anchorElement, typeof children === 'function' ? children(childProps) : /*#__PURE__*/cloneElement(children, childProps));
|
|
183
213
|
}
|
|
184
214
|
}
|
|
185
|
-
_defineProperty(Dropdown, "propTypes", {
|
|
186
|
-
/**
|
|
187
|
-
* Can be string, React element, or a function accepting an object with {active, pinned} properties and returning a React element
|
|
188
|
-
* React element should render some interactive HTML element like `button` or `a`
|
|
189
|
-
*/
|
|
190
|
-
anchor: PropTypes.oneOfType([PropTypes.node, PropTypes.func]).isRequired,
|
|
191
|
-
children: PropTypes.oneOfType([PropTypes.element, PropTypes.func]).isRequired,
|
|
192
|
-
initShown: PropTypes.bool,
|
|
193
|
-
className: PropTypes.string,
|
|
194
|
-
activeClassName: PropTypes.string,
|
|
195
|
-
clickMode: PropTypes.bool,
|
|
196
|
-
hoverMode: PropTypes.bool,
|
|
197
|
-
hoverShowTimeOut: PropTypes.number,
|
|
198
|
-
hoverHideTimeOut: PropTypes.number,
|
|
199
|
-
disabled: PropTypes.bool,
|
|
200
|
-
onShow: PropTypes.func,
|
|
201
|
-
onHide: PropTypes.func,
|
|
202
|
-
onMouseEnter: PropTypes.func,
|
|
203
|
-
onMouseLeave: PropTypes.func,
|
|
204
|
-
'data-test': PropTypes.string
|
|
205
|
-
});
|
|
206
|
-
_defineProperty(Dropdown, "defaultProps", {
|
|
207
|
-
initShown: false,
|
|
208
|
-
clickMode: true,
|
|
209
|
-
hoverMode: false,
|
|
210
|
-
hoverShowTimeOut: 300,
|
|
211
|
-
hoverHideTimeOut: 600,
|
|
212
|
-
disabled: false,
|
|
213
|
-
onShow: () => {},
|
|
214
|
-
onHide: () => {},
|
|
215
|
-
onMouseEnter: () => {},
|
|
216
|
-
onMouseLeave: () => {}
|
|
217
|
-
});
|
|
218
215
|
|
|
219
216
|
export { Anchor, Dropdown as default };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React, { useMemo, cloneElement } from 'react';
|
|
3
3
|
import PropTypes from 'prop-types';
|
|
4
4
|
import List, { ActiveItemContext } from '../list/list.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { _ as _extends } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
2
|
import React from 'react';
|
|
3
3
|
import classNames from 'classnames';
|
|
4
4
|
import Heading, { Levels } from '../heading/heading.js';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import React, { PureComponent, Children, cloneElement } from 'react';
|
|
3
2
|
import PropTypes from 'prop-types';
|
|
4
3
|
import classNames from 'classnames';
|
|
@@ -15,6 +14,7 @@ import '../global/sniffer.js';
|
|
|
15
14
|
import 'sniffr';
|
|
16
15
|
import '../global/data-tests.js';
|
|
17
16
|
import '../tab-trap/tab-trap.js';
|
|
17
|
+
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
18
18
|
import '../popup/position.js';
|
|
19
19
|
import '../popup/popup.target.js';
|
|
20
20
|
|
|
@@ -24,6 +24,11 @@ var modules_ee284100 = {"unit":"i__const_unit_0","light":"light_rui_b075","error
|
|
|
24
24
|
* @name Error Bubble
|
|
25
25
|
*/
|
|
26
26
|
class ErrorBubble extends PureComponent {
|
|
27
|
+
static propTypes = {
|
|
28
|
+
error: PropTypes.string,
|
|
29
|
+
className: PropTypes.string,
|
|
30
|
+
children: PropTypes.node
|
|
31
|
+
};
|
|
27
32
|
render() {
|
|
28
33
|
const {
|
|
29
34
|
children,
|
|
@@ -48,10 +53,5 @@ class ErrorBubble extends PureComponent {
|
|
|
48
53
|
}, restProps.error)));
|
|
49
54
|
}
|
|
50
55
|
}
|
|
51
|
-
_defineProperty(ErrorBubble, "propTypes", {
|
|
52
|
-
error: PropTypes.string,
|
|
53
|
-
className: PropTypes.string,
|
|
54
|
-
children: PropTypes.node
|
|
55
|
-
});
|
|
56
56
|
|
|
57
57
|
export { ErrorBubble as default };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import React, { Component } from 'react';
|
|
3
2
|
import PropTypes from 'prop-types';
|
|
4
3
|
import classNames from 'classnames';
|
|
@@ -6,6 +5,7 @@ import Icon from '../icon/icon.js';
|
|
|
6
5
|
import { Size } from '../icon/icon__constants.js';
|
|
7
6
|
import joinDataTestAttributes from '../global/data-tests.js';
|
|
8
7
|
import { m as modules_2c5e8509 } from '../_helpers/error-message.js';
|
|
8
|
+
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import 'util-deprecate';
|
|
10
10
|
import '../_helpers/icon.js';
|
|
11
11
|
import '../icon/icon__svg.js';
|
|
@@ -15,6 +15,15 @@ import '../global/memoize.js';
|
|
|
15
15
|
* @name Error Message
|
|
16
16
|
*/
|
|
17
17
|
class ErrorMessage extends Component {
|
|
18
|
+
static propTypes = {
|
|
19
|
+
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
|
|
20
|
+
code: PropTypes.string,
|
|
21
|
+
message: PropTypes.string,
|
|
22
|
+
description: PropTypes.string,
|
|
23
|
+
children: PropTypes.node,
|
|
24
|
+
className: PropTypes.string,
|
|
25
|
+
'data-test': PropTypes.string
|
|
26
|
+
};
|
|
18
27
|
render() {
|
|
19
28
|
const {
|
|
20
29
|
className,
|
|
@@ -43,14 +52,5 @@ class ErrorMessage extends Component {
|
|
|
43
52
|
}, description), children));
|
|
44
53
|
}
|
|
45
54
|
}
|
|
46
|
-
_defineProperty(ErrorMessage, "propTypes", {
|
|
47
|
-
icon: PropTypes.oneOfType([PropTypes.string, PropTypes.elementType]),
|
|
48
|
-
code: PropTypes.string,
|
|
49
|
-
message: PropTypes.string,
|
|
50
|
-
description: PropTypes.string,
|
|
51
|
-
children: PropTypes.node,
|
|
52
|
-
className: PropTypes.string,
|
|
53
|
-
'data-test': PropTypes.string
|
|
54
|
-
});
|
|
55
55
|
|
|
56
56
|
export { ErrorMessage as default };
|
|
@@ -4,7 +4,6 @@ import LinkModule from '../link-ng/link-ng.js';
|
|
|
4
4
|
import { m as modules_2c5e8509 } from '../_helpers/error-message.js';
|
|
5
5
|
import '../icon/icon__constants.js';
|
|
6
6
|
import '../template-ng/template-ng.js';
|
|
7
|
-
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
8
7
|
import '../global/ring-angular-component.js';
|
|
9
8
|
import '../_helpers/icon.js';
|
|
10
9
|
import '../_helpers/link.js';
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
1
|
import angular from 'angular';
|
|
3
2
|
import RingAngularComponent from '../global/ring-angular-component.js';
|
|
4
3
|
import { m as modules_7385b3fd, c as copyright } from '../_helpers/footer.js';
|
|
@@ -6,6 +5,7 @@ import 'react';
|
|
|
6
5
|
import 'prop-types';
|
|
7
6
|
import 'classnames';
|
|
8
7
|
import '../link/link.js';
|
|
8
|
+
import '../_helpers/_rollupPluginBabelHelpers.js';
|
|
9
9
|
import 'focus-visible';
|
|
10
10
|
import '../global/memoize.js';
|
|
11
11
|
import '../global/data-tests.js';
|
|
@@ -18,17 +18,13 @@ import '../_helpers/link.js';
|
|
|
18
18
|
|
|
19
19
|
const angularModule = angular.module('Ring.footer', []);
|
|
20
20
|
class rgFooterComponent extends RingAngularComponent {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
center: '?rgFooterCenter',
|
|
29
|
-
right: '?rgFooterRight'
|
|
30
|
-
});
|
|
31
|
-
_defineProperty(rgFooterComponent, "template", `<footer ng-class=":: $ctrl.styles.footer" data-test="ring-footer">
|
|
21
|
+
styles = modules_7385b3fd;
|
|
22
|
+
static transclude = {
|
|
23
|
+
left: '?rgFooterLeft',
|
|
24
|
+
center: '?rgFooterCenter',
|
|
25
|
+
right: '?rgFooterRight'
|
|
26
|
+
};
|
|
27
|
+
static template = `<footer ng-class=":: $ctrl.styles.footer" data-test="ring-footer">
|
|
32
28
|
<div ng-class=":: $ctrl.styles.columnLeft">
|
|
33
29
|
<div ng-transclude="left" ng-class=":: $ctrl.styles.columnItem"></div>
|
|
34
30
|
</div>
|
|
@@ -40,20 +36,22 @@ _defineProperty(rgFooterComponent, "template", `<footer ng-class=":: $ctrl.style
|
|
|
40
36
|
<div ng-class=":: $ctrl.styles.columnRight">
|
|
41
37
|
<div ng-transclude="right" ng-class=":: $ctrl.styles.columnItem"></div>
|
|
42
38
|
</div>
|
|
43
|
-
</footer
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
</footer>`;
|
|
40
|
+
}
|
|
41
|
+
class rgFooterLineComponent extends RingAngularComponent {
|
|
42
|
+
static transclude = true;
|
|
43
|
+
static template = `<div class="${modules_7385b3fd.line}" ng-transclude></div>`;
|
|
44
|
+
}
|
|
47
45
|
class rgFooterCopyrightComponent extends RingAngularComponent {
|
|
46
|
+
static template = '<span>{{:: $ctrl.copyrightYears}} {{:: $ctrl.companyName}}</span>';
|
|
47
|
+
static bindings = {
|
|
48
|
+
year: '@',
|
|
49
|
+
companyName: '@'
|
|
50
|
+
};
|
|
48
51
|
$onInit() {
|
|
49
52
|
this.copyrightYears = copyright(this.year);
|
|
50
53
|
}
|
|
51
54
|
}
|
|
52
|
-
_defineProperty(rgFooterCopyrightComponent, "template", '<span>{{:: $ctrl.copyrightYears}} {{:: $ctrl.companyName}}</span>');
|
|
53
|
-
_defineProperty(rgFooterCopyrightComponent, "bindings", {
|
|
54
|
-
year: '@',
|
|
55
|
-
companyName: '@'
|
|
56
|
-
});
|
|
57
55
|
angularModule.component('rgFooter', rgFooterComponent);
|
|
58
56
|
angularModule.component('rgFooterLine', rgFooterLineComponent);
|
|
59
57
|
angularModule.component('rgFooterCopyright', rgFooterCopyrightComponent);
|