@atlassian/aui 9.2.16-bbd82a2f8 → 9.2.16

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.
Files changed (253) hide show
  1. package/LICENSE.md +1 -1
  2. package/README.md +7 -9
  3. package/dist/aui/aui-css-deprecations.js.map +1 -1
  4. package/dist/aui/aui-prototyping.css +9 -9
  5. package/dist/aui/aui-prototyping.js +2 -2
  6. package/dist/aui/aui-prototyping.js.map +1 -1
  7. package/dist/aui/aui-prototyping.nodeps.css +9 -9
  8. package/dist/aui/aui-prototyping.nodeps.js +2 -2
  9. package/dist/aui/aui-prototyping.nodeps.js.map +1 -1
  10. package/entry/aui.batch.components.js +21 -21
  11. package/entry/aui.batch.page.js +3 -3
  12. package/entry/aui.batch.patterns.js +20 -20
  13. package/entry/aui.batch.prototyping.js +3 -10
  14. package/entry/aui.component.nav.js +1 -1
  15. package/entry/aui.component.progressbar.js +4 -1
  16. package/entry/aui.side-effects.js +2 -2
  17. package/entry/behaviours/aui.behaviour.format.js +1 -1
  18. package/entry/behaviours/aui.behaviour.i18n.js +1 -1
  19. package/entry/behaviours/aui.behaviour.keyboard-shortcuts.js +1 -1
  20. package/entry/behaviours/aui.behaviour.progressive-data-set.js +1 -1
  21. package/entry/behaviours/aui.behaviour.version.js +1 -1
  22. package/entry/deprecated/aui.component.inline-dialog1.js +1 -1
  23. package/package.json +1 -1
  24. package/src/js/aui/alphanum.js +1 -1
  25. package/src/js/aui/banner.js +2 -2
  26. package/src/js/aui/blanket.js +7 -11
  27. package/src/js/aui/button.js +5 -5
  28. package/src/js/aui/checkbox-multiselect.js +79 -76
  29. package/src/js/aui/clone.js +1 -1
  30. package/src/js/aui/close-button.js +2 -6
  31. package/src/js/aui/contain-dropdown.js +5 -5
  32. package/src/js/aui/contains.js +1 -1
  33. package/src/js/aui/cookie.js +12 -16
  34. package/src/js/aui/date-picker.js +82 -75
  35. package/src/js/aui/debounce.js +5 -8
  36. package/src/js/aui/dialog.js +206 -172
  37. package/src/js/aui/dialog2.js +9 -8
  38. package/src/js/aui/dropdown2.js +207 -180
  39. package/src/js/aui/escape-html.js +2 -2
  40. package/src/js/aui/escape.js +1 -1
  41. package/src/js/aui/event.js +4 -8
  42. package/src/js/aui/expander.js +9 -7
  43. package/src/js/aui/flag.js +15 -17
  44. package/src/js/aui/focus-manager.js +19 -18
  45. package/src/js/aui/form-notification.js +14 -13
  46. package/src/js/aui/form-validation/basic-validators.js +39 -30
  47. package/src/js/aui/form-validation/validator-register.js +9 -5
  48. package/src/js/aui/form-validation.js +17 -14
  49. package/src/js/aui/format.js +9 -6
  50. package/src/js/aui/forms/create-forms-component-body.js +6 -9
  51. package/src/js/aui/forms/custom-checkbox.js +2 -6
  52. package/src/js/aui/forms/custom-radio.js +2 -6
  53. package/src/js/aui/forms.js +4 -8
  54. package/src/js/aui/header-async.js +1 -1
  55. package/src/js/aui/header.js +2 -2
  56. package/src/js/aui/i18n.js +2 -5
  57. package/src/js/aui/index-of.js +1 -1
  58. package/src/js/aui/inline-dialog.js +171 -117
  59. package/src/js/aui/inline-dialog2.js +60 -50
  60. package/src/js/aui/internal/add-id.js +1 -1
  61. package/src/js/aui/internal/alignment.js +57 -49
  62. package/src/js/aui/internal/amdify.js +0 -1
  63. package/src/js/aui/internal/animation.js +2 -5
  64. package/src/js/aui/internal/attributes.js +2 -3
  65. package/src/js/aui/internal/browser.js +5 -6
  66. package/src/js/aui/internal/constants.js +1 -3
  67. package/src/js/aui/internal/deduplicateIDs.js +8 -7
  68. package/src/js/aui/internal/deprecation/deprecated-adg2-icons.js +132 -132
  69. package/src/js/aui/internal/deprecation.js +53 -31
  70. package/src/js/aui/internal/detect-children-change.js +3 -2
  71. package/src/js/aui/internal/elements.js +2 -5
  72. package/src/js/aui/internal/enforcer.js +11 -13
  73. package/src/js/aui/internal/globalize.js +3 -3
  74. package/src/js/aui/internal/has-touch.js +1 -2
  75. package/src/js/aui/internal/header/create-header.js +49 -26
  76. package/src/js/aui/internal/i18n/aui.js +8 -5
  77. package/src/js/aui/internal/i18n/aui_af.js +31 -31
  78. package/src/js/aui/internal/i18n/aui_ar.js +31 -31
  79. package/src/js/aui/internal/i18n/aui_ar_DZ.js +31 -31
  80. package/src/js/aui/internal/i18n/aui_az.js +31 -31
  81. package/src/js/aui/internal/i18n/aui_bg.js +31 -31
  82. package/src/js/aui/internal/i18n/aui_bs.js +31 -31
  83. package/src/js/aui/internal/i18n/aui_ca.js +31 -31
  84. package/src/js/aui/internal/i18n/aui_cs.js +31 -31
  85. package/src/js/aui/internal/i18n/aui_da.js +31 -31
  86. package/src/js/aui/internal/i18n/aui_de.js +31 -31
  87. package/src/js/aui/internal/i18n/aui_el.js +31 -31
  88. package/src/js/aui/internal/i18n/aui_en_AU.js +31 -31
  89. package/src/js/aui/internal/i18n/aui_en_GB.js +31 -31
  90. package/src/js/aui/internal/i18n/aui_en_NZ.js +31 -31
  91. package/src/js/aui/internal/i18n/aui_eo.js +31 -31
  92. package/src/js/aui/internal/i18n/aui_es.js +31 -31
  93. package/src/js/aui/internal/i18n/aui_et.js +31 -31
  94. package/src/js/aui/internal/i18n/aui_eu.js +31 -31
  95. package/src/js/aui/internal/i18n/aui_fa.js +31 -31
  96. package/src/js/aui/internal/i18n/aui_fi.js +31 -31
  97. package/src/js/aui/internal/i18n/aui_fo.js +31 -31
  98. package/src/js/aui/internal/i18n/aui_fr.js +31 -31
  99. package/src/js/aui/internal/i18n/aui_fr_CH.js +31 -31
  100. package/src/js/aui/internal/i18n/aui_gl.js +31 -31
  101. package/src/js/aui/internal/i18n/aui_he.js +31 -31
  102. package/src/js/aui/internal/i18n/aui_hr.js +31 -31
  103. package/src/js/aui/internal/i18n/aui_hu.js +31 -31
  104. package/src/js/aui/internal/i18n/aui_hy.js +31 -31
  105. package/src/js/aui/internal/i18n/aui_id.js +31 -31
  106. package/src/js/aui/internal/i18n/aui_is.js +31 -31
  107. package/src/js/aui/internal/i18n/aui_it.js +31 -31
  108. package/src/js/aui/internal/i18n/aui_ja.js +31 -31
  109. package/src/js/aui/internal/i18n/aui_ko.js +31 -31
  110. package/src/js/aui/internal/i18n/aui_kz.js +31 -31
  111. package/src/js/aui/internal/i18n/aui_lt.js +31 -31
  112. package/src/js/aui/internal/i18n/aui_lv.js +31 -31
  113. package/src/js/aui/internal/i18n/aui_ml.js +31 -31
  114. package/src/js/aui/internal/i18n/aui_ms.js +31 -31
  115. package/src/js/aui/internal/i18n/aui_nl.js +31 -31
  116. package/src/js/aui/internal/i18n/aui_no.js +31 -31
  117. package/src/js/aui/internal/i18n/aui_pl.js +31 -31
  118. package/src/js/aui/internal/i18n/aui_pt.js +31 -31
  119. package/src/js/aui/internal/i18n/aui_pt_BR.js +31 -31
  120. package/src/js/aui/internal/i18n/aui_rm.js +31 -31
  121. package/src/js/aui/internal/i18n/aui_ro.js +31 -31
  122. package/src/js/aui/internal/i18n/aui_ru.js +31 -31
  123. package/src/js/aui/internal/i18n/aui_sk.js +31 -31
  124. package/src/js/aui/internal/i18n/aui_sl.js +31 -31
  125. package/src/js/aui/internal/i18n/aui_sq.js +31 -31
  126. package/src/js/aui/internal/i18n/aui_sr.js +31 -31
  127. package/src/js/aui/internal/i18n/aui_sr_SR.js +31 -31
  128. package/src/js/aui/internal/i18n/aui_sv.js +31 -31
  129. package/src/js/aui/internal/i18n/aui_ta.js +31 -31
  130. package/src/js/aui/internal/i18n/aui_th.js +31 -31
  131. package/src/js/aui/internal/i18n/aui_tj.js +31 -31
  132. package/src/js/aui/internal/i18n/aui_tr.js +31 -31
  133. package/src/js/aui/internal/i18n/aui_uk.js +31 -31
  134. package/src/js/aui/internal/i18n/aui_vi.js +31 -31
  135. package/src/js/aui/internal/i18n/aui_zh_CN.js +31 -31
  136. package/src/js/aui/internal/i18n/aui_zh_HK.js +31 -31
  137. package/src/js/aui/internal/i18n/aui_zh_TW.js +31 -31
  138. package/src/js/aui/internal/log.js +2 -6
  139. package/src/js/aui/internal/mediaQuery.js +2 -3
  140. package/src/js/aui/internal/select/option.js +3 -3
  141. package/src/js/aui/internal/select/suggestion-model.js +1 -1
  142. package/src/js/aui/internal/select/suggestions-model.js +4 -5
  143. package/src/js/aui/internal/select/suggestions-view.js +17 -12
  144. package/src/js/aui/internal/state.js +2 -3
  145. package/src/js/aui/is-clipped.js +2 -2
  146. package/src/js/aui/key-code.js +1 -1
  147. package/src/js/aui/label.js +6 -6
  148. package/src/js/aui/layer.js +100 -98
  149. package/src/js/aui/messages.js +51 -38
  150. package/src/js/aui/navigation.js +7 -9
  151. package/src/js/aui/on-text-resize.js +7 -5
  152. package/src/js/aui/params.js +11 -8
  153. package/src/js/aui/polyfills/custom-event.js +7 -7
  154. package/src/js/aui/polyfills/placeholder.js +4 -4
  155. package/src/js/aui/populate-parameters.js +4 -4
  156. package/src/js/aui/progress-indicator.js +35 -27
  157. package/src/js/aui/progressive-data-set.js +13 -8
  158. package/src/js/aui/query-input.js +1 -1
  159. package/src/js/aui/restful-table/class-names.js +1 -1
  160. package/src/js/aui/restful-table/data-keys.js +1 -1
  161. package/src/js/aui/restful-table/edit-row.js +63 -63
  162. package/src/js/aui/restful-table/entry-model.js +6 -13
  163. package/src/js/aui/restful-table/event-handlers.js +4 -8
  164. package/src/js/aui/restful-table/event-names.js +1 -1
  165. package/src/js/aui/restful-table/row.js +41 -23
  166. package/src/js/aui/restful-table.js +101 -72
  167. package/src/js/aui/result-set.js +5 -5
  168. package/src/js/aui/results-list.js +3 -3
  169. package/src/js/aui/select.js +65 -49
  170. package/src/js/aui/select2.js +14 -6
  171. package/src/js/aui/sidebar.js +81 -49
  172. package/src/js/aui/spin.js +61 -49
  173. package/src/js/aui/spinner.js +11 -12
  174. package/src/js/aui/tables-sortable.js +21 -10
  175. package/src/js/aui/tabs.js +108 -77
  176. package/src/js/aui/to-init.js +1 -1
  177. package/src/js/aui/toggle.js +55 -43
  178. package/src/js/aui/tooltip.js +19 -15
  179. package/src/js/aui/trigger.js +20 -18
  180. package/src/js/aui/truncating-progressive-data-set.js +1 -1
  181. package/src/js/aui/unbind-text-resize.js +1 -1
  182. package/src/js/aui/unique-id.js +1 -1
  183. package/src/js/aui/when-i-type.js +66 -39
  184. package/src/js/aui-css-deprecations.js +48 -48
  185. package/src/js/jquery/jquery.hotkeys.js +124 -49
  186. package/src/js/jquery/jquery.moveto.js +18 -12
  187. package/src/less/adg-fancy-file-input.less +2 -3
  188. package/src/less/adg-header-quicksearch.less +4 -1
  189. package/src/less/adg-iconfont.less +242 -242
  190. package/src/less/adgs-icons.less +262 -262
  191. package/src/less/aui-appheader.less +10 -5
  192. package/src/less/aui-buttons.less +6 -5
  193. package/src/less/aui-date-picker.less +9 -6
  194. package/src/less/aui-experimental-expander.less +8 -8
  195. package/src/less/aui-experimental-labels.less +4 -3
  196. package/src/less/aui-experimental-progress-indicator.less +10 -4
  197. package/src/less/aui-experimental-progress-tracker.less +9 -6
  198. package/src/less/aui-experimental-restfultable.less +11 -3
  199. package/src/less/aui-experimental-tables-sortable.less +5 -3
  200. package/src/less/aui-link.less +0 -1
  201. package/src/less/aui-lozenge.less +6 -3
  202. package/src/less/aui-navigation.less +13 -13
  203. package/src/less/aui-page-layout.less +3 -4
  204. package/src/less/aui-page-typography.less +8 -3
  205. package/src/less/aui-reset.less +22 -6
  206. package/src/less/aui-select2.less +9 -7
  207. package/src/less/aui-sidebar-badges.less +1 -2
  208. package/src/less/aui-sidebar-config.less +7 -2
  209. package/src/less/aui-sidebar-grouping.less +16 -6
  210. package/src/less/aui-sidebar-navigation.less +7 -5
  211. package/src/less/aui-sidebar-skeleton.less +4 -3
  212. package/src/less/aui-skip-link.less +2 -1
  213. package/src/less/aui-spinner.less +2 -2
  214. package/src/less/aui-toggle.less +2 -2
  215. package/src/less/aui-toolbar2.less +1 -1
  216. package/src/less/checkbox-multiselect.less +13 -13
  217. package/src/less/dialog.less +3 -3
  218. package/src/less/dialog2.less +12 -11
  219. package/src/less/dropdown2-temp.css +4 -4
  220. package/src/less/dropdown2.less +3 -3
  221. package/src/less/form-notification.less +10 -6
  222. package/src/less/forms-current.less +6 -5
  223. package/src/less/forms-legacy.less +4 -2
  224. package/src/less/forms-radios-and-checkboxes.less +9 -11
  225. package/src/less/forms.less +2 -4
  226. package/src/less/iconfont-mixin.less +7 -4
  227. package/src/less/imports/aui-theme/adg/adg-colors.less +40 -40
  228. package/src/less/imports/aui-theme/adg/adg-neutral-dark.less +20 -20
  229. package/src/less/imports/aui-theme/adg/adg-neutral-light.less +20 -20
  230. package/src/less/imports/aui-theme/components/buttons.less +5 -1
  231. package/src/less/imports/aui-theme/components/dropdown.less +3 -1
  232. package/src/less/imports/aui-theme/components/form-notification.less +2 -1
  233. package/src/less/imports/aui-theme/components/forms.less +16 -1
  234. package/src/less/imports/aui-theme/components/inline-dialog2.less +1 -1
  235. package/src/less/imports/aui-theme/components/navigation.less +3 -3
  236. package/src/less/imports/aui-theme/components/progress-tracker.less +6 -2
  237. package/src/less/imports/aui-theme/components/tables.less +3 -2
  238. package/src/less/imports/aui-theme/components/toggle.less +8 -3
  239. package/src/less/imports/aui-theme/core/colors.less +12 -4
  240. package/src/less/imports/aui-theme/core/icons.less +22 -22
  241. package/src/less/imports/aui-theme/core/text.less +6 -3
  242. package/src/less/imports/mixins/dropdown2-trigger-chevron-icon.less +0 -1
  243. package/src/less/imports/mixins/focus.less +12 -4
  244. package/src/less/imports/mixins/media-queries.less +2 -2
  245. package/src/less/imports/mixins/shadows.less +3 -1
  246. package/src/less/imports/mixins/tab-indicator.less +2 -2
  247. package/src/less/imports/mixins.less +11 -4
  248. package/src/less/inline-dialog.less +21 -19
  249. package/src/less/layer.less +0 -2
  250. package/src/less/messages.less +2 -1
  251. package/src/less/single-select.less +14 -9
  252. package/src/less/tables.less +3 -2
  253. package/src/less/tabs.less +4 -3
@@ -3,19 +3,21 @@ import '@atlassian/tipsy/src/javascripts/jquery.tipsy';
3
3
 
4
4
  const AUI_TOOLTIP_CLASS_NAME = 'aui-tooltip';
5
5
 
6
- function handleStringOption ($self, stringOption) {
6
+ function handleStringOption($self, stringOption) {
7
7
  // Pass string values straight to tipsy
8
8
  $self.tipsy(stringOption);
9
9
  return $self;
10
10
  }
11
11
 
12
- function bindTooltip ($self, options) {
12
+ function bindTooltip($self, options) {
13
13
  $self.tipsy(options);
14
14
 
15
- const triggerIsHover = options.trigger === 'hover' || !options.trigger && $self.tipsy.defaults.trigger === 'hover';
15
+ const triggerIsHover =
16
+ options.trigger === 'hover' ||
17
+ (!options.trigger && $self.tipsy.defaults.trigger === 'hover');
16
18
  const hideOnClick = options && options.hideOnClick && triggerIsHover;
17
19
  if (hideOnClick) {
18
- const onClick = function() {
20
+ const onClick = function () {
19
21
  $(this).tipsy('hide');
20
22
  };
21
23
 
@@ -28,7 +30,7 @@ function bindTooltip ($self, options) {
28
30
  return $self;
29
31
  }
30
32
 
31
- function getTipsyObject (el) {
33
+ function getTipsyObject(el) {
32
34
  return $(el).data('tipsy');
33
35
  }
34
36
 
@@ -38,7 +40,7 @@ function getTipsyObject (el) {
38
40
  * @param el
39
41
  * @returns {jQuery}
40
42
  */
41
- function maybeTooltip (el) {
43
+ function maybeTooltip(el) {
42
44
  const tipsy = getTipsyObject(el);
43
45
  if (tipsy) {
44
46
  return tipsy.$tip;
@@ -47,19 +49,24 @@ function maybeTooltip (el) {
47
49
  }
48
50
  }
49
51
 
50
- function findAllTooltips () {
52
+ function findAllTooltips() {
51
53
  return $(document.getElementsByClassName(AUI_TOOLTIP_CLASS_NAME));
52
54
  }
53
55
 
54
56
  $.fn.tooltip = function (options) {
55
- const allOptions = $.extend({}, $.fn.tooltip.defaults, typeof options === 'string' ? {} : options);
57
+ const allOptions = $.extend(
58
+ {},
59
+ $.fn.tooltip.defaults,
60
+ typeof options === 'string' ? {} : options
61
+ );
56
62
 
57
63
  // Always add AUI's tooltip class name to tipsies created by AUI.
58
64
  const { className } = allOptions;
59
65
  if (typeof className === 'string') {
60
- allOptions.className = `${AUI_TOOLTIP_CLASS_NAME} ${className}`
66
+ allOptions.className = `${AUI_TOOLTIP_CLASS_NAME} ${className}`;
61
67
  } else if (typeof className === 'function') {
62
- allOptions.className = (...args) => `${AUI_TOOLTIP_CLASS_NAME} ${className.apply(undefined, args)}`;
68
+ allOptions.className = (...args) =>
69
+ `${AUI_TOOLTIP_CLASS_NAME} ${className.apply(undefined, args)}`;
63
70
  } else {
64
71
  allOptions.className = AUI_TOOLTIP_CLASS_NAME;
65
72
  }
@@ -89,11 +96,8 @@ $.fn.tooltip.defaults = {
89
96
  delayIn: 500,
90
97
  hoverable: true,
91
98
  hideOnClick: true,
92
- aria: true
99
+ aria: true,
93
100
  };
94
101
 
95
102
  export default $;
96
- export {
97
- findAllTooltips,
98
- maybeTooltip
99
- };
103
+ export { findAllTooltips, maybeTooltip };
@@ -3,22 +3,22 @@ import keyCode from './key-code';
3
3
  import amdify from './internal/amdify';
4
4
  import skate from './internal/skate';
5
5
  import state from './internal/state';
6
- import { warn } from './internal/log'
6
+ import { warn } from './internal/log';
7
7
 
8
- export function getTrigger (element) {
8
+ export function getTrigger(element) {
9
9
  return state(element).get('last-trigger') || findControllers(element)[0];
10
10
  }
11
11
 
12
- export function setTrigger (element, trigger) {
12
+ export function setTrigger(element, trigger) {
13
13
  var validTrigger = trigger && trigger.nodeType && trigger.nodeType === 1;
14
14
  return state(element).set('last-trigger', validTrigger ? trigger : false);
15
15
  }
16
16
 
17
- export function hasTrigger (element) {
17
+ export function hasTrigger(element) {
18
18
  return !!getTrigger(element);
19
19
  }
20
20
 
21
- export function doIfTrigger (element, callback) {
21
+ export function doIfTrigger(element, callback) {
22
22
  var trigger = getTrigger(element);
23
23
 
24
24
  if (trigger) {
@@ -26,7 +26,7 @@ export function doIfTrigger (element, callback) {
26
26
  }
27
27
  }
28
28
 
29
- export function forEachTrigger (element, callback) {
29
+ export function forEachTrigger(element, callback) {
30
30
  return Array.prototype.forEach.call(findControllers(element), callback);
31
31
  }
32
32
 
@@ -41,7 +41,7 @@ function findControllers(element) {
41
41
 
42
42
  let controllers = [];
43
43
  let someFramesAreCrossOrigin = false;
44
- for (let i = 0 ; i < frames.length; i++) {
44
+ for (let i = 0; i < frames.length; i++) {
45
45
  try {
46
46
  let nodeList = frames[i].document.querySelectorAll(selector);
47
47
  controllers = controllers.concat(Array.prototype.slice.apply(nodeList));
@@ -51,15 +51,17 @@ function findControllers(element) {
51
51
  }
52
52
  }
53
53
  const currentDocumentControllers = document.querySelectorAll(selector);
54
- const allControllers = Array.prototype.slice.apply(currentDocumentControllers).concat(controllers);
54
+ const allControllers = Array.prototype.slice
55
+ .apply(currentDocumentControllers)
56
+ .concat(controllers);
55
57
  if (allControllers.length === 0 && someFramesAreCrossOrigin === true) {
56
58
  warn(
57
59
  [
58
60
  `No triggers found for element (${element.id}) in iframes from the same origin.`,
59
61
  'However some iframes in this document are cross-origin.',
60
- 'The trigger-element relations crossing the origin boundary are not supported.'
62
+ 'The trigger-element relations crossing the origin boundary are not supported.',
61
63
  ].join(' ')
62
- )
64
+ );
63
65
  }
64
66
  return allControllers;
65
67
  }
@@ -68,7 +70,7 @@ function findControlled(trigger) {
68
70
  return document.getElementById(trigger.getAttribute('aria-controls'));
69
71
  }
70
72
 
71
- function isEnabled (element) {
73
+ function isEnabled(element) {
72
74
  return element.getAttribute('aria-disabled') !== 'true';
73
75
  }
74
76
 
@@ -94,7 +96,7 @@ function msg(e, type) {
94
96
  target,
95
97
  currentTarget,
96
98
  relatedTarget,
97
- preventDefault: () => e.preventDefault()
99
+ preventDefault: () => e.preventDefault(),
98
100
  };
99
101
  }
100
102
 
@@ -133,16 +135,16 @@ const events = {
133
135
  triggerMessage(trigger, e);
134
136
  },
135
137
  blur(trigger, e) {
136
- if (focusingToControlledElement(trigger, e)){
138
+ if (focusingToControlledElement(trigger, e)) {
137
139
  return;
138
140
  }
139
141
  triggerMessage(trigger, e);
140
- }
142
+ },
141
143
  };
142
144
 
143
- Object.keys(events).forEach(function(name) {
145
+ Object.keys(events).forEach(function (name) {
144
146
  const handler = events[name];
145
- $(document).on(`${name}.aui-trigger`, '[data-aui-trigger]', function(e) {
147
+ $(document).on(`${name}.aui-trigger`, '[data-aui-trigger]', function (e) {
146
148
  handler(e.currentTarget, msg(e, name));
147
149
  });
148
150
  });
@@ -158,8 +160,8 @@ skate('data-aui-trigger', {
158
160
  },
159
161
  isEnabled: function () {
160
162
  return isEnabled(this);
161
- }
162
- }
163
+ },
164
+ },
163
165
  });
164
166
 
165
167
  amdify('aui/trigger');
@@ -54,7 +54,7 @@ var TruncatingProgressiveDataSet = ProgressiveDataSet.extend({
54
54
  }
55
55
 
56
56
  return null;
57
- }
57
+ },
58
58
  });
59
59
 
60
60
  globalize('TruncatingProgressiveDataSet', TruncatingProgressiveDataSet);
@@ -1,7 +1,7 @@
1
1
  import globalize from './internal/globalize';
2
2
  import onTextResize from './on-text-resize';
3
3
 
4
- function unbindTextResize (f) {
4
+ function unbindTextResize(f) {
5
5
  for (var i = 0, ii = onTextResize['on-text-resize'].length; i < ii; i++) {
6
6
  if (onTextResize['on-text-resize'][i] === f) {
7
7
  return onTextResize['on-text-resize'].splice(i, 1);
@@ -13,7 +13,7 @@ var uniqueIDcounter = 0;
13
13
  *
14
14
  * @returns {String}
15
15
  */
16
- function generateUniqueId (prefix) {
16
+ function generateUniqueId(prefix) {
17
17
  uniqueID = uniqueIDcounter++ + '';
18
18
  uniqueIDstring = prefix ? prefix + uniqueID : 'aui-uid-' + uniqueID;
19
19
 
@@ -12,7 +12,8 @@ const EMPTY_SELECTOR = false;
12
12
 
13
13
  var isMac = navigator.platform.indexOf('Mac') !== -1;
14
14
  var isSafari = navigator.userAgent.indexOf('Safari') !== -1;
15
- var multiCharRegex = /^(backspace|tab|r(ight|eturn)|s(hift|pace|croll)|c(trl|apslock)|alt|pa(use|ge(up|down))|e(sc|nd)|home|left|up|d(el|own)|insert|f\d\d?|numlock|meta)/i;
15
+ var multiCharRegex =
16
+ /^(backspace|tab|r(ight|eturn)|s(hift|pace|croll)|c(trl|apslock)|alt|pa(use|ge(up|down))|e(sc|nd)|home|left|up|d(el|own)|insert|f\d\d?|numlock|meta)/i;
16
17
 
17
18
  /**
18
19
  * Trigger native click event.
@@ -26,12 +27,27 @@ const triggerClickEvent = ($el) => {
26
27
  const bubbles = true;
27
28
  const cancelable = true;
28
29
  const event = document.createEvent('MouseEvent');
29
- event.initMouseEvent('click', bubbles, cancelable, window, 0, 0, 0, 0, 0, false, false, false, false, 0, null);
30
+ event.initMouseEvent(
31
+ 'click',
32
+ bubbles,
33
+ cancelable,
34
+ window,
35
+ 0,
36
+ 0,
37
+ 0,
38
+ 0,
39
+ 0,
40
+ false,
41
+ false,
42
+ false,
43
+ false,
44
+ 0,
45
+ null
46
+ );
30
47
  element.dispatchEvent(event);
31
48
  }
32
49
  };
33
50
 
34
-
35
51
  /**
36
52
  * Keyboard commands with syntactic sugar.
37
53
  *
@@ -43,7 +59,7 @@ const triggerClickEvent = ($el) => {
43
59
  *
44
60
  * @param keys - Key combinations, modifier keys are "+" deliminated. e.g "ctrl+b"
45
61
  */
46
- function whenIType (keys) {
62
+ function whenIType(keys) {
47
63
  var boundKeyCombos = [];
48
64
  var executor = $.Callbacks();
49
65
 
@@ -81,9 +97,8 @@ function whenIType (keys) {
81
97
  // bind a single key combo to this handler
82
98
  // A string like "abc 123" means (a then b then c) OR (1 then 2 then 3). abc is one key combo, 123 is another.
83
99
  function bindKeyCombo(keyCombo) {
84
- var keysArr = keyCombo instanceof Array ?
85
- keyCombo :
86
- keyComboArrayFromString(keyCombo.toString());
100
+ var keysArr =
101
+ keyCombo instanceof Array ? keyCombo : keyComboArrayFromString(keyCombo.toString());
87
102
  var eventType = hasUnprintables(keysArr) ? 'keydown' : 'keypress';
88
103
 
89
104
  boundKeyCombos.push(keysArr);
@@ -106,12 +121,10 @@ function whenIType (keys) {
106
121
  if (modifierMatch) {
107
122
  currModifiers += modifierMatch[0];
108
123
  keyString = keyString.substring(modifierMatch[0].length);
109
-
110
124
  } else if (multiCharMatch) {
111
125
  keysArr.push(currModifiers + multiCharMatch[0]);
112
126
  keyString = keyString.substring(multiCharMatch[0].length);
113
127
  currModifiers = '';
114
-
115
128
  } else {
116
129
  keysArr.push(currModifiers + keyString[0]);
117
130
  keyString = keyString.substring(1);
@@ -127,22 +140,35 @@ function whenIType (keys) {
127
140
  var title = elem.attr('title') || '';
128
141
  var keyCombos = boundKeyCombos.slice();
129
142
  var existingCombos = elem.data('boundKeyCombos') || [];
130
- var kbShortcutAppended = elem.data('kbShortcutAppended') || ''
131
- var kbShortcutAppendedScreenReader = elem.data('kbShortcutAppendedScreenReader') || ''
143
+ var kbShortcutAppended = elem.data('kbShortcutAppended') || '';
144
+ var kbShortcutAppendedScreenReader = elem.data('kbShortcutAppendedScreenReader') || '';
132
145
  var ariaLabel = elem.attr('aria-label');
133
146
  var isFirstShortcut = !kbShortcutAppended;
134
147
  var isFirstShortcutScreenReader = !kbShortcutAppendedScreenReader;
135
- var originalTitle = isFirstShortcut ? title : title.substring(0, title.length - kbShortcutAppended.length);
136
- var originalAriaLabel = isFirstShortcutScreenReader ? title : ariaLabel.substring(0, ariaLabel.length - kbShortcutAppendedScreenReader.length);
148
+ var originalTitle = isFirstShortcut
149
+ ? title
150
+ : title.substring(0, title.length - kbShortcutAppended.length);
151
+ var originalAriaLabel = isFirstShortcutScreenReader
152
+ ? title
153
+ : ariaLabel.substring(0, ariaLabel.length - kbShortcutAppendedScreenReader.length);
137
154
 
138
155
  while (keyCombos.length) {
139
156
  var keyCombo = keyCombos.shift();
140
- var comboAlreadyExists = existingCombos.some(function(existingCombo) {
157
+ var comboAlreadyExists = existingCombos.some(function (existingCombo) {
141
158
  return isEqual(keyCombo, existingCombo);
142
159
  });
143
160
  if (!comboAlreadyExists) {
144
- kbShortcutAppended = appendKeyComboInstructions(keyCombo.slice(), kbShortcutAppended, isFirstShortcut);
145
- kbShortcutAppendedScreenReader = appendKeyComboInstructions(keyCombo.slice(), kbShortcutAppendedScreenReader, isFirstShortcutScreenReader, { workaroundJaws: true });
161
+ kbShortcutAppended = appendKeyComboInstructions(
162
+ keyCombo.slice(),
163
+ kbShortcutAppended,
164
+ isFirstShortcut
165
+ );
166
+ kbShortcutAppendedScreenReader = appendKeyComboInstructions(
167
+ keyCombo.slice(),
168
+ kbShortcutAppendedScreenReader,
169
+ isFirstShortcutScreenReader,
170
+ { workaroundJaws: true }
171
+ );
146
172
  isFirstShortcut = false;
147
173
  isFirstShortcutScreenReader = false;
148
174
  }
@@ -150,15 +176,15 @@ function whenIType (keys) {
150
176
 
151
177
  if (isMac) {
152
178
  kbShortcutAppended = kbShortcutAppended
153
- .replace(/Meta/ig, '\u2318') //Apple cmd key
154
- .replace(/Shift/ig, '\u21E7'); //Apple Shift symbol
179
+ .replace(/Meta/gi, '\u2318') //Apple cmd key
180
+ .replace(/Shift/gi, '\u21E7'); //Apple Shift symbol
155
181
  kbShortcutAppendedScreenReader = kbShortcutAppendedScreenReader
156
- .replace(/Meta/ig, '\u2318') //Apple cmd key
157
- .replace(/Shift/ig, '\u21E7'); //Apple Shift symbol
182
+ .replace(/Meta/gi, '\u2318') //Apple cmd key
183
+ .replace(/Shift/gi, '\u21E7'); //Apple Shift symbol
158
184
  }
159
185
 
160
186
  elem.attr('title', originalTitle + kbShortcutAppended);
161
- elem.attr('aria-label', originalAriaLabel + kbShortcutAppendedScreenReader)
187
+ elem.attr('aria-label', originalAriaLabel + kbShortcutAppendedScreenReader);
162
188
  elem.data('kbShortcutAppended', kbShortcutAppended);
163
189
  elem.data('kbShortcutAppendedScreenReader', kbShortcutAppendedScreenReader);
164
190
  elem.data('boundKeyCombos', existingCombos.concat(boundKeyCombos));
@@ -190,7 +216,10 @@ function whenIType (keys) {
190
216
  }
191
217
 
192
218
  if (isFirst) {
193
- title += ' ' + openParenthesis + I18n.getText('aui.keyboard.shortcut.type.x', keyCombo.shift());
219
+ title +=
220
+ ' ' +
221
+ openParenthesis +
222
+ I18n.getText('aui.keyboard.shortcut.type.x', keyCombo.shift());
194
223
  } else {
195
224
  title = title.replace(/\)$/, '');
196
225
  title += ' ' + I18n.getText('aui.keyboard.shortcut.or.x', keyCombo.shift());
@@ -212,7 +241,7 @@ function whenIType (keys) {
212
241
  addShortcutsToTitle: addShortcutsToTitle,
213
242
  removeShortcutsFromTitle: removeShortcutsFromTitle,
214
243
  keypressHandler: keypressHandler,
215
- defaultPreventionHandler: defaultPreventionHandler
244
+ defaultPreventionHandler: defaultPreventionHandler,
216
245
  });
217
246
  }
218
247
 
@@ -234,10 +263,9 @@ whenIType.makeShortcut = function (options) {
234
263
  var escToCancel = options.hasOwnProperty('escToCancel') ? options.escToCancel : true;
235
264
 
236
265
  executor.add(function () {
237
-
238
266
  const $items = $(selector);
239
267
  let $focusedElem = $items.filter('.' + focusedClass);
240
- const moveToOptions = $focusedElem.length === 0 ? undefined : {transition: true};
268
+ const moveToOptions = $focusedElem.length === 0 ? undefined : { transition: true };
241
269
 
242
270
  if (escToCancel) {
243
271
  $(document).one('keydown', function (e) {
@@ -268,7 +296,6 @@ whenIType.makeShortcut = function (options) {
268
296
  }
269
297
 
270
298
  return {
271
-
272
299
  /**
273
300
  * Scrolls to and adds <em>focused</em> class to the next item in the jQuery collection
274
301
  *
@@ -282,7 +309,6 @@ whenIType.makeShortcut = function (options) {
282
309
 
283
310
  if (wrapAround && $focusedElem.length === 0) {
284
311
  return $items.eq(0);
285
-
286
312
  } else {
287
313
  index = $.inArray($focusedElem.get(0), $items);
288
314
  if (index < $items.length - 1) {
@@ -307,7 +333,6 @@ whenIType.makeShortcut = function (options) {
307
333
  var index;
308
334
  if (wrapAround && $focusedElem.length === 0) {
309
335
  return $items.filter(':last');
310
-
311
336
  } else {
312
337
  index = $.inArray($focusedElem.get(0), $items);
313
338
  if (index > 0) {
@@ -366,7 +391,7 @@ whenIType.makeShortcut = function (options) {
366
391
 
367
392
  executor.add(function () {
368
393
  var elem = $(selector)[0];
369
- if (elem && {'a': true, 'link': true}[ elem.nodeName.toLowerCase() ]) {
394
+ if (elem && { a: true, link: true }[elem.nodeName.toLowerCase()]) {
370
395
  window.location.href = elem.href;
371
396
  }
372
397
  });
@@ -473,7 +498,7 @@ whenIType.makeShortcut = function (options) {
473
498
  removeShortcutsFromTitle(selectorsWithTitlesModified[i]);
474
499
  }
475
500
  selectorsWithTitlesModified = [];
476
- }
501
+ },
477
502
  };
478
503
  };
479
504
 
@@ -517,7 +542,7 @@ whenIType.fromJSON = function (json, switchCtrlToMetaOnMac) {
517
542
  var shortcuts = [];
518
543
 
519
544
  if (json) {
520
- $.each(json, function (i,item) {
545
+ $.each(json, function (i, item) {
521
546
  const operation = item.op;
522
547
  const param = item.param;
523
548
  let params;
@@ -525,25 +550,28 @@ whenIType.fromJSON = function (json, switchCtrlToMetaOnMac) {
525
550
  if (operation === 'execute' || operation === 'evaluate') {
526
551
  // need to turn function string into function object
527
552
  params = [new Function(param)];
528
-
529
553
  } else if (/^\[[^\]\[]*,[^\]\[]*\]$/.test(param)) {
530
554
  // pass in an array to send multiple params
531
555
  try {
532
556
  params = JSON.parse(param);
533
557
  } catch (e) {
534
- logger.error('When using a parameter array, array must be in strict JSON format: ' + param);
558
+ logger.error(
559
+ 'When using a parameter array, array must be in strict JSON format: ' +
560
+ param
561
+ );
535
562
  }
536
563
 
537
564
  if (!$.isArray(params)) {
538
- logger.error('Badly formatted shortcut parameter. String or JSON Array of parameters required: ' + param);
565
+ logger.error(
566
+ 'Badly formatted shortcut parameter. String or JSON Array of parameters required: ' +
567
+ param
568
+ );
539
569
  }
540
-
541
570
  } else {
542
571
  params = [param];
543
572
  }
544
573
 
545
574
  $.each(item.keys, function () {
546
-
547
575
  var shortcutList = this;
548
576
  if (switchCtrlToMetaOnMac && isMac) {
549
577
  shortcutList = $.map(shortcutList, function (shortcutString) {
@@ -555,7 +583,6 @@ whenIType.fromJSON = function (json, switchCtrlToMetaOnMac) {
555
583
  newShortcut[operation].apply(newShortcut, params);
556
584
  shortcuts.push(newShortcut);
557
585
  });
558
-
559
586
  });
560
587
  }
561
588
 
@@ -577,8 +604,8 @@ $(document).on('iframeAppended', function (e, iframe) {
577
604
  $.event.trigger(
578
605
  e,
579
606
  arguments, // Preserve original event data.
580
- document, // Bubble this event from the iframe's document to its parent document.
581
- true // Use the capturing phase to preserve original event.target.
607
+ document, // Bubble this event from the iframe's document to its parent document.
608
+ true // Use the capturing phase to preserve original event.target.
582
609
  );
583
610
  }
584
611
  });
@@ -2,55 +2,56 @@ import { css } from './aui/internal/deprecation';
2
2
  import deprecatedAdg2Icons from './aui/internal/deprecation/deprecated-adg2-icons';
3
3
 
4
4
  css('.aui-message span.aui-icon', {
5
- displayName: 'Message icon span'
5
+ displayName: 'Message icon span',
6
6
  });
7
7
  css('.aui-tabs.vertical-tabs', {
8
- displayName: 'Vertical tabs'
8
+ displayName: 'Vertical tabs',
9
9
  });
10
10
  css('form.aui span.content');
11
- css([
12
- 'form.aui .button',
13
- 'form.aui .buttons-container'
14
- ], {
11
+ css(['form.aui .button', 'form.aui .buttons-container'], {
15
12
  displayName: 'Unprefixed buttons',
16
13
  alternativeName: 'aui-button and aui-buttons',
17
14
  removeInVersion: '10.0.0',
18
15
  });
19
- css([
20
- 'form.aui .icon-date',
21
- 'form.aui .icon-range',
22
- 'form.aui .icon-help',
23
- 'form.aui .icon-required',
24
- 'form.aui .icon-inline-help',
25
- 'form.aui .icon-users',
26
- '.aui-icon-date',
27
- '.aui-icon-range',
28
- '.aui-icon-help',
29
- '.aui-icon-required',
30
- '.aui-icon-users',
31
- '.aui-icon-inline-help'
32
- ], {
33
- displayName: 'Form icons'
34
- });
35
- css([
36
- '.aui-dropdown2 .active',
37
- '.aui-dropdown2 .checked',
38
- '.aui-dropdown2 .disabled',
39
- '.aui-dropdown2 .interactive'
40
- ], {
41
- displayName: 'Unprefixed dropdown2 css AUI-2150',
42
- removeInVersion: '10.0.0'
43
- });
44
-
45
-
16
+ css(
17
+ [
18
+ 'form.aui .icon-date',
19
+ 'form.aui .icon-range',
20
+ 'form.aui .icon-help',
21
+ 'form.aui .icon-required',
22
+ 'form.aui .icon-inline-help',
23
+ 'form.aui .icon-users',
24
+ '.aui-icon-date',
25
+ '.aui-icon-range',
26
+ '.aui-icon-help',
27
+ '.aui-icon-required',
28
+ '.aui-icon-users',
29
+ '.aui-icon-inline-help',
30
+ ],
31
+ {
32
+ displayName: 'Form icons',
33
+ }
34
+ );
35
+ css(
36
+ [
37
+ '.aui-dropdown2 .active',
38
+ '.aui-dropdown2 .checked',
39
+ '.aui-dropdown2 .disabled',
40
+ '.aui-dropdown2 .interactive',
41
+ ],
42
+ {
43
+ displayName: 'Unprefixed dropdown2 css AUI-2150',
44
+ removeInVersion: '10.0.0',
45
+ }
46
+ );
46
47
 
47
48
  // 5.9.0
48
49
  // -----
49
50
 
50
51
  var fiveNineZero = {
51
52
  // Inline Dialog
52
- 'arrow': 'aui-inline-dialog-arrow',
53
- 'contents': 'aui-inline-dialog-contents',
53
+ arrow: 'aui-inline-dialog-arrow',
54
+ contents: 'aui-inline-dialog-contents',
54
55
  };
55
56
  var name;
56
57
 
@@ -59,7 +60,7 @@ for (name in fiveNineZero) {
59
60
  css(name, {
60
61
  alternativeName: fiveNineZero[name],
61
62
  removeVersion: '10.0.0',
62
- sinceVersion: '5.9.0'
63
+ sinceVersion: '5.9.0',
63
64
  });
64
65
  }
65
66
  }
@@ -72,39 +73,38 @@ css('.aui-badge', {
72
73
  alternativeName: 'aui-badge',
73
74
  sinceVersion: '7.1.0',
74
75
  removeInVersion: '10.0.0',
75
- extraInfo: 'The badge pattern is best used as a web component instead of a CSS class'
76
+ extraInfo: 'The badge pattern is best used as a web component instead of a CSS class',
76
77
  });
77
78
 
78
79
  // 7.5.0
79
80
  // -----
80
81
 
81
- css([
82
- '.aui-iconfont-image-extrasmall',
83
- ], {
82
+ css(['.aui-iconfont-image-extrasmall'], {
84
83
  displayName: 'Special size icon names',
85
84
  sinceVersion: '7.5.0',
86
85
  removeInVersion: '10.0.0',
87
- extraInfo: 'The only size variant allowed for icon names is `-small`.'
86
+ extraInfo: 'The only size variant allowed for icon names is `-small`.',
88
87
  });
89
88
 
90
89
  // New ADGS names for the old ADG2 icon
91
- deprecatedAdg2Icons.forEach(({ newName, oldName }) => (
90
+ deprecatedAdg2Icons.forEach(({ newName, oldName }) =>
92
91
  css(`.aui-iconfont-${oldName}`, {
93
92
  displayName: 'ADG2 icon',
94
93
  alternativeName: `.aui-iconfont-${newName}`,
95
94
  sinceVersion: '7.5.0',
96
95
  removeVersion: '10.0.0',
97
- extraInfo: 'Use the new ADGS icon CSS class name'
96
+ extraInfo: 'Use the new ADGS icon CSS class name',
98
97
  })
99
- ));
98
+ );
100
99
 
101
100
  // 7.8.0
102
101
  css('.aui-table-interactive', {
103
102
  alternativeName: '.aui-table-list',
104
103
  sinceVersion: '7.8.0',
105
104
  removeInVersion: '10.0.0',
106
- extraInfo: 'The "interactive" suffix caused some confusion when contrasted with sortable tables.' +
107
- 'The name has been updated to reflect its intended purpose: displaying lists of data in a tabular format.'
105
+ extraInfo:
106
+ 'The "interactive" suffix caused some confusion when contrasted with sortable tables.' +
107
+ 'The name has been updated to reflect its intended purpose: displaying lists of data in a tabular format.',
108
108
  });
109
109
 
110
110
  // 7.9.4
@@ -113,7 +113,7 @@ css('aui-spinner[filled]', {
113
113
  removeInVersion: '10.0.0',
114
114
  extraInfo: `Add CSS to the parent element of the <aui-spinner>.
115
115
  Use CSS flexbox or grid to vertically align it.
116
- See https://css-tricks.com/centering-css-complete-guide/ for techniques.`
116
+ See https://css-tricks.com/centering-css-complete-guide/ for techniques.`,
117
117
  });
118
118
 
119
119
  //8.4.0
@@ -121,5 +121,5 @@ See https://css-tricks.com/centering-css-complete-guide/ for techniques.`
121
121
  css('.aui-button-light', {
122
122
  sinceVersion: '8.4.0',
123
123
  removeInVersion: '10.0.0',
124
- extraInfo: 'ADGS allows only for normal and subtle buttons.'
124
+ extraInfo: 'ADGS allows only for normal and subtle buttons.',
125
125
  });