@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.
- package/app/eo-framework/actions/actions/delete-action/delete/delete.component.d.ts +2 -1
- package/app/eo-framework/app-shell/app-bar/app-search/app-search.component.d.ts +4 -3
- package/app/eo-framework-core/search/app-search.service.d.ts +5 -0
- package/assets/_default/i18n/de.json +6 -1
- package/assets/_default/i18n/en.json +6 -1
- package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.js +71 -61
- package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.js.map +1 -1
- package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.min.js +2 -2
- package/bundles/eo-sdk-client-projects-eo-sdk-core.umd.min.js.map +1 -1
- package/bundles/eo-sdk-client.umd.js +40 -10
- package/bundles/eo-sdk-client.umd.js.map +1 -1
- package/bundles/eo-sdk-client.umd.min.js +1 -1
- package/bundles/eo-sdk-client.umd.min.js.map +1 -1
- package/eo-sdk-client.metadata.json +1 -1
- package/esm2015/app/eo-client/about-state/about-state.component.js +3 -3
- package/esm2015/app/eo-framework/actions/actions/delete-action/delete/delete.component.js +14 -6
- package/esm2015/app/eo-framework/app-shell/app-bar/app-search/app-search.component.js +10 -4
- package/esm2015/app/eo-framework/ui/signature-tab/signature-tab.component.js +3 -3
- package/esm2015/app/eo-framework-core/search/app-search.service.js +15 -1
- package/esm2015/projects/eo-sdk/core/lib/service/dms/dms.service.js +6 -2
- package/esm2015/projects/eo-sdk/core/lib/service/search/search-query.model.js +64 -62
- package/esm2015/projects/eo-sdk/core/lib/service/search/search.service.js +5 -2
- package/fesm2015/eo-sdk-client-projects-eo-sdk-core.js +71 -62
- package/fesm2015/eo-sdk-client-projects-eo-sdk-core.js.map +1 -1
- package/fesm2015/eo-sdk-client.js +38 -10
- package/fesm2015/eo-sdk-client.js.map +1 -1
- package/package.json +2 -2
- package/projects/eo-sdk/core/eo-sdk-client-projects-eo-sdk-core.metadata.json +1 -1
- package/projects/eo-sdk/core/lib/service/dms/dms.service.d.ts +2 -1
- package/projects/eo-sdk/core/lib/service/search/search-query.model.d.ts +3 -1
- 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 ===
|
|
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:
|
|
439
|
-
CREATOR:
|
|
440
|
-
CREATED:
|
|
441
|
-
MODIFIER:
|
|
442
|
-
MODIFIED:
|
|
443
|
-
FILESIZE:
|
|
444
|
-
FILENAME:
|
|
445
|
-
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:
|
|
452
|
-
YESTERDAY:
|
|
453
|
-
THIS_WEEK:
|
|
454
|
-
LAST_WEEK:
|
|
455
|
-
THIS_MONTH:
|
|
456
|
-
LAST_MONTH:
|
|
457
|
-
THIS_YEAR:
|
|
458
|
-
LAST_YEAR:
|
|
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:
|
|
465
|
-
MAIL:
|
|
466
|
-
WORD:
|
|
467
|
-
IMAGE:
|
|
468
|
-
OCTET_STREAM:
|
|
469
|
-
TXT:
|
|
470
|
-
EXCEL:
|
|
471
|
-
POWERPOINT:
|
|
472
|
-
VIDEO:
|
|
473
|
-
HTML:
|
|
474
|
-
AUDIO:
|
|
475
|
-
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
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
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:
|
|
489
|
-
TOGGLED_EXPERTMODE:
|
|
490
|
-
TERM_SET:
|
|
491
|
-
TYPES_SET:
|
|
492
|
-
CONTEXT_FOLDER_SET:
|
|
493
|
-
TOGGLED_FILTER:
|
|
494
|
-
ADDED_FILTER:
|
|
495
|
-
REMOVED_FILTER:
|
|
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 =
|
|
502
|
+
SearchQuery.DEFAULT_SEARCH_MODE = 'idxs';
|
|
501
503
|
/**
|
|
502
504
|
* Search mode for Full test Search
|
|
503
505
|
*/
|
|
504
|
-
SearchQuery.FULLTEXT_SEARCH_MODE =
|
|
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
|
|
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(
|
|
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(
|
|
627
|
+
? new DatePipe('en').transform(value, 'yyyy-MM-ddTZ')
|
|
626
628
|
: this.transformDate.time
|
|
627
|
-
? new Date(value).toISOString().slice(0, 16) +
|
|
628
|
-
: new DatePipe(
|
|
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:
|
|
685
|
+
EQUAL: 'eq',
|
|
684
686
|
/** match (for string with classification "path6666") */
|
|
685
|
-
MATCH:
|
|
687
|
+
MATCH: 'match',
|
|
686
688
|
/** match at least one of the provided values (value has to be an array) */
|
|
687
|
-
IN:
|
|
689
|
+
IN: 'in',
|
|
688
690
|
/** greater than */
|
|
689
|
-
GREATER_THAN:
|
|
691
|
+
GREATER_THAN: 'gt',
|
|
690
692
|
/** greater than or equal */
|
|
691
|
-
GREATER_OR_EQUAL:
|
|
692
|
-
LESS_THAN:
|
|
693
|
-
LESS_OR_EQUAL:
|
|
694
|
-
INTERVAL:
|
|
695
|
-
INTERVAL_INCLUDE_BOTH:
|
|
696
|
-
INTERVAL_INCLUDE_TO:
|
|
697
|
-
INTERVAL_INCLUDE_FROM:
|
|
698
|
-
RANGE:
|
|
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
|
-
|
|
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
|