@elementor/editor-app-bar 0.14.1 → 0.14.3
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 +19 -0
- package/dist/index.d.mts +78 -196
- package/dist/index.d.ts +78 -196
- package/dist/index.js +774 -201
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +734 -162
- package/dist/index.mjs.map +1 -1
- package/package.json +8 -8
- package/src/components/__tests__/app-bar.test.tsx +23 -0
- package/src/components/actions/action.tsx +33 -0
- package/src/components/actions/actions-group.tsx +69 -0
- package/src/components/actions/link.tsx +33 -0
- package/src/components/actions/toggle-action.tsx +35 -0
- package/src/components/app-bar.tsx +42 -0
- package/src/components/locations/__tests__/locations-components.test.tsx +37 -0
- package/src/components/locations/__tests__/menus.test.tsx +158 -0
- package/src/components/locations/integrations-menu-location.tsx +44 -0
- package/src/components/locations/main-menu-location.tsx +57 -0
- package/src/components/locations/page-indication-location.tsx +8 -0
- package/src/components/locations/primary-action-location.tsx +8 -0
- package/src/components/locations/responsive-location.tsx +8 -0
- package/src/components/locations/tools-menu-location.tsx +28 -0
- package/src/components/locations/utilities-menu-location.tsx +35 -0
- package/src/components/ui/popover-menu-item.tsx +47 -0
- package/src/components/ui/popover-menu.tsx +26 -0
- package/src/components/ui/popover-sub-menu.tsx +29 -0
- package/src/components/ui/toolbar-logo.tsx +84 -0
- package/src/components/ui/toolbar-menu-item.tsx +45 -0
- package/src/components/ui/toolbar-menu-more.tsx +29 -0
- package/src/components/ui/toolbar-menu-toggle-item.tsx +34 -0
- package/src/components/ui/toolbar-menu.tsx +15 -0
- package/src/contexts/menu-context.tsx +24 -0
- package/src/extensions/documents-indicator/index.ts +1 -1
- package/src/extensions/documents-preview/index.ts +1 -1
- package/src/extensions/documents-save/components/primary-action-menu.tsx +1 -1
- package/src/extensions/documents-save/hooks/use-document-copy-and-share-props.ts +1 -1
- package/src/extensions/documents-save/hooks/use-document-save-draft-props.ts +1 -1
- package/src/extensions/documents-save/hooks/use-document-save-template-props.ts +1 -1
- package/src/extensions/documents-save/index.ts +1 -1
- package/src/extensions/documents-save/locations.ts +1 -1
- package/src/extensions/elements/index.ts +1 -1
- package/src/extensions/finder/index.ts +1 -1
- package/src/extensions/help/index.ts +1 -1
- package/src/extensions/history/index.ts +1 -1
- package/src/extensions/keyboard-shortcuts/hooks/use-action-props.ts +1 -2
- package/src/extensions/keyboard-shortcuts/index.ts +1 -1
- package/src/extensions/site-settings/hooks/use-action-props.ts +1 -2
- package/src/extensions/site-settings/index.ts +1 -1
- package/src/extensions/structure/hooks/use-action-props.ts +1 -2
- package/src/extensions/structure/index.ts +1 -1
- package/src/extensions/theme-builder/hooks/use-action-props.ts +1 -2
- package/src/extensions/theme-builder/index.ts +1 -1
- package/src/extensions/user-preferences/hooks/use-action-props.ts +1 -2
- package/src/extensions/user-preferences/index.ts +1 -1
- package/src/extensions/wordpress/index.ts +1 -1
- package/src/index.ts +14 -10
- package/src/init.ts +1 -1
- package/src/locations/__tests__/menus.test.tsx +212 -0
- package/src/locations/index.ts +27 -0
- package/src/locations/menus.tsx +172 -0
- package/src/types.ts +4 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,25 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.14.3](https://github.com/elementor/elementor-packages/compare/@elementor/editor-app-bar@0.14.2...@elementor/editor-app-bar@0.14.3) (2024-07-03)
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
### Bug Fixes
|
|
10
|
+
|
|
11
|
+
* remove `editor-app-bar-ui` dependency ([#196](https://github.com/elementor/elementor-packages/issues/196)) ([d00721f](https://github.com/elementor/elementor-packages/commit/d00721ff19c07ac16d8546feccb3e695e33b865c))
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
## [0.14.2](https://github.com/elementor/elementor-packages/compare/@elementor/editor-app-bar@0.14.1...@elementor/editor-app-bar@0.14.2) (2024-07-03)
|
|
18
|
+
|
|
19
|
+
**Note:** Version bump only for package @elementor/editor-app-bar
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
|
|
6
25
|
## [0.14.1](https://github.com/elementor/elementor-packages/compare/@elementor/editor-app-bar@0.14.0...@elementor/editor-app-bar@0.14.1) (2024-07-02)
|
|
7
26
|
|
|
8
27
|
**Note:** Version bump only for package @elementor/editor-app-bar
|
package/dist/index.d.mts
CHANGED
|
@@ -1,199 +1,81 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ElementType, ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import * as _elementor_locations from '@elementor/locations';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} & ({
|
|
11
|
-
props: {
|
|
12
|
-
title: string;
|
|
13
|
-
onClick?: (() => void) | undefined;
|
|
14
|
-
disabled?: boolean | undefined;
|
|
15
|
-
icon: react.ElementType;
|
|
16
|
-
visible?: boolean | undefined;
|
|
17
|
-
};
|
|
18
|
-
useProps?: undefined;
|
|
19
|
-
} | {
|
|
20
|
-
useProps: () => {
|
|
21
|
-
title: string;
|
|
22
|
-
onClick?: (() => void) | undefined;
|
|
23
|
-
disabled?: boolean | undefined;
|
|
24
|
-
icon: react.ElementType;
|
|
25
|
-
visible?: boolean | undefined;
|
|
26
|
-
};
|
|
27
|
-
props?: undefined;
|
|
28
|
-
})) => void;
|
|
29
|
-
registerToggleAction: (args: {
|
|
30
|
-
id: string;
|
|
31
|
-
group?: ("default" | "save") | undefined;
|
|
32
|
-
priority?: number | undefined;
|
|
33
|
-
overwrite?: boolean | undefined;
|
|
34
|
-
} & ({
|
|
35
|
-
props: {
|
|
36
|
-
title: string;
|
|
37
|
-
onClick?: (() => void) | undefined;
|
|
38
|
-
value?: string | undefined;
|
|
39
|
-
selected?: boolean | undefined;
|
|
40
|
-
disabled?: boolean | undefined;
|
|
41
|
-
icon: react.ElementType;
|
|
42
|
-
visible?: boolean | undefined;
|
|
43
|
-
};
|
|
44
|
-
useProps?: undefined;
|
|
45
|
-
} | {
|
|
46
|
-
useProps: () => {
|
|
47
|
-
title: string;
|
|
48
|
-
onClick?: (() => void) | undefined;
|
|
49
|
-
value?: string | undefined;
|
|
50
|
-
selected?: boolean | undefined;
|
|
51
|
-
disabled?: boolean | undefined;
|
|
52
|
-
icon: react.ElementType;
|
|
53
|
-
visible?: boolean | undefined;
|
|
54
|
-
};
|
|
55
|
-
props?: undefined;
|
|
56
|
-
})) => void;
|
|
57
|
-
registerLink: (args: {
|
|
58
|
-
id: string;
|
|
59
|
-
group?: ("default" | "save") | undefined;
|
|
60
|
-
priority?: number | undefined;
|
|
61
|
-
overwrite?: boolean | undefined;
|
|
62
|
-
} & ({
|
|
63
|
-
props: {
|
|
64
|
-
title: string;
|
|
65
|
-
target?: string | undefined;
|
|
66
|
-
href?: string | undefined;
|
|
67
|
-
icon: react.ElementType;
|
|
68
|
-
visible?: boolean | undefined;
|
|
69
|
-
};
|
|
70
|
-
useProps?: undefined;
|
|
71
|
-
} | {
|
|
72
|
-
useProps: () => {
|
|
73
|
-
title: string;
|
|
74
|
-
target?: string | undefined;
|
|
75
|
-
href?: string | undefined;
|
|
76
|
-
icon: react.ElementType;
|
|
77
|
-
visible?: boolean | undefined;
|
|
78
|
-
};
|
|
79
|
-
props?: undefined;
|
|
80
|
-
})) => void;
|
|
81
|
-
registerSubMenu: (args: {
|
|
82
|
-
id: string;
|
|
83
|
-
group?: "default" | undefined;
|
|
84
|
-
priority?: number | undefined;
|
|
85
|
-
overwrite?: boolean | undefined;
|
|
86
|
-
} & ({
|
|
87
|
-
props: {
|
|
88
|
-
title: string;
|
|
89
|
-
disabled?: boolean | undefined;
|
|
90
|
-
icon: react.ElementType;
|
|
91
|
-
visible?: boolean | undefined;
|
|
92
|
-
};
|
|
93
|
-
useProps?: undefined;
|
|
94
|
-
} | {
|
|
95
|
-
useProps: () => {
|
|
96
|
-
title: string;
|
|
97
|
-
disabled?: boolean | undefined;
|
|
98
|
-
icon: react.ElementType;
|
|
99
|
-
visible?: boolean | undefined;
|
|
100
|
-
};
|
|
101
|
-
props?: undefined;
|
|
102
|
-
})) => {
|
|
103
|
-
registerAction: (args: {
|
|
104
|
-
id: string;
|
|
105
|
-
group?: "default" | undefined;
|
|
106
|
-
priority?: number | undefined;
|
|
107
|
-
overwrite?: boolean | undefined;
|
|
108
|
-
} & ({
|
|
109
|
-
props: {
|
|
110
|
-
title: string;
|
|
111
|
-
onClick?: (() => void) | undefined;
|
|
112
|
-
disabled?: boolean | undefined;
|
|
113
|
-
icon: react.ElementType;
|
|
114
|
-
visible?: boolean | undefined;
|
|
115
|
-
};
|
|
116
|
-
useProps?: undefined;
|
|
117
|
-
} | {
|
|
118
|
-
useProps: () => {
|
|
119
|
-
title: string;
|
|
120
|
-
onClick?: (() => void) | undefined;
|
|
121
|
-
disabled?: boolean | undefined;
|
|
122
|
-
icon: react.ElementType;
|
|
123
|
-
visible?: boolean | undefined;
|
|
124
|
-
};
|
|
125
|
-
props?: undefined;
|
|
126
|
-
})) => void;
|
|
127
|
-
registerToggleAction: (args: {
|
|
128
|
-
id: string;
|
|
129
|
-
group?: "default" | undefined;
|
|
130
|
-
priority?: number | undefined;
|
|
131
|
-
overwrite?: boolean | undefined;
|
|
132
|
-
} & ({
|
|
133
|
-
props: {
|
|
134
|
-
title: string;
|
|
135
|
-
onClick?: (() => void) | undefined;
|
|
136
|
-
value?: string | undefined;
|
|
137
|
-
selected?: boolean | undefined;
|
|
138
|
-
disabled?: boolean | undefined;
|
|
139
|
-
icon: react.ElementType;
|
|
140
|
-
visible?: boolean | undefined;
|
|
141
|
-
};
|
|
142
|
-
useProps?: undefined;
|
|
143
|
-
} | {
|
|
144
|
-
useProps: () => {
|
|
145
|
-
title: string;
|
|
146
|
-
onClick?: (() => void) | undefined;
|
|
147
|
-
value?: string | undefined;
|
|
148
|
-
selected?: boolean | undefined;
|
|
149
|
-
disabled?: boolean | undefined;
|
|
150
|
-
icon: react.ElementType;
|
|
151
|
-
visible?: boolean | undefined;
|
|
152
|
-
};
|
|
153
|
-
props?: undefined;
|
|
154
|
-
})) => void;
|
|
155
|
-
registerLink: (args: {
|
|
156
|
-
id: string;
|
|
157
|
-
group?: "default" | undefined;
|
|
158
|
-
priority?: number | undefined;
|
|
159
|
-
overwrite?: boolean | undefined;
|
|
160
|
-
} & ({
|
|
161
|
-
props: {
|
|
162
|
-
title: string;
|
|
163
|
-
target?: string | undefined;
|
|
164
|
-
href?: string | undefined;
|
|
165
|
-
icon: react.ElementType;
|
|
166
|
-
visible?: boolean | undefined;
|
|
167
|
-
};
|
|
168
|
-
useProps?: undefined;
|
|
169
|
-
} | {
|
|
170
|
-
useProps: () => {
|
|
171
|
-
title: string;
|
|
172
|
-
target?: string | undefined;
|
|
173
|
-
href?: string | undefined;
|
|
174
|
-
icon: react.ElementType;
|
|
175
|
-
visible?: boolean | undefined;
|
|
176
|
-
};
|
|
177
|
-
props?: undefined;
|
|
178
|
-
})) => void;
|
|
179
|
-
registerSubMenu: any;
|
|
180
|
-
useMenuItems: () => {
|
|
181
|
-
default: {
|
|
182
|
-
id: string;
|
|
183
|
-
MenuItem: react.ElementType;
|
|
184
|
-
}[];
|
|
185
|
-
};
|
|
186
|
-
};
|
|
187
|
-
useMenuItems: () => {
|
|
188
|
-
default: {
|
|
189
|
-
id: string;
|
|
190
|
-
MenuItem: react.ElementType;
|
|
191
|
-
}[];
|
|
192
|
-
save: {
|
|
193
|
-
id: string;
|
|
194
|
-
MenuItem: react.ElementType;
|
|
195
|
-
}[];
|
|
196
|
-
};
|
|
5
|
+
type Props$3 = {
|
|
6
|
+
title: string;
|
|
7
|
+
icon: ElementType;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
onClick?: () => void;
|
|
197
11
|
};
|
|
12
|
+
declare function Action({ icon: Icon, title, visible, ...props }: Props$3): React.JSX.Element | null;
|
|
198
13
|
|
|
199
|
-
|
|
14
|
+
type Props$2 = {
|
|
15
|
+
title: string;
|
|
16
|
+
icon: ElementType;
|
|
17
|
+
selected?: boolean;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
visible?: boolean;
|
|
20
|
+
onClick?: () => void;
|
|
21
|
+
value?: string;
|
|
22
|
+
};
|
|
23
|
+
declare function ToggleAction({ icon: Icon, title, value, visible, ...props }: Props$2): React.JSX.Element | null;
|
|
24
|
+
|
|
25
|
+
type Props$1 = {
|
|
26
|
+
title: string;
|
|
27
|
+
icon: ElementType;
|
|
28
|
+
href?: string;
|
|
29
|
+
visible?: boolean;
|
|
30
|
+
target?: string;
|
|
31
|
+
};
|
|
32
|
+
declare function Link({ icon: Icon, title, visible, ...props }: Props$1): React.JSX.Element | null;
|
|
33
|
+
|
|
34
|
+
type Props = {
|
|
35
|
+
title: string;
|
|
36
|
+
icon: ElementType;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
visible?: boolean;
|
|
39
|
+
items: ItemsArray;
|
|
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>;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
declare const injectIntoPageIndication: (args: _elementor_locations.InjectArgs<object>) => void;
|
|
72
|
+
declare const injectIntoResponsive: (args: _elementor_locations.InjectArgs<object>) => void;
|
|
73
|
+
declare const injectIntoPrimaryAction: (args: _elementor_locations.InjectArgs<object>) => void;
|
|
74
|
+
declare const mainMenu: MenuActions<"default" | "exits">;
|
|
75
|
+
declare const toolsMenu: MenuActions<"default">;
|
|
76
|
+
declare const utilitiesMenu: MenuActions<"default">;
|
|
77
|
+
declare const integrationsMenu: MenuActions<"default">;
|
|
78
|
+
|
|
79
|
+
declare const documentOptionsMenu: MenuActions<"default" | "save">;
|
|
80
|
+
|
|
81
|
+
export { Props$3 as ActionProps, Props$1 as LinkProps, Props$2 as ToggleActionProps, documentOptionsMenu, injectIntoPageIndication, injectIntoPrimaryAction, injectIntoResponsive, integrationsMenu, mainMenu, toolsMenu, utilitiesMenu };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,199 +1,81 @@
|
|
|
1
|
-
|
|
2
|
-
import
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { ElementType, ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
import * as _elementor_locations from '@elementor/locations';
|
|
3
4
|
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
} & ({
|
|
11
|
-
props: {
|
|
12
|
-
title: string;
|
|
13
|
-
onClick?: (() => void) | undefined;
|
|
14
|
-
disabled?: boolean | undefined;
|
|
15
|
-
icon: react.ElementType;
|
|
16
|
-
visible?: boolean | undefined;
|
|
17
|
-
};
|
|
18
|
-
useProps?: undefined;
|
|
19
|
-
} | {
|
|
20
|
-
useProps: () => {
|
|
21
|
-
title: string;
|
|
22
|
-
onClick?: (() => void) | undefined;
|
|
23
|
-
disabled?: boolean | undefined;
|
|
24
|
-
icon: react.ElementType;
|
|
25
|
-
visible?: boolean | undefined;
|
|
26
|
-
};
|
|
27
|
-
props?: undefined;
|
|
28
|
-
})) => void;
|
|
29
|
-
registerToggleAction: (args: {
|
|
30
|
-
id: string;
|
|
31
|
-
group?: ("default" | "save") | undefined;
|
|
32
|
-
priority?: number | undefined;
|
|
33
|
-
overwrite?: boolean | undefined;
|
|
34
|
-
} & ({
|
|
35
|
-
props: {
|
|
36
|
-
title: string;
|
|
37
|
-
onClick?: (() => void) | undefined;
|
|
38
|
-
value?: string | undefined;
|
|
39
|
-
selected?: boolean | undefined;
|
|
40
|
-
disabled?: boolean | undefined;
|
|
41
|
-
icon: react.ElementType;
|
|
42
|
-
visible?: boolean | undefined;
|
|
43
|
-
};
|
|
44
|
-
useProps?: undefined;
|
|
45
|
-
} | {
|
|
46
|
-
useProps: () => {
|
|
47
|
-
title: string;
|
|
48
|
-
onClick?: (() => void) | undefined;
|
|
49
|
-
value?: string | undefined;
|
|
50
|
-
selected?: boolean | undefined;
|
|
51
|
-
disabled?: boolean | undefined;
|
|
52
|
-
icon: react.ElementType;
|
|
53
|
-
visible?: boolean | undefined;
|
|
54
|
-
};
|
|
55
|
-
props?: undefined;
|
|
56
|
-
})) => void;
|
|
57
|
-
registerLink: (args: {
|
|
58
|
-
id: string;
|
|
59
|
-
group?: ("default" | "save") | undefined;
|
|
60
|
-
priority?: number | undefined;
|
|
61
|
-
overwrite?: boolean | undefined;
|
|
62
|
-
} & ({
|
|
63
|
-
props: {
|
|
64
|
-
title: string;
|
|
65
|
-
target?: string | undefined;
|
|
66
|
-
href?: string | undefined;
|
|
67
|
-
icon: react.ElementType;
|
|
68
|
-
visible?: boolean | undefined;
|
|
69
|
-
};
|
|
70
|
-
useProps?: undefined;
|
|
71
|
-
} | {
|
|
72
|
-
useProps: () => {
|
|
73
|
-
title: string;
|
|
74
|
-
target?: string | undefined;
|
|
75
|
-
href?: string | undefined;
|
|
76
|
-
icon: react.ElementType;
|
|
77
|
-
visible?: boolean | undefined;
|
|
78
|
-
};
|
|
79
|
-
props?: undefined;
|
|
80
|
-
})) => void;
|
|
81
|
-
registerSubMenu: (args: {
|
|
82
|
-
id: string;
|
|
83
|
-
group?: "default" | undefined;
|
|
84
|
-
priority?: number | undefined;
|
|
85
|
-
overwrite?: boolean | undefined;
|
|
86
|
-
} & ({
|
|
87
|
-
props: {
|
|
88
|
-
title: string;
|
|
89
|
-
disabled?: boolean | undefined;
|
|
90
|
-
icon: react.ElementType;
|
|
91
|
-
visible?: boolean | undefined;
|
|
92
|
-
};
|
|
93
|
-
useProps?: undefined;
|
|
94
|
-
} | {
|
|
95
|
-
useProps: () => {
|
|
96
|
-
title: string;
|
|
97
|
-
disabled?: boolean | undefined;
|
|
98
|
-
icon: react.ElementType;
|
|
99
|
-
visible?: boolean | undefined;
|
|
100
|
-
};
|
|
101
|
-
props?: undefined;
|
|
102
|
-
})) => {
|
|
103
|
-
registerAction: (args: {
|
|
104
|
-
id: string;
|
|
105
|
-
group?: "default" | undefined;
|
|
106
|
-
priority?: number | undefined;
|
|
107
|
-
overwrite?: boolean | undefined;
|
|
108
|
-
} & ({
|
|
109
|
-
props: {
|
|
110
|
-
title: string;
|
|
111
|
-
onClick?: (() => void) | undefined;
|
|
112
|
-
disabled?: boolean | undefined;
|
|
113
|
-
icon: react.ElementType;
|
|
114
|
-
visible?: boolean | undefined;
|
|
115
|
-
};
|
|
116
|
-
useProps?: undefined;
|
|
117
|
-
} | {
|
|
118
|
-
useProps: () => {
|
|
119
|
-
title: string;
|
|
120
|
-
onClick?: (() => void) | undefined;
|
|
121
|
-
disabled?: boolean | undefined;
|
|
122
|
-
icon: react.ElementType;
|
|
123
|
-
visible?: boolean | undefined;
|
|
124
|
-
};
|
|
125
|
-
props?: undefined;
|
|
126
|
-
})) => void;
|
|
127
|
-
registerToggleAction: (args: {
|
|
128
|
-
id: string;
|
|
129
|
-
group?: "default" | undefined;
|
|
130
|
-
priority?: number | undefined;
|
|
131
|
-
overwrite?: boolean | undefined;
|
|
132
|
-
} & ({
|
|
133
|
-
props: {
|
|
134
|
-
title: string;
|
|
135
|
-
onClick?: (() => void) | undefined;
|
|
136
|
-
value?: string | undefined;
|
|
137
|
-
selected?: boolean | undefined;
|
|
138
|
-
disabled?: boolean | undefined;
|
|
139
|
-
icon: react.ElementType;
|
|
140
|
-
visible?: boolean | undefined;
|
|
141
|
-
};
|
|
142
|
-
useProps?: undefined;
|
|
143
|
-
} | {
|
|
144
|
-
useProps: () => {
|
|
145
|
-
title: string;
|
|
146
|
-
onClick?: (() => void) | undefined;
|
|
147
|
-
value?: string | undefined;
|
|
148
|
-
selected?: boolean | undefined;
|
|
149
|
-
disabled?: boolean | undefined;
|
|
150
|
-
icon: react.ElementType;
|
|
151
|
-
visible?: boolean | undefined;
|
|
152
|
-
};
|
|
153
|
-
props?: undefined;
|
|
154
|
-
})) => void;
|
|
155
|
-
registerLink: (args: {
|
|
156
|
-
id: string;
|
|
157
|
-
group?: "default" | undefined;
|
|
158
|
-
priority?: number | undefined;
|
|
159
|
-
overwrite?: boolean | undefined;
|
|
160
|
-
} & ({
|
|
161
|
-
props: {
|
|
162
|
-
title: string;
|
|
163
|
-
target?: string | undefined;
|
|
164
|
-
href?: string | undefined;
|
|
165
|
-
icon: react.ElementType;
|
|
166
|
-
visible?: boolean | undefined;
|
|
167
|
-
};
|
|
168
|
-
useProps?: undefined;
|
|
169
|
-
} | {
|
|
170
|
-
useProps: () => {
|
|
171
|
-
title: string;
|
|
172
|
-
target?: string | undefined;
|
|
173
|
-
href?: string | undefined;
|
|
174
|
-
icon: react.ElementType;
|
|
175
|
-
visible?: boolean | undefined;
|
|
176
|
-
};
|
|
177
|
-
props?: undefined;
|
|
178
|
-
})) => void;
|
|
179
|
-
registerSubMenu: any;
|
|
180
|
-
useMenuItems: () => {
|
|
181
|
-
default: {
|
|
182
|
-
id: string;
|
|
183
|
-
MenuItem: react.ElementType;
|
|
184
|
-
}[];
|
|
185
|
-
};
|
|
186
|
-
};
|
|
187
|
-
useMenuItems: () => {
|
|
188
|
-
default: {
|
|
189
|
-
id: string;
|
|
190
|
-
MenuItem: react.ElementType;
|
|
191
|
-
}[];
|
|
192
|
-
save: {
|
|
193
|
-
id: string;
|
|
194
|
-
MenuItem: react.ElementType;
|
|
195
|
-
}[];
|
|
196
|
-
};
|
|
5
|
+
type Props$3 = {
|
|
6
|
+
title: string;
|
|
7
|
+
icon: ElementType;
|
|
8
|
+
disabled?: boolean;
|
|
9
|
+
visible?: boolean;
|
|
10
|
+
onClick?: () => void;
|
|
197
11
|
};
|
|
12
|
+
declare function Action({ icon: Icon, title, visible, ...props }: Props$3): React.JSX.Element | null;
|
|
198
13
|
|
|
199
|
-
|
|
14
|
+
type Props$2 = {
|
|
15
|
+
title: string;
|
|
16
|
+
icon: ElementType;
|
|
17
|
+
selected?: boolean;
|
|
18
|
+
disabled?: boolean;
|
|
19
|
+
visible?: boolean;
|
|
20
|
+
onClick?: () => void;
|
|
21
|
+
value?: string;
|
|
22
|
+
};
|
|
23
|
+
declare function ToggleAction({ icon: Icon, title, value, visible, ...props }: Props$2): React.JSX.Element | null;
|
|
24
|
+
|
|
25
|
+
type Props$1 = {
|
|
26
|
+
title: string;
|
|
27
|
+
icon: ElementType;
|
|
28
|
+
href?: string;
|
|
29
|
+
visible?: boolean;
|
|
30
|
+
target?: string;
|
|
31
|
+
};
|
|
32
|
+
declare function Link({ icon: Icon, title, visible, ...props }: Props$1): React.JSX.Element | null;
|
|
33
|
+
|
|
34
|
+
type Props = {
|
|
35
|
+
title: string;
|
|
36
|
+
icon: ElementType;
|
|
37
|
+
disabled?: boolean;
|
|
38
|
+
visible?: boolean;
|
|
39
|
+
items: ItemsArray;
|
|
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>;
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
declare const injectIntoPageIndication: (args: _elementor_locations.InjectArgs<object>) => void;
|
|
72
|
+
declare const injectIntoResponsive: (args: _elementor_locations.InjectArgs<object>) => void;
|
|
73
|
+
declare const injectIntoPrimaryAction: (args: _elementor_locations.InjectArgs<object>) => void;
|
|
74
|
+
declare const mainMenu: MenuActions<"default" | "exits">;
|
|
75
|
+
declare const toolsMenu: MenuActions<"default">;
|
|
76
|
+
declare const utilitiesMenu: MenuActions<"default">;
|
|
77
|
+
declare const integrationsMenu: MenuActions<"default">;
|
|
78
|
+
|
|
79
|
+
declare const documentOptionsMenu: MenuActions<"default" | "save">;
|
|
80
|
+
|
|
81
|
+
export { Props$3 as ActionProps, Props$1 as LinkProps, Props$2 as ToggleActionProps, documentOptionsMenu, injectIntoPageIndication, injectIntoPrimaryAction, injectIntoResponsive, integrationsMenu, mainMenu, toolsMenu, utilitiesMenu };
|