@atlassian/aui 8.3.9 → 8.3.12
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 +1 -1
- package/dist/aui/aui-prototyping.js.map +1 -1
- package/dist/aui/aui-prototyping.nodeps.css +1 -1
- package/dist/aui/aui-prototyping.nodeps.js +1 -1
- package/dist/aui/aui-prototyping.nodeps.js.map +1 -1
- package/entry/aui.batch.prototyping.js +1 -1
- package/entry/behaviours/aui.behaviour.i18n.js +1 -1
- package/package.json +5 -5
- package/src/js/aui/i18n.js +6 -1
- package/src/js/aui/internal/globalize.js +18 -1
- package/src/js-vendor/jquery/plugins/jquery.form.js +7 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export * from './aui.side-effects';
|
|
2
2
|
export { log, error, warn } from './behaviours/aui.behaviour.logger';
|
|
3
|
-
import {
|
|
3
|
+
import { I18n } from './behaviours/aui.behaviour.i18n';
|
|
4
4
|
import './aui.batch.page';
|
|
5
5
|
import './aui.batch.patterns';
|
|
6
6
|
import './aui.batch.iconography';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export {
|
|
1
|
+
export { I18n } from '@atlassian/aui/src/js/aui/i18n';
|
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.3.
|
|
4
|
+
"version": "8.3.12",
|
|
5
5
|
"author": "Atlassian Pty Ltd.",
|
|
6
6
|
"homepage": "https://aui.atlassian.com",
|
|
7
7
|
"license": "Apache-2.0",
|
|
@@ -38,12 +38,12 @@
|
|
|
38
38
|
"backbone": "1.3.3",
|
|
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
|
"popper.js": "1.14.5",
|
|
43
43
|
"skatejs": "0.13.17",
|
|
44
44
|
"skatejs-template-html": "0.0.0",
|
|
45
45
|
"trim-extra-html-whitespace": "1.3.0",
|
|
46
|
-
"underscore": "1.
|
|
46
|
+
"underscore": "1.13.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@atlassian/adg-server-iconfont": "3.1.0",
|
|
@@ -52,11 +52,11 @@
|
|
|
52
52
|
"babel-plugin-add-module-exports": "0.2.1",
|
|
53
53
|
"babel-preset-es2015": "6.24.1",
|
|
54
54
|
"cross-env": "^5.1.3",
|
|
55
|
-
"eslint": "^
|
|
55
|
+
"eslint": "^7.32.0",
|
|
56
56
|
"glob": "7.1.2",
|
|
57
57
|
"jquery": "^3",
|
|
58
58
|
"jquery-migrate": "^3",
|
|
59
|
-
"less": "^
|
|
59
|
+
"less": "^4.1.2"
|
|
60
60
|
},
|
|
61
61
|
"scripts": {
|
|
62
62
|
"prepublishOnly": "yarn clean && cross-env NODE_ENV=production yarn build",
|
package/src/js/aui/i18n.js
CHANGED
|
@@ -7,7 +7,7 @@ import keys from './internal/i18n/aui';
|
|
|
7
7
|
* the key is returned - this could occur in plugin mode if the I18n transform is not performed;
|
|
8
8
|
* or in flatpack mode if the i18n JS file is not loaded.
|
|
9
9
|
*/
|
|
10
|
-
|
|
10
|
+
const I18n = {
|
|
11
11
|
keys: keys,
|
|
12
12
|
getText: function (key, ...params) {
|
|
13
13
|
if (Object.prototype.hasOwnProperty.call(this.keys, key)) {
|
|
@@ -18,6 +18,11 @@ export var I18n = {
|
|
|
18
18
|
}
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
export {
|
|
22
|
+
I18n,
|
|
23
|
+
format
|
|
24
|
+
}
|
|
25
|
+
|
|
21
26
|
/**
|
|
22
27
|
* Deprecated - do not use AJS.I18n.getText from global scope within AUI code. Use import { I18n } from '../i18n'
|
|
23
28
|
* Also keep in mind that WRM is looking for patterns like "I18n.getText" so do not create
|
|
@@ -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
|