@elementor/editor-app-bar 0.18.0 → 0.19.1
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 +23 -0
- package/dist/index.d.mts +34 -50
- package/dist/index.d.ts +34 -50
- package/dist/index.js +138 -286
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +117 -265
- package/dist/index.mjs.map +1 -1
- package/package.json +6 -5
- package/src/extensions/documents-save/locations.ts +12 -2
- package/src/extensions/help/index.ts +1 -1
- package/src/locations.ts +28 -0
- package/src/components/actions/actions-group.tsx +0 -69
- package/src/components/ui/popover-sub-menu.tsx +0 -26
- package/src/locations/index.ts +0 -18
- package/src/locations/menus.tsx +0 -157
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,28 @@
|
|
|
1
1
|
# Change Log
|
|
2
2
|
|
|
3
|
+
## 0.19.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- e751ae6: Swap positions between the help and preview-changes icons
|
|
8
|
+
|
|
9
|
+
## 0.19.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- cf81790: Update `@elementor/icons` version
|
|
14
|
+
- 0e70721: Update `@elementor/ui` and `@elementor/icons` versions
|
|
15
|
+
|
|
16
|
+
### Patch Changes
|
|
17
|
+
|
|
18
|
+
- 0f30451: Adding spacing icons to `editor-editing-panel`
|
|
19
|
+
- 66df921: Extract menus logic into a dedicated package
|
|
20
|
+
- Updated dependencies [0e70721]
|
|
21
|
+
- Updated dependencies [66df921]
|
|
22
|
+
- @elementor/editor@0.14.0
|
|
23
|
+
- @elementor/menus@0.1.0
|
|
24
|
+
- @elementor/editor-documents@0.11.9
|
|
25
|
+
|
|
3
26
|
## 0.18.0
|
|
4
27
|
|
|
5
28
|
### Minor Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1,26 +1,16 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { ElementType, ComponentPropsWithoutRef } from 'react';
|
|
1
|
+
import * as _elementor_menus from '@elementor/menus';
|
|
3
2
|
import * as _elementor_locations from '@elementor/locations';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
title: string;
|
|
7
|
-
icon: ElementType;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
visible?: boolean;
|
|
10
|
-
onClick?: () => void;
|
|
11
|
-
};
|
|
12
|
-
declare function Action({ icon: Icon, title, visible, ...props }: Props$3): React.JSX.Element | null;
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ElementType } from 'react';
|
|
13
5
|
|
|
14
6
|
type Props$2 = {
|
|
15
7
|
title: string;
|
|
16
8
|
icon: ElementType;
|
|
17
|
-
selected?: boolean;
|
|
18
9
|
disabled?: boolean;
|
|
19
10
|
visible?: boolean;
|
|
20
11
|
onClick?: () => void;
|
|
21
|
-
value?: string;
|
|
22
12
|
};
|
|
23
|
-
declare function
|
|
13
|
+
declare function Action({ icon: Icon, title, visible, ...props }: Props$2): React.JSX.Element | null;
|
|
24
14
|
|
|
25
15
|
type Props$1 = {
|
|
26
16
|
title: string;
|
|
@@ -34,48 +24,42 @@ declare function Link({ icon: Icon, title, visible, ...props }: Props$1): React.
|
|
|
34
24
|
type Props = {
|
|
35
25
|
title: string;
|
|
36
26
|
icon: ElementType;
|
|
27
|
+
selected?: boolean;
|
|
37
28
|
disabled?: boolean;
|
|
38
29
|
visible?: boolean;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
declare function ActionsGroup({ icon: Icon, title, visible, items, ...props }: Props): React.JSX.Element | null;
|
|
42
|
-
|
|
43
|
-
type GroupName = string;
|
|
44
|
-
type MenuGroup<TGroup extends GroupName> = TGroup | 'default';
|
|
45
|
-
type ItemsArray = Array<{
|
|
46
|
-
id: string;
|
|
47
|
-
MenuItem: ElementType;
|
|
48
|
-
}>;
|
|
49
|
-
type GroupedItems<TGroup extends GroupName> = Record<MenuGroup<TGroup>, ItemsArray>;
|
|
50
|
-
type ItemConfigProps<TComponent extends ElementType> = Omit<ComponentPropsWithoutRef<TComponent>, 'items'>;
|
|
51
|
-
type MenuItem<TGroup extends GroupName, TComponent extends ElementType> = {
|
|
52
|
-
id: string;
|
|
53
|
-
group?: TGroup;
|
|
54
|
-
priority?: number;
|
|
55
|
-
overwrite?: boolean;
|
|
56
|
-
} & ({
|
|
57
|
-
props: ItemConfigProps<TComponent>;
|
|
58
|
-
useProps?: never;
|
|
59
|
-
} | {
|
|
60
|
-
useProps: () => ItemConfigProps<TComponent>;
|
|
61
|
-
props?: never;
|
|
62
|
-
});
|
|
63
|
-
type MenuActions<TGroup extends GroupName> = {
|
|
64
|
-
registerAction: (args: MenuItem<TGroup, typeof Action>) => void;
|
|
65
|
-
registerToggleAction: (args: MenuItem<TGroup, typeof ToggleAction>) => void;
|
|
66
|
-
registerLink: (args: MenuItem<TGroup, typeof Link>) => void;
|
|
67
|
-
registerSubMenu: (args: MenuItem<'default', typeof ActionsGroup>) => MenuActions<'default'>;
|
|
68
|
-
useMenuItems: () => GroupedItems<TGroup>;
|
|
30
|
+
onClick?: () => void;
|
|
31
|
+
value?: string;
|
|
69
32
|
};
|
|
33
|
+
declare function ToggleAction({ icon: Icon, title, value, visible, ...props }: Props): React.JSX.Element | null;
|
|
70
34
|
|
|
71
35
|
declare const injectIntoPageIndication: (args: _elementor_locations.InjectArgs<object>) => void;
|
|
72
36
|
declare const injectIntoResponsive: (args: _elementor_locations.InjectArgs<object>) => void;
|
|
73
37
|
declare const injectIntoPrimaryAction: (args: _elementor_locations.InjectArgs<object>) => void;
|
|
74
|
-
declare const mainMenu:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
38
|
+
declare const mainMenu: _elementor_menus.Menu<{
|
|
39
|
+
Action: typeof Action;
|
|
40
|
+
ToggleAction: typeof ToggleAction;
|
|
41
|
+
Link: typeof Link;
|
|
42
|
+
}, "exits">;
|
|
43
|
+
declare const toolsMenu: _elementor_menus.Menu<{
|
|
44
|
+
Action: typeof Action;
|
|
45
|
+
ToggleAction: typeof ToggleAction;
|
|
46
|
+
Link: typeof Link;
|
|
47
|
+
}, "default">;
|
|
48
|
+
declare const utilitiesMenu: _elementor_menus.Menu<{
|
|
49
|
+
Action: typeof Action;
|
|
50
|
+
ToggleAction: typeof ToggleAction;
|
|
51
|
+
Link: typeof Link;
|
|
52
|
+
}, "default">;
|
|
53
|
+
declare const integrationsMenu: _elementor_menus.Menu<{
|
|
54
|
+
Action: typeof Action;
|
|
55
|
+
ToggleAction: typeof ToggleAction;
|
|
56
|
+
Link: typeof Link;
|
|
57
|
+
}, "default">;
|
|
78
58
|
|
|
79
|
-
declare const documentOptionsMenu:
|
|
59
|
+
declare const documentOptionsMenu: _elementor_menus.Menu<{
|
|
60
|
+
Action: typeof Action;
|
|
61
|
+
ToggleAction: typeof ToggleAction;
|
|
62
|
+
Link: typeof Link;
|
|
63
|
+
}, "save">;
|
|
80
64
|
|
|
81
|
-
export { type Props$
|
|
65
|
+
export { type Props$2 as ActionProps, type Props$1 as LinkProps, type Props as ToggleActionProps, documentOptionsMenu, injectIntoPageIndication, injectIntoPrimaryAction, injectIntoResponsive, integrationsMenu, mainMenu, toolsMenu, utilitiesMenu };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,26 +1,16 @@
|
|
|
1
|
-
import * as
|
|
2
|
-
import { ElementType, ComponentPropsWithoutRef } from 'react';
|
|
1
|
+
import * as _elementor_menus from '@elementor/menus';
|
|
3
2
|
import * as _elementor_locations from '@elementor/locations';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
title: string;
|
|
7
|
-
icon: ElementType;
|
|
8
|
-
disabled?: boolean;
|
|
9
|
-
visible?: boolean;
|
|
10
|
-
onClick?: () => void;
|
|
11
|
-
};
|
|
12
|
-
declare function Action({ icon: Icon, title, visible, ...props }: Props$3): React.JSX.Element | null;
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { ElementType } from 'react';
|
|
13
5
|
|
|
14
6
|
type Props$2 = {
|
|
15
7
|
title: string;
|
|
16
8
|
icon: ElementType;
|
|
17
|
-
selected?: boolean;
|
|
18
9
|
disabled?: boolean;
|
|
19
10
|
visible?: boolean;
|
|
20
11
|
onClick?: () => void;
|
|
21
|
-
value?: string;
|
|
22
12
|
};
|
|
23
|
-
declare function
|
|
13
|
+
declare function Action({ icon: Icon, title, visible, ...props }: Props$2): React.JSX.Element | null;
|
|
24
14
|
|
|
25
15
|
type Props$1 = {
|
|
26
16
|
title: string;
|
|
@@ -34,48 +24,42 @@ declare function Link({ icon: Icon, title, visible, ...props }: Props$1): React.
|
|
|
34
24
|
type Props = {
|
|
35
25
|
title: string;
|
|
36
26
|
icon: ElementType;
|
|
27
|
+
selected?: boolean;
|
|
37
28
|
disabled?: boolean;
|
|
38
29
|
visible?: boolean;
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
declare function ActionsGroup({ icon: Icon, title, visible, items, ...props }: Props): React.JSX.Element | null;
|
|
42
|
-
|
|
43
|
-
type GroupName = string;
|
|
44
|
-
type MenuGroup<TGroup extends GroupName> = TGroup | 'default';
|
|
45
|
-
type ItemsArray = Array<{
|
|
46
|
-
id: string;
|
|
47
|
-
MenuItem: ElementType;
|
|
48
|
-
}>;
|
|
49
|
-
type GroupedItems<TGroup extends GroupName> = Record<MenuGroup<TGroup>, ItemsArray>;
|
|
50
|
-
type ItemConfigProps<TComponent extends ElementType> = Omit<ComponentPropsWithoutRef<TComponent>, 'items'>;
|
|
51
|
-
type MenuItem<TGroup extends GroupName, TComponent extends ElementType> = {
|
|
52
|
-
id: string;
|
|
53
|
-
group?: TGroup;
|
|
54
|
-
priority?: number;
|
|
55
|
-
overwrite?: boolean;
|
|
56
|
-
} & ({
|
|
57
|
-
props: ItemConfigProps<TComponent>;
|
|
58
|
-
useProps?: never;
|
|
59
|
-
} | {
|
|
60
|
-
useProps: () => ItemConfigProps<TComponent>;
|
|
61
|
-
props?: never;
|
|
62
|
-
});
|
|
63
|
-
type MenuActions<TGroup extends GroupName> = {
|
|
64
|
-
registerAction: (args: MenuItem<TGroup, typeof Action>) => void;
|
|
65
|
-
registerToggleAction: (args: MenuItem<TGroup, typeof ToggleAction>) => void;
|
|
66
|
-
registerLink: (args: MenuItem<TGroup, typeof Link>) => void;
|
|
67
|
-
registerSubMenu: (args: MenuItem<'default', typeof ActionsGroup>) => MenuActions<'default'>;
|
|
68
|
-
useMenuItems: () => GroupedItems<TGroup>;
|
|
30
|
+
onClick?: () => void;
|
|
31
|
+
value?: string;
|
|
69
32
|
};
|
|
33
|
+
declare function ToggleAction({ icon: Icon, title, value, visible, ...props }: Props): React.JSX.Element | null;
|
|
70
34
|
|
|
71
35
|
declare const injectIntoPageIndication: (args: _elementor_locations.InjectArgs<object>) => void;
|
|
72
36
|
declare const injectIntoResponsive: (args: _elementor_locations.InjectArgs<object>) => void;
|
|
73
37
|
declare const injectIntoPrimaryAction: (args: _elementor_locations.InjectArgs<object>) => void;
|
|
74
|
-
declare const mainMenu:
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
38
|
+
declare const mainMenu: _elementor_menus.Menu<{
|
|
39
|
+
Action: typeof Action;
|
|
40
|
+
ToggleAction: typeof ToggleAction;
|
|
41
|
+
Link: typeof Link;
|
|
42
|
+
}, "exits">;
|
|
43
|
+
declare const toolsMenu: _elementor_menus.Menu<{
|
|
44
|
+
Action: typeof Action;
|
|
45
|
+
ToggleAction: typeof ToggleAction;
|
|
46
|
+
Link: typeof Link;
|
|
47
|
+
}, "default">;
|
|
48
|
+
declare const utilitiesMenu: _elementor_menus.Menu<{
|
|
49
|
+
Action: typeof Action;
|
|
50
|
+
ToggleAction: typeof ToggleAction;
|
|
51
|
+
Link: typeof Link;
|
|
52
|
+
}, "default">;
|
|
53
|
+
declare const integrationsMenu: _elementor_menus.Menu<{
|
|
54
|
+
Action: typeof Action;
|
|
55
|
+
ToggleAction: typeof ToggleAction;
|
|
56
|
+
Link: typeof Link;
|
|
57
|
+
}, "default">;
|
|
78
58
|
|
|
79
|
-
declare const documentOptionsMenu:
|
|
59
|
+
declare const documentOptionsMenu: _elementor_menus.Menu<{
|
|
60
|
+
Action: typeof Action;
|
|
61
|
+
ToggleAction: typeof ToggleAction;
|
|
62
|
+
Link: typeof Link;
|
|
63
|
+
}, "save">;
|
|
80
64
|
|
|
81
|
-
export { type Props$
|
|
65
|
+
export { type Props$2 as ActionProps, type Props$1 as LinkProps, type Props as ToggleActionProps, documentOptionsMenu, injectIntoPageIndication, injectIntoPrimaryAction, injectIntoResponsive, integrationsMenu, mainMenu, toolsMenu, utilitiesMenu };
|