@recursyve/nice-data-filter-kit 12.1.22 → 12.1.26
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/recursyve-nice-data-filter-kit.umd.js +15 -7
- package/bundles/recursyve-nice-data-filter-kit.umd.js.map +1 -1
- package/esm2015/lib/components/base-list/store/base-list.service.js +10 -5
- package/esm2015/lib/components/base-list/store/base-list.store.js +3 -3
- package/esm2015/lib/components/query-builder/rule/components/select/select-filter.component.js +1 -1
- package/esm2015/lib/components/query-builder/rule/rule.component.js +2 -2
- package/fesm2015/recursyve-nice-data-filter-kit.js +13 -8
- package/fesm2015/recursyve-nice-data-filter-kit.js.map +1 -1
- package/lib/components/base-list/store/base-list.service.d.ts +2 -1
- package/lib/components/base-list/store/base-list.store.d.ts +1 -1
- package/package.json +1 -1
|
@@ -953,9 +953,10 @@
|
|
|
953
953
|
filterConfigLoading: loading
|
|
954
954
|
});
|
|
955
955
|
};
|
|
956
|
-
NiceBaseListStore.prototype.setResult = function (filterResult) {
|
|
956
|
+
NiceBaseListStore.prototype.setResult = function (filterResult, reset) {
|
|
957
|
+
if (reset === void 0) { reset = false; }
|
|
957
958
|
var mergePageResults = this.getValue().mergePageResults;
|
|
958
|
-
if (mergePageResults) {
|
|
959
|
+
if (mergePageResults && !reset) {
|
|
959
960
|
this.update(function (state) {
|
|
960
961
|
var _a, _b;
|
|
961
962
|
return ({
|
|
@@ -1235,8 +1236,13 @@
|
|
|
1235
1236
|
_this.queryParamsLoaded$.next();
|
|
1236
1237
|
});
|
|
1237
1238
|
};
|
|
1238
|
-
NiceBaseListService.prototype.
|
|
1239
|
+
NiceBaseListService.prototype.resetAndLoadData = function (parameters, updateQueryParams) {
|
|
1239
1240
|
if (updateQueryParams === void 0) { updateQueryParams = true; }
|
|
1241
|
+
this.loadData(parameters, updateQueryParams, true);
|
|
1242
|
+
};
|
|
1243
|
+
NiceBaseListService.prototype.loadData = function (parameters, updateQueryParams, reset) {
|
|
1244
|
+
if (updateQueryParams === void 0) { updateQueryParams = true; }
|
|
1245
|
+
if (reset === void 0) { reset = false; }
|
|
1240
1246
|
return __awaiter(this, void 0, void 0, function () {
|
|
1241
1247
|
var disabled, filterParameters, result, e_2;
|
|
1242
1248
|
return __generator(this, function (_b) {
|
|
@@ -1253,7 +1259,7 @@
|
|
|
1253
1259
|
return [4 /*yield*/, this.filterService.filter(this.getParameters(filterParameters)).toPromise()];
|
|
1254
1260
|
case 2:
|
|
1255
1261
|
result = _b.sent();
|
|
1256
|
-
this.store.setResult(result);
|
|
1262
|
+
this.store.setResult(result, reset);
|
|
1257
1263
|
_b.label = 3;
|
|
1258
1264
|
case 3:
|
|
1259
1265
|
if (filterParameters) {
|
|
@@ -1440,7 +1446,9 @@
|
|
|
1440
1446
|
this.loadData(newRules, true);
|
|
1441
1447
|
};
|
|
1442
1448
|
NiceBaseListService.prototype.updateRules = function (rules) {
|
|
1449
|
+
var filterParameters = this.store.getValue().filterParameters;
|
|
1443
1450
|
var newRules = {
|
|
1451
|
+
order: filterParameters.order,
|
|
1444
1452
|
rules: [
|
|
1445
1453
|
{
|
|
1446
1454
|
condition: "and",
|
|
@@ -1462,7 +1470,7 @@
|
|
|
1462
1470
|
return;
|
|
1463
1471
|
}
|
|
1464
1472
|
this.store.update({
|
|
1465
|
-
filterResult: Object.assign(Object.assign({}, filterResult), { values: akita.
|
|
1473
|
+
filterResult: Object.assign(Object.assign({}, filterResult), { values: akita.arrayUpsert(filterResult.values, value[key], value) })
|
|
1466
1474
|
});
|
|
1467
1475
|
};
|
|
1468
1476
|
NiceBaseListService.prototype.removeListValue = function (value, key) {
|
|
@@ -1833,7 +1841,7 @@
|
|
|
1833
1841
|
useExisting: i0.forwardRef(function () { return SelectFilterComponent; }),
|
|
1834
1842
|
multi: true
|
|
1835
1843
|
}
|
|
1836
|
-
], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<mat-form-field fxFlex>\n <nice-typeahead\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [items]=\"values\"\n [typeahead]=\"search$\"\n bindValue=\"id\"\n bindLabel=\"name\"\n ></nice-typeahead>\n</mat-form-field>\n", components: [{ type: i1__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i18__namespace.NiceTypeaheadComponent, selector: "nice-typeahead", inputs: ["items", "labelFormatFn", "required", "disabled", "placeholder", "emptyPlaceholder", "
|
|
1844
|
+
], usesInheritance: true, usesOnChanges: true, ngImport: i0__namespace, template: "<mat-form-field fxFlex>\n <nice-typeahead\n [ngModel]=\"value\"\n (ngModelChange)=\"onValueChange($event)\"\n [items]=\"values\"\n [typeahead]=\"search$\"\n bindValue=\"id\"\n bindLabel=\"name\"\n ></nice-typeahead>\n</mat-form-field>\n", components: [{ type: i1__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i18__namespace.NiceTypeaheadComponent, selector: "nice-typeahead", inputs: ["items", "labelFormatFn", "required", "disabled", "placeholder", "emptyPlaceholder", "allowNotFoundItems", "panelClass", "bindValue", "bindLabel", "typeahead", "page$", "loading", "loadingPage", "searchFn", "optionTemplate"], outputs: ["change"] }], directives: [{ type: i4__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: i1__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
1837
1845
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: SelectFilterComponent, decorators: [{
|
|
1838
1846
|
type: i0.Component,
|
|
1839
1847
|
args: [{
|
|
@@ -2135,7 +2143,7 @@
|
|
|
2135
2143
|
return RuleComponent;
|
|
2136
2144
|
}());
|
|
2137
2145
|
RuleComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: RuleComponent, deps: [{ token: i1__namespace$1.FormGroupName }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
2138
|
-
RuleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: RuleComponent, selector: "nice-rule", inputs: { filterConfigs: "filterConfigs" }, outputs: { remove: "remove" }, ngImport: i0__namespace, template: "<div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\">\n <button\n fxFlex=\"150px\"\n class=\"select-filter\"\n mat-raised-button\n color=\"accent\"\n niceQueryBuilderTrigger\n [queryBuilderFilters]=\"filterConfigs\"\n (queryBuilderFilterSelected)=\"onUpdateFilterConfig($event)\"\n >\n <div fxFlex=\"row\" fxLayoutAlign=\"space-between center\">\n <div class=\"truncate\" fxFlex=\"0 1 90px\">{{ filterConfig?.name }}</div>\n <mat-icon fxFlex=\"24px\">arrow_drop_down</mat-icon>\n </div>\n </button>\n <div fxLayout=\"row\" fxLayout.lt-md=\"column\" fxFlex=\"1 1 auto\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\">\n <mat-form-field ngClass.lt-md=\"w-90-p\" fxFlex=\"0 0 188px\">\n <mat-select\n fxFlex=\"150px\"\n fxFlex.lt-md=\"100%\"\n [ngModel]=\"filterOperator\"\n (ngModelChange)=\"onUpdateFilterOperator($event)\"\n >\n <mat-option *ngFor=\"let operator of filterConfig?.operators\" [value]=\"operator.id\">\n {{ operator?.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <div fxFlex fxLayout=\"row wrap\" fxLayout.lt-md=\"column\" [formGroup]=\"formGroup\">\n <ng-container formArrayName=\"rules\">\n <div\n class=\"rule-container\"\n [fxFlex]=\"isDoubleInput ? '100%' : '50%'\"\n [formGroupName]=\"i\"\n fxFlex.lt-md=\"100%\"\n fxLayout.lt-md=\"column\"\n fxLayoutAlign=\"start center\"\n fxLayoutGap=\"10px\"\n *ngFor=\"let rule of rules.controls; let i = index\"\n >\n <ng-container *ngIf=\"isSingleInput\">\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-text-filter *ngSwitchCase=\"'text'\" fxFlex formControlName=\"value\" [filterConfig]=\"filterConfig\"></nice-text-filter>\n <nice-number-filter *ngSwitchCase=\"'number'\" fxFlex formControlName=\"value\"></nice-number-filter>\n <nice-radio-filter\n *ngSwitchCase=\"'radio'\"\n fxFlex\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n class=\"mb-16\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n fxFlex\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-select-filter>\n <nice-date-filter *ngSwitchCase=\"'date'\" fxFlex formControlName=\"value\"></nice-date-filter>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isDoubleInput\">\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-text-filter\n *ngSwitchCase=\"'text'\"\n [valueIndex]=\"0\"\n [filterConfig]=\"filterConfig\"\n fxFlex\n formControlName=\"value\"\n ></nice-text-filter>\n <nice-number-filter\n *ngSwitchCase=\"'number'\"\n [valueIndex]=\"0\"\n fxFlex\n formControlName=\"value\"\n ></nice-number-filter>\n <nice-radio-filter\n *ngSwitchCase=\"'radio'\"\n fxFlex\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n [valueIndex]=\"0\"\n class=\"mb-16\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n fxFlex\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n [valueIndex]=\"0\"\n ></nice-select-filter>\n <nice-date-filter\n *ngSwitchCase=\"'date'\"\n [valueIndex]=\"0\"\n fxFlex\n formControlName=\"value\"\n ></nice-date-filter>\n </ng-container>\n <h3 class=\"aligned-text\">\n {{ \"components.query_builder.rule.conditions.and\" | translate }}\n </h3>\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-text-filter\n *ngSwitchCase=\"'text'\"\n [valueIndex]=\"1\"\n [filterConfig]=\"filterConfig\"\n fxFlex\n formControlName=\"value\"\n ></nice-text-filter>\n <nice-number-filter\n *ngSwitchCase=\"'number'\"\n [valueIndex]=\"1\"\n fxFlex\n formControlName=\"value\"\n ></nice-number-filter>\n <nice-radio-filter\n *ngSwitchCase=\"'radio'\"\n fxFlex\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n [valueIndex]=\"1\"\n class=\"mb-16\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n fxFlex\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n [valueIndex]=\"1\"\n ></nice-select-filter>\n <nice-date-filter\n *ngSwitchCase=\"'date'\"\n [valueIndex]=\"1\"\n fxFlex\n formControlName=\"value\"\n ></nice-date-filter>\n </ng-container>\n </ng-container>\n <div fxLayout=\"row\" fxLayoutGap=\"8px\">\n <button mat-mini-fab class=\"or-button aligned-button\" (click)=\"onClickOr()\">\n {{ \"components.query_builder.rule.conditions.or\" | translate }}\n </button>\n <button class=\"aligned-button\" mat-icon-button color=\"warn\" (click)=\"onClickDelete(i)\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n\n </div>\n </ng-container>\n </div>\n </div>\n</div>\n", styles: ["nice-rule{background:transparent}nice-rule .select-filter{height:36px}nice-rule .aligned-button,nice-rule .select-filter{margin-bottom:1.25em}nice-rule .aligned-text{margin-bottom:2em}nice-rule .filter-select{margin-top:-14px}nice-rule .mat-form-field-infix{border:none}@media screen and (max-width:959px){nice-rule .mat-form-field-infix{max-width:150px}}nice-rule .rule-container{padding-left:12px;padding-right:12px}@media screen and (max-width:959px){nice-rule .rule-container{padding:0}}"], components: [{ type: i7__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i6__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i1__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5__namespace$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i6__namespace.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: TextFilterComponent, selector: "nice-text-filter", inputs: ["filterConfig"] }, { type: NumberFilterComponent, selector: "nice-number-filter" }, { type: RadioFilterComponent, selector: "nice-radio-filter", inputs: ["filterConfig"] }, { type: SelectFilterComponent, selector: "nice-select-filter", inputs: ["filterConfig"] }, { type: DateFilterComponent, selector: "nice-date-filter" }], directives: [{ type: i4__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i4__namespace.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i4__namespace.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i4__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: QueryBuilderTriggerDirective, selector: "[niceQueryBuilderTrigger]", inputs: ["queryBuilderFilters", "queryBuilderFiltersLoading"], outputs: ["queryBuilderFilterSelected"] }, { type: i4__namespace.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { type: i1__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i13__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1__namespace$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i1__namespace$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i13__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i13__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i13__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1__namespace$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1__namespace$4.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
2146
|
+
RuleComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.0.0", type: RuleComponent, selector: "nice-rule", inputs: { filterConfigs: "filterConfigs" }, outputs: { remove: "remove" }, ngImport: i0__namespace, template: "<div fxLayout=\"row\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\">\n <button\n fxFlex=\"150px\"\n class=\"select-filter\"\n mat-raised-button\n color=\"accent\"\n niceQueryBuilderTrigger\n [queryBuilderFilters]=\"filterConfigs\"\n (queryBuilderFilterSelected)=\"onUpdateFilterConfig($event)\"\n >\n <div fxFlex=\"row\" fxLayoutAlign=\"space-between center\">\n <div class=\"truncate\" fxFlex=\"0 1 90px\">{{ filterConfig?.name }}</div>\n <mat-icon fxFlex=\"24px\">arrow_drop_down</mat-icon>\n </div>\n </button>\n <div fxLayout=\"row\" fxLayout.lt-md=\"column\" fxFlex=\"1 1 auto\" fxLayoutAlign=\"start center\" fxLayoutGap=\"10px\">\n <mat-form-field ngClass.lt-md=\"w-90-p\" fxFlex=\"0 0 188px\">\n <mat-select\n fxFlex=\"150px\"\n fxFlex.lt-md=\"100%\"\n [ngModel]=\"filterOperator\"\n (ngModelChange)=\"onUpdateFilterOperator($event)\"\n >\n <mat-option *ngFor=\"let operator of filterConfig?.operators\" [value]=\"operator.id\">\n {{ operator?.name }}\n </mat-option>\n </mat-select>\n </mat-form-field>\n <div fxFlex fxLayout=\"row wrap\" fxLayout.lt-md=\"column\" [formGroup]=\"formGroup\">\n <ng-container formArrayName=\"rules\">\n <div\n class=\"rule-container\"\n [fxFlex]=\"isDoubleInput ? '100%' : '50%'\"\n [formGroupName]=\"i\"\n fxFlex.lt-md=\"100%\"\n fxLayout.lt-md=\"column\"\n fxLayoutAlign=\"start center\"\n fxLayoutGap=\"10px\"\n *ngFor=\"let rule of rules.controls; let i = index\"\n >\n <ng-container *ngIf=\"isSingleInput\">\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-text-filter *ngSwitchCase=\"'text'\" fxFlex formControlName=\"value\" [filterConfig]=\"filterConfig\"></nice-text-filter>\n <nice-number-filter *ngSwitchCase=\"'number'\" fxFlex formControlName=\"value\"></nice-number-filter>\n <nice-radio-filter\n *ngSwitchCase=\"'radio'\"\n fxFlex\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n class=\"mb-16\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n fxFlex\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n ></nice-select-filter>\n <nice-date-filter *ngSwitchCase=\"'date'\" fxFlex formControlName=\"value\"></nice-date-filter>\n </ng-container>\n </ng-container>\n <ng-container *ngIf=\"isDoubleInput\">\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-text-filter\n *ngSwitchCase=\"'text'\"\n [valueIndex]=\"0\"\n [filterConfig]=\"filterConfig\"\n fxFlex\n formControlName=\"secondValue\"\n ></nice-text-filter>\n <nice-number-filter\n *ngSwitchCase=\"'number'\"\n [valueIndex]=\"0\"\n fxFlex\n formControlName=\"secondValue\"\n ></nice-number-filter>\n <nice-radio-filter\n *ngSwitchCase=\"'radio'\"\n fxFlex\n formControlName=\"secondValue\"\n [filterConfig]=\"filterConfig\"\n [valueIndex]=\"0\"\n class=\"mb-16\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n fxFlex\n formControlName=\"secondValue\"\n [filterConfig]=\"filterConfig\"\n [valueIndex]=\"0\"\n ></nice-select-filter>\n <nice-date-filter\n *ngSwitchCase=\"'date'\"\n [valueIndex]=\"0\"\n fxFlex\n formControlName=\"secondValue\"\n ></nice-date-filter>\n </ng-container>\n <h3 class=\"aligned-text\">\n {{ \"components.query_builder.rule.conditions.and\" | translate }}\n </h3>\n <ng-container [ngSwitch]=\"filterConfig?.type\">\n <nice-text-filter\n *ngSwitchCase=\"'text'\"\n [valueIndex]=\"1\"\n [filterConfig]=\"filterConfig\"\n fxFlex\n formControlName=\"value\"\n ></nice-text-filter>\n <nice-number-filter\n *ngSwitchCase=\"'number'\"\n [valueIndex]=\"1\"\n fxFlex\n formControlName=\"value\"\n ></nice-number-filter>\n <nice-radio-filter\n *ngSwitchCase=\"'radio'\"\n fxFlex\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n [valueIndex]=\"1\"\n class=\"mb-16\"\n ></nice-radio-filter>\n <nice-select-filter\n *ngSwitchCase=\"'select'\"\n fxFlex\n formControlName=\"value\"\n [filterConfig]=\"filterConfig\"\n [valueIndex]=\"1\"\n ></nice-select-filter>\n <nice-date-filter\n *ngSwitchCase=\"'date'\"\n [valueIndex]=\"1\"\n fxFlex\n formControlName=\"value\"\n ></nice-date-filter>\n </ng-container>\n </ng-container>\n <div fxLayout=\"row\" fxLayoutGap=\"8px\">\n <button mat-mini-fab class=\"or-button aligned-button\" (click)=\"onClickOr()\">\n {{ \"components.query_builder.rule.conditions.or\" | translate }}\n </button>\n <button class=\"aligned-button\" mat-icon-button color=\"warn\" (click)=\"onClickDelete(i)\">\n <mat-icon>delete</mat-icon>\n </button>\n </div>\n\n </div>\n </ng-container>\n </div>\n </div>\n</div>\n", styles: ["nice-rule{background:transparent}nice-rule .select-filter{height:36px}nice-rule .aligned-button,nice-rule .select-filter{margin-bottom:1.25em}nice-rule .aligned-text{margin-bottom:2em}nice-rule .filter-select{margin-top:-14px}nice-rule .mat-form-field-infix{border:none}@media screen and (max-width:959px){nice-rule .mat-form-field-infix{max-width:150px}}nice-rule .rule-container{padding-left:12px;padding-right:12px}@media screen and (max-width:959px){nice-rule .rule-container{padding:0}}"], components: [{ type: i7__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i6__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }, { type: i1__namespace.MatFormField, selector: "mat-form-field", inputs: ["color", "floatLabel", "appearance", "hideRequiredMarker", "hintLabel"], exportAs: ["matFormField"] }, { type: i5__namespace$1.MatSelect, selector: "mat-select", inputs: ["disabled", "disableRipple", "tabIndex"], exportAs: ["matSelect"] }, { type: i6__namespace.MatOption, selector: "mat-option", exportAs: ["matOption"] }, { type: TextFilterComponent, selector: "nice-text-filter", inputs: ["filterConfig"] }, { type: NumberFilterComponent, selector: "nice-number-filter" }, { type: RadioFilterComponent, selector: "nice-radio-filter", inputs: ["filterConfig"] }, { type: SelectFilterComponent, selector: "nice-select-filter", inputs: ["filterConfig"] }, { type: DateFilterComponent, selector: "nice-date-filter" }], directives: [{ type: i4__namespace.DefaultLayoutDirective, selector: " [fxLayout], [fxLayout.xs], [fxLayout.sm], [fxLayout.md], [fxLayout.lg], [fxLayout.xl], [fxLayout.lt-sm], [fxLayout.lt-md], [fxLayout.lt-lg], [fxLayout.lt-xl], [fxLayout.gt-xs], [fxLayout.gt-sm], [fxLayout.gt-md], [fxLayout.gt-lg]", inputs: ["fxLayout", "fxLayout.xs", "fxLayout.sm", "fxLayout.md", "fxLayout.lg", "fxLayout.xl", "fxLayout.lt-sm", "fxLayout.lt-md", "fxLayout.lt-lg", "fxLayout.lt-xl", "fxLayout.gt-xs", "fxLayout.gt-sm", "fxLayout.gt-md", "fxLayout.gt-lg"] }, { type: i4__namespace.DefaultLayoutAlignDirective, selector: " [fxLayoutAlign], [fxLayoutAlign.xs], [fxLayoutAlign.sm], [fxLayoutAlign.md], [fxLayoutAlign.lg], [fxLayoutAlign.xl], [fxLayoutAlign.lt-sm], [fxLayoutAlign.lt-md], [fxLayoutAlign.lt-lg], [fxLayoutAlign.lt-xl], [fxLayoutAlign.gt-xs], [fxLayoutAlign.gt-sm], [fxLayoutAlign.gt-md], [fxLayoutAlign.gt-lg]", inputs: ["fxLayoutAlign", "fxLayoutAlign.xs", "fxLayoutAlign.sm", "fxLayoutAlign.md", "fxLayoutAlign.lg", "fxLayoutAlign.xl", "fxLayoutAlign.lt-sm", "fxLayoutAlign.lt-md", "fxLayoutAlign.lt-lg", "fxLayoutAlign.lt-xl", "fxLayoutAlign.gt-xs", "fxLayoutAlign.gt-sm", "fxLayoutAlign.gt-md", "fxLayoutAlign.gt-lg"] }, { type: i4__namespace.DefaultLayoutGapDirective, selector: " [fxLayoutGap], [fxLayoutGap.xs], [fxLayoutGap.sm], [fxLayoutGap.md], [fxLayoutGap.lg], [fxLayoutGap.xl], [fxLayoutGap.lt-sm], [fxLayoutGap.lt-md], [fxLayoutGap.lt-lg], [fxLayoutGap.lt-xl], [fxLayoutGap.gt-xs], [fxLayoutGap.gt-sm], [fxLayoutGap.gt-md], [fxLayoutGap.gt-lg]", inputs: ["fxLayoutGap", "fxLayoutGap.xs", "fxLayoutGap.sm", "fxLayoutGap.md", "fxLayoutGap.lg", "fxLayoutGap.xl", "fxLayoutGap.lt-sm", "fxLayoutGap.lt-md", "fxLayoutGap.lt-lg", "fxLayoutGap.lt-xl", "fxLayoutGap.gt-xs", "fxLayoutGap.gt-sm", "fxLayoutGap.gt-md", "fxLayoutGap.gt-lg"] }, { type: i4__namespace.DefaultFlexDirective, selector: " [fxFlex], [fxFlex.xs], [fxFlex.sm], [fxFlex.md], [fxFlex.lg], [fxFlex.xl], [fxFlex.lt-sm], [fxFlex.lt-md], [fxFlex.lt-lg], [fxFlex.lt-xl], [fxFlex.gt-xs], [fxFlex.gt-sm], [fxFlex.gt-md], [fxFlex.gt-lg]", inputs: ["fxFlex", "fxFlex.xs", "fxFlex.sm", "fxFlex.md", "fxFlex.lg", "fxFlex.xl", "fxFlex.lt-sm", "fxFlex.lt-md", "fxFlex.lt-lg", "fxFlex.lt-xl", "fxFlex.gt-xs", "fxFlex.gt-sm", "fxFlex.gt-md", "fxFlex.gt-lg"] }, { type: QueryBuilderTriggerDirective, selector: "[niceQueryBuilderTrigger]", inputs: ["queryBuilderFilters", "queryBuilderFiltersLoading"], outputs: ["queryBuilderFilterSelected"] }, { type: i4__namespace.DefaultClassDirective, selector: " [ngClass], [ngClass.xs], [ngClass.sm], [ngClass.md], [ngClass.lg], [ngClass.xl], [ngClass.lt-sm], [ngClass.lt-md], [ngClass.lt-lg], [ngClass.lt-xl], [ngClass.gt-xs], [ngClass.gt-sm], [ngClass.gt-md], [ngClass.gt-lg]", inputs: ["ngClass", "ngClass.xs", "ngClass.sm", "ngClass.md", "ngClass.lg", "ngClass.xl", "ngClass.lt-sm", "ngClass.lt-md", "ngClass.lt-lg", "ngClass.lt-xl", "ngClass.gt-xs", "ngClass.gt-sm", "ngClass.gt-md", "ngClass.gt-lg"] }, { type: i1__namespace$1.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i1__namespace$1.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i13__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace$1.NgControlStatusGroup, selector: "[formGroupName],[formArrayName],[ngModelGroup],[formGroup],form:not([ngNoForm]),[ngForm]" }, { type: i1__namespace$1.FormGroupDirective, selector: "[formGroup]", inputs: ["formGroup"], outputs: ["ngSubmit"], exportAs: ["ngForm"] }, { type: i1__namespace$1.FormArrayName, selector: "[formArrayName]", inputs: ["formArrayName"] }, { type: i1__namespace$1.FormGroupName, selector: "[formGroupName]", inputs: ["formGroupName"] }, { type: i13__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i13__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i13__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i1__namespace$1.FormControlName, selector: "[formControlName]", inputs: ["disabled", "formControlName", "ngModel"], outputs: ["ngModelChange"] }], pipes: { "translate": i1__namespace$4.TranslatePipe }, encapsulation: i0__namespace.ViewEncapsulation.None });
|
|
2139
2147
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.0.0", ngImport: i0__namespace, type: RuleComponent, decorators: [{
|
|
2140
2148
|
type: i0.Component,
|
|
2141
2149
|
args: [{
|