@pepperi-addons/ngx-lib 0.2.51-beta.19 → 0.2.51-beta.22

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.
@@ -860,10 +860,6 @@
860
860
  fieldFormattedValue =
861
861
  fieldFormattedValue === '0' ? '' : fieldFormattedValue;
862
862
  }
863
- // Fix for the internal carusel component (just do a change for refresh the view).
864
- if (field.controlType === 'internalCarusel') {
865
- fieldFormattedValue = new Date().getTime();
866
- }
867
863
  return fieldFormattedValue;
868
864
  };
869
865
  PepFormComponent.prototype.toControlGroup = function (fields) {
@@ -1204,7 +1200,7 @@
1204
1200
  this.customizationService.updateFormField(this.form, currentField, fieldFormattedValue);
1205
1201
  // Hack to override (update) the field.
1206
1202
  if (currentField.controlType === 'internalCarusel') {
1207
- currentField = JSON.parse(JSON.stringify(currentField));
1203
+ currentField = this.createCopyField(currentField);
1208
1204
  }
1209
1205
  }
1210
1206
  }
@@ -1230,6 +1226,12 @@
1230
1226
  // Set it to false to enable all fields.
1231
1227
  this.isLocked = false;
1232
1228
  };
1229
+ PepFormComponent.prototype.createCopyField = function (baseField) {
1230
+ var uiControlField = this.getUiControlFields().find(function (cf) { return cf.ApiName === baseField.key; });
1231
+ var dataField = this.data.Fields.find(function (df) { return df.ApiName === baseField.key; });
1232
+ var customField = this.convertToCustomField(uiControlField, dataField, this.canEditObject, this.menuDataField, this.hasCampaignDataField, this.indicatorsDataField, this.objectId, this.parentId, this.searchCode);
1233
+ return customField;
1234
+ };
1233
1235
  PepFormComponent.prototype.initForm = function () {
1234
1236
  if (this.data && this.data.Fields) {
1235
1237
  var fields = this.convertCustomFields(this.getUiControlFields(), this.data.Fields);
@@ -1270,6 +1272,7 @@
1270
1272
  options.pageInfo = updatedField.UIPageInfo;
1271
1273
  }
1272
1274
  customField.update(options);
1275
+ // customField = JSON.parse(JSON.stringify(customField));
1273
1276
  };
1274
1277
  PepFormComponent.prototype.updateForm = function () {
1275
1278
  var e_7, _b;