@fluid-app/portal-sdk 0.1.797 → 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
require("./chunk-9hOWP6kD.cjs");
|
|
2
|
-
const require_ContactsScreen = require("./ContactsScreen-
|
|
2
|
+
const require_ContactsScreen = require("./ContactsScreen-D4DBaIH_.cjs");
|
|
3
3
|
require("./ContactsTranslationBridge-FyqcnCwN.cjs");
|
|
4
4
|
require("./account-api-context-BAC-rNdx.cjs");
|
|
5
5
|
require("./Combobox-DW-UuPXX.cjs");
|
|
@@ -1790,6 +1790,14 @@ createContactFormSchema.passthrough();
|
|
|
1790
1790
|
//#endregion
|
|
1791
1791
|
//#region ../../contacts/ui/src/shared/hooks/useContactDetailPage.ts
|
|
1792
1792
|
const mutableKeys = Object.keys(createContactFormSchema.shape);
|
|
1793
|
+
function isDeepEqual(left, right) {
|
|
1794
|
+
if (Object.is(left, right)) return true;
|
|
1795
|
+
if (typeof left !== "object" || left === null) return false;
|
|
1796
|
+
if (typeof right !== "object" || right === null) return false;
|
|
1797
|
+
const leftEntries = Object.entries(left);
|
|
1798
|
+
const rightEntries = Object.entries(right);
|
|
1799
|
+
return leftEntries.length === rightEntries.length && leftEntries.every(([key, value]) => Object.hasOwn(right, key) && isDeepEqual(value, right[key]));
|
|
1800
|
+
}
|
|
1793
1801
|
function useContactDetailPage(contactId, options) {
|
|
1794
1802
|
const i18n = require_task_composer_form.useOptionalContactsTranslation();
|
|
1795
1803
|
const queryKeyPrefix = options?.queryKeyPrefix ?? "contacts";
|
|
@@ -1828,7 +1836,10 @@ function useContactDetailPage(contactId, options) {
|
|
|
1828
1836
|
const onSave = (0, react.useCallback)(() => {
|
|
1829
1837
|
methods.handleSubmit((formData) => {
|
|
1830
1838
|
const payload = {};
|
|
1831
|
-
for (const key of mutableKeys)
|
|
1839
|
+
for (const key of mutableKeys) {
|
|
1840
|
+
if (key === "affiliate" && isDeepEqual(formData.affiliate, methods.formState.defaultValues?.affiliate)) continue;
|
|
1841
|
+
if (key in formData) payload[key] = formData[key];
|
|
1842
|
+
}
|
|
1832
1843
|
updateMutation.mutate({
|
|
1833
1844
|
id: contactId,
|
|
1834
1845
|
data: payload
|
|
@@ -5280,4 +5291,4 @@ Object.defineProperty(exports, "contactsScreenPropertySchema", {
|
|
|
5280
5291
|
}
|
|
5281
5292
|
});
|
|
5282
5293
|
|
|
5283
|
-
//# sourceMappingURL=ContactsScreen-
|
|
5294
|
+
//# sourceMappingURL=ContactsScreen-D4DBaIH_.cjs.map
|