@elementor/editor-site-navigation 0.8.0 → 0.8.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 CHANGED
@@ -3,6 +3,17 @@
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.8.1](https://github.com/elementor/elementor-packages/compare/@elementor/editor-site-navigation@0.8.0...@elementor/editor-site-navigation@0.8.1) (2023-06-25)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * comment out pages panel [ED-10871] ([#64](https://github.com/elementor/elementor-packages/issues/64)) ([3a8b890](https://github.com/elementor/elementor-packages/commit/3a8b890d8f21ac816d3c0b961b37372bcb91caff))
12
+
13
+
14
+
15
+
16
+
6
17
  # [0.8.0](https://github.com/elementor/elementor-packages/compare/@elementor/editor-site-navigation@0.7.0...@elementor/editor-site-navigation@0.8.0) (2023-06-25)
7
18
 
8
19
 
package/dist/index.js CHANGED
@@ -271,31 +271,6 @@ var RotateIcon = (0, import_ui6.styled)(import_icons5.ChevronDownIcon, {
271
271
  duration: theme.transitions.duration.standard
272
272
  })
273
273
  }));
274
- function CollapsibleList({
275
- label,
276
- Icon,
277
- isOpenByDefault = false,
278
- children
279
- }) {
280
- const [isOpen, setIsOpen] = (0, import_react4.useState)(isOpenByDefault);
281
- return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(import_ui6.ListItem, { disableGutters: true }, /* @__PURE__ */ React6.createElement(import_ui6.ListItemIcon, null, /* @__PURE__ */ React6.createElement(
282
- import_ui6.IconButton,
283
- {
284
- onClick: () => setIsOpen((prev) => !prev),
285
- sx: { color: "inherit" },
286
- size: "small"
287
- },
288
- /* @__PURE__ */ React6.createElement(RotateIcon, { fontSize: "small", isOpen })
289
- )), /* @__PURE__ */ React6.createElement(import_ui6.ListItemIcon, null, /* @__PURE__ */ React6.createElement(Icon, null)), /* @__PURE__ */ React6.createElement(import_ui6.ListItemText, null, label)), /* @__PURE__ */ React6.createElement(
290
- import_ui6.Collapse,
291
- {
292
- in: isOpen,
293
- timeout: "auto",
294
- unmountOnExit: true
295
- },
296
- /* @__PURE__ */ React6.createElement(import_ui6.List, { dense: true }, children)
297
- ));
298
- }
299
274
 
300
275
  // src/components/panel/pages-list/pages-collapsible-list.tsx
301
276
  var import_icons12 = require("@elementor/icons");
@@ -309,45 +284,6 @@ var import_editor_documents5 = require("@elementor/editor-documents");
309
284
  // src/components/shared/page-title-and-status.tsx
310
285
  var React7 = __toESM(require("react"));
311
286
  var import_ui7 = require("@elementor/ui");
312
- var PageStatus = ({ status }) => {
313
- if ("publish" === status) {
314
- return null;
315
- }
316
- return /* @__PURE__ */ React7.createElement(
317
- import_ui7.Typography,
318
- {
319
- component: "span",
320
- variant: "body1",
321
- sx: {
322
- textTransform: "capitalize",
323
- fontStyle: "italic",
324
- whiteSpace: "nowrap",
325
- flexBasis: "content"
326
- }
327
- },
328
- "(",
329
- status,
330
- ")"
331
- );
332
- };
333
- var PageTitle = ({ title }) => {
334
- const modifiedTitle = useReverseHtmlEntities(title);
335
- return /* @__PURE__ */ React7.createElement(
336
- import_ui7.Typography,
337
- {
338
- component: "span",
339
- variant: "body1",
340
- noWrap: true,
341
- sx: {
342
- flexBasis: "auto"
343
- }
344
- },
345
- modifiedTitle
346
- );
347
- };
348
- function PageTitleAndStatus({ page }) {
349
- return /* @__PURE__ */ React7.createElement(import_ui7.Box, { display: "flex" }, /* @__PURE__ */ React7.createElement(PageTitle, { title: page.title }), "\xA0", /* @__PURE__ */ React7.createElement(PageStatus, { status: page.status }));
350
- }
351
287
 
352
288
  // src/components/panel/actions-menu/page-actions-menu.tsx
353
289
  var React15 = __toESM(require("react"));
@@ -364,224 +300,34 @@ var React9 = __toESM(require("react"));
364
300
  // src/components/panel/actions-menu/action-list-item.tsx
365
301
  var React8 = __toESM(require("react"));
366
302
  var import_ui8 = require("@elementor/ui");
367
- function ActionListItem({ title, icon: Icon, disabled, onClick }) {
368
- return /* @__PURE__ */ React8.createElement(
369
- import_ui8.ListItemButton,
370
- {
371
- disabled,
372
- onClick
373
- },
374
- /* @__PURE__ */ React8.createElement(import_ui8.ListItemIcon, null, /* @__PURE__ */ React8.createElement(Icon, null)),
375
- /* @__PURE__ */ React8.createElement(import_ui8.ListItemText, null, title)
376
- );
377
- }
378
303
 
379
304
  // src/components/panel/actions-menu/action-menu-item.tsx
380
305
  var import_ui9 = require("@elementor/ui");
381
- function ActionMenuItem(props) {
382
- return /* @__PURE__ */ React9.createElement(import_ui9.MenuItem, { disableGutters: true }, /* @__PURE__ */ React9.createElement(ActionListItem, { ...props }));
383
- }
384
-
385
- // src/components/panel/pages-actions/rename.tsx
386
- function Rename() {
387
- return /* @__PURE__ */ React10.createElement(
388
- ActionMenuItem,
389
- {
390
- title: (0, import_i18n3.__)("Rename", "elementor"),
391
- icon: import_icons6.EraseIcon,
392
- onClick: () => null
393
- }
394
- );
395
- }
396
306
 
397
307
  // src/components/panel/pages-actions/duplicate.tsx
398
308
  var React11 = __toESM(require("react"));
399
309
  var import_i18n4 = require("@wordpress/i18n");
400
310
  var import_icons7 = require("@elementor/icons");
401
- function Duplicate() {
402
- return /* @__PURE__ */ React11.createElement(
403
- ActionMenuItem,
404
- {
405
- title: (0, import_i18n4.__)("Duplicate", "elementor"),
406
- icon: import_icons7.CopyIcon,
407
- onClick: () => null
408
- }
409
- );
410
- }
411
311
 
412
312
  // src/components/panel/pages-actions/delete.tsx
413
313
  var React12 = __toESM(require("react"));
414
314
  var import_icons8 = require("@elementor/icons");
415
315
  var import_editor_documents4 = require("@elementor/editor-documents");
416
316
  var import_i18n5 = require("@wordpress/i18n");
417
- function Delete({ page }) {
418
- const activeDocument = (0, import_editor_documents4.useActiveDocument)();
419
- const isActive = activeDocument?.id === page.id;
420
- return /* @__PURE__ */ React12.createElement(
421
- ActionMenuItem,
422
- {
423
- title: (0, import_i18n5.__)("Delete", "elementor"),
424
- icon: import_icons8.TrashIcon,
425
- disabled: page.isHome || isActive,
426
- onClick: () => null
427
- }
428
- );
429
- }
430
317
 
431
318
  // src/components/panel/pages-actions/view.tsx
432
319
  var React13 = __toESM(require("react"));
433
320
  var import_icons9 = require("@elementor/icons");
434
321
  var import_i18n6 = require("@wordpress/i18n");
435
- function View() {
436
- return /* @__PURE__ */ React13.createElement(
437
- ActionMenuItem,
438
- {
439
- title: (0, import_i18n6.__)("View Page", "elementor"),
440
- icon: import_icons9.EyeIcon,
441
- onClick: () => null
442
- }
443
- );
444
- }
445
322
 
446
323
  // src/components/panel/pages-actions/set-home.tsx
447
324
  var React14 = __toESM(require("react"));
448
325
  var import_icons10 = require("@elementor/icons");
449
326
  var import_i18n7 = require("@wordpress/i18n");
450
- function SetHome({ page }) {
451
- return /* @__PURE__ */ React14.createElement(
452
- ActionMenuItem,
453
- {
454
- title: (0, import_i18n7.__)("Set as homepage", "elementor"),
455
- icon: import_icons10.HomeIcon,
456
- disabled: !!page.isHome,
457
- onClick: () => null
458
- }
459
- );
460
- }
461
-
462
- // src/components/panel/actions-menu/page-actions-menu.tsx
463
- function PageActionsMenu({ page, ...props }) {
464
- return /* @__PURE__ */ React15.createElement(
465
- import_ui10.Menu,
466
- {
467
- PaperProps: { sx: { mt: 4, width: 200 } },
468
- MenuListProps: { dense: true },
469
- ...props
470
- },
471
- /* @__PURE__ */ React15.createElement(Rename, null),
472
- /* @__PURE__ */ React15.createElement(Duplicate, null),
473
- /* @__PURE__ */ React15.createElement(Delete, { page }),
474
- /* @__PURE__ */ React15.createElement(View, null),
475
- /* @__PURE__ */ React15.createElement(import_ui10.Divider, null),
476
- /* @__PURE__ */ React15.createElement(SetHome, { page })
477
- );
478
- }
479
-
480
- // src/components/panel/pages-list/page-list-item.tsx
481
- function PageListItem({ page }) {
482
- const popupState = (0, import_ui11.usePopupState)({
483
- variant: "popover",
484
- popupId: "page-actions"
485
- });
486
- const activeDocument = (0, import_editor_documents5.useActiveDocument)();
487
- const navigateToDocument = (0, import_editor_documents5.useNavigateToDocument)();
488
- const isActive = activeDocument?.id === page.id;
489
- return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
490
- import_ui11.ListItem,
491
- {
492
- disablePadding: true,
493
- secondaryAction: /* @__PURE__ */ React16.createElement(
494
- import_ui11.ToggleButton,
495
- {
496
- value: true,
497
- color: "secondary",
498
- size: "small",
499
- selected: popupState.isOpen,
500
- ...(0, import_ui11.bindTrigger)(popupState)
501
- },
502
- /* @__PURE__ */ React16.createElement(import_icons11.DotsVerticalIcon, { fontSize: "small" })
503
- )
504
- },
505
- /* @__PURE__ */ React16.createElement(
506
- import_ui11.ListItemButton,
507
- {
508
- selected: isActive,
509
- onClick: () => navigateToDocument(page.id),
510
- dense: true
511
- },
512
- /* @__PURE__ */ React16.createElement(import_ui11.ListItemIcon, null),
513
- /* @__PURE__ */ React16.createElement(
514
- import_ui11.ListItemText,
515
- {
516
- disableTypography: true
517
- },
518
- /* @__PURE__ */ React16.createElement(PageTitleAndStatus, { page })
519
- ),
520
- page.isHome && /* @__PURE__ */ React16.createElement(import_ui11.ListItemIcon, null, /* @__PURE__ */ React16.createElement(import_icons11.HomeIcon, { color: "disabled" }))
521
- )
522
- ), /* @__PURE__ */ React16.createElement(PageActionsMenu, { page, ...(0, import_ui11.bindMenu)(popupState) }));
523
- }
524
-
525
- // src/components/panel/pages-list/pages-collapsible-list.tsx
526
- function PagesCollapsibleList({ pages, isOpenByDefault = false }) {
527
- const label = `Pages (${pages.length})`;
528
- return /* @__PURE__ */ React17.createElement(
529
- CollapsibleList,
530
- {
531
- label,
532
- Icon: import_icons12.PageTypeIcon,
533
- isOpenByDefault
534
- },
535
- pages.map((page) => /* @__PURE__ */ React17.createElement(PageListItem, { key: page.id, page }))
536
- );
537
- }
538
-
539
- // src/components/panel/shell.tsx
540
- var mockPages = [
541
- {
542
- id: 1,
543
- type: "page",
544
- title: "This is a very long title that somebody wrote, a very very long line",
545
- status: "pending approval"
546
- },
547
- { id: 2, type: "page", title: "About", status: "publish" },
548
- { id: 3, type: "page", title: "Services", status: "publish", isHome: true },
549
- { id: 4, type: "page", title: "Contact", status: "draft" },
550
- { id: 5, type: "page", title: "FAQ", status: "publish" }
551
- ];
552
- var Shell = () => {
553
- return /* @__PURE__ */ React18.createElement(import_ui12.ThemeProvider, { colorScheme: "light" }, /* @__PURE__ */ React18.createElement(import_ui12.Box, { sx: { width: "100%", maxWidth: 360 } }, /* @__PURE__ */ React18.createElement(import_ui12.Paper, null, /* @__PURE__ */ React18.createElement(
554
- import_ui12.Grid,
555
- {
556
- container: true,
557
- justifyContent: "center",
558
- alignItems: "center",
559
- sx: { height: 51 }
560
- },
561
- /* @__PURE__ */ React18.createElement(import_ui12.Typography, { variant: "h6" }, "Pages")
562
- ), /* @__PURE__ */ React18.createElement(import_ui12.Divider, null), /* @__PURE__ */ React18.createElement(
563
- import_ui12.Box,
564
- {
565
- display: "flex",
566
- justifyContent: "flex-end",
567
- alignItems: "center"
568
- },
569
- /* @__PURE__ */ React18.createElement(
570
- import_ui12.Button,
571
- {
572
- sx: { mt: 4, mb: 4, mr: 5 },
573
- startIcon: /* @__PURE__ */ React18.createElement(import_icons13.PlusIcon, null)
574
- },
575
- "Add New"
576
- )
577
- ), /* @__PURE__ */ React18.createElement(import_ui12.Box, { sx: { width: "100%", maxWidth: 360 } }, /* @__PURE__ */ React18.createElement(import_ui12.List, { dense: true }, /* @__PURE__ */ React18.createElement(PagesCollapsibleList, { pages: mockPages, isOpenByDefault: true }))), /* @__PURE__ */ React18.createElement(import_ui12.Divider, null))));
578
- };
579
- var shell_default = Shell;
580
327
 
581
328
  // src/init.ts
582
329
  function init() {
583
330
  registerTopBarMenuItems();
584
- registerPanel();
585
331
  }
586
332
  function registerTopBarMenuItems() {
587
333
  (0, import_editor_app_bar.injectIntoPageIndication)({
@@ -589,12 +335,6 @@ function registerTopBarMenuItems() {
589
335
  filler: RecentlyEdited
590
336
  });
591
337
  }
592
- function registerPanel() {
593
- (0, import_editor.injectIntoTop)({
594
- id: "navigation-panel",
595
- filler: shell_default
596
- });
597
- }
598
338
 
599
339
  // src/index.ts
600
340
  init();
package/dist/index.mjs CHANGED
@@ -253,31 +253,6 @@ var RotateIcon = styled(ChevronDownIcon2, {
253
253
  duration: theme.transitions.duration.standard
254
254
  })
255
255
  }));
256
- function CollapsibleList({
257
- label,
258
- Icon,
259
- isOpenByDefault = false,
260
- children
261
- }) {
262
- const [isOpen, setIsOpen] = useState3(isOpenByDefault);
263
- return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(ListItem, { disableGutters: true }, /* @__PURE__ */ React6.createElement(ListItemIcon2, null, /* @__PURE__ */ React6.createElement(
264
- IconButton,
265
- {
266
- onClick: () => setIsOpen((prev) => !prev),
267
- sx: { color: "inherit" },
268
- size: "small"
269
- },
270
- /* @__PURE__ */ React6.createElement(RotateIcon, { fontSize: "small", isOpen })
271
- )), /* @__PURE__ */ React6.createElement(ListItemIcon2, null, /* @__PURE__ */ React6.createElement(Icon, null)), /* @__PURE__ */ React6.createElement(ListItemText, null, label)), /* @__PURE__ */ React6.createElement(
272
- Collapse,
273
- {
274
- in: isOpen,
275
- timeout: "auto",
276
- unmountOnExit: true
277
- },
278
- /* @__PURE__ */ React6.createElement(List, { dense: true }, children)
279
- ));
280
- }
281
256
 
282
257
  // src/components/panel/pages-list/pages-collapsible-list.tsx
283
258
  import { PageTypeIcon as PageTypeIcon2 } from "@elementor/icons";
@@ -300,45 +275,6 @@ import { useActiveDocument as useActiveDocument3, useNavigateToDocument as useNa
300
275
  // src/components/shared/page-title-and-status.tsx
301
276
  import * as React7 from "react";
302
277
  import { Box as Box2, Typography as Typography3 } from "@elementor/ui";
303
- var PageStatus = ({ status }) => {
304
- if ("publish" === status) {
305
- return null;
306
- }
307
- return /* @__PURE__ */ React7.createElement(
308
- Typography3,
309
- {
310
- component: "span",
311
- variant: "body1",
312
- sx: {
313
- textTransform: "capitalize",
314
- fontStyle: "italic",
315
- whiteSpace: "nowrap",
316
- flexBasis: "content"
317
- }
318
- },
319
- "(",
320
- status,
321
- ")"
322
- );
323
- };
324
- var PageTitle = ({ title }) => {
325
- const modifiedTitle = useReverseHtmlEntities(title);
326
- return /* @__PURE__ */ React7.createElement(
327
- Typography3,
328
- {
329
- component: "span",
330
- variant: "body1",
331
- noWrap: true,
332
- sx: {
333
- flexBasis: "auto"
334
- }
335
- },
336
- modifiedTitle
337
- );
338
- };
339
- function PageTitleAndStatus({ page }) {
340
- return /* @__PURE__ */ React7.createElement(Box2, { display: "flex" }, /* @__PURE__ */ React7.createElement(PageTitle, { title: page.title }), "\xA0", /* @__PURE__ */ React7.createElement(PageStatus, { status: page.status }));
341
- }
342
278
 
343
279
  // src/components/panel/actions-menu/page-actions-menu.tsx
344
280
  import * as React15 from "react";
@@ -355,224 +291,34 @@ import * as React9 from "react";
355
291
  // src/components/panel/actions-menu/action-list-item.tsx
356
292
  import * as React8 from "react";
357
293
  import { ListItemButton, ListItemIcon as ListItemIcon3, ListItemText as ListItemText2 } from "@elementor/ui";
358
- function ActionListItem({ title, icon: Icon, disabled, onClick }) {
359
- return /* @__PURE__ */ React8.createElement(
360
- ListItemButton,
361
- {
362
- disabled,
363
- onClick
364
- },
365
- /* @__PURE__ */ React8.createElement(ListItemIcon3, null, /* @__PURE__ */ React8.createElement(Icon, null)),
366
- /* @__PURE__ */ React8.createElement(ListItemText2, null, title)
367
- );
368
- }
369
294
 
370
295
  // src/components/panel/actions-menu/action-menu-item.tsx
371
296
  import { MenuItem as MenuItem3 } from "@elementor/ui";
372
- function ActionMenuItem(props) {
373
- return /* @__PURE__ */ React9.createElement(MenuItem3, { disableGutters: true }, /* @__PURE__ */ React9.createElement(ActionListItem, { ...props }));
374
- }
375
-
376
- // src/components/panel/pages-actions/rename.tsx
377
- function Rename() {
378
- return /* @__PURE__ */ React10.createElement(
379
- ActionMenuItem,
380
- {
381
- title: __3("Rename", "elementor"),
382
- icon: EraseIcon,
383
- onClick: () => null
384
- }
385
- );
386
- }
387
297
 
388
298
  // src/components/panel/pages-actions/duplicate.tsx
389
299
  import * as React11 from "react";
390
300
  import { __ as __4 } from "@wordpress/i18n";
391
301
  import { CopyIcon } from "@elementor/icons";
392
- function Duplicate() {
393
- return /* @__PURE__ */ React11.createElement(
394
- ActionMenuItem,
395
- {
396
- title: __4("Duplicate", "elementor"),
397
- icon: CopyIcon,
398
- onClick: () => null
399
- }
400
- );
401
- }
402
302
 
403
303
  // src/components/panel/pages-actions/delete.tsx
404
304
  import * as React12 from "react";
405
305
  import { TrashIcon } from "@elementor/icons";
406
306
  import { useActiveDocument as useActiveDocument2 } from "@elementor/editor-documents";
407
307
  import { __ as __5 } from "@wordpress/i18n";
408
- function Delete({ page }) {
409
- const activeDocument = useActiveDocument2();
410
- const isActive = activeDocument?.id === page.id;
411
- return /* @__PURE__ */ React12.createElement(
412
- ActionMenuItem,
413
- {
414
- title: __5("Delete", "elementor"),
415
- icon: TrashIcon,
416
- disabled: page.isHome || isActive,
417
- onClick: () => null
418
- }
419
- );
420
- }
421
308
 
422
309
  // src/components/panel/pages-actions/view.tsx
423
310
  import * as React13 from "react";
424
311
  import { EyeIcon } from "@elementor/icons";
425
312
  import { __ as __6 } from "@wordpress/i18n";
426
- function View() {
427
- return /* @__PURE__ */ React13.createElement(
428
- ActionMenuItem,
429
- {
430
- title: __6("View Page", "elementor"),
431
- icon: EyeIcon,
432
- onClick: () => null
433
- }
434
- );
435
- }
436
313
 
437
314
  // src/components/panel/pages-actions/set-home.tsx
438
315
  import * as React14 from "react";
439
316
  import { HomeIcon } from "@elementor/icons";
440
317
  import { __ as __7 } from "@wordpress/i18n";
441
- function SetHome({ page }) {
442
- return /* @__PURE__ */ React14.createElement(
443
- ActionMenuItem,
444
- {
445
- title: __7("Set as homepage", "elementor"),
446
- icon: HomeIcon,
447
- disabled: !!page.isHome,
448
- onClick: () => null
449
- }
450
- );
451
- }
452
-
453
- // src/components/panel/actions-menu/page-actions-menu.tsx
454
- function PageActionsMenu({ page, ...props }) {
455
- return /* @__PURE__ */ React15.createElement(
456
- Menu2,
457
- {
458
- PaperProps: { sx: { mt: 4, width: 200 } },
459
- MenuListProps: { dense: true },
460
- ...props
461
- },
462
- /* @__PURE__ */ React15.createElement(Rename, null),
463
- /* @__PURE__ */ React15.createElement(Duplicate, null),
464
- /* @__PURE__ */ React15.createElement(Delete, { page }),
465
- /* @__PURE__ */ React15.createElement(View, null),
466
- /* @__PURE__ */ React15.createElement(Divider2, null),
467
- /* @__PURE__ */ React15.createElement(SetHome, { page })
468
- );
469
- }
470
-
471
- // src/components/panel/pages-list/page-list-item.tsx
472
- function PageListItem({ page }) {
473
- const popupState = usePopupState2({
474
- variant: "popover",
475
- popupId: "page-actions"
476
- });
477
- const activeDocument = useActiveDocument3();
478
- const navigateToDocument = useNavigateToDocument3();
479
- const isActive = activeDocument?.id === page.id;
480
- return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(
481
- ListItem2,
482
- {
483
- disablePadding: true,
484
- secondaryAction: /* @__PURE__ */ React16.createElement(
485
- ToggleButton,
486
- {
487
- value: true,
488
- color: "secondary",
489
- size: "small",
490
- selected: popupState.isOpen,
491
- ...bindTrigger2(popupState)
492
- },
493
- /* @__PURE__ */ React16.createElement(DotsVerticalIcon, { fontSize: "small" })
494
- )
495
- },
496
- /* @__PURE__ */ React16.createElement(
497
- ListItemButton2,
498
- {
499
- selected: isActive,
500
- onClick: () => navigateToDocument(page.id),
501
- dense: true
502
- },
503
- /* @__PURE__ */ React16.createElement(ListItemIcon4, null),
504
- /* @__PURE__ */ React16.createElement(
505
- ListItemText3,
506
- {
507
- disableTypography: true
508
- },
509
- /* @__PURE__ */ React16.createElement(PageTitleAndStatus, { page })
510
- ),
511
- page.isHome && /* @__PURE__ */ React16.createElement(ListItemIcon4, null, /* @__PURE__ */ React16.createElement(HomeIcon2, { color: "disabled" }))
512
- )
513
- ), /* @__PURE__ */ React16.createElement(PageActionsMenu, { page, ...bindMenu2(popupState) }));
514
- }
515
-
516
- // src/components/panel/pages-list/pages-collapsible-list.tsx
517
- function PagesCollapsibleList({ pages, isOpenByDefault = false }) {
518
- const label = `Pages (${pages.length})`;
519
- return /* @__PURE__ */ React17.createElement(
520
- CollapsibleList,
521
- {
522
- label,
523
- Icon: PageTypeIcon2,
524
- isOpenByDefault
525
- },
526
- pages.map((page) => /* @__PURE__ */ React17.createElement(PageListItem, { key: page.id, page }))
527
- );
528
- }
529
-
530
- // src/components/panel/shell.tsx
531
- var mockPages = [
532
- {
533
- id: 1,
534
- type: "page",
535
- title: "This is a very long title that somebody wrote, a very very long line",
536
- status: "pending approval"
537
- },
538
- { id: 2, type: "page", title: "About", status: "publish" },
539
- { id: 3, type: "page", title: "Services", status: "publish", isHome: true },
540
- { id: 4, type: "page", title: "Contact", status: "draft" },
541
- { id: 5, type: "page", title: "FAQ", status: "publish" }
542
- ];
543
- var Shell = () => {
544
- return /* @__PURE__ */ React18.createElement(ThemeProvider, { colorScheme: "light" }, /* @__PURE__ */ React18.createElement(Box3, { sx: { width: "100%", maxWidth: 360 } }, /* @__PURE__ */ React18.createElement(Paper, null, /* @__PURE__ */ React18.createElement(
545
- Grid,
546
- {
547
- container: true,
548
- justifyContent: "center",
549
- alignItems: "center",
550
- sx: { height: 51 }
551
- },
552
- /* @__PURE__ */ React18.createElement(Typography4, { variant: "h6" }, "Pages")
553
- ), /* @__PURE__ */ React18.createElement(Divider3, null), /* @__PURE__ */ React18.createElement(
554
- Box3,
555
- {
556
- display: "flex",
557
- justifyContent: "flex-end",
558
- alignItems: "center"
559
- },
560
- /* @__PURE__ */ React18.createElement(
561
- Button2,
562
- {
563
- sx: { mt: 4, mb: 4, mr: 5 },
564
- startIcon: /* @__PURE__ */ React18.createElement(PlusIcon2, null)
565
- },
566
- "Add New"
567
- )
568
- ), /* @__PURE__ */ React18.createElement(Box3, { sx: { width: "100%", maxWidth: 360 } }, /* @__PURE__ */ React18.createElement(List2, { dense: true }, /* @__PURE__ */ React18.createElement(PagesCollapsibleList, { pages: mockPages, isOpenByDefault: true }))), /* @__PURE__ */ React18.createElement(Divider3, null))));
569
- };
570
- var shell_default = Shell;
571
318
 
572
319
  // src/init.ts
573
320
  function init() {
574
321
  registerTopBarMenuItems();
575
- registerPanel();
576
322
  }
577
323
  function registerTopBarMenuItems() {
578
324
  injectIntoPageIndication({
@@ -580,12 +326,6 @@ function registerTopBarMenuItems() {
580
326
  filler: RecentlyEdited
581
327
  });
582
328
  }
583
- function registerPanel() {
584
- injectIntoTop({
585
- id: "navigation-panel",
586
- filler: shell_default
587
- });
588
- }
589
329
 
590
330
  // src/index.ts
591
331
  init();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elementor/editor-site-navigation",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "private": false,
5
5
  "author": "Elementor Team",
6
6
  "homepage": "https://elementor.com/",
@@ -47,5 +47,5 @@
47
47
  "elementor": {
48
48
  "type": "extension"
49
49
  },
50
- "gitHead": "d15192c0e60703e9831f7813d0a32d5943fe6c28"
50
+ "gitHead": "ada7204a85dbd362c29518f8ab28defe6942a4b7"
51
51
  }
package/src/init.ts CHANGED
@@ -6,7 +6,7 @@ import Shell from './components/panel/shell';
6
6
  export default function init() {
7
7
  registerTopBarMenuItems();
8
8
  // TODO 06/06/2023 : uncomment registerPanel() when we are ready to release
9
- registerPanel();
9
+ // registerPanel();
10
10
  }
11
11
 
12
12
  function registerTopBarMenuItems() {