@eo-sdk/client 9.3.0-rc.1 → 9.3.0-rc.2

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.
Files changed (31) hide show
  1. package/app/eo-framework/actions/actions/delete-action/delete/delete.component.d.ts +2 -1
  2. package/app/eo-framework/app-shell/app-bar/app-search/app-search.component.d.ts +4 -3
  3. package/app/eo-framework-core/search/app-search.service.d.ts +5 -0
  4. package/assets/_default/i18n/de.json +6 -1
  5. package/assets/_default/i18n/en.json +6 -1
  6. package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.js +71 -61
  7. package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.js.map +1 -1
  8. package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.min.js +2 -2
  9. package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.min.js.map +1 -1
  10. package/bundles/eo-sdk-client.umd.js +40 -10
  11. package/bundles/eo-sdk-client.umd.js.map +1 -1
  12. package/bundles/eo-sdk-client.umd.min.js +1 -1
  13. package/bundles/eo-sdk-client.umd.min.js.map +1 -1
  14. package/eo-sdk-client.metadata.json +1 -1
  15. package/esm2015/app/eo-client/about-state/about-state.component.js +3 -3
  16. package/esm2015/app/eo-framework/actions/actions/delete-action/delete/delete.component.js +14 -6
  17. package/esm2015/app/eo-framework/app-shell/app-bar/app-search/app-search.component.js +10 -4
  18. package/esm2015/app/eo-framework/ui/signature-tab/signature-tab.component.js +3 -3
  19. package/esm2015/app/eo-framework-core/search/app-search.service.js +15 -1
  20. package/esm2015/projects/eo-sdk/core/lib/service/dms/dms.service.js +6 -2
  21. package/esm2015/projects/eo-sdk/core/lib/service/search/search-query.model.js +64 -62
  22. package/esm2015/projects/eo-sdk/core/lib/service/search/search.service.js +5 -2
  23. package/fesm2015/eo-sdk-client-projects-eo-sdk-core.js +71 -62
  24. package/fesm2015/eo-sdk-client-projects-eo-sdk-core.js.map +1 -1
  25. package/fesm2015/eo-sdk-client.js +38 -10
  26. package/fesm2015/eo-sdk-client.js.map +1 -1
  27. package/package.json +2 -2
  28. package/projects/eo-sdk/core/eo-sdk-client-projects-eo-sdk-core.metadata.json +1 -1
  29. package/projects/eo-sdk/core/lib/service/dms/dms.service.d.ts +2 -1
  30. package/projects/eo-sdk/core/lib/service/search/search-query.model.d.ts +3 -1
  31. package/projects/eo-sdk/core/package.json +1 -1
@@ -365,7 +365,7 @@ class SearchQuery {
365
365
  const queryJson = {};
366
366
  // add type filters
367
367
  if (this.types.length > 0) {
368
- queryJson.types = this.types.map(t => typeof t === "string" ? t : t.name);
368
+ queryJson.types = this.types.map(t => typeof t === 'string' ? t : t.name);
369
369
  }
370
370
  // add context folder type filters
371
371
  if (this.contextFolderTypes.length > 0) {
@@ -435,73 +435,75 @@ class SearchQuery {
435
435
  * Base Parameters for a Search Query
436
436
  */
437
437
  SearchQuery.BASE_PARAMS = {
438
- TYPE: "type",
439
- CREATOR: "creator",
440
- CREATED: "created",
441
- MODIFIER: "modifier",
442
- MODIFIED: "modified",
443
- FILESIZE: "filesize",
444
- FILENAME: "filename",
445
- MIMETYPEGROUP: "mimetypegroup"
438
+ TYPE: 'type',
439
+ CREATOR: 'creator',
440
+ CREATED: 'created',
441
+ MODIFIER: 'modifier',
442
+ MODIFIED: 'modified',
443
+ FILESIZE: 'filesize',
444
+ FILENAME: 'filename',
445
+ MIMETYPEGROUP: 'mimetypegroup',
446
+ FOLDER: 'folder'
446
447
  };
447
448
  /**
448
449
  * Time period buckets property names
449
450
  */
450
451
  SearchQuery.TIME_PERIOD_BUCKETS = {
451
- TODAY: "today",
452
- YESTERDAY: "yesterday",
453
- THIS_WEEK: "thisweek",
454
- LAST_WEEK: "lastweek",
455
- THIS_MONTH: "thismonth",
456
- LAST_MONTH: "lastmonth",
457
- THIS_YEAR: "thisyear",
458
- LAST_YEAR: "lastyear"
452
+ TODAY: 'today',
453
+ YESTERDAY: 'yesterday',
454
+ THIS_WEEK: 'thisweek',
455
+ LAST_WEEK: 'lastweek',
456
+ THIS_MONTH: 'thismonth',
457
+ LAST_MONTH: 'lastmonth',
458
+ THIS_YEAR: 'thisyear',
459
+ LAST_YEAR: 'lastyear'
459
460
  };
460
461
  /**
461
462
  * mimetype buckets property names
462
463
  */
463
464
  SearchQuery.MIMETYPEGROUP_BUCKETS = {
464
- PDF: "pdf",
465
- MAIL: "mail",
466
- WORD: "word",
467
- IMAGE: "image",
468
- OCTET_STREAM: "octet-stream",
469
- TXT: "txt",
470
- EXCEL: "excel",
471
- POWERPOINT: "powerpoint",
472
- VIDEO: "video",
473
- HTML: "html",
474
- AUDIO: "audio",
475
- ZIP: "zip"
465
+ PDF: 'pdf',
466
+ MAIL: 'mail',
467
+ WORD: 'word',
468
+ IMAGE: 'image',
469
+ OCTET_STREAM: 'octet-stream',
470
+ TXT: 'txt',
471
+ EXCEL: 'excel',
472
+ POWERPOINT: 'powerpoint',
473
+ VIDEO: 'video',
474
+ HTML: 'html',
475
+ AUDIO: 'audio',
476
+ ZIP: 'zip'
476
477
  };
477
478
  /**
478
479
  * filesize buckets property names
479
480
  */
480
481
  SearchQuery.FILE_SIZE_BUCKETS = {
481
- LT1MB: "lt1MB",
482
- LT10MB: "lt10MB",
483
- LT100MB: "lt100MB",
484
- GT100MB: "gt100MB"
482
+ NONE: 'none',
483
+ LT1MB: 'lt1MB',
484
+ LT10MB: 'lt10MB',
485
+ LT100MB: 'lt100MB',
486
+ GT100MB: 'gt100MB'
485
487
  };
486
488
  // list of things that may have changed the current query
487
489
  SearchQuery.UPDATE_CAUSE = {
488
- TOGGLED_TYPE: "cause.type.toggled",
489
- TOGGLED_EXPERTMODE: "cause.expertmode.toggled",
490
- TERM_SET: "cause.term.set",
491
- TYPES_SET: "cause.types.set",
492
- CONTEXT_FOLDER_SET: "cause.contextfolder.set",
493
- TOGGLED_FILTER: "cause.filter.toggled",
494
- ADDED_FILTER: "cause.filter.added",
495
- REMOVED_FILTER: "cause.filter.removed",
490
+ TOGGLED_TYPE: 'cause.type.toggled',
491
+ TOGGLED_EXPERTMODE: 'cause.expertmode.toggled',
492
+ TERM_SET: 'cause.term.set',
493
+ TYPES_SET: 'cause.types.set',
494
+ CONTEXT_FOLDER_SET: 'cause.contextfolder.set',
495
+ TOGGLED_FILTER: 'cause.filter.toggled',
496
+ ADDED_FILTER: 'cause.filter.added',
497
+ REMOVED_FILTER: 'cause.filter.removed',
496
498
  };
497
499
  /**
498
500
  * Detault Search mode Index
499
501
  */
500
- SearchQuery.DEFAULT_SEARCH_MODE = "idxs";
502
+ SearchQuery.DEFAULT_SEARCH_MODE = 'idxs';
501
503
  /**
502
504
  * Search mode for Full test Search
503
505
  */
504
- SearchQuery.FULLTEXT_SEARCH_MODE = "fts";
506
+ SearchQuery.FULLTEXT_SEARCH_MODE = 'fts';
505
507
  /**
506
508
  * @ignore
507
509
  * Creates the Model of Sort Options
@@ -553,7 +555,7 @@ class SearchState {
553
555
  }
554
556
  addAggregations(type, key, value, agg) {
555
557
  switch (type) {
556
- case "contexttype": {
558
+ case 'contexttype': {
557
559
  this.aggregations.contextType.set(key, value);
558
560
  break;
559
561
  }
@@ -588,7 +590,7 @@ class SearchState {
588
590
  value: value,
589
591
  from: agg.from,
590
592
  to: agg.to || Infinity,
591
- label: key.replace("gt", "> ").replace("lt", "< ")
593
+ label: key.replace('gt', '> ').replace('lt', '< ')
592
594
  });
593
595
  break;
594
596
  }
@@ -622,10 +624,10 @@ class SearchFilter {
622
624
  formatDate(value) {
623
625
  return this.transformDate && value
624
626
  ? this.transformDate.timezone
625
- ? new DatePipe("en").transform(value, "yyyy-MM-ddTZ")
627
+ ? new DatePipe('en').transform(value, 'yyyy-MM-ddTZ')
626
628
  : this.transformDate.time
627
- ? new Date(value).toISOString().slice(0, 16) + "Z"
628
- : new DatePipe("en").transform(value, "yyyy-MM-dd")
629
+ ? new Date(value).toISOString().slice(0, 16) + 'Z'
630
+ : new DatePipe('en').transform(value, 'yyyy-MM-dd')
629
631
  : value;
630
632
  }
631
633
  toQuery() {
@@ -680,22 +682,22 @@ class SearchFilter {
680
682
  */
681
683
  SearchFilter.OPERATOR = {
682
684
  /** equal */
683
- EQUAL: "eq",
685
+ EQUAL: 'eq',
684
686
  /** match (for string with classification "path6666") */
685
- MATCH: "match",
687
+ MATCH: 'match',
686
688
  /** match at least one of the provided values (value has to be an array) */
687
- IN: "in",
689
+ IN: 'in',
688
690
  /** greater than */
689
- GREATER_THAN: "gt",
691
+ GREATER_THAN: 'gt',
690
692
  /** greater than or equal */
691
- GREATER_OR_EQUAL: "gte",
692
- LESS_THAN: "lt",
693
- LESS_OR_EQUAL: "lte",
694
- INTERVAL: "gtlt",
695
- INTERVAL_INCLUDE_BOTH: "gtelte",
696
- INTERVAL_INCLUDE_TO: "gtlte",
697
- INTERVAL_INCLUDE_FROM: "gtelt",
698
- RANGE: "rg" // aggegation ranges
693
+ GREATER_OR_EQUAL: 'gte',
694
+ LESS_THAN: 'lt',
695
+ LESS_OR_EQUAL: 'lte',
696
+ INTERVAL: 'gtlt',
697
+ INTERVAL_INCLUDE_BOTH: 'gtelte',
698
+ INTERVAL_INCLUDE_TO: 'gtlte',
699
+ INTERVAL_INCLUDE_FROM: 'gtelt',
700
+ RANGE: 'rg' // aggegation ranges
699
701
  };
700
702
 
701
703
  /**
@@ -4406,8 +4408,9 @@ class DmsService {
4406
4408
  * @param id The id of the dms object to be deleted.
4407
4409
  * @param type Type of object
4408
4410
  * @param hardDelete If object should really be deleted or only put into the recycle bin
4411
+ * @param force If object should be forced to be deleted, even if it is used inside of a process. Default: false
4409
4412
  */
4410
- deleteDmsObject(id, type, hardDelete) {
4413
+ deleteDmsObject(id, type, hardDelete, force = false) {
4411
4414
  const url = `/dms/${id}`;
4412
4415
  const params = {};
4413
4416
  if (type && type.length > 0) {
@@ -4416,6 +4419,9 @@ class DmsService {
4416
4419
  if (hardDelete) {
4417
4420
  params['harddelete'] = hardDelete;
4418
4421
  }
4422
+ if (force) {
4423
+ params['forcedelete'] = force;
4424
+ }
4419
4425
  return this.backend.del(Utils.buildUri(url, params));
4420
4426
  }
4421
4427
  /**
@@ -5045,7 +5051,10 @@ class SearchService {
5045
5051
  ? res.aggregations[baseParam].buckets
5046
5052
  : [];
5047
5053
  aggregations.forEach(aggregation => {
5048
- const { key, doc_count, contextfoldertype } = aggregation;
5054
+ let { key, doc_count, contextfoldertype } = aggregation;
5055
+ if (baseParam === 'filesize') {
5056
+ doc_count = aggregation['filter#documents'].doc_count;
5057
+ }
5049
5058
  state.addAggregations(baseParam, key, doc_count, aggregation);
5050
5059
  /**
5051
5060
  * type aggregations may also contain buckets for their context types