@eo-sdk/client 7.14.0 → 7.15.0-rc.1

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.
@@ -34,6 +34,7 @@ export declare class PrepareDetailsComponent extends UnsubscribeOnDestroy implem
34
34
  file: ElementRef;
35
35
  objectForm: ObjectFormComponent;
36
36
  confirmDeleteButton: ElementRef;
37
+ confirmContentDeleteButton: ElementRef;
37
38
  PHASE_TYPE: string;
38
39
  PHASE_CONTENT: string;
39
40
  PHASE_INDEXDATA: string;
@@ -56,6 +57,8 @@ export declare class PrepareDetailsComponent extends UnsubscribeOnDestroy implem
56
57
  loading: boolean;
57
58
  tagFilterOptions: any;
58
59
  _showDeleteDialog: boolean;
60
+ _showContentDeleteDialog: boolean;
61
+ deletedContentIndex: number;
59
62
  header: {
60
63
  title: any;
61
64
  location: {
@@ -72,6 +75,8 @@ export declare class PrepareDetailsComponent extends UnsubscribeOnDestroy implem
72
75
  get dataType(): string;
73
76
  set showDeleteDialog(val: boolean);
74
77
  get showDeleteDialog(): boolean;
78
+ set showContentDeleteDialog(val: boolean);
79
+ get showContentDeleteDialog(): boolean;
75
80
  constructor(prepareService: PrepareService, router: Router, pendingChanges: PendingChangesService, translate: TranslateService, notification: NotificationsService, systemService: SystemService, selection: SelectionService, backend: BackendService);
76
81
  cellRenderer(params: any): string;
77
82
  private startPending;
@@ -83,6 +88,7 @@ export declare class PrepareDetailsComponent extends UnsubscribeOnDestroy implem
83
88
  */
84
89
  commit(openLocationAfterCommit?: boolean): void;
85
90
  removeItem(item: PreparedItem): void;
91
+ removeItemContent(item: PreparedItem, deletedContentIndex: number): void;
86
92
  getFileNames(item: PreparedItem): string;
87
93
  /**
88
94
  * Select a target object type for the current prepared item.
@@ -481,6 +481,7 @@
481
481
  "eo.prepare.details.type.subtitle": "Auswahl des Objekttyps",
482
482
  "eo.prepare.details.content.subtitle": "Datei hinzufügen",
483
483
  "eo.prepare.details.indexdata.subtitle": "Metadaten hinzufügen",
484
+ "eo.prepare.details.delete.content.dialog.title": "Datei '{{contentPath}}' löschen?",
484
485
  "eo.prepare.details.delete.dialog.title": "Objekt löschen?",
485
486
  "eo.prepare.details.delete.dialog.cancel": "Abbrechen",
486
487
  "eo.prepare.details.delete.dialog.ok": "OK",
@@ -482,6 +482,7 @@
482
482
  "eo.prepare.details.type.subtitle": "Object type selection",
483
483
  "eo.prepare.details.content.subtitle": "Add file",
484
484
  "eo.prepare.details.indexdata.subtitle": "Add metadata",
485
+ "eo.prepare.details.delete.content.dialog.title": "Delete content file '{{contentPath}}'?",
485
486
  "eo.prepare.details.delete.dialog.title": "Delete object?",
486
487
  "eo.prepare.details.delete.dialog.cancel": "Cancel",
487
488
  "eo.prepare.details.delete.dialog.ok": "OK",
@@ -1238,7 +1238,8 @@
1238
1238
  };
1239
1239
  BackendService.prototype.getFileNameFromHttpResponse = function (res, version) {
1240
1240
  var contentDispositionHeader = res.headers.get('Content-Disposition') || '';
1241
- var encodedFileNameMatchResult = contentDispositionHeader.match('filename\\*=UTF-8\'\'(.*)');
1241
+ var encodedFileNameMatchResult = contentDispositionHeader.match('filename\\*=UTF-8\'\'(.*)')
1242
+ || contentDispositionHeader.match('filename=\"(.*)\"');
1242
1243
  var encodedFileName = encodedFileNameMatchResult ? encodedFileNameMatchResult[1] : null;
1243
1244
  var filename = encodedFileName ? decodeURIComponent(encodedFileName) : 'unknown';
1244
1245
  var index = !~filename.lastIndexOf('.') ? filename.length : filename.lastIndexOf('.');
@@ -2364,6 +2365,21 @@
2364
2365
  }
2365
2366
  return uri;
2366
2367
  };
2368
+ /**
2369
+ * Deletes a prepared creation object content element by index or the complete content.
2370
+ * If you provide an index the content consists only of one element,
2371
+ * the content is completely removed from the prepared creation object.
2372
+ *
2373
+ * @param preparedItemId ID of the item with the content to be removed
2374
+ * @param index Parameter that determines which content element should be deleted.
2375
+ * @returns Observable<PreparedItem> The updated prepared item
2376
+ */
2377
+ PrepareService.prototype.deletePreparedItemContent = function (preparedItemId, index) {
2378
+ var url = "/prepare/" + preparedItemId + "/content" + (index !== undefined ? "?index=" + index : '');
2379
+ return this.backend
2380
+ .del(url)
2381
+ .pipe(operators.map(function (res) { return new PreparedItem(res); }));
2382
+ };
2367
2383
  return PrepareService;
2368
2384
  }());
2369
2385
  PrepareService.decorators = [