@elementor/editor-site-navigation 4.0.0-591 → 4.0.0-598
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.js
CHANGED
|
@@ -1100,6 +1100,7 @@ var import_i18n15 = require("@wordpress/i18n");
|
|
|
1100
1100
|
// src/components/top-bar/create-post-list-item.tsx
|
|
1101
1101
|
var React21 = __toESM(require("react"));
|
|
1102
1102
|
var import_editor_documents6 = require("@elementor/editor-documents");
|
|
1103
|
+
var import_events = require("@elementor/events");
|
|
1103
1104
|
var import_icons13 = require("@elementor/icons");
|
|
1104
1105
|
var import_ui12 = require("@elementor/ui");
|
|
1105
1106
|
var import_i18n14 = require("@wordpress/i18n");
|
|
@@ -1131,11 +1132,26 @@ function CreatePostListItem({ closePopup, ...props }) {
|
|
|
1131
1132
|
const { create, isLoading } = useCreatePage();
|
|
1132
1133
|
const navigateToDocument = (0, import_editor_documents6.__useNavigateToDocument)();
|
|
1133
1134
|
const { data: user } = useUser();
|
|
1135
|
+
const { dispatchEvent, config } = (0, import_events.useMixpanel)();
|
|
1134
1136
|
return /* @__PURE__ */ React21.createElement(
|
|
1135
1137
|
import_ui12.MenuItem,
|
|
1136
1138
|
{
|
|
1137
1139
|
disabled: isLoading || !user?.capabilities?.edit_pages,
|
|
1138
1140
|
onClick: async () => {
|
|
1141
|
+
const eventName = config?.names?.editorOne?.topBarPageList;
|
|
1142
|
+
if (eventName) {
|
|
1143
|
+
dispatchEvent?.(eventName, {
|
|
1144
|
+
app_type: config?.appTypes?.editor,
|
|
1145
|
+
window_name: config?.appTypes?.editor,
|
|
1146
|
+
interaction_type: config?.triggers?.click?.toLowerCase(),
|
|
1147
|
+
target_type: config?.targetTypes?.dropdownItem,
|
|
1148
|
+
target_name: config?.targetNames?.pageList?.addNewPage,
|
|
1149
|
+
interaction_result: config?.interactionResults?.create,
|
|
1150
|
+
target_location: config?.locations?.topBar?.replace(/\s+/g, "_").toLowerCase(),
|
|
1151
|
+
location_l1: config?.secondaryLocations?.pageListDropdown?.replace(/\s+/g, "_").toLowerCase(),
|
|
1152
|
+
location_l2: config?.targetTypes?.dropdownItem
|
|
1153
|
+
});
|
|
1154
|
+
}
|
|
1139
1155
|
const { id } = await create();
|
|
1140
1156
|
closePopup();
|
|
1141
1157
|
await navigateToDocument(id);
|
|
@@ -1178,6 +1194,7 @@ function Tooltip2(props) {
|
|
|
1178
1194
|
// src/components/top-bar/post-list-item.tsx
|
|
1179
1195
|
var React24 = __toESM(require("react"));
|
|
1180
1196
|
var import_editor_documents7 = require("@elementor/editor-documents");
|
|
1197
|
+
var import_events2 = require("@elementor/events");
|
|
1181
1198
|
var import_ui15 = require("@elementor/ui");
|
|
1182
1199
|
|
|
1183
1200
|
// src/components/top-bar/chip-doc-type.tsx
|
|
@@ -1207,11 +1224,26 @@ function DocTypeChip({ postType, docType, label }) {
|
|
|
1207
1224
|
function PostListItem2({ post, closePopup, ...props }) {
|
|
1208
1225
|
const navigateToDocument = (0, import_editor_documents7.__useNavigateToDocument)();
|
|
1209
1226
|
const postTitle = useReverseHtmlEntities(post.title);
|
|
1227
|
+
const { dispatchEvent, config } = (0, import_events2.useMixpanel)();
|
|
1210
1228
|
return /* @__PURE__ */ React24.createElement(
|
|
1211
1229
|
import_ui15.MenuItem,
|
|
1212
1230
|
{
|
|
1213
1231
|
disabled: !post.user_can.edit,
|
|
1214
1232
|
onClick: async () => {
|
|
1233
|
+
const eventName = config?.names?.editorOne?.topBarPageList;
|
|
1234
|
+
if (eventName) {
|
|
1235
|
+
dispatchEvent?.(eventName, {
|
|
1236
|
+
app_type: config?.appTypes?.editor,
|
|
1237
|
+
window_name: config?.appTypes?.editor,
|
|
1238
|
+
interaction_type: config?.triggers?.click?.toLowerCase(),
|
|
1239
|
+
target_type: config?.targetTypes?.dropdownItem,
|
|
1240
|
+
target_name: postTitle,
|
|
1241
|
+
interaction_result: config?.interactionResults?.navigate,
|
|
1242
|
+
target_location: config?.locations?.topBar?.replace(/\s+/g, "_").toLowerCase(),
|
|
1243
|
+
location_l1: config?.secondaryLocations?.pageListDropdown?.replace(/\s+/g, "_").toLowerCase(),
|
|
1244
|
+
location_l2: config?.targetTypes?.dropdownItem
|
|
1245
|
+
});
|
|
1246
|
+
}
|
|
1215
1247
|
closePopup();
|
|
1216
1248
|
await navigateToDocument(post.id);
|
|
1217
1249
|
},
|
package/dist/index.mjs
CHANGED
|
@@ -1115,6 +1115,7 @@ import { __ as __15 } from "@wordpress/i18n";
|
|
|
1115
1115
|
// src/components/top-bar/create-post-list-item.tsx
|
|
1116
1116
|
import * as React21 from "react";
|
|
1117
1117
|
import { __useNavigateToDocument as useNavigateToDocument4 } from "@elementor/editor-documents";
|
|
1118
|
+
import { useMixpanel } from "@elementor/events";
|
|
1118
1119
|
import { PlusIcon as PlusIcon2 } from "@elementor/icons";
|
|
1119
1120
|
import { CircularProgress as CircularProgress5, ListItemIcon as ListItemIcon3, ListItemText as ListItemText5, MenuItem as MenuItem2 } from "@elementor/ui";
|
|
1120
1121
|
import { __ as __14 } from "@wordpress/i18n";
|
|
@@ -1146,11 +1147,26 @@ function CreatePostListItem({ closePopup, ...props }) {
|
|
|
1146
1147
|
const { create, isLoading } = useCreatePage();
|
|
1147
1148
|
const navigateToDocument = useNavigateToDocument4();
|
|
1148
1149
|
const { data: user } = useUser();
|
|
1150
|
+
const { dispatchEvent, config } = useMixpanel();
|
|
1149
1151
|
return /* @__PURE__ */ React21.createElement(
|
|
1150
1152
|
MenuItem2,
|
|
1151
1153
|
{
|
|
1152
1154
|
disabled: isLoading || !user?.capabilities?.edit_pages,
|
|
1153
1155
|
onClick: async () => {
|
|
1156
|
+
const eventName = config?.names?.editorOne?.topBarPageList;
|
|
1157
|
+
if (eventName) {
|
|
1158
|
+
dispatchEvent?.(eventName, {
|
|
1159
|
+
app_type: config?.appTypes?.editor,
|
|
1160
|
+
window_name: config?.appTypes?.editor,
|
|
1161
|
+
interaction_type: config?.triggers?.click?.toLowerCase(),
|
|
1162
|
+
target_type: config?.targetTypes?.dropdownItem,
|
|
1163
|
+
target_name: config?.targetNames?.pageList?.addNewPage,
|
|
1164
|
+
interaction_result: config?.interactionResults?.create,
|
|
1165
|
+
target_location: config?.locations?.topBar?.replace(/\s+/g, "_").toLowerCase(),
|
|
1166
|
+
location_l1: config?.secondaryLocations?.pageListDropdown?.replace(/\s+/g, "_").toLowerCase(),
|
|
1167
|
+
location_l2: config?.targetTypes?.dropdownItem
|
|
1168
|
+
});
|
|
1169
|
+
}
|
|
1154
1170
|
const { id } = await create();
|
|
1155
1171
|
closePopup();
|
|
1156
1172
|
await navigateToDocument(id);
|
|
@@ -1193,6 +1209,7 @@ function Tooltip2(props) {
|
|
|
1193
1209
|
// src/components/top-bar/post-list-item.tsx
|
|
1194
1210
|
import * as React24 from "react";
|
|
1195
1211
|
import { __useNavigateToDocument as useNavigateToDocument5 } from "@elementor/editor-documents";
|
|
1212
|
+
import { useMixpanel as useMixpanel2 } from "@elementor/events";
|
|
1196
1213
|
import { ListItemText as ListItemText6, MenuItem as MenuItem3 } from "@elementor/ui";
|
|
1197
1214
|
|
|
1198
1215
|
// src/components/top-bar/chip-doc-type.tsx
|
|
@@ -1222,11 +1239,26 @@ function DocTypeChip({ postType, docType, label }) {
|
|
|
1222
1239
|
function PostListItem2({ post, closePopup, ...props }) {
|
|
1223
1240
|
const navigateToDocument = useNavigateToDocument5();
|
|
1224
1241
|
const postTitle = useReverseHtmlEntities(post.title);
|
|
1242
|
+
const { dispatchEvent, config } = useMixpanel2();
|
|
1225
1243
|
return /* @__PURE__ */ React24.createElement(
|
|
1226
1244
|
MenuItem3,
|
|
1227
1245
|
{
|
|
1228
1246
|
disabled: !post.user_can.edit,
|
|
1229
1247
|
onClick: async () => {
|
|
1248
|
+
const eventName = config?.names?.editorOne?.topBarPageList;
|
|
1249
|
+
if (eventName) {
|
|
1250
|
+
dispatchEvent?.(eventName, {
|
|
1251
|
+
app_type: config?.appTypes?.editor,
|
|
1252
|
+
window_name: config?.appTypes?.editor,
|
|
1253
|
+
interaction_type: config?.triggers?.click?.toLowerCase(),
|
|
1254
|
+
target_type: config?.targetTypes?.dropdownItem,
|
|
1255
|
+
target_name: postTitle,
|
|
1256
|
+
interaction_result: config?.interactionResults?.navigate,
|
|
1257
|
+
target_location: config?.locations?.topBar?.replace(/\s+/g, "_").toLowerCase(),
|
|
1258
|
+
location_l1: config?.secondaryLocations?.pageListDropdown?.replace(/\s+/g, "_").toLowerCase(),
|
|
1259
|
+
location_l2: config?.targetTypes?.dropdownItem
|
|
1260
|
+
});
|
|
1261
|
+
}
|
|
1230
1262
|
closePopup();
|
|
1231
1263
|
await navigateToDocument(post.id);
|
|
1232
1264
|
},
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elementor/editor-site-navigation",
|
|
3
|
-
"version": "4.0.0-
|
|
3
|
+
"version": "4.0.0-598",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Elementor Team",
|
|
6
6
|
"homepage": "https://elementor.com/",
|
|
@@ -39,13 +39,14 @@
|
|
|
39
39
|
"dev": "tsup --config=../../tsup.dev.ts"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@elementor/editor-app-bar": "4.0.0-
|
|
43
|
-
"@elementor/editor-documents": "4.0.0-
|
|
44
|
-
"@elementor/editor-panels": "4.0.0-
|
|
45
|
-
"@elementor/editor-v1-adapters": "4.0.0-
|
|
46
|
-
"@elementor/env": "4.0.0-
|
|
42
|
+
"@elementor/editor-app-bar": "4.0.0-598",
|
|
43
|
+
"@elementor/editor-documents": "4.0.0-598",
|
|
44
|
+
"@elementor/editor-panels": "4.0.0-598",
|
|
45
|
+
"@elementor/editor-v1-adapters": "4.0.0-598",
|
|
46
|
+
"@elementor/env": "4.0.0-598",
|
|
47
47
|
"@elementor/icons": "^1.63.0",
|
|
48
|
-
"@elementor/
|
|
48
|
+
"@elementor/events": "4.0.0-598",
|
|
49
|
+
"@elementor/query": "4.0.0-598",
|
|
49
50
|
"@elementor/ui": "1.36.17",
|
|
50
51
|
"@wordpress/api-fetch": "^6.42.0",
|
|
51
52
|
"@wordpress/i18n": "^5.13.0"
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { __useNavigateToDocument as useNavigateToDocument } from '@elementor/editor-documents';
|
|
3
|
+
import { useMixpanel } from '@elementor/events';
|
|
3
4
|
import { PlusIcon } from '@elementor/icons';
|
|
4
5
|
import { CircularProgress, ListItemIcon, ListItemText, MenuItem, type MenuItemProps } from '@elementor/ui';
|
|
5
6
|
import { __ } from '@wordpress/i18n';
|
|
@@ -15,11 +16,26 @@ export function CreatePostListItem( { closePopup, ...props }: Props ) {
|
|
|
15
16
|
const { create, isLoading } = useCreatePage();
|
|
16
17
|
const navigateToDocument = useNavigateToDocument();
|
|
17
18
|
const { data: user } = useUser();
|
|
19
|
+
const { dispatchEvent, config } = useMixpanel();
|
|
18
20
|
|
|
19
21
|
return (
|
|
20
22
|
<MenuItem
|
|
21
23
|
disabled={ isLoading || ! user?.capabilities?.edit_pages }
|
|
22
24
|
onClick={ async () => {
|
|
25
|
+
const eventName = config?.names?.editorOne?.topBarPageList;
|
|
26
|
+
if ( eventName ) {
|
|
27
|
+
dispatchEvent?.( eventName, {
|
|
28
|
+
app_type: config?.appTypes?.editor,
|
|
29
|
+
window_name: config?.appTypes?.editor,
|
|
30
|
+
interaction_type: config?.triggers?.click?.toLowerCase(),
|
|
31
|
+
target_type: config?.targetTypes?.dropdownItem,
|
|
32
|
+
target_name: config?.targetNames?.pageList?.addNewPage,
|
|
33
|
+
interaction_result: config?.interactionResults?.create,
|
|
34
|
+
target_location: config?.locations?.topBar?.replace( /\s+/g, '_' ).toLowerCase(),
|
|
35
|
+
location_l1: config?.secondaryLocations?.pageListDropdown?.replace( /\s+/g, '_' ).toLowerCase(),
|
|
36
|
+
location_l2: config?.targetTypes?.dropdownItem,
|
|
37
|
+
} );
|
|
38
|
+
}
|
|
23
39
|
const { id } = await create();
|
|
24
40
|
closePopup();
|
|
25
41
|
await navigateToDocument( id );
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import { __useNavigateToDocument as useNavigateToDocument } from '@elementor/editor-documents';
|
|
3
|
+
import { useMixpanel } from '@elementor/events';
|
|
3
4
|
import { ListItemText, MenuItem, type MenuItemProps } from '@elementor/ui';
|
|
4
5
|
|
|
5
6
|
import { useReverseHtmlEntities } from '../../hooks/use-reverse-html-entities';
|
|
@@ -14,11 +15,26 @@ type Props = MenuItemProps & {
|
|
|
14
15
|
export function PostListItem( { post, closePopup, ...props }: Props ) {
|
|
15
16
|
const navigateToDocument = useNavigateToDocument();
|
|
16
17
|
const postTitle = useReverseHtmlEntities( post.title );
|
|
18
|
+
const { dispatchEvent, config } = useMixpanel();
|
|
17
19
|
|
|
18
20
|
return (
|
|
19
21
|
<MenuItem
|
|
20
22
|
disabled={ ! post.user_can.edit }
|
|
21
23
|
onClick={ async () => {
|
|
24
|
+
const eventName = config?.names?.editorOne?.topBarPageList;
|
|
25
|
+
if ( eventName ) {
|
|
26
|
+
dispatchEvent?.( eventName, {
|
|
27
|
+
app_type: config?.appTypes?.editor,
|
|
28
|
+
window_name: config?.appTypes?.editor,
|
|
29
|
+
interaction_type: config?.triggers?.click?.toLowerCase(),
|
|
30
|
+
target_type: config?.targetTypes?.dropdownItem,
|
|
31
|
+
target_name: postTitle,
|
|
32
|
+
interaction_result: config?.interactionResults?.navigate,
|
|
33
|
+
target_location: config?.locations?.topBar?.replace( /\s+/g, '_' ).toLowerCase(),
|
|
34
|
+
location_l1: config?.secondaryLocations?.pageListDropdown?.replace( /\s+/g, '_' ).toLowerCase(),
|
|
35
|
+
location_l2: config?.targetTypes?.dropdownItem,
|
|
36
|
+
} );
|
|
37
|
+
}
|
|
22
38
|
closePopup();
|
|
23
39
|
await navigateToDocument( post.id );
|
|
24
40
|
} }
|