@atlassian/atlassian-connect-js 5.3.203 → 5.3.204

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.
@@ -11287,10 +11287,30 @@
11287
11287
  return $dialog;
11288
11288
  };
11289
11289
  _proto.renderErrorState = function renderErrorState(extension) {
11290
- var $dialog = this.getByExtension({
11291
- addon_key: extension.addon_key,
11292
- key: extension.key
11293
- })[0].$el;
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.203';
13884
+ window._AP.version = '5.3.204';
13865
13885
  }
13866
13886
  simpleXDM.defineModule('messages', messages);
13867
13887
  simpleXDM.defineModule('flag', flag);
@@ -1373,7 +1373,7 @@ var AP = (function () {
1373
1373
  _this._eventHandlers = {};
1374
1374
  _this._pendingCallbacks = {};
1375
1375
  _this._keyListeners = [];
1376
- _this._version = '5.3.203';
1376
+ _this._version = '5.3.204';
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.203';
1376
+ _this._version = '5.3.204';
1377
1377
  _this._apiTampered = undefined;
1378
1378
  _this._isSubIframe = _this._topHost !== window.parent;
1379
1379
  _this._onConfirmedFns = [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlassian/atlassian-connect-js",
3
- "version": "5.3.203",
3
+ "version": "5.3.204",
4
4
  "license": "Apache-2.0",
5
5
  "description": "Atlassian Connect JavaScript bridge",
6
6
  "main": "dist/connect-host.js",
@@ -278,10 +278,35 @@ class Dialog {
278
278
  }
279
279
 
280
280
  renderErrorState(extension) {
281
- const $dialog = this.getByExtension({
282
- addon_key: extension.addon_key,
283
- key: extension.key,
284
- })[0].$el;
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')) {