mmhglobal-dynamicform 2.6.0 → 2.6.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 -0
- package/esm2020/lib/zgrid/zgrid.component.mjs +7 -3
- package/esm2020/lib/zudf/zudf.component.mjs +17 -10
- package/fesm2015/mmhglobal-dynamicform.mjs +26 -14
- package/fesm2015/mmhglobal-dynamicform.mjs.map +1 -1
- package/fesm2020/mmhglobal-dynamicform.mjs +22 -11
- package/fesm2020/mmhglobal-dynamicform.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -8155,7 +8155,9 @@ class ZgridComponent extends DataListingFieldBase {
|
|
|
8155
8155
|
if (this.zgrid) {
|
|
8156
8156
|
if (this.isUseLocalData()) {
|
|
8157
8157
|
this.zgrid.data = gData;
|
|
8158
|
-
this.
|
|
8158
|
+
if (!this.data.DisableAutoAppendGridDateFilterCol) {
|
|
8159
|
+
this.setDateColForFiltering();
|
|
8160
|
+
}
|
|
8159
8161
|
}
|
|
8160
8162
|
else {
|
|
8161
8163
|
this.zgrid.grid.data = {
|
|
@@ -8644,7 +8646,9 @@ class ZgridComponent extends DataListingFieldBase {
|
|
|
8644
8646
|
this.zgrid = grid;
|
|
8645
8647
|
this._state = this.zgrid.state;
|
|
8646
8648
|
this.columns = this.zgrid.gridColumns;
|
|
8647
|
-
this.
|
|
8649
|
+
if (!this.data.DisableAutoAppendGridDateFilterCol) {
|
|
8650
|
+
this.setDateColForFiltering();
|
|
8651
|
+
}
|
|
8648
8652
|
this.setupGridWithInlineEdit();
|
|
8649
8653
|
this.setupPopoverFeature(this.columns, this.getGridData());
|
|
8650
8654
|
}), switchMap$1(() => {
|
|
@@ -11930,7 +11934,8 @@ class ZudfComponent extends ContainerFieldBase {
|
|
|
11930
11934
|
isGrouped: false,
|
|
11931
11935
|
isVisible: field.Visible ?? false,
|
|
11932
11936
|
isRequired: field.IsRequired ?? false,
|
|
11933
|
-
isReadOnly: field.ReadOnly ?? false
|
|
11937
|
+
isReadOnly: field.ReadOnly ?? false,
|
|
11938
|
+
dataSourceType: field.zudfDataSourceType ?? null //value aka manual, user, resource aka resource
|
|
11934
11939
|
};
|
|
11935
11940
|
if (field.MultiValuedGroup) {
|
|
11936
11941
|
this.setMultiValueGroup(field);
|
|
@@ -11966,7 +11971,8 @@ class ZudfComponent extends ContainerFieldBase {
|
|
|
11966
11971
|
isGrouped: fieldValueGrouped,
|
|
11967
11972
|
isVisible: field.Visible ?? false,
|
|
11968
11973
|
isRequired: field.IsRequired ?? false,
|
|
11969
|
-
isReadOnly: field.ReadOnly ?? false
|
|
11974
|
+
isReadOnly: field.ReadOnly ?? false,
|
|
11975
|
+
dataSourceType: field.zudfDataSourceType ?? null //value aka manual, user, resource aka resource
|
|
11970
11976
|
};
|
|
11971
11977
|
if (containerName) {
|
|
11972
11978
|
if (!zudfGroup[containerName].includes(field.Value)) {
|
|
@@ -12052,16 +12058,20 @@ class ZudfComponent extends ContainerFieldBase {
|
|
|
12052
12058
|
const patchedModelData = this.addZModelPropertyPrefix(modelData);
|
|
12053
12059
|
// Update the zModel values of the form group
|
|
12054
12060
|
Object.assign(group[this.componentScopeName].zModel, patchedModelData);
|
|
12055
|
-
// Update grid values for any arrays in the model data
|
|
12061
|
+
// Update grid values for any arrays in the model data base on kcard component.
|
|
12056
12062
|
for (const model in patchedModelData) {
|
|
12057
12063
|
if (Array.isArray(patchedModelData[model])) {
|
|
12058
12064
|
const gridValue = `${model}${this.prefixValueOption}`;
|
|
12059
12065
|
const gridDataSource = `${model}${this.prefixDataSourceName}`;
|
|
12060
|
-
//
|
|
12061
|
-
|
|
12062
|
-
|
|
12063
|
-
|
|
12064
|
-
group[
|
|
12066
|
+
// Check is it kcard, sometime can be dropdown.
|
|
12067
|
+
const component = ZComponentHelper.getComponentByValue(this.group, model);
|
|
12068
|
+
if (component?.data?.Type === 'kcard') {
|
|
12069
|
+
// Update the data source for the grid
|
|
12070
|
+
group[gridDataSource] = patchedModelData[model];
|
|
12071
|
+
// Update the grid value
|
|
12072
|
+
if (group[gridValue]) {
|
|
12073
|
+
group[gridValue].setData(group[gridDataSource]);
|
|
12074
|
+
}
|
|
12065
12075
|
}
|
|
12066
12076
|
}
|
|
12067
12077
|
}
|
|
@@ -12292,7 +12302,8 @@ class ZudfComponent extends ContainerFieldBase {
|
|
|
12292
12302
|
"Type": "zgrid",
|
|
12293
12303
|
"Value": 'group.' + gridValueName,
|
|
12294
12304
|
"Visible": true,
|
|
12295
|
-
"WidthReduce": 500
|
|
12305
|
+
"WidthReduce": 500,
|
|
12306
|
+
"DisableAutoAppendGridDateFilterCol": true
|
|
12296
12307
|
};
|
|
12297
12308
|
// Create a property in the group object based on the above declaration, except Name, and also insert column fields.
|
|
12298
12309
|
// Use the grouping value as the column and skip inserting any container type.
|