@embedreach/components 0.3.9 → 0.3.10
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/chunks/index.js +10 -5
- package/dist/index.umd.js +1 -1
- package/package.json +1 -1
package/dist/chunks/index.js
CHANGED
|
@@ -97352,6 +97352,7 @@ const SMSSenderAndCompanyEditor = React__default.memo(
|
|
|
97352
97352
|
const [internalCompanyName, setInternalCompanyName] = useState(null);
|
|
97353
97353
|
const [popoverOpen, setPopoverOpen] = useState(false);
|
|
97354
97354
|
const [hasInitialized, setHasInitialized] = useState(false);
|
|
97355
|
+
const debouncedCompanyName = useDebounce(internalCompanyName, 250);
|
|
97355
97356
|
const { channelSenders } = useChannelSender();
|
|
97356
97357
|
const { channelAccounts } = useChannelAccount();
|
|
97357
97358
|
const { data: smsApplication } = useGetLatestSmsRegistrationApplication();
|
|
@@ -97384,13 +97385,17 @@ const SMSSenderAndCompanyEditor = React__default.memo(
|
|
|
97384
97385
|
(e4) => {
|
|
97385
97386
|
const newValue = e4.target.value;
|
|
97386
97387
|
setInternalCompanyName(newValue);
|
|
97388
|
+
},
|
|
97389
|
+
[]
|
|
97390
|
+
);
|
|
97391
|
+
useEffect(() => {
|
|
97392
|
+
if (hasInitialized && debouncedCompanyName !== void 0) {
|
|
97387
97393
|
updateCommunicationGroup2({
|
|
97388
97394
|
groupId: propsRef.current.communicationGroupId,
|
|
97389
|
-
params: { textMessageCompanyName:
|
|
97395
|
+
params: { textMessageCompanyName: debouncedCompanyName || null }
|
|
97390
97396
|
});
|
|
97391
|
-
}
|
|
97392
|
-
|
|
97393
|
-
);
|
|
97397
|
+
}
|
|
97398
|
+
}, [debouncedCompanyName, hasInitialized, updateCommunicationGroup2]);
|
|
97394
97399
|
const handlePopoverOpenChange = useCallback((open) => {
|
|
97395
97400
|
setPopoverOpen(open);
|
|
97396
97401
|
}, []);
|
|
@@ -97452,7 +97457,7 @@ const SMSSenderAndCompanyEditor = React__default.memo(
|
|
|
97452
97457
|
className: "w-full"
|
|
97453
97458
|
}
|
|
97454
97459
|
),
|
|
97455
|
-
/* @__PURE__ */ jsx(SavingIndicator, { isSaving: isUpdating })
|
|
97460
|
+
/* @__PURE__ */ jsx("div", { className: "h-6", children: /* @__PURE__ */ jsx(SavingIndicator, { isSaving: isUpdating }) })
|
|
97456
97461
|
] })
|
|
97457
97462
|
] });
|
|
97458
97463
|
}, [
|