@elementor/editor-controls 3.35.0-477 → 3.35.0-479
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/index.js +6 -4
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +6 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +15 -15
- package/src/controls/link-control.tsx +6 -4
package/dist/index.mjs
CHANGED
|
@@ -3477,17 +3477,19 @@ var LinkControl = createControl((props) => {
|
|
|
3477
3477
|
label = __23("Link", "elementor"),
|
|
3478
3478
|
ariaLabel
|
|
3479
3479
|
} = props || {};
|
|
3480
|
-
const [linkInLinkRestriction, setLinkInLinkRestriction] = useState11(
|
|
3480
|
+
const [linkInLinkRestriction, setLinkInLinkRestriction] = useState11(
|
|
3481
|
+
getLinkInLinkRestriction(elementId, value)
|
|
3482
|
+
);
|
|
3481
3483
|
const shouldDisableAddingLink = !isActive && linkInLinkRestriction.shouldRestrict;
|
|
3482
3484
|
const debouncedCheckRestriction = useMemo8(
|
|
3483
3485
|
() => debounce3(() => {
|
|
3484
|
-
const newRestriction = getLinkInLinkRestriction(elementId);
|
|
3486
|
+
const newRestriction = getLinkInLinkRestriction(elementId, value);
|
|
3485
3487
|
if (newRestriction.shouldRestrict && isActive) {
|
|
3486
3488
|
setIsActive(false);
|
|
3487
3489
|
}
|
|
3488
3490
|
setLinkInLinkRestriction(newRestriction);
|
|
3489
3491
|
}, 300),
|
|
3490
|
-
[elementId, isActive]
|
|
3492
|
+
[elementId, isActive, value]
|
|
3491
3493
|
);
|
|
3492
3494
|
useEffect8(() => {
|
|
3493
3495
|
debouncedCheckRestriction();
|
|
@@ -3504,7 +3506,7 @@ var LinkControl = createControl((props) => {
|
|
|
3504
3506
|
};
|
|
3505
3507
|
}, [elementId, debouncedCheckRestriction]);
|
|
3506
3508
|
const onEnabledChange = () => {
|
|
3507
|
-
setLinkInLinkRestriction(getLinkInLinkRestriction(elementId));
|
|
3509
|
+
setLinkInLinkRestriction(getLinkInLinkRestriction(elementId, value));
|
|
3508
3510
|
if (linkInLinkRestriction.shouldRestrict && !isActive) {
|
|
3509
3511
|
return;
|
|
3510
3512
|
}
|