mmhglobal-dynamicform 2.23.0 → 2.23.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 +9 -1
- package/esm2020/lib/zchip/zchip.component.mjs +1 -1
- package/esm2020/lib/zgrid/zgrid.binding.directive.mjs +16 -14
- package/esm2020/lib/zgrid/zgrid.component.mjs +1 -9
- package/fesm2015/mmhglobal-dynamicform.mjs +15 -21
- package/fesm2015/mmhglobal-dynamicform.mjs.map +1 -1
- package/fesm2020/mmhglobal-dynamicform.mjs +15 -21
- package/fesm2020/mmhglobal-dynamicform.mjs.map +1 -1
- package/lib/zchip/zchip.component.d.ts +1 -1
- package/lib/zgrid/zgrid.binding.directive.d.ts +1 -2
- package/lib/zgrid/zgrid.component.d.ts +0 -1
- package/package.json +1 -1
|
@@ -2491,7 +2491,7 @@ class ZGridBindingDirective extends DataBindingDirective {
|
|
|
2491
2491
|
columnConfigurations: columnsConfig
|
|
2492
2492
|
};
|
|
2493
2493
|
ZComponentHelper.getGridColumns(this.gridSetting);
|
|
2494
|
-
this.loggingService.
|
|
2494
|
+
this.loggingService.debugLog('generated grid columns', this.gridSetting);
|
|
2495
2495
|
this.getFilterParamsColumns();
|
|
2496
2496
|
this.getFilter();
|
|
2497
2497
|
this.getFilterParams();
|
|
@@ -3095,10 +3095,20 @@ class ZGridBindingDirective extends DataBindingDirective {
|
|
|
3095
3095
|
console.log("GridFilterConfiguration.OnChange triggered");
|
|
3096
3096
|
// Use switchMap to handle the asynchronous operation
|
|
3097
3097
|
of(this.params.filterParams).pipe(switchMap((filterParams) => {
|
|
3098
|
+
// Get the function expression from the configuration
|
|
3098
3099
|
let expression = this.field.GridFilterConfiguration.OnChange;
|
|
3099
|
-
|
|
3100
|
-
expression = expression.replace('group.', 'grp.');
|
|
3101
|
-
|
|
3100
|
+
// Replace 'modalGroup.' with 'group.' and 'group.' with 'grp.'
|
|
3101
|
+
expression = expression.replace(/modalGroup\./g, 'group.').replace(/group\./g, 'grp.');
|
|
3102
|
+
// Ensure the expression starts with 'this.' to avoid accessing global scope
|
|
3103
|
+
if (!expression.startsWith('this.')) {
|
|
3104
|
+
expression = `this.${expression}`;
|
|
3105
|
+
}
|
|
3106
|
+
const func = eval(expression);
|
|
3107
|
+
if (!func) {
|
|
3108
|
+
this.loggingService.log(`${expression} not found in this scope for ${this.field.Name} grid.`);
|
|
3109
|
+
// Since function not found, we return the original params.
|
|
3110
|
+
return of(this.params.filterParams);
|
|
3111
|
+
}
|
|
3102
3112
|
const callFunc = func.bind(this.grp);
|
|
3103
3113
|
return callFunc(filterParams);
|
|
3104
3114
|
})).subscribe((updatedFilterParams) => {
|
|
@@ -3151,14 +3161,6 @@ class ZGridBindingDirective extends DataBindingDirective {
|
|
|
3151
3161
|
getPageNo(stateSkip, stateTake) {
|
|
3152
3162
|
return stateSkip / stateTake;
|
|
3153
3163
|
}
|
|
3154
|
-
beforeGridGetData(group, me) {
|
|
3155
|
-
console.warn("beforeDataBinding triggered");
|
|
3156
|
-
if (!group.beforeGridGetData) {
|
|
3157
|
-
console.warn("group.beforeDataBinding is undefined");
|
|
3158
|
-
return of(true);
|
|
3159
|
-
}
|
|
3160
|
-
return group.beforeGridGetData(group, me);
|
|
3161
|
-
}
|
|
3162
3164
|
// columnField = data: Array<ZField>,
|
|
3163
3165
|
// columns = gridColumns: any[],
|
|
3164
3166
|
// group = group: ZGroup,
|
|
@@ -3168,7 +3170,7 @@ class ZGridBindingDirective extends DataBindingDirective {
|
|
|
3168
3170
|
setColumns(columns) {
|
|
3169
3171
|
this.gridSetting.columnField = columns;
|
|
3170
3172
|
ZComponentHelper.getGridColumns(this.gridSetting);
|
|
3171
|
-
this.loggingService.
|
|
3173
|
+
this.loggingService.debugLog('generated grid columns', this.gridSetting);
|
|
3172
3174
|
}
|
|
3173
3175
|
}
|
|
3174
3176
|
ZGridBindingDirective.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "13.4.0", ngImport: i0, type: ZGridBindingDirective, deps: [{ token: GridComponent }, { token: i2.WebApiService }, { token: i2.ToastService }, { token: i2.OfflineDatabaseService }, { token: i2.SignalrService }, { token: ZGridService }, { token: i2.LoggingService }], target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -9555,14 +9557,6 @@ class ZgridComponent extends DataListingFieldBase {
|
|
|
9555
9557
|
}
|
|
9556
9558
|
//#endregion
|
|
9557
9559
|
//#region Event
|
|
9558
|
-
beforeGridGetData(group, me) {
|
|
9559
|
-
console.warn("beforeDataBinding triggered");
|
|
9560
|
-
if (!group.beforeGridGetData) {
|
|
9561
|
-
console.warn("group.beforeDataBinding is undefined");
|
|
9562
|
-
return of(true);
|
|
9563
|
-
}
|
|
9564
|
-
return group.beforeGridGetData(group, me);
|
|
9565
|
-
}
|
|
9566
9560
|
// Source: https://www.telerik.com/forums/kendo-angular-grid-blank-space-in-the-end-when-you-resize(reduce)-any-column
|
|
9567
9561
|
adjustWidthUponResize() {
|
|
9568
9562
|
const tableWidth = document.querySelector(".k-grid-table")[`offsetWidth`];
|