@elementor/editor-site-navigation 0.37.1 → 3.32.0-20
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 +0 -8
- package/dist/index.js +12 -9
- package/dist/index.mjs +12 -9
- package/package.json +10 -10
- package/src/components/top-bar/recently-edited.tsx +10 -7
- package/src/hooks/use-toggle-button-props.ts +2 -2
- package/src/types.ts +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1259,14 +1259,17 @@ function RecentlyEdited() {
|
|
|
1259
1259
|
...buttonProps,
|
|
1260
1260
|
onClick: (e) => {
|
|
1261
1261
|
const extendedWindow = window;
|
|
1262
|
-
const config = extendedWindow?.
|
|
1262
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1263
1263
|
if (config) {
|
|
1264
|
-
extendedWindow.
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1264
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(
|
|
1265
|
+
config.names.topBar.documentNameDropdown,
|
|
1266
|
+
{
|
|
1267
|
+
location: config.locations.topBar,
|
|
1268
|
+
secondaryLocation: config.secondaryLocations.documentNameDropdown,
|
|
1269
|
+
trigger: config.triggers.dropdownClick,
|
|
1270
|
+
element: config.elements.dropdown
|
|
1271
|
+
}
|
|
1272
|
+
);
|
|
1270
1273
|
}
|
|
1271
1274
|
buttonProps.onClick(e);
|
|
1272
1275
|
}
|
|
@@ -1314,9 +1317,9 @@ function useToggleButtonProps() {
|
|
|
1314
1317
|
icon: import_icons16.PagesIcon,
|
|
1315
1318
|
onClick: () => {
|
|
1316
1319
|
const extendedWindow = window;
|
|
1317
|
-
const config = extendedWindow?.
|
|
1320
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1318
1321
|
if (config) {
|
|
1319
|
-
extendedWindow.
|
|
1322
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent("top_bar_pages", {
|
|
1320
1323
|
location: config.locations.topBar,
|
|
1321
1324
|
secondaryLocation: config.secondaryLocations.elementorLogo,
|
|
1322
1325
|
trigger: config.triggers.click,
|
package/dist/index.mjs
CHANGED
|
@@ -1274,14 +1274,17 @@ function RecentlyEdited() {
|
|
|
1274
1274
|
...buttonProps,
|
|
1275
1275
|
onClick: (e) => {
|
|
1276
1276
|
const extendedWindow = window;
|
|
1277
|
-
const config = extendedWindow?.
|
|
1277
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1278
1278
|
if (config) {
|
|
1279
|
-
extendedWindow.
|
|
1280
|
-
|
|
1281
|
-
|
|
1282
|
-
|
|
1283
|
-
|
|
1284
|
-
|
|
1279
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(
|
|
1280
|
+
config.names.topBar.documentNameDropdown,
|
|
1281
|
+
{
|
|
1282
|
+
location: config.locations.topBar,
|
|
1283
|
+
secondaryLocation: config.secondaryLocations.documentNameDropdown,
|
|
1284
|
+
trigger: config.triggers.dropdownClick,
|
|
1285
|
+
element: config.elements.dropdown
|
|
1286
|
+
}
|
|
1287
|
+
);
|
|
1285
1288
|
}
|
|
1286
1289
|
buttonProps.onClick(e);
|
|
1287
1290
|
}
|
|
@@ -1329,9 +1332,9 @@ function useToggleButtonProps() {
|
|
|
1329
1332
|
icon: PagesIcon,
|
|
1330
1333
|
onClick: () => {
|
|
1331
1334
|
const extendedWindow = window;
|
|
1332
|
-
const config = extendedWindow?.
|
|
1335
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
1333
1336
|
if (config) {
|
|
1334
|
-
extendedWindow.
|
|
1337
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent("top_bar_pages", {
|
|
1335
1338
|
location: config.locations.topBar,
|
|
1336
1339
|
secondaryLocation: config.secondaryLocations.elementorLogo,
|
|
1337
1340
|
trigger: config.triggers.click,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-site-navigation",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.32.0-20",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Elementor Team",
|
|
6
6
|
"homepage": "https://elementor.com/",
|
|
@@ -18,11 +18,11 @@
|
|
|
18
18
|
},
|
|
19
19
|
"repository": {
|
|
20
20
|
"type": "git",
|
|
21
|
-
"url": "git+https://github.com/elementor/elementor
|
|
21
|
+
"url": "git+https://github.com/elementor/elementor.git",
|
|
22
22
|
"directory": "packages/core/editor-site-navigation"
|
|
23
23
|
},
|
|
24
24
|
"bugs": {
|
|
25
|
-
"url": "https://github.com/elementor/elementor
|
|
25
|
+
"url": "https://github.com/elementor/elementor/issues"
|
|
26
26
|
},
|
|
27
27
|
"publishConfig": {
|
|
28
28
|
"access": "public"
|
|
@@ -39,14 +39,14 @@
|
|
|
39
39
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@elementor/editor-app-bar": "
|
|
43
|
-
"@elementor/editor-documents": "
|
|
44
|
-
"@elementor/editor-panels": "
|
|
45
|
-
"@elementor/editor-v1-adapters": "
|
|
46
|
-
"@elementor/env": "
|
|
42
|
+
"@elementor/editor-app-bar": "3.32.0-20",
|
|
43
|
+
"@elementor/editor-documents": "3.32.0-20",
|
|
44
|
+
"@elementor/editor-panels": "3.32.0-20",
|
|
45
|
+
"@elementor/editor-v1-adapters": "3.32.0-20",
|
|
46
|
+
"@elementor/env": "3.32.0-20",
|
|
47
47
|
"@elementor/icons": "1.46.0",
|
|
48
|
-
"@elementor/query": "
|
|
49
|
-
"@elementor/ui": "1.36.
|
|
48
|
+
"@elementor/query": "3.32.0-20",
|
|
49
|
+
"@elementor/ui": "1.36.2",
|
|
50
50
|
"@wordpress/api-fetch": "^6.42.0",
|
|
51
51
|
"@wordpress/i18n": "^5.13.0"
|
|
52
52
|
},
|
|
@@ -63,15 +63,18 @@ export default function RecentlyEdited() {
|
|
|
63
63
|
{ ...buttonProps }
|
|
64
64
|
onClick={ ( e: React.MouseEvent ) => {
|
|
65
65
|
const extendedWindow = window as unknown as ExtendedWindow;
|
|
66
|
-
const config = extendedWindow?.
|
|
66
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
67
67
|
|
|
68
68
|
if ( config ) {
|
|
69
|
-
extendedWindow.
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
69
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent(
|
|
70
|
+
config.names.topBar.documentNameDropdown,
|
|
71
|
+
{
|
|
72
|
+
location: config.locations.topBar,
|
|
73
|
+
secondaryLocation: config.secondaryLocations.documentNameDropdown,
|
|
74
|
+
trigger: config.triggers.dropdownClick,
|
|
75
|
+
element: config.elements.dropdown,
|
|
76
|
+
}
|
|
77
|
+
);
|
|
75
78
|
}
|
|
76
79
|
|
|
77
80
|
buttonProps.onClick( e );
|
|
@@ -14,10 +14,10 @@ export function useToggleButtonProps(): ToggleActionProps {
|
|
|
14
14
|
icon: PagesIcon,
|
|
15
15
|
onClick: () => {
|
|
16
16
|
const extendedWindow = window as unknown as ExtendedWindow;
|
|
17
|
-
const config = extendedWindow?.
|
|
17
|
+
const config = extendedWindow?.elementorCommon?.eventsManager?.config;
|
|
18
18
|
|
|
19
19
|
if ( config ) {
|
|
20
|
-
extendedWindow.
|
|
20
|
+
extendedWindow.elementorCommon.eventsManager.dispatchEvent( 'top_bar_pages', {
|
|
21
21
|
location: config.locations.topBar,
|
|
22
22
|
secondaryLocation: config.secondaryLocations.elementorLogo,
|
|
23
23
|
trigger: config.triggers.click,
|
package/src/types.ts
CHANGED
|
@@ -29,8 +29,8 @@ export type RecentPost = {
|
|
|
29
29
|
};
|
|
30
30
|
|
|
31
31
|
export type ExtendedWindow = Window & {
|
|
32
|
-
|
|
33
|
-
|
|
32
|
+
elementorCommon: {
|
|
33
|
+
eventsManager: {
|
|
34
34
|
dispatchEvent: ( name: string, data: Record< string, string > ) => void;
|
|
35
35
|
config: {
|
|
36
36
|
locations: Record< string, string >;
|