@elementor/editor-app-bar 0.20.0 → 0.22.0
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/CHANGELOG.md +36 -0
- package/dist/index.js +226 -226
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +245 -245
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -11
- package/src/components/actions/action.tsx +3 -2
- package/src/components/actions/link.tsx +3 -2
- package/src/components/actions/toggle-action.tsx +2 -1
- package/src/components/app-bar.tsx +5 -4
- package/src/components/locations/integrations-menu-location.tsx +3 -2
- package/src/components/locations/main-menu-location.tsx +3 -2
- package/src/components/locations/page-indication-location.tsx +1 -0
- package/src/components/locations/primary-action-location.tsx +1 -0
- package/src/components/locations/responsive-location.tsx +1 -0
- package/src/components/locations/tools-menu-location.tsx +1 -0
- package/src/components/locations/utilities-menu-location.tsx +3 -2
- package/src/components/ui/popover-menu-item.tsx +1 -1
- package/src/components/ui/popover-menu.tsx +2 -1
- package/src/components/ui/toolbar-logo.tsx +1 -1
- package/src/components/ui/toolbar-menu-item.tsx +1 -1
- package/src/components/ui/toolbar-menu-more.tsx +4 -3
- package/src/components/ui/toolbar-menu-toggle-item.tsx +1 -1
- package/src/components/ui/toolbar-menu.tsx +2 -1
- package/src/contexts/menu-context.tsx +2 -2
- package/src/extensions/documents-indicator/components/settings-button.tsx +8 -7
- package/src/extensions/documents-preview/hooks/use-action-props.ts +5 -4
- package/src/extensions/documents-save/components/primary-action-menu.tsx +2 -1
- package/src/extensions/documents-save/components/primary-action.tsx +11 -10
- package/src/extensions/documents-save/hooks/use-document-copy-and-share-props.ts +4 -3
- package/src/extensions/documents-save/hooks/use-document-save-draft-props.ts +4 -3
- package/src/extensions/documents-save/hooks/use-document-save-template-props.ts +4 -3
- package/src/extensions/documents-save/hooks/use-document-view-page-props.ts +2 -2
- package/src/extensions/documents-save/index.ts +2 -2
- package/src/extensions/documents-save/locations.ts +1 -0
- package/src/extensions/elements/hooks/use-action-props.ts +4 -3
- package/src/extensions/elements/index.ts +1 -1
- package/src/extensions/elements/sync/sync-panel-title.ts +1 -1
- package/src/extensions/finder/hooks/use-action-props.ts +4 -3
- package/src/extensions/help/index.ts +4 -3
- package/src/extensions/history/hooks/use-action-props.ts +4 -3
- package/src/extensions/keyboard-shortcuts/hooks/use-action-props.ts +4 -3
- package/src/extensions/responsive/components/breakpoints-switcher.tsx +10 -9
- package/src/extensions/site-settings/components/portal.tsx +2 -2
- package/src/extensions/site-settings/components/portalled-primary-action.tsx +1 -0
- package/src/extensions/site-settings/hooks/use-action-props.ts +3 -2
- package/src/extensions/site-settings/index.ts +2 -1
- package/src/extensions/structure/hooks/use-action-props.ts +3 -2
- package/src/extensions/theme-builder/hooks/use-action-props.ts +4 -3
- package/src/extensions/user-preferences/hooks/use-action-props.ts +4 -3
- package/src/extensions/wordpress/index.ts +5 -4
- package/src/init.ts +3 -2
- package/src/locations.ts +1 -0
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Fragment } from 'react';
|
|
3
|
-
import ToolbarMenu from '../ui/toolbar-menu';
|
|
4
|
-
import { utilitiesMenu } from '../../locations';
|
|
5
3
|
import { Divider } from '@elementor/ui';
|
|
4
|
+
|
|
5
|
+
import { utilitiesMenu } from '../../locations';
|
|
6
|
+
import ToolbarMenu from '../ui/toolbar-menu';
|
|
6
7
|
import ToolbarMenuMore from '../ui/toolbar-menu-more';
|
|
7
8
|
|
|
8
9
|
const MAX_TOOLBAR_ACTIONS = 4;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { MenuItem, MenuItemProps, ListItemText, ListItemIcon, withDirection } from '@elementor/ui';
|
|
3
2
|
import { ArrowUpRightIcon, ChevronRightIcon } from '@elementor/icons';
|
|
3
|
+
import { ListItemIcon, ListItemText, MenuItem, type MenuItemProps, withDirection } from '@elementor/ui';
|
|
4
4
|
|
|
5
5
|
type ExtraProps = {
|
|
6
6
|
href?: string;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Menu, MenuProps, PopupState } from '@elementor/ui';
|
|
2
|
+
import { Menu, type MenuProps, type PopupState } from '@elementor/ui';
|
|
3
|
+
|
|
3
4
|
import { MenuContextProvider } from '../../contexts/menu-context';
|
|
4
5
|
|
|
5
6
|
export type PopoverMenuProps = MenuProps & {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { useState } from 'react';
|
|
3
|
+
import { styled, SvgIcon, type SvgIconProps, ToggleButton, type ToggleButtonProps } from '@elementor/ui';
|
|
3
4
|
import { __ } from '@wordpress/i18n';
|
|
4
|
-
import { ToggleButton, ToggleButtonProps, SvgIconProps, SvgIcon, styled } from '@elementor/ui';
|
|
5
5
|
|
|
6
6
|
interface StyledElementorLogoProps extends SvgIconProps {
|
|
7
7
|
showMenuIcon?: boolean;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Box, IconButton, IconButtonProps, Tooltip as BaseTooltip, TooltipProps } from '@elementor/ui';
|
|
2
|
+
import { Box, IconButton, type IconButtonProps, Tooltip as BaseTooltip, type TooltipProps } from '@elementor/ui';
|
|
3
3
|
|
|
4
4
|
export type ToolbarMenuItemProps = IconButtonProps & {
|
|
5
5
|
title?: string;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { PropsWithChildren } from 'react';
|
|
2
|
+
import { type PropsWithChildren } from 'react';
|
|
3
|
+
import { DotsVerticalIcon } from '@elementor/icons';
|
|
3
4
|
import { bindMenu, bindTrigger, usePopupState } from '@elementor/ui';
|
|
4
|
-
import ToolbarMenuItem from './toolbar-menu-item';
|
|
5
5
|
import { __ } from '@wordpress/i18n';
|
|
6
|
-
|
|
6
|
+
|
|
7
7
|
import PopoverMenu from './popover-menu';
|
|
8
|
+
import ToolbarMenuItem from './toolbar-menu-item';
|
|
8
9
|
|
|
9
10
|
export type ToolbarMenuMoreProps = PropsWithChildren< {
|
|
10
11
|
id: string;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Box, ToggleButton, ToggleButtonProps, Tooltip } from '@elementor/ui';
|
|
2
|
+
import { Box, ToggleButton, type ToggleButtonProps, Tooltip } from '@elementor/ui';
|
|
3
3
|
|
|
4
4
|
export type ToolbarMenuToggleItemProps = Omit< ToggleButtonProps, 'onChange' > & {
|
|
5
5
|
title?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { createContext, PropsWithChildren, useContext } from 'react';
|
|
3
|
-
import { PopupState } from '@elementor/ui';
|
|
2
|
+
import { createContext, type PropsWithChildren, useContext } from 'react';
|
|
3
|
+
import { type PopupState } from '@elementor/ui';
|
|
4
4
|
|
|
5
5
|
type MenuContextValue = {
|
|
6
6
|
type: 'toolbar' | 'popover';
|
|
@@ -1,16 +1,17 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
__useActiveDocument as useActiveDocument,
|
|
4
|
+
__useHostDocument as useHostDocument,
|
|
5
|
+
} from '@elementor/editor-documents';
|
|
4
6
|
import {
|
|
5
7
|
__privateOpenRoute as openRoute,
|
|
6
8
|
__privateUseRouteStatus as useRouteStatus,
|
|
7
9
|
} from '@elementor/editor-v1-adapters';
|
|
8
10
|
import { SettingsIcon } from '@elementor/icons';
|
|
9
|
-
import {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
} from '
|
|
13
|
-
import { ExtendedWindow } from '../../../types';
|
|
11
|
+
import { Box, ToggleButton, Tooltip as BaseTooltip, type TooltipProps } from '@elementor/ui';
|
|
12
|
+
import { __ } from '@wordpress/i18n';
|
|
13
|
+
|
|
14
|
+
import { type ExtendedWindow } from '../../../types';
|
|
14
15
|
|
|
15
16
|
export default function SettingsButton() {
|
|
16
17
|
const activeDocument = useActiveDocument();
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { __ } from '@wordpress/i18n';
|
|
2
|
-
import { EyeIcon } from '@elementor/icons';
|
|
3
|
-
import { __privateRunCommand as runCommand } from '@elementor/editor-v1-adapters';
|
|
4
1
|
import { __useActiveDocument as useActiveDocument } from '@elementor/editor-documents';
|
|
5
|
-
import {
|
|
2
|
+
import { __privateRunCommand as runCommand } from '@elementor/editor-v1-adapters';
|
|
3
|
+
import { EyeIcon } from '@elementor/icons';
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
|
+
|
|
6
|
+
import { type ExtendedWindow } from '../../../types';
|
|
6
7
|
|
|
7
8
|
export default function useActionProps() {
|
|
8
9
|
const document = useActiveDocument();
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { Divider, styled } from '@elementor/ui';
|
|
3
|
-
|
|
3
|
+
|
|
4
|
+
import { default as PopoverMenu, type PopoverMenuProps } from '../../../components/ui/popover-menu';
|
|
4
5
|
import { documentOptionsMenu } from '../locations';
|
|
5
6
|
|
|
6
7
|
const { useMenuItems } = documentOptionsMenu;
|
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import {
|
|
3
|
-
|
|
2
|
+
import {
|
|
3
|
+
__useActiveDocument as useActiveDocument,
|
|
4
|
+
__useActiveDocumentActions as useActiveDocumentActions,
|
|
5
|
+
type Document,
|
|
6
|
+
} from '@elementor/editor-documents';
|
|
7
|
+
import { __privateUseIsPreviewMode as useIsPreviewMode } from '@elementor/editor-v1-adapters';
|
|
8
|
+
import { ChevronDownIcon } from '@elementor/icons';
|
|
4
9
|
import {
|
|
5
10
|
bindMenu,
|
|
6
11
|
bindTrigger,
|
|
@@ -11,14 +16,10 @@ import {
|
|
|
11
16
|
Tooltip,
|
|
12
17
|
usePopupState,
|
|
13
18
|
} from '@elementor/ui';
|
|
14
|
-
import {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
} from '@elementor/editor-documents';
|
|
19
|
-
import { ChevronDownIcon } from '@elementor/icons';
|
|
20
|
-
import { __privateUseIsPreviewMode as useIsPreviewMode } from '@elementor/editor-v1-adapters';
|
|
21
|
-
import { ExtendedWindow } from '../../../types';
|
|
19
|
+
import { __ } from '@wordpress/i18n';
|
|
20
|
+
|
|
21
|
+
import { type ExtendedWindow } from '../../../types';
|
|
22
|
+
import PrimaryActionMenu from './primary-action-menu';
|
|
22
23
|
|
|
23
24
|
export default function PrimaryAction() {
|
|
24
25
|
const document = useActiveDocument();
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { __ } from '@wordpress/i18n';
|
|
2
|
-
import { ActionProps } from '../../../types';
|
|
3
|
-
import { LinkIcon } from '@elementor/icons';
|
|
4
1
|
import {
|
|
5
2
|
__useActiveDocument as useActiveDocument,
|
|
6
3
|
__useActiveDocumentActions as useActiveDocumentActions,
|
|
7
4
|
} from '@elementor/editor-documents';
|
|
5
|
+
import { LinkIcon } from '@elementor/icons';
|
|
6
|
+
import { __ } from '@wordpress/i18n';
|
|
7
|
+
|
|
8
|
+
import { type ActionProps } from '../../../types';
|
|
8
9
|
|
|
9
10
|
export default function useDocumentCopyAndShareProps(): ActionProps {
|
|
10
11
|
const document = useActiveDocument();
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { __ } from '@wordpress/i18n';
|
|
2
|
-
import { ActionProps } from '../../../types';
|
|
3
|
-
import { FileReportIcon } from '@elementor/icons';
|
|
4
1
|
import {
|
|
5
2
|
__useActiveDocument as useActiveDocument,
|
|
6
3
|
__useActiveDocumentActions as useActiveDocumentActions,
|
|
7
4
|
} from '@elementor/editor-documents';
|
|
5
|
+
import { FileReportIcon } from '@elementor/icons';
|
|
6
|
+
import { __ } from '@wordpress/i18n';
|
|
7
|
+
|
|
8
|
+
import { type ActionProps } from '../../../types';
|
|
8
9
|
|
|
9
10
|
export default function useDocumentSaveDraftProps(): ActionProps {
|
|
10
11
|
const document = useActiveDocument();
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { __ } from '@wordpress/i18n';
|
|
2
|
-
import { ActionProps } from '../../../types';
|
|
3
|
-
import { FolderIcon } from '@elementor/icons';
|
|
4
1
|
import { __useActiveDocumentActions as useActiveDocumentActions } from '@elementor/editor-documents';
|
|
2
|
+
import { FolderIcon } from '@elementor/icons';
|
|
3
|
+
import { __ } from '@wordpress/i18n';
|
|
4
|
+
|
|
5
|
+
import { type ActionProps } from '../../../types';
|
|
5
6
|
|
|
6
7
|
export default function useDocumentSaveTemplateProps(): ActionProps {
|
|
7
8
|
const { saveTemplate } = useActiveDocumentActions();
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { __ } from '@wordpress/i18n';
|
|
2
|
-
import { EyeIcon } from '@elementor/icons';
|
|
3
1
|
import { __useActiveDocument as useActiveDocument } from '@elementor/editor-documents';
|
|
4
2
|
import { __privateRunCommand as runCommand } from '@elementor/editor-v1-adapters';
|
|
3
|
+
import { EyeIcon } from '@elementor/icons';
|
|
4
|
+
import { __ } from '@wordpress/i18n';
|
|
5
5
|
|
|
6
6
|
export default function useDocumentViewPageProps() {
|
|
7
7
|
const document = useActiveDocument();
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { injectIntoPrimaryAction } from '../../locations';
|
|
2
|
+
import PrimaryAction from './components/primary-action';
|
|
3
|
+
import useDocumentCopyAndShareProps from './hooks/use-document-copy-and-share-props';
|
|
2
4
|
import useDocumentSaveDraftProps from './hooks/use-document-save-draft-props';
|
|
3
5
|
import useDocumentSaveTemplateProps from './hooks/use-document-save-template-props';
|
|
4
6
|
import useDocumentViewPageProps from './hooks/use-document-view-page-props';
|
|
5
|
-
import PrimaryAction from './components/primary-action';
|
|
6
7
|
import { documentOptionsMenu } from './locations';
|
|
7
|
-
import useDocumentCopyAndShareProps from './hooks/use-document-copy-and-share-props';
|
|
8
8
|
|
|
9
9
|
export function init() {
|
|
10
10
|
injectIntoPrimaryAction( {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { PlusIcon } from '@elementor/icons';
|
|
2
|
-
import { __ } from '@wordpress/i18n';
|
|
3
1
|
import {
|
|
4
2
|
__privateOpenRoute as openRoute,
|
|
5
3
|
__privateUseRouteStatus as useRouteStatus,
|
|
6
4
|
} from '@elementor/editor-v1-adapters';
|
|
7
|
-
import {
|
|
5
|
+
import { PlusIcon } from '@elementor/icons';
|
|
6
|
+
import { __ } from '@wordpress/i18n';
|
|
7
|
+
|
|
8
|
+
import { type ExtendedWindow } from '../../../types';
|
|
8
9
|
|
|
9
10
|
export default function useActionProps() {
|
|
10
11
|
const { isActive, isBlocked } = useRouteStatus( 'panel/elements' );
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { __ } from '@wordpress/i18n';
|
|
2
1
|
import {
|
|
3
2
|
__privateIsRouteActive as isRouteActive,
|
|
4
3
|
__privateListenTo as listenTo,
|
|
5
4
|
routeOpenEvent,
|
|
6
5
|
v1ReadyEvent,
|
|
7
6
|
} from '@elementor/editor-v1-adapters';
|
|
7
|
+
import { __ } from '@wordpress/i18n';
|
|
8
8
|
|
|
9
9
|
type ExtendedWindow = Window & {
|
|
10
10
|
elementor: {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { __ } from '@wordpress/i18n';
|
|
2
|
-
import { SearchIcon } from '@elementor/icons';
|
|
3
1
|
import {
|
|
4
2
|
__privateRunCommand as runCommand,
|
|
5
3
|
__privateUseRouteStatus as useRouteStatus,
|
|
6
4
|
} from '@elementor/editor-v1-adapters';
|
|
7
|
-
import {
|
|
5
|
+
import { SearchIcon } from '@elementor/icons';
|
|
6
|
+
import { __ } from '@wordpress/i18n';
|
|
7
|
+
|
|
8
|
+
import { type ExtendedWindow } from '../../../types';
|
|
8
9
|
|
|
9
10
|
export default function useActionProps() {
|
|
10
11
|
const { isBlocked } = useRouteStatus( 'finder', {
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { utilitiesMenu } from '../../locations';
|
|
2
|
-
import { __ } from '@wordpress/i18n';
|
|
3
1
|
import { HelpIcon } from '@elementor/icons';
|
|
4
|
-
import {
|
|
2
|
+
import { __ } from '@wordpress/i18n';
|
|
3
|
+
|
|
4
|
+
import { utilitiesMenu } from '../../locations';
|
|
5
|
+
import { type ExtendedWindow } from '../../types';
|
|
5
6
|
|
|
6
7
|
export function init() {
|
|
7
8
|
utilitiesMenu.registerLink( {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { HistoryIcon } from '@elementor/icons';
|
|
2
|
-
import { __ } from '@wordpress/i18n';
|
|
3
1
|
import {
|
|
4
2
|
__privateOpenRoute as openRoute,
|
|
5
3
|
__privateUseRouteStatus as useRouteStatus,
|
|
6
4
|
} from '@elementor/editor-v1-adapters';
|
|
7
|
-
import {
|
|
5
|
+
import { HistoryIcon } from '@elementor/icons';
|
|
6
|
+
import { __ } from '@wordpress/i18n';
|
|
7
|
+
|
|
8
|
+
import { type ExtendedWindow } from '../../../types';
|
|
8
9
|
|
|
9
10
|
export default function useActionProps() {
|
|
10
11
|
const { isActive, isBlocked } = useRouteStatus( 'panel/history' );
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { __ } from '@wordpress/i18n';
|
|
2
|
-
import { KeyboardIcon } from '@elementor/icons';
|
|
3
1
|
import { __privateRunCommand as runCommand } from '@elementor/editor-v1-adapters';
|
|
4
|
-
import {
|
|
2
|
+
import { KeyboardIcon } from '@elementor/icons';
|
|
3
|
+
import { __ } from '@wordpress/i18n';
|
|
4
|
+
|
|
5
|
+
import { type ActionProps, type ExtendedWindow } from '../../../types';
|
|
5
6
|
|
|
6
7
|
export default function useActionProps(): ActionProps {
|
|
7
8
|
return {
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { __ } from '@wordpress/i18n';
|
|
3
|
-
import { ExtendedWindow } from '../../../types';
|
|
4
|
-
import { Tab, Tabs, Tooltip as BaseTooltip, TooltipProps } from '@elementor/ui';
|
|
5
2
|
import {
|
|
6
|
-
|
|
3
|
+
type BreakpointId,
|
|
7
4
|
useActivateBreakpoint,
|
|
8
5
|
useActiveBreakpoint,
|
|
9
|
-
|
|
6
|
+
useBreakpoints,
|
|
10
7
|
} from '@elementor/editor-responsive';
|
|
11
8
|
import {
|
|
12
9
|
DesktopIcon,
|
|
13
|
-
TabletPortraitIcon,
|
|
14
|
-
MobilePortraitIcon,
|
|
15
|
-
WidescreenIcon,
|
|
16
10
|
LaptopIcon,
|
|
17
|
-
TabletLandscapeIcon,
|
|
18
11
|
MobileLandscapeIcon,
|
|
12
|
+
MobilePortraitIcon,
|
|
13
|
+
TabletLandscapeIcon,
|
|
14
|
+
TabletPortraitIcon,
|
|
15
|
+
WidescreenIcon,
|
|
19
16
|
} from '@elementor/icons';
|
|
17
|
+
import { Tab, Tabs, Tooltip as BaseTooltip, type TooltipProps } from '@elementor/ui';
|
|
18
|
+
import { __ } from '@wordpress/i18n';
|
|
19
|
+
|
|
20
|
+
import { type ExtendedWindow } from '../../../types';
|
|
20
21
|
|
|
21
22
|
export default function BreakpointsSwitcher() {
|
|
22
23
|
const breakpoints = useBreakpoints();
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
|
-
import { Portal as BasePortal, PortalProps } from '@elementor/ui';
|
|
3
2
|
import {
|
|
4
3
|
__privateIsRouteActive as isRouteActive,
|
|
4
|
+
__privateUseListenTo as useListenTo,
|
|
5
5
|
routeCloseEvent,
|
|
6
6
|
routeOpenEvent,
|
|
7
|
-
__privateUseListenTo as useListenTo,
|
|
8
7
|
} from '@elementor/editor-v1-adapters';
|
|
8
|
+
import { Portal as BasePortal, type PortalProps } from '@elementor/ui';
|
|
9
9
|
|
|
10
10
|
export default function Portal( props: Omit< PortalProps, 'container' > ) {
|
|
11
11
|
const containerRef = useListenTo(
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { __ } from '@wordpress/i18n';
|
|
2
1
|
import {
|
|
3
2
|
__privateRunCommand as runCommand,
|
|
4
3
|
__privateUseRouteStatus as useRouteStatus,
|
|
5
4
|
} from '@elementor/editor-v1-adapters';
|
|
6
5
|
import { AdjustmentsHorizontalIcon } from '@elementor/icons';
|
|
7
|
-
import {
|
|
6
|
+
import { __ } from '@wordpress/i18n';
|
|
7
|
+
|
|
8
|
+
import { type ExtendedWindow, type ToggleActionProps } from '../../../types';
|
|
8
9
|
|
|
9
10
|
export default function useActionProps(): ToggleActionProps {
|
|
10
11
|
const { isActive, isBlocked } = useRouteStatus( 'panel/global', {
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { injectIntoTop } from '@elementor/editor';
|
|
2
|
-
|
|
2
|
+
|
|
3
3
|
import { toolsMenu } from '../../locations';
|
|
4
|
+
import PortalledPrimaryAction from './components/portalled-primary-action';
|
|
4
5
|
import useActionProps from './hooks/use-action-props';
|
|
5
6
|
|
|
6
7
|
export function init() {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { __ } from '@wordpress/i18n';
|
|
2
1
|
import {
|
|
3
2
|
__privateRunCommand as runCommand,
|
|
4
3
|
__privateUseRouteStatus as useRouteStatus,
|
|
5
4
|
} from '@elementor/editor-v1-adapters';
|
|
6
5
|
import { StructureIcon } from '@elementor/icons';
|
|
7
|
-
import {
|
|
6
|
+
import { __ } from '@wordpress/i18n';
|
|
7
|
+
|
|
8
|
+
import { type ExtendedWindow, type ToggleActionProps } from '../../../types';
|
|
8
9
|
|
|
9
10
|
export default function useActionProps(): ToggleActionProps {
|
|
10
11
|
const { isActive, isBlocked } = useRouteStatus( 'navigator' );
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import { __ } from '@wordpress/i18n';
|
|
2
|
-
import { ThemeBuilderIcon } from '@elementor/icons';
|
|
3
1
|
import { __privateRunCommand as runCommand } from '@elementor/editor-v1-adapters';
|
|
4
|
-
import {
|
|
2
|
+
import { ThemeBuilderIcon } from '@elementor/icons';
|
|
3
|
+
import { __ } from '@wordpress/i18n';
|
|
4
|
+
|
|
5
|
+
import { type ActionProps, type ExtendedWindow } from '../../../types';
|
|
5
6
|
|
|
6
7
|
export default function useActionProps(): ActionProps {
|
|
7
8
|
return {
|
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import { __ } from '@wordpress/i18n';
|
|
2
|
-
import { ToggleRightIcon } from '@elementor/icons';
|
|
3
1
|
import {
|
|
4
2
|
__privateOpenRoute as openRoute,
|
|
5
3
|
__privateUseRouteStatus as useRouteStatus,
|
|
6
4
|
} from '@elementor/editor-v1-adapters';
|
|
7
|
-
import {
|
|
5
|
+
import { ToggleRightIcon } from '@elementor/icons';
|
|
6
|
+
import { __ } from '@wordpress/i18n';
|
|
7
|
+
|
|
8
|
+
import { type ExtendedWindow, type ToggleActionProps } from '../../../types';
|
|
8
9
|
|
|
9
10
|
export default function useActionProps(): ToggleActionProps {
|
|
10
11
|
const { isActive, isBlocked } = useRouteStatus( 'panel/editor-preferences' );
|
|
@@ -1,8 +1,9 @@
|
|
|
1
|
-
import { mainMenu } from '../../locations';
|
|
2
|
-
import { __ } from '@wordpress/i18n';
|
|
3
|
-
import { WordpressIcon } from '@elementor/icons';
|
|
4
1
|
import { __useActiveDocument as useActiveDocument } from '@elementor/editor-documents';
|
|
5
|
-
import {
|
|
2
|
+
import { WordpressIcon } from '@elementor/icons';
|
|
3
|
+
import { __ } from '@wordpress/i18n';
|
|
4
|
+
|
|
5
|
+
import { mainMenu } from '../../locations';
|
|
6
|
+
import { type ExtendedWindow } from '../../types';
|
|
6
7
|
|
|
7
8
|
export function init() {
|
|
8
9
|
mainMenu.registerLink( {
|
package/src/init.ts
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
|
-
import AppBar from './components/app-bar';
|
|
2
1
|
import { injectIntoTop } from '@elementor/editor';
|
|
3
|
-
|
|
2
|
+
|
|
3
|
+
import AppBar from './components/app-bar';
|
|
4
4
|
import { init as initExtensions } from './extensions';
|
|
5
|
+
import redirectOldMenus from './sync/redirect-old-menus';
|
|
5
6
|
|
|
6
7
|
export default function init() {
|
|
7
8
|
redirectOldMenus();
|
package/src/locations.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { createLocation } from '@elementor/locations';
|
|
2
2
|
import { createMenu } from '@elementor/menus';
|
|
3
|
+
|
|
3
4
|
import Action from './components/actions/action';
|
|
4
5
|
import Link from './components/actions/link';
|
|
5
6
|
import ToggleAction from './components/actions/toggle-action';
|