ngx-angular-query-builder 0.0.1 → 0.0.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/README.md +3 -1
- package/bundles/ngx-angular-query-builder.umd.js +12 -1
- package/bundles/ngx-angular-query-builder.umd.js.map +1 -1
- package/esm2015/lib/query-builder/query-builder.component.js +10 -3
- package/fesm2015/ngx-angular-query-builder.js +9 -2
- package/fesm2015/ngx-angular-query-builder.js.map +1 -1
- package/lib/query-builder/query-builder.component.d.ts +1 -0
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,11 +1,13 @@
|
|
|
1
1
|
# NgxAngularQueryBuilder
|
|
2
2
|
|
|
3
|
+
Test.
|
|
4
|
+
|
|
3
5
|
This library was generated with [Angular CLI](https://github.com/angular/angular-cli) version 12.2.0.
|
|
4
6
|
|
|
5
7
|
## Code scaffolding
|
|
6
8
|
|
|
7
9
|
Run `ng generate component component-name --project ngx-angular-query-builder` to generate a new component. You can also use `ng generate directive|pipe|service|class|guard|interface|enum|module --project ngx-angular-query-builder`.
|
|
8
|
-
> Note: Don't forget to add `--project ngx-angular-query-builder` or else it will be added to the default project in your `angular.json` file.
|
|
10
|
+
> Note: Don't forget to add `--project ngx-angular-query-builder` or else it will be added to the default project in your `angular.json` file.
|
|
9
11
|
|
|
10
12
|
## Build
|
|
11
13
|
|
|
@@ -243,6 +243,14 @@
|
|
|
243
243
|
this.filterFields = [];
|
|
244
244
|
this.entities = [];
|
|
245
245
|
}
|
|
246
|
+
Object.defineProperty(QueryBuilderComponent.prototype, "condintion", {
|
|
247
|
+
get: function () {
|
|
248
|
+
var _a;
|
|
249
|
+
return (_a = this.data) === null || _a === void 0 ? void 0 : _a.condition;
|
|
250
|
+
},
|
|
251
|
+
enumerable: false,
|
|
252
|
+
configurable: true
|
|
253
|
+
});
|
|
246
254
|
// ----------OnInit Implementation----------
|
|
247
255
|
// ----------OnChanges Implementation----------
|
|
248
256
|
QueryBuilderComponent.prototype.ngOnChanges = function (changes) {
|
|
@@ -824,7 +832,7 @@
|
|
|
824
832
|
return QueryBuilderComponent;
|
|
825
833
|
}());
|
|
826
834
|
QueryBuilderComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: QueryBuilderComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
827
|
-
QueryBuilderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: QueryBuilderComponent, selector: "query-builder", inputs: { disabled: "disabled", data: "data", allowRuleset: "allowRuleset", allowCollapse: "allowCollapse", emptyMessage: "emptyMessage", classNames: "classNames", operatorMap: "operatorMap", parentValue: "parentValue", config: "config", parentArrowIconTemplate: "parentArrowIconTemplate", parentInputTemplates: "parentInputTemplates", parentOperatorTemplate: "parentOperatorTemplate", parentFieldTemplate: "parentFieldTemplate", parentEntityTemplate: "parentEntityTemplate", parentSwitchGroupTemplate: "parentSwitchGroupTemplate", parentButtonGroupTemplate: "parentButtonGroupTemplate", parentRemoveButtonTemplate: "parentRemoveButtonTemplate", parentEmptyWarningTemplate: "parentEmptyWarningTemplate", parentChangeCallback: "parentChangeCallback", parentTouchedCallback: "parentTouchedCallback", persistValueOnFieldChange: "persistValueOnFieldChange", value: "value" }, providers: [CONTROL_VALUE_ACCESSOR, VALIDATOR], queries: [{ propertyName: "buttonGroupTemplate", first: true, predicate: QueryButtonGroupDirective, descendants: true }, { propertyName: "switchGroupTemplate", first: true, predicate: QuerySwitchGroupDirective, descendants: true }, { propertyName: "fieldTemplate", first: true, predicate: QueryFieldDirective, descendants: true }, { propertyName: "entityTemplate", first: true, predicate: QueryEntityDirective, descendants: true }, { propertyName: "operatorTemplate", first: true, predicate: QueryOperatorDirective, descendants: true }, { propertyName: "removeButtonTemplate", first: true, predicate: QueryRemoveButtonDirective, descendants: true }, { propertyName: "emptyWarningTemplate", first: true, predicate: QueryEmptyWarningDirective, descendants: true }, { propertyName: "arrowIconTemplate", first: true, predicate: QueryArrowIconDirective, descendants: true }, { propertyName: "inputTemplates", predicate: QueryInputDirective }], viewQueries: [{ propertyName: "treeContainer", first: true, predicate: ["treeContainer"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div [ngClass]=\"getClassNames('switchRow')\">\n <ng-template #defaultArrowIcon>\n <i [ngClass]=\"getClassNames('arrowIcon')\"></i>\n </ng-template>\n\n <a *ngIf=\"allowCollapse\" (click)=\"toggleCollapse()\" [ngClass]=\"getClassNames('arrowIconButton', data.collapsed ? 'collapsed' : '')\">\n <ng-container *ngIf=\"getArrowIconTemplate() as template; else defaultArrowIcon\">\n <ng-container *ngTemplateOutlet=\"template; context: getArrowIconContext()\"></ng-container>\n </ng-container>\n </a>\n\n <ng-container *ngIf=\"getButtonGroupTemplate() as template; else defaultButtonGroup\">\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <ng-container *ngTemplateOutlet=\"template; context: getButtonGroupContext()\"></ng-container>\n </div>\n </ng-container>\n\n <ng-template #defaultButtonGroup>\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <button type=\"button\" (click)=\"addRule()\" [ngClass]=\"getClassNames('button')\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('addIcon')\"></i> Rule\n </button>\n <button type=\"button\" (click)=\"addRuleSet()\" [ngClass]=\"getClassNames('button')\" *ngIf=\"allowRuleset\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('addIcon')\"></i> Ruleset\n </button>\n <ng-container *ngIf=\"!!parentValue && allowRuleset\">\n <button type=\"button\" (click)=\"removeRuleSet()\" [ngClass]=\"getClassNames('button', 'removeButton')\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('removeIcon')\"></i>\n </button>\n </ng-container>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getSwitchGroupTemplate() as template; else defaultSwitchGroup\">\n <ng-container *ngTemplateOutlet=\"template; context: getSwitchGroupContext()\"></ng-container>\n </ng-container>\n\n <ng-template #defaultSwitchGroup>\n <div [ngClass]=\"getClassNames('switchGroup', 'transition')\" *ngIf=\"data\">\n <div [ngClass]=\"getClassNames('switchControl')\">\n <input type=\"radio\" [ngClass]=\"getClassNames('switchRadio')\" [(ngModel)]=\"data.condition\" [disabled]=disabled\n value=\"and\" #andOption />\n <label (click)=\"changeCondition(andOption.value)\" [ngClass]=\"getClassNames('switchLabel')\">AND</label>\n </div>\n <div [ngClass]=\"getClassNames('switchControl')\">\n <input type=\"radio\" [ngClass]=\"getClassNames('switchRadio')\" [(ngModel)]=\"data.condition\" [disabled]=disabled\n value=\"or\" #orOption />\n <label (click)=\"changeCondition(orOption.value)\" [ngClass]=\"getClassNames('switchLabel')\">OR</label>\n </div>\n </div>\n </ng-template>\n</div>\n\n<div #treeContainer (transitionend)=\"transitionEnd($event)\" [ngClass]=\"getClassNames('treeContainer', data.collapsed ? 'collapsed' : '')\">\n <ul [ngClass]=\"getClassNames('tree')\" *ngIf=\"data && data.rules\">\n <ng-container *ngFor=\"let rule of data.rules;let i=index\">\n\n <ng-container *ngIf=\"{ruleset: !!rule.rules, invalid: !config.allowEmptyRulesets && rule.rules && rule.rules.length === 0} as local\">\n <li [ngClass]=\"getQueryItemClassName(local)\">\n <ng-container *ngIf=\"!local.ruleset\">\n\n <ng-container *ngIf=\"getRemoveButtonTemplate() as template; else defaultRemoveButton\">\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <ng-container *ngTemplateOutlet=\"template; context: getRemoveButtonContext(rule)\"></ng-container>\n </div>\n </ng-container>\n\n <ng-template #defaultRemoveButton>\n <div [ngClass]=\"getClassNames('removeButtonSize', 'rightAlign')\">\n <button type=\"button\" [ngClass]=\"getClassNames('button', 'removeButton')\" (click)=\"removeRule(rule, data)\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('removeIcon')\"></i>\n </button>\n </div>\n </ng-template>\n\n <div *ngIf=\"entities?.length\" class=\"q-inline-block-display\">\n <ng-container *ngIf=\"getEntityTemplate() as template; else defaultEntity\">\n <ng-container *ngTemplateOutlet=\"template; context: getEntityContext(rule)\"></ng-container>\n </ng-container>\n </div>\n\n <ng-template #defaultEntity>\n <div [ngClass]=\"getClassNames('entityControlSize')\">\n <select [ngClass]=\"getClassNames('entityControl')\" [(ngModel)]=\"rule.entity\" (ngModelChange)=\"changeEntity($event, rule,i,data)\"\n [disabled]=\"disabled\">\n <option *ngFor=\"let entity of entities\" [ngValue]=\"entity.value\">\n {{entity.name}}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getFieldTemplate() as template; else defaultField\">\n <ng-container *ngTemplateOutlet=\"template; context: getFieldContext(rule)\"></ng-container>\n </ng-container>\n\n <ng-template #defaultField>\n <div [ngClass]=\"getClassNames('fieldControlSize')\">\n <select [ngClass]=\"getClassNames('fieldControl')\" [(ngModel)]=\"rule.field\" (ngModelChange)=\"changeField($event, rule)\"\n [disabled]=\"disabled\">\n <option *ngFor=\"let field of getFields(rule.entity)\" [ngValue]=\"field.value\">\n {{field.name}}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getOperatorTemplate() as template; else defaultOperator\">\n <ng-container *ngTemplateOutlet=\"template; context: getOperatorContext(rule)\"></ng-container>\n </ng-container>\n\n <ng-template #defaultOperator>\n <div [ngClass]=\"getClassNames('operatorControlSize')\">\n <select [ngClass]=\"getClassNames('operatorControl')\" [(ngModel)]=\"rule.operator\" (ngModelChange)=\"changeOperator(rule)\"\n [disabled]=\"disabled\">\n <option *ngFor=\"let operator of getOperators(rule.field)\" [ngValue]=\"operator\">\n {{operator}}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"findTemplateForRule(rule) as template; else defaultInput\">\n <ng-container *ngTemplateOutlet=\"template; context: getInputContext(rule)\"></ng-container>\n </ng-container>\n\n <ng-template #defaultInput>\n <div [ngClass]=\"getClassNames('inputControlSize')\" [ngSwitch]=\"getInputType(rule.field, rule.operator)\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'string'\" type=\"text\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'number'\" type=\"number\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'date'\" type=\"date\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'time'\" type=\"time\">\n <select [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'category'\">\n <option *ngFor=\"let opt of getOptions(rule.field)\" [ngValue]=\"opt.value\">\n {{opt.name}}\n </option>\n </select>\n <ng-container *ngSwitchCase=\"'multiselect'\">\n <select [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" multiple>\n <option *ngFor=\"let opt of getOptions(rule.field)\" [ngValue]=\"opt.value\">\n {{opt.name}}\n </option>\n </select>\n </ng-container>\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'boolean'\" type=\"checkbox\">\n </div>\n </ng-template>\n\n </ng-container>\n <query-builder *ngIf=\"local.ruleset\" [data]=\"rule\" [disabled]=\"disabled\" [parentTouchedCallback]=\"parentTouchedCallback || onTouchedCallback\"\n [parentChangeCallback]=\"parentChangeCallback || onChangeCallback\" [parentInputTemplates]=\"parentInputTemplates || inputTemplates\"\n [parentOperatorTemplate]=\"parentOperatorTemplate || operatorTemplate\" [parentFieldTemplate]=\"parentFieldTemplate || fieldTemplate\"\n [parentEntityTemplate]=\"parentEntityTemplate || entityTemplate\" [parentSwitchGroupTemplate]=\"parentSwitchGroupTemplate || switchGroupTemplate\"\n [parentButtonGroupTemplate]=\"parentButtonGroupTemplate || buttonGroupTemplate\" [parentRemoveButtonTemplate]=\"parentRemoveButtonTemplate || removeButtonTemplate\"\n [parentEmptyWarningTemplate]=\"parentEmptyWarningTemplate || emptyWarningTemplate\" [parentArrowIconTemplate]=\"parentArrowIconTemplate || arrowIconTemplate\"\n [parentValue]=\"data\" [classNames]=\"classNames\" [config]=\"config\" [allowRuleset]=\"allowRuleset\"\n [allowCollapse]=\"allowCollapse\" [emptyMessage]=\"emptyMessage\" [operatorMap]=\"operatorMap\">\n </query-builder>\n\n <ng-container *ngIf=\"getEmptyWarningTemplate() as template; else defaultEmptyWarning\">\n <ng-container *ngIf=\"local.invalid\">\n <ng-container *ngTemplateOutlet=\"template; context: getEmptyWarningContext()\"></ng-container>\n </ng-container>\n </ng-container>\n\n <ng-template #defaultEmptyWarning>\n <p [ngClass]=\"getClassNames('emptyWarning')\" *ngIf=\"local.invalid\">\n {{emptyMessage}}\n </p>\n </ng-template>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;width:100%}:host .q-icon{font-style:normal;font-size:12px}:host .q-remove-icon:before{content:\"\\274c\"}:host .q-arrow-icon-button{float:left;margin:4px 6px 4px 0;transform:rotate(90deg);transition:linear .25s transform;cursor:pointer}:host .q-arrow-icon-button.q-collapsed{transform:rotate(0)}:host .q-arrow-icon:before{content:\"\\25b6\"}:host .q-add-icon{color:#555}:host .q-add-icon:before{content:\"\\2795\"}:host .q-remove-button{color:#b3415d;width:31px}:host .q-switch-group,:host .q-button-group{font-family:\"Lucida Grande\",Tahoma,Verdana,sans-serif;overflow:hidden}:host .q-right-align{float:right}:host .q-button{margin-left:8px;padding:0 8px;background-color:#fff}:host .q-button:disabled{display:none}:host .q-control-size{display:inline-block;vertical-align:top;padding-right:10px}:host .q-input-control,:host .q-operator-control,:host .q-field-control,:host .q-entity-control{display:inline-block;padding:5px 8px;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;width:auto;min-width:180px}:host .q-input-control:disabled,:host .q-operator-control:disabled,:host .q-field-control:disabled,:host .q-entity-control:disabled{border-color:transparent}:host .q-operator-control,:host .q-field-control,:host .q-entity-control,:host .q-input-control:not([type=checkbox]){min-height:32px;-webkit-appearance:none}:host .q-switch-label,:host .q-button{float:left;margin-bottom:0;font-size:14px;line-height:30px;font-weight:normal;text-align:center;text-shadow:none;border:1px solid rgba(0,0,0,.2);box-sizing:border-box}:host .q-switch-label:hover,:host .q-button:hover{cursor:pointer;background-color:#f0f0f0}:host .q-switch-label{background-color:#e4e4e4;padding:0 8px}:host .q-switch-radio{position:absolute;clip:rect(0,0,0,0);height:1px;width:1px;border:0;overflow:hidden}:host .q-switch-radio:checked+.q-switch-label{border:1px solid #619ed7;background:white;color:#3176b3}:host .q-switch-radio:disabled+.q-switch-label{display:none}:host .q-switch-radio:checked:disabled+.q-switch-label{display:initial;color:initial;cursor:default;border-color:transparent}:host .q-invalid-ruleset{border:1px solid rgba(179,65,93,.5)!important;background:rgba(179,65,93,.1)!important}:host .q-empty-warning{color:#8d252e;text-align:center}:host .q-ruleset{border:1px solid #CCC}:host .q-rule{border:1px solid #CCC;background:white}:host .q-transition{transition:all .1s ease-in-out}:host .q-tree-container{width:100%;overflow:hidden;transition:ease-in .25s max-height}:host .q-tree-container.q-collapsed{max-height:0!important}:host .q-tree{list-style:none;margin:4px 0 2px}:host .q-row{padding:6px 8px;margin-top:6px}:host .q-connector{position:relative}:host .q-connector:before{top:-5px;border-width:0 0 2px 2px}:host .q-connector:after{border-width:0 0 0 2px;top:50%}:host .q-connector:before,:host .q-connector:after{content:\"\";left:-12px;border-color:#ccc;border-style:solid;width:9px;height:calc(50% + 6px);position:absolute}:host .q-connector:last-child:after{content:none}:host .q-inline-block-display{display:inline-block;vertical-align:top}\n"], components: [{ type: QueryBuilderComponent, selector: "query-builder", inputs: ["disabled", "data", "allowRuleset", "allowCollapse", "emptyMessage", "classNames", "operatorMap", "parentValue", "config", "parentArrowIconTemplate", "parentInputTemplates", "parentOperatorTemplate", "parentFieldTemplate", "parentEntityTemplate", "parentSwitchGroupTemplate", "parentButtonGroupTemplate", "parentRemoveButtonTemplate", "parentEmptyWarningTemplate", "parentChangeCallback", "parentTouchedCallback", "persistValueOnFieldChange", "value"] }], directives: [{ type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2__namespace.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { type: i2__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i2__namespace.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2__namespace.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i2__namespace.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { type: i2__namespace.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }] });
|
|
835
|
+
QueryBuilderComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.13", type: QueryBuilderComponent, selector: "query-builder", inputs: { disabled: "disabled", data: "data", allowRuleset: "allowRuleset", allowCollapse: "allowCollapse", emptyMessage: "emptyMessage", classNames: "classNames", operatorMap: "operatorMap", parentValue: "parentValue", config: "config", parentArrowIconTemplate: "parentArrowIconTemplate", parentInputTemplates: "parentInputTemplates", parentOperatorTemplate: "parentOperatorTemplate", parentFieldTemplate: "parentFieldTemplate", parentEntityTemplate: "parentEntityTemplate", parentSwitchGroupTemplate: "parentSwitchGroupTemplate", parentButtonGroupTemplate: "parentButtonGroupTemplate", parentRemoveButtonTemplate: "parentRemoveButtonTemplate", parentEmptyWarningTemplate: "parentEmptyWarningTemplate", parentChangeCallback: "parentChangeCallback", parentTouchedCallback: "parentTouchedCallback", persistValueOnFieldChange: "persistValueOnFieldChange", value: "value" }, host: { properties: { "attr.query-builder-condition": "this.condintion" } }, providers: [CONTROL_VALUE_ACCESSOR, VALIDATOR], queries: [{ propertyName: "buttonGroupTemplate", first: true, predicate: QueryButtonGroupDirective, descendants: true }, { propertyName: "switchGroupTemplate", first: true, predicate: QuerySwitchGroupDirective, descendants: true }, { propertyName: "fieldTemplate", first: true, predicate: QueryFieldDirective, descendants: true }, { propertyName: "entityTemplate", first: true, predicate: QueryEntityDirective, descendants: true }, { propertyName: "operatorTemplate", first: true, predicate: QueryOperatorDirective, descendants: true }, { propertyName: "removeButtonTemplate", first: true, predicate: QueryRemoveButtonDirective, descendants: true }, { propertyName: "emptyWarningTemplate", first: true, predicate: QueryEmptyWarningDirective, descendants: true }, { propertyName: "arrowIconTemplate", first: true, predicate: QueryArrowIconDirective, descendants: true }, { propertyName: "inputTemplates", predicate: QueryInputDirective }], viewQueries: [{ propertyName: "treeContainer", first: true, predicate: ["treeContainer"], descendants: true, static: true }], usesOnChanges: true, ngImport: i0__namespace, template: "<div [ngClass]=\"getClassNames('switchRow')\">\n <ng-template #defaultArrowIcon>\n <i [ngClass]=\"getClassNames('arrowIcon')\"></i>\n </ng-template>\n\n <a *ngIf=\"allowCollapse\" (click)=\"toggleCollapse()\" [ngClass]=\"getClassNames('arrowIconButton', data.collapsed ? 'collapsed' : '')\">\n <ng-container *ngIf=\"getArrowIconTemplate() as template; else defaultArrowIcon\">\n <ng-container *ngTemplateOutlet=\"template; context: getArrowIconContext()\"></ng-container>\n </ng-container>\n </a>\n\n <ng-container *ngIf=\"getButtonGroupTemplate() as template; else defaultButtonGroup\">\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <ng-container *ngTemplateOutlet=\"template; context: getButtonGroupContext()\"></ng-container>\n </div>\n </ng-container>\n\n <ng-template #defaultButtonGroup>\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <button type=\"button\" (click)=\"addRule()\" [ngClass]=\"getClassNames('button')\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('addIcon')\"></i> Rule\n </button>\n <button type=\"button\" (click)=\"addRuleSet()\" [ngClass]=\"getClassNames('button')\" *ngIf=\"allowRuleset\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('addIcon')\"></i> Ruleset\n </button>\n <ng-container *ngIf=\"!!parentValue && allowRuleset\">\n <button type=\"button\" (click)=\"removeRuleSet()\" [ngClass]=\"getClassNames('button', 'removeButton')\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('removeIcon')\"></i>\n </button>\n </ng-container>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getSwitchGroupTemplate() as template; else defaultSwitchGroup\">\n <ng-container *ngTemplateOutlet=\"template; context: getSwitchGroupContext()\"></ng-container>\n </ng-container>\n\n <ng-template #defaultSwitchGroup>\n <div [ngClass]=\"getClassNames('switchGroup', 'transition')\" *ngIf=\"data\">\n <div [ngClass]=\"getClassNames('switchControl')\">\n <input type=\"radio\" [ngClass]=\"getClassNames('switchRadio')\" [(ngModel)]=\"data.condition\" [disabled]=disabled\n value=\"and\" #andOption />\n <label (click)=\"changeCondition(andOption.value)\" [ngClass]=\"getClassNames('switchLabel')\">AND</label>\n </div>\n <div [ngClass]=\"getClassNames('switchControl')\">\n <input type=\"radio\" [ngClass]=\"getClassNames('switchRadio')\" [(ngModel)]=\"data.condition\" [disabled]=disabled\n value=\"or\" #orOption />\n <label (click)=\"changeCondition(orOption.value)\" [ngClass]=\"getClassNames('switchLabel')\">OR</label>\n </div>\n </div>\n </ng-template>\n</div>\n\n<div #treeContainer (transitionend)=\"transitionEnd($event)\" [ngClass]=\"getClassNames('treeContainer', data.collapsed ? 'collapsed' : '')\">\n <ul [ngClass]=\"getClassNames('tree')\" *ngIf=\"data && data.rules\">\n <ng-container *ngFor=\"let rule of data.rules;let i=index\">\n\n <ng-container *ngIf=\"{ruleset: !!rule.rules, invalid: !config.allowEmptyRulesets && rule.rules && rule.rules.length === 0} as local\">\n <li [ngClass]=\"getQueryItemClassName(local)\">\n <ng-container *ngIf=\"!local.ruleset\">\n\n <ng-container *ngIf=\"getRemoveButtonTemplate() as template; else defaultRemoveButton\">\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <ng-container *ngTemplateOutlet=\"template; context: getRemoveButtonContext(rule)\"></ng-container>\n </div>\n </ng-container>\n\n <ng-template #defaultRemoveButton>\n <div [ngClass]=\"getClassNames('removeButtonSize', 'rightAlign')\">\n <button type=\"button\" [ngClass]=\"getClassNames('button', 'removeButton')\" (click)=\"removeRule(rule, data)\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('removeIcon')\"></i>\n </button>\n </div>\n </ng-template>\n\n <div *ngIf=\"entities?.length\" class=\"q-inline-block-display\">\n <ng-container *ngIf=\"getEntityTemplate() as template; else defaultEntity\">\n <ng-container *ngTemplateOutlet=\"template; context: getEntityContext(rule)\"></ng-container>\n </ng-container>\n </div>\n\n <ng-template #defaultEntity>\n <div [ngClass]=\"getClassNames('entityControlSize')\">\n <select [ngClass]=\"getClassNames('entityControl')\" [(ngModel)]=\"rule.entity\" (ngModelChange)=\"changeEntity($event, rule,i,data)\"\n [disabled]=\"disabled\">\n <option *ngFor=\"let entity of entities\" [ngValue]=\"entity.value\">\n {{entity.name}}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getFieldTemplate() as template; else defaultField\">\n <ng-container *ngTemplateOutlet=\"template; context: getFieldContext(rule)\"></ng-container>\n </ng-container>\n\n <ng-template #defaultField>\n <div [ngClass]=\"getClassNames('fieldControlSize')\">\n <select [ngClass]=\"getClassNames('fieldControl')\" [(ngModel)]=\"rule.field\" (ngModelChange)=\"changeField($event, rule)\"\n [disabled]=\"disabled\">\n <option *ngFor=\"let field of getFields(rule.entity)\" [ngValue]=\"field.value\">\n {{field.name}}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getOperatorTemplate() as template; else defaultOperator\">\n <ng-container *ngTemplateOutlet=\"template; context: getOperatorContext(rule)\"></ng-container>\n </ng-container>\n\n <ng-template #defaultOperator>\n <div [ngClass]=\"getClassNames('operatorControlSize')\">\n <select [ngClass]=\"getClassNames('operatorControl')\" [(ngModel)]=\"rule.operator\" (ngModelChange)=\"changeOperator(rule)\"\n [disabled]=\"disabled\">\n <option *ngFor=\"let operator of getOperators(rule.field)\" [ngValue]=\"operator\">\n {{operator}}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"findTemplateForRule(rule) as template; else defaultInput\">\n <ng-container *ngTemplateOutlet=\"template; context: getInputContext(rule)\"></ng-container>\n </ng-container>\n\n <ng-template #defaultInput>\n <div [ngClass]=\"getClassNames('inputControlSize')\" [ngSwitch]=\"getInputType(rule.field, rule.operator)\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'string'\" type=\"text\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'number'\" type=\"number\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'date'\" type=\"date\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'time'\" type=\"time\">\n <select [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'category'\">\n <option *ngFor=\"let opt of getOptions(rule.field)\" [ngValue]=\"opt.value\">\n {{opt.name}}\n </option>\n </select>\n <ng-container *ngSwitchCase=\"'multiselect'\">\n <select [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" multiple>\n <option *ngFor=\"let opt of getOptions(rule.field)\" [ngValue]=\"opt.value\">\n {{opt.name}}\n </option>\n </select>\n </ng-container>\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'boolean'\" type=\"checkbox\">\n </div>\n </ng-template>\n\n </ng-container>\n <query-builder *ngIf=\"local.ruleset\" [data]=\"rule\" [disabled]=\"disabled\" [parentTouchedCallback]=\"parentTouchedCallback || onTouchedCallback\"\n [parentChangeCallback]=\"parentChangeCallback || onChangeCallback\" [parentInputTemplates]=\"parentInputTemplates || inputTemplates\"\n [parentOperatorTemplate]=\"parentOperatorTemplate || operatorTemplate\" [parentFieldTemplate]=\"parentFieldTemplate || fieldTemplate\"\n [parentEntityTemplate]=\"parentEntityTemplate || entityTemplate\" [parentSwitchGroupTemplate]=\"parentSwitchGroupTemplate || switchGroupTemplate\"\n [parentButtonGroupTemplate]=\"parentButtonGroupTemplate || buttonGroupTemplate\" [parentRemoveButtonTemplate]=\"parentRemoveButtonTemplate || removeButtonTemplate\"\n [parentEmptyWarningTemplate]=\"parentEmptyWarningTemplate || emptyWarningTemplate\" [parentArrowIconTemplate]=\"parentArrowIconTemplate || arrowIconTemplate\"\n [parentValue]=\"data\" [classNames]=\"classNames\" [config]=\"config\" [allowRuleset]=\"allowRuleset\"\n [allowCollapse]=\"allowCollapse\" [emptyMessage]=\"emptyMessage\" [operatorMap]=\"operatorMap\">\n </query-builder>\n\n <ng-container *ngIf=\"getEmptyWarningTemplate() as template; else defaultEmptyWarning\">\n <ng-container *ngIf=\"local.invalid\">\n <ng-container *ngTemplateOutlet=\"template; context: getEmptyWarningContext()\"></ng-container>\n </ng-container>\n </ng-container>\n\n <ng-template #defaultEmptyWarning>\n <p [ngClass]=\"getClassNames('emptyWarning')\" *ngIf=\"local.invalid\">\n {{emptyMessage}}\n </p>\n </ng-template>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n</div>\n", styles: ["@charset \"UTF-8\";:host{display:block;width:100%}:host .q-icon{font-style:normal;font-size:12px}:host .q-remove-icon:before{content:\"\\274c\"}:host .q-arrow-icon-button{float:left;margin:4px 6px 4px 0;transform:rotate(90deg);transition:linear .25s transform;cursor:pointer}:host .q-arrow-icon-button.q-collapsed{transform:rotate(0)}:host .q-arrow-icon:before{content:\"\\25b6\"}:host .q-add-icon{color:#555}:host .q-add-icon:before{content:\"\\2795\"}:host .q-remove-button{color:#b3415d;width:31px}:host .q-switch-group,:host .q-button-group{font-family:\"Lucida Grande\",Tahoma,Verdana,sans-serif;overflow:hidden}:host .q-right-align{float:right}:host .q-button{margin-left:8px;padding:0 8px;background-color:#fff}:host .q-button:disabled{display:none}:host .q-control-size{display:inline-block;vertical-align:top;padding-right:10px}:host .q-input-control,:host .q-operator-control,:host .q-field-control,:host .q-entity-control{display:inline-block;padding:5px 8px;color:#555;background-color:#fff;background-image:none;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;width:auto;min-width:180px}:host .q-input-control:disabled,:host .q-operator-control:disabled,:host .q-field-control:disabled,:host .q-entity-control:disabled{border-color:transparent}:host .q-operator-control,:host .q-field-control,:host .q-entity-control,:host .q-input-control:not([type=checkbox]){min-height:32px;-webkit-appearance:none}:host .q-switch-label,:host .q-button{float:left;margin-bottom:0;font-size:14px;line-height:30px;font-weight:normal;text-align:center;text-shadow:none;border:1px solid rgba(0,0,0,.2);box-sizing:border-box}:host .q-switch-label:hover,:host .q-button:hover{cursor:pointer;background-color:#f0f0f0}:host .q-switch-label{background-color:#e4e4e4;padding:0 8px}:host .q-switch-radio{position:absolute;clip:rect(0,0,0,0);height:1px;width:1px;border:0;overflow:hidden}:host .q-switch-radio:checked+.q-switch-label{border:1px solid #619ed7;background:white;color:#3176b3}:host .q-switch-radio:disabled+.q-switch-label{display:none}:host .q-switch-radio:checked:disabled+.q-switch-label{display:initial;color:initial;cursor:default;border-color:transparent}:host .q-invalid-ruleset{border:1px solid rgba(179,65,93,.5)!important;background:rgba(179,65,93,.1)!important}:host .q-empty-warning{color:#8d252e;text-align:center}:host .q-ruleset{border:1px solid #CCC}:host .q-rule{border:1px solid #CCC;background:white}:host .q-transition{transition:all .1s ease-in-out}:host .q-tree-container{width:100%;overflow:hidden;transition:ease-in .25s max-height}:host .q-tree-container.q-collapsed{max-height:0!important}:host .q-tree{list-style:none;margin:4px 0 2px}:host .q-row{padding:6px 8px;margin-top:6px}:host .q-connector{position:relative}:host .q-connector:before{top:-5px;border-width:0 0 2px 2px}:host .q-connector:after{border-width:0 0 0 2px;top:50%}:host .q-connector:before,:host .q-connector:after{content:\"\";left:-12px;border-color:#ccc;border-style:solid;width:9px;height:calc(50% + 6px);position:absolute}:host .q-connector:last-child:after{content:none}:host .q-inline-block-display{display:inline-block;vertical-align:top}\n"], components: [{ type: QueryBuilderComponent, selector: "query-builder", inputs: ["disabled", "data", "allowRuleset", "allowCollapse", "emptyMessage", "classNames", "operatorMap", "parentValue", "config", "parentArrowIconTemplate", "parentInputTemplates", "parentOperatorTemplate", "parentFieldTemplate", "parentEntityTemplate", "parentSwitchGroupTemplate", "parentButtonGroupTemplate", "parentRemoveButtonTemplate", "parentEmptyWarningTemplate", "parentChangeCallback", "parentTouchedCallback", "persistValueOnFieldChange", "value"] }], directives: [{ type: i1__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i1__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }, { type: i2__namespace.RadioControlValueAccessor, selector: "input[type=radio][formControlName],input[type=radio][formControl],input[type=radio][ngModel]", inputs: ["name", "formControlName", "value"] }, { type: i2__namespace.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { type: i2__namespace.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { type: i2__namespace.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { type: i1__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i2__namespace.SelectControlValueAccessor, selector: "select:not([multiple])[formControlName],select:not([multiple])[formControl],select:not([multiple])[ngModel]", inputs: ["compareWith"] }, { type: i2__namespace.NgSelectOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i2__namespace.ɵNgSelectMultipleOption, selector: "option", inputs: ["ngValue", "value"] }, { type: i1__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i1__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace.NumberValueAccessor, selector: "input[type=number][formControlName],input[type=number][formControl],input[type=number][ngModel]" }, { type: i2__namespace.SelectMultipleControlValueAccessor, selector: "select[multiple][formControlName],select[multiple][formControl],select[multiple][ngModel]", inputs: ["compareWith"] }, { type: i2__namespace.CheckboxControlValueAccessor, selector: "input[type=checkbox][formControlName],input[type=checkbox][formControl],input[type=checkbox][ngModel]" }] });
|
|
828
836
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.13", ngImport: i0__namespace, type: QueryBuilderComponent, decorators: [{
|
|
829
837
|
type: i0.Component,
|
|
830
838
|
args: [{
|
|
@@ -837,6 +845,9 @@
|
|
|
837
845
|
type: i0.Input
|
|
838
846
|
}], data: [{
|
|
839
847
|
type: i0.Input
|
|
848
|
+
}], condintion: [{
|
|
849
|
+
type: i0.HostBinding,
|
|
850
|
+
args: ['attr.query-builder-condition']
|
|
840
851
|
}], allowRuleset: [{
|
|
841
852
|
type: i0.Input
|
|
842
853
|
}], allowCollapse: [{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ngx-angular-query-builder.umd.js","sources":["../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-operator.directive.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-field.directive.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-entity.directive.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-switch-group.directive.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-button-group.directive.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-input.directive.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-remove-button.directive.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-empty-warning.directive.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-arrow-icon.directive.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-builder.component.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-builder.component.html","../../../projects/ngx-angular-query-builder/src/lib/ngx-angular-query-builder.module.ts","../../../projects/ngx-angular-query-builder/src/public-api.ts","../../../projects/ngx-angular-query-builder/src/ngx-angular-query-builder.ts"],"sourcesContent":["import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({selector: '[queryOperator]'})\nexport class QueryOperatorDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({selector: '[queryField]'})\nexport class QueryFieldDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({selector: '[queryEntity]'})\nexport class QueryEntityDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({selector: '[querySwitchGroup]'})\nexport class QuerySwitchGroupDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({selector: '[queryButtonGroup]'})\nexport class QueryButtonGroupDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import { Directive, Input, TemplateRef } from '@angular/core';\n\n@Directive({selector: '[queryInput]'})\nexport class QueryInputDirective {\n /** Unique name for query input type. */\n @Input()\n get queryInputType(): string { return this._type; }\n set queryInputType(value: string) {\n // If the directive is set without a type (updated programatically), then this setter will\n // trigger with an empty string and should not overwrite the programatically set value.\n if (!value) { return; }\n this._type = value;\n }\n private _type!: string;\n\n constructor(public template: TemplateRef<any>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({selector: '[queryRemoveButton]'})\nexport class QueryRemoveButtonDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({selector: '[queryEmptyWarning]'})\nexport class QueryEmptyWarningDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({selector: '[queryArrowIcon]'})\nexport class QueryArrowIconDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import {\n AbstractControl,\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n NG_VALIDATORS,\n ValidationErrors,\n Validator\n} from '@angular/forms';\nimport { QueryOperatorDirective } from './query-operator.directive';\nimport { QueryFieldDirective } from './query-field.directive';\nimport { QueryEntityDirective } from './query-entity.directive';\nimport { QuerySwitchGroupDirective } from './query-switch-group.directive';\nimport { QueryButtonGroupDirective } from './query-button-group.directive';\nimport { QueryInputDirective } from './query-input.directive';\nimport { QueryRemoveButtonDirective } from './query-remove-button.directive';\nimport { QueryEmptyWarningDirective } from './query-empty-warning.directive';\nimport { QueryArrowIconDirective } from './query-arrow-icon.directive';\nimport {\n ButtonGroupContext,\n Entity,\n Field,\n SwitchGroupContext,\n EntityContext,\n FieldContext,\n InputContext,\n LocalRuleMeta,\n OperatorContext,\n Option,\n QueryBuilderClassNames,\n QueryBuilderConfig,\n RemoveButtonContext,\n ArrowIconContext,\n Rule,\n RuleSet,\n EmptyWarningContext,\n} from './query-builder.interfaces';\nimport {\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n QueryList,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ElementRef\n} from '@angular/core';\n\nexport const CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => QueryBuilderComponent),\n multi: true\n};\n\nexport const VALIDATOR: any = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => QueryBuilderComponent),\n multi: true\n};\n\n@Component({\n selector: 'query-builder',\n templateUrl: './query-builder.component.html',\n styleUrls: ['./query-builder.component.scss'],\n providers: [CONTROL_VALUE_ACCESSOR, VALIDATOR]\n})\nexport class QueryBuilderComponent implements OnChanges, ControlValueAccessor, Validator {\n public fields: Field[];\n public filterFields: Field[];\n public entities: Entity[];\n public defaultClassNames: QueryBuilderClassNames = {\n arrowIconButton: 'q-arrow-icon-button',\n arrowIcon: 'q-icon q-arrow-icon',\n removeIcon: 'q-icon q-remove-icon',\n addIcon: 'q-icon q-add-icon',\n button: 'q-button',\n buttonGroup: 'q-button-group',\n removeButton: 'q-remove-button',\n switchGroup: 'q-switch-group',\n switchLabel: 'q-switch-label',\n switchRadio: 'q-switch-radio',\n rightAlign: 'q-right-align',\n transition: 'q-transition',\n collapsed: 'q-collapsed',\n treeContainer: 'q-tree-container',\n tree: 'q-tree',\n row: 'q-row',\n connector: 'q-connector',\n rule: 'q-rule',\n ruleSet: 'q-ruleset',\n invalidRuleSet: 'q-invalid-ruleset',\n emptyWarning: 'q-empty-warning',\n fieldControl: 'q-field-control',\n fieldControlSize: 'q-control-size',\n entityControl: 'q-entity-control',\n entityControlSize: 'q-control-size',\n operatorControl: 'q-operator-control',\n operatorControlSize: 'q-control-size',\n inputControl: 'q-input-control',\n inputControlSize: 'q-control-size'\n };\n public defaultOperatorMap: { [key: string]: string[] } = {\n string: ['=', '!=', 'contains', 'like'],\n number: ['=', '!=', '>', '>=', '<', '<='],\n time: ['=', '!=', '>', '>=', '<', '<='],\n date: ['=', '!=', '>', '>=', '<', '<='],\n category: ['=', '!=', 'in', 'not in'],\n boolean: ['=']\n };\n @Input() disabled = false;\n @Input() data: RuleSet = { condition: 'add', rules: [] };\n\n // For ControlValueAccessor interface\n public onChangeCallback!: () => void;\n public onTouchedCallback!: () => any;\n\n @Input() allowRuleset = true;\n @Input() allowCollapse = false;\n @Input() emptyMessage = 'A ruleset cannot be empty. Please add a rule or remove it all together.';\n @Input() classNames: QueryBuilderClassNames = {};\n @Input() operatorMap: { [key: string]: string[] } = {};\n @Input() parentValue: RuleSet = { condition: 'add', rules: [] };\n @Input() config: QueryBuilderConfig = { fields: {} };\n @Input() parentArrowIconTemplate!: QueryArrowIconDirective;\n @Input() parentInputTemplates!: QueryList<QueryInputDirective>;\n @Input() parentOperatorTemplate!: QueryOperatorDirective;\n @Input() parentFieldTemplate!: QueryFieldDirective;\n @Input() parentEntityTemplate!: QueryEntityDirective;\n @Input() parentSwitchGroupTemplate!: QuerySwitchGroupDirective;\n @Input() parentButtonGroupTemplate!: QueryButtonGroupDirective;\n @Input() parentRemoveButtonTemplate!: QueryRemoveButtonDirective;\n @Input() parentEmptyWarningTemplate!: QueryEmptyWarningDirective;\n @Input() parentChangeCallback!: () => void;\n @Input() parentTouchedCallback!: () => void;\n @Input() persistValueOnFieldChange = false;\n\n @ViewChild('treeContainer', {static: true}) treeContainer!: ElementRef;\n\n @ContentChild(QueryButtonGroupDirective) buttonGroupTemplate!: QueryButtonGroupDirective;\n @ContentChild(QuerySwitchGroupDirective) switchGroupTemplate!: QuerySwitchGroupDirective;\n @ContentChild(QueryFieldDirective) fieldTemplate!: QueryFieldDirective;\n @ContentChild(QueryEntityDirective) entityTemplate!: QueryEntityDirective;\n @ContentChild(QueryOperatorDirective) operatorTemplate!: QueryOperatorDirective;\n @ContentChild(QueryRemoveButtonDirective) removeButtonTemplate!: QueryRemoveButtonDirective;\n @ContentChild(QueryEmptyWarningDirective) emptyWarningTemplate!: QueryEmptyWarningDirective;\n @ContentChildren(QueryInputDirective) inputTemplates!: QueryList<QueryInputDirective>;\n @ContentChild(QueryArrowIconDirective) arrowIconTemplate!: QueryArrowIconDirective;\n\n private defaultTemplateTypes: string[] = [\n 'string', 'number', 'time', 'date', 'category', 'boolean', 'multiselect'];\n private defaultPersistValueTypes: string[] = [\n 'string', 'number', 'time', 'date', 'boolean'];\n private defaultEmptyList: any[] = [];\n private operatorsCache: { [key: string]: string[] } = {};\n private inputContextCache = new Map<Rule, InputContext>();\n private operatorContextCache = new Map<Rule, OperatorContext>();\n private fieldContextCache = new Map<Rule, FieldContext>();\n private entityContextCache = new Map<Rule, EntityContext>();\n private removeButtonContextCache = new Map<Rule, RemoveButtonContext>();\n private buttonGroupContext!: ButtonGroupContext;\n\n constructor(\n private changeDetectorRef: ChangeDetectorRef\n ) {\n this.fields = [];\n this.filterFields = [];\n this.entities = [];\n }\n\n // ----------OnInit Implementation----------\n\n // ----------OnChanges Implementation----------\n\n ngOnChanges(changes: SimpleChanges) {\n const config = this.config;\n const type = typeof config;\n if (type === 'object') {\n this.fields = Object.keys(config.fields).map((value) => {\n const field = config.fields[value];\n field.value = field.value || value;\n return field;\n });\n if (config.entities) {\n this.entities = Object.keys(config.entities).map((value) => {\n const entity = config.entities ? config.entities[value]: [] as any;\n entity.value = entity.value || value;\n return entity;\n });\n } else {\n this.entities = [];\n }\n this.operatorsCache = {};\n } else {\n throw new Error(`Expected 'config' must be a valid object, got ${type} instead.`);\n }\n }\n\n // ----------Validator Implementation----------\n\n validate(control: AbstractControl): ValidationErrors | null {\n const errors: { [key: string]: any } = {};\n const ruleErrorStore = [] as any;\n let hasErrors = false;\n\n if (!this.config.allowEmptyRulesets && this.checkEmptyRuleInRuleset(this.data)) {\n errors.empty = 'Empty rulesets are not allowed.';\n hasErrors = true;\n }\n\n this.validateRulesInRuleset(this.data, ruleErrorStore);\n\n if (ruleErrorStore.length) {\n errors.rules = ruleErrorStore;\n hasErrors = true;\n }\n return hasErrors ? errors : null;\n }\n\n // ----------ControlValueAccessor Implementation----------\n\n @Input()\n get value(): RuleSet {\n return this.data;\n }\n set value(value: RuleSet) {\n // When component is initialized without a formControl, null is passed to value\n this.data = value || { condition: 'add', rules: [] };\n this.handleDataChange();\n }\n\n writeValue(obj: any): void {\n this.value = obj;\n }\n registerOnChange(fn: any): void {\n this.onChangeCallback = () => fn(this.data);\n }\n registerOnTouched(fn: any): void {\n this.onTouchedCallback = () => fn(this.data);\n }\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.changeDetectorRef.detectChanges();\n }\n\n // ----------END----------\n\n getDisabledState = (): boolean => {\n return this.disabled;\n }\n\n findTemplateForRule(rule: Rule): TemplateRef<any> | any {\n const type = this.getInputType(rule.field, rule.operator as string);\n if (type) {\n const queryInput = this.findQueryInput(type);\n if (queryInput) {\n return queryInput.template;\n } else {\n if (this.defaultTemplateTypes.indexOf(type) === -1) {\n console.warn(`Could not find template for field with type: ${type}`);\n }\n return null;\n }\n }\n }\n\n findQueryInput(type: string): QueryInputDirective {\n const templates = this.parentInputTemplates || this.inputTemplates;\n return templates.find((item) => item.queryInputType === type) as QueryInputDirective;\n }\n\n getOperators(field: string): string[] {\n if (this.operatorsCache[field]) {\n return this.operatorsCache[field];\n }\n let operators = this.defaultEmptyList;\n const fieldObject = this.config.fields[field];\n\n if (this.config.getOperators) {\n return this.config.getOperators(field, fieldObject);\n }\n\n const type = fieldObject.type;\n\n if (fieldObject && fieldObject.operators) {\n operators = fieldObject.operators;\n } else if (type) {\n operators = (this.operatorMap && this.operatorMap[type]) || this.defaultOperatorMap[type] || this.defaultEmptyList;\n if (operators.length === 0) {\n console.warn(\n `No operators found for field '${field}' with type ${fieldObject.type}. ` +\n `Please define an 'operators' property on the field or use the 'operatorMap' binding to fix this.`);\n }\n if (fieldObject.nullable) {\n operators = operators.concat(['is null', 'is not null']);\n }\n } else {\n console.warn(`No 'type' property found on field: '${field}'`);\n }\n\n // Cache reference to array object, so it won't be computed next time and trigger a rerender.\n this.operatorsCache[field] = operators;\n return operators;\n }\n\n getFields(entity: string): Field[] {\n if (this.entities.length && entity) {\n return this.fields.filter((field) => {\n return field && field.entity === entity;\n });\n } else {\n return this.fields;\n }\n }\n\n getInputType(field: string, operator: string): string | null {\n if (this.config.getInputType) {\n return this.config.getInputType(field, operator);\n }\n\n if (!this.config.fields[field]) {\n throw new Error(`No configuration for field '${field}' could be found! Please add it to config.fields.`);\n }\n\n const type = this.config.fields[field].type;\n switch (operator) {\n case 'is null':\n case 'is not null':\n return null; // No displayed component\n case 'in':\n case 'not in':\n return type === 'category' || type === 'boolean' ? 'multiselect' : type;\n default:\n return type;\n }\n }\n\n getOptions(field: string): Option[] {\n if (this.config.getOptions) {\n return this.config.getOptions(field);\n }\n return this.config.fields[field].options || this.defaultEmptyList;\n }\n\n getClassNames(...args: string[]): any | string[] {\n const clsLookup = this.classNames ? this.classNames : this.defaultClassNames as any;\n const defaultClassNames = this.defaultClassNames as any;\n const classNames = args.map((id: any) => clsLookup[id] || defaultClassNames[id]).filter((c: any) => !!c);\n return classNames.length ? classNames.join(' ') : [];\n }\n\n getDefaultField(entity: Entity): Field | null {\n if (!entity) {\n return null;\n } else if (entity.defaultField !== undefined) {\n return this.getDefaultValue(entity.defaultField);\n } else {\n const entityFields = this.fields.filter((field) => {\n return field && field.entity === entity.value;\n });\n if (entityFields && entityFields.length) {\n return entityFields[0];\n } else {\n console.warn(`No fields found for entity '${entity.name}'. ` +\n `A 'defaultOperator' is also not specified on the field config. Operator value will default to null.`);\n return null;\n }\n }\n }\n\n getDefaultOperator(field: Field): string | null {\n if (field && field.defaultOperator !== undefined) {\n return this.getDefaultValue(field.defaultOperator);\n } else {\n const operators = this.getOperators(field.value as string);\n if (operators && operators.length) {\n return operators[0];\n } else {\n console.warn(`No operators found for field '${field.value}'. ` +\n `A 'defaultOperator' is also not specified on the field config. Operator value will default to null.`);\n return null;\n }\n }\n }\n\n addRule(parent?: RuleSet): void {\n if (this.disabled) {\n return;\n }\n\n parent = parent || this.data;\n if (this.config.addRule) {\n this.config.addRule(parent);\n } else {\n const field = this.fields[0];\n parent.rules = parent.rules.concat([{\n field: field.value as string,\n operator: this.getDefaultOperator(field) as string,\n value: this.getDefaultValue(field.defaultValue),\n entity: field.entity\n }]);\n }\n\n this.handleTouched();\n this.handleDataChange();\n }\n\n removeRule(rule: Rule, parent?: RuleSet): void {\n if (this.disabled) {\n return;\n }\n\n parent = parent || this.data;\n if (this.config.removeRule) {\n this.config.removeRule(rule, parent);\n } else {\n parent.rules = parent.rules.filter((r) => r !== rule);\n }\n this.inputContextCache.delete(rule);\n this.operatorContextCache.delete(rule);\n this.fieldContextCache.delete(rule);\n this.entityContextCache.delete(rule);\n this.removeButtonContextCache.delete(rule);\n\n this.handleTouched();\n this.handleDataChange();\n }\n\n addRuleSet(parent?: RuleSet): void {\n if (this.disabled) {\n return;\n }\n\n parent = parent || this.data;\n if (this.config.addRuleSet) {\n this.config.addRuleSet(parent);\n } else {\n parent.rules = parent.rules.concat([{ condition: 'add', rules: [] }]);\n }\n\n this.handleTouched();\n this.handleDataChange();\n }\n\n removeRuleSet(ruleset?: RuleSet, parent?: RuleSet): void {\n if (this.disabled) {\n return;\n }\n\n ruleset = ruleset || this.data;\n parent = parent || this.parentValue;\n if (this.config.removeRuleSet) {\n this.config.removeRuleSet(ruleset, parent);\n } else {\n parent.rules = parent.rules.filter((r) => r !== ruleset);\n }\n\n this.handleTouched();\n this.handleDataChange();\n }\n\n transitionEnd(e: Event): void {\n this.treeContainer.nativeElement.style.maxHeight = null;\n }\n\n toggleCollapse(): void {\n this.computedTreeContainerHeight();\n setTimeout(() => {\n this.data.collapsed = !this.data.collapsed;\n }, 100);\n }\n\n computedTreeContainerHeight(): void {\n const nativeElement: HTMLElement = this.treeContainer.nativeElement;\n if (nativeElement && nativeElement.firstElementChild) {\n nativeElement.style.maxHeight = (nativeElement.firstElementChild.clientHeight + 8) + 'px';\n }\n }\n\n changeCondition(value: string): void {\n if (this.disabled) {\n return;\n }\n\n this.data.condition = value;\n this.handleTouched();\n this.handleDataChange();\n }\n\n changeOperator(rule: Rule): void {\n if (this.disabled) {\n return;\n }\n\n if (this.config.coerceValueForOperator) {\n rule.value = this.config.coerceValueForOperator(rule.operator as string, rule.value, rule);\n } else {\n rule.value = this.coerceValueForOperator(rule.operator as string, rule.value, rule);\n }\n\n this.handleTouched();\n this.handleDataChange();\n }\n\n coerceValueForOperator(operator: string, value: any, rule: Rule): any {\n const inputType: string | null = this.getInputType(rule.field, operator);\n if (inputType === 'multiselect' && !Array.isArray(value)) {\n return [value];\n }\n return value;\n }\n\n changeInput(): void {\n if (this.disabled) {\n return;\n }\n\n this.handleTouched();\n this.handleDataChange();\n }\n\n changeField(fieldValue: string, rule: Rule): void {\n if (this.disabled) {\n return;\n }\n\n const inputContext = this.inputContextCache.get(rule);\n const currentField = inputContext && inputContext.field;\n\n const nextField: Field = this.config.fields[fieldValue];\n\n const nextValue = this.calculateFieldChangeValue(\n currentField as Field, nextField, rule.value);\n\n if (nextValue !== undefined) {\n rule.value = nextValue;\n } else {\n delete rule.value;\n }\n\n rule.operator = this.getDefaultOperator(nextField) as string;\n\n // Create new context objects so templates will automatically update\n this.inputContextCache.delete(rule);\n this.operatorContextCache.delete(rule);\n this.fieldContextCache.delete(rule);\n this.entityContextCache.delete(rule);\n this.getInputContext(rule);\n this.getFieldContext(rule);\n this.getOperatorContext(rule);\n this.getEntityContext(rule);\n\n this.handleTouched();\n this.handleDataChange();\n }\n\n changeEntity(entityValue: string, rule: Rule, index: number, data: RuleSet): void {\n if (this.disabled) {\n return;\n }\n let i = index;\n let rs = data;\n const entity: Entity = this.entities.find((e) => e.value === entityValue) as Entity;\n const defaultField: Field = this.getDefaultField(entity) as Field;\n if (!rs) {\n rs = this.data;\n i = rs.rules.findIndex((x) => x === rule);\n }\n rule.field = defaultField.value as string;\n rs.rules[i] = rule;\n if (defaultField) {\n this.changeField(defaultField.value as string, rule);\n } else {\n this.handleTouched();\n this.handleDataChange();\n }\n }\n\n getDefaultValue(defaultValue: any): any {\n switch (typeof defaultValue) {\n case 'function':\n return defaultValue();\n default:\n return defaultValue;\n }\n }\n\n getOperatorTemplate(): TemplateRef<any> | null {\n const t = this.parentOperatorTemplate || this.operatorTemplate;\n return t ? t.template : null;\n }\n\n getFieldTemplate(): TemplateRef<any> | null {\n const t = this.parentFieldTemplate || this.fieldTemplate;\n return t ? t.template : null;\n }\n\n getEntityTemplate(): TemplateRef<any> | null {\n const t = this.parentEntityTemplate || this.entityTemplate;\n return t ? t.template : null;\n }\n\n getArrowIconTemplate(): TemplateRef<any> | null {\n const t = this.parentArrowIconTemplate || this.arrowIconTemplate;\n return t ? t.template : null;\n }\n\n getButtonGroupTemplate(): TemplateRef<any> | null {\n const t = this.parentButtonGroupTemplate || this.buttonGroupTemplate;\n return t ? t.template : null;\n }\n\n getSwitchGroupTemplate(): TemplateRef<any> | null {\n const t = this.parentSwitchGroupTemplate || this.switchGroupTemplate;\n return t ? t.template : null;\n }\n\n getRemoveButtonTemplate(): TemplateRef<any> | null {\n const t = this.parentRemoveButtonTemplate || this.removeButtonTemplate;\n return t ? t.template : null;\n }\n\n getEmptyWarningTemplate(): TemplateRef<any> | null {\n const t = this.parentEmptyWarningTemplate || this.emptyWarningTemplate;\n return t ? t.template : null;\n }\n\n getQueryItemClassName(local: LocalRuleMeta): string {\n let cls = this.getClassNames('row', 'connector', 'transition');\n cls += ' ' + this.getClassNames(local.ruleset ? 'ruleSet' : 'rule');\n if (local.invalid) {\n cls += ' ' + this.getClassNames('invalidRuleSet');\n }\n return cls as string;\n }\n\n getButtonGroupContext(): ButtonGroupContext {\n if (!this.buttonGroupContext) {\n this.buttonGroupContext = {\n addRule: this.addRule.bind(this),\n addRuleSet: this.allowRuleset && this.addRuleSet.bind(this) as any,\n removeRuleSet: this.allowRuleset && this.parentValue && this.removeRuleSet.bind(this) as any,\n getDisabledState: this.getDisabledState,\n $implicit: this.data\n };\n }\n return this.buttonGroupContext;\n }\n\n getRemoveButtonContext(rule: Rule): RemoveButtonContext {\n if (!this.removeButtonContextCache.has(rule)) {\n this.removeButtonContextCache.set(rule, {\n removeRule: this.removeRule.bind(this),\n getDisabledState: this.getDisabledState,\n $implicit: rule\n });\n }\n return this.removeButtonContextCache.get(rule) as RemoveButtonContext;\n }\n\n getFieldContext(rule: Rule): FieldContext {\n if (!this.fieldContextCache.has(rule)) {\n this.fieldContextCache.set(rule, {\n onChange: this.changeField.bind(this),\n getFields: this.getFields.bind(this),\n getDisabledState: this.getDisabledState,\n fields: this.fields,\n $implicit: rule\n });\n }\n return this.fieldContextCache.get(rule) as FieldContext;\n }\n\n getEntityContext(rule: Rule): EntityContext {\n if (!this.entityContextCache.has(rule)) {\n this.entityContextCache.set(rule, {\n onChange: this.changeEntity.bind(this) as any,\n getDisabledState: this.getDisabledState,\n entities: this.entities,\n $implicit: rule\n });\n }\n return this.entityContextCache.get(rule) as EntityContext;\n }\n\n getSwitchGroupContext(): SwitchGroupContext {\n return {\n onChange: this.changeCondition.bind(this),\n getDisabledState: this.getDisabledState,\n $implicit: this.data\n };\n }\n\n getArrowIconContext(): ArrowIconContext {\n return {\n getDisabledState: this.getDisabledState,\n $implicit: this.data\n };\n }\n\n getEmptyWarningContext(): EmptyWarningContext {\n return {\n getDisabledState: this.getDisabledState,\n message: this.emptyMessage,\n $implicit: this.data\n };\n }\n\n getOperatorContext(rule: Rule): OperatorContext {\n if (!this.operatorContextCache.has(rule)) {\n this.operatorContextCache.set(rule, {\n onChange: this.changeOperator.bind(this) as any,\n getDisabledState: this.getDisabledState,\n operators: this.getOperators(rule.field),\n $implicit: rule\n });\n }\n return this.operatorContextCache.get(rule) as OperatorContext;\n }\n\n getInputContext(rule: Rule): InputContext {\n if (!this.inputContextCache.has(rule)) {\n this.inputContextCache.set(rule, {\n onChange: this.changeInput.bind(this),\n getDisabledState: this.getDisabledState,\n options: this.getOptions(rule.field),\n field: this.config.fields[rule.field],\n $implicit: rule\n });\n }\n return this.inputContextCache.get(rule) as InputContext;\n }\n\n private calculateFieldChangeValue(\n currentField: Field,\n nextField: Field,\n currentValue: any\n ): any {\n\n if (this.config.calculateFieldChangeValue != null) {\n return this.config.calculateFieldChangeValue(\n currentField, nextField, currentValue);\n }\n\n const canKeepValue = () => {\n if (currentField == null || nextField == null) {\n return false;\n }\n return currentField.type === nextField.type\n && this.defaultPersistValueTypes.indexOf(currentField.type) !== -1;\n };\n\n if (this.persistValueOnFieldChange && canKeepValue()) {\n return currentValue;\n }\n\n if (nextField && nextField.defaultValue !== undefined) {\n return this.getDefaultValue(nextField.defaultValue);\n }\n\n return undefined;\n }\n\n private checkEmptyRuleInRuleset(ruleset: RuleSet): boolean {\n if (!ruleset || !ruleset.rules || ruleset.rules.length === 0) {\n return true;\n } else {\n return ruleset.rules.some((item: RuleSet | any) => {\n if (item.rules) {\n return this.checkEmptyRuleInRuleset(item);\n } else {\n return false;\n }\n });\n }\n }\n\n private validateRulesInRuleset(ruleset: RuleSet, errorStore: any[]) {\n if (ruleset && ruleset.rules && ruleset.rules.length > 0) {\n ruleset.rules.forEach((item) => {\n if ((item as RuleSet).rules) {\n return this.validateRulesInRuleset(item as RuleSet, errorStore);\n } else if ((item as Rule).field) {\n const field = this.config.fields[(item as Rule).field];\n if (field && field.validator && field.validator.apply) {\n const error = field.validator(item as Rule, ruleset);\n if (error != null) {\n errorStore.push(error);\n }\n }\n }\n });\n }\n }\n\n private handleDataChange(): void {\n this.changeDetectorRef.markForCheck();\n if (this.onChangeCallback) {\n this.onChangeCallback();\n }\n if (this.parentChangeCallback) {\n this.parentChangeCallback();\n }\n }\n\n private handleTouched(): void {\n if (this.onTouchedCallback) {\n this.onTouchedCallback();\n }\n if (this.parentTouchedCallback) {\n this.parentTouchedCallback();\n }\n }\n}\n","<div [ngClass]=\"getClassNames('switchRow')\">\n <ng-template #defaultArrowIcon>\n <i [ngClass]=\"getClassNames('arrowIcon')\"></i>\n </ng-template>\n\n <a *ngIf=\"allowCollapse\" (click)=\"toggleCollapse()\" [ngClass]=\"getClassNames('arrowIconButton', data.collapsed ? 'collapsed' : '')\">\n <ng-container *ngIf=\"getArrowIconTemplate() as template; else defaultArrowIcon\">\n <ng-container *ngTemplateOutlet=\"template; context: getArrowIconContext()\"></ng-container>\n </ng-container>\n </a>\n\n <ng-container *ngIf=\"getButtonGroupTemplate() as template; else defaultButtonGroup\">\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <ng-container *ngTemplateOutlet=\"template; context: getButtonGroupContext()\"></ng-container>\n </div>\n </ng-container>\n\n <ng-template #defaultButtonGroup>\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <button type=\"button\" (click)=\"addRule()\" [ngClass]=\"getClassNames('button')\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('addIcon')\"></i> Rule\n </button>\n <button type=\"button\" (click)=\"addRuleSet()\" [ngClass]=\"getClassNames('button')\" *ngIf=\"allowRuleset\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('addIcon')\"></i> Ruleset\n </button>\n <ng-container *ngIf=\"!!parentValue && allowRuleset\">\n <button type=\"button\" (click)=\"removeRuleSet()\" [ngClass]=\"getClassNames('button', 'removeButton')\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('removeIcon')\"></i>\n </button>\n </ng-container>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getSwitchGroupTemplate() as template; else defaultSwitchGroup\">\n <ng-container *ngTemplateOutlet=\"template; context: getSwitchGroupContext()\"></ng-container>\n </ng-container>\n\n <ng-template #defaultSwitchGroup>\n <div [ngClass]=\"getClassNames('switchGroup', 'transition')\" *ngIf=\"data\">\n <div [ngClass]=\"getClassNames('switchControl')\">\n <input type=\"radio\" [ngClass]=\"getClassNames('switchRadio')\" [(ngModel)]=\"data.condition\" [disabled]=disabled\n value=\"and\" #andOption />\n <label (click)=\"changeCondition(andOption.value)\" [ngClass]=\"getClassNames('switchLabel')\">AND</label>\n </div>\n <div [ngClass]=\"getClassNames('switchControl')\">\n <input type=\"radio\" [ngClass]=\"getClassNames('switchRadio')\" [(ngModel)]=\"data.condition\" [disabled]=disabled\n value=\"or\" #orOption />\n <label (click)=\"changeCondition(orOption.value)\" [ngClass]=\"getClassNames('switchLabel')\">OR</label>\n </div>\n </div>\n </ng-template>\n</div>\n\n<div #treeContainer (transitionend)=\"transitionEnd($event)\" [ngClass]=\"getClassNames('treeContainer', data.collapsed ? 'collapsed' : '')\">\n <ul [ngClass]=\"getClassNames('tree')\" *ngIf=\"data && data.rules\">\n <ng-container *ngFor=\"let rule of data.rules;let i=index\">\n\n <ng-container *ngIf=\"{ruleset: !!rule.rules, invalid: !config.allowEmptyRulesets && rule.rules && rule.rules.length === 0} as local\">\n <li [ngClass]=\"getQueryItemClassName(local)\">\n <ng-container *ngIf=\"!local.ruleset\">\n\n <ng-container *ngIf=\"getRemoveButtonTemplate() as template; else defaultRemoveButton\">\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <ng-container *ngTemplateOutlet=\"template; context: getRemoveButtonContext(rule)\"></ng-container>\n </div>\n </ng-container>\n\n <ng-template #defaultRemoveButton>\n <div [ngClass]=\"getClassNames('removeButtonSize', 'rightAlign')\">\n <button type=\"button\" [ngClass]=\"getClassNames('button', 'removeButton')\" (click)=\"removeRule(rule, data)\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('removeIcon')\"></i>\n </button>\n </div>\n </ng-template>\n\n <div *ngIf=\"entities?.length\" class=\"q-inline-block-display\">\n <ng-container *ngIf=\"getEntityTemplate() as template; else defaultEntity\">\n <ng-container *ngTemplateOutlet=\"template; context: getEntityContext(rule)\"></ng-container>\n </ng-container>\n </div>\n\n <ng-template #defaultEntity>\n <div [ngClass]=\"getClassNames('entityControlSize')\">\n <select [ngClass]=\"getClassNames('entityControl')\" [(ngModel)]=\"rule.entity\" (ngModelChange)=\"changeEntity($event, rule,i,data)\"\n [disabled]=\"disabled\">\n <option *ngFor=\"let entity of entities\" [ngValue]=\"entity.value\">\n {{entity.name}}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getFieldTemplate() as template; else defaultField\">\n <ng-container *ngTemplateOutlet=\"template; context: getFieldContext(rule)\"></ng-container>\n </ng-container>\n\n <ng-template #defaultField>\n <div [ngClass]=\"getClassNames('fieldControlSize')\">\n <select [ngClass]=\"getClassNames('fieldControl')\" [(ngModel)]=\"rule.field\" (ngModelChange)=\"changeField($event, rule)\"\n [disabled]=\"disabled\">\n <option *ngFor=\"let field of getFields(rule.entity)\" [ngValue]=\"field.value\">\n {{field.name}}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getOperatorTemplate() as template; else defaultOperator\">\n <ng-container *ngTemplateOutlet=\"template; context: getOperatorContext(rule)\"></ng-container>\n </ng-container>\n\n <ng-template #defaultOperator>\n <div [ngClass]=\"getClassNames('operatorControlSize')\">\n <select [ngClass]=\"getClassNames('operatorControl')\" [(ngModel)]=\"rule.operator\" (ngModelChange)=\"changeOperator(rule)\"\n [disabled]=\"disabled\">\n <option *ngFor=\"let operator of getOperators(rule.field)\" [ngValue]=\"operator\">\n {{operator}}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"findTemplateForRule(rule) as template; else defaultInput\">\n <ng-container *ngTemplateOutlet=\"template; context: getInputContext(rule)\"></ng-container>\n </ng-container>\n\n <ng-template #defaultInput>\n <div [ngClass]=\"getClassNames('inputControlSize')\" [ngSwitch]=\"getInputType(rule.field, rule.operator)\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'string'\" type=\"text\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'number'\" type=\"number\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'date'\" type=\"date\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'time'\" type=\"time\">\n <select [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'category'\">\n <option *ngFor=\"let opt of getOptions(rule.field)\" [ngValue]=\"opt.value\">\n {{opt.name}}\n </option>\n </select>\n <ng-container *ngSwitchCase=\"'multiselect'\">\n <select [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" multiple>\n <option *ngFor=\"let opt of getOptions(rule.field)\" [ngValue]=\"opt.value\">\n {{opt.name}}\n </option>\n </select>\n </ng-container>\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'boolean'\" type=\"checkbox\">\n </div>\n </ng-template>\n\n </ng-container>\n <query-builder *ngIf=\"local.ruleset\" [data]=\"rule\" [disabled]=\"disabled\" [parentTouchedCallback]=\"parentTouchedCallback || onTouchedCallback\"\n [parentChangeCallback]=\"parentChangeCallback || onChangeCallback\" [parentInputTemplates]=\"parentInputTemplates || inputTemplates\"\n [parentOperatorTemplate]=\"parentOperatorTemplate || operatorTemplate\" [parentFieldTemplate]=\"parentFieldTemplate || fieldTemplate\"\n [parentEntityTemplate]=\"parentEntityTemplate || entityTemplate\" [parentSwitchGroupTemplate]=\"parentSwitchGroupTemplate || switchGroupTemplate\"\n [parentButtonGroupTemplate]=\"parentButtonGroupTemplate || buttonGroupTemplate\" [parentRemoveButtonTemplate]=\"parentRemoveButtonTemplate || removeButtonTemplate\"\n [parentEmptyWarningTemplate]=\"parentEmptyWarningTemplate || emptyWarningTemplate\" [parentArrowIconTemplate]=\"parentArrowIconTemplate || arrowIconTemplate\"\n [parentValue]=\"data\" [classNames]=\"classNames\" [config]=\"config\" [allowRuleset]=\"allowRuleset\"\n [allowCollapse]=\"allowCollapse\" [emptyMessage]=\"emptyMessage\" [operatorMap]=\"operatorMap\">\n </query-builder>\n\n <ng-container *ngIf=\"getEmptyWarningTemplate() as template; else defaultEmptyWarning\">\n <ng-container *ngIf=\"local.invalid\">\n <ng-container *ngTemplateOutlet=\"template; context: getEmptyWarningContext()\"></ng-container>\n </ng-container>\n </ng-container>\n\n <ng-template #defaultEmptyWarning>\n <p [ngClass]=\"getClassNames('emptyWarning')\" *ngIf=\"local.invalid\">\n {{emptyMessage}}\n </p>\n </ng-template>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, } from '@angular/forms';\n\nimport { QueryBuilderComponent } from './query-builder/query-builder.component';\n\nimport { QueryArrowIconDirective } from './query-builder/query-arrow-icon.directive';\nimport { QueryFieldDirective } from './query-builder/query-field.directive';\nimport { QueryInputDirective } from './query-builder/query-input.directive';\nimport { QueryEntityDirective } from './query-builder/query-entity.directive';\nimport { QueryOperatorDirective } from './query-builder/query-operator.directive';\nimport { QueryButtonGroupDirective } from './query-builder/query-button-group.directive';\nimport { QuerySwitchGroupDirective } from './query-builder/query-switch-group.directive';\nimport { QueryRemoveButtonDirective } from './query-builder/query-remove-button.directive';\nimport { QueryEmptyWarningDirective } from './query-builder/query-empty-warning.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule\n ],\n declarations: [\n QueryBuilderComponent,\n QueryInputDirective,\n QueryOperatorDirective,\n QueryFieldDirective,\n QueryEntityDirective,\n QueryButtonGroupDirective,\n QuerySwitchGroupDirective,\n QueryRemoveButtonDirective,\n QueryEmptyWarningDirective,\n QueryArrowIconDirective\n ],\n exports: [\n QueryBuilderComponent,\n QueryInputDirective,\n QueryOperatorDirective,\n QueryFieldDirective,\n QueryEntityDirective,\n QueryButtonGroupDirective,\n QuerySwitchGroupDirective,\n QueryRemoveButtonDirective,\n QueryEmptyWarningDirective,\n QueryArrowIconDirective\n ]\n})\nexport class NgxAngularQueryBuilderModule { }\n","/*\n * Public API Surface of ngx-angular-query-builder\n */\n\nexport * from './lib/query-builder/query-builder.interfaces';\n\nexport * from './lib/query-builder/query-builder.component';\n\nexport * from './lib/query-builder/query-button-group.directive';\nexport * from './lib/query-builder/query-entity.directive';\nexport * from './lib/query-builder/query-field.directive';\nexport * from './lib/query-builder/query-input.directive';\nexport * from './lib/query-builder/query-operator.directive';\nexport * from './lib/query-builder/query-switch-group.directive';\nexport * from './lib/query-builder/query-remove-button.directive';\nexport * from './lib/query-builder/query-empty-warning.directive';\nexport * from './lib/query-builder/query-arrow-icon.directive';\n\nexport * from './lib/ngx-angular-query-builder.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["Directive","Input","NG_VALUE_ACCESSOR","forwardRef","NG_VALIDATORS","Component","ViewChild","ContentChild","ContentChildren","CommonModule","FormsModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAIE,gCAAmB,QAA0B;YAA1B,aAAQ,GAAR,QAAQ,CAAkB;SAAI;;;8IADtC,sBAAsB;uHAAtB,sBAAsB;sHAAtB,sBAAsB;sBADlCA,YAAS;uBAAC,EAAC,QAAQ,EAAE,iBAAiB,EAAC;;;;QCEtC,6BAAmB,QAA0B;YAA1B,aAAQ,GAAR,QAAQ,CAAkB;SAAI;;;2IADtC,mBAAmB;oHAAnB,mBAAmB;sHAAnB,mBAAmB;sBAD/BA,YAAS;uBAAC,EAAC,QAAQ,EAAE,cAAc,EAAC;;;;QCEnC,8BAAmB,QAA0B;YAA1B,aAAQ,GAAR,QAAQ,CAAkB;SAAI;;;4IADtC,oBAAoB;qHAApB,oBAAoB;sHAApB,oBAAoB;sBADhCA,YAAS;uBAAC,EAAC,QAAQ,EAAE,eAAe,EAAC;;;;QCEpC,mCAAmB,QAA0B;YAA1B,aAAQ,GAAR,QAAQ,CAAkB;SAAI;;;iJADtC,yBAAyB;0HAAzB,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AqB;YACrB,mBAAmB;YACnB,sBAAsB;YACtB,mBAAmB;YACnB,oBAAoB;YACpB,yBAAyB;YACzB,yBAAyB;YACzB,0BAA0B;YAC1B,0BAA0B;YAC1B,uBAAuB;qJAGd,4BAA4B,YA7B9B;gBACPD,eAAY;gBACZC,cAAW;aACZ;sHA0BU,4BAA4B;sBA9BxCC,WAAQ;uBAAC;wBACR,OAAO,EAAE;4BACPF,eAAY;4BACZC,cAAW;yBACZ;wBACD,YAAY,EAAE;4BACZ,qBAAqB;4BACrB,mBAAmB;4BACnB,sBAAsB;4BACtB,mBAAmB;4BACnB,oBAAoB;4BACpB,yBAAyB;4BACzB,yBAAyB;4BACzB,0BAA0B;4BAC1B,0BAA0B;4BAC1B,uBAAuB;yBACxB;wBACD,OAAO,EAAE;4BACP,qBAAqB;4BACrB,mBAAmB;4BACnB,sBAAsB;4BACtB,mBAAmB;4BACnB,oBAAoB;4BACpB,yBAAyB;4BACzB,yBAAyB;4BACzB,0BAA0B;4BAC1B,0BAA0B;4BAC1B,uBAAuB;yBACxB;qBACF;;;IC7CD;;;;ICAA;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
1
|
+
{"version":3,"file":"ngx-angular-query-builder.umd.js","sources":["../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-operator.directive.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-field.directive.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-entity.directive.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-switch-group.directive.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-button-group.directive.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-input.directive.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-remove-button.directive.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-empty-warning.directive.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-arrow-icon.directive.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-builder.component.ts","../../../projects/ngx-angular-query-builder/src/lib/query-builder/query-builder.component.html","../../../projects/ngx-angular-query-builder/src/lib/ngx-angular-query-builder.module.ts","../../../projects/ngx-angular-query-builder/src/public-api.ts","../../../projects/ngx-angular-query-builder/src/ngx-angular-query-builder.ts"],"sourcesContent":["import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({selector: '[queryOperator]'})\nexport class QueryOperatorDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({selector: '[queryField]'})\nexport class QueryFieldDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({selector: '[queryEntity]'})\nexport class QueryEntityDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({selector: '[querySwitchGroup]'})\nexport class QuerySwitchGroupDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({selector: '[queryButtonGroup]'})\nexport class QueryButtonGroupDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import { Directive, Input, TemplateRef } from '@angular/core';\n\n@Directive({selector: '[queryInput]'})\nexport class QueryInputDirective {\n /** Unique name for query input type. */\n @Input()\n get queryInputType(): string { return this._type; }\n set queryInputType(value: string) {\n // If the directive is set without a type (updated programatically), then this setter will\n // trigger with an empty string and should not overwrite the programatically set value.\n if (!value) { return; }\n this._type = value;\n }\n private _type!: string;\n\n constructor(public template: TemplateRef<any>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({selector: '[queryRemoveButton]'})\nexport class QueryRemoveButtonDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({selector: '[queryEmptyWarning]'})\nexport class QueryEmptyWarningDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import { Directive, TemplateRef } from '@angular/core';\n\n@Directive({selector: '[queryArrowIcon]'})\nexport class QueryArrowIconDirective {\n constructor(public template: TemplateRef<any>) {}\n}\n","import {\n AbstractControl,\n ControlValueAccessor,\n NG_VALUE_ACCESSOR,\n NG_VALIDATORS,\n ValidationErrors,\n Validator\n} from '@angular/forms';\nimport { QueryOperatorDirective } from './query-operator.directive';\nimport { QueryFieldDirective } from './query-field.directive';\nimport { QueryEntityDirective } from './query-entity.directive';\nimport { QuerySwitchGroupDirective } from './query-switch-group.directive';\nimport { QueryButtonGroupDirective } from './query-button-group.directive';\nimport { QueryInputDirective } from './query-input.directive';\nimport { QueryRemoveButtonDirective } from './query-remove-button.directive';\nimport { QueryEmptyWarningDirective } from './query-empty-warning.directive';\nimport { QueryArrowIconDirective } from './query-arrow-icon.directive';\nimport {\n ButtonGroupContext,\n Entity,\n Field,\n SwitchGroupContext,\n EntityContext,\n FieldContext,\n InputContext,\n LocalRuleMeta,\n OperatorContext,\n Option,\n QueryBuilderClassNames,\n QueryBuilderConfig,\n RemoveButtonContext,\n ArrowIconContext,\n Rule,\n RuleSet,\n EmptyWarningContext,\n} from './query-builder.interfaces';\nimport {\n ChangeDetectorRef,\n Component,\n ContentChild,\n ContentChildren,\n forwardRef,\n Input,\n OnChanges,\n OnInit,\n QueryList,\n SimpleChanges,\n TemplateRef,\n ViewChild,\n ElementRef,\n HostBinding\n} from '@angular/core';\n\nexport const CONTROL_VALUE_ACCESSOR: any = {\n provide: NG_VALUE_ACCESSOR,\n useExisting: forwardRef(() => QueryBuilderComponent),\n multi: true\n};\n\nexport const VALIDATOR: any = {\n provide: NG_VALIDATORS,\n useExisting: forwardRef(() => QueryBuilderComponent),\n multi: true\n};\n\n@Component({\n selector: 'query-builder',\n templateUrl: './query-builder.component.html',\n styleUrls: ['./query-builder.component.scss'],\n providers: [CONTROL_VALUE_ACCESSOR, VALIDATOR]\n})\nexport class QueryBuilderComponent implements OnChanges, ControlValueAccessor, Validator {\n public fields: Field[];\n public filterFields: Field[];\n public entities: Entity[];\n public defaultClassNames: QueryBuilderClassNames = {\n arrowIconButton: 'q-arrow-icon-button',\n arrowIcon: 'q-icon q-arrow-icon',\n removeIcon: 'q-icon q-remove-icon',\n addIcon: 'q-icon q-add-icon',\n button: 'q-button',\n buttonGroup: 'q-button-group',\n removeButton: 'q-remove-button',\n switchGroup: 'q-switch-group',\n switchLabel: 'q-switch-label',\n switchRadio: 'q-switch-radio',\n rightAlign: 'q-right-align',\n transition: 'q-transition',\n collapsed: 'q-collapsed',\n treeContainer: 'q-tree-container',\n tree: 'q-tree',\n row: 'q-row',\n connector: 'q-connector',\n rule: 'q-rule',\n ruleSet: 'q-ruleset',\n invalidRuleSet: 'q-invalid-ruleset',\n emptyWarning: 'q-empty-warning',\n fieldControl: 'q-field-control',\n fieldControlSize: 'q-control-size',\n entityControl: 'q-entity-control',\n entityControlSize: 'q-control-size',\n operatorControl: 'q-operator-control',\n operatorControlSize: 'q-control-size',\n inputControl: 'q-input-control',\n inputControlSize: 'q-control-size'\n };\n public defaultOperatorMap: { [key: string]: string[] } = {\n string: ['=', '!=', 'contains', 'like'],\n number: ['=', '!=', '>', '>=', '<', '<='],\n time: ['=', '!=', '>', '>=', '<', '<='],\n date: ['=', '!=', '>', '>=', '<', '<='],\n category: ['=', '!=', 'in', 'not in'],\n boolean: ['=']\n };\n @Input() disabled = false;\n @Input() data: RuleSet = { condition: 'add', rules: [] };\n\n\n @HostBinding('attr.query-builder-condition') get condintion() {\n return this.data?.condition;\n }\n\n // For ControlValueAccessor interface\n public onChangeCallback!: () => void;\n public onTouchedCallback!: () => any;\n\n @Input() allowRuleset = true;\n @Input() allowCollapse = false;\n @Input() emptyMessage = 'A ruleset cannot be empty. Please add a rule or remove it all together.';\n @Input() classNames: QueryBuilderClassNames = {};\n @Input() operatorMap: { [key: string]: string[] } = {};\n @Input() parentValue: RuleSet = { condition: 'add', rules: [] };\n @Input() config: QueryBuilderConfig = { fields: {} };\n @Input() parentArrowIconTemplate!: QueryArrowIconDirective;\n @Input() parentInputTemplates!: QueryList<QueryInputDirective>;\n @Input() parentOperatorTemplate!: QueryOperatorDirective;\n @Input() parentFieldTemplate!: QueryFieldDirective;\n @Input() parentEntityTemplate!: QueryEntityDirective;\n @Input() parentSwitchGroupTemplate!: QuerySwitchGroupDirective;\n @Input() parentButtonGroupTemplate!: QueryButtonGroupDirective;\n @Input() parentRemoveButtonTemplate!: QueryRemoveButtonDirective;\n @Input() parentEmptyWarningTemplate!: QueryEmptyWarningDirective;\n @Input() parentChangeCallback!: () => void;\n @Input() parentTouchedCallback!: () => void;\n @Input() persistValueOnFieldChange = false;\n\n @ViewChild('treeContainer', {static: true}) treeContainer!: ElementRef;\n\n @ContentChild(QueryButtonGroupDirective) buttonGroupTemplate!: QueryButtonGroupDirective;\n @ContentChild(QuerySwitchGroupDirective) switchGroupTemplate!: QuerySwitchGroupDirective;\n @ContentChild(QueryFieldDirective) fieldTemplate!: QueryFieldDirective;\n @ContentChild(QueryEntityDirective) entityTemplate!: QueryEntityDirective;\n @ContentChild(QueryOperatorDirective) operatorTemplate!: QueryOperatorDirective;\n @ContentChild(QueryRemoveButtonDirective) removeButtonTemplate!: QueryRemoveButtonDirective;\n @ContentChild(QueryEmptyWarningDirective) emptyWarningTemplate!: QueryEmptyWarningDirective;\n @ContentChildren(QueryInputDirective) inputTemplates!: QueryList<QueryInputDirective>;\n @ContentChild(QueryArrowIconDirective) arrowIconTemplate!: QueryArrowIconDirective;\n\n private defaultTemplateTypes: string[] = [\n 'string', 'number', 'time', 'date', 'category', 'boolean', 'multiselect'];\n private defaultPersistValueTypes: string[] = [\n 'string', 'number', 'time', 'date', 'boolean'];\n private defaultEmptyList: any[] = [];\n private operatorsCache: { [key: string]: string[] } = {};\n private inputContextCache = new Map<Rule, InputContext>();\n private operatorContextCache = new Map<Rule, OperatorContext>();\n private fieldContextCache = new Map<Rule, FieldContext>();\n private entityContextCache = new Map<Rule, EntityContext>();\n private removeButtonContextCache = new Map<Rule, RemoveButtonContext>();\n private buttonGroupContext!: ButtonGroupContext;\n\n constructor(\n private changeDetectorRef: ChangeDetectorRef\n ) {\n this.fields = [];\n this.filterFields = [];\n this.entities = [];\n }\n\n // ----------OnInit Implementation----------\n\n // ----------OnChanges Implementation----------\n\n ngOnChanges(changes: SimpleChanges) {\n const config = this.config;\n const type = typeof config;\n if (type === 'object') {\n this.fields = Object.keys(config.fields).map((value) => {\n const field = config.fields[value];\n field.value = field.value || value;\n return field;\n });\n if (config.entities) {\n this.entities = Object.keys(config.entities).map((value) => {\n const entity = config.entities ? config.entities[value]: [] as any;\n entity.value = entity.value || value;\n return entity;\n });\n } else {\n this.entities = [];\n }\n this.operatorsCache = {};\n } else {\n throw new Error(`Expected 'config' must be a valid object, got ${type} instead.`);\n }\n }\n\n // ----------Validator Implementation----------\n\n validate(control: AbstractControl): ValidationErrors | null {\n const errors: { [key: string]: any } = {};\n const ruleErrorStore = [] as any;\n let hasErrors = false;\n\n if (!this.config.allowEmptyRulesets && this.checkEmptyRuleInRuleset(this.data)) {\n errors.empty = 'Empty rulesets are not allowed.';\n hasErrors = true;\n }\n\n this.validateRulesInRuleset(this.data, ruleErrorStore);\n\n if (ruleErrorStore.length) {\n errors.rules = ruleErrorStore;\n hasErrors = true;\n }\n return hasErrors ? errors : null;\n }\n\n // ----------ControlValueAccessor Implementation----------\n\n @Input()\n get value(): RuleSet {\n return this.data;\n }\n set value(value: RuleSet) {\n // When component is initialized without a formControl, null is passed to value\n this.data = value || { condition: 'add', rules: [] };\n this.handleDataChange();\n }\n\n writeValue(obj: any): void {\n this.value = obj;\n }\n registerOnChange(fn: any): void {\n this.onChangeCallback = () => fn(this.data);\n }\n registerOnTouched(fn: any): void {\n this.onTouchedCallback = () => fn(this.data);\n }\n setDisabledState(isDisabled: boolean): void {\n this.disabled = isDisabled;\n this.changeDetectorRef.detectChanges();\n }\n\n // ----------END----------\n\n getDisabledState = (): boolean => {\n return this.disabled;\n }\n\n findTemplateForRule(rule: Rule): TemplateRef<any> | any {\n const type = this.getInputType(rule.field, rule.operator as string);\n if (type) {\n const queryInput = this.findQueryInput(type);\n if (queryInput) {\n return queryInput.template;\n } else {\n if (this.defaultTemplateTypes.indexOf(type) === -1) {\n console.warn(`Could not find template for field with type: ${type}`);\n }\n return null;\n }\n }\n }\n\n findQueryInput(type: string): QueryInputDirective {\n const templates = this.parentInputTemplates || this.inputTemplates;\n return templates.find((item) => item.queryInputType === type) as QueryInputDirective;\n }\n\n getOperators(field: string): string[] {\n if (this.operatorsCache[field]) {\n return this.operatorsCache[field];\n }\n let operators = this.defaultEmptyList;\n const fieldObject = this.config.fields[field];\n\n if (this.config.getOperators) {\n return this.config.getOperators(field, fieldObject);\n }\n\n const type = fieldObject.type;\n\n if (fieldObject && fieldObject.operators) {\n operators = fieldObject.operators;\n } else if (type) {\n operators = (this.operatorMap && this.operatorMap[type]) || this.defaultOperatorMap[type] || this.defaultEmptyList;\n if (operators.length === 0) {\n console.warn(\n `No operators found for field '${field}' with type ${fieldObject.type}. ` +\n `Please define an 'operators' property on the field or use the 'operatorMap' binding to fix this.`);\n }\n if (fieldObject.nullable) {\n operators = operators.concat(['is null', 'is not null']);\n }\n } else {\n console.warn(`No 'type' property found on field: '${field}'`);\n }\n\n // Cache reference to array object, so it won't be computed next time and trigger a rerender.\n this.operatorsCache[field] = operators;\n return operators;\n }\n\n getFields(entity: string): Field[] {\n if (this.entities.length && entity) {\n return this.fields.filter((field) => {\n return field && field.entity === entity;\n });\n } else {\n return this.fields;\n }\n }\n\n getInputType(field: string, operator: string): string | null {\n if (this.config.getInputType) {\n return this.config.getInputType(field, operator);\n }\n\n if (!this.config.fields[field]) {\n throw new Error(`No configuration for field '${field}' could be found! Please add it to config.fields.`);\n }\n\n const type = this.config.fields[field].type;\n switch (operator) {\n case 'is null':\n case 'is not null':\n return null; // No displayed component\n case 'in':\n case 'not in':\n return type === 'category' || type === 'boolean' ? 'multiselect' : type;\n default:\n return type;\n }\n }\n\n getOptions(field: string): Option[] {\n if (this.config.getOptions) {\n return this.config.getOptions(field);\n }\n return this.config.fields[field].options || this.defaultEmptyList;\n }\n\n getClassNames(...args: string[]): any | string[] {\n const clsLookup = this.classNames ? this.classNames : this.defaultClassNames as any;\n const defaultClassNames = this.defaultClassNames as any;\n const classNames = args.map((id: any) => clsLookup[id] || defaultClassNames[id]).filter((c: any) => !!c);\n return classNames.length ? classNames.join(' ') : [];\n }\n\n getDefaultField(entity: Entity): Field | null {\n if (!entity) {\n return null;\n } else if (entity.defaultField !== undefined) {\n return this.getDefaultValue(entity.defaultField);\n } else {\n const entityFields = this.fields.filter((field) => {\n return field && field.entity === entity.value;\n });\n if (entityFields && entityFields.length) {\n return entityFields[0];\n } else {\n console.warn(`No fields found for entity '${entity.name}'. ` +\n `A 'defaultOperator' is also not specified on the field config. Operator value will default to null.`);\n return null;\n }\n }\n }\n\n getDefaultOperator(field: Field): string | null {\n if (field && field.defaultOperator !== undefined) {\n return this.getDefaultValue(field.defaultOperator);\n } else {\n const operators = this.getOperators(field.value as string);\n if (operators && operators.length) {\n return operators[0];\n } else {\n console.warn(`No operators found for field '${field.value}'. ` +\n `A 'defaultOperator' is also not specified on the field config. Operator value will default to null.`);\n return null;\n }\n }\n }\n\n addRule(parent?: RuleSet): void {\n if (this.disabled) {\n return;\n }\n\n parent = parent || this.data;\n if (this.config.addRule) {\n this.config.addRule(parent);\n } else {\n const field = this.fields[0];\n parent.rules = parent.rules.concat([{\n field: field.value as string,\n operator: this.getDefaultOperator(field) as string,\n value: this.getDefaultValue(field.defaultValue),\n entity: field.entity\n }]);\n }\n\n this.handleTouched();\n this.handleDataChange();\n }\n\n removeRule(rule: Rule, parent?: RuleSet): void {\n if (this.disabled) {\n return;\n }\n\n parent = parent || this.data;\n if (this.config.removeRule) {\n this.config.removeRule(rule, parent);\n } else {\n parent.rules = parent.rules.filter((r) => r !== rule);\n }\n this.inputContextCache.delete(rule);\n this.operatorContextCache.delete(rule);\n this.fieldContextCache.delete(rule);\n this.entityContextCache.delete(rule);\n this.removeButtonContextCache.delete(rule);\n\n this.handleTouched();\n this.handleDataChange();\n }\n\n addRuleSet(parent?: RuleSet): void {\n if (this.disabled) {\n return;\n }\n\n parent = parent || this.data;\n if (this.config.addRuleSet) {\n this.config.addRuleSet(parent);\n } else {\n parent.rules = parent.rules.concat([{ condition: 'add', rules: [] }]);\n }\n\n this.handleTouched();\n this.handleDataChange();\n }\n\n removeRuleSet(ruleset?: RuleSet, parent?: RuleSet): void {\n if (this.disabled) {\n return;\n }\n\n ruleset = ruleset || this.data;\n parent = parent || this.parentValue;\n if (this.config.removeRuleSet) {\n this.config.removeRuleSet(ruleset, parent);\n } else {\n parent.rules = parent.rules.filter((r) => r !== ruleset);\n }\n\n this.handleTouched();\n this.handleDataChange();\n }\n\n transitionEnd(e: Event): void {\n this.treeContainer.nativeElement.style.maxHeight = null;\n }\n\n toggleCollapse(): void {\n this.computedTreeContainerHeight();\n setTimeout(() => {\n this.data.collapsed = !this.data.collapsed;\n }, 100);\n }\n\n computedTreeContainerHeight(): void {\n const nativeElement: HTMLElement = this.treeContainer.nativeElement;\n if (nativeElement && nativeElement.firstElementChild) {\n nativeElement.style.maxHeight = (nativeElement.firstElementChild.clientHeight + 8) + 'px';\n }\n }\n\n changeCondition(value: string): void {\n if (this.disabled) {\n return;\n }\n\n this.data.condition = value;\n this.handleTouched();\n this.handleDataChange();\n }\n\n changeOperator(rule: Rule): void {\n if (this.disabled) {\n return;\n }\n\n if (this.config.coerceValueForOperator) {\n rule.value = this.config.coerceValueForOperator(rule.operator as string, rule.value, rule);\n } else {\n rule.value = this.coerceValueForOperator(rule.operator as string, rule.value, rule);\n }\n\n this.handleTouched();\n this.handleDataChange();\n }\n\n coerceValueForOperator(operator: string, value: any, rule: Rule): any {\n const inputType: string | null = this.getInputType(rule.field, operator);\n if (inputType === 'multiselect' && !Array.isArray(value)) {\n return [value];\n }\n return value;\n }\n\n changeInput(): void {\n if (this.disabled) {\n return;\n }\n\n this.handleTouched();\n this.handleDataChange();\n }\n\n changeField(fieldValue: string, rule: Rule): void {\n if (this.disabled) {\n return;\n }\n\n const inputContext = this.inputContextCache.get(rule);\n const currentField = inputContext && inputContext.field;\n\n const nextField: Field = this.config.fields[fieldValue];\n\n const nextValue = this.calculateFieldChangeValue(\n currentField as Field, nextField, rule.value);\n\n if (nextValue !== undefined) {\n rule.value = nextValue;\n } else {\n delete rule.value;\n }\n\n rule.operator = this.getDefaultOperator(nextField) as string;\n\n // Create new context objects so templates will automatically update\n this.inputContextCache.delete(rule);\n this.operatorContextCache.delete(rule);\n this.fieldContextCache.delete(rule);\n this.entityContextCache.delete(rule);\n this.getInputContext(rule);\n this.getFieldContext(rule);\n this.getOperatorContext(rule);\n this.getEntityContext(rule);\n\n this.handleTouched();\n this.handleDataChange();\n }\n\n changeEntity(entityValue: string, rule: Rule, index: number, data: RuleSet): void {\n if (this.disabled) {\n return;\n }\n let i = index;\n let rs = data;\n const entity: Entity = this.entities.find((e) => e.value === entityValue) as Entity;\n const defaultField: Field = this.getDefaultField(entity) as Field;\n if (!rs) {\n rs = this.data;\n i = rs.rules.findIndex((x) => x === rule);\n }\n rule.field = defaultField.value as string;\n rs.rules[i] = rule;\n if (defaultField) {\n this.changeField(defaultField.value as string, rule);\n } else {\n this.handleTouched();\n this.handleDataChange();\n }\n }\n\n getDefaultValue(defaultValue: any): any {\n switch (typeof defaultValue) {\n case 'function':\n return defaultValue();\n default:\n return defaultValue;\n }\n }\n\n getOperatorTemplate(): TemplateRef<any> | null {\n const t = this.parentOperatorTemplate || this.operatorTemplate;\n return t ? t.template : null;\n }\n\n getFieldTemplate(): TemplateRef<any> | null {\n const t = this.parentFieldTemplate || this.fieldTemplate;\n return t ? t.template : null;\n }\n\n getEntityTemplate(): TemplateRef<any> | null {\n const t = this.parentEntityTemplate || this.entityTemplate;\n return t ? t.template : null;\n }\n\n getArrowIconTemplate(): TemplateRef<any> | null {\n const t = this.parentArrowIconTemplate || this.arrowIconTemplate;\n return t ? t.template : null;\n }\n\n getButtonGroupTemplate(): TemplateRef<any> | null {\n const t = this.parentButtonGroupTemplate || this.buttonGroupTemplate;\n return t ? t.template : null;\n }\n\n getSwitchGroupTemplate(): TemplateRef<any> | null {\n const t = this.parentSwitchGroupTemplate || this.switchGroupTemplate;\n return t ? t.template : null;\n }\n\n getRemoveButtonTemplate(): TemplateRef<any> | null {\n const t = this.parentRemoveButtonTemplate || this.removeButtonTemplate;\n return t ? t.template : null;\n }\n\n getEmptyWarningTemplate(): TemplateRef<any> | null {\n const t = this.parentEmptyWarningTemplate || this.emptyWarningTemplate;\n return t ? t.template : null;\n }\n\n getQueryItemClassName(local: LocalRuleMeta): string {\n let cls = this.getClassNames('row', 'connector', 'transition');\n cls += ' ' + this.getClassNames(local.ruleset ? 'ruleSet' : 'rule');\n if (local.invalid) {\n cls += ' ' + this.getClassNames('invalidRuleSet');\n }\n return cls as string;\n }\n\n getButtonGroupContext(): ButtonGroupContext {\n if (!this.buttonGroupContext) {\n this.buttonGroupContext = {\n addRule: this.addRule.bind(this),\n addRuleSet: this.allowRuleset && this.addRuleSet.bind(this) as any,\n removeRuleSet: this.allowRuleset && this.parentValue && this.removeRuleSet.bind(this) as any,\n getDisabledState: this.getDisabledState,\n $implicit: this.data\n };\n }\n return this.buttonGroupContext;\n }\n\n getRemoveButtonContext(rule: Rule): RemoveButtonContext {\n if (!this.removeButtonContextCache.has(rule)) {\n this.removeButtonContextCache.set(rule, {\n removeRule: this.removeRule.bind(this),\n getDisabledState: this.getDisabledState,\n $implicit: rule\n });\n }\n return this.removeButtonContextCache.get(rule) as RemoveButtonContext;\n }\n\n getFieldContext(rule: Rule): FieldContext {\n if (!this.fieldContextCache.has(rule)) {\n this.fieldContextCache.set(rule, {\n onChange: this.changeField.bind(this),\n getFields: this.getFields.bind(this),\n getDisabledState: this.getDisabledState,\n fields: this.fields,\n $implicit: rule\n });\n }\n return this.fieldContextCache.get(rule) as FieldContext;\n }\n\n getEntityContext(rule: Rule): EntityContext {\n if (!this.entityContextCache.has(rule)) {\n this.entityContextCache.set(rule, {\n onChange: this.changeEntity.bind(this) as any,\n getDisabledState: this.getDisabledState,\n entities: this.entities,\n $implicit: rule\n });\n }\n return this.entityContextCache.get(rule) as EntityContext;\n }\n\n getSwitchGroupContext(): SwitchGroupContext {\n return {\n onChange: this.changeCondition.bind(this),\n getDisabledState: this.getDisabledState,\n $implicit: this.data\n };\n }\n\n getArrowIconContext(): ArrowIconContext {\n return {\n getDisabledState: this.getDisabledState,\n $implicit: this.data\n };\n }\n\n getEmptyWarningContext(): EmptyWarningContext {\n return {\n getDisabledState: this.getDisabledState,\n message: this.emptyMessage,\n $implicit: this.data\n };\n }\n\n getOperatorContext(rule: Rule): OperatorContext {\n if (!this.operatorContextCache.has(rule)) {\n this.operatorContextCache.set(rule, {\n onChange: this.changeOperator.bind(this) as any,\n getDisabledState: this.getDisabledState,\n operators: this.getOperators(rule.field),\n $implicit: rule\n });\n }\n return this.operatorContextCache.get(rule) as OperatorContext;\n }\n\n getInputContext(rule: Rule): InputContext {\n if (!this.inputContextCache.has(rule)) {\n this.inputContextCache.set(rule, {\n onChange: this.changeInput.bind(this),\n getDisabledState: this.getDisabledState,\n options: this.getOptions(rule.field),\n field: this.config.fields[rule.field],\n $implicit: rule\n });\n }\n return this.inputContextCache.get(rule) as InputContext;\n }\n\n private calculateFieldChangeValue(\n currentField: Field,\n nextField: Field,\n currentValue: any\n ): any {\n\n if (this.config.calculateFieldChangeValue != null) {\n return this.config.calculateFieldChangeValue(\n currentField, nextField, currentValue);\n }\n\n const canKeepValue = () => {\n if (currentField == null || nextField == null) {\n return false;\n }\n return currentField.type === nextField.type\n && this.defaultPersistValueTypes.indexOf(currentField.type) !== -1;\n };\n\n if (this.persistValueOnFieldChange && canKeepValue()) {\n return currentValue;\n }\n\n if (nextField && nextField.defaultValue !== undefined) {\n return this.getDefaultValue(nextField.defaultValue);\n }\n\n return undefined;\n }\n\n private checkEmptyRuleInRuleset(ruleset: RuleSet): boolean {\n if (!ruleset || !ruleset.rules || ruleset.rules.length === 0) {\n return true;\n } else {\n return ruleset.rules.some((item: RuleSet | any) => {\n if (item.rules) {\n return this.checkEmptyRuleInRuleset(item);\n } else {\n return false;\n }\n });\n }\n }\n\n private validateRulesInRuleset(ruleset: RuleSet, errorStore: any[]) {\n if (ruleset && ruleset.rules && ruleset.rules.length > 0) {\n ruleset.rules.forEach((item) => {\n if ((item as RuleSet).rules) {\n return this.validateRulesInRuleset(item as RuleSet, errorStore);\n } else if ((item as Rule).field) {\n const field = this.config.fields[(item as Rule).field];\n if (field && field.validator && field.validator.apply) {\n const error = field.validator(item as Rule, ruleset);\n if (error != null) {\n errorStore.push(error);\n }\n }\n }\n });\n }\n }\n\n private handleDataChange(): void {\n this.changeDetectorRef.markForCheck();\n if (this.onChangeCallback) {\n this.onChangeCallback();\n }\n if (this.parentChangeCallback) {\n this.parentChangeCallback();\n }\n }\n\n private handleTouched(): void {\n if (this.onTouchedCallback) {\n this.onTouchedCallback();\n }\n if (this.parentTouchedCallback) {\n this.parentTouchedCallback();\n }\n }\n}\n","<div [ngClass]=\"getClassNames('switchRow')\">\n <ng-template #defaultArrowIcon>\n <i [ngClass]=\"getClassNames('arrowIcon')\"></i>\n </ng-template>\n\n <a *ngIf=\"allowCollapse\" (click)=\"toggleCollapse()\" [ngClass]=\"getClassNames('arrowIconButton', data.collapsed ? 'collapsed' : '')\">\n <ng-container *ngIf=\"getArrowIconTemplate() as template; else defaultArrowIcon\">\n <ng-container *ngTemplateOutlet=\"template; context: getArrowIconContext()\"></ng-container>\n </ng-container>\n </a>\n\n <ng-container *ngIf=\"getButtonGroupTemplate() as template; else defaultButtonGroup\">\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <ng-container *ngTemplateOutlet=\"template; context: getButtonGroupContext()\"></ng-container>\n </div>\n </ng-container>\n\n <ng-template #defaultButtonGroup>\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <button type=\"button\" (click)=\"addRule()\" [ngClass]=\"getClassNames('button')\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('addIcon')\"></i> Rule\n </button>\n <button type=\"button\" (click)=\"addRuleSet()\" [ngClass]=\"getClassNames('button')\" *ngIf=\"allowRuleset\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('addIcon')\"></i> Ruleset\n </button>\n <ng-container *ngIf=\"!!parentValue && allowRuleset\">\n <button type=\"button\" (click)=\"removeRuleSet()\" [ngClass]=\"getClassNames('button', 'removeButton')\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('removeIcon')\"></i>\n </button>\n </ng-container>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getSwitchGroupTemplate() as template; else defaultSwitchGroup\">\n <ng-container *ngTemplateOutlet=\"template; context: getSwitchGroupContext()\"></ng-container>\n </ng-container>\n\n <ng-template #defaultSwitchGroup>\n <div [ngClass]=\"getClassNames('switchGroup', 'transition')\" *ngIf=\"data\">\n <div [ngClass]=\"getClassNames('switchControl')\">\n <input type=\"radio\" [ngClass]=\"getClassNames('switchRadio')\" [(ngModel)]=\"data.condition\" [disabled]=disabled\n value=\"and\" #andOption />\n <label (click)=\"changeCondition(andOption.value)\" [ngClass]=\"getClassNames('switchLabel')\">AND</label>\n </div>\n <div [ngClass]=\"getClassNames('switchControl')\">\n <input type=\"radio\" [ngClass]=\"getClassNames('switchRadio')\" [(ngModel)]=\"data.condition\" [disabled]=disabled\n value=\"or\" #orOption />\n <label (click)=\"changeCondition(orOption.value)\" [ngClass]=\"getClassNames('switchLabel')\">OR</label>\n </div>\n </div>\n </ng-template>\n</div>\n\n<div #treeContainer (transitionend)=\"transitionEnd($event)\" [ngClass]=\"getClassNames('treeContainer', data.collapsed ? 'collapsed' : '')\">\n <ul [ngClass]=\"getClassNames('tree')\" *ngIf=\"data && data.rules\">\n <ng-container *ngFor=\"let rule of data.rules;let i=index\">\n\n <ng-container *ngIf=\"{ruleset: !!rule.rules, invalid: !config.allowEmptyRulesets && rule.rules && rule.rules.length === 0} as local\">\n <li [ngClass]=\"getQueryItemClassName(local)\">\n <ng-container *ngIf=\"!local.ruleset\">\n\n <ng-container *ngIf=\"getRemoveButtonTemplate() as template; else defaultRemoveButton\">\n <div [ngClass]=\"getClassNames('buttonGroup', 'rightAlign')\">\n <ng-container *ngTemplateOutlet=\"template; context: getRemoveButtonContext(rule)\"></ng-container>\n </div>\n </ng-container>\n\n <ng-template #defaultRemoveButton>\n <div [ngClass]=\"getClassNames('removeButtonSize', 'rightAlign')\">\n <button type=\"button\" [ngClass]=\"getClassNames('button', 'removeButton')\" (click)=\"removeRule(rule, data)\" [disabled]=disabled>\n <i [ngClass]=\"getClassNames('removeIcon')\"></i>\n </button>\n </div>\n </ng-template>\n\n <div *ngIf=\"entities?.length\" class=\"q-inline-block-display\">\n <ng-container *ngIf=\"getEntityTemplate() as template; else defaultEntity\">\n <ng-container *ngTemplateOutlet=\"template; context: getEntityContext(rule)\"></ng-container>\n </ng-container>\n </div>\n\n <ng-template #defaultEntity>\n <div [ngClass]=\"getClassNames('entityControlSize')\">\n <select [ngClass]=\"getClassNames('entityControl')\" [(ngModel)]=\"rule.entity\" (ngModelChange)=\"changeEntity($event, rule,i,data)\"\n [disabled]=\"disabled\">\n <option *ngFor=\"let entity of entities\" [ngValue]=\"entity.value\">\n {{entity.name}}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getFieldTemplate() as template; else defaultField\">\n <ng-container *ngTemplateOutlet=\"template; context: getFieldContext(rule)\"></ng-container>\n </ng-container>\n\n <ng-template #defaultField>\n <div [ngClass]=\"getClassNames('fieldControlSize')\">\n <select [ngClass]=\"getClassNames('fieldControl')\" [(ngModel)]=\"rule.field\" (ngModelChange)=\"changeField($event, rule)\"\n [disabled]=\"disabled\">\n <option *ngFor=\"let field of getFields(rule.entity)\" [ngValue]=\"field.value\">\n {{field.name}}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"getOperatorTemplate() as template; else defaultOperator\">\n <ng-container *ngTemplateOutlet=\"template; context: getOperatorContext(rule)\"></ng-container>\n </ng-container>\n\n <ng-template #defaultOperator>\n <div [ngClass]=\"getClassNames('operatorControlSize')\">\n <select [ngClass]=\"getClassNames('operatorControl')\" [(ngModel)]=\"rule.operator\" (ngModelChange)=\"changeOperator(rule)\"\n [disabled]=\"disabled\">\n <option *ngFor=\"let operator of getOperators(rule.field)\" [ngValue]=\"operator\">\n {{operator}}\n </option>\n </select>\n </div>\n </ng-template>\n\n <ng-container *ngIf=\"findTemplateForRule(rule) as template; else defaultInput\">\n <ng-container *ngTemplateOutlet=\"template; context: getInputContext(rule)\"></ng-container>\n </ng-container>\n\n <ng-template #defaultInput>\n <div [ngClass]=\"getClassNames('inputControlSize')\" [ngSwitch]=\"getInputType(rule.field, rule.operator)\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'string'\" type=\"text\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'number'\" type=\"number\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'date'\" type=\"date\">\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'time'\" type=\"time\">\n <select [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'category'\">\n <option *ngFor=\"let opt of getOptions(rule.field)\" [ngValue]=\"opt.value\">\n {{opt.name}}\n </option>\n </select>\n <ng-container *ngSwitchCase=\"'multiselect'\">\n <select [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" multiple>\n <option *ngFor=\"let opt of getOptions(rule.field)\" [ngValue]=\"opt.value\">\n {{opt.name}}\n </option>\n </select>\n </ng-container>\n <input [ngClass]=\"getClassNames('inputControl')\" [(ngModel)]=\"rule.value\" (ngModelChange)=\"changeInput()\"\n [disabled]=\"disabled\" *ngSwitchCase=\"'boolean'\" type=\"checkbox\">\n </div>\n </ng-template>\n\n </ng-container>\n <query-builder *ngIf=\"local.ruleset\" [data]=\"rule\" [disabled]=\"disabled\" [parentTouchedCallback]=\"parentTouchedCallback || onTouchedCallback\"\n [parentChangeCallback]=\"parentChangeCallback || onChangeCallback\" [parentInputTemplates]=\"parentInputTemplates || inputTemplates\"\n [parentOperatorTemplate]=\"parentOperatorTemplate || operatorTemplate\" [parentFieldTemplate]=\"parentFieldTemplate || fieldTemplate\"\n [parentEntityTemplate]=\"parentEntityTemplate || entityTemplate\" [parentSwitchGroupTemplate]=\"parentSwitchGroupTemplate || switchGroupTemplate\"\n [parentButtonGroupTemplate]=\"parentButtonGroupTemplate || buttonGroupTemplate\" [parentRemoveButtonTemplate]=\"parentRemoveButtonTemplate || removeButtonTemplate\"\n [parentEmptyWarningTemplate]=\"parentEmptyWarningTemplate || emptyWarningTemplate\" [parentArrowIconTemplate]=\"parentArrowIconTemplate || arrowIconTemplate\"\n [parentValue]=\"data\" [classNames]=\"classNames\" [config]=\"config\" [allowRuleset]=\"allowRuleset\"\n [allowCollapse]=\"allowCollapse\" [emptyMessage]=\"emptyMessage\" [operatorMap]=\"operatorMap\">\n </query-builder>\n\n <ng-container *ngIf=\"getEmptyWarningTemplate() as template; else defaultEmptyWarning\">\n <ng-container *ngIf=\"local.invalid\">\n <ng-container *ngTemplateOutlet=\"template; context: getEmptyWarningContext()\"></ng-container>\n </ng-container>\n </ng-container>\n\n <ng-template #defaultEmptyWarning>\n <p [ngClass]=\"getClassNames('emptyWarning')\" *ngIf=\"local.invalid\">\n {{emptyMessage}}\n </p>\n </ng-template>\n </li>\n </ng-container>\n </ng-container>\n </ul>\n</div>\n","import { NgModule } from '@angular/core';\nimport { CommonModule } from '@angular/common';\nimport { FormsModule, } from '@angular/forms';\n\nimport { QueryBuilderComponent } from './query-builder/query-builder.component';\n\nimport { QueryArrowIconDirective } from './query-builder/query-arrow-icon.directive';\nimport { QueryFieldDirective } from './query-builder/query-field.directive';\nimport { QueryInputDirective } from './query-builder/query-input.directive';\nimport { QueryEntityDirective } from './query-builder/query-entity.directive';\nimport { QueryOperatorDirective } from './query-builder/query-operator.directive';\nimport { QueryButtonGroupDirective } from './query-builder/query-button-group.directive';\nimport { QuerySwitchGroupDirective } from './query-builder/query-switch-group.directive';\nimport { QueryRemoveButtonDirective } from './query-builder/query-remove-button.directive';\nimport { QueryEmptyWarningDirective } from './query-builder/query-empty-warning.directive';\n\n@NgModule({\n imports: [\n CommonModule,\n FormsModule\n ],\n declarations: [\n QueryBuilderComponent,\n QueryInputDirective,\n QueryOperatorDirective,\n QueryFieldDirective,\n QueryEntityDirective,\n QueryButtonGroupDirective,\n QuerySwitchGroupDirective,\n QueryRemoveButtonDirective,\n QueryEmptyWarningDirective,\n QueryArrowIconDirective\n ],\n exports: [\n QueryBuilderComponent,\n QueryInputDirective,\n QueryOperatorDirective,\n QueryFieldDirective,\n QueryEntityDirective,\n QueryButtonGroupDirective,\n QuerySwitchGroupDirective,\n QueryRemoveButtonDirective,\n QueryEmptyWarningDirective,\n QueryArrowIconDirective\n ]\n})\nexport class NgxAngularQueryBuilderModule { }\n","/*\n * Public API Surface of ngx-angular-query-builder\n */\n\nexport * from './lib/query-builder/query-builder.interfaces';\n\nexport * from './lib/query-builder/query-builder.component';\n\nexport * from './lib/query-builder/query-button-group.directive';\nexport * from './lib/query-builder/query-entity.directive';\nexport * from './lib/query-builder/query-field.directive';\nexport * from './lib/query-builder/query-input.directive';\nexport * from './lib/query-builder/query-operator.directive';\nexport * from './lib/query-builder/query-switch-group.directive';\nexport * from './lib/query-builder/query-remove-button.directive';\nexport * from './lib/query-builder/query-empty-warning.directive';\nexport * from './lib/query-builder/query-arrow-icon.directive';\n\nexport * from './lib/ngx-angular-query-builder.module';\n","/**\n * Generated bundle index. Do not edit.\n */\n\nexport * from './public-api';\n"],"names":["Directive","Input","NG_VALUE_ACCESSOR","forwardRef","NG_VALIDATORS","Component","HostBinding","ViewChild","ContentChild","ContentChildren","CommonModule","FormsModule","NgModule"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAIE,gCAAmB,QAA0B;YAA1B,aAAQ,GAAR,QAAQ,CAAkB;SAAI;;;8IADtC,sBAAsB;uHAAtB,sBAAsB;sHAAtB,sBAAsB;sBADlCA,YAAS;uBAAC,EAAC,QAAQ,EAAE,iBAAiB,EAAC;;;;QCEtC,6BAAmB,QAA0B;YAA1B,aAAQ,GAAR,QAAQ,CAAkB;SAAI;;;2IADtC,mBAAmB;oHAAnB,mBAAmB;sHAAnB,mBAAmB;sBAD/BA,YAAS;uBAAC,EAAC,QAAQ,EAAE,cAAc,EAAC;;;;QCEnC,8BAAmB,QAA0B;YAA1B,aAAQ,GAAR,QAAQ,CAAkB;SAAI;;;4IADtC,oBAAoB;qHAApB,oBAAoB;sHAApB,oBAAoB;sBADhCA,YAAS;uBAAC,EAAC,QAAQ,EAAE,eAAe,EAAC;;;;QCEpC,mCAAmB,QAA0B;YAA1B,aAAQ,GAAR,QAAQ,CAAkB;SAAI;;;iJADtC,yBAAyB;0HAAzB,yBAAyB;sHAAzB,yBAAyB;sBADrCA,YAAS;uBAAC,EAAC,QAAQ,EAAE,oBAAoB,EAAC;;;;QCEzC,mCAAmB,QAA0B;YAA1B,aAAQ,GAAR,QAAQ,CAAkB;SAAI;;;iJADtC,yBAAyB;0HAAzB,yBAAyB;sHAAzB,yBAAyB;sBADrCA,YAAS;uBAAC,EAAC,QAAQ,EAAE,oBAAoB,EAAC;;;;QCazC,6BAAmB,QAA0B;YAA1B,aAAQ,GAAR,QAAQ,CAA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