@jetbrains/ring-ui 4.2.4 → 4.2.7
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/dialog/dialog.js +4 -2
- package/components/list/list.js +20 -11
- package/components/table/row.js +12 -7
- package/components/table/table.examples.js +1 -0
- package/components/table/table.js +3 -1
- package/package.json +2 -2
- package/dist/_helpers/_rollupPluginBabelHelpers.js +0 -34
- package/dist/_helpers/anchor.js +0 -33
- package/dist/_helpers/badge.js +0 -3
- package/dist/_helpers/button-group.js +0 -3
- package/dist/_helpers/button-set.js +0 -3
- package/dist/_helpers/button-toolbar.js +0 -3
- package/dist/_helpers/button__classes.js +0 -39
- package/dist/_helpers/card.js +0 -75
- package/dist/_helpers/checkbox.js +0 -3
- package/dist/_helpers/date-picker.js +0 -3
- package/dist/_helpers/dialog__body-scroll-preventer.js +0 -58
- package/dist/_helpers/error-message.js +0 -3
- package/dist/_helpers/footer.js +0 -121
- package/dist/_helpers/grid.js +0 -3
- package/dist/_helpers/group.js +0 -3
- package/dist/_helpers/header.js +0 -3
- package/dist/_helpers/icon.js +0 -3
- package/dist/_helpers/inject-styles.js +0 -22
- package/dist/_helpers/input.js +0 -3
- package/dist/_helpers/island.js +0 -3
- package/dist/_helpers/link.js +0 -3
- package/dist/_helpers/list.js +0 -3
- package/dist/_helpers/loader-screen.js +0 -3
- package/dist/_helpers/panel.js +0 -3
- package/dist/_helpers/query-assist__suggestions.js +0 -95
- package/dist/_helpers/radio.js +0 -3
- package/dist/_helpers/select__filter.js +0 -77
- package/dist/_helpers/services-link.js +0 -40
- package/dist/_helpers/sidebar.js +0 -126
- package/dist/_helpers/table.js +0 -3
- package/dist/_helpers/tabs.js +0 -3
- package/dist/_helpers/title.js +0 -100
- package/dist/alert/alert.js +0 -262
- package/dist/alert/container.js +0 -48
- package/dist/alert-service/alert-service.js +0 -173
- package/dist/analytics/analytics.js +0 -118
- package/dist/analytics/analytics__custom-plugin.js +0 -128
- package/dist/analytics/analytics__fus-plugin.js +0 -102
- package/dist/analytics/analytics__ga-plugin.js +0 -75
- package/dist/analytics/analytics__plugin-utils.js +0 -80
- package/dist/analytics-ng/analytics-ng.js +0 -95
- package/dist/auth/auth.js +0 -96
- package/dist/auth/auth__core.js +0 -1059
- package/dist/auth/background-flow.js +0 -123
- package/dist/auth/down-notification.js +0 -117
- package/dist/auth/iframe-flow.js +0 -153
- package/dist/auth/landing-entry.js +0 -5
- package/dist/auth/landing.js +0 -90
- package/dist/auth/request-builder.js +0 -76
- package/dist/auth/response-parser.js +0 -118
- package/dist/auth/storage.js +0 -283
- package/dist/auth/token-validator.js +0 -178
- package/dist/auth/window-flow.js +0 -134
- package/dist/auth-dialog/auth-dialog.js +0 -180
- package/dist/auth-dialog-service/auth-dialog-service.js +0 -71
- package/dist/auth-ng/auth-ng.js +0 -206
- package/dist/auth-ng/auth-ng.mock.js +0 -33
- package/dist/autofocus-ng/autofocus-ng.js +0 -51
- package/dist/avatar/avatar-example-datauri.js +0 -4
- package/dist/avatar/avatar.js +0 -163
- package/dist/avatar/fallback-avatar.js +0 -142
- package/dist/avatar-editor-ng/avatar-editor-ng.js +0 -167
- package/dist/avatar-editor-ng/avatar-editor-ng__template.js +0 -3
- package/dist/avatar-ng/avatar-ng.js +0 -21
- package/dist/badge/badge.js +0 -51
- package/dist/badge-ng/badge-ng.js +0 -18
- package/dist/breadcrumb-ng/breadcrumb-ng.js +0 -37
- package/dist/button/button.js +0 -125
- package/dist/button/button__classes.js +0 -5
- package/dist/button-group/button-group.js +0 -30
- package/dist/button-group/caption.js +0 -24
- package/dist/button-group-ng/button-group-ng.js +0 -39
- package/dist/button-ng/button-ng.js +0 -217
- package/dist/button-set/button-set.js +0 -26
- package/dist/button-set-ng/button-set-ng.js +0 -19
- package/dist/button-toolbar/button-toolbar.js +0 -29
- package/dist/button-toolbar-ng/button-toolbar-ng.js +0 -24
- package/dist/caret/caret.js +0 -266
- package/dist/checkbox/checkbox.js +0 -110
- package/dist/checkbox-ng/checkbox-ng.js +0 -38
- package/dist/code/code.js +0 -137
- package/dist/compiler-ng/compiler-ng.js +0 -53
- package/dist/confirm/confirm.js +0 -127
- package/dist/confirm-ng/confirm-ng.js +0 -69
- package/dist/confirm-service/confirm-service.js +0 -117
- package/dist/content-layout/content-layout.js +0 -66
- package/dist/content-layout/sidebar.js +0 -7
- package/dist/contenteditable/contenteditable.js +0 -78
- package/dist/data-list/data-list.js +0 -208
- package/dist/data-list/data-list.mock.js +0 -191
- package/dist/data-list/item.js +0 -229
- package/dist/data-list/selection.js +0 -102
- package/dist/data-list/title.js +0 -20
- package/dist/data-list-ng/data-list-ng.js +0 -62
- package/dist/date-picker/consts.js +0 -69
- package/dist/date-picker/date-input.js +0 -175
- package/dist/date-picker/date-picker.js +0 -367
- package/dist/date-picker/date-popup.js +0 -483
- package/dist/date-picker/day.js +0 -120
- package/dist/date-picker/formats.js +0 -3
- package/dist/date-picker/month-names.js +0 -100
- package/dist/date-picker/month-slider.js +0 -84
- package/dist/date-picker/month.js +0 -55
- package/dist/date-picker/months.js +0 -122
- package/dist/date-picker/weekdays.js +0 -32
- package/dist/date-picker/years.js +0 -110
- package/dist/dialog/dialog.js +0 -202
- package/dist/dialog/dialog__body-scroll-preventer.js +0 -3
- package/dist/dialog-ng/dialog-ng.js +0 -604
- package/dist/dialog-ng/dialog-ng__template.js +0 -3
- package/dist/docked-panel-ng/docked-panel-ng.js +0 -171
- package/dist/dropdown/anchor.js +0 -19
- package/dist/dropdown/dropdown.js +0 -236
- package/dist/dropdown-menu/dropdown-menu.js +0 -177
- package/dist/error-bubble/error-bubble.js +0 -59
- package/dist/error-message/error-message.js +0 -57
- package/dist/error-message-ng/error-message-ng.js +0 -35
- package/dist/footer/footer.js +0 -12
- package/dist/footer-ng/footer-ng.js +0 -64
- package/dist/form-ng/form-ng.js +0 -167
- package/dist/global/angular-component-factory.js +0 -84
- package/dist/global/compose.js +0 -9
- package/dist/global/composeRefs.js +0 -15
- package/dist/global/conic-gradient.js +0 -35
- package/dist/global/create-stateful-context.js +0 -55
- package/dist/global/data-tests.js +0 -24
- package/dist/global/dom.js +0 -125
- package/dist/global/focus-sensor-hoc.js +0 -146
- package/dist/global/fuzzy-highlight.js +0 -67
- package/dist/global/get-event-key.js +0 -111
- package/dist/global/get-uid.js +0 -15
- package/dist/global/inject-styles.js +0 -15
- package/dist/global/linear-function.js +0 -17
- package/dist/global/listeners.js +0 -44
- package/dist/global/memoize.js +0 -20
- package/dist/global/normalize-indent.js +0 -30
- package/dist/global/promise-with-timeout.js +0 -17
- package/dist/global/radial-gradient-mask.js +0 -38
- package/dist/global/react-dom-renderer.js +0 -46
- package/dist/global/react-render-adapter.js +0 -41
- package/dist/global/rerender-hoc.js +0 -55
- package/dist/global/ring-angular-component.js +0 -24
- package/dist/global/schedule-raf.js +0 -31
- package/dist/global/sniffer.js +0 -6
- package/dist/global/supports-css.js +0 -22
- package/dist/global/theme.js +0 -54
- package/dist/global/trivial-template-tag.js +0 -17
- package/dist/global/url.js +0 -165
- package/dist/global/variables_dark.js +0 -57
- package/dist/grid/col.js +0 -60
- package/dist/grid/grid.js +0 -33
- package/dist/grid/row.js +0 -64
- package/dist/group/group.js +0 -31
- package/dist/group-ng/group-ng.js +0 -11
- package/dist/header/header.js +0 -150
- package/dist/header/logo.js +0 -40
- package/dist/header/profile.js +0 -219
- package/dist/header/services-link.js +0 -12
- package/dist/header/services.js +0 -138
- package/dist/header/smart-profile.js +0 -233
- package/dist/header/smart-services.js +0 -163
- package/dist/header/tray-icon.js +0 -47
- package/dist/header/tray.js +0 -31
- package/dist/heading/heading.js +0 -73
- package/dist/http/http.js +0 -218
- package/dist/http/http.mock.js +0 -67
- package/dist/hub-source/hub-source.js +0 -130
- package/dist/hub-source/hub-source__user.js +0 -30
- package/dist/hub-source/hub-source__users-groups.js +0 -63
- package/dist/icon/icon.js +0 -105
- package/dist/icon/icon__constants.js +0 -33
- package/dist/icon/icon__svg.js +0 -83
- package/dist/icon/index.js +0 -12
- package/dist/icon-ng/icon-ng.js +0 -91
- package/dist/input/input.js +0 -230
- package/dist/input-ng/input-ng.js +0 -111
- package/dist/island/adaptive-island-hoc.js +0 -48
- package/dist/island/content.js +0 -160
- package/dist/island/header.js +0 -84
- package/dist/island/island.js +0 -51
- package/dist/island-legacy/content-legacy.js +0 -26
- package/dist/island-legacy/header-legacy.js +0 -28
- package/dist/island-legacy/island-legacy.js +0 -28
- package/dist/island-ng/island-content-ng.js +0 -42
- package/dist/island-ng/island-header-ng.js +0 -26
- package/dist/island-ng/island-ng-class-fixer.js +0 -11
- package/dist/island-ng/island-ng.js +0 -25
- package/dist/link/clickableLink.js +0 -64
- package/dist/link/link.js +0 -115
- package/dist/link-ng/link-ng.js +0 -22
- package/dist/list/consts.js +0 -26
- package/dist/list/list.js +0 -818
- package/dist/list/list__custom.js +0 -86
- package/dist/list/list__hint.js +0 -26
- package/dist/list/list__item.js +0 -206
- package/dist/list/list__link.js +0 -65
- package/dist/list/list__separator.js +0 -30
- package/dist/list/list__title.js +0 -39
- package/dist/list/list__users-groups-source.js +0 -130
- package/dist/loader/loader.js +0 -71
- package/dist/loader/loader__core.js +0 -273
- package/dist/loader-inline/inject-styles.js +0 -13
- package/dist/loader-inline/loader-inline.js +0 -58
- package/dist/loader-inline-ng/loader-inline-ng.js +0 -44
- package/dist/loader-ng/loader-ng.js +0 -44
- package/dist/loader-screen/loader-screen.js +0 -44
- package/dist/loader-screen-ng/loader-screen-ng.js +0 -95
- package/dist/login-dialog/login-dialog.js +0 -188
- package/dist/login-dialog/service.js +0 -72
- package/dist/markdown/code.js +0 -31
- package/dist/markdown/heading.js +0 -23
- package/dist/markdown/link.js +0 -31
- package/dist/markdown/markdown.js +0 -74
- package/dist/message/message.js +0 -235
- package/dist/message-bundle-ng/message-bundle-ng.js +0 -111
- package/dist/old-browsers-message/old-browsers-message.js +0 -101
- package/dist/old-browsers-message/old-browsers-message__stop.js +0 -5
- package/dist/old-browsers-message/white-list.js +0 -34
- package/dist/pager/pager.js +0 -365
- package/dist/pager-ng/pager-ng.js +0 -100
- package/dist/panel/panel.js +0 -31
- package/dist/panel-ng/panel-ng.js +0 -17
- package/dist/permissions/permissions.js +0 -200
- package/dist/permissions/permissions__cache.js +0 -272
- package/dist/permissions-ng/permissions-ng.js +0 -277
- package/dist/place-under-ng/place-under-ng.js +0 -158
- package/dist/popup/popup.consts.js +0 -41
- package/dist/popup/popup.js +0 -396
- package/dist/popup/popup.target.js +0 -26
- package/dist/popup/position.js +0 -280
- package/dist/popup-menu/popup-menu.js +0 -117
- package/dist/progress-bar/progress-bar.js +0 -114
- package/dist/progress-bar-ng/progress-bar-ng.js +0 -17
- package/dist/promised-click-ng/promised-click-ng.js +0 -128
- package/dist/proxy-attrs/proxy-attrs.js +0 -21
- package/dist/query-assist/query-assist.js +0 -1096
- package/dist/query-assist/query-assist__suggestions.js +0 -49
- package/dist/query-assist-ng/query-assist-ng.js +0 -86
- package/dist/radio/radio.js +0 -42
- package/dist/radio/radio__item.js +0 -78
- package/dist/radio-ng/radio-ng.js +0 -47
- package/dist/save-field-ng/save-field-ng.js +0 -337
- package/dist/save-field-ng/save-field-ng__template.js +0 -3
- package/dist/select/select.js +0 -1357
- package/dist/select/select__filter.js +0 -56
- package/dist/select/select__popup.js +0 -553
- package/dist/select-ng/select-ng.js +0 -637
- package/dist/select-ng/select-ng__lazy.js +0 -169
- package/dist/select-ng/select-ng__options.js +0 -145
- package/dist/shortcuts/core.js +0 -245
- package/dist/shortcuts/shortcut-title.js +0 -51
- package/dist/shortcuts/shortcuts-hoc.js +0 -42
- package/dist/shortcuts/shortcuts.js +0 -72
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng.js +0 -123
- package/dist/shortcuts-hint-ng/shortcuts-hint-ng__template.js +0 -3
- package/dist/shortcuts-ng/shortcuts-ng.js +0 -262
- package/dist/sidebar-ng/sidebar-ng.js +0 -113
- package/dist/sidebar-ng/sidebar-ng__button-template.js +0 -3
- package/dist/sidebar-ng/sidebar-ng__template.js +0 -3
- package/dist/storage/storage.js +0 -59
- package/dist/storage/storage__fallback.js +0 -215
- package/dist/storage/storage__local.js +0 -154
- package/dist/style.css +0 -1
- package/dist/tab-trap/tab-trap.js +0 -177
- package/dist/table/cell.js +0 -26
- package/dist/table/disable-hover-hoc.js +0 -54
- package/dist/table/header-cell.js +0 -92
- package/dist/table/header.js +0 -193
- package/dist/table/multitable.js +0 -141
- package/dist/table/row-with-focus-sensor.js +0 -83
- package/dist/table/row.js +0 -273
- package/dist/table/selection-adapter.js +0 -16
- package/dist/table/selection-shortcuts-hoc.js +0 -215
- package/dist/table/selection.js +0 -223
- package/dist/table/smart-table.js +0 -125
- package/dist/table/table.js +0 -406
- package/dist/table-legacy-ng/table-legacy-ng.js +0 -468
- package/dist/table-legacy-ng/table-legacy-ng__pager.js +0 -120
- package/dist/table-legacy-ng/table-legacy-ng__selection-navigate-actions.js +0 -123
- package/dist/table-legacy-ng/table-legacy-ng__selection.js +0 -179
- package/dist/table-legacy-ng/table-legacy-ng__toolbar.js +0 -57
- package/dist/table-ng/smart-table-ng.js +0 -68
- package/dist/table-ng/table-ng.js +0 -67
- package/dist/tabs/collapsible-more.js +0 -198
- package/dist/tabs/collapsible-tab.js +0 -91
- package/dist/tabs/collapsible-tabs.js +0 -362
- package/dist/tabs/custom-item.js +0 -13
- package/dist/tabs/dumb-tabs.js +0 -164
- package/dist/tabs/smart-tabs.js +0 -106
- package/dist/tabs/tab-link.js +0 -42
- package/dist/tabs/tab.js +0 -33
- package/dist/tabs/tabs.js +0 -71
- package/dist/tabs-ng/tabs-ng.js +0 -194
- package/dist/tabs-ng/tabs-ng__template.js +0 -3
- package/dist/tag/tag.js +0 -197
- package/dist/tags-input/tags-input.js +0 -482
- package/dist/tags-input-ng/tags-input-ng.js +0 -93
- package/dist/tags-list/tags-list.js +0 -95
- package/dist/template-ng/template-ng.js +0 -71
- package/dist/text/text.js +0 -36
- package/dist/theme-ng/theme-ng.js +0 -45
- package/dist/title-ng/title-ng.js +0 -114
- package/dist/toggle/toggle.js +0 -78
- package/dist/toggle-ng/toggle-ng.js +0 -18
- package/dist/tooltip/tooltip.js +0 -209
- package/dist/tooltip-ng/tooltip-ng.js +0 -104
- package/dist/user-agreement/service.js +0 -412
- package/dist/user-agreement/toolbox.eula.js +0 -3
- package/dist/user-agreement/user-agreement.js +0 -169
- package/dist/user-card/card.js +0 -19
- package/dist/user-card/smart-user-card-tooltip.js +0 -114
- package/dist/user-card/tooltip.js +0 -95
- package/dist/user-card/user-card.js +0 -51
- package/dist/user-card-ng/user-card-ng.js +0 -62
|
@@ -1,604 +0,0 @@
|
|
|
1
|
-
import { _ as _defineProperty } from '../_helpers/_rollupPluginBabelHelpers.js';
|
|
2
|
-
import 'core-js/modules/web.dom-collections.iterator.js';
|
|
3
|
-
import 'core-js/modules/es.promise.finally.js';
|
|
4
|
-
import angular from 'angular';
|
|
5
|
-
import { createFocusTrap } from 'focus-trap';
|
|
6
|
-
import { getStyles, getRect } from '../global/dom.js';
|
|
7
|
-
import RingAngularComponent from '../global/ring-angular-component.js';
|
|
8
|
-
import shortcutsInstance from '../shortcuts/core.js';
|
|
9
|
-
import ButtonNG from '../button-ng/button-ng.js';
|
|
10
|
-
import PromisedClick from '../promised-click-ng/promised-click-ng.js';
|
|
11
|
-
import rgCompilerModuleName from '../compiler-ng/compiler-ng.js';
|
|
12
|
-
import { m as modules_5e9b8c03, p as preventerFactory } from '../_helpers/dialog__body-scroll-preventer.js';
|
|
13
|
-
import { m as modules_e6a056e1 } from '../_helpers/island.js';
|
|
14
|
-
import dialogTemplate from './dialog-ng__template.js';
|
|
15
|
-
import 'combokeys';
|
|
16
|
-
import '../global/sniffer.js';
|
|
17
|
-
import 'sniffr';
|
|
18
|
-
import 'classnames';
|
|
19
|
-
import '../icon-ng/icon-ng.js';
|
|
20
|
-
import 'core-js/modules/es.string.replace.js';
|
|
21
|
-
import '../icon/icon__constants.js';
|
|
22
|
-
import '../template-ng/template-ng.js';
|
|
23
|
-
import '../_helpers/icon.js';
|
|
24
|
-
import '../global/theme.js';
|
|
25
|
-
import 'react';
|
|
26
|
-
import '../_helpers/button__classes.js';
|
|
27
|
-
import 'scrollbar-width';
|
|
28
|
-
|
|
29
|
-
var modules_b378ce5a = {"unit":"8px","dialogContainer":"dialogContainer_rui_0b63","wide":"wide_rui_0b63","autoWidth":"autoWidth_rui_0b63","header":"header_rui_0b63","inSidebar":"inSidebar_rui_0b63","scrollableWrapper":"scrollableWrapper_rui_0b63","content":"content_rui_0b63","error":"error_rui_0b63","footer":"footer_rui_0b63","footerDescription":"footerDescription_rui_0b63","footerItems":"footerItems_rui_0b63","footerItem":"footerItem_rui_0b63"};
|
|
30
|
-
|
|
31
|
-
rgDialogContentDirective.$inject = ["$compile", "$q"];
|
|
32
|
-
rgDialogDirective.$inject = ["$timeout"];
|
|
33
|
-
/**
|
|
34
|
-
* @name Dialog Ng
|
|
35
|
-
*/
|
|
36
|
-
|
|
37
|
-
const angularModule = angular.module('Ring.dialog', [ButtonNG, PromisedClick, rgCompilerModuleName]);
|
|
38
|
-
|
|
39
|
-
class DialogController extends RingAngularComponent {
|
|
40
|
-
constructor() {
|
|
41
|
-
super(...arguments);
|
|
42
|
-
|
|
43
|
-
_defineProperty(this, "hide", () => {
|
|
44
|
-
if (!this.inSidebar) {
|
|
45
|
-
this.scrollPreventer.reset();
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
this.active = false;
|
|
49
|
-
this.content = '';
|
|
50
|
-
this.focusTrap.deactivate();
|
|
51
|
-
Reflect.deleteProperty(this, 'DIALOG_NAMESPACE');
|
|
52
|
-
|
|
53
|
-
if (shortcutsInstance.indexOfScope(this.dialogService.DIALOG_NAMESPACE) > -1) {
|
|
54
|
-
shortcutsInstance.setScope(this.currentShortcutsScope);
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
this._resetFormState();
|
|
58
|
-
|
|
59
|
-
this.$inject.$scope.$broadcast('dialog.hide');
|
|
60
|
-
});
|
|
61
|
-
|
|
62
|
-
_defineProperty(this, "serverErrorFields", []);
|
|
63
|
-
|
|
64
|
-
this.styles = modules_b378ce5a;
|
|
65
|
-
this.dialogStyles = modules_5e9b8c03;
|
|
66
|
-
this.islandStyles = modules_e6a056e1;
|
|
67
|
-
this.scrollPreventer = preventerFactory();
|
|
68
|
-
this.$inject.$q((resolve, reject) => {
|
|
69
|
-
this.resolve = resolve;
|
|
70
|
-
this.reject = reject;
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
$onInit() {
|
|
75
|
-
const {
|
|
76
|
-
dialog,
|
|
77
|
-
dialogInSidebar,
|
|
78
|
-
$scope
|
|
79
|
-
} = this.$inject;
|
|
80
|
-
const dialogService = this.inSidebar ? dialogInSidebar : dialog;
|
|
81
|
-
this.focusTrap = createFocusTrap(this.$inject.$element[0], {
|
|
82
|
-
fallbackFocus: '[data-anchor="focus-trap-fallback"]',
|
|
83
|
-
escapeDeactivates: false
|
|
84
|
-
});
|
|
85
|
-
this.dialogService = dialogService;
|
|
86
|
-
this.previousBodyWidth = null;
|
|
87
|
-
$scope.$on('$routeChangeSuccess', this.hide);
|
|
88
|
-
$scope.$on('$routeUpdate', this.hide);
|
|
89
|
-
$scope.$on('$destroy', dialogService.unregister);
|
|
90
|
-
$scope.$watch(() => this.active, () => {
|
|
91
|
-
if (this.active) {
|
|
92
|
-
shortcutsInstance.bindMap(this.getShortcuts(), {
|
|
93
|
-
scope: this.DIALOG_NAMESPACE
|
|
94
|
-
});
|
|
95
|
-
} else {
|
|
96
|
-
this.reset();
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
dialogService.register(this);
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
getShortcuts() {
|
|
103
|
-
const defaultEscHandler = function escHandler() {
|
|
104
|
-
this.active = false;
|
|
105
|
-
this.focusTrap.deactivate();
|
|
106
|
-
this.$inject.$scope.$apply();
|
|
107
|
-
}.bind(this);
|
|
108
|
-
|
|
109
|
-
const dialogShortcuts = {
|
|
110
|
-
esc: defaultEscHandler,
|
|
111
|
-
enter: this.applyDefaultHandler(false),
|
|
112
|
-
'mod+enter': this.applyDefaultHandler(true)
|
|
113
|
-
};
|
|
114
|
-
angular.extend(dialogShortcuts, this.shortcuts);
|
|
115
|
-
|
|
116
|
-
if (this.shortcuts && this.shortcuts.esc) {
|
|
117
|
-
/**
|
|
118
|
-
* Merge ESC handler
|
|
119
|
-
* @type {Function} {dialogShortcuts.esc}
|
|
120
|
-
*/
|
|
121
|
-
const customHandler = dialogShortcuts.esc;
|
|
122
|
-
|
|
123
|
-
dialogShortcuts.esc = () => {
|
|
124
|
-
const result = customHandler();
|
|
125
|
-
defaultEscHandler();
|
|
126
|
-
return result;
|
|
127
|
-
};
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
return dialogShortcuts;
|
|
131
|
-
}
|
|
132
|
-
|
|
133
|
-
handleClick(event) {
|
|
134
|
-
const isOverlayClicked = event.target === event.currentTarget;
|
|
135
|
-
|
|
136
|
-
if (this.inSidebar || !this.closeOnClick || !isOverlayClicked) {
|
|
137
|
-
return;
|
|
138
|
-
}
|
|
139
|
-
|
|
140
|
-
this.hide();
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
setTitle(title) {
|
|
144
|
-
this.title = title;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
compileTemplate() {
|
|
148
|
-
if (this.config.data) {
|
|
149
|
-
const element = angular.element(this.template);
|
|
150
|
-
return {
|
|
151
|
-
element,
|
|
152
|
-
link: this.$inject.$compile(element)
|
|
153
|
-
};
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
return this.$inject.rgCompiler(this.config).catch(error => {
|
|
157
|
-
this.reject(error);
|
|
158
|
-
return this.$inject.$q.reject(error);
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
show(config) {
|
|
163
|
-
const {
|
|
164
|
-
$q,
|
|
165
|
-
$scope
|
|
166
|
-
} = this.$inject;
|
|
167
|
-
|
|
168
|
-
if (!this.inSidebar) {
|
|
169
|
-
this.scrollPreventer.prevent();
|
|
170
|
-
|
|
171
|
-
if (config && config.trapFocus === true) {
|
|
172
|
-
this.focusTrap.activate();
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
if (this.active) {
|
|
177
|
-
this.reset();
|
|
178
|
-
} // Clear dialog errors
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
this.error = null;
|
|
182
|
-
|
|
183
|
-
if (this.dialogForm) {
|
|
184
|
-
this.dialogForm.$setPristine();
|
|
185
|
-
}
|
|
186
|
-
|
|
187
|
-
if (config) {
|
|
188
|
-
this.title = config.title;
|
|
189
|
-
this.buttons = config.buttons;
|
|
190
|
-
this.data = config.data || {};
|
|
191
|
-
this.wideDialog = config.wideDialog;
|
|
192
|
-
this.autoWidth = config.autoWidth;
|
|
193
|
-
this.scrollableWrapperClassName = config.scrollableWrapperClassName;
|
|
194
|
-
this.cssClass = config.cssClass || '';
|
|
195
|
-
this.shortcuts = config.shortcuts;
|
|
196
|
-
this.content = config.content;
|
|
197
|
-
this.template = config.template;
|
|
198
|
-
this.config = config;
|
|
199
|
-
this.description = config.description && config.description.split('\n') || [];
|
|
200
|
-
this.closeOnClick = config.closeOnClick; // Backward compatibility with existing templates which use data directly from scope
|
|
201
|
-
|
|
202
|
-
$scope.data = this.data;
|
|
203
|
-
}
|
|
204
|
-
|
|
205
|
-
this.currentShortcutsScope = shortcutsInstance.getScope();
|
|
206
|
-
this.DIALOG_NAMESPACE = this.dialogService.DIALOG_NAMESPACE;
|
|
207
|
-
shortcutsInstance.setScope(this.dialogService.DIALOG_NAMESPACE);
|
|
208
|
-
this.active = true;
|
|
209
|
-
$scope.$broadcast('dialog.show');
|
|
210
|
-
return $q((resolve, reject) => {
|
|
211
|
-
this.resolve = resolve;
|
|
212
|
-
this.reject = reject;
|
|
213
|
-
});
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
update() {
|
|
217
|
-
let config = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
218
|
-
Object.assign(this.data, config.data);
|
|
219
|
-
Object.assign(this.buttons, config.buttons);
|
|
220
|
-
}
|
|
221
|
-
|
|
222
|
-
_resetFormState() {
|
|
223
|
-
const dialogForm = this.dialogForm;
|
|
224
|
-
|
|
225
|
-
if (!dialogForm) {
|
|
226
|
-
return;
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
dialogForm.$setPristine();
|
|
230
|
-
dialogForm.$setUntouched();
|
|
231
|
-
dialogForm.$valid = true;
|
|
232
|
-
dialogForm.$invalid = false;
|
|
233
|
-
dialogForm.$error = {};
|
|
234
|
-
}
|
|
235
|
-
|
|
236
|
-
done(result) {
|
|
237
|
-
this.resetPosition();
|
|
238
|
-
this.resolve(result);
|
|
239
|
-
this.hide();
|
|
240
|
-
}
|
|
241
|
-
|
|
242
|
-
reset(result) {
|
|
243
|
-
this.done(result);
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
getErrorMessage(errorResponse) {
|
|
247
|
-
var _errorResponse$data, _errorResponse$data2;
|
|
248
|
-
|
|
249
|
-
if (errorResponse !== null && errorResponse !== void 0 && (_errorResponse$data = errorResponse.data) !== null && _errorResponse$data !== void 0 && _errorResponse$data.error_description) {
|
|
250
|
-
return errorResponse.data.error_description;
|
|
251
|
-
}
|
|
252
|
-
|
|
253
|
-
if (errorResponse !== null && errorResponse !== void 0 && (_errorResponse$data2 = errorResponse.data) !== null && _errorResponse$data2 !== void 0 && _errorResponse$data2.error) {
|
|
254
|
-
return errorResponse.data.error;
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
return errorResponse;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
getFieldErrorMessage(errorResponse) {
|
|
261
|
-
if (errorResponse && errorResponse.data && errorResponse.data.error) {
|
|
262
|
-
return errorResponse.data.error;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
return null;
|
|
266
|
-
}
|
|
267
|
-
|
|
268
|
-
action(button) {
|
|
269
|
-
if (button.inProgress) {
|
|
270
|
-
return undefined;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
const errorReporter = errorResponse => {
|
|
274
|
-
const errorField = errorResponse && errorResponse.data && errorResponse.data.error_field;
|
|
275
|
-
|
|
276
|
-
if (errorField && this.dialogForm[errorField]) {
|
|
277
|
-
this.dialogForm[errorField].$invalid = true;
|
|
278
|
-
this.dialogForm[errorField].$error[errorField] = [{
|
|
279
|
-
message: this.getFieldErrorMessage(errorResponse)
|
|
280
|
-
}];
|
|
281
|
-
this.serverErrorFields.push(errorField);
|
|
282
|
-
} else {
|
|
283
|
-
this.error = this.$inject.$sce.trustAsHtml(this.getErrorMessage(errorResponse));
|
|
284
|
-
}
|
|
285
|
-
};
|
|
286
|
-
|
|
287
|
-
if (button.action) {
|
|
288
|
-
if (!button.keepServerErrors) {
|
|
289
|
-
this.serverErrorFields.forEach(errorField => {
|
|
290
|
-
this.dialogForm[errorField].$invalid = false;
|
|
291
|
-
this.dialogForm[errorField].$error = {};
|
|
292
|
-
});
|
|
293
|
-
this.serverErrorFields = [];
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
const actionResult = button.action(this.data, button, errorReporter, this.dialogForm, this.buttons);
|
|
297
|
-
button.inProgress = true;
|
|
298
|
-
return this.$inject.$q.resolve(actionResult).then(res => {
|
|
299
|
-
const dontClose = res === false;
|
|
300
|
-
|
|
301
|
-
if (!dontClose && button.close !== false) {
|
|
302
|
-
this.done(res);
|
|
303
|
-
}
|
|
304
|
-
}).catch(errorReporter).finally(() => {
|
|
305
|
-
button.inProgress = false;
|
|
306
|
-
});
|
|
307
|
-
} else if (button.close !== false) {
|
|
308
|
-
this.reset(false);
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
return undefined;
|
|
312
|
-
}
|
|
313
|
-
|
|
314
|
-
applyDefaultHandler(isTextAreaShortcut) {
|
|
315
|
-
return event => {
|
|
316
|
-
if (event.target.matches('textarea') !== isTextAreaShortcut || event.target.matches('button')) {
|
|
317
|
-
return;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
event.stopPropagation();
|
|
321
|
-
event.preventDefault();
|
|
322
|
-
|
|
323
|
-
if (this.dialogForm.$valid && this.buttons) {
|
|
324
|
-
for (const button of this.buttons) {
|
|
325
|
-
if (button.default && !button.hidden && !button.disabled) {
|
|
326
|
-
this.action(button);
|
|
327
|
-
this.$inject.$scope.$apply();
|
|
328
|
-
return;
|
|
329
|
-
}
|
|
330
|
-
}
|
|
331
|
-
}
|
|
332
|
-
};
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
DialogController.$inject = [];
|
|
338
|
-
|
|
339
|
-
_defineProperty(DialogController, "$inject", ['$scope', '$q', 'dialog', '$element', 'dialogInSidebar', '$compile', '$injector', '$controller', 'rgCompiler', '$sce']);
|
|
340
|
-
|
|
341
|
-
class DialogService extends RingAngularComponent {
|
|
342
|
-
constructor() {
|
|
343
|
-
super(...arguments); // Binding proxy methods to a service instance
|
|
344
|
-
|
|
345
|
-
_defineProperty(this, "DIALOG_NAMESPACE", 'ring-dialog');
|
|
346
|
-
|
|
347
|
-
_defineProperty(this, "fallbackDialog", null);
|
|
348
|
-
|
|
349
|
-
_defineProperty(this, "unregister", () => {
|
|
350
|
-
Reflect.deleteProperty(this, 'ctrl');
|
|
351
|
-
});
|
|
352
|
-
|
|
353
|
-
['show', 'hide', 'update', 'done', 'reset'].forEach(key => {
|
|
354
|
-
this[key] = function methodWrapper() {
|
|
355
|
-
if (this.ctrl) {
|
|
356
|
-
return this.ctrl[key](...arguments);
|
|
357
|
-
} else if (this.fallbackDialog) {
|
|
358
|
-
return this.fallbackDialog[key](...arguments);
|
|
359
|
-
} else {
|
|
360
|
-
this.$inject.$log.error('No dialog directive is found');
|
|
361
|
-
return undefined;
|
|
362
|
-
}
|
|
363
|
-
}.bind(this);
|
|
364
|
-
});
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
register(ctrl) {
|
|
368
|
-
this.ctrl = ctrl;
|
|
369
|
-
}
|
|
370
|
-
|
|
371
|
-
}
|
|
372
|
-
|
|
373
|
-
DialogService.$inject = [];
|
|
374
|
-
|
|
375
|
-
_defineProperty(DialogService, "$inject", ['$log']);
|
|
376
|
-
|
|
377
|
-
class DialogInSidebarService extends DialogService {
|
|
378
|
-
constructor() {
|
|
379
|
-
super(...arguments);
|
|
380
|
-
|
|
381
|
-
_defineProperty(this, "DIALOG_NAMESPACE", 'ring-dialog-in-sidebar');
|
|
382
|
-
|
|
383
|
-
this.fallbackDialog = this.$inject.dialog;
|
|
384
|
-
}
|
|
385
|
-
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
DialogInSidebarService.$inject = [];
|
|
389
|
-
|
|
390
|
-
_defineProperty(DialogInSidebarService, "$inject", [...DialogService.$inject, 'dialog']);
|
|
391
|
-
|
|
392
|
-
function rgDialogDirective($timeout) {
|
|
393
|
-
function link(scope, iElement, iAttrs, dialogCtrl) {
|
|
394
|
-
const node = iElement[0];
|
|
395
|
-
const dialogContainer = node.querySelector('*[data-anchor=dialog-container]');
|
|
396
|
-
const dialogHeader = node.querySelector('*[data-anchor=dialog-header]');
|
|
397
|
-
const dialogCustomFooter = node.querySelector('*[data-anchor=dialog-custom-footer-container]'); // Left for backward compatibility with existing templates that use data directly from scope
|
|
398
|
-
|
|
399
|
-
scope.dialogForm = dialogCtrl.dialogForm;
|
|
400
|
-
|
|
401
|
-
function setPosition(top, left) {
|
|
402
|
-
Object.assign(dialogContainer.style, {
|
|
403
|
-
top: "".concat(top, "px"),
|
|
404
|
-
left: "".concat(left, "px")
|
|
405
|
-
});
|
|
406
|
-
} // Focus first input
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
function focusFirst() {
|
|
410
|
-
const controls = Array.from(node.querySelectorAll('input,select,button,textarea,*[contentEditable=true]')).filter(inputNode => getStyles(inputNode).display !== 'none');
|
|
411
|
-
|
|
412
|
-
if (controls.length) {
|
|
413
|
-
controls[0].focus();
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
|
|
417
|
-
function onMousemove(e) {
|
|
418
|
-
e.preventDefault();
|
|
419
|
-
const pageHeight = window.innerHeight;
|
|
420
|
-
const pageWidth = window.innerWidth;
|
|
421
|
-
const clearance = 10;
|
|
422
|
-
const maxTop = pageHeight - clearance;
|
|
423
|
-
const maxLeft = pageWidth - clearance;
|
|
424
|
-
const newTop = getRect(dialogHeader).top + e.movementY;
|
|
425
|
-
const newLeft = getRect(dialogHeader).left + e.movementX;
|
|
426
|
-
|
|
427
|
-
if (newTop > maxTop || newTop < clearance) {
|
|
428
|
-
return;
|
|
429
|
-
}
|
|
430
|
-
|
|
431
|
-
if (newLeft > maxLeft || newLeft < clearance) {
|
|
432
|
-
return;
|
|
433
|
-
}
|
|
434
|
-
|
|
435
|
-
const offsetY = parseFloat(dialogContainer.style.top) || 0;
|
|
436
|
-
const offsetX = parseFloat(dialogContainer.style.left) || 0;
|
|
437
|
-
setPosition(offsetY + e.movementY, offsetX + e.movementX);
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
function onMouseup() {
|
|
441
|
-
document.removeEventListener('mousemove', onMousemove);
|
|
442
|
-
document.removeEventListener('mouseup', onMouseup);
|
|
443
|
-
}
|
|
444
|
-
|
|
445
|
-
function onMousedown() {
|
|
446
|
-
if (!dialogCtrl.inSidebar) {
|
|
447
|
-
// Duct tape for all Ring 1.0 dropdown components inside
|
|
448
|
-
node.dispatchEvent(new CustomEvent('ring.popup-close'));
|
|
449
|
-
document.addEventListener('mousemove', onMousemove);
|
|
450
|
-
document.addEventListener('mouseup', onMouseup);
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
|
|
454
|
-
function onFocusin(e) {
|
|
455
|
-
if (!node.contains(e.target) && e.target.classList.contains('ring-popup')) {
|
|
456
|
-
e.preventDefault();
|
|
457
|
-
focusFirst();
|
|
458
|
-
}
|
|
459
|
-
}
|
|
460
|
-
|
|
461
|
-
function setCustomFooter(customFooterElem) {
|
|
462
|
-
const placeholder = angular.element(dialogCustomFooter);
|
|
463
|
-
const footer = angular.element("<div class=\"".concat(this.styles.footer, "\"></div>")).append(customFooterElem);
|
|
464
|
-
placeholder.empty();
|
|
465
|
-
placeholder.append(footer);
|
|
466
|
-
}
|
|
467
|
-
|
|
468
|
-
dialogCtrl.resetPosition = () => dialogContainer.removeAttribute('style');
|
|
469
|
-
|
|
470
|
-
dialogCtrl.setCustomFooter = setCustomFooter;
|
|
471
|
-
dialogHeader.addEventListener('mousedown', onMousedown);
|
|
472
|
-
document.addEventListener('focusin', onFocusin);
|
|
473
|
-
scope.$on('rgDialogContentLoaded', () => $timeout(focusFirst)); // Backward compatibility for youtrack (if they are using "content" property)
|
|
474
|
-
// which is actually ng-include with $includeContentLoaded event in the end
|
|
475
|
-
|
|
476
|
-
scope.$on('$includeContentLoaded', () => $timeout(focusFirst));
|
|
477
|
-
scope.$on('dialog.hide', () => {
|
|
478
|
-
angular.element(dialogCustomFooter).empty();
|
|
479
|
-
});
|
|
480
|
-
scope.$on('$destroy', () => {
|
|
481
|
-
dialogHeader.removeEventListener('mousedown', onMousedown);
|
|
482
|
-
document.removeEventListener('mousemove', onMousemove);
|
|
483
|
-
document.removeEventListener('mouseup', onMouseup);
|
|
484
|
-
document.removeEventListener('focusin', onFocusin);
|
|
485
|
-
window.removeEventListener('resize', setPosition);
|
|
486
|
-
});
|
|
487
|
-
}
|
|
488
|
-
|
|
489
|
-
return {
|
|
490
|
-
scope: {},
|
|
491
|
-
controller: DialogController,
|
|
492
|
-
bindToController: {
|
|
493
|
-
inSidebar: '@?',
|
|
494
|
-
active: '=?'
|
|
495
|
-
},
|
|
496
|
-
replace: true,
|
|
497
|
-
template: dialogTemplate,
|
|
498
|
-
controllerAs: 'dialog',
|
|
499
|
-
link
|
|
500
|
-
};
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
function rgDialogTitleDirective() {
|
|
504
|
-
function link(scope, iElement, iAttrs, dialogCtrl) {
|
|
505
|
-
dialogCtrl.setTitle(scope.title);
|
|
506
|
-
}
|
|
507
|
-
|
|
508
|
-
return {
|
|
509
|
-
scope: {
|
|
510
|
-
title: '@rgDialogTitle'
|
|
511
|
-
},
|
|
512
|
-
require: '^rgDialog',
|
|
513
|
-
link
|
|
514
|
-
};
|
|
515
|
-
}
|
|
516
|
-
|
|
517
|
-
function rgDialogFooterDirective() {
|
|
518
|
-
function link(scope, iElement, iAttrs, dialogCtrl, transclude) {
|
|
519
|
-
scope.$on('rgDialogContentLoaded', () => {
|
|
520
|
-
transclude(scope, clone => {
|
|
521
|
-
dialogCtrl.setCustomFooter(clone);
|
|
522
|
-
});
|
|
523
|
-
});
|
|
524
|
-
}
|
|
525
|
-
|
|
526
|
-
return {
|
|
527
|
-
require: '^rgDialog',
|
|
528
|
-
transclude: true,
|
|
529
|
-
link
|
|
530
|
-
};
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
function rgDialogContentDirective($compile, $q) {
|
|
534
|
-
return {
|
|
535
|
-
link: function link(scope, iElement) {
|
|
536
|
-
const element = iElement[0];
|
|
537
|
-
let contentScope;
|
|
538
|
-
|
|
539
|
-
function createIncludeNode() {
|
|
540
|
-
const node = document.createElement('ng-include');
|
|
541
|
-
node.setAttribute('src', 'dialog.content');
|
|
542
|
-
return node;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
function isOldDataAPI() {
|
|
546
|
-
return scope.dialog.config.data;
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
function compileContent() {
|
|
550
|
-
contentScope = scope.$new();
|
|
551
|
-
|
|
552
|
-
if (angular.isDefined(scope.dialog.content)) {
|
|
553
|
-
const templateNode = angular.element(createIncludeNode());
|
|
554
|
-
element.appendChild(templateNode[0]);
|
|
555
|
-
return $compile(templateNode)(contentScope)[0];
|
|
556
|
-
}
|
|
557
|
-
|
|
558
|
-
return $q.when(scope.dialog.compileTemplate()).then(compiledData => {
|
|
559
|
-
const templateScope = isOldDataAPI() ? contentScope : scope.dialog.config.scope || contentScope; // XXX(maksimrv): We should put element to directive
|
|
560
|
-
// before link because some directives (shortcuts)
|
|
561
|
-
// depends from global directives (shortcuts-app)
|
|
562
|
-
|
|
563
|
-
angular.element(element).append(compiledData.element);
|
|
564
|
-
compiledData.link(templateScope);
|
|
565
|
-
scope.$broadcast('rgDialogContentLoaded');
|
|
566
|
-
}).catch(angular.noop);
|
|
567
|
-
}
|
|
568
|
-
|
|
569
|
-
function destroy() {
|
|
570
|
-
function cleanupElement(_element) {
|
|
571
|
-
while (_element.childNodes.length) {
|
|
572
|
-
// XXX(maksimrv): We should use jQuery.remove method because
|
|
573
|
-
// AngularJS intercepts all jqLite/jQuery's DOM destruction apis and fires $destroy event
|
|
574
|
-
// on all DOM nodes being removed.
|
|
575
|
-
// This can be used to clean up bindings to the DOM
|
|
576
|
-
// element before it is removed.
|
|
577
|
-
angular.element(_element.childNodes[0]).remove();
|
|
578
|
-
}
|
|
579
|
-
}
|
|
580
|
-
|
|
581
|
-
if (contentScope) {
|
|
582
|
-
contentScope.$destroy();
|
|
583
|
-
cleanupElement(element);
|
|
584
|
-
}
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
scope.$on('dialog.hide', destroy);
|
|
588
|
-
scope.$on('dialog.show', () => {
|
|
589
|
-
destroy();
|
|
590
|
-
compileContent();
|
|
591
|
-
});
|
|
592
|
-
}
|
|
593
|
-
};
|
|
594
|
-
}
|
|
595
|
-
|
|
596
|
-
angularModule.directive('rgDialog', rgDialogDirective);
|
|
597
|
-
angularModule.directive('rgDialogTitle', rgDialogTitleDirective);
|
|
598
|
-
angularModule.directive('rgDialogFooter', rgDialogFooterDirective);
|
|
599
|
-
angularModule.directive('rgDialogContent', rgDialogContentDirective);
|
|
600
|
-
angularModule.service('dialog', DialogService);
|
|
601
|
-
angularModule.service('dialogInSidebar', DialogInSidebarService);
|
|
602
|
-
var DialogNg = angularModule.name;
|
|
603
|
-
|
|
604
|
-
export { DialogNg as default };
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
var dialogTemplate = "<div\n ng-show=\"dialog.active\"\n ng-class=\"[!dialog.inSidebar && dialog.dialogStyles.container]\"\n ng-click=\"dialog.handleClick($event)\"\n ng-attr-data-portaltarget=\"{{!dialog.inSidebar ? 'dialog-ng-popup-container' : null}}\"\n>\n <div ng-class=\"[dialog.dialogStyles.innerContainer]\">\n <div data-anchor=\"dialog-container\"\n ng-attr-data-in-sidebar=\"{{dialog.inSidebar ? 'true' : 'false'}}\"\n ng-attr-data-test=\"{{dialog.active ? 'ring-dialog' : null}}\"\n ng-class=\"[\n dialog.styles.dialogContainer,\n dialog.cssClass,\n dialog.wideDialog && dialog.styles.wide,\n dialog.autoWidth && dialog.styles.autoWidth,\n dialog.inSidebar && dialog.styles.inSidebar,\n !dialog.inSidebar && dialog.dialogStyles.content,\n !dialog.inSidebar && dialog.islandStyles.island\n ]\"\n >\n <div ng-class=\"[dialog.islandStyles.header, dialog.styles.header]\"\n data-anchor=\"dialog-header\"\n ng-show=\"dialog.title\">\n <span ng-class=\"dialog.islandStyles.title\">{{ dialog.title }}</span>\n </div>\n\n <div ng-class=\"[dialog.styles.scrollableWrapper, dialog.islandStyles.scrollableWrapper, dialog.scrollableWrapperClassName]\">\n <div ng-class=\"[dialog.styles.content, dialog.islandStyles.content]\">\n <form name=\"dialog.dialogForm\" class=\"ring-form ring-js-shortcuts\"\n novalidate>\n <rg-dialog-content></rg-dialog-content>\n\n <div class=\"ring-form__group\" ng-show=\"dialog.error\">\n <div ng-class=\"dialog.styles.error\" ng-bind-html=\"dialog.error\"></div>\n </div>\n </form>\n </div>\n </div>\n\n <div ng-class=\"dialog.styles.footer\"\n ng-if=\"dialog.description.length || dialog.buttons.length\">\n <div ng-class=\"dialog.styles.footerDescription\"\n ng-if=\"dialog.description && dialog.description.length\">\n <div ng-repeat=\"line in dialog.description\">{{ line }}</div>\n </div>\n\n <div ng-class=\"dialog.styles.footerItems\">\n <rg-button\n ng-repeat=\"button in dialog.buttons\"\n ng-class=\"[dialog.styles.footerItem , button.cssClasses]\"\n mode=\"{{button.default ? 'primary' : ''}}\"\n text=\"button.text\"\n ng-disabled=\"(button.default && dialog.dialogForm.$invalid) || button.disabled\"\n ng-if=\"!button.hidden\"\n data-test=\"dialog-footer-button\"\n\n rg-promised-click=\"dialog.action(button)\"\n promised-mode=\"loader\"\n >{{ button.label }}\n </rg-button>\n </div>\n </div>\n\n <div data-anchor=\"dialog-custom-footer-container\"></div>\n\n <div tabindex=\"-1\" ng-show=\"false\" data-anchor=\"focus-trap-fallback\"></div>\n </div>\n </div>\n</div>";
|
|
2
|
-
|
|
3
|
-
export { dialogTemplate as default };
|