mmhglobal-dynamicform 2.9.0 → 2.9.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 +8 -1
- package/esm2020/lib/sfquerybuilder/sfquerybuilder.component.mjs +30 -3
- package/fesm2015/mmhglobal-dynamicform.mjs +29 -2
- package/fesm2015/mmhglobal-dynamicform.mjs.map +1 -1
- package/fesm2020/mmhglobal-dynamicform.mjs +29 -2
- package/fesm2020/mmhglobal-dynamicform.mjs.map +1 -1
- package/lib/sfquerybuilder/sfquerybuilder.component.d.ts +1 -0
- package/package.json +1 -1
|
@@ -87,6 +87,7 @@ import * as i3$8 from '@progress/kendo-angular-toolbar';
|
|
|
87
87
|
import { MultiSelect, DropDownList } from '@syncfusion/ej2-dropdowns';
|
|
88
88
|
import { createElement, getComponent } from '@syncfusion/ej2-base';
|
|
89
89
|
import { CheckBox } from '@syncfusion/ej2-buttons';
|
|
90
|
+
import { Query } from '@syncfusion/ej2-data';
|
|
90
91
|
|
|
91
92
|
/********** Angular **********/
|
|
92
93
|
class ZComponentService {
|
|
@@ -13140,21 +13141,47 @@ class SfquerybuilderComponent {
|
|
|
13140
13141
|
mode: 'CheckBox',
|
|
13141
13142
|
change: (e) => {
|
|
13142
13143
|
this.qryBldrObj.notifyChange(e.value, e.element);
|
|
13144
|
+
},
|
|
13145
|
+
// set contains search by default
|
|
13146
|
+
filtering: (e) => {
|
|
13147
|
+
this.onFiltering(e, optionList);
|
|
13143
13148
|
}
|
|
13144
13149
|
});
|
|
13145
13150
|
}
|
|
13146
13151
|
else {
|
|
13147
13152
|
return new DropDownList({
|
|
13153
|
+
allowFiltering: true,
|
|
13148
13154
|
dataSource: optionList,
|
|
13149
13155
|
fields: { text: 'text', value: 'value' },
|
|
13150
13156
|
value: args.values,
|
|
13151
13157
|
change: (e) => {
|
|
13152
13158
|
e.value !== null ? this.qryBldrObj.notifyChange(e.itemData.value, e.element) : ignoreElements;
|
|
13159
|
+
},
|
|
13160
|
+
// set default search by 'contains'
|
|
13161
|
+
filtering: (e) => {
|
|
13162
|
+
this.onFiltering(e, optionList);
|
|
13153
13163
|
}
|
|
13154
13164
|
});
|
|
13155
13165
|
}
|
|
13156
13166
|
}
|
|
13157
13167
|
//#endregion
|
|
13168
|
+
onFiltering(e, optionList) {
|
|
13169
|
+
// load overall data when search key empty.
|
|
13170
|
+
if (e.text === '') {
|
|
13171
|
+
e.updateData(this.data);
|
|
13172
|
+
}
|
|
13173
|
+
else {
|
|
13174
|
+
// Define array data
|
|
13175
|
+
let searchData = optionList;
|
|
13176
|
+
//Bind the filter event
|
|
13177
|
+
let query = new Query();
|
|
13178
|
+
//frame the query based on search string with filter type.
|
|
13179
|
+
query = (e.text != "") ? query.where("text", "contains", e.text, true) : query;
|
|
13180
|
+
//pass the filter data source, filter query to updateData method.
|
|
13181
|
+
e.updateData(searchData, query);
|
|
13182
|
+
}
|
|
13183
|
+
}
|
|
13184
|
+
;
|
|
13158
13185
|
setQueryValue(savedData) {
|
|
13159
13186
|
//if (!this.qryBldrObj) {
|
|
13160
13187
|
// console.warn('query builder object is null.');
|
|
@@ -13188,10 +13215,10 @@ class SfquerybuilderComponent {
|
|
|
13188
13215
|
}
|
|
13189
13216
|
}
|
|
13190
13217
|
SfquerybuilderComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SfquerybuilderComponent, deps: [{ token: i2.FieldService }, { token: i2.ResourceApiService }, { token: i2.WebApiService }], target: i0.ɵɵFactoryTarget.Component });
|
|
13191
|
-
SfquerybuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SfquerybuilderComponent, selector: "app-sfquerybuilder", inputs: { data: "data", group: "group", form: "form" }, viewQueries: [{ propertyName: "qryBldrObj", first: true, predicate: ["querybuilder"], descendants: true }], ngImport: i0, template: "<ion-item *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)\">\r\n <div class=\"qbcontainer\">\r\n <ejs-querybuilder *ngIf=\"issfLoaded\"\r\n #querybuilder\r\n width=\"100%\"\r\n [dataSource]=\"sfData\"\r\n [columns]=\"sdFilter\"\r\n [rule]=\"importRules\"\r\n (ruleChange)=\"updateRule($event)\"\r\n (created)=\"onChange()\">\r\n </ejs-querybuilder>\r\n\r\n <div>\r\n <br>\r\n <ion-label>Result</ion-label>\r\n <textarea class=\"output\"\r\n resizable=\"none\"\r\n [rows]=\"10\"\r\n style=\"border: 1px solid #d3d3d3; width: 100%;\">{{displayRule}}</textarea>\r\n </div>\r\n </div>\r\n</ion-item>\r\n", styles: [".qbcontainer{border-radius:5px;border:1px solid rgba(0,0,0,.08);padding:10px;margin:10px 0;width:100%}#querybuilder .e-slider-container.e-control-wrapper{height:0}ejs-querybuilder{display:block}.e-query-builder{margin:0 auto;display:block}.highcontrast textarea#ruleContent{background-color:#000}\n"], components: [{ type: i2$1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { type: i3$b.QueryBuilderComponent, selector: "ejs-querybuilder", inputs: ["allowValidation", "columns", "cssClass", "dataSource", "displayMode", "enableNotCondition", "enablePersistence", "enableRtl", "fieldMode", "fieldModel", "headerTemplate", "height", "immediateModeDelay", "locale", "matchCase", "maxGroupCount", "operatorModel", "readonly", "rule", "separator", "showButtons", "sortDirection", "summaryView", "valueModel", "width"], outputs: ["actionBegin", "beforeChange", "change", "created", "dataBound", "ruleChange"] }, { type: i2$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }], directives: [{ type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
13218
|
+
SfquerybuilderComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "13.4.0", type: SfquerybuilderComponent, selector: "app-sfquerybuilder", inputs: { data: "data", group: "group", form: "form" }, viewQueries: [{ propertyName: "qryBldrObj", first: true, predicate: ["querybuilder"], descendants: true }], ngImport: i0, template: "<ion-item *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)\">\r\n <div class=\"qbcontainer\">\r\n <ejs-querybuilder *ngIf=\"issfLoaded\"\r\n #querybuilder\r\n width=\"100%\"\r\n [dataSource]=\"sfData\"\r\n [columns]=\"sdFilter\"\r\n [rule]=\"importRules\"\r\n (ruleChange)=\"updateRule($event)\"\r\n (created)=\"onChange()\">\r\n </ejs-querybuilder>\r\n\r\n <div *ngIf=\"!data.HideShowResultPanel\">\r\n <br>\r\n <ion-label>Result</ion-label>\r\n <textarea class=\"output\"\r\n resizable=\"none\"\r\n [rows]=\"10\"\r\n style=\"border: 1px solid #d3d3d3; width: 100%;\">{{displayRule}}</textarea>\r\n </div>\r\n </div>\r\n</ion-item>\r\n", styles: [".qbcontainer{border-radius:5px;border:1px solid rgba(0,0,0,.08);padding:10px;margin:10px 0;width:100%}#querybuilder .e-slider-container.e-control-wrapper{height:0}ejs-querybuilder{display:block}.e-query-builder{margin:0 auto;display:block}.highcontrast textarea#ruleContent{background-color:#000}\n"], components: [{ type: i2$1.IonItem, selector: "ion-item", inputs: ["button", "color", "counter", "counterFormatter", "detail", "detailIcon", "disabled", "download", "fill", "href", "lines", "mode", "rel", "routerAnimation", "routerDirection", "shape", "target", "type"] }, { type: i3$b.QueryBuilderComponent, selector: "ejs-querybuilder", inputs: ["allowValidation", "columns", "cssClass", "dataSource", "displayMode", "enableNotCondition", "enablePersistence", "enableRtl", "fieldMode", "fieldModel", "headerTemplate", "height", "immediateModeDelay", "locale", "matchCase", "maxGroupCount", "operatorModel", "readonly", "rule", "separator", "showButtons", "sortDirection", "summaryView", "valueModel", "width"], outputs: ["actionBegin", "beforeChange", "change", "created", "dataBound", "ruleChange"] }, { type: i2$1.IonLabel, selector: "ion-label", inputs: ["color", "mode", "position"] }], directives: [{ type: i5$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] });
|
|
13192
13219
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: SfquerybuilderComponent, decorators: [{
|
|
13193
13220
|
type: Component,
|
|
13194
|
-
args: [{ selector: 'app-sfquerybuilder', template: "<ion-item *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)\">\r\n <div class=\"qbcontainer\">\r\n <ejs-querybuilder *ngIf=\"issfLoaded\"\r\n #querybuilder\r\n width=\"100%\"\r\n [dataSource]=\"sfData\"\r\n [columns]=\"sdFilter\"\r\n [rule]=\"importRules\"\r\n (ruleChange)=\"updateRule($event)\"\r\n (created)=\"onChange()\">\r\n </ejs-querybuilder>\r\n\r\n <div>\r\n <br>\r\n <ion-label>Result</ion-label>\r\n <textarea class=\"output\"\r\n resizable=\"none\"\r\n [rows]=\"10\"\r\n style=\"border: 1px solid #d3d3d3; width: 100%;\">{{displayRule}}</textarea>\r\n </div>\r\n </div>\r\n</ion-item>\r\n", styles: [".qbcontainer{border-radius:5px;border:1px solid rgba(0,0,0,.08);padding:10px;margin:10px 0;width:100%}#querybuilder .e-slider-container.e-control-wrapper{height:0}ejs-querybuilder{display:block}.e-query-builder{margin:0 auto;display:block}.highcontrast textarea#ruleContent{background-color:#000}\n"] }]
|
|
13221
|
+
args: [{ selector: 'app-sfquerybuilder', template: "<ion-item *ngIf=\"(!!componentProperties.isVisibleField ? group[componentProperties.isVisibleField] : componentProperties.isVisible)\">\r\n <div class=\"qbcontainer\">\r\n <ejs-querybuilder *ngIf=\"issfLoaded\"\r\n #querybuilder\r\n width=\"100%\"\r\n [dataSource]=\"sfData\"\r\n [columns]=\"sdFilter\"\r\n [rule]=\"importRules\"\r\n (ruleChange)=\"updateRule($event)\"\r\n (created)=\"onChange()\">\r\n </ejs-querybuilder>\r\n\r\n <div *ngIf=\"!data.HideShowResultPanel\">\r\n <br>\r\n <ion-label>Result</ion-label>\r\n <textarea class=\"output\"\r\n resizable=\"none\"\r\n [rows]=\"10\"\r\n style=\"border: 1px solid #d3d3d3; width: 100%;\">{{displayRule}}</textarea>\r\n </div>\r\n </div>\r\n</ion-item>\r\n", styles: [".qbcontainer{border-radius:5px;border:1px solid rgba(0,0,0,.08);padding:10px;margin:10px 0;width:100%}#querybuilder .e-slider-container.e-control-wrapper{height:0}ejs-querybuilder{display:block}.e-query-builder{margin:0 auto;display:block}.highcontrast textarea#ruleContent{background-color:#000}\n"] }]
|
|
13195
13222
|
}], ctorParameters: function () { return [{ type: i2.FieldService }, { type: i2.ResourceApiService }, { type: i2.WebApiService }]; }, propDecorators: { qryBldrObj: [{
|
|
13196
13223
|
type: ViewChild,
|
|
13197
13224
|
args: ['querybuilder']
|