@rentman/rm-core 10.0.2 → 10.0.4

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.
@@ -31,9 +31,15 @@ export declare class ApiFormatter {
31
31
  isExpensiveFormat(columnType: ApiEnumApiType): boolean;
32
32
  /**
33
33
  * @description
34
- * Overwrites the values in 'changes' if the values in 'initial' and 'changes' are the same (leaving user changes intact)
34
+ * Overwrites the values in 'changes' if the values in 'initial' and 'changes' are the same and the parent transaction
35
+ * copied over the field (leaving user changes intact)
36
+ *
37
+ * We have to check the parent transaction because on a child transaction initial/modified can be equal (the copied field of the parent)
38
+ * and will then incorrectly be overwritten by applyChangesFromParent
39
+ *
40
+ * Note: parentChanges can be undefined for local items
35
41
  */
36
- mergeCopyFields<ItemTypeType extends ApiEnumItemType, ColumnIds extends ItemTypeColumnIds<ItemTypeType> = any>(initial: FieldMap<ItemTypeType, ColumnIds>, changes: FieldMap<ItemTypeType, ColumnIds>, newInitial: FieldMap<ItemTypeType, ColumnIds>, columns: ColumnInfo<ItemTypeType>[]): FieldMap<ItemTypeType, ColumnIds>;
42
+ mergeCopyFields<ItemTypeType extends ApiEnumItemType, ColumnIds extends ItemTypeColumnIds<ItemTypeType> = any>(parentChanges: FieldMap<ItemTypeType, ColumnIds> | undefined, changes: FieldMap<ItemTypeType, ColumnIds>, initial: FieldMap<ItemTypeType, ColumnIds>, newInitial: FieldMap<ItemTypeType, ColumnIds>, columns: ColumnInfo<ItemTypeType>[]): FieldMap<ItemTypeType, ColumnIds>;
37
43
  formatRequest<ItemTypeType extends ApiEnumItemType>(initial: FieldMap<ItemTypeType>, modified: FieldMap<ItemTypeType>, columns: ColumnInfo<ItemTypeType>[]): {
38
44
  [columnId: string]: any;
39
45
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rentman/rm-core",
3
- "version": "10.0.2",
3
+ "version": "10.0.4",
4
4
  "description": "Rentman core functionalities",
5
5
  "main": "./dist/rm-core.js",
6
6
  "types": "./dist/types/index.d.ts",