@atlassian/aui 9.3.5 → 9.3.8
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/dist/aui/aui-css-deprecations.js +1 -1
- package/dist/aui/aui-css-deprecations.js.map +1 -1
- package/dist/aui/aui-prototyping.css +1 -1
- package/dist/aui/aui-prototyping.js +19 -19
- package/dist/aui/aui-prototyping.js.map +1 -1
- package/dist/aui/aui-prototyping.nodeps.css +2 -2
- package/dist/aui/aui-prototyping.nodeps.js +19 -19
- package/dist/aui/aui-prototyping.nodeps.js.map +1 -1
- package/package.json +2 -2
- package/src/js/aui/header-async.js +8 -3
- package/src/js/aui/i18n.js +6 -2
- package/src/js/aui/internal/globalize.js +20 -3
- package/src/js-vendor/jquery/plugins/jquery.form.js +7 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlassian/aui",
|
|
3
3
|
"description": "Atlassian User Interface library",
|
|
4
|
-
"version": "9.3.
|
|
4
|
+
"version": "9.3.8",
|
|
5
5
|
"author": "Atlassian Pty Ltd.",
|
|
6
6
|
"homepage": "https://aui.atlassian.com",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"backbone": "1.4.0",
|
|
39
39
|
"css.escape": "1.5.0",
|
|
40
40
|
"fancy-file-input": "2.0.4",
|
|
41
|
-
"jquery-ui": "1.
|
|
41
|
+
"jquery-ui": "1.13.0",
|
|
42
42
|
"skatejs": "0.13.17",
|
|
43
43
|
"skatejs-template-html": "0.0.0",
|
|
44
44
|
"trim-extra-html-whitespace": "1.3.0",
|
|
@@ -1,10 +1,15 @@
|
|
|
1
1
|
import createHeader from './internal/header/create-header';
|
|
2
2
|
import skate from './internal/skate';
|
|
3
3
|
|
|
4
|
-
const Header = skate('aui-header', {
|
|
5
|
-
type: skate.type.
|
|
4
|
+
const Header = skate('aui-header-end', {
|
|
5
|
+
type: skate.type.ELEMENT,
|
|
6
6
|
created: function (element) {
|
|
7
|
-
|
|
7
|
+
const auiHeader = element.parentElement;
|
|
8
|
+
if (auiHeader && auiHeader.classList.contains('aui-header')) {
|
|
9
|
+
createHeader(auiHeader);
|
|
10
|
+
} else {
|
|
11
|
+
console.log('Could not async. initialise aui-header');
|
|
12
|
+
}
|
|
8
13
|
}
|
|
9
14
|
});
|
|
10
15
|
|
package/src/js/aui/i18n.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import format from './format';
|
|
2
|
-
import
|
|
2
|
+
import { putOnI18nIfAbsent } from './internal/globalize';
|
|
3
3
|
import keys from './internal/i18n/aui';
|
|
4
4
|
|
|
5
5
|
/**
|
|
@@ -29,4 +29,8 @@ export {
|
|
|
29
29
|
* aliases for I18n or export it from here using 'default'. Webpack transforms it then to
|
|
30
30
|
* 'd.default.getText' and it won't match.
|
|
31
31
|
**/
|
|
32
|
-
|
|
32
|
+
// eslint-disable-next-line guard-for-in
|
|
33
|
+
for (const property in I18n) {
|
|
34
|
+
// AUI-5431 Add to global namespace, but do not override what is set by the WRM
|
|
35
|
+
putOnI18nIfAbsent(property, I18n[property]);
|
|
36
|
+
}
|
|
@@ -1,4 +1,11 @@
|
|
|
1
1
|
const NAMESPACE = 'AJS';
|
|
2
|
+
const I18N_OBJECT_NAME = 'I18n';
|
|
3
|
+
|
|
4
|
+
function initNamespace() {
|
|
5
|
+
if (typeof window[NAMESPACE] !== 'object') {
|
|
6
|
+
window[NAMESPACE] = {};
|
|
7
|
+
}
|
|
8
|
+
}
|
|
2
9
|
|
|
3
10
|
/**
|
|
4
11
|
* Makes given value available globally under window[name] attribute.
|
|
@@ -14,9 +21,19 @@ const NAMESPACE = 'AJS';
|
|
|
14
21
|
* @returns exposed value
|
|
15
22
|
*/
|
|
16
23
|
export default function globalize (name, value) {
|
|
17
|
-
|
|
18
|
-
window[NAMESPACE] = {};
|
|
19
|
-
}
|
|
24
|
+
initNamespace();
|
|
20
25
|
|
|
21
26
|
return window[NAMESPACE][name] = value;
|
|
22
27
|
}
|
|
28
|
+
|
|
29
|
+
export function putOnI18nIfAbsent (name, value) {
|
|
30
|
+
initNamespace();
|
|
31
|
+
|
|
32
|
+
if (typeof window[NAMESPACE][I18N_OBJECT_NAME] !== 'object') {
|
|
33
|
+
window[NAMESPACE][I18N_OBJECT_NAME] = {};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
if (typeof window[NAMESPACE][I18N_OBJECT_NAME][name] === 'undefined') {
|
|
37
|
+
window[NAMESPACE][I18N_OBJECT_NAME][name] = value;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -136,6 +136,9 @@ $.fn.ajaxSubmit = function(options) {
|
|
|
136
136
|
var oldSuccess = options.success || function(){};
|
|
137
137
|
callbacks.push(function(data) {
|
|
138
138
|
var fn = options.replaceTarget ? 'replaceWith' : 'html';
|
|
139
|
+
// Validate `data` through `HTML encoding` when passed `data` is passed
|
|
140
|
+
// to `html()`, as suggested in https://github.com/jquery-form/form/issues/464
|
|
141
|
+
fn == 'html' ? data = $.parseHTML($("<div>").text(data).html()) : '';
|
|
139
142
|
$(options.target)[fn](data).each(oldSuccess, arguments);
|
|
140
143
|
});
|
|
141
144
|
}
|
|
@@ -428,7 +431,10 @@ $.fn.ajaxSubmit = function(options) {
|
|
|
428
431
|
return (doc && doc.documentElement && doc.documentElement.nodeName != 'parsererror') ? doc : null;
|
|
429
432
|
};
|
|
430
433
|
var parseJSON = $.parseJSON || function(s) {
|
|
431
|
-
|
|
434
|
+
// Arise an error resolvable including jquery instead of
|
|
435
|
+
// making a new function using unsanitized inputs
|
|
436
|
+
window.console.error('jquery.parseJSON is undefined');
|
|
437
|
+
return null;
|
|
432
438
|
};
|
|
433
439
|
|
|
434
440
|
var httpData = function( xhr, type, s ) { // mostly lifted from jq1.4.4
|