@sapui5/sap.fe.core 1.96.16 → 1.96.18

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sapui5/sap.fe.core",
3
- "version": "1.96.16",
3
+ "version": "1.96.18",
4
4
  "description": "SAPUI5 Library sap.fe.core",
5
5
  "license": "SEE LICENSE IN LICENSE.txt",
6
6
  "author": "SAP SE (https://www.sap.com)",
@@ -6,7 +6,7 @@
6
6
  <copyright>SAP UI development toolkit for HTML5 (SAPUI5)
7
7
  (c) Copyright 2009-2021 SAP SE. All rights reserved
8
8
  </copyright>
9
- <version>1.96.16</version>
9
+ <version>1.96.18</version>
10
10
 
11
11
  <documentation>UI5 library: sap.fe.core</documentation>
12
12
 
@@ -341,42 +341,44 @@ sap.ui.define(
341
341
  var oModel = oContext.getModel(),
342
342
  oResourceBundle,
343
343
  draftDataContext = oModel.bindContext(oContext.getPath() + "/DraftAdministrativeData").getBoundContext();
344
- return mParameters.oView
345
- .getModel("sap.fe.i18n")
346
- .getResourceBundle()
347
- .then(function(_oResourceBundle) {
348
- oResourceBundle = _oResourceBundle;
349
- return draftDataContext.requestObject();
350
- })
351
- .then(function(draftAdminData) {
352
- if (draftAdminData) {
353
- // remove all unbound transition messages as we show a special dialog
354
- messageHandling.removeUnboundTransitionMessages();
355
- var sInfo = draftAdminData.InProcessByUserDescription || draftAdminData.InProcessByUser;
356
- var sEntitySet = mParameters.oView.getViewData().entitySet;
357
- if (sInfo) {
358
- var sLockedByUserMsg = CommonUtils.getTranslatedText(
359
- "C_DRAFT_OBJECT_PAGE_DRAFT_LOCKED_BY_USER",
360
- oResourceBundle,
361
- sInfo,
362
- sEntitySet
363
- );
364
- MessageBox.error(sLockedByUserMsg);
365
- throw new Error(sLockedByUserMsg);
366
- } else {
367
- sInfo = draftAdminData.CreatedByUserDescription || draftAdminData.CreatedByUser;
368
- var sUnsavedChangesMsg = CommonUtils.getTranslatedText(
369
- "C_DRAFT_OBJECT_PAGE_DRAFT_UNSAVED_CHANGES",
370
- oResourceBundle,
371
- sInfo,
372
- sEntitySet
373
- );
374
- return showMessageBox(sUnsavedChangesMsg).then(function() {
375
- return executeDraftEditAction(oContext, false);
376
- });
344
+ if (mParameters && mParameters.oView) {
345
+ return mParameters.oView
346
+ .getModel("sap.fe.i18n")
347
+ .getResourceBundle()
348
+ .then(function(_oResourceBundle) {
349
+ oResourceBundle = _oResourceBundle;
350
+ return draftDataContext.requestObject();
351
+ })
352
+ .then(function(draftAdminData) {
353
+ if (draftAdminData) {
354
+ // remove all unbound transition messages as we show a special dialog
355
+ messageHandling.removeUnboundTransitionMessages();
356
+ var sInfo = draftAdminData.InProcessByUserDescription || draftAdminData.InProcessByUser;
357
+ var sEntitySet = mParameters.oView.getViewData().entitySet;
358
+ if (sInfo) {
359
+ var sLockedByUserMsg = CommonUtils.getTranslatedText(
360
+ "C_DRAFT_OBJECT_PAGE_DRAFT_LOCKED_BY_USER",
361
+ oResourceBundle,
362
+ sInfo,
363
+ sEntitySet
364
+ );
365
+ MessageBox.error(sLockedByUserMsg);
366
+ throw new Error(sLockedByUserMsg);
367
+ } else {
368
+ sInfo = draftAdminData.CreatedByUserDescription || draftAdminData.CreatedByUser;
369
+ var sUnsavedChangesMsg = CommonUtils.getTranslatedText(
370
+ "C_DRAFT_OBJECT_PAGE_DRAFT_UNSAVED_CHANGES",
371
+ oResourceBundle,
372
+ sInfo,
373
+ sEntitySet
374
+ );
375
+ return showMessageBox(sUnsavedChangesMsg).then(function() {
376
+ return executeDraftEditAction(oContext, false);
377
+ });
378
+ }
377
379
  }
378
- }
379
- });
380
+ });
381
+ }
380
382
  }
381
383
  return Promise.reject(new Error("Draft creation aborted for document: " + oContext.getPath()));
382
384
  }
@@ -426,9 +428,11 @@ sap.ui.define(
426
428
  if (!bExecute) {
427
429
  throw new Error("Draft creation was aborted by extension for document: " + oContext.getPath());
428
430
  }
429
- return executeDraftEditAction(oContext, bRunPreserveChangesFlow).catch(function(oResponse) {
431
+ return draft.executeDraftEditAction(oContext, bRunPreserveChangesFlow).catch(function(oResponse) {
430
432
  //Only call back if error 409
431
433
  if (bRunPreserveChangesFlow && oResponse.status === 409) {
434
+ messageHandling.removeBoundTransitionMessages();
435
+ messageHandling.removeUnboundTransitionMessages();
432
436
  return Promise.resolve(
433
437
  mParam.fnWhenDecisionToOverwriteDocumentIsRequired
434
438
  ? mParam.fnWhenDecisionToOverwriteDocumentIsRequired()
@@ -575,7 +579,8 @@ sap.ui.define(
575
579
  var draft = {
576
580
  createDraftFromActiveDocument: createDraftFromActiveDocument,
577
581
  activateDocument: activateDocument,
578
- deleteDraft: deleteDraft
582
+ deleteDraft: deleteDraft,
583
+ executeDraftEditAction: executeDraftEditAction
579
584
  };
580
585
 
581
586
  return draft;
@@ -106,7 +106,7 @@ sap.ui.define(
106
106
  interfaces: [],
107
107
  controls: [],
108
108
  elements: [],
109
- version: "1.96.16",
109
+ version: "1.96.18",
110
110
  noLibraryCSS: true,
111
111
  extensions: {
112
112
  //Configuration used for rule loading of Support Assistant
@@ -140,7 +140,7 @@ C_COMMON_SAPFE_DATA_RECEIVED_ERROR=Nie mo\u017Cna wczyta\u0107 danych.
140
140
 
141
141
  C_COMMON_APPLY_ERROR=Wyst\u0105pi\u0142 b\u0142\u0105d podczas wysy\u0142ania zmian. Przejd\u017A wstecz, aby odrzuci\u0107 zmiany, lub spr\u00F3buj wys\u0142a\u0107 je ponownie.
142
142
 
143
- C_COMMON_OBJECT_PAGE_DELETE=Usuwanie
143
+ C_COMMON_OBJECT_PAGE_DELETE=Usu\u0144
144
144
 
145
145
  C_TRANSACTION_HELPER_OBJECT_PAGE_CONFIRM_DELETE_WITH_OBJECTINFO=Usun\u0105\u0107 ten obiekt ({1} {0})?
146
146