@atlassian/aui 10.0.4 → 10.1.1

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 (34) hide show
  1. package/dist/aui/aui-css-deprecations.js +3 -1
  2. package/dist/aui/aui-css-deprecations.js.map +1 -1
  3. package/dist/aui/aui-prototyping-browserfocus.css +1 -1
  4. package/dist/aui/aui-prototyping-browserfocus.css.map +1 -1
  5. package/dist/aui/aui-prototyping-design-tokens-api-full.js +4 -10
  6. package/dist/aui/aui-prototyping-design-tokens-api-full.js.map +1 -1
  7. package/dist/aui/aui-prototyping-design-tokens-api.js +1 -10
  8. package/dist/aui/aui-prototyping-design-tokens-api.js.map +1 -1
  9. package/dist/aui/aui-prototyping-design-tokens-compatibility.css.map +1 -1
  10. package/dist/aui/aui-prototyping.css +6 -6
  11. package/dist/aui/aui-prototyping.css.map +1 -1
  12. package/dist/aui/aui-prototyping.js +64 -104
  13. package/dist/aui/aui-prototyping.js.map +1 -1
  14. package/dist/aui/aui-prototyping.nodeps.css +6 -6
  15. package/dist/aui/aui-prototyping.nodeps.css.map +1 -1
  16. package/dist/aui/aui-prototyping.nodeps.js +64 -104
  17. package/dist/aui/aui-prototyping.nodeps.js.map +1 -1
  18. package/package.json +8 -7
  19. package/src/js/aui/blanket.js +1 -1
  20. package/src/js/aui/flag.js +1 -1
  21. package/src/js/aui/form-validation.js +1 -1
  22. package/src/js/aui/inline-dialog.js +30 -23
  23. package/src/js/aui/layer.js +1 -1
  24. package/src/js/aui/query-input.js +1 -1
  25. package/src/js/aui/restful-table/entry-model.js +2 -2
  26. package/src/js/aui/restful-table/event-handlers.js +1 -1
  27. package/src/js/aui/restful-table/row.js +1 -1
  28. package/src/js/aui/restful-table.js +2 -2
  29. package/src/js/aui/select2.js +3 -3
  30. package/src/js/aui/tabs.js +2 -2
  31. package/src/js/aui/when-i-type.js +2 -2
  32. package/src/js-vendor-effective/jquery.hotkeys/jquery.hotkeys.js +2 -2
  33. package/src/js-vendor-effective/select2/select2.js +31 -29
  34. package/src/js-vendor-effective/tablesorter/jquery.tablesorter.js +35 -35
@@ -186,7 +186,7 @@
186
186
  text = node.textContent || node.innerText || $(node).text() || "";
187
187
  }
188
188
  }
189
- return $.trim(text);
189
+ return (text === undefined || text === null) ? "" : text.trim();
190
190
  }
191
191
 
192
192
  function detectParserForColumn(table, rows, rowIndex, cellIndex) {
@@ -330,7 +330,7 @@
330
330
  $row.prev().addClass(ts.css.cssHasChild);
331
331
  }
332
332
  // save child row content (un-parsed!)
333
- rowData.child[t] = $.trim( $row[0].textContent || $row[0].innerText || $row.text() || "" );
333
+ rowData.child[t] = ( $row[0].textContent || $row[0].innerText || $row.text() || "" ).trim();
334
334
  // go to the next for loop
335
335
  continue;
336
336
  }
@@ -807,7 +807,7 @@
807
807
  if (table.isUpdating) {
808
808
  $table.trigger('updateComplete', table);
809
809
  }
810
- if ($.isFunction(callback)) {
810
+ if (typeof callback === 'function') {
811
811
  callback($table[0]);
812
812
  }
813
813
  }
@@ -831,18 +831,18 @@
831
831
  $table = c.$table;
832
832
  // apply easy methods that trigger bound events
833
833
  $table
834
- .unbind('sortReset update updateRows updateCell updateAll addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave '.split(' ').join(c.namespace + ' '))
835
- .bind("sortReset" + c.namespace, function(e, callback){
834
+ .off('sortReset update updateRows updateCell updateAll addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave '.split(' ').join(c.namespace + ' '))
835
+ .on("sortReset" + c.namespace, function(e, callback){
836
836
  e.stopPropagation();
837
837
  c.sortList = [];
838
838
  setHeadersCss(table);
839
839
  multisort(table);
840
840
  appendToTable(table);
841
- if ($.isFunction(callback)) {
841
+ if (typeof callback === 'function') {
842
842
  callback(table);
843
843
  }
844
844
  })
845
- .bind("updateAll" + c.namespace, function(e, resort, callback){
845
+ .on("updateAll" + c.namespace, function(e, resort, callback){
846
846
  e.stopPropagation();
847
847
  table.isUpdating = true;
848
848
  ts.refreshWidgets(table, true, true);
@@ -852,14 +852,14 @@
852
852
  bindMethods(table);
853
853
  commonUpdate(table, resort, callback);
854
854
  })
855
- .bind("update" + c.namespace + " updateRows" + c.namespace, function(e, resort, callback) {
855
+ .on("update" + c.namespace + " updateRows" + c.namespace, function(e, resort, callback) {
856
856
  e.stopPropagation();
857
857
  table.isUpdating = true;
858
858
  // update sorting (if enabled/disabled)
859
859
  updateHeader(table);
860
860
  commonUpdate(table, resort, callback);
861
861
  })
862
- .bind("updateCell" + c.namespace, function(e, cell, resort, callback) {
862
+ .on("updateCell" + c.namespace, function(e, cell, resort, callback) {
863
863
  e.stopPropagation();
864
864
  table.isUpdating = true;
865
865
  $table.find(c.selectorRemove).remove();
@@ -892,7 +892,7 @@
892
892
  checkResort($table, resort, callback);
893
893
  }
894
894
  })
895
- .bind("addRows" + c.namespace, function(e, $row, resort, callback) {
895
+ .on("addRows" + c.namespace, function(e, $row, resort, callback) {
896
896
  e.stopPropagation();
897
897
  table.isUpdating = true;
898
898
  if (isEmptyObject(c.cache)) {
@@ -941,10 +941,10 @@
941
941
  checkResort($table, resort, callback);
942
942
  }
943
943
  })
944
- .bind("updateComplete" + c.namespace, function(){
944
+ .on("updateComplete" + c.namespace, function(){
945
945
  table.isUpdating = false;
946
946
  })
947
- .bind("sorton" + c.namespace, function(e, list, callback, init) {
947
+ .on("sorton" + c.namespace, function(e, list, callback, init) {
948
948
  var c = table.config;
949
949
  e.stopPropagation();
950
950
  $table.trigger("sortStart", this);
@@ -960,46 +960,46 @@
960
960
  appendToTable(table, init);
961
961
  $table.trigger("sortEnd", this);
962
962
  ts.applyWidget(table);
963
- if ($.isFunction(callback)) {
963
+ if (typeof callback === 'function') {
964
964
  callback(table);
965
965
  }
966
966
  })
967
- .bind("appendCache" + c.namespace, function(e, callback, init) {
967
+ .on("appendCache" + c.namespace, function(e, callback, init) {
968
968
  e.stopPropagation();
969
969
  appendToTable(table, init);
970
- if ($.isFunction(callback)) {
970
+ if (typeof callback === 'function') {
971
971
  callback(table);
972
972
  }
973
973
  })
974
- .bind("updateCache" + c.namespace, function(e, callback){
974
+ .on("updateCache" + c.namespace, function(e, callback){
975
975
  // rebuild parsers
976
976
  if (!(c.parsers && c.parsers.length)) {
977
977
  buildParserCache(table);
978
978
  }
979
979
  // rebuild the cache map
980
980
  buildCache(table);
981
- if ($.isFunction(callback)) {
981
+ if (typeof callback === 'function') {
982
982
  callback(table);
983
983
  }
984
984
  })
985
- .bind("applyWidgetId" + c.namespace, function(e, id) {
985
+ .on("applyWidgetId" + c.namespace, function(e, id) {
986
986
  e.stopPropagation();
987
987
  ts.getWidgetById(id).format(table, c, c.widgetOptions);
988
988
  })
989
- .bind("applyWidgets" + c.namespace, function(e, init) {
989
+ .on("applyWidgets" + c.namespace, function(e, init) {
990
990
  e.stopPropagation();
991
991
  // apply widgets
992
992
  ts.applyWidget(table, init);
993
993
  })
994
- .bind("refreshWidgets" + c.namespace, function(e, all, dontapply){
994
+ .on("refreshWidgets" + c.namespace, function(e, all, dontapply){
995
995
  e.stopPropagation();
996
996
  ts.refreshWidgets(table, all, dontapply);
997
997
  })
998
- .bind("destroy" + c.namespace, function(e, c, cb){
998
+ .on("destroy" + c.namespace, function(e, c, cb){
999
999
  e.stopPropagation();
1000
1000
  ts.destroy(table, c, cb);
1001
1001
  })
1002
- .bind("resetToLoadState" + c.namespace, function(){
1002
+ .on("resetToLoadState" + c.namespace, function(){
1003
1003
  // remove all widgets
1004
1004
  ts.refreshWidgets(table, true, true);
1005
1005
  // restore original settings; this clears out current settings, but does not clear
@@ -1144,8 +1144,8 @@
1144
1144
  // show processesing icon
1145
1145
  if (c.showProcessing) {
1146
1146
  $table
1147
- .unbind('sortBegin' + c.namespace + ' sortEnd' + c.namespace)
1148
- .bind('sortBegin' + c.namespace + ' sortEnd' + c.namespace, function(e) {
1147
+ .off('sortBegin' + c.namespace + ' sortEnd' + c.namespace)
1148
+ .on('sortBegin' + c.namespace + ' sortEnd' + c.namespace, function(e) {
1149
1149
  clearTimeout(c.processTimer);
1150
1150
  ts.isProcessing(table);
1151
1151
  if (e.type === 'sortBegin') {
@@ -1291,8 +1291,8 @@
1291
1291
  $headers
1292
1292
  // http://stackoverflow.com/questions/5312849/jquery-find-self;
1293
1293
  .find(c.selectorSort).add( $headers.filter(c.selectorSort) )
1294
- .unbind('mousedown mouseup sort keyup '.split(' ').join(c.namespace + ' '))
1295
- .bind('mousedown mouseup sort keyup '.split(' ').join(c.namespace + ' '), function(e, external) {
1294
+ .off('mousedown mouseup sort keyup '.split(' ').join(c.namespace + ' '))
1295
+ .on('mousedown mouseup sort keyup '.split(' ').join(c.namespace + ' '), function(e, external) {
1296
1296
  var cell, type = e.type;
1297
1297
  // only recognize left clicks or enter
1298
1298
  if ( ((e.which || e.button) !== 1 && !/sort|keyup/.test(type)) || (type === 'keyup' && e.which !== 13) ) {
@@ -1318,7 +1318,7 @@
1318
1318
  // cancel selection
1319
1319
  $headers
1320
1320
  .attr('unselectable', 'on')
1321
- .bind('selectstart', false)
1321
+ .on('selectstart', false)
1322
1322
  .css({
1323
1323
  'user-select': 'none',
1324
1324
  'MozUserSelect': 'none' // not needed for jQuery 1.8+
@@ -1358,13 +1358,13 @@
1358
1358
  // disable tablesorter
1359
1359
  $t
1360
1360
  .removeData('tablesorter')
1361
- .unbind('sortReset update updateAll updateRows updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave keypress sortBegin sortEnd resetToLoadState '.split(' ').join(c.namespace + ' '));
1361
+ .off('sortReset update updateAll updateRows updateCell addRows updateComplete sorton appendCache updateCache applyWidgetId applyWidgets refreshWidgets destroy mouseup mouseleave keypress sortBegin sortEnd resetToLoadState '.split(' ').join(c.namespace + ' '));
1362
1362
  c.$headers.add($f)
1363
1363
  .removeClass( [ts.css.header, c.cssHeader, c.cssAsc, c.cssDesc, ts.css.sortAsc, ts.css.sortDesc, ts.css.sortNone].join(' ') )
1364
1364
  .removeAttr('data-column')
1365
1365
  .removeAttr('aria-label')
1366
1366
  .attr('aria-disabled', 'true');
1367
- $r.find(c.selectorSort).unbind('mousedown mouseup keypress '.split(' ').join(c.namespace + ' '));
1367
+ $r.find(c.selectorSort).off('mousedown mouseup keypress '.split(' ').join(c.namespace + ' '));
1368
1368
  ts.restoreHeaders(table);
1369
1369
  $t.toggleClass(ts.css.table + ' ' + c.tableClass + ' tablesorter-' + c.theme, removeClasses === false);
1370
1370
  // clear flag in case the plugin is initialized again
@@ -1671,7 +1671,7 @@
1671
1671
  // include sorter class name "sorter-text", etc; now works with "sorter-my-custom-parser"
1672
1672
  val = cl.match( new RegExp('\\s' + key + '-([\\w-]+)') )[1] || '';
1673
1673
  }
1674
- return $.trim(val);
1674
+ return (val === undefined || val === null) ? "" : val.trim();
1675
1675
  };
1676
1676
 
1677
1677
  ts.formatFloat = function(s, table) {
@@ -1694,7 +1694,7 @@
1694
1694
  }
1695
1695
  i = parseFloat(s);
1696
1696
  // return the text instead of zero
1697
- return isNaN(i) ? $.trim(s) : i;
1697
+ return isNaN(i) ? s.trim() : i;
1698
1698
  };
1699
1699
 
1700
1700
  ts.isDigit = function(s) {
@@ -1733,7 +1733,7 @@
1733
1733
  format: function(s, table) {
1734
1734
  var c = table.config;
1735
1735
  if (s) {
1736
- s = $.trim( c.ignoreCase ? s.toLocaleLowerCase() : s );
1736
+ s = ( c.ignoreCase ? s.toLocaleLowerCase() : s ).trim();
1737
1737
  s = c.sortLocaleCompare ? ts.replaceAccents(s) : s;
1738
1738
  }
1739
1739
  return s;
@@ -1748,7 +1748,7 @@
1748
1748
  },
1749
1749
  format: function(s, table) {
1750
1750
  var n = ts.formatFloat((s || '').replace(/[^\w,. \-()]/g, ""), table);
1751
- return s && typeof n === 'number' ? n : s ? $.trim( s && table.config.ignoreCase ? s.toLocaleLowerCase() : s ) : s;
1751
+ return s && typeof n === 'number' ? n : s ? ( s && table.config.ignoreCase ? s.toLocaleLowerCase() : s ).trim() : s;
1752
1752
  },
1753
1753
  type: "numeric"
1754
1754
  });
@@ -1760,7 +1760,7 @@
1760
1760
  },
1761
1761
  format: function(s, table) {
1762
1762
  var n = ts.formatFloat((s || '').replace(/[^\w,. \-()]/g, ""), table);
1763
- return s && typeof n === 'number' ? n : s ? $.trim( s && table.config.ignoreCase ? s.toLocaleLowerCase() : s ) : s;
1763
+ return s && typeof n === 'number' ? n : s ? ( s && table.config.ignoreCase ? s.toLocaleLowerCase() : s ).trim() : s;
1764
1764
  },
1765
1765
  type: "numeric"
1766
1766
  });
@@ -1788,7 +1788,7 @@
1788
1788
  return (/^(https?|ftp|file):\/\//).test(s);
1789
1789
  },
1790
1790
  format: function(s) {
1791
- return s ? $.trim(s.replace(/(https?|ftp|file):\/\//, '')) : s;
1791
+ return s ? s.replace(/(https?|ftp|file):\/\//, '').trim() : s;
1792
1792
  },
1793
1793
  parsed : true, // filter widget flag
1794
1794
  type: "text"