ngx-material-entity 15.2.6 → 15.2.8

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.
@@ -1150,17 +1150,19 @@ class EntityUtilities {
1150
1150
  const res = [];
1151
1151
  for (const key of ReflectUtilities.ownKeys(entity)) {
1152
1152
  const metadata = EntityUtilities.getPropertyMetadata(entity, key);
1153
- const type = EntityUtilities.getPropertyType(entity, key);
1154
- if (!(await EntityUtilities.isEqual(entity[key], entityPriorChanges[key], metadata, type))) {
1155
- res.push({
1156
- key: key,
1157
- before: entityPriorChanges[key],
1158
- after: entity[key]
1159
- });
1160
- }
1161
- else {
1162
- // This is needed to set blob file data so that it is only requested once.
1163
- entityPriorChanges[key] = LodashUtilities.cloneDeep(entity[key]);
1153
+ if (!metadata.isReadOnly(entity)) {
1154
+ const type = EntityUtilities.getPropertyType(entity, key);
1155
+ if (!(await EntityUtilities.isEqual(entity[key], entityPriorChanges[key], metadata, type))) {
1156
+ res.push({
1157
+ key: key,
1158
+ before: entityPriorChanges[key],
1159
+ after: entity[key]
1160
+ });
1161
+ }
1162
+ else {
1163
+ // This is needed to set blob file data so that it is only requested once.
1164
+ entityPriorChanges[key] = LodashUtilities.cloneDeep(entity[key]);
1165
+ }
1164
1166
  }
1165
1167
  }
1166
1168
  return res;
@@ -3379,12 +3381,11 @@ class NgxMatEntityInputComponent {
3379
3381
  this.internalGetValidationErrorMessage = this.getValidationErrorMessage ?? this.defaultGetValidationErrorMessage;
3380
3382
  this.internalIsReadOnly = this.isReadOnly ?? false;
3381
3383
  this.type = EntityUtilities.getPropertyType(this.internalEntity, this.internalPropertyKey);
3382
- if (this.validEmpty != null) {
3384
+ if (this.validEmpty === true) {
3383
3385
  // eslint-disable-next-line max-len
3384
3386
  const currentMetadata = ReflectUtilities.getMetadata('metadata', this.internalEntity, this.internalPropertyKey);
3385
3387
  // eslint-disable-next-line max-len
3386
- ReflectUtilities.defineMetadata('metadata', { ...currentMetadata, required: !this.validEmpty }, this.internalEntity, this.internalPropertyKey);
3387
- ReflectUtilities.defineMetadata('validEmpty', true, this.internalEntity, this.internalPropertyKey);
3388
+ ReflectUtilities.defineMetadata('metadata', { ...currentMetadata, required: false }, this.internalEntity, this.internalPropertyKey);
3388
3389
  }
3389
3390
  this.metadata = EntityUtilities.getPropertyMetadata(this.internalEntity, this.internalPropertyKey, this.type);
3390
3391
  switch (this.type) {