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
|
@@ -8167,7 +8167,9 @@ class ZgridComponent extends DataListingFieldBase {
|
|
|
8167
8167
|
if (this.zgrid) {
|
|
8168
8168
|
if (this.isUseLocalData()) {
|
|
8169
8169
|
this.zgrid.data = gData;
|
|
8170
|
-
this.
|
|
8170
|
+
if (!this.data.DisableAutoAppendGridDateFilterCol) {
|
|
8171
|
+
this.setDateColForFiltering();
|
|
8172
|
+
}
|
|
8171
8173
|
}
|
|
8172
8174
|
else {
|
|
8173
8175
|
this.zgrid.grid.data = {
|
|
@@ -8656,7 +8658,9 @@ class ZgridComponent extends DataListingFieldBase {
|
|
|
8656
8658
|
this.zgrid = grid;
|
|
8657
8659
|
this._state = this.zgrid.state;
|
|
8658
8660
|
this.columns = this.zgrid.gridColumns;
|
|
8659
|
-
this.
|
|
8661
|
+
if (!this.data.DisableAutoAppendGridDateFilterCol) {
|
|
8662
|
+
this.setDateColForFiltering();
|
|
8663
|
+
}
|
|
8660
8664
|
this.setupGridWithInlineEdit();
|
|
8661
8665
|
this.setupPopoverFeature(this.columns, this.getGridData());
|
|
8662
8666
|
}), switchMap$1(() => {
|
|
@@ -11930,7 +11934,7 @@ class ZudfComponent extends ContainerFieldBase {
|
|
|
11930
11934
|
}
|
|
11931
11935
|
generateFormControls(fieldArray, formControls, containerName, isMultiValueGroup = false, fieldValueGrouped = false, index = '') {
|
|
11932
11936
|
fieldArray.forEach((field, i) => {
|
|
11933
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
11937
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
11934
11938
|
const fieldIndex = index ? `${index}.${i + 1}` : `${i}`;
|
|
11935
11939
|
this.fieldService.patchFieldProperty(field);
|
|
11936
11940
|
if (typeof field.Value === "string" && field.Value.indexOf(".") !== -1) {
|
|
@@ -11951,7 +11955,8 @@ class ZudfComponent extends ContainerFieldBase {
|
|
|
11951
11955
|
isGrouped: false,
|
|
11952
11956
|
isVisible: (_b = field.Visible) !== null && _b !== void 0 ? _b : false,
|
|
11953
11957
|
isRequired: (_c = field.IsRequired) !== null && _c !== void 0 ? _c : false,
|
|
11954
|
-
isReadOnly: (_d = field.ReadOnly) !== null && _d !== void 0 ? _d : false
|
|
11958
|
+
isReadOnly: (_d = field.ReadOnly) !== null && _d !== void 0 ? _d : false,
|
|
11959
|
+
dataSourceType: (_e = field.zudfDataSourceType) !== null && _e !== void 0 ? _e : null //value aka manual, user, resource aka resource
|
|
11955
11960
|
};
|
|
11956
11961
|
if (field.MultiValuedGroup) {
|
|
11957
11962
|
this.setMultiValueGroup(field);
|
|
@@ -11985,9 +11990,10 @@ class ZudfComponent extends ContainerFieldBase {
|
|
|
11985
11990
|
type: field.Type,
|
|
11986
11991
|
isMultiValueGroup: isMultiValueGroup,
|
|
11987
11992
|
isGrouped: fieldValueGrouped,
|
|
11988
|
-
isVisible: (
|
|
11989
|
-
isRequired: (
|
|
11990
|
-
isReadOnly: (
|
|
11993
|
+
isVisible: (_f = field.Visible) !== null && _f !== void 0 ? _f : false,
|
|
11994
|
+
isRequired: (_g = field.IsRequired) !== null && _g !== void 0 ? _g : false,
|
|
11995
|
+
isReadOnly: (_h = field.ReadOnly) !== null && _h !== void 0 ? _h : false,
|
|
11996
|
+
dataSourceType: (_j = field.zudfDataSourceType) !== null && _j !== void 0 ? _j : null //value aka manual, user, resource aka resource
|
|
11991
11997
|
};
|
|
11992
11998
|
if (containerName) {
|
|
11993
11999
|
if (!zudfGroup[containerName].includes(field.Value)) {
|
|
@@ -12069,20 +12075,25 @@ class ZudfComponent extends ContainerFieldBase {
|
|
|
12069
12075
|
* @returns {void}
|
|
12070
12076
|
*/
|
|
12071
12077
|
setFormFieldzModel(group = this.group, modelData) {
|
|
12078
|
+
var _a;
|
|
12072
12079
|
// Add the component prefix to the model data property names
|
|
12073
12080
|
const patchedModelData = this.addZModelPropertyPrefix(modelData);
|
|
12074
12081
|
// Update the zModel values of the form group
|
|
12075
12082
|
Object.assign(group[this.componentScopeName].zModel, patchedModelData);
|
|
12076
|
-
// Update grid values for any arrays in the model data
|
|
12083
|
+
// Update grid values for any arrays in the model data base on kcard component.
|
|
12077
12084
|
for (const model in patchedModelData) {
|
|
12078
12085
|
if (Array.isArray(patchedModelData[model])) {
|
|
12079
12086
|
const gridValue = `${model}${this.prefixValueOption}`;
|
|
12080
12087
|
const gridDataSource = `${model}${this.prefixDataSourceName}`;
|
|
12081
|
-
//
|
|
12082
|
-
|
|
12083
|
-
|
|
12084
|
-
|
|
12085
|
-
group[
|
|
12088
|
+
// Check is it kcard, sometime can be dropdown.
|
|
12089
|
+
const component = ZComponentHelper.getComponentByValue(this.group, model);
|
|
12090
|
+
if (((_a = component === null || component === void 0 ? void 0 : component.data) === null || _a === void 0 ? void 0 : _a.Type) === 'kcard') {
|
|
12091
|
+
// Update the data source for the grid
|
|
12092
|
+
group[gridDataSource] = patchedModelData[model];
|
|
12093
|
+
// Update the grid value
|
|
12094
|
+
if (group[gridValue]) {
|
|
12095
|
+
group[gridValue].setData(group[gridDataSource]);
|
|
12096
|
+
}
|
|
12086
12097
|
}
|
|
12087
12098
|
}
|
|
12088
12099
|
}
|
|
@@ -12314,7 +12325,8 @@ class ZudfComponent extends ContainerFieldBase {
|
|
|
12314
12325
|
"Type": "zgrid",
|
|
12315
12326
|
"Value": 'group.' + gridValueName,
|
|
12316
12327
|
"Visible": true,
|
|
12317
|
-
"WidthReduce": 500
|
|
12328
|
+
"WidthReduce": 500,
|
|
12329
|
+
"DisableAutoAppendGridDateFilterCol": true
|
|
12318
12330
|
};
|
|
12319
12331
|
// Create a property in the group object based on the above declaration, except Name, and also insert column fields.
|
|
12320
12332
|
// Use the grouping value as the column and skip inserting any container type.
|