@atlassian/aui 9.12.6 → 9.12.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/LICENSE +1 -1
- package/README.md +7 -9
- package/dist/aui/aui-css-deprecations.js.map +1 -1
- package/dist/aui/aui-prototyping-browserfocus.css +1 -1
- package/dist/aui/aui-prototyping-browserfocus.css.map +1 -1
- package/dist/aui/aui-prototyping-darkmode.css +1 -1
- package/dist/aui/aui-prototyping-darkmode.css.map +1 -1
- package/dist/aui/aui-prototyping-design-tokens-api-full.js +1 -1
- package/dist/aui/aui-prototyping-design-tokens-api-full.js.map +1 -1
- package/dist/aui/aui-prototyping-design-tokens-api.js +1 -1
- package/dist/aui/aui-prototyping-design-tokens-api.js.map +1 -1
- package/dist/aui/aui-prototyping-design-tokens-base-themes-css.css +2 -2
- package/dist/aui/aui-prototyping-design-tokens-base-themes-css.css.map +1 -1
- package/dist/aui/aui-prototyping-design-tokens-base-themes-css.js +1 -1
- package/dist/aui/aui-prototyping-design-tokens-base-themes.js +1 -1
- package/dist/aui/aui-prototyping-design-tokens-compatibility.css +1 -1
- package/dist/aui/aui-prototyping-design-tokens-compatibility.css.map +1 -1
- package/dist/aui/aui-prototyping.css +10 -10
- package/dist/aui/aui-prototyping.css.map +1 -1
- package/dist/aui/aui-prototyping.js +2 -2
- package/dist/aui/aui-prototyping.js.map +1 -1
- package/dist/aui/aui-prototyping.nodeps.css +10 -10
- package/dist/aui/aui-prototyping.nodeps.css.map +1 -1
- package/dist/aui/aui-prototyping.nodeps.js +2 -2
- package/dist/aui/aui-prototyping.nodeps.js.map +1 -1
- package/dist/aui/fonts/adgs-icons.eot +0 -0
- package/dist/aui/fonts/adgs-icons.ttf +0 -0
- package/dist/aui/fonts/adgs-icons.woff +0 -0
- package/entry/aui.batch.components.js +23 -23
- package/entry/aui.batch.page.js +3 -3
- package/entry/aui.batch.patterns.js +20 -20
- package/entry/aui.batch.prototyping.js +3 -11
- package/entry/aui.component.nav.js +1 -1
- package/entry/aui.component.progressbar.js +4 -1
- package/entry/aui.side-effects.js +2 -2
- package/entry/behaviours/aui.behaviour.format.js +1 -1
- package/entry/behaviours/aui.behaviour.i18n.js +1 -1
- package/entry/behaviours/aui.behaviour.keyboard-shortcuts.js +1 -1
- package/entry/behaviours/aui.behaviour.progressive-data-set.js +1 -1
- package/entry/behaviours/aui.behaviour.version.js +1 -1
- package/entry/deprecated/aui.component.inline-dialog1.js +1 -1
- package/entry/styles/aui-design-tokens-compatibility.less +114 -115
- package/package.json +2 -2
- package/src/js/aui/alphanum.js +1 -1
- package/src/js/aui/avatar-badged.js +4 -5
- package/src/js/aui/avatar-group.js +58 -28
- package/src/js/aui/avatar.js +16 -14
- package/src/js/aui/banner.js +3 -2
- package/src/js/aui/blanket.js +11 -14
- package/src/js/aui/button.js +5 -5
- package/src/js/aui/checkbox-multiselect.js +79 -76
- package/src/js/aui/clone.js +1 -1
- package/src/js/aui/close-button.js +2 -6
- package/src/js/aui/contain-dropdown.js +5 -5
- package/src/js/aui/contains.js +1 -1
- package/src/js/aui/cookie.js +12 -16
- package/src/js/aui/date-picker.js +89 -68
- package/src/js/aui/debounce.js +5 -8
- package/src/js/aui/design-tokens/design-tokens-full.js +4 -13
- package/src/js/aui/design-tokens/design-tokens-init.js +1 -3
- package/src/js/aui/design-tokens/design-tokens-testing-theme.js +9 -15
- package/src/js/aui/design-tokens/design-tokens.js +2 -4
- package/src/js/aui/dialog.js +206 -172
- package/src/js/aui/dialog2.js +36 -25
- package/src/js/aui/dropdown2.js +221 -189
- package/src/js/aui/escape-html.js +2 -2
- package/src/js/aui/escape.js +1 -1
- package/src/js/aui/event.js +4 -8
- package/src/js/aui/expander.js +15 -13
- package/src/js/aui/flag.js +24 -22
- package/src/js/aui/focus-manager.js +20 -21
- package/src/js/aui/form-notification.js +16 -15
- package/src/js/aui/form-validation/basic-validators.js +39 -30
- package/src/js/aui/form-validation/validator-register.js +9 -5
- package/src/js/aui/form-validation.js +12 -13
- package/src/js/aui/format.js +9 -6
- package/src/js/aui/forms/create-forms-component-body.js +6 -9
- package/src/js/aui/forms/custom-checkbox.js +2 -6
- package/src/js/aui/forms/custom-radio.js +2 -6
- package/src/js/aui/forms.js +4 -8
- package/src/js/aui/header-async.js +1 -1
- package/src/js/aui/header.js +2 -2
- package/src/js/aui/i18n.js +6 -13
- package/src/js/aui/index-of.js +1 -1
- package/src/js/aui/inline-dialog.js +171 -117
- package/src/js/aui/inline-dialog2.js +40 -33
- package/src/js/aui/internal/a11y/focusable-query.js +2 -4
- package/src/js/aui/internal/add-id.js +1 -1
- package/src/js/aui/internal/alignment.js +57 -49
- package/src/js/aui/internal/amdify.js +0 -1
- package/src/js/aui/internal/animation.js +2 -5
- package/src/js/aui/internal/attributes.js +2 -3
- package/src/js/aui/internal/browser.js +6 -7
- package/src/js/aui/internal/constants.js +1 -3
- package/src/js/aui/internal/deduplicateIDs.js +8 -7
- package/src/js/aui/internal/deprecation/deprecated-adg2-icons.js +132 -132
- package/src/js/aui/internal/deprecation.js +54 -32
- package/src/js/aui/internal/detect-children-change.js +3 -2
- package/src/js/aui/internal/elements.js +2 -5
- package/src/js/aui/internal/enforcer.js +11 -13
- package/src/js/aui/internal/globalize.js +12 -5
- package/src/js/aui/internal/has-touch.js +1 -2
- package/src/js/aui/internal/header/create-header.js +54 -30
- package/src/js/aui/internal/i18n/aui.js +9 -5
- package/src/js/aui/internal/i18n/aui_af.js +31 -31
- package/src/js/aui/internal/i18n/aui_ar.js +31 -31
- package/src/js/aui/internal/i18n/aui_ar_DZ.js +31 -31
- package/src/js/aui/internal/i18n/aui_az.js +31 -31
- package/src/js/aui/internal/i18n/aui_bg.js +31 -31
- package/src/js/aui/internal/i18n/aui_bs.js +31 -31
- package/src/js/aui/internal/i18n/aui_ca.js +31 -31
- package/src/js/aui/internal/i18n/aui_cs.js +31 -31
- package/src/js/aui/internal/i18n/aui_da.js +31 -31
- package/src/js/aui/internal/i18n/aui_de.js +31 -31
- package/src/js/aui/internal/i18n/aui_el.js +31 -31
- package/src/js/aui/internal/i18n/aui_en_AU.js +31 -31
- package/src/js/aui/internal/i18n/aui_en_GB.js +31 -31
- package/src/js/aui/internal/i18n/aui_en_NZ.js +31 -31
- package/src/js/aui/internal/i18n/aui_eo.js +31 -31
- package/src/js/aui/internal/i18n/aui_es.js +31 -31
- package/src/js/aui/internal/i18n/aui_et.js +31 -31
- package/src/js/aui/internal/i18n/aui_eu.js +31 -31
- package/src/js/aui/internal/i18n/aui_fa.js +31 -31
- package/src/js/aui/internal/i18n/aui_fi.js +31 -31
- package/src/js/aui/internal/i18n/aui_fo.js +31 -31
- package/src/js/aui/internal/i18n/aui_fr.js +31 -31
- package/src/js/aui/internal/i18n/aui_fr_CH.js +31 -31
- package/src/js/aui/internal/i18n/aui_gl.js +31 -31
- package/src/js/aui/internal/i18n/aui_he.js +31 -31
- package/src/js/aui/internal/i18n/aui_hr.js +31 -31
- package/src/js/aui/internal/i18n/aui_hu.js +31 -31
- package/src/js/aui/internal/i18n/aui_hy.js +31 -31
- package/src/js/aui/internal/i18n/aui_id.js +31 -31
- package/src/js/aui/internal/i18n/aui_is.js +31 -31
- package/src/js/aui/internal/i18n/aui_it.js +31 -31
- package/src/js/aui/internal/i18n/aui_ja.js +31 -31
- package/src/js/aui/internal/i18n/aui_ko.js +31 -31
- package/src/js/aui/internal/i18n/aui_kz.js +31 -31
- package/src/js/aui/internal/i18n/aui_lt.js +31 -31
- package/src/js/aui/internal/i18n/aui_lv.js +31 -31
- package/src/js/aui/internal/i18n/aui_ml.js +31 -31
- package/src/js/aui/internal/i18n/aui_ms.js +31 -31
- package/src/js/aui/internal/i18n/aui_nl.js +31 -31
- package/src/js/aui/internal/i18n/aui_no.js +31 -31
- package/src/js/aui/internal/i18n/aui_pl.js +31 -31
- package/src/js/aui/internal/i18n/aui_pt.js +31 -31
- package/src/js/aui/internal/i18n/aui_pt_BR.js +31 -31
- package/src/js/aui/internal/i18n/aui_rm.js +31 -31
- package/src/js/aui/internal/i18n/aui_ro.js +31 -31
- package/src/js/aui/internal/i18n/aui_ru.js +31 -31
- package/src/js/aui/internal/i18n/aui_sk.js +31 -31
- package/src/js/aui/internal/i18n/aui_sl.js +31 -31
- package/src/js/aui/internal/i18n/aui_sq.js +31 -31
- package/src/js/aui/internal/i18n/aui_sr.js +31 -31
- package/src/js/aui/internal/i18n/aui_sr_SR.js +31 -31
- package/src/js/aui/internal/i18n/aui_sv.js +31 -31
- package/src/js/aui/internal/i18n/aui_ta.js +31 -31
- package/src/js/aui/internal/i18n/aui_th.js +31 -31
- package/src/js/aui/internal/i18n/aui_tj.js +31 -31
- package/src/js/aui/internal/i18n/aui_tr.js +31 -31
- package/src/js/aui/internal/i18n/aui_uk.js +31 -31
- package/src/js/aui/internal/i18n/aui_vi.js +31 -31
- package/src/js/aui/internal/i18n/aui_zh_CN.js +31 -31
- package/src/js/aui/internal/i18n/aui_zh_HK.js +31 -31
- package/src/js/aui/internal/i18n/aui_zh_TW.js +31 -31
- package/src/js/aui/internal/log.js +2 -6
- package/src/js/aui/internal/mediaQuery.js +2 -3
- package/src/js/aui/internal/select/option.js +3 -3
- package/src/js/aui/internal/select/suggestion-model.js +1 -1
- package/src/js/aui/internal/select/suggestions-model.js +4 -5
- package/src/js/aui/internal/select/suggestions-view.js +17 -12
- package/src/js/aui/internal/state.js +2 -3
- package/src/js/aui/is-clipped.js +2 -2
- package/src/js/aui/key-code.js +1 -1
- package/src/js/aui/label.js +6 -6
- package/src/js/aui/layer.js +101 -89
- package/src/js/aui/messages.js +67 -43
- package/src/js/aui/navigation.js +7 -9
- package/src/js/aui/on-text-resize.js +7 -5
- package/src/js/aui/params.js +11 -8
- package/src/js/aui/polyfills/custom-event.js +9 -9
- package/src/js/aui/polyfills/placeholder.js +4 -4
- package/src/js/aui/populate-parameters.js +4 -4
- package/src/js/aui/progress-indicator.js +35 -27
- package/src/js/aui/progressive-data-set.js +13 -8
- package/src/js/aui/query-input.js +1 -1
- package/src/js/aui/restful-table/class-names.js +1 -1
- package/src/js/aui/restful-table/data-keys.js +1 -1
- package/src/js/aui/restful-table/edit-row.js +63 -63
- package/src/js/aui/restful-table/entry-model.js +6 -13
- package/src/js/aui/restful-table/event-handlers.js +4 -8
- package/src/js/aui/restful-table/event-names.js +1 -1
- package/src/js/aui/restful-table/row.js +41 -23
- package/src/js/aui/restful-table.js +101 -72
- package/src/js/aui/result-set.js +5 -5
- package/src/js/aui/results-list.js +3 -3
- package/src/js/aui/select.js +72 -51
- package/src/js/aui/select2.js +16 -8
- package/src/js/aui/sidebar.js +81 -51
- package/src/js/aui/spin.js +61 -49
- package/src/js/aui/spinner.js +11 -12
- package/src/js/aui/tables-sortable.js +21 -10
- package/src/js/aui/tabs.js +108 -77
- package/src/js/aui/to-init.js +1 -1
- package/src/js/aui/toggle.js +55 -43
- package/src/js/aui/tooltip.js +34 -33
- package/src/js/aui/trigger.js +21 -19
- package/src/js/aui/truncating-progressive-data-set.js +1 -1
- package/src/js/aui/unbind-text-resize.js +1 -1
- package/src/js/aui/unique-id.js +1 -1
- package/src/js/aui/when-i-type.js +67 -40
- package/src/js/aui-css-deprecations.js +52 -51
- package/src/js/jquery/jquery.moveto.js +18 -12
- package/src/less/adg-fancy-file-input.less +2 -3
- package/src/less/adg-header-quicksearch.less +5 -2
- package/src/less/adg-iconfont.less +242 -242
- package/src/less/adgs-icons.less +262 -262
- package/src/less/aui-appheader.less +10 -6
- package/src/less/aui-avatars.less +1 -1
- package/src/less/aui-banner.less +2 -1
- package/src/less/aui-buttons.less +6 -5
- package/src/less/aui-dark-mode.less +1 -1
- package/src/less/aui-date-picker.less +9 -6
- package/src/less/aui-experimental-expander.less +3 -3
- package/src/less/aui-experimental-labels.less +1 -1
- package/src/less/aui-experimental-progress-indicator.less +10 -4
- package/src/less/aui-experimental-progress-tracker.less +9 -6
- package/src/less/aui-experimental-restfultable.less +11 -3
- package/src/less/aui-experimental-tables-sortable.less +5 -3
- package/src/less/aui-experimental-tooltip.less +1 -1
- package/src/less/aui-link.less +0 -1
- package/src/less/aui-lozenge.less +6 -3
- package/src/less/aui-navigation.less +16 -14
- package/src/less/aui-page-layout.less +3 -4
- package/src/less/aui-page-typography.less +8 -3
- package/src/less/aui-reset.less +22 -6
- package/src/less/aui-select2.less +12 -9
- package/src/less/aui-sidebar-badges.less +1 -2
- package/src/less/aui-sidebar-config.less +7 -2
- package/src/less/aui-sidebar-grouping.less +22 -6
- package/src/less/aui-sidebar-navigation.less +7 -5
- package/src/less/aui-sidebar-skeleton.less +12 -7
- package/src/less/aui-skip-link.less +2 -1
- package/src/less/aui-spinner.less +2 -2
- package/src/less/aui-toggle.less +8 -4
- package/src/less/aui-toolbar2.less +1 -1
- package/src/less/checkbox-multiselect.less +13 -13
- package/src/less/dialog.less +3 -3
- package/src/less/dialog2.less +11 -10
- package/src/less/dropdown2-temp.css +4 -4
- package/src/less/dropdown2.less +4 -4
- package/src/less/flag.less +2 -2
- package/src/less/form-notification.less +10 -6
- package/src/less/forms-current.less +16 -18
- package/src/less/forms-legacy.less +4 -2
- package/src/less/forms-radios-and-checkboxes.less +18 -16
- package/src/less/forms.less +2 -4
- package/src/less/iconfont-mixin.less +7 -4
- package/src/less/imports/aui-theme/adg/adg-colors.less +40 -40
- package/src/less/imports/aui-theme/adg/adg-neutral-dark.less +20 -20
- package/src/less/imports/aui-theme/adg/adg-neutral-light.less +20 -20
- package/src/less/imports/aui-theme/components/buttons.less +7 -1
- package/src/less/imports/aui-theme/components/dropdown.less +3 -1
- package/src/less/imports/aui-theme/components/flag.less +1 -1
- package/src/less/imports/aui-theme/components/form-notification.less +2 -1
- package/src/less/imports/aui-theme/components/forms.less +8 -3
- package/src/less/imports/aui-theme/components/inline-dialog2.less +1 -1
- package/src/less/imports/aui-theme/components/navigation.less +6 -3
- package/src/less/imports/aui-theme/components/progress-tracker.less +6 -2
- package/src/less/imports/aui-theme/components/tables.less +3 -2
- package/src/less/imports/aui-theme/components/toggle.less +8 -3
- package/src/less/imports/aui-theme/core/colors.less +2 -2
- package/src/less/imports/aui-theme/core/icons.less +22 -22
- package/src/less/imports/aui-theme/core/text.less +6 -3
- package/src/less/imports/aui-theme/theme.less +1 -3
- package/src/less/imports/mixins/dropdown2-trigger-chevron-icon.less +0 -1
- package/src/less/imports/mixins/focus.less +12 -4
- package/src/less/imports/mixins/media-queries.less +2 -2
- package/src/less/imports/mixins/shadows.less +3 -1
- package/src/less/imports/mixins/tab-indicator.less +2 -2
- package/src/less/imports/mixins.less +11 -4
- package/src/less/inline-dialog.less +21 -19
- package/src/less/layer.less +0 -2
- package/src/less/messages.less +2 -1
- package/src/less/single-select.less +15 -10
- package/src/less/tables.less +3 -2
- package/src/less/tabs.less +4 -3
package/src/js/aui/layer.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import $ from './jquery';
|
|
2
2
|
import { dim, undim } from './blanket';
|
|
3
3
|
import FocusManager from './focus-manager';
|
|
4
|
-
import {getTrigger,hasTrigger} from './trigger';
|
|
4
|
+
import { getTrigger, hasTrigger } from './trigger';
|
|
5
5
|
import globalize from './internal/globalize';
|
|
6
6
|
import keyCode from './key-code';
|
|
7
7
|
import widget from './internal/widget';
|
|
@@ -18,13 +18,13 @@ const ZINDEX_AUI_LAYER_MIN = 3000;
|
|
|
18
18
|
var $doc = $(document);
|
|
19
19
|
|
|
20
20
|
// AUI-3708 - Abstracted to reflect code implemented upstream.
|
|
21
|
-
function isTransitioning
|
|
21
|
+
function isTransitioning(el, prop) {
|
|
22
22
|
var transition = window.getComputedStyle(el).transitionProperty;
|
|
23
23
|
return transition ? transition.indexOf(prop) > -1 : false;
|
|
24
24
|
}
|
|
25
25
|
|
|
26
|
-
function onTransitionEnd
|
|
27
|
-
function handler
|
|
26
|
+
function onTransitionEnd(el, prop, func, once) {
|
|
27
|
+
function handler(e) {
|
|
28
28
|
if (prop !== e.propertyName) {
|
|
29
29
|
return;
|
|
30
30
|
}
|
|
@@ -43,25 +43,25 @@ function onTransitionEnd (el, prop, func, once) {
|
|
|
43
43
|
}
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
-
function oneTransitionEnd
|
|
46
|
+
function oneTransitionEnd(el, prop, func) {
|
|
47
47
|
onTransitionEnd(el, prop, func, true);
|
|
48
48
|
}
|
|
49
49
|
// end AUI-3708
|
|
50
50
|
|
|
51
51
|
/**
|
|
52
|
-
* @return {bool} Returns false if at least one of the event handlers called .preventDefault(). Returns true otherwise.
|
|
53
|
-
*/
|
|
54
|
-
function triggerEvent
|
|
52
|
+
* @return {bool} Returns false if at least one of the event handlers called .preventDefault(). Returns true otherwise.
|
|
53
|
+
*/
|
|
54
|
+
function triggerEvent($el, deprecatedName, newNativeName) {
|
|
55
55
|
var e1 = $.Event(EVENT_PREFIX + deprecatedName);
|
|
56
56
|
var e2 = $.Event(GLOBAL_EVENT_PREFIX + deprecatedName);
|
|
57
57
|
// TODO: Remove this 'aui-layer-' prefixed event once it is no longer used by inline dialog and dialog2.
|
|
58
58
|
var nativeEvent = new CustomEvent(LAYER_EVENT_PREFIX + newNativeName, {
|
|
59
59
|
bubbles: true,
|
|
60
|
-
cancelable: true
|
|
60
|
+
cancelable: true,
|
|
61
61
|
});
|
|
62
62
|
var nativeEvent2 = new CustomEvent(AUI_EVENT_PREFIX + newNativeName, {
|
|
63
63
|
bubbles: true,
|
|
64
|
-
cancelable: true
|
|
64
|
+
cancelable: true,
|
|
65
65
|
});
|
|
66
66
|
|
|
67
67
|
$el.trigger(e1);
|
|
@@ -69,19 +69,21 @@ function triggerEvent ($el, deprecatedName, newNativeName) {
|
|
|
69
69
|
$el[0].dispatchEvent(nativeEvent);
|
|
70
70
|
$el[0].dispatchEvent(nativeEvent2);
|
|
71
71
|
|
|
72
|
-
return
|
|
72
|
+
return (
|
|
73
|
+
!e1.isDefaultPrevented() &&
|
|
73
74
|
!e2.isDefaultPrevented() &&
|
|
74
75
|
!nativeEvent.defaultPrevented &&
|
|
75
|
-
!nativeEvent2.defaultPrevented
|
|
76
|
+
!nativeEvent2.defaultPrevented
|
|
77
|
+
);
|
|
76
78
|
}
|
|
77
79
|
|
|
78
|
-
function Layer
|
|
80
|
+
function Layer(selector) {
|
|
79
81
|
this.$el = $(selector || '<div class="aui-layer"></div>');
|
|
80
82
|
this.el = this.$el[0];
|
|
81
83
|
this.$el.addClass('aui-layer');
|
|
82
84
|
}
|
|
83
85
|
|
|
84
|
-
function getAttribute
|
|
86
|
+
function getAttribute(el, name) {
|
|
85
87
|
return el.getAttribute(name) || el.getAttribute('data-aui-' + name);
|
|
86
88
|
}
|
|
87
89
|
|
|
@@ -131,7 +133,6 @@ Layer.prototype = {
|
|
|
131
133
|
return this;
|
|
132
134
|
},
|
|
133
135
|
|
|
134
|
-
|
|
135
136
|
/**
|
|
136
137
|
* Unbinds a layer event.
|
|
137
138
|
*
|
|
@@ -302,7 +303,7 @@ Layer.prototype = {
|
|
|
302
303
|
|
|
303
304
|
this.$el.trigger(EVENT_PREFIX + 'show');
|
|
304
305
|
this.$el.trigger(GLOBAL_EVENT_PREFIX + 'show', [this.$el]);
|
|
305
|
-
}
|
|
306
|
+
},
|
|
306
307
|
};
|
|
307
308
|
|
|
308
309
|
var createLayer = widget('layer', Layer);
|
|
@@ -317,8 +318,6 @@ createLayer.off = function (eventName, selector, fn) {
|
|
|
317
318
|
return this;
|
|
318
319
|
};
|
|
319
320
|
|
|
320
|
-
|
|
321
|
-
|
|
322
321
|
// Layer Manager
|
|
323
322
|
// -------------
|
|
324
323
|
|
|
@@ -338,7 +337,7 @@ createLayer.off = function (eventName, selector, fn) {
|
|
|
338
337
|
* popUntil(dialog.$el) would hide all layers above & including the dialog.
|
|
339
338
|
*/
|
|
340
339
|
|
|
341
|
-
function topIndexWhere
|
|
340
|
+
function topIndexWhere(layerArr, fn) {
|
|
342
341
|
var i = layerArr.length;
|
|
343
342
|
|
|
344
343
|
while (i--) {
|
|
@@ -350,19 +349,19 @@ function topIndexWhere (layerArr, fn) {
|
|
|
350
349
|
return -1;
|
|
351
350
|
}
|
|
352
351
|
|
|
353
|
-
function layerIndex
|
|
352
|
+
function layerIndex(layerArr, $el) {
|
|
354
353
|
return topIndexWhere(layerArr, function ($layer) {
|
|
355
354
|
return $layer[0] === $el[0];
|
|
356
355
|
});
|
|
357
356
|
}
|
|
358
357
|
|
|
359
|
-
function topBlanketedIndex
|
|
358
|
+
function topBlanketedIndex(layerArr) {
|
|
360
359
|
return topIndexWhere(layerArr, function ($layer) {
|
|
361
360
|
return createLayer($layer).isBlanketed();
|
|
362
361
|
});
|
|
363
362
|
}
|
|
364
363
|
|
|
365
|
-
function nextZIndex
|
|
364
|
+
function nextZIndex(layerArr) {
|
|
366
365
|
var _nextZIndex;
|
|
367
366
|
|
|
368
367
|
if (layerArr.length) {
|
|
@@ -376,7 +375,7 @@ function nextZIndex (layerArr) {
|
|
|
376
375
|
return Math.max(ZINDEX_AUI_LAYER_MIN, _nextZIndex);
|
|
377
376
|
}
|
|
378
377
|
|
|
379
|
-
function updateBlanket
|
|
378
|
+
function updateBlanket(stack, oldBlanketIndex) {
|
|
380
379
|
var newTopBlanketedIndex = topBlanketedIndex(stack);
|
|
381
380
|
|
|
382
381
|
if (oldBlanketIndex !== newTopBlanketedIndex) {
|
|
@@ -388,7 +387,7 @@ function updateBlanket (stack, oldBlanketIndex) {
|
|
|
388
387
|
}
|
|
389
388
|
}
|
|
390
389
|
|
|
391
|
-
function popLayers
|
|
390
|
+
function popLayers(stack, stopIndex, forceClosePersistent, triggerBeforeEvents = true) {
|
|
392
391
|
if (stopIndex < 0) {
|
|
393
392
|
return [false, null];
|
|
394
393
|
}
|
|
@@ -408,7 +407,7 @@ function popLayers (stack, stopIndex, forceClosePersistent, triggerBeforeEvents
|
|
|
408
407
|
return [true, $layer];
|
|
409
408
|
}
|
|
410
409
|
|
|
411
|
-
function getParentLayer
|
|
410
|
+
function getParentLayer(layer) {
|
|
412
411
|
var trigger = getTrigger(layer);
|
|
413
412
|
|
|
414
413
|
if (trigger) {
|
|
@@ -416,21 +415,21 @@ function getParentLayer (layer) {
|
|
|
416
415
|
}
|
|
417
416
|
}
|
|
418
417
|
|
|
419
|
-
function LayerManager
|
|
418
|
+
function LayerManager() {
|
|
420
419
|
this._stack = [];
|
|
421
420
|
}
|
|
422
421
|
|
|
423
422
|
LayerManager.prototype = {
|
|
424
423
|
/**
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
424
|
+
* Pushes a layer onto the stack. The same element cannot be opened as a layer multiple times - if the given
|
|
425
|
+
* element is already an open layer, this method throws an exception.
|
|
426
|
+
*
|
|
427
|
+
* @param {HTMLElement | String | jQuery} element The element to push onto the stack.
|
|
428
|
+
*
|
|
429
|
+
* @returns {LayerManager}
|
|
430
|
+
*/
|
|
432
431
|
push: function (element) {
|
|
433
|
-
var $el =
|
|
432
|
+
var $el = element instanceof $ ? element : $(element);
|
|
434
433
|
if (layerIndex(this._stack, $el) >= 0) {
|
|
435
434
|
throw new Error('The given element is already an active layer.');
|
|
436
435
|
}
|
|
@@ -470,54 +469,57 @@ LayerManager.prototype = {
|
|
|
470
469
|
},
|
|
471
470
|
|
|
472
471
|
/**
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
472
|
+
* Returns the index of the specified layer in the layer stack.
|
|
473
|
+
*
|
|
474
|
+
* @param {HTMLElement | String | jQuery} element The element to find in the stack.
|
|
475
|
+
*
|
|
476
|
+
* @returns {Number} the (zero-based) index of the element, or -1 if not in the stack.
|
|
477
|
+
*/
|
|
479
478
|
indexOf: function (element) {
|
|
480
479
|
return layerIndex(this._stack, $(element));
|
|
481
480
|
},
|
|
482
481
|
|
|
483
482
|
/**
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
483
|
+
* Returns the item at the particular index or false.
|
|
484
|
+
*
|
|
485
|
+
* @param {Number} index The index of the element to get.
|
|
486
|
+
*
|
|
487
|
+
* @returns {jQuery | Boolean}
|
|
488
|
+
*/
|
|
490
489
|
item: function (index) {
|
|
491
490
|
return this._stack[index];
|
|
492
491
|
},
|
|
493
492
|
|
|
494
493
|
/**
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
494
|
+
* Hides all layers in the stack.
|
|
495
|
+
*
|
|
496
|
+
* @returns {LayerManager}
|
|
497
|
+
*/
|
|
499
498
|
hideAll: function () {
|
|
500
|
-
this._stack
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
499
|
+
this._stack
|
|
500
|
+
.slice()
|
|
501
|
+
.reverse()
|
|
502
|
+
.forEach(function (element) {
|
|
503
|
+
let layer = createLayer(element);
|
|
504
|
+
if (layer.isBlanketed() || layer.isPersistent()) {
|
|
505
|
+
return;
|
|
506
|
+
}
|
|
507
|
+
layer.hide();
|
|
508
|
+
});
|
|
507
509
|
|
|
508
510
|
return this;
|
|
509
511
|
},
|
|
510
512
|
|
|
511
513
|
/**
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
514
|
+
* Gets the previous layer below the given layer, which is non modal and non persistent. If it finds a blanketed layer on the way
|
|
515
|
+
* it returns it regardless if it is modal or not
|
|
516
|
+
*
|
|
517
|
+
* @param {HTMLElement | String | jQuery} element layer to start the search from.
|
|
518
|
+
*
|
|
519
|
+
* @returns {jQuery | null} the next matching layer or null if none found.
|
|
520
|
+
*/
|
|
519
521
|
getNextLowerNonPersistentOrBlanketedLayer: function (element) {
|
|
520
|
-
var $el =
|
|
522
|
+
var $el = element instanceof $ ? element : $(element);
|
|
521
523
|
var index = layerIndex(this._stack, $el);
|
|
522
524
|
|
|
523
525
|
if (index < 0) {
|
|
@@ -540,14 +542,14 @@ LayerManager.prototype = {
|
|
|
540
542
|
},
|
|
541
543
|
|
|
542
544
|
/**
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
545
|
+
* Gets the next layer which is neither modal or blanketed, from the given layer.
|
|
546
|
+
*
|
|
547
|
+
* @param {HTMLElement | String | jQuery} element layer to start the search from.
|
|
548
|
+
*
|
|
549
|
+
* @returns {jQuery | null} the next non modal non blanketed layer or null if none found.
|
|
550
|
+
*/
|
|
549
551
|
getNextHigherNonPeristentAndNonBlanketedLayer: function (element) {
|
|
550
|
-
var $el =
|
|
552
|
+
var $el = element instanceof $ ? element : $(element);
|
|
551
553
|
var index = layerIndex(this._stack, $el);
|
|
552
554
|
|
|
553
555
|
if (index < 0) {
|
|
@@ -584,7 +586,12 @@ LayerManager.prototype = {
|
|
|
584
586
|
* @return The first open layer in the stack, if it exists, otherwise null.
|
|
585
587
|
*/
|
|
586
588
|
getTopOpenLayer: function () {
|
|
587
|
-
return
|
|
589
|
+
return (
|
|
590
|
+
this._stack
|
|
591
|
+
.slice()
|
|
592
|
+
.reverse()
|
|
593
|
+
.find((layer) => layer.attr('open')) || null
|
|
594
|
+
);
|
|
588
595
|
},
|
|
589
596
|
|
|
590
597
|
/**
|
|
@@ -597,7 +604,7 @@ LayerManager.prototype = {
|
|
|
597
604
|
* @returns {jQuery} The last layer that was popped, or null if no layer matching the given $el was found.
|
|
598
605
|
*/
|
|
599
606
|
popUntil: function (element, triggerBeforeEvents = false) {
|
|
600
|
-
var $el =
|
|
607
|
+
var $el = element instanceof $ ? element : $(element);
|
|
601
608
|
var index = layerIndex(this._stack, $el);
|
|
602
609
|
|
|
603
610
|
if (index === -1) {
|
|
@@ -608,7 +615,12 @@ LayerManager.prototype = {
|
|
|
608
615
|
|
|
609
616
|
// Removes all layers above the current one.
|
|
610
617
|
const layer = createLayer($el);
|
|
611
|
-
const [success, $lastPopped] = popLayers(
|
|
618
|
+
const [success, $lastPopped] = popLayers(
|
|
619
|
+
this._stack,
|
|
620
|
+
index + 1,
|
|
621
|
+
layer.isBlanketed(),
|
|
622
|
+
triggerBeforeEvents
|
|
623
|
+
);
|
|
612
624
|
if (!success) {
|
|
613
625
|
return $lastPopped;
|
|
614
626
|
}
|
|
@@ -624,10 +636,10 @@ LayerManager.prototype = {
|
|
|
624
636
|
},
|
|
625
637
|
|
|
626
638
|
/**
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
639
|
+
* Pops the top layer, if it exists and it is non modal and non persistent.
|
|
640
|
+
*
|
|
641
|
+
* @returns The layer that was popped, if it was popped.
|
|
642
|
+
*/
|
|
631
643
|
popTopIfNonPersistent: function (triggerBeforeEvents = false) {
|
|
632
644
|
var $topLayer = this.getTopLayer();
|
|
633
645
|
var layer = createLayer($topLayer);
|
|
@@ -640,11 +652,11 @@ LayerManager.prototype = {
|
|
|
640
652
|
},
|
|
641
653
|
|
|
642
654
|
/**
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
655
|
+
* Pops all layers above and including the top blanketed layer. If layers exist but none are blanketed, this method
|
|
656
|
+
* does nothing.
|
|
657
|
+
*
|
|
658
|
+
* @returns The blanketed layer that was popped, if it exists, otherwise null.
|
|
659
|
+
*/
|
|
648
660
|
popUntilTopBlanketed: function (triggerBeforeEvents = false) {
|
|
649
661
|
var i = topBlanketedIndex(this._stack);
|
|
650
662
|
|
|
@@ -672,9 +684,9 @@ LayerManager.prototype = {
|
|
|
672
684
|
},
|
|
673
685
|
|
|
674
686
|
/**
|
|
675
|
-
|
|
676
|
-
|
|
677
|
-
|
|
687
|
+
* Pops all layers above and including the top persistent layer. If layers exist but none are persistent, this method
|
|
688
|
+
* does nothing.
|
|
689
|
+
*/
|
|
678
690
|
popUntilTopPersistent: function (triggerBeforeEvents = false) {
|
|
679
691
|
var $toPop = LayerManager.global.getTopLayer();
|
|
680
692
|
if (!$toPop) {
|
|
@@ -707,7 +719,7 @@ LayerManager.prototype = {
|
|
|
707
719
|
popLayers(this._stack, stopIndex, true, triggerBeforeEvents);
|
|
708
720
|
updateBlanket(this._stack, oldTopBlanketedIndex);
|
|
709
721
|
}
|
|
710
|
-
}
|
|
722
|
+
},
|
|
711
723
|
};
|
|
712
724
|
|
|
713
725
|
// LayerManager.global
|
|
@@ -742,7 +754,7 @@ function hasLayer($trigger) {
|
|
|
742
754
|
// If it's a click on a trigger, do nothing.
|
|
743
755
|
// If it's a click on a layer, close all layers above.
|
|
744
756
|
// Otherwise, close all layers.
|
|
745
|
-
function initCloseLayerOnOuterClick
|
|
757
|
+
function initCloseLayerOnOuterClick() {
|
|
746
758
|
$doc.on('click', function (e) {
|
|
747
759
|
var $target = $(e.target);
|
|
748
760
|
if ($target.closest('.aui-blanket').length) {
|
package/src/js/aui/messages.js
CHANGED
|
@@ -5,8 +5,8 @@ import globalize from './internal/globalize';
|
|
|
5
5
|
import escapeHtml from './escape-html';
|
|
6
6
|
import keyCode from './key-code';
|
|
7
7
|
import skate from './internal/skate';
|
|
8
|
-
import {CLOSE_BUTTON, CLOSE_BUTTON_CLASS_SELECTOR} from './close-button';
|
|
9
|
-
import {I18n} from './i18n';
|
|
8
|
+
import { CLOSE_BUTTON, CLOSE_BUTTON_CLASS_SELECTOR } from './close-button';
|
|
9
|
+
import { I18n } from './i18n';
|
|
10
10
|
|
|
11
11
|
const DEFAULT_FADEOUT_DURATION = 500;
|
|
12
12
|
const DEFAULT_FADEOUT_DELAY = 5000;
|
|
@@ -45,7 +45,10 @@ function createMessageConstructor(type) {
|
|
|
45
45
|
|
|
46
46
|
// Attach the optional extra behaviours
|
|
47
47
|
if (obj.removeOnHide) {
|
|
48
|
-
console.warn &&
|
|
48
|
+
console.warn &&
|
|
49
|
+
console.warn(
|
|
50
|
+
'Use of AUI Message `removeOnHide` is deprecated due to accessibility reasons and will be removed in AUI 10.0.0.'
|
|
51
|
+
);
|
|
49
52
|
makeRemoveOnHide($message, obj.delay, obj.duration);
|
|
50
53
|
}
|
|
51
54
|
|
|
@@ -54,7 +57,10 @@ function createMessageConstructor(type) {
|
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
if (obj.fadeout) {
|
|
57
|
-
console.warn &&
|
|
60
|
+
console.warn &&
|
|
61
|
+
console.warn(
|
|
62
|
+
'Use of AUI Message `fadeout` is deprecated due to accessibility reasons and will be removed in AUI 10.0.0.'
|
|
63
|
+
);
|
|
58
64
|
makeFadeout($message, obj.delay, obj.duration);
|
|
59
65
|
}
|
|
60
66
|
|
|
@@ -65,8 +71,8 @@ function createMessageConstructor(type) {
|
|
|
65
71
|
function makeRemoveOnHide(message, delay, duration) {
|
|
66
72
|
$(message || '.aui-message.aui-remove-on-hide').each(function () {
|
|
67
73
|
const $this = $(this);
|
|
68
|
-
makeFadeout($this, delay, duration)
|
|
69
|
-
})
|
|
74
|
+
makeFadeout($this, delay, duration);
|
|
75
|
+
});
|
|
70
76
|
}
|
|
71
77
|
|
|
72
78
|
function makeCloseable(message) {
|
|
@@ -83,8 +89,8 @@ function makeCloseable(message) {
|
|
|
83
89
|
}
|
|
84
90
|
|
|
85
91
|
function makeFadeout(message, delay, duration) {
|
|
86
|
-
delay =
|
|
87
|
-
duration =
|
|
92
|
+
delay = typeof delay !== 'undefined' ? delay : DEFAULT_FADEOUT_DELAY;
|
|
93
|
+
duration = typeof duration !== 'undefined' ? duration : DEFAULT_FADEOUT_DURATION;
|
|
88
94
|
|
|
89
95
|
$(message || 'div.aui-message.fadeout').each(function () {
|
|
90
96
|
const $this = $(this);
|
|
@@ -94,7 +100,7 @@ function makeFadeout(message, delay, duration) {
|
|
|
94
100
|
let isHover = false;
|
|
95
101
|
|
|
96
102
|
//Small functions to keep the code easier to read and avoid code duplication
|
|
97
|
-
function fadeOut(){
|
|
103
|
+
function fadeOut() {
|
|
98
104
|
//Algorithm:
|
|
99
105
|
//1. Stop all running animations (first arg), including any fade animation and delay
|
|
100
106
|
// Do not jump to the end of the animation (second arg). This prevents the message to abruptly
|
|
@@ -102,19 +108,22 @@ function makeFadeout(message, delay, duration) {
|
|
|
102
108
|
//2. Wait <delay> ms before starting the fadeout
|
|
103
109
|
//3. Start the fadeout with a duration of <duration> ms
|
|
104
110
|
//4. Close the message at the end of the animation
|
|
105
|
-
$this
|
|
106
|
-
|
|
107
|
-
|
|
111
|
+
$this
|
|
112
|
+
.stop(true, false)
|
|
113
|
+
.delay(delay)
|
|
114
|
+
.fadeOut(duration, function () {
|
|
115
|
+
$this.closeMessage();
|
|
116
|
+
});
|
|
108
117
|
}
|
|
109
|
-
function resetFadeOut(){
|
|
118
|
+
function resetFadeOut() {
|
|
110
119
|
//Algorithm:
|
|
111
120
|
//1. Stop all running animations (first arg), including any fade animation and delay
|
|
112
121
|
// Do not jump to the end of the animation (second arg). This prevents the message to abruptly
|
|
113
122
|
// jump to opacity:0 or opacity:1
|
|
114
123
|
//2. Fast animation to opacity:1
|
|
115
|
-
$this.stop(true,false).fadeTo(FADEOUT_RESTORE_DURATION, 1);
|
|
124
|
+
$this.stop(true, false).fadeTo(FADEOUT_RESTORE_DURATION, 1);
|
|
116
125
|
}
|
|
117
|
-
function shouldStartFadeOut(){
|
|
126
|
+
function shouldStartFadeOut() {
|
|
118
127
|
return !hasFocus && !isHover;
|
|
119
128
|
}
|
|
120
129
|
|
|
@@ -131,11 +140,13 @@ function makeFadeout(message, delay, duration) {
|
|
|
131
140
|
}
|
|
132
141
|
})
|
|
133
142
|
.hover(
|
|
134
|
-
function () {
|
|
143
|
+
function () {
|
|
144
|
+
//should be called .hoverin(), but jQuery does not implement that method
|
|
135
145
|
isHover = true;
|
|
136
146
|
resetFadeOut();
|
|
137
147
|
},
|
|
138
|
-
function () {
|
|
148
|
+
function () {
|
|
149
|
+
//should be called .hoverout(), but jQuery does not implement that method
|
|
139
150
|
isHover = false;
|
|
140
151
|
if (shouldStartFadeOut()) {
|
|
141
152
|
fadeOut();
|
|
@@ -157,20 +168,22 @@ const messageFunctions = {
|
|
|
157
168
|
makeRemoveOnHide: makeRemoveOnHide,
|
|
158
169
|
makeCloseable: makeCloseable,
|
|
159
170
|
makeFadeout: makeFadeout,
|
|
160
|
-
createMessage: createMessageConstructor
|
|
171
|
+
createMessage: createMessageConstructor,
|
|
161
172
|
};
|
|
162
173
|
|
|
163
174
|
function initCloseMessageBoxOnClickAndKeypress($message) {
|
|
164
175
|
$message.unbind('click.aui-message').unbind('keydown.aui-message');
|
|
165
176
|
|
|
166
|
-
$message
|
|
167
|
-
|
|
168
|
-
}).on('keydown.aui-message', CLOSE_BUTTON_CLASS_SELECTOR, function (e) {
|
|
169
|
-
if ((e.which === keyCode.ENTER) || (e.which === keyCode.SPACE)) {
|
|
177
|
+
$message
|
|
178
|
+
.on('click.aui-message', CLOSE_BUTTON_CLASS_SELECTOR, function (e) {
|
|
170
179
|
$(e.target).closest('.aui-message').closeMessage();
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
180
|
+
})
|
|
181
|
+
.on('keydown.aui-message', CLOSE_BUTTON_CLASS_SELECTOR, function (e) {
|
|
182
|
+
if (e.which === keyCode.ENTER || e.which === keyCode.SPACE) {
|
|
183
|
+
$(e.target).closest('.aui-message').closeMessage();
|
|
184
|
+
e.preventDefault(); // this is especially important when handling the space bar, as we don't want to page down
|
|
185
|
+
}
|
|
186
|
+
});
|
|
174
187
|
}
|
|
175
188
|
|
|
176
189
|
function insertMessageIntoContext($message, insertWhere, context) {
|
|
@@ -220,7 +233,7 @@ function getMessageA11yTypeText(obj, type) {
|
|
|
220
233
|
}
|
|
221
234
|
}
|
|
222
235
|
|
|
223
|
-
function renderMessageElement
|
|
236
|
+
function renderMessageElement(obj, type) {
|
|
224
237
|
const { id, closeable, removeOnHide, fadeout, title, body } = obj;
|
|
225
238
|
|
|
226
239
|
const messageTypeText = getMessageA11yTypeText(obj, type);
|
|
@@ -228,7 +241,9 @@ function renderMessageElement (obj, type) {
|
|
|
228
241
|
|
|
229
242
|
// Convert the options in to template values
|
|
230
243
|
const titleId = id ? `${id}-title` : '';
|
|
231
|
-
const titleHtml = title
|
|
244
|
+
const titleHtml = title
|
|
245
|
+
? `<p class="title" ${titleId ? `id="${titleId}" aria-hidden="true"` : ''}>${messageTypeLabel}<strong>${escapeHtml(title)}</strong></p>`
|
|
246
|
+
: '';
|
|
232
247
|
const html = `<div class="aui-message" role="note" ${titleId ? `aria-labelledby="${titleId}"` : ''}>${titleHtml}</div>`;
|
|
233
248
|
|
|
234
249
|
// Construct the message element
|
|
@@ -243,7 +258,9 @@ function renderMessageElement (obj, type) {
|
|
|
243
258
|
if (id) {
|
|
244
259
|
if (/[#'".\s]/g.test(id)) {
|
|
245
260
|
// reject IDs that don't comply with style guide (ie. they'll break stuff)
|
|
246
|
-
logger.warn(
|
|
261
|
+
logger.warn(
|
|
262
|
+
'Messages error: ID rejected, must not include spaces, hashes, dots or quotes.'
|
|
263
|
+
);
|
|
247
264
|
} else {
|
|
248
265
|
$message.attr('id', id);
|
|
249
266
|
}
|
|
@@ -254,15 +271,17 @@ function renderMessageElement (obj, type) {
|
|
|
254
271
|
|
|
255
272
|
$.fn.closeMessage = function () {
|
|
256
273
|
const $message = $(this);
|
|
257
|
-
if (
|
|
274
|
+
if (
|
|
275
|
+
$message.hasClass('aui-message') &&
|
|
276
|
+
($message.hasClass('closeable') || $message.hasClass('aui-remove-on-hide'))
|
|
277
|
+
) {
|
|
258
278
|
$message.stop(true); //Stop any running animation
|
|
259
279
|
$message.trigger('messageClose', [this]); //messageClose event Deprecated as of 5.3
|
|
260
280
|
$message.remove();
|
|
261
|
-
$(document).trigger('aui-message-close', [this]);
|
|
281
|
+
$(document).trigger('aui-message-close', [this]); //must trigger on document since the element has been removed
|
|
262
282
|
}
|
|
263
283
|
};
|
|
264
284
|
|
|
265
|
-
|
|
266
285
|
/**
|
|
267
286
|
* Utility methods to display different message types to the user.
|
|
268
287
|
* Usage:
|
|
@@ -298,10 +317,10 @@ const MessageEl = skate('aui-message', {
|
|
|
298
317
|
delay: element.getAttribute('delay'),
|
|
299
318
|
duration: element.getAttribute('duration'),
|
|
300
319
|
fadeout: element.getAttribute('fadeout'),
|
|
301
|
-
title: element.getAttribute('title')
|
|
320
|
+
title: element.getAttribute('title'),
|
|
302
321
|
});
|
|
303
322
|
element.setAttribute('role', 'none');
|
|
304
|
-
}
|
|
323
|
+
},
|
|
305
324
|
});
|
|
306
325
|
|
|
307
326
|
$(function () {
|
|
@@ -309,30 +328,37 @@ $(function () {
|
|
|
309
328
|
});
|
|
310
329
|
|
|
311
330
|
deprecate.prop(messageFunctions, 'makeCloseable', {
|
|
312
|
-
extraInfo:
|
|
331
|
+
extraInfo:
|
|
332
|
+
'Use the "closeable" option in the constructor instead. Docs: https://aui.atlassian.com/latest/docs/messages.html',
|
|
313
333
|
});
|
|
314
334
|
|
|
315
335
|
deprecate.prop(messageFunctions, 'createMessage', {
|
|
316
|
-
extraInfo:
|
|
336
|
+
extraInfo:
|
|
337
|
+
'Use the provided convenience methods instead e.g. messages.info(). Docs: https://aui.atlassian.com/latest/docs/messages.html',
|
|
317
338
|
});
|
|
318
339
|
|
|
319
340
|
deprecate.prop(messageFunctions, 'makeRemoveOnHide', {
|
|
320
|
-
extraInfo:
|
|
341
|
+
extraInfo:
|
|
342
|
+
'Use of the `makeRemoveOnHide` option is deprecated due to accessibility reasons. Docs: https://aui.atlassian.com/latest/docs/messages.html',
|
|
321
343
|
});
|
|
322
344
|
|
|
323
345
|
deprecate.prop(messageFunctions, 'makeFadeout', {
|
|
324
|
-
extraInfo:
|
|
346
|
+
extraInfo:
|
|
347
|
+
'Use of the `fadeout` option is deprecated due to accessibility reasons. Docs: https://aui.atlassian.com/latest/docs/messages.html',
|
|
325
348
|
});
|
|
326
349
|
|
|
327
350
|
deprecate.prop(messageFunctions, 'generic', {
|
|
328
|
-
extraInfo:
|
|
351
|
+
extraInfo:
|
|
352
|
+
'use the messages.info() method instead. Docs: https://aui.atlassian.com/latest/docs/messages.html',
|
|
329
353
|
});
|
|
330
354
|
|
|
331
355
|
deprecate.prop(messageFunctions, 'hint', {
|
|
332
|
-
extraInfo:
|
|
356
|
+
extraInfo:
|
|
357
|
+
'use the messages.info() method instead. Docs: https://aui.atlassian.com/latest/docs/messages.html',
|
|
333
358
|
});
|
|
334
359
|
deprecate.prop(messageFunctions, 'success', {
|
|
335
|
-
extraInfo:
|
|
360
|
+
extraInfo:
|
|
361
|
+
'use the messages.confirmation() method instead. Docs: https://aui.atlassian.com/latest/docs/messages.html',
|
|
336
362
|
});
|
|
337
363
|
|
|
338
364
|
// Exporting
|
|
@@ -340,6 +366,4 @@ deprecate.prop(messageFunctions, 'success', {
|
|
|
340
366
|
globalize('messages', messageFunctions);
|
|
341
367
|
|
|
342
368
|
export default messageFunctions;
|
|
343
|
-
export {
|
|
344
|
-
MessageEl
|
|
345
|
-
};
|
|
369
|
+
export { MessageEl };
|