Skip to content

Commit 6fa0a18

Browse files
committed
Upgraded to 4.10.2
1 parent 3562004 commit 6fa0a18

File tree

12 files changed

+125
-47
lines changed

12 files changed

+125
-47
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
### v4.10.2
2+
**Fixes**
3+
- Fetch target object metadata when mapped to another object
4+
- Resolved the issue where an unnecessary trailing semicolon was added after the composite `externalId`
15

26
### v4.10.0
37
**New:**

js/angular-app/components/objectManagerEditor/objectManagerEditor.controller.js

Lines changed: 7 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/angular-app/components/objectManagerEditor/objectManagerEditor.controller.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/common/extensions-implementations.js

Lines changed: 34 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/common/extensions-implementations.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/models/sfdmu-models.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/models/sfdmu-models.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "sfdmu-gui-app",
3-
"version": "4.10.0",
3+
"version": "4.10.2",
44
"description": "SFDMU GUI App",
55
"repository": "forcedotcom/SFDX-Data-Move-Utility-Desktop-App",
66
"license": "BSD-3-Clause",

src/angular-app/components/objectManagerEditor/objectManagerEditor.controller.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,8 @@ export class ObjectManagerEditorController {
198198
// Set the sobject id in the config
199199
const config = DatabaseService.getConfig();
200200
const objectSet = DatabaseService.getObjectSet();
201-
const newSObjectId = objectSet.objects.find(x => x.name == this.selectedSObjectOption.value)?.id;
201+
const newSObject = objectSet.objects.find(x => x.name == this.selectedSObjectOption.value);
202+
const newSObjectId = newSObject?.id;
202203
const mustupdateDatabase = config.sObjectId != newSObjectId;
203204
config.sObjectId = newSObjectId;
204205

@@ -217,6 +218,12 @@ export class ObjectManagerEditorController {
217218
LogService.info(`SObject ${this.selectedSObject.name} is not initialized.`);
218219
}
219220

221+
for (const mapping of newSObject.fieldMapping) {
222+
if (mapping.targetObject) {
223+
await this.$app.describeWorkspaceSObjectAsync(mapping.targetObject);
224+
}
225+
}
226+
220227
// Setup the fields
221228
await this.setup();
222229
//this.$app.buildFooter();

src/common/extensions-implementations.ts

Lines changed: 48 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,35 @@ Array.prototype.flatBy = function <TChild, TParent>(this: TParent[], flatByProp:
252252
}, [] as TChild[]);
253253
};
254254

255+
Array.prototype.groupByProp = function <T, GroupKey extends keyof T>(
256+
this: T[],
257+
groupByProperty: GroupKey,
258+
groupKeyProperty: string,
259+
groupArrayProperty: string
260+
): Array<IGroupedObject<T, GroupKey>> {
261+
const groupMap = new Map<T[GroupKey], Array<{ [prop: string]: any }>>();
262+
263+
for (const obj of this) {
264+
const key = obj[groupByProperty];
265+
266+
if (!groupMap.has(key)) {
267+
groupMap.set(key, []);
268+
}
269+
270+
const group = groupMap.get(key);
271+
272+
group?.push({ ...obj });
273+
}
274+
275+
const groupedArray = Array.from(groupMap.entries()).map(([key, values]) => ({
276+
[groupKeyProperty]: key,
277+
[groupArrayProperty]: values,
278+
}));
279+
280+
return groupedArray.sort((a, b) => (a[groupKeyProperty] > b[groupKeyProperty]) ? 1 : -1);
281+
};
282+
283+
255284
// String prototype extensions implementation ------------------------------------------------------------
256285
String.prototype.format = function (this: string, ...args: any[]) {
257286
return this.replace(/{(\d+)}/g, function (match: string, number: number) {
@@ -284,34 +313,29 @@ String.prototype.replaceStrings = function (this: string, ...replacements: Repla
284313
return result;
285314
};
286315

316+
String.prototype.trimEnd = function (charToTrim?: string): string {
317+
if (!this) {
318+
return this;
319+
}
320+
if (!charToTrim) {
321+
return this.replace(/\s+$/, ''); // Default behavior for spaces
322+
}
323+
const regex = new RegExp(`${charToTrim}+$`);
324+
return this.replace(regex, '');
325+
};
287326

288-
Array.prototype.groupByProp = function <T, GroupKey extends keyof T>(
289-
this: T[],
290-
groupByProperty: GroupKey,
291-
groupKeyProperty: string,
292-
groupArrayProperty: string
293-
): Array<IGroupedObject<T, GroupKey>> {
294-
const groupMap = new Map<T[GroupKey], Array<{ [prop: string]: any }>>();
295-
296-
for (const obj of this) {
297-
const key = obj[groupByProperty];
298-
299-
if (!groupMap.has(key)) {
300-
groupMap.set(key, []);
301-
}
302-
303-
const group = groupMap.get(key);
304-
305-
group?.push({ ...obj });
327+
String.prototype.trimStart = function (charToTrim?: string): string {
328+
if (!this) {
329+
return this;
330+
}
331+
if (!charToTrim) {
332+
return this.replace(/^\s+/, ''); // Default behavior for spaces
306333
}
334+
const regex = new RegExp(`^${charToTrim}+`);
335+
return this.replace(regex, '');
336+
};
307337

308-
const groupedArray = Array.from(groupMap.entries()).map(([key, values]) => ({
309-
[groupKeyProperty]: key,
310-
[groupArrayProperty]: values,
311-
}));
312338

313-
return groupedArray.sort((a, b) => (a[groupKeyProperty] > b[groupKeyProperty]) ? 1 : -1);
314-
};
315339

316340

317341
// RegExp extensions implementation ------------------------------------------------------------

0 commit comments

Comments
 (0)