@fluid-app/portal-sdk 0.1.796 → 0.1.798
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/dist/{ContactsScreen-BPGDpGZu.mjs → ContactsScreen-C0e2DB_a.mjs} +13 -2
- package/dist/ContactsScreen-C0e2DB_a.mjs.map +1 -0
- package/dist/{ContactsScreen-J8cS9Y97.cjs → ContactsScreen-Cpj6b9ad.cjs} +1 -1
- package/dist/{ContactsScreen-CuuGPFIj.cjs → ContactsScreen-D4DBaIH_.cjs} +13 -2
- package/dist/ContactsScreen-D4DBaIH_.cjs.map +1 -0
- package/dist/{ContactsScreen-ChjOLSBG.mjs → ContactsScreen-De63SAAd.mjs} +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +3 -3
- package/dist/ContactsScreen-BPGDpGZu.mjs.map +0 -1
- package/dist/ContactsScreen-CuuGPFIj.cjs.map +0 -1
|
@@ -1503,6 +1503,14 @@ createContactFormSchema.passthrough();
|
|
|
1503
1503
|
//#endregion
|
|
1504
1504
|
//#region ../../contacts/ui/src/shared/hooks/useContactDetailPage.ts
|
|
1505
1505
|
const mutableKeys = Object.keys(createContactFormSchema.shape);
|
|
1506
|
+
function isDeepEqual(left, right) {
|
|
1507
|
+
if (Object.is(left, right)) return true;
|
|
1508
|
+
if (typeof left !== "object" || left === null) return false;
|
|
1509
|
+
if (typeof right !== "object" || right === null) return false;
|
|
1510
|
+
const leftEntries = Object.entries(left);
|
|
1511
|
+
const rightEntries = Object.entries(right);
|
|
1512
|
+
return leftEntries.length === rightEntries.length && leftEntries.every(([key, value]) => Object.hasOwn(right, key) && isDeepEqual(value, right[key]));
|
|
1513
|
+
}
|
|
1506
1514
|
function useContactDetailPage(contactId, options) {
|
|
1507
1515
|
const i18n = useOptionalContactsTranslation();
|
|
1508
1516
|
const queryKeyPrefix = options?.queryKeyPrefix ?? "contacts";
|
|
@@ -1541,7 +1549,10 @@ function useContactDetailPage(contactId, options) {
|
|
|
1541
1549
|
const onSave = useCallback(() => {
|
|
1542
1550
|
methods.handleSubmit((formData) => {
|
|
1543
1551
|
const payload = {};
|
|
1544
|
-
for (const key of mutableKeys)
|
|
1552
|
+
for (const key of mutableKeys) {
|
|
1553
|
+
if (key === "affiliate" && isDeepEqual(formData.affiliate, methods.formState.defaultValues?.affiliate)) continue;
|
|
1554
|
+
if (key in formData) payload[key] = formData[key];
|
|
1555
|
+
}
|
|
1545
1556
|
updateMutation.mutate({
|
|
1546
1557
|
id: contactId,
|
|
1547
1558
|
data: payload
|
|
@@ -4982,4 +4993,4 @@ const contactsScreenPropertySchema = {
|
|
|
4982
4993
|
//#endregion
|
|
4983
4994
|
export { contactsScreenPropertySchema as n, ContactsScreen as t };
|
|
4984
4995
|
|
|
4985
|
-
//# sourceMappingURL=ContactsScreen-
|
|
4996
|
+
//# sourceMappingURL=ContactsScreen-C0e2DB_a.mjs.map
|