@atlassian/aui 8.0.8 → 8.0.9
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.js +1 -1
- package/dist/aui/aui-prototyping.js.map +1 -1
- package/package.json +2 -2
- package/src/js/aui/i18n.js +5 -2
- package/src/js/aui/internal/globalize.js +18 -1
- 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": "8.0.
|
|
4
|
+
"version": "8.0.9",
|
|
5
5
|
"author": "Atlassian Pty Ltd.",
|
|
6
6
|
"homepage": "https://aui.atlassian.com",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"backbone": "1.3.3",
|
|
38
38
|
"css.escape": "1.5.0",
|
|
39
39
|
"fancy-file-input": "~2.0.4",
|
|
40
|
-
"jquery-ui": "1.
|
|
40
|
+
"jquery-ui": "1.13.0",
|
|
41
41
|
"skatejs": "0.13.17",
|
|
42
42
|
"skatejs-template-html": "0.0.0",
|
|
43
43
|
"tether": "atlassian/tether#amd-with-global",
|
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
|
/**
|
|
@@ -20,6 +20,9 @@ var i18n = {
|
|
|
20
20
|
}
|
|
21
21
|
};
|
|
22
22
|
|
|
23
|
-
|
|
23
|
+
// eslint-disable-next-line guard-for-in
|
|
24
|
+
for (const property in i18n) {
|
|
25
|
+
putOnI18nIfAbsent(property, i18n[property]);
|
|
26
|
+
}
|
|
24
27
|
|
|
25
28
|
export default i18n;
|
|
@@ -1,9 +1,26 @@
|
|
|
1
1
|
const NAMESPACE = 'AJS';
|
|
2
|
+
const I18N_OBJECT_NAME = 'I18n';
|
|
2
3
|
|
|
3
|
-
|
|
4
|
+
function initNamespace() {
|
|
4
5
|
if (typeof window[NAMESPACE] !== 'object') {
|
|
5
6
|
window[NAMESPACE] = {};
|
|
6
7
|
}
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export default function globalize (name, value) {
|
|
11
|
+
initNamespace();
|
|
7
12
|
|
|
8
13
|
return window[NAMESPACE][name] = value;
|
|
9
14
|
}
|
|
15
|
+
|
|
16
|
+
export function putOnI18nIfAbsent (name, value) {
|
|
17
|
+
initNamespace();
|
|
18
|
+
|
|
19
|
+
if (typeof window[NAMESPACE][I18N_OBJECT_NAME] !== 'object') {
|
|
20
|
+
window[NAMESPACE][I18N_OBJECT_NAME] = {};
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
if (typeof window[NAMESPACE][I18N_OBJECT_NAME][name] === 'undefined') {
|
|
24
|
+
window[NAMESPACE][I18N_OBJECT_NAME][name] = value;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
@@ -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
|