@elementor/editor-app-bar 3.32.0-21 → 3.32.0-22
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.d.mts +1 -2
- package/dist/index.d.ts +1 -2
- package/dist/index.js +109 -142
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +67 -100
- package/dist/index.mjs.map +1 -1
- package/package.json +7 -7
- package/src/components/actions/link.tsx +2 -3
- package/src/components/ui/popover-menu-item.tsx +1 -3
- package/src/extensions/help/index.ts +0 -1
- package/src/extensions/index.ts +0 -2
- package/src/extensions/wordpress/index.ts +0 -1
- package/src/types.ts +0 -11
- package/src/extensions/connect/hooks/use-connect-link-config.tsx +0 -23
- package/src/extensions/connect/index.ts +0 -11
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
import { UserIcon } from '@elementor/icons';
|
|
2
|
-
import { __ } from '@wordpress/i18n';
|
|
3
|
-
|
|
4
|
-
import { type ExtendedWindow } from '../../../types';
|
|
5
|
-
|
|
6
|
-
export default function useConnectLinkConfig() {
|
|
7
|
-
const extendedWindow = window as unknown as ExtendedWindow;
|
|
8
|
-
const isUserConnected = extendedWindow?.elementorCommon?.config.library_connect.is_connected ?? false;
|
|
9
|
-
|
|
10
|
-
return isUserConnected
|
|
11
|
-
? {
|
|
12
|
-
title: __( 'My Elementor', 'elementor' ),
|
|
13
|
-
href: extendedWindow?.elementorCommon?.config.user.top_bar.my_elementor_url,
|
|
14
|
-
icon: UserIcon,
|
|
15
|
-
target: '_blank',
|
|
16
|
-
}
|
|
17
|
-
: {
|
|
18
|
-
title: __( 'Connect my account', 'elementor' ),
|
|
19
|
-
href: extendedWindow?.elementorCommon?.config.user.top_bar.connect_url,
|
|
20
|
-
icon: UserIcon,
|
|
21
|
-
target: '_blank',
|
|
22
|
-
};
|
|
23
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { mainMenu } from '../../locations';
|
|
2
|
-
import useConnectLinkConfig from './hooks/use-connect-link-config';
|
|
3
|
-
|
|
4
|
-
export function init() {
|
|
5
|
-
mainMenu.registerLink( {
|
|
6
|
-
id: 'app-bar-connect',
|
|
7
|
-
group: 'exits',
|
|
8
|
-
priority: 10,
|
|
9
|
-
useProps: useConnectLinkConfig,
|
|
10
|
-
} );
|
|
11
|
-
}
|