@atlassian/atlassian-connect-js 5.3.203 → 5.3.205
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/.bitbucket/CODEOWNERS.md +3 -0
- package/CONTRIBUTING.md +23 -0
- package/DEVELOPING.md +88 -0
- package/dist/connect-host.js +25 -5
- package/dist/iframe-fedramp.js +1 -1
- package/dist/iframe.js +1 -1
- package/package.json +1 -1
- package/src/host/components/dialog.js +29 -4
package/CONTRIBUTING.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Contributing
|
|
2
|
+
------------
|
|
3
|
+
Contributions are welcome! However, the versions and branches of this project are in a state of flux. Before starting work,
|
|
4
|
+
please contact the Atlassian Connect team to ensure you understand the process you'll need to follow.
|
|
5
|
+
|
|
6
|
+
1. Create an issue in the [Atlassian Connect JavaScript API project](https://ecosystem.atlassian.net/browse/ACJS).
|
|
7
|
+
2. Create your feature branch off `master`.
|
|
8
|
+
* Include your issue key and a short description.
|
|
9
|
+
3. Push your changes.
|
|
10
|
+
4. Create a pull request against this repository.
|
|
11
|
+
5. If your changes will affect the functionality of the Connect plugin, create a feature branch in the product and make sure the build is green against your ACJS branch by updating the version consumed by the product.
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
Releasing a new version
|
|
15
|
+
------------------------
|
|
16
|
+
This is now done via BitBucket Pipelines on the master branch.
|
|
17
|
+
|
|
18
|
+
The `onecloud-build-bot` account executes this step as via the OAuth method described by [these Bitbucket instructions](
|
|
19
|
+
https://support.atlassian.com/bitbucket-cloud/docs/push-back-to-your-repository/)
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
If you're an Atlassian developer and you wish to release a new version of Atlassian Connect JS for Atlassian products to use,
|
|
23
|
+
follow [this HOWTO](https://hello.atlassian.net/wiki/spaces/ECO/pages/1473343850/HOW-TO+Release+ACJS+for+products).
|
package/DEVELOPING.md
ADDED
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
Requirements
|
|
2
|
+
------------
|
|
3
|
+
|
|
4
|
+
- Node LTS (refer to `.nvmrc`)
|
|
5
|
+
- NPM
|
|
6
|
+
|
|
7
|
+
Installation
|
|
8
|
+
------------
|
|
9
|
+
|
|
10
|
+
NPM install takes care of everything for you.
|
|
11
|
+
|
|
12
|
+
npm install
|
|
13
|
+
|
|
14
|
+
Building
|
|
15
|
+
--------
|
|
16
|
+
|
|
17
|
+
To build the distribution:
|
|
18
|
+
|
|
19
|
+
npm run build
|
|
20
|
+
|
|
21
|
+
Running tests
|
|
22
|
+
-------------
|
|
23
|
+
|
|
24
|
+
We use [Karma](https://karma-runner.github.io/latest/index.html) for running our [Jasmine](https://jasmine.github.io/) tests.
|
|
25
|
+
|
|
26
|
+
To run tests in watch mode:
|
|
27
|
+
|
|
28
|
+
npm run karma
|
|
29
|
+
|
|
30
|
+
Running tests with saucelabs
|
|
31
|
+
----------------------------
|
|
32
|
+
|
|
33
|
+
Tests are automatically run in Sauce Labs from Bitbucket Pipelines. They run using all supported browsers. You can run these yourself as follows:
|
|
34
|
+
|
|
35
|
+
Set your Sauce Labs credentials using the SAUCE_USERNAME and SAUCE_ACCESS_KEY environment variables.
|
|
36
|
+
|
|
37
|
+
Then run the tests using:
|
|
38
|
+
|
|
39
|
+
SAUCE_LABS=true npm test
|
|
40
|
+
|
|
41
|
+
Alternatively you can enter Sauce Labs credentials at run time with:
|
|
42
|
+
|
|
43
|
+
SAUCE_LABS=true SAUCE_USERNAME=XXXXX SAUCE_ACCESS_KEY=XXXXX npm test
|
|
44
|
+
|
|
45
|
+
Linting && Coding Style Checks
|
|
46
|
+
------------------------------
|
|
47
|
+
|
|
48
|
+
ACJS follows the Atlassian Front-End Code Quality guidelines.
|
|
49
|
+
|
|
50
|
+
npm run lint
|
|
51
|
+
|
|
52
|
+
Point IntelliJ / Sublime / your editor of choice at the .eslintrc for linting as you edit.
|
|
53
|
+
|
|
54
|
+
Code Coverage
|
|
55
|
+
-------------
|
|
56
|
+
|
|
57
|
+
We use [Istanbul](https://istanbul.js.org/) for code coverage statistics.
|
|
58
|
+
|
|
59
|
+
To run tests and generate coverage results:
|
|
60
|
+
|
|
61
|
+
COVERAGE=true npm run karma-ci
|
|
62
|
+
|
|
63
|
+
Then point your browser at:
|
|
64
|
+
|
|
65
|
+
file:///<path to atlassian-connect-js>/coverage/index.html
|
|
66
|
+
|
|
67
|
+
Commands
|
|
68
|
+
--------
|
|
69
|
+
|
|
70
|
+
To see a wider range of gulp commands run:
|
|
71
|
+
|
|
72
|
+
gulp --tasks
|
|
73
|
+
|
|
74
|
+
Dev loop
|
|
75
|
+
--------
|
|
76
|
+
|
|
77
|
+
To automatically re-create the dist directory on code change, run:
|
|
78
|
+
|
|
79
|
+
gulp watch
|
|
80
|
+
|
|
81
|
+
To have your changes automatically loaded onto a locally running JIRA or Confluence instance, first make sure that you
|
|
82
|
+
include `-Dconnect-js-v5=true` in your command to start the product. Then you can deploy the contents of your dist directory:
|
|
83
|
+
|
|
84
|
+
gulp deploy
|
|
85
|
+
|
|
86
|
+
By default, this will deploy to the v5 resources directory inside your local `atlassian-connect` project, i.e.
|
|
87
|
+
`/<path/to/my/projects>/atlassian-connect/jsapi-v5/src/main/resources/v5`. Changes will be automatically picked up by the
|
|
88
|
+
running product.
|
package/dist/connect-host.js
CHANGED
|
@@ -11287,10 +11287,30 @@
|
|
|
11287
11287
|
return $dialog;
|
|
11288
11288
|
};
|
|
11289
11289
|
_proto.renderErrorState = function renderErrorState(extension) {
|
|
11290
|
-
var $dialog
|
|
11291
|
-
|
|
11292
|
-
|
|
11293
|
-
|
|
11290
|
+
var $dialog;
|
|
11291
|
+
if (HostApi$1.getBooleanFeatureFlag('acjs-iframe-allowlist-dialog-flexibility')) {
|
|
11292
|
+
var ext = this.getByExtension({
|
|
11293
|
+
addon_key: extension.addon_key,
|
|
11294
|
+
key: extension.key
|
|
11295
|
+
});
|
|
11296
|
+
if (ext.length === 0) {
|
|
11297
|
+
var dialogs = $('.' + DIALOG_CLASS).toArray();
|
|
11298
|
+
if (dialogs.length === 0) {
|
|
11299
|
+
return;
|
|
11300
|
+
}
|
|
11301
|
+
$dialog = AJS.dialog2(dialogs[0]).$el;
|
|
11302
|
+
} else {
|
|
11303
|
+
$dialog = ext[0].$el;
|
|
11304
|
+
}
|
|
11305
|
+
if (!$dialog) {
|
|
11306
|
+
return;
|
|
11307
|
+
}
|
|
11308
|
+
} else {
|
|
11309
|
+
$dialog = this.getByExtension({
|
|
11310
|
+
addon_key: extension.addon_key,
|
|
11311
|
+
key: extension.key
|
|
11312
|
+
})[0].$el;
|
|
11313
|
+
}
|
|
11294
11314
|
|
|
11295
11315
|
// Fullscreen dialogs already render a close button in the header
|
|
11296
11316
|
if ($dialog.hasClass('aui-dialog2-fullscreen')) {
|
|
@@ -13861,7 +13881,7 @@
|
|
|
13861
13881
|
* Add version
|
|
13862
13882
|
*/
|
|
13863
13883
|
if (!window._AP.version) {
|
|
13864
|
-
window._AP.version = '5.3.
|
|
13884
|
+
window._AP.version = '5.3.205';
|
|
13865
13885
|
}
|
|
13866
13886
|
simpleXDM.defineModule('messages', messages);
|
|
13867
13887
|
simpleXDM.defineModule('flag', flag);
|
package/dist/iframe-fedramp.js
CHANGED
|
@@ -1373,7 +1373,7 @@ var AP = (function () {
|
|
|
1373
1373
|
_this._eventHandlers = {};
|
|
1374
1374
|
_this._pendingCallbacks = {};
|
|
1375
1375
|
_this._keyListeners = [];
|
|
1376
|
-
_this._version = '5.3.
|
|
1376
|
+
_this._version = '5.3.205';
|
|
1377
1377
|
_this._apiTampered = undefined;
|
|
1378
1378
|
_this._isSubIframe = _this._topHost !== window.parent;
|
|
1379
1379
|
_this._onConfirmedFns = [];
|
package/dist/iframe.js
CHANGED
|
@@ -1373,7 +1373,7 @@ var AP = (function () {
|
|
|
1373
1373
|
_this._eventHandlers = {};
|
|
1374
1374
|
_this._pendingCallbacks = {};
|
|
1375
1375
|
_this._keyListeners = [];
|
|
1376
|
-
_this._version = '5.3.
|
|
1376
|
+
_this._version = '5.3.205';
|
|
1377
1377
|
_this._apiTampered = undefined;
|
|
1378
1378
|
_this._isSubIframe = _this._topHost !== window.parent;
|
|
1379
1379
|
_this._onConfirmedFns = [];
|
package/package.json
CHANGED
|
@@ -278,10 +278,35 @@ class Dialog {
|
|
|
278
278
|
}
|
|
279
279
|
|
|
280
280
|
renderErrorState(extension) {
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
281
|
+
let $dialog;
|
|
282
|
+
|
|
283
|
+
if (
|
|
284
|
+
HostApi.getBooleanFeatureFlag('acjs-iframe-allowlist-dialog-flexibility')
|
|
285
|
+
) {
|
|
286
|
+
const ext = this.getByExtension({
|
|
287
|
+
addon_key: extension.addon_key,
|
|
288
|
+
key: extension.key,
|
|
289
|
+
});
|
|
290
|
+
if (ext.length === 0) {
|
|
291
|
+
const dialogs = $('.' + DIALOG_CLASS).toArray();
|
|
292
|
+
if (dialogs.length === 0) {
|
|
293
|
+
return;
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
$dialog = AJS.dialog2(dialogs[0]).$el;
|
|
297
|
+
} else {
|
|
298
|
+
$dialog = ext[0].$el;
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
if (!$dialog) {
|
|
302
|
+
return;
|
|
303
|
+
}
|
|
304
|
+
} else {
|
|
305
|
+
$dialog = this.getByExtension({
|
|
306
|
+
addon_key: extension.addon_key,
|
|
307
|
+
key: extension.key,
|
|
308
|
+
})[0].$el;
|
|
309
|
+
}
|
|
285
310
|
|
|
286
311
|
// Fullscreen dialogs already render a close button in the header
|
|
287
312
|
if ($dialog.hasClass('aui-dialog2-fullscreen')) {
|