@universis/ngx-tables 6.13.5 → 6.13.7
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/universis-ngx-tables.umd.js +33 -15
- package/bundles/universis-ngx-tables.umd.js.map +1 -1
- package/bundles/universis-ngx-tables.umd.min.js +1 -1
- package/bundles/universis-ngx-tables.umd.min.js.map +1 -1
- package/esm2015/lib/components/advanced-table/advanced-table-search.component.js +28 -8
- package/esm5/lib/components/advanced-table/advanced-table-search.component.js +34 -16
- package/fesm2015/universis-ngx-tables.js +27 -7
- package/fesm2015/universis-ngx-tables.js.map +1 -1
- package/fesm5/universis-ngx-tables.js +35 -17
- package/fesm5/universis-ngx-tables.js.map +1 -1
- package/package.json +2 -2
|
@@ -5246,6 +5246,8 @@ class AdvancedTableSearchComponent extends AdvancedTableSearchBaseComponent {
|
|
|
5246
5246
|
const expressions = [];
|
|
5247
5247
|
/** @type {?} */
|
|
5248
5248
|
const values = yield this._advancedSearchValueProvider.getValues();
|
|
5249
|
+
/** @type {?} */
|
|
5250
|
+
const queryParams = [];
|
|
5249
5251
|
this.table.config.criteria.forEach((x) => {
|
|
5250
5252
|
if (Object.prototype.hasOwnProperty.call(this.filter, x.name)) {
|
|
5251
5253
|
/** @type {?} */
|
|
@@ -5258,22 +5260,40 @@ class AdvancedTableSearchComponent extends AdvancedTableSearchBaseComponent {
|
|
|
5258
5260
|
}));
|
|
5259
5261
|
}
|
|
5260
5262
|
else if (this.filter[x.name] !== 'undefined') {
|
|
5261
|
-
|
|
5262
|
-
|
|
5263
|
-
|
|
5263
|
+
if (x.type !== 'queryParam') {
|
|
5264
|
+
expressions.push(this._template.transform(x.filter, Object.assign({
|
|
5265
|
+
value: this.filter[x.name],
|
|
5266
|
+
}, values)));
|
|
5267
|
+
}
|
|
5268
|
+
else {
|
|
5269
|
+
/** @type {?} */
|
|
5270
|
+
const value = this.filter[x.name];
|
|
5271
|
+
if (value) {
|
|
5272
|
+
queryParams.push(Object.assign(x, { value }));
|
|
5273
|
+
}
|
|
5274
|
+
}
|
|
5264
5275
|
}
|
|
5265
5276
|
}
|
|
5266
5277
|
});
|
|
5267
5278
|
/** @type {?} */
|
|
5268
5279
|
let query;
|
|
5280
|
+
query = this._context.model(this.table.config.model).asQueryable();
|
|
5281
|
+
if (queryParams && queryParams.length) {
|
|
5282
|
+
/** @type {?} */
|
|
5283
|
+
const param = queryParams.find(x => {
|
|
5284
|
+
return x.model !== null;
|
|
5285
|
+
});
|
|
5286
|
+
/** @type {?} */
|
|
5287
|
+
const modelName = param ? param.model : this.table.config.model;
|
|
5288
|
+
query = this._context.model(modelName).asQueryable();
|
|
5289
|
+
queryParams.forEach((queryParam) => {
|
|
5290
|
+
query.setParam(queryParam.queryParam, queryParam.value);
|
|
5291
|
+
});
|
|
5292
|
+
}
|
|
5269
5293
|
if (expressions && expressions.length) {
|
|
5270
5294
|
// create client query
|
|
5271
|
-
query = this._context.model(this.table.config.model).asQueryable();
|
|
5272
5295
|
query.setParam('filter', expressions.join(' and '));
|
|
5273
5296
|
}
|
|
5274
|
-
else {
|
|
5275
|
-
query = this._context.model(this.table.config.model).asQueryable();
|
|
5276
|
-
}
|
|
5277
5297
|
return query;
|
|
5278
5298
|
}
|
|
5279
5299
|
});
|