@netgrif/components-core 6.0.3 → 6.0.4
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/bundles/netgrif-components-core.umd.js +166 -61
- package/bundles/netgrif-components-core.umd.js.map +1 -1
- package/bundles/netgrif-components-core.umd.min.js +2 -2
- package/bundles/netgrif-components-core.umd.min.js.map +1 -1
- package/esm2015/lib/data-fields/file-field/abstract-file-field.component.js +2 -2
- package/esm2015/lib/groups/services/next-group.service.js +3 -2
- package/esm2015/lib/resources/abstract-endpoint/abstract-resource.service.js +3 -2
- package/esm2015/lib/resources/engine-endpoint/public/public-task-resource.service.js +1 -1
- package/esm2015/lib/search/models/category/case/case-dataset.js +3 -6
- package/esm2015/lib/search/models/category/case/case-simple-dataset.js +3 -3
- package/esm2015/lib/search/models/category/case/case-title.js +13 -3
- package/esm2015/lib/search/models/category/case/case-visual-id.js +13 -3
- package/esm2015/lib/search/models/category/category.js +10 -2
- package/esm2015/lib/search/models/operator/substring.js +3 -3
- package/esm2015/lib/search/search-keyword-resolver-service/search-index-resolver.service.js +18 -3
- package/esm2015/lib/search/search-service/search.service.js +3 -2
- package/esm2015/lib/side-menu/content-components/new-case/abstract-new-case.component.js +6 -1
- package/esm2015/lib/task/services/finish-task.service.js +18 -13
- package/esm2015/lib/task/services/task-data.service.js +2 -1
- package/esm2015/lib/user/services/user-list.service.js +4 -3
- package/esm2015/lib/utility/pagination/load-all-pages.js +4 -3
- package/esm2015/lib/utility/pagination/pagination-params.js +19 -0
- package/esm2015/lib/utility/pagination/pagination-sort.js +17 -0
- package/esm2015/lib/utility/public-api.js +3 -1
- package/esm2015/lib/utility/tests/mocks/mock-endpoint.js +4 -3
- package/esm2015/lib/view/abstract/sortable-view.js +4 -3
- package/esm2015/lib/view/case-view/service/case-view-service.js +6 -4
- package/esm2015/lib/view/public-api.js +3 -1
- package/esm2015/lib/view/task-view/service/task-view.service.js +6 -4
- package/esm2015/lib/view/tree-case-view/tree-component/case-tree.service.js +19 -5
- package/esm2015/lib/view/tree-case-view/tree-component/model/tree-case-view-configuration.js +2 -0
- package/esm2015/lib/view/tree-case-view/tree-component/model/tree-configuration-injection-token.js +3 -0
- package/esm2015/lib/view/workflow-view/workflow-view.service.js +4 -11
- package/esm5/lib/data-fields/file-field/abstract-file-field.component.js +2 -2
- package/esm5/lib/groups/services/next-group.service.js +3 -2
- package/esm5/lib/resources/abstract-endpoint/abstract-resource.service.js +3 -2
- package/esm5/lib/resources/engine-endpoint/public/public-task-resource.service.js +1 -1
- package/esm5/lib/search/models/category/case/case-dataset.js +3 -6
- package/esm5/lib/search/models/category/case/case-simple-dataset.js +3 -3
- package/esm5/lib/search/models/category/case/case-title.js +19 -4
- package/esm5/lib/search/models/category/case/case-visual-id.js +19 -4
- package/esm5/lib/search/models/category/category.js +10 -2
- package/esm5/lib/search/models/operator/substring.js +3 -3
- package/esm5/lib/search/search-keyword-resolver-service/search-index-resolver.service.js +17 -2
- package/esm5/lib/search/search-service/search.service.js +3 -2
- package/esm5/lib/side-menu/content-components/new-case/abstract-new-case.component.js +6 -1
- package/esm5/lib/task/services/finish-task.service.js +18 -13
- package/esm5/lib/task/services/task-data.service.js +2 -1
- package/esm5/lib/user/services/user-list.service.js +4 -3
- package/esm5/lib/utility/pagination/load-all-pages.js +4 -3
- package/esm5/lib/utility/pagination/pagination-params.js +19 -0
- package/esm5/lib/utility/pagination/pagination-sort.js +17 -0
- package/esm5/lib/utility/public-api.js +3 -1
- package/esm5/lib/utility/tests/mocks/mock-endpoint.js +4 -3
- package/esm5/lib/view/abstract/sortable-view.js +4 -3
- package/esm5/lib/view/case-view/service/case-view-service.js +6 -4
- package/esm5/lib/view/public-api.js +3 -1
- package/esm5/lib/view/task-view/service/task-view.service.js +6 -4
- package/esm5/lib/view/tree-case-view/tree-component/case-tree.service.js +19 -5
- package/esm5/lib/view/tree-case-view/tree-component/model/tree-case-view-configuration.js +2 -0
- package/esm5/lib/view/tree-case-view/tree-component/model/tree-configuration-injection-token.js +3 -0
- package/esm5/lib/view/workflow-view/workflow-view.service.js +4 -11
- package/fesm2015/netgrif-components-core.js +154 -61
- package/fesm2015/netgrif-components-core.js.map +1 -1
- package/fesm5/netgrif-components-core.js +165 -62
- package/fesm5/netgrif-components-core.js.map +1 -1
- package/lib/search/models/category/case/case-dataset.d.ts +0 -2
- package/lib/search/models/category/case/case-title.d.ts +4 -1
- package/lib/search/models/category/case/case-visual-id.d.ts +4 -1
- package/lib/search/models/category/category.d.ts +7 -0
- package/lib/search/search-keyword-resolver-service/search-index-resolver.service.d.ts +12 -0
- package/lib/side-menu/content-components/new-case/abstract-new-case.component.d.ts +1 -0
- package/lib/task/services/finish-task.service.d.ts +5 -0
- package/lib/utility/pagination/pagination-params.d.ts +17 -0
- package/lib/utility/pagination/pagination-sort.d.ts +13 -0
- package/lib/utility/public-api.d.ts +2 -0
- package/lib/view/public-api.d.ts +2 -0
- package/lib/view/tree-case-view/tree-component/case-tree.service.d.ts +4 -1
- package/lib/view/tree-case-view/tree-component/model/tree-case-view-configuration.d.ts +9 -0
- package/lib/view/tree-case-view/tree-component/model/tree-configuration-injection-token.d.ts +3 -0
- package/lib/view/workflow-view/workflow-view.service.d.ts +0 -1
- package/netgrif-components-core.metadata.json +1 -1
- package/package.json +2 -2
- package/schematics/collection.json +0 -3
|
@@ -2734,6 +2734,25 @@
|
|
|
2734
2734
|
return ResourceProvider;
|
|
2735
2735
|
}(AbstractResourceProvider));
|
|
2736
2736
|
|
|
2737
|
+
/**
|
|
2738
|
+
* Constants for pagination configuration of HTTP requests.
|
|
2739
|
+
*/
|
|
2740
|
+
|
|
2741
|
+
(function (PaginationParams) {
|
|
2742
|
+
/**
|
|
2743
|
+
* Size of page - maximal number of elements per page.
|
|
2744
|
+
*/
|
|
2745
|
+
PaginationParams["PAGE_SIZE"] = "size";
|
|
2746
|
+
/**
|
|
2747
|
+
* Requested page index. 0 based.
|
|
2748
|
+
*/
|
|
2749
|
+
PaginationParams["PAGE_NUMBER"] = "page";
|
|
2750
|
+
/**
|
|
2751
|
+
* Sort configuration of the requested page. Use the {@link createSortParam} function to generate the value for this attribute.
|
|
2752
|
+
*/
|
|
2753
|
+
PaginationParams["PAGE_SORT"] = "sort";
|
|
2754
|
+
})(exports.PaginationParams || (exports.PaginationParams = {}));
|
|
2755
|
+
|
|
2737
2756
|
/**
|
|
2738
2757
|
* The class that contains behavior common to all resource services.
|
|
2739
2758
|
*
|
|
@@ -2796,7 +2815,7 @@
|
|
|
2796
2815
|
};
|
|
2797
2816
|
return {
|
|
2798
2817
|
content: this.changeType(r, propertiesParams),
|
|
2799
|
-
pagination: r.hasOwnProperty(
|
|
2818
|
+
pagination: r.hasOwnProperty(exports.PaginationParams.PAGE_NUMBER) ? r.page : defaultPage
|
|
2800
2819
|
};
|
|
2801
2820
|
};
|
|
2802
2821
|
/**
|
|
@@ -7027,7 +7046,7 @@
|
|
|
7027
7046
|
return;
|
|
7028
7047
|
}
|
|
7029
7048
|
this.state.downloading = true;
|
|
7030
|
-
this._taskResourceService.downloadFilePreview(this.
|
|
7049
|
+
this._taskResourceService.downloadFilePreview(this.resolveParentTaskId(), this.dataField.stringId).subscribe(function (response) {
|
|
7031
7050
|
if (response instanceof Blob) {
|
|
7032
7051
|
_this._log.debug("Preview of file [" + _this.dataField.stringId + "] " + _this.dataField.value.name + " was successfully downloaded");
|
|
7033
7052
|
_this.fileForPreview = new Blob([response], { type: 'application/octet-stream' });
|
|
@@ -9726,8 +9745,8 @@
|
|
|
9726
9745
|
// TODO IMPROVEMENT 27.4.2020 - we could use regular expressions to search for substrings which would solve the unintuitive
|
|
9727
9746
|
// behavior that occurs when we search for strings that contain spaces. We need to escape the input string in a special way
|
|
9728
9747
|
// if we choose to do this
|
|
9729
|
-
var escapedValue = Operator.escapeInput(args[0]).value;
|
|
9730
|
-
return Operator.forEachKeyword(elasticKeywords, function (keyword) { return new Query("(" + keyword + "
|
|
9748
|
+
var escapedValue = Operator.escapeInput(args[0]).value.replace(' ', '\\ ');
|
|
9749
|
+
return Operator.forEachKeyword(elasticKeywords, function (keyword) { return new Query("(" + keyword + ":*" + escapedValue + "*)"); });
|
|
9731
9750
|
};
|
|
9732
9751
|
Substring.prototype.getOperatorNameTemplate = function () {
|
|
9733
9752
|
return ['search.operator.substring', Operator.INPUT_PLACEHOLDER];
|
|
@@ -10029,6 +10048,7 @@
|
|
|
10029
10048
|
*/
|
|
10030
10049
|
var SearchIndexResolverService = /** @class */ (function () {
|
|
10031
10050
|
function SearchIndexResolverService() {
|
|
10051
|
+
this.KEYWORD = '.keyword';
|
|
10032
10052
|
}
|
|
10033
10053
|
/**
|
|
10034
10054
|
* Constructs the index name for the specified field.
|
|
@@ -10043,7 +10063,21 @@
|
|
|
10043
10063
|
*/
|
|
10044
10064
|
SearchIndexResolverService.prototype.getIndex = function (dataFieldIdentifier, index, keyword) {
|
|
10045
10065
|
if (keyword === void 0) { keyword = false; }
|
|
10046
|
-
return "dataSet." + dataFieldIdentifier + "." + index + (keyword ?
|
|
10066
|
+
return "dataSet." + dataFieldIdentifier + "." + index + (keyword ? this.KEYWORD : '');
|
|
10067
|
+
};
|
|
10068
|
+
/**
|
|
10069
|
+
* Constructs the index name for the specified core field.
|
|
10070
|
+
*
|
|
10071
|
+
* Note that almost all combinations are valid and will not throw an error when used to query the database, but not all combinations are
|
|
10072
|
+
* used by the application engine. The {@link SearchIndex} class has some information about which field types map to which indices, but
|
|
10073
|
+
* you should consult the backend documentation for more reliable information.
|
|
10074
|
+
* @param index the queried index
|
|
10075
|
+
* @param keyword whether the keyword of a TEXT index should be queried
|
|
10076
|
+
* @returns the full name of the specified index
|
|
10077
|
+
*/
|
|
10078
|
+
SearchIndexResolverService.prototype.getCoreIndex = function (index, keyword) {
|
|
10079
|
+
if (keyword === void 0) { keyword = false; }
|
|
10080
|
+
return "" + index + (keyword ? this.KEYWORD : '');
|
|
10047
10081
|
};
|
|
10048
10082
|
SearchIndexResolverService.ɵprov = core["ɵɵdefineInjectable"]({ factory: function SearchIndexResolverService_Factory() { return new SearchIndexResolverService(); }, token: SearchIndexResolverService, providedIn: "root" });
|
|
10049
10083
|
SearchIndexResolverService.decorators = [
|
|
@@ -10538,7 +10572,7 @@
|
|
|
10538
10572
|
if (!this.isOperatorSelected()) {
|
|
10539
10573
|
throw new Error('Category cannot generate a Query if no Operator is selected');
|
|
10540
10574
|
}
|
|
10541
|
-
return this._operatorFormControl.value.createQuery(this.
|
|
10575
|
+
return this._operatorFormControl.value.createQuery(this.elasticKeywords, userInput);
|
|
10542
10576
|
};
|
|
10543
10577
|
/**
|
|
10544
10578
|
* Calls the [generateQuery]{@link Category#generateQuery} method and creates an {@link ElementaryPredicate} with the result.
|
|
@@ -10839,6 +10873,14 @@
|
|
|
10839
10873
|
}
|
|
10840
10874
|
return { segment: segment, bold: true };
|
|
10841
10875
|
};
|
|
10876
|
+
/**
|
|
10877
|
+
* Checks for selected operator
|
|
10878
|
+
* @param operatorClass the operator to be checked
|
|
10879
|
+
* @return boolean of the statement
|
|
10880
|
+
*/
|
|
10881
|
+
Category.prototype.isSelectedOperator = function (operatorClass) {
|
|
10882
|
+
return this.selectedOperator === this._operatorService.getOperator(operatorClass);
|
|
10883
|
+
};
|
|
10842
10884
|
/**
|
|
10843
10885
|
* The {@link CategoryMetadataConfiguration} key for this Category's {@link Operator}
|
|
10844
10886
|
*/
|
|
@@ -11691,12 +11733,12 @@
|
|
|
11691
11733
|
return resolver.getIndex(datafield.fieldId, exports.SearchIndex.BOOLEAN);
|
|
11692
11734
|
case 'file':
|
|
11693
11735
|
case 'fileList':
|
|
11694
|
-
return resolver.getIndex(datafield.fieldId, exports.SearchIndex.FILE_NAME, this.isSelectedOperator(Equals) || this.isSelectedOperator(NotEquals));
|
|
11736
|
+
return resolver.getIndex(datafield.fieldId, exports.SearchIndex.FILE_NAME, this.isSelectedOperator(Equals) || this.isSelectedOperator(NotEquals) || this.isSelectedOperator(Substring));
|
|
11695
11737
|
case 'user':
|
|
11696
11738
|
case 'userList':
|
|
11697
11739
|
return resolver.getIndex(datafield.fieldId, exports.SearchIndex.USER_ID);
|
|
11698
11740
|
default:
|
|
11699
|
-
return resolver.getIndex(datafield.fieldId, exports.SearchIndex.FULLTEXT, this.isSelectedOperator(Equals) || this.isSelectedOperator(NotEquals));
|
|
11741
|
+
return resolver.getIndex(datafield.fieldId, exports.SearchIndex.FULLTEXT, this.isSelectedOperator(Equals) || this.isSelectedOperator(NotEquals) || this.isSelectedOperator(Substring));
|
|
11700
11742
|
}
|
|
11701
11743
|
};
|
|
11702
11744
|
Object.defineProperty(CaseDataset.prototype, "inputPlaceholder", {
|
|
@@ -11844,9 +11886,6 @@
|
|
|
11844
11886
|
}
|
|
11845
11887
|
return value;
|
|
11846
11888
|
};
|
|
11847
|
-
CaseDataset.prototype.isSelectedOperator = function (operatorClass) {
|
|
11848
|
-
return this.selectedOperator === this._operatorService.getOperator(operatorClass);
|
|
11849
|
-
};
|
|
11850
11889
|
CaseDataset.prototype.serializeClass = function () {
|
|
11851
11890
|
return exports.Categories.CASE_DATASET;
|
|
11852
11891
|
};
|
|
@@ -12067,14 +12106,14 @@
|
|
|
12067
12106
|
break;
|
|
12068
12107
|
case 'file':
|
|
12069
12108
|
case 'fileList':
|
|
12070
|
-
this._elasticKeyword = resolver.getIndex(this._fieldId, exports.SearchIndex.FILE_NAME);
|
|
12109
|
+
this._elasticKeyword = resolver.getIndex(this._fieldId, exports.SearchIndex.FILE_NAME, this.isSelectedOperator(Substring));
|
|
12071
12110
|
break;
|
|
12072
12111
|
case 'user':
|
|
12073
12112
|
case 'userList':
|
|
12074
12113
|
this._elasticKeyword = resolver.getIndex(this._fieldId, exports.SearchIndex.USER_ID);
|
|
12075
12114
|
break;
|
|
12076
12115
|
default:
|
|
12077
|
-
this._elasticKeyword = resolver.getIndex(this._fieldId, exports.SearchIndex.FULLTEXT);
|
|
12116
|
+
this._elasticKeyword = resolver.getIndex(this._fieldId, exports.SearchIndex.FULLTEXT, this.isSelectedOperator(Substring));
|
|
12078
12117
|
}
|
|
12079
12118
|
};
|
|
12080
12119
|
Object.defineProperty(CaseSimpleDataset.prototype, "elasticKeywords", {
|
|
@@ -12179,13 +12218,15 @@
|
|
|
12179
12218
|
|
|
12180
12219
|
var CaseTitle = /** @class */ (function (_super) {
|
|
12181
12220
|
__extends(CaseTitle, _super);
|
|
12182
|
-
function CaseTitle(operators, logger) {
|
|
12183
|
-
|
|
12221
|
+
function CaseTitle(operators, logger, _optionalDependencies) {
|
|
12222
|
+
var _this = _super.call(this, [exports.CaseSearch.TITLE], [
|
|
12184
12223
|
operators.getOperator(Substring),
|
|
12185
12224
|
operators.getOperator(Equals),
|
|
12186
12225
|
operators.getOperator(NotEquals),
|
|
12187
12226
|
operators.getOperator(Like)
|
|
12188
12227
|
], CaseTitle._i18n + ".name", exports.SearchInputType.TEXT, logger, operators) || this;
|
|
12228
|
+
_this._optionalDependencies = _optionalDependencies;
|
|
12229
|
+
return _this;
|
|
12189
12230
|
}
|
|
12190
12231
|
Object.defineProperty(CaseTitle.prototype, "inputPlaceholder", {
|
|
12191
12232
|
get: function () {
|
|
@@ -12195,19 +12236,34 @@
|
|
|
12195
12236
|
configurable: true
|
|
12196
12237
|
});
|
|
12197
12238
|
CaseTitle.prototype.duplicate = function () {
|
|
12198
|
-
return new CaseTitle(this._operatorService, this._log);
|
|
12239
|
+
return new CaseTitle(this._operatorService, this._log, this._optionalDependencies);
|
|
12199
12240
|
};
|
|
12200
12241
|
CaseTitle.prototype.serializeClass = function () {
|
|
12201
12242
|
return exports.Categories.CASE_TITLE;
|
|
12202
12243
|
};
|
|
12244
|
+
Object.defineProperty(CaseTitle.prototype, "elasticKeywords", {
|
|
12245
|
+
get: function () {
|
|
12246
|
+
if (!!this._optionalDependencies) {
|
|
12247
|
+
var resolver = this._optionalDependencies.searchIndexResolver;
|
|
12248
|
+
return [resolver.getCoreIndex(exports.CaseSearch.TITLE, this.isSelectedOperator(Substring))];
|
|
12249
|
+
}
|
|
12250
|
+
else {
|
|
12251
|
+
return this._elasticKeywords;
|
|
12252
|
+
}
|
|
12253
|
+
},
|
|
12254
|
+
enumerable: false,
|
|
12255
|
+
configurable: true
|
|
12256
|
+
});
|
|
12203
12257
|
CaseTitle._i18n = 'search.category.case.title';
|
|
12204
12258
|
return CaseTitle;
|
|
12205
12259
|
}(NoConfigurationCategory));
|
|
12206
12260
|
|
|
12207
12261
|
var CaseVisualId = /** @class */ (function (_super) {
|
|
12208
12262
|
__extends(CaseVisualId, _super);
|
|
12209
|
-
function CaseVisualId(operators, logger) {
|
|
12210
|
-
|
|
12263
|
+
function CaseVisualId(operators, logger, _optionalDependencies) {
|
|
12264
|
+
var _this = _super.call(this, [exports.CaseSearch.VISUAL_ID], [operators.getOperator(Substring), operators.getOperator(Equals), operators.getOperator(NotEquals)], CaseVisualId._i18n + ".name", exports.SearchInputType.TEXT, logger, operators) || this;
|
|
12265
|
+
_this._optionalDependencies = _optionalDependencies;
|
|
12266
|
+
return _this;
|
|
12211
12267
|
}
|
|
12212
12268
|
Object.defineProperty(CaseVisualId.prototype, "inputPlaceholder", {
|
|
12213
12269
|
get: function () {
|
|
@@ -12217,11 +12273,24 @@
|
|
|
12217
12273
|
configurable: true
|
|
12218
12274
|
});
|
|
12219
12275
|
CaseVisualId.prototype.duplicate = function () {
|
|
12220
|
-
return new CaseVisualId(this._operatorService, this._log);
|
|
12276
|
+
return new CaseVisualId(this._operatorService, this._log, this._optionalDependencies);
|
|
12221
12277
|
};
|
|
12222
12278
|
CaseVisualId.prototype.serializeClass = function () {
|
|
12223
12279
|
return exports.Categories.CASE_VISUAL_ID;
|
|
12224
12280
|
};
|
|
12281
|
+
Object.defineProperty(CaseVisualId.prototype, "elasticKeywords", {
|
|
12282
|
+
get: function () {
|
|
12283
|
+
if (!!this._optionalDependencies) {
|
|
12284
|
+
var resolver = this._optionalDependencies.searchIndexResolver;
|
|
12285
|
+
return [resolver.getCoreIndex(exports.CaseSearch.VISUAL_ID, this.isSelectedOperator(Substring))];
|
|
12286
|
+
}
|
|
12287
|
+
else {
|
|
12288
|
+
return this._elasticKeywords;
|
|
12289
|
+
}
|
|
12290
|
+
},
|
|
12291
|
+
enumerable: false,
|
|
12292
|
+
configurable: true
|
|
12293
|
+
});
|
|
12225
12294
|
CaseVisualId._i18n = 'search.category.case.visualId';
|
|
12226
12295
|
return CaseVisualId;
|
|
12227
12296
|
}(NoConfigurationCategory));
|
|
@@ -13646,7 +13715,8 @@
|
|
|
13646
13715
|
* @param searchedSubstring value that should be searched on all full text fields
|
|
13647
13716
|
*/
|
|
13648
13717
|
SearchService.prototype.setFullTextFilter = function (searchedSubstring) {
|
|
13649
|
-
|
|
13718
|
+
var whiteSpacedSubstring = searchedSubstring.replace(' ', '\\ ');
|
|
13719
|
+
this._fullTextFilter = new SimpleFilter('', this._baseFilter.type, { fullText: whiteSpacedSubstring });
|
|
13650
13720
|
this.updateActiveFilter();
|
|
13651
13721
|
};
|
|
13652
13722
|
/**
|
|
@@ -14639,9 +14709,9 @@
|
|
|
14639
14709
|
* @param page Page number that is requested. / Next page users list.
|
|
14640
14710
|
*/
|
|
14641
14711
|
UserListService.prototype.addPageParams = function (params, page) {
|
|
14642
|
-
params = params.set(
|
|
14712
|
+
params = params.set(exports.PaginationParams.PAGE_SIZE, "" + this._pagination.size);
|
|
14643
14713
|
page = page !== null ? page : this._pagination.number;
|
|
14644
|
-
params = params.set(
|
|
14714
|
+
params = params.set(exports.PaginationParams.PAGE_NUMBER, "" + page);
|
|
14645
14715
|
return params;
|
|
14646
14716
|
};
|
|
14647
14717
|
UserListService.ctorParameters = function () { return [
|
|
@@ -15559,10 +15629,10 @@
|
|
|
15559
15629
|
};
|
|
15560
15630
|
SortableView.prototype.addSortParams = function (params) {
|
|
15561
15631
|
if (this._lastHeaderSearchState.sortDirection !== '') {
|
|
15562
|
-
return params.set(
|
|
15632
|
+
return params.set(exports.PaginationParams.PAGE_SORT, this.getSortId() + "," + this._lastHeaderSearchState.sortDirection);
|
|
15563
15633
|
}
|
|
15564
15634
|
else {
|
|
15565
|
-
return params.set(
|
|
15635
|
+
return params.set(exports.PaginationParams.PAGE_SORT, this.getDefaultSortParam());
|
|
15566
15636
|
}
|
|
15567
15637
|
};
|
|
15568
15638
|
SortableView.prototype.getSortId = function () {
|
|
@@ -15605,6 +15675,23 @@
|
|
|
15605
15675
|
}
|
|
15606
15676
|
}
|
|
15607
15677
|
|
|
15678
|
+
/**
|
|
15679
|
+
* Constants for use with the
|
|
15680
|
+
*/
|
|
15681
|
+
|
|
15682
|
+
(function (PaginationSort) {
|
|
15683
|
+
PaginationSort["ASCENDING"] = "asc";
|
|
15684
|
+
PaginationSort["DESCENDING"] = "desc";
|
|
15685
|
+
})(exports.PaginationSort || (exports.PaginationSort = {}));
|
|
15686
|
+
/**
|
|
15687
|
+
* Creates the configuration string for use with the [PAGE_SORT]{@link PaginationParams#PAGE_SORT} configuration attribute
|
|
15688
|
+
* @param attribute the name of the attribute that should be used for sorting the results
|
|
15689
|
+
* @param direction the sorting direction
|
|
15690
|
+
*/
|
|
15691
|
+
function createSortParam(attribute, direction) {
|
|
15692
|
+
return attribute + "," + direction;
|
|
15693
|
+
}
|
|
15694
|
+
|
|
15608
15695
|
var TaskViewService = /** @class */ (function (_super) {
|
|
15609
15696
|
__extends(TaskViewService, _super);
|
|
15610
15697
|
function TaskViewService(_taskService, _userService, _snackBarService, _translate, _searchService, _log, _userComparator, resolver, _preferredEndpoint, taskViewConfig) {
|
|
@@ -15880,11 +15967,11 @@
|
|
|
15880
15967
|
return this._lastHeaderSearchState.fieldIdentifier;
|
|
15881
15968
|
};
|
|
15882
15969
|
TaskViewService.prototype.getDefaultSortParam = function () {
|
|
15883
|
-
return 'priority,
|
|
15970
|
+
return createSortParam('priority', exports.PaginationSort.DESCENDING);
|
|
15884
15971
|
};
|
|
15885
15972
|
TaskViewService.prototype.addPageParams = function (params, pagination) {
|
|
15886
|
-
params = params.set(
|
|
15887
|
-
params = params.set(
|
|
15973
|
+
params = params.set(exports.PaginationParams.PAGE_SIZE, "" + pagination.size);
|
|
15974
|
+
params = params.set(exports.PaginationParams.PAGE_NUMBER, "" + pagination.number);
|
|
15888
15975
|
return params;
|
|
15889
15976
|
};
|
|
15890
15977
|
TaskViewService.ctorParameters = function () { return [
|
|
@@ -17456,6 +17543,11 @@
|
|
|
17456
17543
|
this.netVersion = '';
|
|
17457
17544
|
}
|
|
17458
17545
|
};
|
|
17546
|
+
AbstractNewCaseComponent.prototype.toNextStep = function (viewValue) {
|
|
17547
|
+
if (viewValue !== null && viewValue.value !== undefined) {
|
|
17548
|
+
this.stepper1.next();
|
|
17549
|
+
}
|
|
17550
|
+
};
|
|
17459
17551
|
AbstractNewCaseComponent.ctorParameters = function () { return [
|
|
17460
17552
|
{ type: SideMenuControl, decorators: [{ type: core.Inject, args: [NAE_SIDE_MENU_CONTROL,] }] },
|
|
17461
17553
|
{ type: forms$3.FormBuilder },
|
|
@@ -18989,12 +19081,12 @@
|
|
|
18989
19081
|
return this._allowedNetsService.allowedNets === undefined ? 0 : this._allowedNetsService.allowedNets.length;
|
|
18990
19082
|
};
|
|
18991
19083
|
CaseViewService.prototype.addPageParams = function (params, pagination) {
|
|
18992
|
-
params = params.set(
|
|
18993
|
-
params = params.set(
|
|
19084
|
+
params = params.set(exports.PaginationParams.PAGE_SIZE, "" + pagination.size);
|
|
19085
|
+
params = params.set(exports.PaginationParams.PAGE_NUMBER, "" + pagination.number);
|
|
18994
19086
|
return params;
|
|
18995
19087
|
};
|
|
18996
19088
|
CaseViewService.prototype.getDefaultSortParam = function () {
|
|
18997
|
-
return 'stringId,
|
|
19089
|
+
return createSortParam('stringId', exports.PaginationSort.DESCENDING);
|
|
18998
19090
|
};
|
|
18999
19091
|
CaseViewService.prototype.getMetaFieldSortId = function () {
|
|
19000
19092
|
switch (this._lastHeaderSearchState.fieldIdentifier) {
|
|
@@ -22371,6 +22463,8 @@
|
|
|
22371
22463
|
*/
|
|
22372
22464
|
var NAE_WORKFLOW_SERVICE_CONFIRM_DELETE = new core.InjectionToken('NaeWorkflowServiceConfirmDelete');
|
|
22373
22465
|
|
|
22466
|
+
var NAE_TREE_CASE_VIEW_CONFIGURATION = new core.InjectionToken('NaeTreeCaseViewConfiguration');
|
|
22467
|
+
|
|
22374
22468
|
var WorkflowViewService = /** @class */ (function (_super) {
|
|
22375
22469
|
__extends(WorkflowViewService, _super);
|
|
22376
22470
|
function WorkflowViewService(_petriNetResource, _log, _dialogService, _snackBarService, _translate, resolver, injectedBaseFilter, confirmDelete) {
|
|
@@ -22546,17 +22640,9 @@
|
|
|
22546
22640
|
// TODO 7.4.2020 - workflow sorting and searching
|
|
22547
22641
|
return '';
|
|
22548
22642
|
};
|
|
22549
|
-
WorkflowViewService.prototype.addSortParams = function (params) {
|
|
22550
|
-
if (this._lastHeaderSearchState.sortDirection !== '') {
|
|
22551
|
-
return params.set('sort', this.getSortId() + "," + this._lastHeaderSearchState.sortDirection);
|
|
22552
|
-
}
|
|
22553
|
-
else {
|
|
22554
|
-
return params.set('sort', this.getDefaultSortParam());
|
|
22555
|
-
}
|
|
22556
|
-
};
|
|
22557
22643
|
WorkflowViewService.prototype.addPageParams = function (params, pagination) {
|
|
22558
|
-
params = params.set(
|
|
22559
|
-
params = params.set(
|
|
22644
|
+
params = params.set(exports.PaginationParams.PAGE_SIZE, "" + pagination.size);
|
|
22645
|
+
params = params.set(exports.PaginationParams.PAGE_NUMBER, "" + pagination.number);
|
|
22560
22646
|
return params;
|
|
22561
22647
|
};
|
|
22562
22648
|
WorkflowViewService.ctorParameters = function () { return [
|
|
@@ -22635,7 +22721,7 @@
|
|
|
22635
22721
|
}());
|
|
22636
22722
|
|
|
22637
22723
|
var CaseTreeService = /** @class */ (function () {
|
|
22638
|
-
function CaseTreeService(_caseResourceService, _treeCaseViewService, _taskResourceService, _logger, _processService, _sideMenuService, _translateService, _optionSelectorComponent) {
|
|
22724
|
+
function CaseTreeService(_caseResourceService, _treeCaseViewService, _taskResourceService, _logger, _processService, _sideMenuService, _translateService, _optionSelectorComponent, _treeConfiguration) {
|
|
22639
22725
|
var _this = this;
|
|
22640
22726
|
this._caseResourceService = _caseResourceService;
|
|
22641
22727
|
this._treeCaseViewService = _treeCaseViewService;
|
|
@@ -22645,6 +22731,7 @@
|
|
|
22645
22731
|
this._sideMenuService = _sideMenuService;
|
|
22646
22732
|
this._translateService = _translateService;
|
|
22647
22733
|
this._optionSelectorComponent = _optionSelectorComponent;
|
|
22734
|
+
this._treeConfiguration = _treeConfiguration;
|
|
22648
22735
|
/**
|
|
22649
22736
|
* Weather the tree is eager loaded or not.
|
|
22650
22737
|
*
|
|
@@ -22653,6 +22740,11 @@
|
|
|
22653
22740
|
* It is not recommended to eager load large trees as each node sends a separate backend request to load its data.
|
|
22654
22741
|
*/
|
|
22655
22742
|
this._isEagerLoaded = false;
|
|
22743
|
+
if (!this._treeConfiguration) {
|
|
22744
|
+
this._treeConfiguration = {
|
|
22745
|
+
pageSize: CaseTreeService.DEFAULT_PAGE_SIZE
|
|
22746
|
+
};
|
|
22747
|
+
}
|
|
22656
22748
|
this._treeDataSource = new tree$1.MatTreeNestedDataSource();
|
|
22657
22749
|
this._treeControl = new tree.NestedTreeControl(function (node) { return node.children; });
|
|
22658
22750
|
_treeCaseViewService.reloadCase$.asObservable().subscribe(function () {
|
|
@@ -22951,7 +23043,9 @@
|
|
|
22951
23043
|
}
|
|
22952
23044
|
var done = new rxjs.ReplaySubject(1);
|
|
22953
23045
|
var params = new http.HttpParams();
|
|
22954
|
-
params = params.set(
|
|
23046
|
+
params = params.set(exports.PaginationParams.PAGE_SIZE, "" + this._treeConfiguration.pageSize)
|
|
23047
|
+
.set(exports.PaginationParams.PAGE_NUMBER, "" + pageNumber)
|
|
23048
|
+
.set(exports.PaginationParams.PAGE_SORT, createSortParam('creationDate', exports.PaginationSort.ASCENDING));
|
|
22955
23049
|
this._caseResourceService.getCases(requestBody, params).subscribe(function (page) {
|
|
22956
23050
|
if (!hasContent(page)) {
|
|
22957
23051
|
_this._logger.error('Child cases invalid page content', page);
|
|
@@ -23482,6 +23576,7 @@
|
|
|
23482
23576
|
});
|
|
23483
23577
|
return result;
|
|
23484
23578
|
};
|
|
23579
|
+
CaseTreeService.DEFAULT_PAGE_SIZE = 50;
|
|
23485
23580
|
CaseTreeService.ctorParameters = function () { return [
|
|
23486
23581
|
{ type: CaseResourceService },
|
|
23487
23582
|
{ type: TreeCaseViewService },
|
|
@@ -23490,7 +23585,8 @@
|
|
|
23490
23585
|
{ type: ProcessService },
|
|
23491
23586
|
{ type: SideMenuService },
|
|
23492
23587
|
{ type: core$2.TranslateService },
|
|
23493
|
-
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [NAE_OPTION_SELECTOR_COMPONENT,] }] }
|
|
23588
|
+
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [NAE_OPTION_SELECTOR_COMPONENT,] }] },
|
|
23589
|
+
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [NAE_TREE_CASE_VIEW_CONFIGURATION,] }] }
|
|
23494
23590
|
]; };
|
|
23495
23591
|
CaseTreeService.decorators = [
|
|
23496
23592
|
{ type: core.Injectable }
|
|
@@ -23503,7 +23599,8 @@
|
|
|
23503
23599
|
{ type: ProcessService },
|
|
23504
23600
|
{ type: SideMenuService },
|
|
23505
23601
|
{ type: core$2.TranslateService },
|
|
23506
|
-
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [NAE_OPTION_SELECTOR_COMPONENT,] }] }
|
|
23602
|
+
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [NAE_OPTION_SELECTOR_COMPONENT,] }] },
|
|
23603
|
+
{ type: undefined, decorators: [{ type: core.Optional }, { type: core.Inject, args: [NAE_TREE_CASE_VIEW_CONFIGURATION,] }] }
|
|
23507
23604
|
]; };
|
|
23508
23605
|
return CaseTreeService;
|
|
23509
23606
|
}());
|
|
@@ -24408,6 +24505,7 @@
|
|
|
24408
24505
|
if (dataGroups.length === 0) {
|
|
24409
24506
|
this._log.info('Task has no data ' + this._safeTask);
|
|
24410
24507
|
this._safeTask.dataSize = 0;
|
|
24508
|
+
this._taskContentService.taskFieldsIndex[this._safeTask.stringId] = {};
|
|
24411
24509
|
}
|
|
24412
24510
|
else {
|
|
24413
24511
|
this._taskContentService.referencedTaskAndCaseIds[this._safeTask.caseId] = [this._safeTask.stringId];
|
|
@@ -25275,7 +25373,7 @@
|
|
|
25275
25373
|
FinishTaskService.prototype.validateDataAndFinish = function (afterAction) {
|
|
25276
25374
|
var _this = this;
|
|
25277
25375
|
if (afterAction === void 0) { afterAction = new AfterAction(); }
|
|
25278
|
-
if (this.
|
|
25376
|
+
if (this.dataIsEmpty()) {
|
|
25279
25377
|
this._taskDataService.initializeTaskDataFields(this._callChain.create(function () {
|
|
25280
25378
|
if (_this._safeTask.dataSize <= 0 ||
|
|
25281
25379
|
(_this._taskContentService.validateDynamicEnumField() && _this._taskContentService.validateTaskData())) {
|
|
@@ -25286,17 +25384,15 @@
|
|
|
25286
25384
|
else if (this._taskContentService.validateDynamicEnumField() && this._taskContentService.validateTaskData()) {
|
|
25287
25385
|
var finishedTaskId_1 = this._safeTask.stringId;
|
|
25288
25386
|
this._taskDataService.updateTaskDataFields(this._callChain.create(function (success) {
|
|
25289
|
-
if (success) {
|
|
25290
|
-
|
|
25291
|
-
|
|
25292
|
-
|
|
25293
|
-
|
|
25294
|
-
|
|
25295
|
-
|
|
25296
|
-
|
|
25297
|
-
|
|
25298
|
-
_this.queueFinishTaskRequest(afterAction);
|
|
25299
|
-
}
|
|
25387
|
+
if (success && _this._taskState.isUpdating(finishedTaskId_1)) {
|
|
25388
|
+
_this._taskDataService.updateSuccess$.pipe(operators.take(1)).subscribe(function (bool) {
|
|
25389
|
+
if (bool) {
|
|
25390
|
+
_this.queueFinishTaskRequest(afterAction);
|
|
25391
|
+
}
|
|
25392
|
+
});
|
|
25393
|
+
}
|
|
25394
|
+
else if (success) {
|
|
25395
|
+
_this.queueFinishTaskRequest(afterAction);
|
|
25300
25396
|
}
|
|
25301
25397
|
}));
|
|
25302
25398
|
}
|
|
@@ -25394,6 +25490,13 @@
|
|
|
25394
25490
|
FinishTaskService.prototype.sendNotification = function (success) {
|
|
25395
25491
|
this._taskEvent.publishTaskEvent(createTaskEventNotification(this._safeTask, exports.TaskEvent.FINISH, success));
|
|
25396
25492
|
};
|
|
25493
|
+
/**
|
|
25494
|
+
* Checks data size
|
|
25495
|
+
* @return boolean whether the task contains data or not
|
|
25496
|
+
*/
|
|
25497
|
+
FinishTaskService.prototype.dataIsEmpty = function () {
|
|
25498
|
+
return this._safeTask.dataSize <= 0 || !this._safeTask.dataGroups || this._safeTask.dataGroups.length <= 0;
|
|
25499
|
+
};
|
|
25397
25500
|
FinishTaskService.ctorParameters = function () { return [
|
|
25398
25501
|
{ type: LoggerService },
|
|
25399
25502
|
{ type: TaskResourceService },
|
|
@@ -28236,8 +28339,8 @@
|
|
|
28236
28339
|
}
|
|
28237
28340
|
function paginationParams(basePagination, pageNumber) {
|
|
28238
28341
|
var params = new http.HttpParams();
|
|
28239
|
-
params = params.set(
|
|
28240
|
-
params = params.set(
|
|
28342
|
+
params = params.set(exports.PaginationParams.PAGE_SIZE, "" + basePagination.size);
|
|
28343
|
+
params = params.set(exports.PaginationParams.PAGE_NUMBER, (pageNumber !== undefined ? pageNumber : basePagination.number) + '');
|
|
28241
28344
|
return params;
|
|
28242
28345
|
}
|
|
28243
28346
|
function mapToContent(source, filter, pagination) {
|
|
@@ -29503,8 +29606,8 @@
|
|
|
29503
29606
|
};
|
|
29504
29607
|
MockEndpoint.prototype.getPagination = function (params) {
|
|
29505
29608
|
return {
|
|
29506
|
-
pageSize: parseInt(params.get(
|
|
29507
|
-
pageNumber: parseInt(params.get(
|
|
29609
|
+
pageSize: parseInt(params.get(exports.PaginationParams.PAGE_SIZE), 10),
|
|
29610
|
+
pageNumber: parseInt(params.get(exports.PaginationParams.PAGE_NUMBER), 10)
|
|
29508
29611
|
};
|
|
29509
29612
|
};
|
|
29510
29613
|
return MockEndpoint;
|
|
@@ -29911,7 +30014,7 @@
|
|
|
29911
30014
|
return rxjs.of([]);
|
|
29912
30015
|
}
|
|
29913
30016
|
var params = new http.HttpParams();
|
|
29914
|
-
params.set(
|
|
30017
|
+
params.set(exports.PaginationParams.PAGE_SIZE, "" + user.nextGroups.length);
|
|
29915
30018
|
return _this._caseResourceService.searchCases(SimpleFilter.fromCaseQuery({ stringId: user.nextGroups }), params)
|
|
29916
30019
|
.pipe(operators.map(function (page) { return page.content ? page.content : []; }), operators.map(function (groups) { return groups.filter(function (group) { return group.author.fullName !== 'application engine'; }); }));
|
|
29917
30020
|
})).subscribe(function (groups) {
|
|
@@ -32244,6 +32347,7 @@
|
|
|
32244
32347
|
exports.NAE_TASK_OPERATIONS = NAE_TASK_OPERATIONS;
|
|
32245
32348
|
exports.NAE_TASK_PANEL_DISABLE_BUTTON_FUNCTIONS = NAE_TASK_PANEL_DISABLE_BUTTON_FUNCTIONS;
|
|
32246
32349
|
exports.NAE_TASK_VIEW_CONFIGURATION = NAE_TASK_VIEW_CONFIGURATION;
|
|
32350
|
+
exports.NAE_TREE_CASE_VIEW_CONFIGURATION = NAE_TREE_CASE_VIEW_CONFIGURATION;
|
|
32247
32351
|
exports.NAE_USER_ASSIGN_COMPONENT = NAE_USER_ASSIGN_COMPONENT;
|
|
32248
32352
|
exports.NAE_VIEW_ID = NAE_VIEW_ID;
|
|
32249
32353
|
exports.NAE_VIEW_ID_SEGMENT = NAE_VIEW_ID_SEGMENT;
|
|
@@ -32378,6 +32482,7 @@
|
|
|
32378
32482
|
exports.createMockSetDataOutcome = createMockSetDataOutcome;
|
|
32379
32483
|
exports.createMockTask = createMockTask;
|
|
32380
32484
|
exports.createMockTaskOutcome = createMockTaskOutcome;
|
|
32485
|
+
exports.createSortParam = createSortParam;
|
|
32381
32486
|
exports.createTaskEventNotification = createTaskEventNotification;
|
|
32382
32487
|
exports.defaultCaseSearchCategoriesFactory = defaultCaseSearchCategoriesFactory;
|
|
32383
32488
|
exports.defaultTaskSearchCategoriesFactory = defaultTaskSearchCategoriesFactory;
|