scrivito_ui 1.7.0.rc1 → 1.7.0.rc2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4fe898d970c0a0020ea33d91d5caa90552480624
4
- data.tar.gz: 4af11bb40196f6757624bd50059a5a265099e5ac
3
+ metadata.gz: 8b684c8af0fdf232875fb66e9ac850de18a8a0a8
4
+ data.tar.gz: 69a1fea5237ad34b6916972648b5156eaf4fa90a
5
5
  SHA512:
6
- metadata.gz: 508c143cdb14aa0971f6034e650ee5e62617b098be4904d8af789d620e9a091e6abffb5897a8d28a0c70f1614f8dde103fcd7ad1b8db01ea042194a3d1a55f75
7
- data.tar.gz: cd34f4c39ed50d92c29cf634584baf6aa25600041e292eeb40037344f1efd169f799c156ac4d23e583e0087c98928b8d8290c4baf69fff32ab0a5ccb0f2ae057
6
+ metadata.gz: 72a46599a2cc60930070e0a11a6edd485ad3ab22b42f7dd5acb4068c5ab487940995374a69b3e94c8b969a473f05ee82f70d197eae0b7352ec3ca405c9593914
7
+ data.tar.gz: 589c7dd151b677e423ecb07ec4a9cfc16629012e35721b1dea403e05517c5e39d1716e61cba9224a9d303753a1144b9052e24a1b05f3a16c1570ea6268b04dfc
@@ -74976,12 +74976,16 @@ window.scrivito = {}; // jshint ignore:line
74976
74976
  return scrivito.resourceDialog.open(obj);
74977
74977
  }
74978
74978
 
74979
- var url = scrivito.root_path();
74979
+ var url = undefined;
74980
74980
  var params = {};
74981
74981
 
74982
74982
  if (obj.is_binary()) {
74983
- url = '/__scrivito/resource_details/';
74983
+ url = '/__scrivito/resource_details/' + obj.id();
74984
74984
  params.return_to = document.URL;
74985
+ } else {
74986
+ var baseURI = URI(scrivito.path_for_id(obj.id()));
74987
+ baseURI.path('' + scrivito.root_path() + baseURI);
74988
+ url = baseURI.normalizePath().toString();
74985
74989
  }
74986
74990
 
74987
74991
  if (obj.is_new() && scrivito.editingContext.isDeletedMode()) {
@@ -74992,7 +74996,6 @@ window.scrivito = {}; // jshint ignore:line
74992
74996
  params._scrivito_display_mode = 'deleted';
74993
74997
  }
74994
74998
 
74995
- url += obj.id();
74996
74999
  if (!_.isEmpty(params)) {
74997
75000
  url += '?' + $.param(params);
74998
75001
  }
@@ -76188,7 +76191,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
76188
76191
  if (error.status === 403) {
76189
76192
  throw new scrivito.AccessDeniedError(specificOutput, error.status, errorBody.code);
76190
76193
  } else if (error.status.toString()[0] === '4' && specificOutput) {
76191
- throw new scrivito.ClientError(specificOutput, error.status, errorBody.code);
76194
+ throw scrivito.ClientError['for'](specificOutput, error.status, errorBody.code);
76192
76195
  } else if (error.status === 500 && specificOutput) {
76193
76196
  throw new scrivito.BackendError(specificOutput, error.status);
76194
76197
  }
@@ -76239,7 +76242,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
76239
76242
  case 'success':
76240
76243
  return task.result;
76241
76244
  case 'error':
76242
- throw new scrivito.ClientError(task.message, undefined, task.code);
76245
+ throw scrivito.ClientError['for'](task.message, 412, task.code);
76243
76246
  case 'open':
76244
76247
  return scrivito.wait(2).then(function () {
76245
76248
  return request('GET', 'tasks/' + task.id).then(function (result) {
@@ -76348,6 +76351,9 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
76348
76351
  function _inherits(subClass, superClass) { if (typeof superClass !== 'function' && superClass !== null) { throw new TypeError('Super expression must either be null or a function, not ' + typeof superClass); } subClass.prototype = Object.create(superClass && superClass.prototype, { constructor: { value: subClass, enumerable: false, writable: true, configurable: true } }); if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass; }
76349
76352
 
76350
76353
  (function () {
76354
+ var TRANSFORM_SOURCE_TYPE_INVALID = 'binary.unprocessable.image.transform.source.type_invalid';
76355
+ var TRANSFORM_SOURCE_TOO_LARGE = 'binary.unprocessable.image.transform.source.too_large';
76356
+
76351
76357
  // From https://phabricator.babeljs.io/T3083#65595
76352
76358
  function ExtendableError() {
76353
76359
  for (var _len = arguments.length, args = Array(_len), _key = 0; _key < _len; _key++) {
@@ -76365,7 +76371,7 @@ function _inherits(subClass, superClass) { if (typeof superClass !== 'function'
76365
76371
  ExtendableError.__proto__ = Error;
76366
76372
  }
76367
76373
 
76368
- scrivito.ScrivitoError = (function (_ExtendableError) {
76374
+ var ScrivitoError = (function (_ExtendableError) {
76369
76375
  _inherits(ScrivitoError, _ExtendableError);
76370
76376
 
76371
76377
  function ScrivitoError(message) {
@@ -76396,6 +76402,10 @@ function _inherits(subClass, superClass) { if (typeof superClass !== 'function'
76396
76402
  this.message = message;
76397
76403
  }
76398
76404
 
76405
+ /**
76406
+ * An error thrown in case a backend request fails due to an error caused by the client.
76407
+ */
76408
+
76399
76409
  _createClass(ScrivitoError, [{
76400
76410
  key: 'name',
76401
76411
  get: function get() {
@@ -76413,19 +76423,14 @@ function _inherits(subClass, superClass) { if (typeof superClass !== 'function'
76413
76423
  return ScrivitoError;
76414
76424
  })(ExtendableError);
76415
76425
 
76416
- /**
76417
- * An error thrown in case a backend request fails due to an error caused by the client.
76418
- */
76419
- scrivito.ClientError = (function (_scrivito$ScrivitoError) {
76420
- _inherits(ClientError, _scrivito$ScrivitoError);
76426
+ var ClientError = (function (_ScrivitoError) {
76427
+ _inherits(ClientError, _ScrivitoError);
76421
76428
 
76422
76429
  /**
76423
76430
  * The constructor is not part of the public API and should **not** be used.
76424
76431
  */
76425
76432
 
76426
76433
  function ClientError(message, httpCode, backendCode) {
76427
- if (httpCode === undefined) httpCode = 412;
76428
-
76429
76434
  _classCallCheck(this, ClientError);
76430
76435
 
76431
76436
  _get(Object.getPrototypeOf(ClientError.prototype), 'constructor', this).call(this, message);
@@ -76433,15 +76438,30 @@ function _inherits(subClass, superClass) { if (typeof superClass !== 'function'
76433
76438
  this.backendCode = backendCode;
76434
76439
  }
76435
76440
 
76441
+ /**
76442
+ * An error thrown in case a backend request from the UI
76443
+ * is denied access to a specific resource.
76444
+ */
76445
+
76446
+ _createClass(ClientError, null, [{
76447
+ key: 'for',
76448
+ value: function _for(message, httpCode, backendCode) {
76449
+ switch (backendCode) {
76450
+ case TRANSFORM_SOURCE_TYPE_INVALID:
76451
+ return new scrivito.TransformationSourceTypeInvalidError(message, httpCode, backendCode);
76452
+ case TRANSFORM_SOURCE_TOO_LARGE:
76453
+ return new scrivito.TransformationSourceTooLargeError(message, httpCode, backendCode);
76454
+ default:
76455
+ return new scrivito.ClientError(message, httpCode, backendCode);
76456
+ }
76457
+ }
76458
+ }]);
76459
+
76436
76460
  return ClientError;
76437
- })(scrivito.ScrivitoError);
76461
+ })(ScrivitoError);
76438
76462
 
76439
- /**
76440
- * An error thrown in case a backend request from the UI
76441
- * is denied access to a specific resource.
76442
- */
76443
- scrivito.AccessDeniedError = (function (_scrivito$ClientError) {
76444
- _inherits(AccessDeniedError, _scrivito$ClientError);
76463
+ var AccessDeniedError = (function (_ClientError) {
76464
+ _inherits(AccessDeniedError, _ClientError);
76445
76465
 
76446
76466
  /**
76447
76467
  * The constructor is not part of the public API and should **not** be used.
@@ -76453,14 +76473,14 @@ function _inherits(subClass, superClass) { if (typeof superClass !== 'function'
76453
76473
  _get(Object.getPrototypeOf(AccessDeniedError.prototype), 'constructor', this).call(this, message, httpCode, backendCode);
76454
76474
  }
76455
76475
 
76476
+ /**
76477
+ * An error thrown in case wrong arguments are passed to an SDK function.
76478
+ */
76456
76479
  return AccessDeniedError;
76457
- })(scrivito.ClientError);
76480
+ })(ClientError);
76458
76481
 
76459
- /**
76460
- * An error thrown in case wrong arguments are passed to an SDK function.
76461
- */
76462
- scrivito.ArgumentError = (function (_scrivito$ScrivitoError2) {
76463
- _inherits(ArgumentError, _scrivito$ScrivitoError2);
76482
+ var ArgumentError = (function (_ScrivitoError2) {
76483
+ _inherits(ArgumentError, _ScrivitoError2);
76464
76484
 
76465
76485
  /**
76466
76486
  * The constructor is not part of the public API and should **not** be used.
@@ -76473,10 +76493,10 @@ function _inherits(subClass, superClass) { if (typeof superClass !== 'function'
76473
76493
  }
76474
76494
 
76475
76495
  return ArgumentError;
76476
- })(scrivito.ScrivitoError);
76496
+ })(ScrivitoError);
76477
76497
 
76478
- scrivito.CommunicationError = (function (_scrivito$ScrivitoError3) {
76479
- _inherits(CommunicationError, _scrivito$ScrivitoError3);
76498
+ var CommunicationError = (function (_ScrivitoError3) {
76499
+ _inherits(CommunicationError, _ScrivitoError3);
76480
76500
 
76481
76501
  function CommunicationError(message, httpCode) {
76482
76502
  _classCallCheck(this, CommunicationError);
@@ -76485,15 +76505,15 @@ function _inherits(subClass, superClass) { if (typeof superClass !== 'function'
76485
76505
  this.httpCode = httpCode;
76486
76506
  }
76487
76507
 
76508
+ /**
76509
+ * An error thrown in case a backend request from the UI
76510
+ * fails due to an internal server error.
76511
+ */
76488
76512
  return CommunicationError;
76489
- })(scrivito.ScrivitoError);
76513
+ })(ScrivitoError);
76490
76514
 
76491
- /**
76492
- * An error thrown in case a backend request from the UI
76493
- * fails due to an internal server error.
76494
- */
76495
- scrivito.BackendError = (function (_scrivito$CommunicationError) {
76496
- _inherits(BackendError, _scrivito$CommunicationError);
76515
+ var BackendError = (function (_CommunicationError) {
76516
+ _inherits(BackendError, _CommunicationError);
76497
76517
 
76498
76518
  /**
76499
76519
  * The constructor is not part of the public API and should **not** be used.
@@ -76505,15 +76525,15 @@ function _inherits(subClass, superClass) { if (typeof superClass !== 'function'
76505
76525
  _get(Object.getPrototypeOf(BackendError.prototype), 'constructor', this).call(this, message, httpCode);
76506
76526
  }
76507
76527
 
76528
+ /**
76529
+ * This error is raised if scrivito detects an internal problem.
76530
+ * These errors should never occur when using the public API of the SDK.
76531
+ */
76508
76532
  return BackendError;
76509
- })(scrivito.CommunicationError);
76533
+ })(CommunicationError);
76510
76534
 
76511
- /**
76512
- * This error is raised if scrivito detects an internal problem.
76513
- * These errors should never occur when using the public API of the SDK.
76514
- */
76515
- scrivito.InternalError = (function (_scrivito$ScrivitoError4) {
76516
- _inherits(InternalError, _scrivito$ScrivitoError4);
76535
+ var InternalError = (function (_ScrivitoError4) {
76536
+ _inherits(InternalError, _ScrivitoError4);
76517
76537
 
76518
76538
  /**
76519
76539
  * The constructor is not part of the public API and should **not** be used.
@@ -76525,15 +76545,15 @@ function _inherits(subClass, superClass) { if (typeof superClass !== 'function'
76525
76545
  _get(Object.getPrototypeOf(InternalError.prototype), 'constructor', this).call(this, message);
76526
76546
  }
76527
76547
 
76548
+ /**
76549
+ * An error thrown in case a backend request from the UI
76550
+ * fails due to network problems.
76551
+ */
76528
76552
  return InternalError;
76529
- })(scrivito.ScrivitoError);
76553
+ })(ScrivitoError);
76530
76554
 
76531
- /**
76532
- * An error thrown in case a backend request from the UI
76533
- * fails due to network problems.
76534
- */
76535
- scrivito.NetworkError = (function (_scrivito$CommunicationError2) {
76536
- _inherits(NetworkError, _scrivito$CommunicationError2);
76555
+ var NetworkError = (function (_CommunicationError2) {
76556
+ _inherits(NetworkError, _CommunicationError2);
76537
76557
 
76538
76558
  /**
76539
76559
  * The constructor is not part of the public API and should **not** be used.
@@ -76545,15 +76565,15 @@ function _inherits(subClass, superClass) { if (typeof superClass !== 'function'
76545
76565
  _get(Object.getPrototypeOf(NetworkError.prototype), 'constructor', this).call(this, message, httpCode);
76546
76566
  }
76547
76567
 
76568
+ /**
76569
+ * An error thrown in case a backend request from the UI
76570
+ * exceeds the rate limit of the backend.
76571
+ */
76548
76572
  return NetworkError;
76549
- })(scrivito.CommunicationError);
76573
+ })(CommunicationError);
76550
76574
 
76551
- /**
76552
- * An error thrown in case a backend request from the UI
76553
- * exceeds the rate limit of the backend.
76554
- */
76555
- scrivito.RateLimitExceededError = (function (_scrivito$CommunicationError3) {
76556
- _inherits(RateLimitExceededError, _scrivito$CommunicationError3);
76575
+ var RateLimitExceededError = (function (_CommunicationError3) {
76576
+ _inherits(RateLimitExceededError, _CommunicationError3);
76557
76577
 
76558
76578
  /**
76559
76579
  * The constructor is not part of the public API and should **not** be used.
@@ -76565,14 +76585,14 @@ function _inherits(subClass, superClass) { if (typeof superClass !== 'function'
76565
76585
  _get(Object.getPrototypeOf(RateLimitExceededError.prototype), 'constructor', this).call(this, message, httpCode);
76566
76586
  }
76567
76587
 
76588
+ /**
76589
+ * An error thrown in case a given Scrivito resource is not found.
76590
+ */
76568
76591
  return RateLimitExceededError;
76569
- })(scrivito.CommunicationError);
76592
+ })(CommunicationError);
76570
76593
 
76571
- /**
76572
- * An error thrown in case a given Scrivito resource is not found.
76573
- */
76574
- scrivito.ResourceNotFoundError = (function (_scrivito$ScrivitoError5) {
76575
- _inherits(ResourceNotFoundError, _scrivito$ScrivitoError5);
76594
+ var ResourceNotFoundError = (function (_ScrivitoError5) {
76595
+ _inherits(ResourceNotFoundError, _ScrivitoError5);
76576
76596
 
76577
76597
  /**
76578
76598
  * The constructor is not part of the public API and should **not** be used.
@@ -76584,14 +76604,14 @@ function _inherits(subClass, superClass) { if (typeof superClass !== 'function'
76584
76604
  _get(Object.getPrototypeOf(ResourceNotFoundError.prototype), 'constructor', this).call(this, message);
76585
76605
  }
76586
76606
 
76607
+ /**
76608
+ * An error thrown in case a backend request from the UI is denied access.
76609
+ */
76587
76610
  return ResourceNotFoundError;
76588
- })(scrivito.ScrivitoError);
76611
+ })(ScrivitoError);
76589
76612
 
76590
- /**
76591
- * An error thrown in case a backend request from the UI is denied access.
76592
- */
76593
- scrivito.UnauthorizedError = (function (_scrivito$ClientError2) {
76594
- _inherits(UnauthorizedError, _scrivito$ClientError2);
76613
+ var UnauthorizedError = (function (_ClientError2) {
76614
+ _inherits(UnauthorizedError, _ClientError2);
76595
76615
 
76596
76616
  /**
76597
76617
  * The constructor is not part of the public API and should **not** be used.
@@ -76603,11 +76623,54 @@ function _inherits(subClass, superClass) { if (typeof superClass !== 'function'
76603
76623
  _get(Object.getPrototypeOf(UnauthorizedError.prototype), 'constructor', this).call(this, message, httpCode, backendCode);
76604
76624
  }
76605
76625
 
76626
+ /**
76627
+ * An error thrown in case an image to be transformed is of an invalid type.
76628
+ *
76629
+ * Supported types are `jpg`, `png`, and `gif`. In addition, `svg` files are
76630
+ * returned untransformed.
76631
+ */
76606
76632
  return UnauthorizedError;
76607
- })(scrivito.ClientError);
76633
+ })(ClientError);
76634
+
76635
+ var TransformationSourceTypeInvalidError = (function (_ClientError3) {
76636
+ _inherits(TransformationSourceTypeInvalidError, _ClientError3);
76637
+
76638
+ /**
76639
+ * The constructor is not part of the public API and should **not** be used.
76640
+ */
76641
+
76642
+ function TransformationSourceTypeInvalidError(message, httpCode, backendCode) {
76643
+ _classCallCheck(this, TransformationSourceTypeInvalidError);
76644
+
76645
+ _get(Object.getPrototypeOf(TransformationSourceTypeInvalidError.prototype), 'constructor', this).call(this, message, httpCode, backendCode);
76646
+ }
76647
+
76648
+ /**
76649
+ * An error thrown in case an image to be transformed is too large.
76650
+ *
76651
+ * Images up to 8MB in size are supported for transformation.
76652
+ */
76653
+ return TransformationSourceTypeInvalidError;
76654
+ })(ClientError);
76655
+
76656
+ var TransformationSourceTooLargeError = (function (_ClientError4) {
76657
+ _inherits(TransformationSourceTooLargeError, _ClientError4);
76608
76658
 
76609
- scrivito.TranslationError = (function (_scrivito$InternalError) {
76610
- _inherits(TranslationError, _scrivito$InternalError);
76659
+ /**
76660
+ * The constructor is not part of the public API and should **not** be used.
76661
+ */
76662
+
76663
+ function TransformationSourceTooLargeError(message, httpCode, backendCode) {
76664
+ _classCallCheck(this, TransformationSourceTooLargeError);
76665
+
76666
+ _get(Object.getPrototypeOf(TransformationSourceTooLargeError.prototype), 'constructor', this).call(this, message, httpCode, backendCode);
76667
+ }
76668
+
76669
+ return TransformationSourceTooLargeError;
76670
+ })(ClientError);
76671
+
76672
+ var TranslationError = (function (_InternalError) {
76673
+ _inherits(TranslationError, _InternalError);
76611
76674
 
76612
76675
  function TranslationError(message) {
76613
76676
  _classCallCheck(this, TranslationError);
@@ -76616,10 +76679,10 @@ function _inherits(subClass, superClass) { if (typeof superClass !== 'function'
76616
76679
  }
76617
76680
 
76618
76681
  return TranslationError;
76619
- })(scrivito.InternalError);
76682
+ })(InternalError);
76620
76683
 
76621
- scrivito.InterpolationError = (function (_scrivito$TranslationError) {
76622
- _inherits(InterpolationError, _scrivito$TranslationError);
76684
+ var InterpolationError = (function (_TranslationError) {
76685
+ _inherits(InterpolationError, _TranslationError);
76623
76686
 
76624
76687
  function InterpolationError(message) {
76625
76688
  _classCallCheck(this, InterpolationError);
@@ -76628,7 +76691,25 @@ function _inherits(subClass, superClass) { if (typeof superClass !== 'function'
76628
76691
  }
76629
76692
 
76630
76693
  return InterpolationError;
76631
- })(scrivito.TranslationError);
76694
+ })(TranslationError);
76695
+
76696
+ scrivito.ScrivitoError = ScrivitoError;
76697
+ scrivito.ClientError = ClientError;
76698
+ scrivito.AccessDeniedError = AccessDeniedError;
76699
+ scrivito.ArgumentError = ArgumentError;
76700
+ scrivito.CommunicationError = CommunicationError;
76701
+ scrivito.BackendError = BackendError;
76702
+ scrivito.InternalError = InternalError;
76703
+ scrivito.NetworkError = NetworkError;
76704
+ scrivito.RateLimitExceededError = RateLimitExceededError;
76705
+ scrivito.ResourceNotFoundError = ResourceNotFoundError;
76706
+ scrivito.UnauthorizedError = UnauthorizedError;
76707
+
76708
+ scrivito.TransformationSourceTypeInvalidError = TransformationSourceTypeInvalidError;
76709
+ scrivito.TransformationSourceTooLargeError = TransformationSourceTooLargeError;
76710
+
76711
+ scrivito.TranslationError = TranslationError;
76712
+ scrivito.InterpolationError = InterpolationError;
76632
76713
  })();
76633
76714
  'use strict';
76634
76715
 
@@ -76755,7 +76836,6 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
76755
76836
  var request = new XMLHttpRequest();
76756
76837
 
76757
76838
  request.open(method === 'POST' ? 'POST' : 'PUT', url);
76758
- request.responseType = 'json';
76759
76839
  request.setRequestHeader('Content-type', 'application/json; charset=utf-8');
76760
76840
 
76761
76841
  if (token) {
@@ -76779,17 +76859,18 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
76779
76859
  connectionCounter -= 1;
76780
76860
 
76781
76861
  if (request.status >= 200 && request.status < 300) {
76782
- var responseJSON = request.response;
76862
+ try {
76863
+ return resolve(JSON.parse(request.responseText));
76864
+ } catch (error) {
76865
+ if (error instanceof SyntaxError) {
76866
+ return resolve(request.responseText);
76867
+ }
76783
76868
 
76784
- if (_.isString(responseJSON)) {
76785
- // We can't use #response here as IE11 does not handle it correctly
76786
- responseJSON = JSON.parse(request.responseText);
76869
+ throw error;
76787
76870
  }
76788
-
76789
- return resolve(responseJSON);
76790
76871
  }
76791
76872
 
76792
- return reject(request.response);
76873
+ return reject(request);
76793
76874
  }
76794
76875
 
76795
76876
  function onAjaxError(error, reject) {
@@ -79673,6 +79754,10 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
79673
79754
  * accessible hours or days after they have been generated.
79674
79755
  *
79675
79756
  * @throws {scrivito.NotLoadedError} If the URL is not yet loaded.
79757
+ * @throws {scrivito.TransformationSourceTypeInvalidError}
79758
+ * If the binary is the result of a transformation and of an invalid type.
79759
+ * @throws {scrivito.TransformationSourceTooLargeError}
79760
+ * If the binary is the result of a transformation and the file is too large.
79676
79761
  * @type {String}
79677
79762
  */
79678
79763
  }, {
@@ -84951,6 +85036,7 @@ scrivito.i18n.load('de', {
84951
85036
  'publish_history_dialog.is_limited': 'Die Zahl der maximal angezeigten Verlaufseinträge ($1) hängt von Ihrem Tarif ab.',
84952
85037
 
84953
85038
  'sidebar.browse_content_button.hint': 'Content Browser öffnen',
85039
+ 'sidebar.browse_content_button.hint.is_disabled': 'Der Content Browser ist nicht verfügbar, während gelöschte Inhalte angezeigt werden.',
84954
85040
 
84955
85041
  'sidebar.details_button.hint': 'Seiteneigenschaften anzeigen',
84956
85042
  'sidebar.details_button.hint.active': 'Seiteneigenschaften',
@@ -85310,6 +85396,7 @@ scrivito.i18n.load('en', {
85310
85396
  'publish_history_dialog.is_limited': 'The maximum number of history items displayed ($1) depends on your plan.',
85311
85397
 
85312
85398
  'sidebar.browse_content_button.hint': 'Open the Content Browser',
85399
+ 'sidebar.browse_content_button.hint.is_disabled': 'The Content Browser is not available while deleted content is being displayed.',
85313
85400
 
85314
85401
  'sidebar.details_button.hint': 'Show page details',
85315
85402
  'sidebar.details_button.hint.active': 'Page details',
@@ -85958,7 +86045,7 @@ function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr
85958
86045
  'use strict';
85959
86046
 
85960
86047
  (function () {
85961
- var NAMESPACE = 'scrivito';
86048
+ var NAMESPACE = 'scrivito.v1';
85962
86049
 
85963
86050
  scrivito.storage = {
85964
86051
  set: function set(key, object) {
@@ -87059,7 +87146,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
87059
87146
  value: function _handleCheckAndPublishError(error, retryUntil) {
87060
87147
  var _this4 = this;
87061
87148
 
87062
- var backendCode = error.backend_code;
87149
+ var backendCode = error.backendCode;
87063
87150
  var contentStateError = 'precondition_not_verifiable.workspace.publish.content_state_id';
87064
87151
 
87065
87152
  if (error.type === 'check_failed') {
@@ -87083,7 +87170,7 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
87083
87170
  });
87084
87171
  } else if (backendCode === 'precondition_not_met.workspace.publish.exceeds_obj_limit') {
87085
87172
  scrivito.logError(error.message);
87086
- scrivito.errorDialog(scrivito.t('workspace_publisher.exceeds_obj_limit'), [error.timestamp, error.message]);
87173
+ scrivito.errorDialog(scrivito.t('workspace_publisher.exceeds_obj_limit'), [error.message]);
87087
87174
 
87088
87175
  return scrivito.Promise.reject(error);
87089
87176
  }
@@ -95714,16 +95801,38 @@ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Cons
95714
95801
 
95715
95802
  return React.createElement(
95716
95803
  'div',
95717
- { className: 'scrivito_browse_content scrivito_button_bar',
95718
- title: scrivito.t('sidebar.browse_content_button.hint'),
95804
+ { className: this._buttonClassName(), title: this._buttonHint(),
95719
95805
  onClick: this._onClick },
95720
95806
  React.createElement('i', { className: 'scrivito_icon scrivito_icon_content_browser' })
95721
95807
  );
95722
95808
  },
95723
95809
 
95724
95810
  _onClick: function (e) {
95725
- scrivito.browseContent();
95726
- e.stopPropagation();
95811
+ if (!this._isDisabled()) {
95812
+ scrivito.browseContent();
95813
+ e.stopPropagation();
95814
+ }
95815
+ },
95816
+
95817
+ _buttonHint: function () {
95818
+ if (this._isDisabled()) {
95819
+ return scrivito.t('sidebar.browse_content_button.hint.is_disabled');
95820
+ }
95821
+
95822
+ return scrivito.t('sidebar.browse_content_button.hint');
95823
+ },
95824
+
95825
+ _buttonClassName: function () {
95826
+ var className = 'scrivito_browse_content scrivito_button_bar';
95827
+ if (this._isDisabled()) {
95828
+ className += ' scrivito_disabled';
95829
+ }
95830
+
95831
+ return className;
95832
+ },
95833
+
95834
+ _isDisabled: function () {
95835
+ return scrivito.editingContext.displayMode === 'deleted';
95727
95836
  }
95728
95837
  });
95729
95838