@elementor/editor-site-navigation 4.5.0-1236 → 4.5.0-1238

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
@@ -99,12 +99,12 @@ var import_editor_sidebar2 = require("@elementor/editor-sidebar");
99
99
  var import_editor_panels2 = require("@elementor/editor-panels");
100
100
 
101
101
  // src/components/panel/shell.tsx
102
- var React39 = __toESM(require("react"));
103
- var import_react16 = require("react");
102
+ var React42 = __toESM(require("react"));
103
+ var import_react17 = require("react");
104
104
  var import_editor_panels = require("@elementor/editor-panels");
105
105
  var import_editor_sidebar = require("@elementor/editor-sidebar");
106
- var import_ui27 = require("@elementor/ui");
107
- var import_i18n28 = require("@wordpress/i18n");
106
+ var import_ui29 = require("@elementor/ui");
107
+ var import_i18n29 = require("@wordpress/i18n");
108
108
 
109
109
  // src/contexts/content-panel-coordinator.tsx
110
110
  var React = __toESM(require("react"));
@@ -146,6 +146,10 @@ function useContentPanelCoordinator() {
146
146
  return context;
147
147
  }
148
148
 
149
+ // src/contexts/site-content-panel-sections-filter.tsx
150
+ var React2 = __toESM(require("react"));
151
+ var import_react3 = require("react");
152
+
149
153
  // src/hooks/use-accessible-panel-post-types.ts
150
154
  var import_react2 = require("react");
151
155
 
@@ -333,6 +337,109 @@ function useAccessiblePanelPostTypes() {
333
337
  };
334
338
  }
335
339
 
340
+ // src/site-content-sections.ts
341
+ var registeredSections = /* @__PURE__ */ new Map();
342
+ var DEFAULT_SECTION_PRIORITY = 0;
343
+ function registerSiteContentSection(section) {
344
+ registeredSections.set(section.id, section);
345
+ }
346
+ function getSiteContentSections() {
347
+ return Array.from(registeredSections.values()).sort(
348
+ (first, second) => (first.priority ?? DEFAULT_SECTION_PRIORITY) - (second.priority ?? DEFAULT_SECTION_PRIORITY)
349
+ );
350
+ }
351
+ function resetSiteContentSections() {
352
+ registeredSections.clear();
353
+ }
354
+
355
+ // src/site-content-panel-sections.ts
356
+ var SITE_CONTENT_PANEL_SECTIONS_FILTER_POPOVER_WIDTH_PX = 280;
357
+ function getSiteContentPanelSectionDescriptors(accessiblePostTypes) {
358
+ const postTypeSections = accessiblePostTypes.map((slug) => ({
359
+ id: slug,
360
+ label: postTypesMap[slug].labels.plural_name
361
+ }));
362
+ const registeredSections2 = getSiteContentSections().map((section) => ({
363
+ id: section.id,
364
+ label: section.label ?? section.id
365
+ }));
366
+ return [...postTypeSections, ...registeredSections2];
367
+ }
368
+ function hasHiddenSiteContentPanelSections(hiddenSectionIds) {
369
+ return hiddenSectionIds.size > 0;
370
+ }
371
+
372
+ // src/contexts/site-content-panel-sections-filter.tsx
373
+ var SiteContentPanelSectionsFilterContext = (0, import_react3.createContext)(
374
+ null
375
+ );
376
+ function SiteContentPanelSectionsFilterProvider({ children }) {
377
+ const { accessiblePostTypes } = useAccessiblePanelPostTypes();
378
+ const descriptors = (0, import_react3.useMemo)(
379
+ () => getSiteContentPanelSectionDescriptors(accessiblePostTypes),
380
+ [accessiblePostTypes]
381
+ );
382
+ const [hiddenSectionIds, setHiddenSectionIds] = (0, import_react3.useState)(() => /* @__PURE__ */ new Set());
383
+ (0, import_react3.useEffect)(() => {
384
+ const validIds = new Set(descriptors.map((descriptor) => descriptor.id));
385
+ setHiddenSectionIds((current) => {
386
+ const nextHidden = new Set([...current].filter((id) => validIds.has(id)));
387
+ return nextHidden.size === current.size ? current : nextHidden;
388
+ });
389
+ }, [descriptors]);
390
+ const setSectionVisible = (0, import_react3.useCallback)(
391
+ (sectionId, visible) => {
392
+ setHiddenSectionIds((current) => {
393
+ if (visible) {
394
+ if (!current.has(sectionId)) {
395
+ return current;
396
+ }
397
+ const next2 = new Set(current);
398
+ next2.delete(sectionId);
399
+ return next2;
400
+ }
401
+ const visibleSectionCount = descriptors.length - current.size;
402
+ if (current.has(sectionId) || visibleSectionCount <= 1) {
403
+ return current;
404
+ }
405
+ const next = new Set(current);
406
+ next.add(sectionId);
407
+ return next;
408
+ });
409
+ },
410
+ [descriptors.length]
411
+ );
412
+ const isSectionVisible = (0, import_react3.useCallback)(
413
+ (sectionId) => !hiddenSectionIds.has(sectionId),
414
+ [hiddenSectionIds]
415
+ );
416
+ const clearHiddenSections = (0, import_react3.useCallback)(() => {
417
+ setHiddenSectionIds(() => /* @__PURE__ */ new Set());
418
+ }, []);
419
+ const value = (0, import_react3.useMemo)(
420
+ () => ({
421
+ clearHiddenSections,
422
+ descriptors,
423
+ hasHiddenSections: hasHiddenSiteContentPanelSections(hiddenSectionIds),
424
+ hiddenSectionIds,
425
+ isSectionVisible,
426
+ setSectionVisible,
427
+ shouldShowSectionsFilter: descriptors.length > 1
428
+ }),
429
+ [clearHiddenSections, descriptors, hiddenSectionIds, isSectionVisible, setSectionVisible]
430
+ );
431
+ return /* @__PURE__ */ React2.createElement(SiteContentPanelSectionsFilterContext.Provider, { value }, children);
432
+ }
433
+ function useSiteContentPanelSectionsFilter() {
434
+ const context = (0, import_react3.useContext)(SiteContentPanelSectionsFilterContext);
435
+ if (!context) {
436
+ throw new Error(
437
+ "useSiteContentPanelSectionsFilter() must be used within a SiteContentPanelSectionsFilterProvider"
438
+ );
439
+ }
440
+ return context;
441
+ }
442
+
336
443
  // src/components/panel/content-panel-chrome.ts
337
444
  var CONTENT_PANEL_INSET_SPACING = 2;
338
445
  var CONTENT_PANEL_LIST_ROW_GAP = 0.5;
@@ -428,7 +535,7 @@ var contentPanelListItemButtonSx = {
428
535
  };
429
536
 
430
537
  // src/components/panel/content-panel-header-add.tsx
431
- var React5 = __toESM(require("react"));
538
+ var React6 = __toESM(require("react"));
432
539
  var import_icons4 = require("@elementor/icons");
433
540
  var import_ui4 = require("@elementor/ui");
434
541
  var import_i18n5 = require("@wordpress/i18n");
@@ -462,24 +569,24 @@ function resetSiteContentHeaderCreateItems() {
462
569
  }
463
570
 
464
571
  // src/components/panel/content-panel-add-icon-button.tsx
465
- var React2 = __toESM(require("react"));
572
+ var React3 = __toESM(require("react"));
466
573
  var import_icons2 = require("@elementor/icons");
467
574
  var import_ui = require("@elementor/ui");
468
575
  var CONTENT_PANEL_ADD_ICON_SIZE = "tiny";
469
576
  function ContentPanelAddIconButton(props) {
470
- return /* @__PURE__ */ React2.createElement(import_ui.IconButton, { size: CONTENT_PANEL_ADD_ICON_SIZE, variant: "outlined", ...props }, /* @__PURE__ */ React2.createElement(import_icons2.PlusIcon, { fontSize: CONTENT_PANEL_ADD_ICON_SIZE }));
577
+ return /* @__PURE__ */ React3.createElement(import_ui.IconButton, { size: CONTENT_PANEL_ADD_ICON_SIZE, variant: "outlined", ...props }, /* @__PURE__ */ React3.createElement(import_icons2.PlusIcon, { fontSize: CONTENT_PANEL_ADD_ICON_SIZE }));
471
578
  }
472
579
 
473
580
  // src/components/panel/popups/popup-header-create-menu-item.tsx
474
- var React4 = __toESM(require("react"));
475
- var import_react4 = require("react");
581
+ var React5 = __toESM(require("react"));
582
+ var import_react5 = require("react");
476
583
  var import_icons3 = require("@elementor/icons");
477
584
  var import_ui3 = require("@elementor/ui");
478
585
  var import_i18n4 = require("@wordpress/i18n");
479
586
 
480
587
  // src/components/panel/popups/site-content-popups-promotion-chip.tsx
481
- var React3 = __toESM(require("react"));
482
- var import_react3 = require("react");
588
+ var React4 = __toESM(require("react"));
589
+ var import_react4 = require("react");
483
590
  var import_editor_controls = require("@elementor/editor-controls");
484
591
  var import_editor_ui = require("@elementor/editor-ui");
485
592
  var import_ui2 = require("@elementor/ui");
@@ -488,11 +595,11 @@ var TRACKING_DATA = {
488
595
  target_name: "popups",
489
596
  target_location: "widget_panel"
490
597
  };
491
- var SiteContentPopupsPromotionChip = (0, import_react3.forwardRef)((_, ref) => {
492
- const [isOpen, setIsOpen] = (0, import_react3.useState)(false);
598
+ var SiteContentPopupsPromotionChip = (0, import_react4.forwardRef)((_, ref) => {
599
+ const [isOpen, setIsOpen] = (0, import_react4.useState)(false);
493
600
  const upgradeUrl = env.popups?.upgrade_url ?? POPUP_SITE_CONTENT_UPGRADE_URL;
494
601
  (0, import_editor_ui.useCanvasClickHandler)(isOpen, () => setIsOpen(false));
495
- const toggle = (0, import_react3.useCallback)(() => {
602
+ const toggle = (0, import_react4.useCallback)(() => {
496
603
  setIsOpen((previous) => {
497
604
  if (!previous) {
498
605
  (0, import_editor_controls.trackViewPromotion)(TRACKING_DATA);
@@ -500,8 +607,8 @@ var SiteContentPopupsPromotionChip = (0, import_react3.forwardRef)((_, ref) => {
500
607
  return !previous;
501
608
  });
502
609
  }, []);
503
- (0, import_react3.useImperativeHandle)(ref, () => ({ toggle }), [toggle]);
504
- return /* @__PURE__ */ React3.createElement(
610
+ (0, import_react4.useImperativeHandle)(ref, () => ({ toggle }), [toggle]);
611
+ return /* @__PURE__ */ React4.createElement(
505
612
  import_editor_ui.PromotionPopover,
506
613
  {
507
614
  open: isOpen,
@@ -515,7 +622,7 @@ var SiteContentPopupsPromotionChip = (0, import_react3.forwardRef)((_, ref) => {
515
622
  },
516
623
  onCtaClick: () => (0, import_editor_controls.trackUpgradePromotionClick)(TRACKING_DATA)
517
624
  },
518
- /* @__PURE__ */ React3.createElement(
625
+ /* @__PURE__ */ React4.createElement(
519
626
  import_ui2.Box,
520
627
  {
521
628
  onClick: (event) => {
@@ -524,14 +631,14 @@ var SiteContentPopupsPromotionChip = (0, import_react3.forwardRef)((_, ref) => {
524
631
  },
525
632
  sx: { cursor: "pointer", display: "inline-flex" }
526
633
  },
527
- /* @__PURE__ */ React3.createElement(import_editor_ui.PromotionChip, null)
634
+ /* @__PURE__ */ React4.createElement(import_editor_ui.PromotionChip, null)
528
635
  )
529
636
  );
530
637
  });
531
638
 
532
639
  // src/components/panel/popups/popup-header-create-menu-item.tsx
533
640
  function PopupHeaderCreateMenuItem({ onSelect }) {
534
- const promotionRef = (0, import_react4.useRef)(null);
641
+ const promotionRef = (0, import_react5.useRef)(null);
535
642
  const canCreate = env.popups?.can_use ?? false;
536
643
  const label = (0, import_i18n4.__)("Popup", "elementor");
537
644
  const handleClick = () => {
@@ -541,7 +648,7 @@ function PopupHeaderCreateMenuItem({ onSelect }) {
541
648
  }
542
649
  onSelect();
543
650
  };
544
- return /* @__PURE__ */ React4.createElement(import_ui3.MenuItem, { onClick: handleClick }, /* @__PURE__ */ React4.createElement(import_ui3.ListItemIcon, null, /* @__PURE__ */ React4.createElement(import_icons3.PopupTemplateIcon, { fontSize: "small", color: canCreate ? "action" : "disabled" })), /* @__PURE__ */ React4.createElement(
651
+ return /* @__PURE__ */ React5.createElement(import_ui3.MenuItem, { onClick: handleClick }, /* @__PURE__ */ React5.createElement(import_ui3.ListItemIcon, null, /* @__PURE__ */ React5.createElement(import_icons3.PopupTemplateIcon, { fontSize: "small", color: canCreate ? "action" : "disabled" })), /* @__PURE__ */ React5.createElement(
545
652
  import_ui3.ListItemText,
546
653
  {
547
654
  primary: label,
@@ -550,7 +657,7 @@ function PopupHeaderCreateMenuItem({ onSelect }) {
550
657
  color: canCreate ? "text.primary" : "text.disabled"
551
658
  }
552
659
  }
553
- ), !canCreate && /* @__PURE__ */ React4.createElement(import_ui3.Box, { sx: { flexShrink: 0, ml: "auto", pl: 1 } }, /* @__PURE__ */ React4.createElement(SiteContentPopupsPromotionChip, { ref: promotionRef })));
660
+ ), !canCreate && /* @__PURE__ */ React5.createElement(import_ui3.Box, { sx: { flexShrink: 0, ml: "auto", pl: 1 } }, /* @__PURE__ */ React5.createElement(SiteContentPopupsPromotionChip, { ref: promotionRef })));
554
661
  }
555
662
 
556
663
  // src/components/panel/content-panel-header-add.tsx
@@ -562,7 +669,7 @@ function HeaderAddMenuItem({ slug, onSelect }) {
562
669
  const canCreate = useCanCreate(slug);
563
670
  const Icon = typeIcons[slug];
564
671
  const singularName = postTypesMap[slug].labels.singular_name;
565
- return /* @__PURE__ */ React5.createElement(import_ui4.MenuItem, { disabled: !canCreate, onClick: () => onSelect(slug) }, /* @__PURE__ */ React5.createElement(import_ui4.ListItemIcon, null, /* @__PURE__ */ React5.createElement(Icon, { fontSize: "small" })), /* @__PURE__ */ React5.createElement(import_ui4.ListItemText, { primary: singularName, primaryTypographyProps: { variant: "body2" } }));
672
+ return /* @__PURE__ */ React6.createElement(import_ui4.MenuItem, { disabled: !canCreate, onClick: () => onSelect(slug) }, /* @__PURE__ */ React6.createElement(import_ui4.ListItemIcon, null, /* @__PURE__ */ React6.createElement(Icon, { fontSize: "small" })), /* @__PURE__ */ React6.createElement(import_ui4.ListItemText, { primary: singularName, primaryTypographyProps: { variant: "body2" } }));
566
673
  }
567
674
  function ContentPanelHeaderAdd() {
568
675
  const { requestCreate } = useContentPanelCoordinator();
@@ -587,14 +694,14 @@ function ContentPanelHeaderAdd() {
587
694
  requestCreate(POPUPS_SITE_CONTENT_SECTION_ID);
588
695
  });
589
696
  };
590
- return /* @__PURE__ */ React5.createElement(React5.Fragment, null, /* @__PURE__ */ React5.createElement(
697
+ return /* @__PURE__ */ React6.createElement(React6.Fragment, null, /* @__PURE__ */ React6.createElement(
591
698
  ContentPanelAddIconButton,
592
699
  {
593
700
  "aria-label": (0, import_i18n5.__)("Add new", "elementor"),
594
701
  ...buttonProps,
595
702
  disabled: !canAddAny
596
703
  }
597
- ), /* @__PURE__ */ React5.createElement(import_ui4.Menu, { ...menuProps }, accessibleSlugs.map((slug) => /* @__PURE__ */ React5.createElement(HeaderAddMenuItem, { key: slug, onSelect: handleSelectType, slug })), /* @__PURE__ */ React5.createElement(PopupHeaderCreateMenuItem, { onSelect: handleSelectPopup }), headerCreateItems.map((item) => /* @__PURE__ */ React5.createElement(React5.Fragment, { key: item.id }, item.renderMenuItem(() => {
704
+ ), /* @__PURE__ */ React6.createElement(import_ui4.Menu, { ...menuProps }, accessibleSlugs.map((slug) => /* @__PURE__ */ React6.createElement(HeaderAddMenuItem, { key: slug, onSelect: handleSelectType, slug })), /* @__PURE__ */ React6.createElement(PopupHeaderCreateMenuItem, { onSelect: handleSelectPopup }), headerCreateItems.map((item) => /* @__PURE__ */ React6.createElement(React6.Fragment, { key: item.id }, item.renderMenuItem(() => {
598
705
  popupState.close();
599
706
  requestAnimationFrame(() => {
600
707
  requestCreate(item.id);
@@ -602,12 +709,110 @@ function ContentPanelHeaderAdd() {
602
709
  })))));
603
710
  }
604
711
 
605
- // src/components/panel/error-snackbar.tsx
606
- var React6 = __toESM(require("react"));
712
+ // src/components/panel/content-panel-sections-filter.tsx
713
+ var React9 = __toESM(require("react"));
714
+ var import_editor_ui2 = require("@elementor/editor-ui");
715
+ var import_icons7 = require("@elementor/icons");
716
+ var import_ui7 = require("@elementor/ui");
717
+ var import_i18n6 = require("@wordpress/i18n");
718
+
719
+ // src/components/panel/content-panel-clear-filters-button.tsx
720
+ var React7 = __toESM(require("react"));
721
+ var import_icons5 = require("@elementor/icons");
607
722
  var import_ui5 = require("@elementor/ui");
723
+ function ContentPanelClearFiltersButton({ ariaLabel, onClear, sx, tooltipText }) {
724
+ return /* @__PURE__ */ React7.createElement(import_ui5.Tooltip, { disableInteractive: true, placement: "top", title: tooltipText }, /* @__PURE__ */ React7.createElement(import_ui5.Box, null, /* @__PURE__ */ React7.createElement(import_ui5.IconButton, { "aria-label": ariaLabel, onClick: onClear, size: "tiny", sx }, /* @__PURE__ */ React7.createElement(import_icons5.BrushBigIcon, { fontSize: "tiny" }))));
725
+ }
726
+
727
+ // src/components/panel/content-panel-sections-filter-list.tsx
728
+ var React8 = __toESM(require("react"));
729
+ var import_icons6 = require("@elementor/icons");
730
+ var import_ui6 = require("@elementor/ui");
731
+ var renderSectionMenuItemContent = (label, selected) => /* @__PURE__ */ React8.createElement(import_ui6.Stack, { alignItems: "center", direction: "row", gap: 1, width: "100%" }, /* @__PURE__ */ React8.createElement(import_ui6.Typography, { sx: { color: "text.secondary", flex: 1 }, variant: "caption" }, label), selected ? /* @__PURE__ */ React8.createElement(import_icons6.CheckIcon, { "aria-hidden": true, fontSize: "tiny" }) : null);
732
+ function ContentPanelSectionsFilterList() {
733
+ const { descriptors, isSectionVisible, setSectionVisible } = useSiteContentPanelSectionsFilter();
734
+ return /* @__PURE__ */ React8.createElement(import_ui6.MenuList, { dense: true }, descriptors.map((descriptor) => {
735
+ const selected = isSectionVisible(descriptor.id);
736
+ return /* @__PURE__ */ React8.createElement(
737
+ import_ui6.MenuItem,
738
+ {
739
+ key: descriptor.id,
740
+ dense: true,
741
+ onClick: () => setSectionVisible(descriptor.id, !selected),
742
+ selected
743
+ },
744
+ renderSectionMenuItemContent(descriptor.label, selected)
745
+ );
746
+ }));
747
+ }
748
+
749
+ // src/components/panel/content-panel-sections-filter.tsx
750
+ function ContentPanelSectionsFilter() {
751
+ const { clearHiddenSections, hasHiddenSections, shouldShowSectionsFilter } = useSiteContentPanelSectionsFilter();
752
+ const popupState = (0, import_ui7.usePopupState)({
753
+ variant: "popover",
754
+ disableAutoFocus: true
755
+ });
756
+ if (!shouldShowSectionsFilter) {
757
+ return null;
758
+ }
759
+ const filterLabel = (0, import_i18n6.__)("Content types", "elementor");
760
+ return /* @__PURE__ */ React9.createElement(React9.Fragment, null, /* @__PURE__ */ React9.createElement(import_ui7.Tooltip, { placement: "top", title: filterLabel }, /* @__PURE__ */ React9.createElement(
761
+ import_ui7.ToggleButton,
762
+ {
763
+ "aria-label": filterLabel,
764
+ selected: popupState.isOpen || hasHiddenSections,
765
+ size: "tiny",
766
+ value: "content-types",
767
+ ...(0, import_ui7.bindToggle)(popupState)
768
+ },
769
+ /* @__PURE__ */ React9.createElement(import_icons7.FilterIcon, { fontSize: "tiny" })
770
+ )), /* @__PURE__ */ React9.createElement(
771
+ import_ui7.Popover,
772
+ {
773
+ anchorOrigin: {
774
+ horizontal: "right",
775
+ vertical: "top"
776
+ },
777
+ sx: {
778
+ maxWidth: `${SITE_CONTENT_PANEL_SECTIONS_FILTER_POPOVER_WIDTH_PX}px`
779
+ },
780
+ transformOrigin: {
781
+ horizontal: -21,
782
+ vertical: "top"
783
+ },
784
+ ...(0, import_ui7.bindPopover)(popupState)
785
+ },
786
+ /* @__PURE__ */ React9.createElement(
787
+ import_editor_ui2.PopoverHeader,
788
+ {
789
+ actions: hasHiddenSections ? [
790
+ /* @__PURE__ */ React9.createElement(
791
+ ContentPanelClearFiltersButton,
792
+ {
793
+ ariaLabel: (0, import_i18n6.__)("Show all", "elementor"),
794
+ key: "show-all-content-types",
795
+ onClear: clearHiddenSections,
796
+ tooltipText: (0, import_i18n6.__)("Show all", "elementor")
797
+ }
798
+ )
799
+ ] : [],
800
+ icon: /* @__PURE__ */ React9.createElement(import_icons7.FilterIcon, { fontSize: "tiny" }),
801
+ onClose: popupState.close,
802
+ title: filterLabel
803
+ }
804
+ ),
805
+ /* @__PURE__ */ React9.createElement(import_ui7.Divider, { sx: { borderWidth: "1px 0 0 0" } }),
806
+ /* @__PURE__ */ React9.createElement(import_editor_ui2.PopoverBody, { height: "auto", width: SITE_CONTENT_PANEL_SECTIONS_FILTER_POPOVER_WIDTH_PX }, /* @__PURE__ */ React9.createElement(ContentPanelSectionsFilterList, null))
807
+ ));
808
+ }
809
+
810
+ // src/components/panel/error-snackbar.tsx
811
+ var React10 = __toESM(require("react"));
812
+ var import_ui8 = require("@elementor/ui");
608
813
  var ErrorSnackbar = ({ open, onClose }) => {
609
- return /* @__PURE__ */ React6.createElement(
610
- import_ui5.Snackbar,
814
+ return /* @__PURE__ */ React10.createElement(
815
+ import_ui8.Snackbar,
611
816
  {
612
817
  open,
613
818
  onClose,
@@ -616,8 +821,8 @@ var ErrorSnackbar = ({ open, onClose }) => {
616
821
  horizontal: "left"
617
822
  }
618
823
  },
619
- /* @__PURE__ */ React6.createElement(import_ui5.Alert, { onClose, severity: "error", sx: { width: "100%" } }, /* @__PURE__ */ React6.createElement(
620
- import_ui5.Typography,
824
+ /* @__PURE__ */ React10.createElement(import_ui8.Alert, { onClose, severity: "error", sx: { width: "100%" } }, /* @__PURE__ */ React10.createElement(
825
+ import_ui8.Typography,
621
826
  {
622
827
  component: "span",
623
828
  sx: {
@@ -631,12 +836,12 @@ var ErrorSnackbar = ({ open, onClose }) => {
631
836
  var error_snackbar_default = ErrorSnackbar;
632
837
 
633
838
  // src/components/panel/shell-panel-body-content.tsx
634
- var React38 = __toESM(require("react"));
635
- var import_ui26 = require("@elementor/ui");
839
+ var React41 = __toESM(require("react"));
840
+ var import_ui28 = require("@elementor/ui");
636
841
 
637
842
  // src/contexts/post-list-context.tsx
638
- var React7 = __toESM(require("react"));
639
- var import_react5 = require("react");
843
+ var React11 = __toESM(require("react"));
844
+ var import_react6 = require("react");
640
845
  var defaultValues = {
641
846
  type: "page",
642
847
  editMode: { mode: "none", details: {} },
@@ -644,17 +849,17 @@ var defaultValues = {
644
849
  resetEditMode: () => null,
645
850
  setError: () => null
646
851
  };
647
- var PostListContext = (0, import_react5.createContext)(defaultValues);
852
+ var PostListContext = (0, import_react6.createContext)(defaultValues);
648
853
  var PostListContextProvider = ({
649
854
  type,
650
855
  setError,
651
856
  children
652
857
  }) => {
653
- const [editMode, setEditMode] = (0, import_react5.useState)(defaultValues.editMode);
858
+ const [editMode, setEditMode] = (0, import_react6.useState)(defaultValues.editMode);
654
859
  const resetEditMode = () => {
655
860
  setEditMode(defaultValues.editMode);
656
861
  };
657
- return /* @__PURE__ */ React7.createElement(
862
+ return /* @__PURE__ */ React11.createElement(
658
863
  PostListContext.Provider,
659
864
  {
660
865
  value: {
@@ -669,43 +874,28 @@ var PostListContextProvider = ({
669
874
  );
670
875
  };
671
876
  function usePostListContext() {
672
- const context = (0, import_react5.useContext)(PostListContext);
877
+ const context = (0, import_react6.useContext)(PostListContext);
673
878
  if (!context) {
674
879
  throw new Error("The `usePostListContext()` hook must be used within an `<PostListContextProvider />`");
675
880
  }
676
881
  return context;
677
882
  }
678
883
 
679
- // src/site-content-sections.ts
680
- var registeredSections = /* @__PURE__ */ new Map();
681
- var DEFAULT_SECTION_PRIORITY = 0;
682
- function registerSiteContentSection(section) {
683
- registeredSections.set(section.id, section);
684
- }
685
- function getSiteContentSections() {
686
- return Array.from(registeredSections.values()).sort(
687
- (first, second) => (first.priority ?? DEFAULT_SECTION_PRIORITY) - (second.priority ?? DEFAULT_SECTION_PRIORITY)
688
- );
689
- }
690
- function resetSiteContentSections() {
691
- registeredSections.clear();
692
- }
693
-
694
884
  // src/components/panel/posts-list/posts-collapsible-list.tsx
695
- var React36 = __toESM(require("react"));
696
- var import_react15 = require("react");
697
- var import_ui24 = require("@elementor/ui");
698
- var import_i18n26 = require("@wordpress/i18n");
885
+ var React39 = __toESM(require("react"));
886
+ var import_react16 = require("react");
887
+ var import_ui26 = require("@elementor/ui");
888
+ var import_i18n27 = require("@wordpress/i18n");
699
889
 
700
890
  // src/contexts/site-content-section-toolbar.tsx
701
- var React8 = __toESM(require("react"));
702
- var import_react7 = require("react");
891
+ var React12 = __toESM(require("react"));
892
+ var import_react8 = require("react");
703
893
 
704
894
  // src/hooks/use-site-content-section-list-controls.ts
705
- var import_react6 = require("react");
895
+ var import_react7 = require("react");
706
896
 
707
897
  // src/site-content-status-filter.ts
708
- var import_i18n6 = require("@wordpress/i18n");
898
+ var import_i18n7 = require("@wordpress/i18n");
709
899
  var SITE_CONTENT_SELECTABLE_STATUS_FILTERS = [
710
900
  "publish",
711
901
  "draft",
@@ -723,14 +913,14 @@ var EMPTY_SITE_CONTENT_STATUS_FILTERS = {
723
913
  trash: false
724
914
  };
725
915
  var filterLabels = {
726
- publish: (0, import_i18n6.__)("Published", "elementor"),
727
- draft: (0, import_i18n6.__)("Drafts", "elementor"),
728
- pending: (0, import_i18n6.__)("Pending", "elementor"),
729
- private: (0, import_i18n6.__)("Private", "elementor"),
730
- future: (0, import_i18n6.__)("Scheduled", "elementor"),
731
- trash: (0, import_i18n6.__)("Trash", "elementor")
916
+ publish: (0, import_i18n7.__)("Published", "elementor"),
917
+ draft: (0, import_i18n7.__)("Drafts", "elementor"),
918
+ pending: (0, import_i18n7.__)("Pending", "elementor"),
919
+ private: (0, import_i18n7.__)("Private", "elementor"),
920
+ future: (0, import_i18n7.__)("Scheduled", "elementor"),
921
+ trash: (0, import_i18n7.__)("Trash", "elementor")
732
922
  };
733
- var SITE_CONTENT_ALL_FILTER_LABEL = (0, import_i18n6.__)("All", "elementor");
923
+ var SITE_CONTENT_ALL_FILTER_LABEL = (0, import_i18n7.__)("All", "elementor");
734
924
  var SITE_CONTENT_FILTER_POPOVER_WIDTH_PX = 280;
735
925
  function getSiteContentStatusFilterLabel(filter) {
736
926
  return filterLabels[filter];
@@ -794,31 +984,31 @@ function shouldShowSiteContentStatusFilterRow(count, isLoadingCounts, isSelected
794
984
  // src/hooks/use-site-content-section-list-controls.ts
795
985
  var SEARCH_DEBOUNCE_MS = 300;
796
986
  function useSiteContentSectionListControls() {
797
- const [searchQuery, setSearchQuery] = (0, import_react6.useState)("");
798
- const [debouncedSearch, setDebouncedSearch] = (0, import_react6.useState)("");
799
- const [siteContentSort, setSiteContentSortState] = (0, import_react6.useState)(DEFAULT_SITE_CONTENT_SORT);
800
- const [statusFilters, setStatusFilters] = (0, import_react6.useState)(
987
+ const [searchQuery, setSearchQuery] = (0, import_react7.useState)("");
988
+ const [debouncedSearch, setDebouncedSearch] = (0, import_react7.useState)("");
989
+ const [siteContentSort, setSiteContentSortState] = (0, import_react7.useState)(DEFAULT_SITE_CONTENT_SORT);
990
+ const [statusFilters, setStatusFilters] = (0, import_react7.useState)(
801
991
  EMPTY_SITE_CONTENT_STATUS_FILTERS
802
992
  );
803
993
  const trimmedSearch = searchQuery.trim();
804
- (0, import_react6.useEffect)(() => {
994
+ (0, import_react7.useEffect)(() => {
805
995
  const handle = window.setTimeout(() => setDebouncedSearch(trimmedSearch), SEARCH_DEBOUNCE_MS);
806
996
  return () => window.clearTimeout(handle);
807
997
  }, [trimmedSearch]);
808
- const clearActiveToolbarFilters = (0, import_react6.useCallback)(() => {
998
+ const clearActiveToolbarFilters = (0, import_react7.useCallback)(() => {
809
999
  setSiteContentSortState(DEFAULT_SITE_CONTENT_SORT);
810
1000
  setStatusFilters(EMPTY_SITE_CONTENT_STATUS_FILTERS);
811
1001
  }, []);
812
- const clearSiteContentSort = (0, import_react6.useCallback)(() => {
1002
+ const clearSiteContentSort = (0, import_react7.useCallback)(() => {
813
1003
  setSiteContentSortState(DEFAULT_SITE_CONTENT_SORT);
814
1004
  }, []);
815
- const clearStatusFilters = (0, import_react6.useCallback)(() => {
1005
+ const clearStatusFilters = (0, import_react7.useCallback)(() => {
816
1006
  setStatusFilters(EMPTY_SITE_CONTENT_STATUS_FILTERS);
817
1007
  }, []);
818
- const setSiteContentSort = (0, import_react6.useCallback)((sort) => {
1008
+ const setSiteContentSort = (0, import_react7.useCallback)((sort) => {
819
1009
  setSiteContentSortState(sort);
820
1010
  }, []);
821
- const toggleStatusFilter = (0, import_react6.useCallback)((filter) => {
1011
+ const toggleStatusFilter = (0, import_react7.useCallback)((filter) => {
822
1012
  setStatusFilters((current) => toggleSiteContentStatusFilter(current, filter));
823
1013
  }, []);
824
1014
  return {
@@ -836,7 +1026,7 @@ function useSiteContentSectionListControls() {
836
1026
  }
837
1027
 
838
1028
  // src/contexts/site-content-section-toolbar.tsx
839
- var SiteContentSectionToolbarContext = (0, import_react7.createContext)(null);
1029
+ var SiteContentSectionToolbarContext = (0, import_react8.createContext)(null);
840
1030
  function SiteContentSectionToolbarProvider({
841
1031
  children,
842
1032
  statusFilterCountSlugs = [],
@@ -844,7 +1034,7 @@ function SiteContentSectionToolbarProvider({
844
1034
  statusFilterCountsPending = false
845
1035
  }) {
846
1036
  const controls = useSiteContentSectionListControls();
847
- const value = (0, import_react7.useMemo)(
1037
+ const value = (0, import_react8.useMemo)(
848
1038
  () => ({
849
1039
  ...controls,
850
1040
  statusFilterCountSlugs,
@@ -853,10 +1043,10 @@ function SiteContentSectionToolbarProvider({
853
1043
  }),
854
1044
  [controls, statusFilterCountSlugs, statusFilterCounts, statusFilterCountsPending]
855
1045
  );
856
- return /* @__PURE__ */ React8.createElement(SiteContentSectionToolbarContext.Provider, { value }, children);
1046
+ return /* @__PURE__ */ React12.createElement(SiteContentSectionToolbarContext.Provider, { value }, children);
857
1047
  }
858
1048
  function useSiteContentSectionToolbar() {
859
- const context = (0, import_react7.useContext)(SiteContentSectionToolbarContext);
1049
+ const context = (0, import_react8.useContext)(SiteContentSectionToolbarContext);
860
1050
  if (!context) {
861
1051
  throw new Error(
862
1052
  "The `useSiteContentSectionToolbar()` hook must be used within a `<SiteContentSectionToolbarProvider />`"
@@ -893,7 +1083,7 @@ function useHomepage() {
893
1083
  }
894
1084
 
895
1085
  // src/hooks/use-post-list-pagination.ts
896
- var import_react8 = require("react");
1086
+ var import_react9 = require("react");
897
1087
  function usePostListPagination({
898
1088
  fetchNextPage,
899
1089
  hasNextPage,
@@ -902,13 +1092,13 @@ function usePostListPagination({
902
1092
  resetKey,
903
1093
  totalCount
904
1094
  }) {
905
- const [visibleCount, setVisibleCount] = (0, import_react8.useState)(POST_PER_PAGE);
906
- const pendingVisibleTargetRef = (0, import_react8.useRef)(null);
907
- (0, import_react8.useEffect)(() => {
1095
+ const [visibleCount, setVisibleCount] = (0, import_react9.useState)(POST_PER_PAGE);
1096
+ const pendingVisibleTargetRef = (0, import_react9.useRef)(null);
1097
+ (0, import_react9.useEffect)(() => {
908
1098
  setVisibleCount(POST_PER_PAGE);
909
1099
  pendingVisibleTargetRef.current = null;
910
1100
  }, [resetKey]);
911
- (0, import_react8.useEffect)(() => {
1101
+ (0, import_react9.useEffect)(() => {
912
1102
  const target = pendingVisibleTargetRef.current;
913
1103
  if (target === null) {
914
1104
  return;
@@ -925,7 +1115,7 @@ function usePostListPagination({
925
1115
  }, [isFetchingNextPage, loadedCount]);
926
1116
  const canShowLess = visibleCount > POST_PER_PAGE;
927
1117
  const canLoadMore = visibleCount < loadedCount || hasNextPage;
928
- const handleLoadMore = (0, import_react8.useCallback)(() => {
1118
+ const handleLoadMore = (0, import_react9.useCallback)(() => {
929
1119
  if (isFetchingNextPage || !canLoadMore) {
930
1120
  return;
931
1121
  }
@@ -943,7 +1133,7 @@ function usePostListPagination({
943
1133
  setVisibleCount(Math.min(visibleCount + POST_PER_PAGE, loadedCount));
944
1134
  }
945
1135
  }, [canLoadMore, fetchNextPage, hasNextPage, isFetchingNextPage, loadedCount, totalCount, visibleCount]);
946
- const handleShowLess = (0, import_react8.useCallback)(() => {
1136
+ const handleShowLess = (0, import_react9.useCallback)(() => {
947
1137
  pendingVisibleTargetRef.current = null;
948
1138
  setVisibleCount(POST_PER_PAGE);
949
1139
  }, []);
@@ -1012,23 +1202,13 @@ function usePostsBaselineTotal(postTypeSlug, enabled, status = "any") {
1012
1202
  }
1013
1203
 
1014
1204
  // src/components/panel/content-panel-section-toolbar.tsx
1015
- var React16 = __toESM(require("react"));
1016
- var import_ui13 = require("@elementor/ui");
1017
-
1018
- // src/components/panel/content-panel-active-filters.tsx
1019
- var React10 = __toESM(require("react"));
1020
- var import_ui7 = require("@elementor/ui");
1021
- var import_i18n7 = require("@wordpress/i18n");
1022
-
1023
- // src/components/panel/content-panel-clear-filters-button.tsx
1024
- var React9 = __toESM(require("react"));
1025
- var import_icons5 = require("@elementor/icons");
1026
- var import_ui6 = require("@elementor/ui");
1027
- function ContentPanelClearFiltersButton({ ariaLabel, onClear, sx, tooltipText }) {
1028
- return /* @__PURE__ */ React9.createElement(import_ui6.Tooltip, { disableInteractive: true, placement: "top", title: tooltipText }, /* @__PURE__ */ React9.createElement(import_ui6.Box, null, /* @__PURE__ */ React9.createElement(import_ui6.IconButton, { "aria-label": ariaLabel, onClick: onClear, size: "tiny", sx }, /* @__PURE__ */ React9.createElement(import_icons5.BrushBigIcon, { fontSize: "tiny" }))));
1029
- }
1205
+ var React19 = __toESM(require("react"));
1206
+ var import_ui15 = require("@elementor/ui");
1030
1207
 
1031
1208
  // src/components/panel/content-panel-active-filters.tsx
1209
+ var React13 = __toESM(require("react"));
1210
+ var import_ui9 = require("@elementor/ui");
1211
+ var import_i18n8 = require("@wordpress/i18n");
1032
1212
  var contentPanelFilterChipSx = {
1033
1213
  "& .MuiChip-deleteIcon": {
1034
1214
  display: "none",
@@ -1046,16 +1226,16 @@ function ContentPanelActiveFilters() {
1046
1226
  return null;
1047
1227
  }
1048
1228
  const activeKeys = getActiveSiteContentStatusFilterKeys(statusFilters);
1049
- return /* @__PURE__ */ React10.createElement(import_ui7.Stack, { alignItems: "center", direction: "row", justifyContent: "space-between" }, /* @__PURE__ */ React10.createElement(import_ui7.Stack, { alignItems: "center", direction: "row", flexWrap: "wrap", gap: 0.5 }, hasSort && /* @__PURE__ */ React10.createElement(
1050
- import_ui7.Chip,
1229
+ return /* @__PURE__ */ React13.createElement(import_ui9.Stack, { alignItems: "center", direction: "row", justifyContent: "space-between" }, /* @__PURE__ */ React13.createElement(import_ui9.Stack, { alignItems: "center", direction: "row", flexWrap: "wrap", gap: 0.5 }, hasSort && /* @__PURE__ */ React13.createElement(
1230
+ import_ui9.Chip,
1051
1231
  {
1052
1232
  label: getSiteContentSortLabel(siteContentSort),
1053
1233
  onDelete: () => setSiteContentSort(DEFAULT_SITE_CONTENT_SORT),
1054
1234
  size: "tiny",
1055
1235
  sx: contentPanelFilterChipSx
1056
1236
  }
1057
- ), activeKeys.map((key) => /* @__PURE__ */ React10.createElement(
1058
- import_ui7.Chip,
1237
+ ), activeKeys.map((key) => /* @__PURE__ */ React13.createElement(
1238
+ import_ui9.Chip,
1059
1239
  {
1060
1240
  key,
1061
1241
  label: getSiteContentStatusFilterLabel(key),
@@ -1063,61 +1243,61 @@ function ContentPanelActiveFilters() {
1063
1243
  size: "tiny",
1064
1244
  sx: contentPanelFilterChipSx
1065
1245
  }
1066
- ))), /* @__PURE__ */ React10.createElement(
1246
+ ))), /* @__PURE__ */ React13.createElement(
1067
1247
  ContentPanelClearFiltersButton,
1068
1248
  {
1069
- ariaLabel: (0, import_i18n7.__)("Clear Filters", "elementor"),
1249
+ ariaLabel: (0, import_i18n8.__)("Clear Filters", "elementor"),
1070
1250
  onClear: clearActiveToolbarFilters,
1071
1251
  sx: { margin: "0 0 auto auto" },
1072
- tooltipText: (0, import_i18n7.__)("Clear Filters", "elementor")
1252
+ tooltipText: (0, import_i18n8.__)("Clear Filters", "elementor")
1073
1253
  }
1074
1254
  ));
1075
1255
  }
1076
1256
 
1077
1257
  // src/components/panel/content-panel-search.tsx
1078
- var React11 = __toESM(require("react"));
1079
- var import_icons6 = require("@elementor/icons");
1080
- var import_ui8 = require("@elementor/ui");
1081
- var import_i18n8 = require("@wordpress/i18n");
1258
+ var React14 = __toESM(require("react"));
1259
+ var import_icons8 = require("@elementor/icons");
1260
+ var import_ui10 = require("@elementor/ui");
1261
+ var import_i18n9 = require("@wordpress/i18n");
1082
1262
  function ContentPanelSearch({ searchAriaLabel }) {
1083
1263
  const { searchQuery, setSearchQuery } = useSiteContentSectionToolbar();
1084
- const ariaLabel = searchAriaLabel ?? (0, import_i18n8.__)("Search site content", "elementor");
1085
- return /* @__PURE__ */ React11.createElement(import_ui8.Box, { component: "search", "aria-label": ariaLabel }, /* @__PURE__ */ React11.createElement(
1086
- import_ui8.TextField,
1264
+ const ariaLabel = searchAriaLabel ?? (0, import_i18n9.__)("Search site content", "elementor");
1265
+ return /* @__PURE__ */ React14.createElement(import_ui10.Box, { component: "search", "aria-label": ariaLabel }, /* @__PURE__ */ React14.createElement(
1266
+ import_ui10.TextField,
1087
1267
  {
1088
1268
  fullWidth: true,
1089
1269
  size: "tiny",
1090
1270
  value: searchQuery,
1091
- placeholder: (0, import_i18n8.__)("Search", "elementor"),
1271
+ placeholder: (0, import_i18n9.__)("Search", "elementor"),
1092
1272
  onChange: (event) => setSearchQuery(event.target.value),
1093
1273
  inputProps: {
1094
- "aria-label": (0, import_i18n8.__)("Search", "elementor")
1274
+ "aria-label": (0, import_i18n9.__)("Search", "elementor")
1095
1275
  },
1096
1276
  InputProps: {
1097
- startAdornment: /* @__PURE__ */ React11.createElement(import_ui8.InputAdornment, { position: "start" }, /* @__PURE__ */ React11.createElement(import_icons6.SearchIcon, { fontSize: "tiny" }))
1277
+ startAdornment: /* @__PURE__ */ React14.createElement(import_ui10.InputAdornment, { position: "start" }, /* @__PURE__ */ React14.createElement(import_icons8.SearchIcon, { fontSize: "tiny" }))
1098
1278
  }
1099
1279
  }
1100
1280
  ));
1101
1281
  }
1102
1282
 
1103
1283
  // src/components/panel/content-panel-sort.tsx
1104
- var React13 = __toESM(require("react"));
1105
- var import_editor_ui2 = require("@elementor/editor-ui");
1106
- var import_icons8 = require("@elementor/icons");
1107
- var import_ui10 = require("@elementor/ui");
1108
- var import_i18n9 = require("@wordpress/i18n");
1284
+ var React16 = __toESM(require("react"));
1285
+ var import_editor_ui3 = require("@elementor/editor-ui");
1286
+ var import_icons10 = require("@elementor/icons");
1287
+ var import_ui12 = require("@elementor/ui");
1288
+ var import_i18n10 = require("@wordpress/i18n");
1109
1289
 
1110
1290
  // src/components/panel/content-panel-sort-list.tsx
1111
- var React12 = __toESM(require("react"));
1112
- var import_icons7 = require("@elementor/icons");
1113
- var import_ui9 = require("@elementor/ui");
1114
- var renderSortMenuItemContent = (label, selected) => /* @__PURE__ */ React12.createElement(import_ui9.Stack, { alignItems: "center", direction: "row", gap: 1, width: "100%" }, /* @__PURE__ */ React12.createElement(import_ui9.Typography, { sx: { color: "text.secondary", flex: 1 }, variant: "caption" }, label), selected ? /* @__PURE__ */ React12.createElement(import_icons7.CheckIcon, { "aria-hidden": true, fontSize: "tiny" }) : null);
1291
+ var React15 = __toESM(require("react"));
1292
+ var import_icons9 = require("@elementor/icons");
1293
+ var import_ui11 = require("@elementor/ui");
1294
+ var renderSortMenuItemContent = (label, selected) => /* @__PURE__ */ React15.createElement(import_ui11.Stack, { alignItems: "center", direction: "row", gap: 1, width: "100%" }, /* @__PURE__ */ React15.createElement(import_ui11.Typography, { sx: { color: "text.secondary", flex: 1 }, variant: "caption" }, label), selected ? /* @__PURE__ */ React15.createElement(import_icons9.CheckIcon, { "aria-hidden": true, fontSize: "tiny" }) : null);
1115
1295
  function ContentPanelSortList() {
1116
1296
  const { setSiteContentSort, siteContentSort } = useSiteContentSectionToolbar();
1117
- return /* @__PURE__ */ React12.createElement(import_ui9.MenuList, { dense: true }, SITE_CONTENT_SORT_OPTIONS.map((option) => {
1297
+ return /* @__PURE__ */ React15.createElement(import_ui11.MenuList, { dense: true }, SITE_CONTENT_SORT_OPTIONS.map((option) => {
1118
1298
  const isSelected = siteContentSort === option;
1119
- return /* @__PURE__ */ React12.createElement(
1120
- import_ui9.MenuItem,
1299
+ return /* @__PURE__ */ React15.createElement(
1300
+ import_ui11.MenuItem,
1121
1301
  {
1122
1302
  key: option,
1123
1303
  "aria-checked": isSelected,
@@ -1133,23 +1313,23 @@ function ContentPanelSortList() {
1133
1313
  // src/components/panel/content-panel-sort.tsx
1134
1314
  function ContentPanelSort() {
1135
1315
  const { clearSiteContentSort, siteContentSort } = useSiteContentSectionToolbar();
1136
- const popupState = (0, import_ui10.usePopupState)({
1316
+ const popupState = (0, import_ui12.usePopupState)({
1137
1317
  variant: "popover",
1138
1318
  disableAutoFocus: true
1139
1319
  });
1140
1320
  const hasActiveSort = hasActiveSiteContentSort(siteContentSort);
1141
- return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(import_ui10.Tooltip, { placement: "top", title: (0, import_i18n9.__)("Sort", "elementor") }, /* @__PURE__ */ React13.createElement(
1142
- import_ui10.ToggleButton,
1321
+ return /* @__PURE__ */ React16.createElement(React16.Fragment, null, /* @__PURE__ */ React16.createElement(import_ui12.Tooltip, { placement: "top", title: (0, import_i18n10.__)("Sort", "elementor") }, /* @__PURE__ */ React16.createElement(
1322
+ import_ui12.ToggleButton,
1143
1323
  {
1144
- "aria-label": (0, import_i18n9.__)("Sort", "elementor"),
1324
+ "aria-label": (0, import_i18n10.__)("Sort", "elementor"),
1145
1325
  selected: popupState.isOpen || hasActiveSort,
1146
1326
  size: "tiny",
1147
1327
  value: "sort",
1148
- ...(0, import_ui10.bindToggle)(popupState)
1328
+ ...(0, import_ui12.bindToggle)(popupState)
1149
1329
  },
1150
- /* @__PURE__ */ React13.createElement(import_icons8.ArrowsSortIcon, { fontSize: "tiny" })
1151
- )), /* @__PURE__ */ React13.createElement(
1152
- import_ui10.Popover,
1330
+ /* @__PURE__ */ React16.createElement(import_icons10.ArrowsSortIcon, { fontSize: "tiny" })
1331
+ )), /* @__PURE__ */ React16.createElement(
1332
+ import_ui12.Popover,
1153
1333
  {
1154
1334
  anchorOrigin: {
1155
1335
  horizontal: "right",
@@ -1162,43 +1342,43 @@ function ContentPanelSort() {
1162
1342
  horizontal: -21,
1163
1343
  vertical: "top"
1164
1344
  },
1165
- ...(0, import_ui10.bindPopover)(popupState)
1345
+ ...(0, import_ui12.bindPopover)(popupState)
1166
1346
  },
1167
- /* @__PURE__ */ React13.createElement(
1168
- import_editor_ui2.PopoverHeader,
1347
+ /* @__PURE__ */ React16.createElement(
1348
+ import_editor_ui3.PopoverHeader,
1169
1349
  {
1170
1350
  actions: hasActiveSort ? [
1171
- /* @__PURE__ */ React13.createElement(
1351
+ /* @__PURE__ */ React16.createElement(
1172
1352
  ContentPanelClearFiltersButton,
1173
1353
  {
1174
- ariaLabel: (0, import_i18n9.__)("Clear sort", "elementor"),
1354
+ ariaLabel: (0, import_i18n10.__)("Clear sort", "elementor"),
1175
1355
  key: "clear-sort",
1176
1356
  onClear: clearSiteContentSort,
1177
- tooltipText: (0, import_i18n9.__)("Clear sort", "elementor")
1357
+ tooltipText: (0, import_i18n10.__)("Clear sort", "elementor")
1178
1358
  }
1179
1359
  )
1180
1360
  ] : [],
1181
- icon: /* @__PURE__ */ React13.createElement(import_icons8.ArrowsSortIcon, { fontSize: "tiny" }),
1361
+ icon: /* @__PURE__ */ React16.createElement(import_icons10.ArrowsSortIcon, { fontSize: "tiny" }),
1182
1362
  onClose: popupState.close,
1183
- title: (0, import_i18n9.__)("Sort", "elementor")
1363
+ title: (0, import_i18n10.__)("Sort", "elementor")
1184
1364
  }
1185
1365
  ),
1186
- /* @__PURE__ */ React13.createElement(import_ui10.Divider, { sx: { borderWidth: "1px 0 0 0" } }),
1187
- /* @__PURE__ */ React13.createElement(import_editor_ui2.PopoverBody, { height: "auto", width: SITE_CONTENT_SORT_POPOVER_WIDTH_PX }, /* @__PURE__ */ React13.createElement(ContentPanelSortList, null))
1366
+ /* @__PURE__ */ React16.createElement(import_ui12.Divider, { sx: { borderWidth: "1px 0 0 0" } }),
1367
+ /* @__PURE__ */ React16.createElement(import_editor_ui3.PopoverBody, { height: "auto", width: SITE_CONTENT_SORT_POPOVER_WIDTH_PX }, /* @__PURE__ */ React16.createElement(ContentPanelSortList, null))
1188
1368
  ));
1189
1369
  }
1190
1370
 
1191
1371
  // src/components/panel/content-panel-status-filter.tsx
1192
- var React15 = __toESM(require("react"));
1193
- var import_editor_ui3 = require("@elementor/editor-ui");
1194
- var import_icons10 = require("@elementor/icons");
1195
- var import_ui12 = require("@elementor/ui");
1196
- var import_i18n10 = require("@wordpress/i18n");
1372
+ var React18 = __toESM(require("react"));
1373
+ var import_editor_ui4 = require("@elementor/editor-ui");
1374
+ var import_icons12 = require("@elementor/icons");
1375
+ var import_ui14 = require("@elementor/ui");
1376
+ var import_i18n11 = require("@wordpress/i18n");
1197
1377
 
1198
1378
  // src/components/panel/content-panel-status-filter-list.tsx
1199
- var React14 = __toESM(require("react"));
1200
- var import_icons9 = require("@elementor/icons");
1201
- var import_ui11 = require("@elementor/ui");
1379
+ var React17 = __toESM(require("react"));
1380
+ var import_icons11 = require("@elementor/icons");
1381
+ var import_ui13 = require("@elementor/ui");
1202
1382
 
1203
1383
  // src/hooks/use-site-content-status-filter-counts.ts
1204
1384
  var import_query5 = require("@elementor/query");
@@ -1240,7 +1420,7 @@ function useSiteContentStatusFilterCounts(postTypes, enabled) {
1240
1420
  }
1241
1421
 
1242
1422
  // src/components/panel/content-panel-status-filter-list.tsx
1243
- var renderFilterMenuItemContent = (label, selected) => /* @__PURE__ */ React14.createElement(import_ui11.Stack, { alignItems: "center", direction: "row", gap: 1, width: "100%" }, /* @__PURE__ */ React14.createElement(import_ui11.Typography, { sx: { color: "text.secondary", flex: 1 }, variant: "caption" }, label), selected ? /* @__PURE__ */ React14.createElement(import_icons9.CheckIcon, { "aria-hidden": true, fontSize: "tiny" }) : null);
1423
+ var renderFilterMenuItemContent = (label, selected) => /* @__PURE__ */ React17.createElement(import_ui13.Stack, { alignItems: "center", direction: "row", gap: 1, width: "100%" }, /* @__PURE__ */ React17.createElement(import_ui13.Typography, { sx: { color: "text.secondary", flex: 1 }, variant: "caption" }, label), selected ? /* @__PURE__ */ React17.createElement(import_icons11.CheckIcon, { "aria-hidden": true, fontSize: "tiny" }) : null);
1244
1424
  function ContentPanelStatusFilterList({ loadCounts }) {
1245
1425
  const {
1246
1426
  clearStatusFilters,
@@ -1265,8 +1445,8 @@ function ContentPanelStatusFilterList({ loadCounts }) {
1265
1445
  statusFilters[filter]
1266
1446
  )
1267
1447
  );
1268
- return /* @__PURE__ */ React14.createElement(import_ui11.MenuList, { dense: true }, /* @__PURE__ */ React14.createElement(
1269
- import_ui11.MenuItem,
1448
+ return /* @__PURE__ */ React17.createElement(import_ui13.MenuList, { dense: true }, /* @__PURE__ */ React17.createElement(
1449
+ import_ui13.MenuItem,
1270
1450
  {
1271
1451
  "aria-checked": isAllSelected,
1272
1452
  onClick: clearStatusFilters,
@@ -1276,8 +1456,8 @@ function ContentPanelStatusFilterList({ loadCounts }) {
1276
1456
  renderFilterMenuItemContent(SITE_CONTENT_ALL_FILTER_LABEL, isAllSelected)
1277
1457
  ), visibleFilters.map((filter) => {
1278
1458
  const isSelected = statusFilters[filter];
1279
- return /* @__PURE__ */ React14.createElement(
1280
- import_ui11.MenuItem,
1459
+ return /* @__PURE__ */ React17.createElement(
1460
+ import_ui13.MenuItem,
1281
1461
  {
1282
1462
  key: filter,
1283
1463
  "aria-checked": isSelected,
@@ -1293,23 +1473,23 @@ function ContentPanelStatusFilterList({ loadCounts }) {
1293
1473
  // src/components/panel/content-panel-status-filter.tsx
1294
1474
  function ContentPanelStatusFilter() {
1295
1475
  const { clearStatusFilters, statusFilters } = useSiteContentSectionToolbar();
1296
- const popupState = (0, import_ui12.usePopupState)({
1476
+ const popupState = (0, import_ui14.usePopupState)({
1297
1477
  variant: "popover",
1298
1478
  disableAutoFocus: true
1299
1479
  });
1300
1480
  const hasActiveFilters = hasActiveSiteContentStatusFilters(statusFilters);
1301
- return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(import_ui12.Tooltip, { placement: "top", title: (0, import_i18n10.__)("Filters", "elementor") }, /* @__PURE__ */ React15.createElement(
1302
- import_ui12.ToggleButton,
1481
+ return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(import_ui14.Tooltip, { placement: "top", title: (0, import_i18n11.__)("Filters", "elementor") }, /* @__PURE__ */ React18.createElement(
1482
+ import_ui14.ToggleButton,
1303
1483
  {
1304
- "aria-label": (0, import_i18n10.__)("Filters", "elementor"),
1484
+ "aria-label": (0, import_i18n11.__)("Filters", "elementor"),
1305
1485
  selected: popupState.isOpen || hasActiveFilters,
1306
1486
  size: "tiny",
1307
1487
  value: "filter",
1308
- ...(0, import_ui12.bindToggle)(popupState)
1488
+ ...(0, import_ui14.bindToggle)(popupState)
1309
1489
  },
1310
- /* @__PURE__ */ React15.createElement(import_icons10.FilterIcon, { fontSize: "tiny" })
1311
- )), /* @__PURE__ */ React15.createElement(
1312
- import_ui12.Popover,
1490
+ /* @__PURE__ */ React18.createElement(import_icons12.FilterIcon, { fontSize: "tiny" })
1491
+ )), /* @__PURE__ */ React18.createElement(
1492
+ import_ui14.Popover,
1313
1493
  {
1314
1494
  anchorOrigin: {
1315
1495
  horizontal: "right",
@@ -1322,50 +1502,50 @@ function ContentPanelStatusFilter() {
1322
1502
  horizontal: -21,
1323
1503
  vertical: "top"
1324
1504
  },
1325
- ...(0, import_ui12.bindPopover)(popupState)
1505
+ ...(0, import_ui14.bindPopover)(popupState)
1326
1506
  },
1327
- /* @__PURE__ */ React15.createElement(
1328
- import_editor_ui3.PopoverHeader,
1507
+ /* @__PURE__ */ React18.createElement(
1508
+ import_editor_ui4.PopoverHeader,
1329
1509
  {
1330
1510
  actions: hasActiveFilters ? [
1331
- /* @__PURE__ */ React15.createElement(
1511
+ /* @__PURE__ */ React18.createElement(
1332
1512
  ContentPanelClearFiltersButton,
1333
1513
  {
1334
- ariaLabel: (0, import_i18n10.__)("Clear all", "elementor"),
1514
+ ariaLabel: (0, import_i18n11.__)("Clear all", "elementor"),
1335
1515
  key: "clear-all-filters",
1336
1516
  onClear: clearStatusFilters,
1337
- tooltipText: (0, import_i18n10.__)("Clear all", "elementor")
1517
+ tooltipText: (0, import_i18n11.__)("Clear all", "elementor")
1338
1518
  }
1339
1519
  )
1340
1520
  ] : [],
1341
- icon: /* @__PURE__ */ React15.createElement(import_icons10.FilterIcon, { fontSize: "tiny" }),
1521
+ icon: /* @__PURE__ */ React18.createElement(import_icons12.FilterIcon, { fontSize: "tiny" }),
1342
1522
  onClose: popupState.close,
1343
- title: (0, import_i18n10.__)("Filters", "elementor")
1523
+ title: (0, import_i18n11.__)("Filters", "elementor")
1344
1524
  }
1345
1525
  ),
1346
- /* @__PURE__ */ React15.createElement(import_ui12.Divider, { sx: { borderWidth: "1px 0 0 0" } }),
1347
- /* @__PURE__ */ React15.createElement(import_editor_ui3.PopoverBody, { height: "auto", width: SITE_CONTENT_FILTER_POPOVER_WIDTH_PX }, /* @__PURE__ */ React15.createElement(ContentPanelStatusFilterList, { loadCounts: popupState.isOpen }))
1526
+ /* @__PURE__ */ React18.createElement(import_ui14.Divider, { sx: { borderWidth: "1px 0 0 0" } }),
1527
+ /* @__PURE__ */ React18.createElement(import_editor_ui4.PopoverBody, { height: "auto", width: SITE_CONTENT_FILTER_POPOVER_WIDTH_PX }, /* @__PURE__ */ React18.createElement(ContentPanelStatusFilterList, { loadCounts: popupState.isOpen }))
1348
1528
  ));
1349
1529
  }
1350
1530
 
1351
1531
  // src/components/panel/content-panel-section-toolbar.tsx
1352
1532
  function ContentPanelSectionToolbar({ addAction, searchAriaLabel }) {
1353
- return /* @__PURE__ */ React16.createElement(import_ui13.Box, { sx: contentPanelSearchBoxSx }, /* @__PURE__ */ React16.createElement(import_ui13.Stack, { gap: 0.75, width: "100%" }, /* @__PURE__ */ React16.createElement(import_ui13.Stack, { alignItems: "center", direction: "row", gap: 0.5, width: "100%" }, /* @__PURE__ */ React16.createElement(import_ui13.Box, { sx: { flexGrow: 1, minWidth: 0 } }, /* @__PURE__ */ React16.createElement(ContentPanelSearch, { searchAriaLabel })), /* @__PURE__ */ React16.createElement(ContentPanelStatusFilter, null), /* @__PURE__ */ React16.createElement(ContentPanelSort, null), addAction), /* @__PURE__ */ React16.createElement(ContentPanelActiveFilters, null)));
1533
+ return /* @__PURE__ */ React19.createElement(import_ui15.Box, { sx: contentPanelSearchBoxSx }, /* @__PURE__ */ React19.createElement(import_ui15.Stack, { gap: 0.75, width: "100%" }, /* @__PURE__ */ React19.createElement(import_ui15.Stack, { alignItems: "center", direction: "row", gap: 0.5, width: "100%" }, /* @__PURE__ */ React19.createElement(import_ui15.Box, { sx: { flexGrow: 1, minWidth: 0 } }, /* @__PURE__ */ React19.createElement(ContentPanelSearch, { searchAriaLabel })), /* @__PURE__ */ React19.createElement(ContentPanelStatusFilter, null), /* @__PURE__ */ React19.createElement(ContentPanelSort, null), addAction), /* @__PURE__ */ React19.createElement(ContentPanelActiveFilters, null)));
1354
1534
  }
1355
1535
 
1356
1536
  // src/components/panel/section-add-button.tsx
1357
- var React17 = __toESM(require("react"));
1358
- var import_i18n11 = require("@wordpress/i18n");
1537
+ var React20 = __toESM(require("react"));
1538
+ var import_i18n12 = require("@wordpress/i18n");
1359
1539
  function SectionAddButton({ onBeforeCreate }) {
1360
1540
  const { type, setEditMode } = usePostListContext();
1361
1541
  const canCreate = useCanCreate(type);
1362
1542
  const singularName = postTypesMap[type].labels.singular_name;
1363
- const ariaLabel = (0, import_i18n11.sprintf)(
1543
+ const ariaLabel = (0, import_i18n12.sprintf)(
1364
1544
  /* translators: %s: Post type singular name (e.g. Page, Post). */
1365
- (0, import_i18n11.__)("New %s", "elementor"),
1545
+ (0, import_i18n12.__)("New %s", "elementor"),
1366
1546
  singularName
1367
1547
  );
1368
- return /* @__PURE__ */ React17.createElement(
1548
+ return /* @__PURE__ */ React20.createElement(
1369
1549
  ContentPanelAddIconButton,
1370
1550
  {
1371
1551
  "aria-label": ariaLabel,
@@ -1380,10 +1560,10 @@ function SectionAddButton({ onBeforeCreate }) {
1380
1560
  }
1381
1561
 
1382
1562
  // src/components/panel/posts-list/collapsible-list.tsx
1383
- var React18 = __toESM(require("react"));
1384
- var import_react9 = require("react");
1385
- var import_editor_ui4 = require("@elementor/editor-ui");
1386
- var import_ui14 = require("@elementor/ui");
1563
+ var React21 = __toESM(require("react"));
1564
+ var import_react10 = require("react");
1565
+ var import_editor_ui5 = require("@elementor/editor-ui");
1566
+ var import_ui16 = require("@elementor/ui");
1387
1567
  var sectionHeaderListItemButtonSx = {
1388
1568
  flexGrow: 1,
1389
1569
  justifyContent: "flex-start",
@@ -1407,14 +1587,14 @@ function CollapsibleList({
1407
1587
  trailingActions,
1408
1588
  children
1409
1589
  }) {
1410
- const id = (0, import_react9.useId)();
1590
+ const id = (0, import_react10.useId)();
1411
1591
  const labelId = `label-${id}`;
1412
1592
  const contentId = `content-${id}`;
1413
1593
  const chipLabel = countChipLabel ?? count.toString();
1414
1594
  const sectionHeaderAriaLabel = getSectionHeaderAriaLabel(title, chipLabel);
1415
1595
  const handleClick = () => onOpenChange(!isOpen);
1416
- return /* @__PURE__ */ React18.createElement(React18.Fragment, null, /* @__PURE__ */ React18.createElement(
1417
- import_ui14.Box,
1596
+ return /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(
1597
+ import_ui16.Box,
1418
1598
  {
1419
1599
  sx: {
1420
1600
  ...contentPanelSectionHeaderSx,
@@ -1424,8 +1604,8 @@ function CollapsibleList({
1424
1604
  width: "100%"
1425
1605
  }
1426
1606
  },
1427
- /* @__PURE__ */ React18.createElement(
1428
- import_ui14.ListItemButton,
1607
+ /* @__PURE__ */ React21.createElement(
1608
+ import_ui16.ListItemButton,
1429
1609
  {
1430
1610
  ref: headerRef,
1431
1611
  id: labelId,
@@ -1438,8 +1618,8 @@ function CollapsibleList({
1438
1618
  onClick: handleClick,
1439
1619
  sx: sectionHeaderListItemButtonSx
1440
1620
  },
1441
- /* @__PURE__ */ React18.createElement(import_ui14.Stack, { alignItems: "center", direction: "row", flexGrow: 1, gap: 0.5, minWidth: 0, width: "100%" }, /* @__PURE__ */ React18.createElement(import_ui14.Stack, { alignItems: "center", direction: "row", flex: 1, gap: 0.5, minWidth: 0 }, /* @__PURE__ */ React18.createElement(
1442
- import_ui14.ListItemText,
1621
+ /* @__PURE__ */ React21.createElement(import_ui16.Stack, { alignItems: "center", direction: "row", flexGrow: 1, gap: 0.5, minWidth: 0, width: "100%" }, /* @__PURE__ */ React21.createElement(import_ui16.Stack, { alignItems: "center", direction: "row", flex: 1, gap: 0.5, minWidth: 0 }, /* @__PURE__ */ React21.createElement(
1622
+ import_ui16.ListItemText,
1443
1623
  {
1444
1624
  secondary: title,
1445
1625
  secondaryTypographyProps: {
@@ -1449,10 +1629,10 @@ function CollapsibleList({
1449
1629
  },
1450
1630
  sx: { flexGrow: 0, flexShrink: 1, marginInlineEnd: 1 }
1451
1631
  }
1452
- ), /* @__PURE__ */ React18.createElement(import_ui14.Chip, { label: chipLabel, size: "tiny" })), /* @__PURE__ */ React18.createElement(import_editor_ui4.CollapseIcon, { color: "secondary", fontSize: "tiny", open: isOpen, sx: { flexShrink: 0 } }))
1632
+ ), /* @__PURE__ */ React21.createElement(import_ui16.Chip, { label: chipLabel, size: "tiny" })), /* @__PURE__ */ React21.createElement(import_editor_ui5.CollapseIcon, { color: "secondary", fontSize: "tiny", open: isOpen, sx: { flexShrink: 0 } }))
1453
1633
  ),
1454
- trailingActions && /* @__PURE__ */ React18.createElement(
1455
- import_ui14.Stack,
1634
+ trailingActions && /* @__PURE__ */ React21.createElement(
1635
+ import_ui16.Stack,
1456
1636
  {
1457
1637
  alignItems: "center",
1458
1638
  direction: "row",
@@ -1462,17 +1642,17 @@ function CollapsibleList({
1462
1642
  },
1463
1643
  trailingActions
1464
1644
  )
1465
- ), isOpen && sectionToolbar, /* @__PURE__ */ React18.createElement(import_ui14.Collapse, { "aria-labelledby": labelId, id: contentId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React18.createElement(import_ui14.List, { dense: true, disablePadding: true, sx: contentPanelListSectionListSx }, children)), /* @__PURE__ */ React18.createElement(import_ui14.Divider, null));
1645
+ ), isOpen && sectionToolbar, /* @__PURE__ */ React21.createElement(import_ui16.Collapse, { "aria-labelledby": labelId, id: contentId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React21.createElement(import_ui16.List, { dense: true, disablePadding: true, sx: contentPanelListSectionListSx }, children)), /* @__PURE__ */ React21.createElement(import_ui16.Divider, null));
1466
1646
  }
1467
1647
 
1468
1648
  // src/components/panel/posts-list/error-state.tsx
1469
- var React19 = __toESM(require("react"));
1470
- var import_icons11 = require("@elementor/icons");
1471
- var import_ui15 = require("@elementor/ui");
1472
- var import_i18n12 = require("@wordpress/i18n");
1649
+ var React22 = __toESM(require("react"));
1650
+ var import_icons13 = require("@elementor/icons");
1651
+ var import_ui17 = require("@elementor/ui");
1652
+ var import_i18n13 = require("@wordpress/i18n");
1473
1653
  function ErrorState() {
1474
- return /* @__PURE__ */ React19.createElement(
1475
- import_ui15.Box,
1654
+ return /* @__PURE__ */ React22.createElement(
1655
+ import_ui17.Box,
1476
1656
  {
1477
1657
  sx: {
1478
1658
  display: "flex",
@@ -1483,9 +1663,9 @@ function ErrorState() {
1483
1663
  gap: "16px"
1484
1664
  }
1485
1665
  },
1486
- /* @__PURE__ */ React19.createElement(import_icons11.Error404TemplateIcon, null),
1487
- /* @__PURE__ */ React19.createElement(
1488
- import_ui15.Box,
1666
+ /* @__PURE__ */ React22.createElement(import_icons13.Error404TemplateIcon, null),
1667
+ /* @__PURE__ */ React22.createElement(
1668
+ import_ui17.Box,
1489
1669
  {
1490
1670
  sx: {
1491
1671
  display: "flex",
@@ -1495,19 +1675,19 @@ function ErrorState() {
1495
1675
  gap: "8px"
1496
1676
  }
1497
1677
  },
1498
- /* @__PURE__ */ React19.createElement(import_ui15.Typography, { variant: "body1", color: "text.primary" }, (0, import_i18n12.__)("We couldn\u2019t display your pages.", "elementor")),
1499
- /* @__PURE__ */ React19.createElement(import_ui15.Box, null, /* @__PURE__ */ React19.createElement(import_ui15.Typography, { variant: "body2", color: "text.primary", sx: { textAlign: "center" } }, (0, import_i18n12.__)("It\u2019s probably a temporary issue.", "elementor")), /* @__PURE__ */ React19.createElement(import_ui15.Typography, { variant: "body2", color: "text.primary", sx: { textAlign: "center" } }, (0, import_i18n12.__)("If the problem persists,", "elementor"), " ", /* @__PURE__ */ React19.createElement(import_ui15.Link, { target: "_blank", href: "https://go.elementor.com/wp-editor-support-open-ticket/" }, "Notify support")))
1678
+ /* @__PURE__ */ React22.createElement(import_ui17.Typography, { variant: "body1", color: "text.primary" }, (0, import_i18n13.__)("We couldn\u2019t display your pages.", "elementor")),
1679
+ /* @__PURE__ */ React22.createElement(import_ui17.Box, null, /* @__PURE__ */ React22.createElement(import_ui17.Typography, { variant: "body2", color: "text.primary", sx: { textAlign: "center" } }, (0, import_i18n13.__)("It\u2019s probably a temporary issue.", "elementor")), /* @__PURE__ */ React22.createElement(import_ui17.Typography, { variant: "body2", color: "text.primary", sx: { textAlign: "center" } }, (0, import_i18n13.__)("If the problem persists,", "elementor"), " ", /* @__PURE__ */ React22.createElement(import_ui17.Link, { target: "_blank", href: "https://go.elementor.com/wp-editor-support-open-ticket/" }, "Notify support")))
1500
1680
  )
1501
1681
  );
1502
1682
  }
1503
1683
 
1504
1684
  // src/components/panel/posts-list/post-list-item.tsx
1505
- var React34 = __toESM(require("react"));
1685
+ var React37 = __toESM(require("react"));
1506
1686
 
1507
1687
  // src/components/panel/posts-list/list-items/list-item-create.tsx
1508
- var React21 = __toESM(require("react"));
1688
+ var React24 = __toESM(require("react"));
1509
1689
  var import_editor_documents = require("@elementor/editor-documents");
1510
- var import_i18n14 = require("@wordpress/i18n");
1690
+ var import_i18n15 = require("@wordpress/i18n");
1511
1691
 
1512
1692
  // src/hooks/use-posts-actions.ts
1513
1693
  var import_query7 = require("@elementor/query");
@@ -1588,11 +1768,11 @@ function useInvalidatePosts(postTypeSlug) {
1588
1768
  }
1589
1769
 
1590
1770
  // src/components/panel/posts-list/list-items/edit-mode-template.tsx
1591
- var React20 = __toESM(require("react"));
1592
- var import_react10 = require("react");
1593
- var import_icons12 = require("@elementor/icons");
1594
- var import_ui16 = require("@elementor/ui");
1595
- var import_i18n13 = require("@wordpress/i18n");
1771
+ var React23 = __toESM(require("react"));
1772
+ var import_react11 = require("react");
1773
+ var import_icons14 = require("@elementor/icons");
1774
+ var import_ui18 = require("@elementor/ui");
1775
+ var import_i18n14 = require("@wordpress/i18n");
1596
1776
  var EDIT_ROW_FOCUS_BORDER_WIDTH_PX = 2;
1597
1777
  var EDIT_ROW_MIN_HEIGHT_PX = 36;
1598
1778
  var editModeListItemButtonSx = {
@@ -1632,11 +1812,11 @@ var editRowInputSx = {
1632
1812
  function EditModeTemplate({ postTitle, isLoading, callback, onDismiss }) {
1633
1813
  const { resetEditMode } = usePostListContext();
1634
1814
  const dismissEditMode = onDismiss ?? resetEditMode;
1635
- const [title, setTitle] = (0, import_react10.useState)(postTitle);
1636
- const [touched, setTouched] = (0, import_react10.useState)(false);
1637
- const [inputError, setInputError] = (0, import_react10.useState)(null);
1638
- const closeButton = (0, import_react10.useRef)();
1639
- const hasSubmittedRef = (0, import_react10.useRef)(false);
1815
+ const [title, setTitle] = (0, import_react11.useState)(postTitle);
1816
+ const [touched, setTouched] = (0, import_react11.useState)(false);
1817
+ const [inputError, setInputError] = (0, import_react11.useState)(null);
1818
+ const closeButton = (0, import_react11.useRef)();
1819
+ const hasSubmittedRef = (0, import_react11.useRef)(false);
1640
1820
  const onBlur = (e) => {
1641
1821
  if (closeButton.current === e.relatedTarget) {
1642
1822
  return;
@@ -1670,32 +1850,32 @@ function EditModeTemplate({ postTitle, isLoading, callback, onDismiss }) {
1670
1850
  }
1671
1851
  const value = e.target.value;
1672
1852
  if (!validateInput(value)) {
1673
- setInputError((0, import_i18n13.__)("Name is required", "elementor"));
1853
+ setInputError((0, import_i18n14.__)("Name is required", "elementor"));
1674
1854
  } else {
1675
1855
  setInputError(null);
1676
1856
  }
1677
1857
  setTitle(value);
1678
1858
  };
1679
- return /* @__PURE__ */ React20.createElement(React20.Fragment, null, /* @__PURE__ */ React20.createElement(
1680
- import_ui16.ListItem,
1859
+ return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(
1860
+ import_ui18.ListItem,
1681
1861
  {
1682
1862
  disablePadding: true,
1683
1863
  sx: contentPanelListRowPaddingSx,
1684
- secondaryAction: /* @__PURE__ */ React20.createElement(CloseButton, { isLoading, closeButton, onDismiss: dismissEditMode })
1864
+ secondaryAction: /* @__PURE__ */ React23.createElement(CloseButton, { isLoading, closeButton, onDismiss: dismissEditMode })
1685
1865
  },
1686
- /* @__PURE__ */ React20.createElement(
1687
- import_ui16.Box,
1866
+ /* @__PURE__ */ React23.createElement(
1867
+ import_ui18.Box,
1688
1868
  {
1689
1869
  component: "form",
1690
1870
  onSubmit: onFormSubmit,
1691
1871
  sx: { ...editModeListItemButtonSx, display: "flex", width: "100%" }
1692
1872
  },
1693
- /* @__PURE__ */ React20.createElement(import_ui16.Box, { sx: editRowIndicatorSx(!!inputError) }, /* @__PURE__ */ React20.createElement(
1694
- import_ui16.Box,
1873
+ /* @__PURE__ */ React23.createElement(import_ui18.Box, { sx: editRowIndicatorSx(!!inputError) }, /* @__PURE__ */ React23.createElement(
1874
+ import_ui18.Box,
1695
1875
  {
1696
1876
  autoFocus: true,
1697
1877
  "aria-invalid": !!inputError,
1698
- "aria-label": (0, import_i18n13.__)("Name", "elementor"),
1878
+ "aria-label": (0, import_i18n14.__)("Name", "elementor"),
1699
1879
  component: "input",
1700
1880
  disabled: isLoading,
1701
1881
  onBlur,
@@ -1706,10 +1886,10 @@ function EditModeTemplate({ postTitle, isLoading, callback, onDismiss }) {
1706
1886
  }
1707
1887
  ))
1708
1888
  )
1709
- ), inputError && /* @__PURE__ */ React20.createElement(import_ui16.ListItem, { disablePadding: true, sx: contentPanelListRowPaddingSx }, /* @__PURE__ */ React20.createElement(import_ui16.ListItemText, { sx: { color: "error.main", ...contentPanelListRowTitleSx } }, inputError)));
1889
+ ), inputError && /* @__PURE__ */ React23.createElement(import_ui18.ListItem, { disablePadding: true, sx: contentPanelListRowPaddingSx }, /* @__PURE__ */ React23.createElement(import_ui18.ListItemText, { sx: { color: "error.main", ...contentPanelListRowTitleSx } }, inputError)));
1710
1890
  }
1711
1891
  function CloseButton({ isLoading, closeButton, onDismiss }) {
1712
- return /* @__PURE__ */ React20.createElement(import_ui16.IconButton, { size: "tiny", color: "secondary", onClick: onDismiss, ref: closeButton, disabled: isLoading }, isLoading ? /* @__PURE__ */ React20.createElement(import_ui16.CircularProgress, { size: "1rem" }) : /* @__PURE__ */ React20.createElement(import_icons12.XIcon, { fontSize: "tiny" }));
1892
+ return /* @__PURE__ */ React23.createElement(import_ui18.IconButton, { size: "tiny", color: "secondary", onClick: onDismiss, ref: closeButton, disabled: isLoading }, isLoading ? /* @__PURE__ */ React23.createElement(import_ui18.CircularProgress, { size: "1rem" }) : /* @__PURE__ */ React23.createElement(import_icons14.XIcon, { fontSize: "tiny" }));
1713
1893
  }
1714
1894
 
1715
1895
  // src/components/panel/posts-list/list-items/list-item-create.tsx
@@ -1732,12 +1912,12 @@ function ListItemCreate() {
1732
1912
  resetEditMode();
1733
1913
  }
1734
1914
  };
1735
- const newItemLabel = (0, import_i18n14.sprintf)(
1915
+ const newItemLabel = (0, import_i18n15.sprintf)(
1736
1916
  /* translators: %s: Post type singular name (e.g. Page, Post). */
1737
- (0, import_i18n14.__)("New %s", "elementor"),
1917
+ (0, import_i18n15.__)("New %s", "elementor"),
1738
1918
  postTypesMap[type].labels.singular_name
1739
1919
  );
1740
- return /* @__PURE__ */ React21.createElement(
1920
+ return /* @__PURE__ */ React24.createElement(
1741
1921
  EditModeTemplate,
1742
1922
  {
1743
1923
  postTitle: newItemLabel,
@@ -1748,9 +1928,9 @@ function ListItemCreate() {
1748
1928
  }
1749
1929
 
1750
1930
  // src/components/panel/posts-list/list-items/list-item-duplicate.tsx
1751
- var React22 = __toESM(require("react"));
1931
+ var React25 = __toESM(require("react"));
1752
1932
  var import_editor_documents2 = require("@elementor/editor-documents");
1753
- var import_i18n15 = require("@wordpress/i18n");
1933
+ var import_i18n16 = require("@wordpress/i18n");
1754
1934
  function ListItemDuplicate() {
1755
1935
  const { type, editMode, resetEditMode } = usePostListContext();
1756
1936
  const navigateToDocument = (0, import_editor_documents2.__useNavigateToDocument)();
@@ -1773,10 +1953,10 @@ function ListItemDuplicate() {
1773
1953
  resetEditMode();
1774
1954
  }
1775
1955
  };
1776
- return /* @__PURE__ */ React22.createElement(
1956
+ return /* @__PURE__ */ React25.createElement(
1777
1957
  EditModeTemplate,
1778
1958
  {
1779
- postTitle: `${editMode.details.title} ${(0, import_i18n15.__)("copy", "elementor")}`,
1959
+ postTitle: `${editMode.details.title} ${(0, import_i18n16.__)("copy", "elementor")}`,
1780
1960
  isLoading: duplicatePost.isPending,
1781
1961
  callback: duplicatePostCallback
1782
1962
  }
@@ -1784,7 +1964,7 @@ function ListItemDuplicate() {
1784
1964
  }
1785
1965
 
1786
1966
  // src/components/panel/posts-list/list-items/list-item-rename.tsx
1787
- var React23 = __toESM(require("react"));
1967
+ var React26 = __toESM(require("react"));
1788
1968
  var import_editor_documents3 = require("@elementor/editor-documents");
1789
1969
 
1790
1970
  // src/hooks/use-rename-active-document.ts
@@ -1835,24 +2015,24 @@ function ListItemRename({ post }) {
1835
2015
  resetEditMode();
1836
2016
  }
1837
2017
  };
1838
- return /* @__PURE__ */ React23.createElement(EditModeTemplate, { postTitle: title, isLoading: updatePost.isPending, callback: renamePostCallback });
2018
+ return /* @__PURE__ */ React26.createElement(EditModeTemplate, { postTitle: title, isLoading: updatePost.isPending, callback: renamePostCallback });
1839
2019
  }
1840
2020
 
1841
2021
  // src/components/panel/posts-list/list-items/list-item-view.tsx
1842
- var React33 = __toESM(require("react"));
1843
- var import_react14 = require("react");
2022
+ var React36 = __toESM(require("react"));
2023
+ var import_react15 = require("react");
1844
2024
  var import_editor_documents5 = require("@elementor/editor-documents");
1845
- var import_icons20 = require("@elementor/icons");
1846
- var import_ui22 = require("@elementor/ui");
1847
- var import_i18n24 = require("@wordpress/i18n");
2025
+ var import_icons22 = require("@elementor/icons");
2026
+ var import_ui24 = require("@elementor/ui");
2027
+ var import_i18n25 = require("@wordpress/i18n");
1848
2028
 
1849
2029
  // src/components/shared/page-title-and-status.tsx
1850
- var React24 = __toESM(require("react"));
1851
- var import_ui17 = require("@elementor/ui");
1852
- var import_i18n16 = require("@wordpress/i18n");
2030
+ var React27 = __toESM(require("react"));
2031
+ var import_ui19 = require("@elementor/ui");
2032
+ var import_i18n17 = require("@wordpress/i18n");
1853
2033
 
1854
2034
  // src/hooks/use-reverse-html-entities.ts
1855
- var import_react11 = require("react");
2035
+ var import_react12 = require("react");
1856
2036
 
1857
2037
  // src/utils/post-title-plain.ts
1858
2038
  function getPostTitlePlain(renderedTitle) {
@@ -1866,7 +2046,7 @@ function getPostTitlePlain(renderedTitle) {
1866
2046
 
1867
2047
  // src/hooks/use-reverse-html-entities.ts
1868
2048
  function useReverseHtmlEntities(escapedHTML = "") {
1869
- return (0, import_react11.useMemo)(() => getPostTitlePlain(escapedHTML), [escapedHTML]);
2049
+ return (0, import_react12.useMemo)(() => getPostTitlePlain(escapedHTML), [escapedHTML]);
1870
2050
  }
1871
2051
 
1872
2052
  // src/components/shared/page-title-and-status.tsx
@@ -1876,19 +2056,19 @@ function humanizeStatusSlug(status) {
1876
2056
  var statusChipConfig = {
1877
2057
  draft: {
1878
2058
  color: "default",
1879
- label: (0, import_i18n16.__)("Draft", "elementor")
2059
+ label: (0, import_i18n17.__)("Draft", "elementor")
1880
2060
  },
1881
2061
  future: {
1882
2062
  color: "default",
1883
- label: (0, import_i18n16.__)("Scheduled", "elementor")
2063
+ label: (0, import_i18n17.__)("Scheduled", "elementor")
1884
2064
  },
1885
2065
  pending: {
1886
2066
  color: "warning",
1887
- label: (0, import_i18n16.__)("Pending Review", "elementor")
2067
+ label: (0, import_i18n17.__)("Pending Review", "elementor")
1888
2068
  },
1889
2069
  private: {
1890
2070
  color: "default",
1891
- label: (0, import_i18n16.__)("Private", "elementor")
2071
+ label: (0, import_i18n17.__)("Private", "elementor")
1892
2072
  }
1893
2073
  };
1894
2074
  function getStatusChipConfig(status) {
@@ -1910,8 +2090,8 @@ var PageStatus = ({ status }) => {
1910
2090
  }
1911
2091
  const { color, label } = getStatusChipConfig(status);
1912
2092
  const isKnownStatus = isKnownPanelStatus(status);
1913
- return /* @__PURE__ */ React24.createElement(
1914
- import_ui17.Chip,
2093
+ return /* @__PURE__ */ React27.createElement(
2094
+ import_ui19.Chip,
1915
2095
  {
1916
2096
  color,
1917
2097
  component: "span",
@@ -1936,8 +2116,8 @@ var PageStatus = ({ status }) => {
1936
2116
  var PageTitle = ({ status, title }) => {
1937
2117
  const modifiedTitle = useReverseHtmlEntities(title);
1938
2118
  const titleColor = "trash" === status ? "text.disabled" : "text.secondary";
1939
- return /* @__PURE__ */ React24.createElement(
1940
- import_ui17.Typography,
2119
+ return /* @__PURE__ */ React27.createElement(
2120
+ import_ui19.Typography,
1941
2121
  {
1942
2122
  component: "span",
1943
2123
  variant: "body2",
@@ -1956,51 +2136,51 @@ var PageTitle = ({ status, title }) => {
1956
2136
  );
1957
2137
  };
1958
2138
  function PageTitleAndStatus({ title, status }) {
1959
- return /* @__PURE__ */ React24.createElement(import_ui17.Box, { alignItems: "center", display: "flex", minWidth: 0, sx: { overflow: "hidden" } }, /* @__PURE__ */ React24.createElement(PageTitle, { status, title }), /* @__PURE__ */ React24.createElement(PageStatus, { status }));
2139
+ return /* @__PURE__ */ React27.createElement(import_ui19.Box, { alignItems: "center", display: "flex", minWidth: 0, sx: { overflow: "hidden" } }, /* @__PURE__ */ React27.createElement(PageTitle, { status, title }), /* @__PURE__ */ React27.createElement(PageStatus, { status }));
1960
2140
  }
1961
2141
 
1962
2142
  // src/components/panel/actions-menu/actions/delete.tsx
1963
- var React26 = __toESM(require("react"));
1964
- var import_react12 = require("react");
2143
+ var React29 = __toESM(require("react"));
2144
+ var import_react13 = require("react");
1965
2145
  var import_editor_documents4 = require("@elementor/editor-documents");
1966
- var import_icons13 = require("@elementor/icons");
1967
- var import_ui19 = require("@elementor/ui");
1968
- var import_i18n17 = require("@wordpress/i18n");
2146
+ var import_icons15 = require("@elementor/icons");
2147
+ var import_ui21 = require("@elementor/ui");
2148
+ var import_i18n18 = require("@wordpress/i18n");
1969
2149
 
1970
2150
  // src/components/panel/actions-menu/action-menu-item.tsx
1971
- var React25 = __toESM(require("react"));
1972
- var import_ui18 = require("@elementor/ui");
2151
+ var React28 = __toESM(require("react"));
2152
+ var import_ui20 = require("@elementor/ui");
1973
2153
  function ActionMenuItem({ description, icon: Icon, MenuItemProps, title }) {
1974
- return /* @__PURE__ */ React25.createElement(import_ui18.MenuItem, { ...MenuItemProps }, /* @__PURE__ */ React25.createElement(
1975
- import_ui18.ListItemIcon,
2154
+ return /* @__PURE__ */ React28.createElement(import_ui20.MenuItem, { ...MenuItemProps }, /* @__PURE__ */ React28.createElement(
2155
+ import_ui20.ListItemIcon,
1976
2156
  {
1977
2157
  sx: {
1978
2158
  color: "inherit"
1979
2159
  }
1980
2160
  },
1981
- /* @__PURE__ */ React25.createElement(Icon, null)
1982
- ), /* @__PURE__ */ React25.createElement(import_ui18.ListItemText, { primary: title, secondary: description }));
2161
+ /* @__PURE__ */ React28.createElement(Icon, null)
2162
+ ), /* @__PURE__ */ React28.createElement(import_ui20.ListItemText, { primary: title, secondary: description }));
1983
2163
  }
1984
2164
 
1985
2165
  // src/components/panel/actions-menu/actions/delete.tsx
1986
2166
  function Delete({ post }) {
1987
- const [isDialogOpen, setIsDialogOpen] = (0, import_react12.useState)(false);
2167
+ const [isDialogOpen, setIsDialogOpen] = (0, import_react13.useState)(false);
1988
2168
  const activeDocument = (0, import_editor_documents4.__useActiveDocument)();
1989
2169
  const isPostActive = activeDocument?.id === post.id;
1990
2170
  const userCanDelete = post.user_can.delete;
1991
2171
  const isDisabled = !userCanDelete || post.isHome || isPostActive;
1992
- return /* @__PURE__ */ React26.createElement(React26.Fragment, null, /* @__PURE__ */ React26.createElement(
2172
+ return /* @__PURE__ */ React29.createElement(React29.Fragment, null, /* @__PURE__ */ React29.createElement(
1993
2173
  ActionMenuItem,
1994
2174
  {
1995
- title: (0, import_i18n17.__)("Delete", "elementor"),
1996
- icon: import_icons13.TrashIcon,
2175
+ title: (0, import_i18n18.__)("Delete", "elementor"),
2176
+ icon: import_icons15.TrashIcon,
1997
2177
  MenuItemProps: {
1998
2178
  disabled: isDisabled,
1999
2179
  onClick: () => setIsDialogOpen(true),
2000
2180
  sx: { "&:hover": { color: "error.main" } }
2001
2181
  }
2002
2182
  }
2003
- ), isDialogOpen && /* @__PURE__ */ React26.createElement(DeleteDialog, { post, setIsDialogOpen }));
2183
+ ), isDialogOpen && /* @__PURE__ */ React29.createElement(DeleteDialog, { post, setIsDialogOpen }));
2004
2184
  }
2005
2185
  function DeleteDialog({
2006
2186
  post,
@@ -2009,11 +2189,11 @@ function DeleteDialog({
2009
2189
  const { type } = usePostListContext();
2010
2190
  const { deletePost } = usePostActions(type);
2011
2191
  const { setError } = usePostListContext();
2012
- const dialogTitle = (0, import_i18n17.sprintf)((0, import_i18n17.__)('Delete "%s"?', "elementor"), post.title.rendered);
2013
- const dialogBody = type === "post" ? (0, import_i18n17.__)(
2192
+ const dialogTitle = (0, import_i18n18.sprintf)((0, import_i18n18.__)('Delete "%s"?', "elementor"), post.title.rendered);
2193
+ const dialogBody = type === "post" ? (0, import_i18n18.__)(
2014
2194
  "The post and its content will be deleted forever and we won\u2019t be able to recover them.",
2015
2195
  "elementor"
2016
- ) : (0, import_i18n17.__)(
2196
+ ) : (0, import_i18n18.__)(
2017
2197
  "The page and its content will be deleted forever and we won\u2019t be able to recover them.",
2018
2198
  "elementor"
2019
2199
  );
@@ -2031,22 +2211,22 @@ function DeleteDialog({
2031
2211
  }
2032
2212
  setIsDialogOpen(false);
2033
2213
  };
2034
- return /* @__PURE__ */ React26.createElement(import_ui19.Dialog, { open: true, onClose: handleCancel, "aria-labelledby": "delete-dialog" }, /* @__PURE__ */ React26.createElement(import_ui19.DialogTitle, { noWrap: true }, dialogTitle), /* @__PURE__ */ React26.createElement(import_ui19.Divider, null), /* @__PURE__ */ React26.createElement(import_ui19.DialogContent, null, /* @__PURE__ */ React26.createElement(import_ui19.DialogContentText, null, dialogBody)), /* @__PURE__ */ React26.createElement(import_ui19.DialogActions, null, /* @__PURE__ */ React26.createElement(
2035
- import_ui19.Button,
2214
+ return /* @__PURE__ */ React29.createElement(import_ui21.Dialog, { open: true, onClose: handleCancel, "aria-labelledby": "delete-dialog" }, /* @__PURE__ */ React29.createElement(import_ui21.DialogTitle, { noWrap: true }, dialogTitle), /* @__PURE__ */ React29.createElement(import_ui21.Divider, null), /* @__PURE__ */ React29.createElement(import_ui21.DialogContent, null, /* @__PURE__ */ React29.createElement(import_ui21.DialogContentText, null, dialogBody)), /* @__PURE__ */ React29.createElement(import_ui21.DialogActions, null, /* @__PURE__ */ React29.createElement(
2215
+ import_ui21.Button,
2036
2216
  {
2037
2217
  variant: "contained",
2038
2218
  color: "secondary",
2039
2219
  onClick: handleCancel,
2040
2220
  disabled: deletePost.isPending
2041
2221
  },
2042
- (0, import_i18n17.__)("Cancel", "elementor")
2043
- ), /* @__PURE__ */ React26.createElement(import_ui19.Button, { variant: "contained", color: "error", onClick: deletePage, disabled: deletePost.isPending }, !deletePost.isPending ? (0, import_i18n17.__)("Delete", "elementor") : /* @__PURE__ */ React26.createElement(import_ui19.CircularProgress, null))));
2222
+ (0, import_i18n18.__)("Cancel", "elementor")
2223
+ ), /* @__PURE__ */ React29.createElement(import_ui21.Button, { variant: "contained", color: "error", onClick: deletePage, disabled: deletePost.isPending }, !deletePost.isPending ? (0, import_i18n18.__)("Delete", "elementor") : /* @__PURE__ */ React29.createElement(import_ui21.CircularProgress, null))));
2044
2224
  }
2045
2225
 
2046
2226
  // src/components/panel/actions-menu/actions/duplicate.tsx
2047
- var React27 = __toESM(require("react"));
2048
- var import_icons14 = require("@elementor/icons");
2049
- var import_i18n18 = require("@wordpress/i18n");
2227
+ var React30 = __toESM(require("react"));
2228
+ var import_icons16 = require("@elementor/icons");
2229
+ var import_i18n19 = require("@wordpress/i18n");
2050
2230
  function Duplicate({ post, popupState }) {
2051
2231
  const { setEditMode, type } = usePostListContext();
2052
2232
  const canCreate = useCanCreate(type);
@@ -2061,11 +2241,11 @@ function Duplicate({ post, popupState }) {
2061
2241
  });
2062
2242
  };
2063
2243
  const isDisabled = !canCreate;
2064
- return /* @__PURE__ */ React27.createElement(
2244
+ return /* @__PURE__ */ React30.createElement(
2065
2245
  ActionMenuItem,
2066
2246
  {
2067
- title: (0, import_i18n18.__)("Duplicate", "elementor"),
2068
- icon: import_icons14.CopyIcon,
2247
+ title: (0, import_i18n19.__)("Duplicate", "elementor"),
2248
+ icon: import_icons16.CopyIcon,
2069
2249
  MenuItemProps: {
2070
2250
  disabled: isDisabled,
2071
2251
  onClick
@@ -2075,25 +2255,25 @@ function Duplicate({ post, popupState }) {
2075
2255
  }
2076
2256
 
2077
2257
  // src/components/panel/actions-menu/actions/force-delete.tsx
2078
- var React28 = __toESM(require("react"));
2079
- var import_react13 = require("react");
2080
- var import_icons15 = require("@elementor/icons");
2081
- var import_ui20 = require("@elementor/ui");
2082
- var import_i18n19 = require("@wordpress/i18n");
2258
+ var React31 = __toESM(require("react"));
2259
+ var import_react14 = require("react");
2260
+ var import_icons17 = require("@elementor/icons");
2261
+ var import_ui22 = require("@elementor/ui");
2262
+ var import_i18n20 = require("@wordpress/i18n");
2083
2263
  function ForceDelete({ post }) {
2084
- const [isDialogOpen, setIsDialogOpen] = (0, import_react13.useState)(false);
2085
- return /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(
2264
+ const [isDialogOpen, setIsDialogOpen] = (0, import_react14.useState)(false);
2265
+ return /* @__PURE__ */ React31.createElement(React31.Fragment, null, /* @__PURE__ */ React31.createElement(
2086
2266
  ActionMenuItem,
2087
2267
  {
2088
- icon: import_icons15.TrashIcon,
2268
+ icon: import_icons17.TrashIcon,
2089
2269
  MenuItemProps: {
2090
2270
  disabled: !post.user_can.delete,
2091
2271
  onClick: () => setIsDialogOpen(true),
2092
2272
  sx: { "&:hover": { color: "error.main" } }
2093
2273
  },
2094
- title: (0, import_i18n19.__)("Delete permanently", "elementor")
2274
+ title: (0, import_i18n20.__)("Delete permanently", "elementor")
2095
2275
  }
2096
- ), isDialogOpen && /* @__PURE__ */ React28.createElement(ForceDeleteDialog, { post, setIsDialogOpen }));
2276
+ ), isDialogOpen && /* @__PURE__ */ React31.createElement(ForceDeleteDialog, { post, setIsDialogOpen }));
2097
2277
  }
2098
2278
  function ForceDeleteDialog({
2099
2279
  post,
@@ -2101,8 +2281,8 @@ function ForceDeleteDialog({
2101
2281
  }) {
2102
2282
  const { setError, type } = usePostListContext();
2103
2283
  const { forceDeletePost } = usePostActions(type);
2104
- const dialogTitle = (0, import_i18n19.sprintf)((0, import_i18n19.__)('Delete "%s" permanently?', "elementor"), post.title.rendered);
2105
- const dialogBody = (0, import_i18n19.__)("This will permanently delete the item. You cannot undo this action.", "elementor");
2284
+ const dialogTitle = (0, import_i18n20.sprintf)((0, import_i18n20.__)('Delete "%s" permanently?', "elementor"), post.title.rendered);
2285
+ const dialogBody = (0, import_i18n20.__)("This will permanently delete the item. You cannot undo this action.", "elementor");
2106
2286
  const handleDelete = async () => {
2107
2287
  try {
2108
2288
  await forceDeletePost.mutateAsync(post.id);
@@ -2118,38 +2298,38 @@ function ForceDeleteDialog({
2118
2298
  }
2119
2299
  setIsDialogOpen(false);
2120
2300
  };
2121
- return /* @__PURE__ */ React28.createElement(import_ui20.Dialog, { "aria-labelledby": "force-delete-dialog", onClose: handleCancel, open: true }, /* @__PURE__ */ React28.createElement(import_ui20.DialogTitle, { noWrap: true }, dialogTitle), /* @__PURE__ */ React28.createElement(import_ui20.Divider, null), /* @__PURE__ */ React28.createElement(import_ui20.DialogContent, null, /* @__PURE__ */ React28.createElement(import_ui20.DialogContentText, null, dialogBody)), /* @__PURE__ */ React28.createElement(import_ui20.DialogActions, null, /* @__PURE__ */ React28.createElement(
2122
- import_ui20.Button,
2301
+ return /* @__PURE__ */ React31.createElement(import_ui22.Dialog, { "aria-labelledby": "force-delete-dialog", onClose: handleCancel, open: true }, /* @__PURE__ */ React31.createElement(import_ui22.DialogTitle, { noWrap: true }, dialogTitle), /* @__PURE__ */ React31.createElement(import_ui22.Divider, null), /* @__PURE__ */ React31.createElement(import_ui22.DialogContent, null, /* @__PURE__ */ React31.createElement(import_ui22.DialogContentText, null, dialogBody)), /* @__PURE__ */ React31.createElement(import_ui22.DialogActions, null, /* @__PURE__ */ React31.createElement(
2302
+ import_ui22.Button,
2123
2303
  {
2124
2304
  variant: "contained",
2125
2305
  color: "secondary",
2126
2306
  onClick: handleCancel,
2127
2307
  disabled: forceDeletePost.isPending
2128
2308
  },
2129
- (0, import_i18n19.__)("Cancel", "elementor")
2130
- ), /* @__PURE__ */ React28.createElement(
2131
- import_ui20.Button,
2309
+ (0, import_i18n20.__)("Cancel", "elementor")
2310
+ ), /* @__PURE__ */ React31.createElement(
2311
+ import_ui22.Button,
2132
2312
  {
2133
2313
  variant: "contained",
2134
2314
  color: "error",
2135
2315
  onClick: () => void handleDelete(),
2136
2316
  disabled: forceDeletePost.isPending
2137
2317
  },
2138
- !forceDeletePost.isPending ? (0, import_i18n19.__)("Delete permanently", "elementor") : /* @__PURE__ */ React28.createElement(import_ui20.CircularProgress, null)
2318
+ !forceDeletePost.isPending ? (0, import_i18n20.__)("Delete permanently", "elementor") : /* @__PURE__ */ React31.createElement(import_ui22.CircularProgress, null)
2139
2319
  )));
2140
2320
  }
2141
2321
 
2142
2322
  // src/components/panel/actions-menu/actions/rename.tsx
2143
- var React29 = __toESM(require("react"));
2144
- var import_icons16 = require("@elementor/icons");
2145
- var import_i18n20 = require("@wordpress/i18n");
2323
+ var React32 = __toESM(require("react"));
2324
+ var import_icons18 = require("@elementor/icons");
2325
+ var import_i18n21 = require("@wordpress/i18n");
2146
2326
  function Rename({ post }) {
2147
2327
  const { setEditMode } = usePostListContext();
2148
- return /* @__PURE__ */ React29.createElement(
2328
+ return /* @__PURE__ */ React32.createElement(
2149
2329
  ActionMenuItem,
2150
2330
  {
2151
- title: (0, import_i18n20.__)("Rename", "elementor"),
2152
- icon: import_icons16.EraseIcon,
2331
+ title: (0, import_i18n21.__)("Rename", "elementor"),
2332
+ icon: import_icons18.EraseIcon,
2153
2333
  MenuItemProps: {
2154
2334
  disabled: !post.user_can.edit,
2155
2335
  onClick: () => {
@@ -2166,9 +2346,9 @@ function Rename({ post }) {
2166
2346
  }
2167
2347
 
2168
2348
  // src/components/panel/actions-menu/actions/restore.tsx
2169
- var React30 = __toESM(require("react"));
2170
- var import_icons17 = require("@elementor/icons");
2171
- var import_i18n21 = require("@wordpress/i18n");
2349
+ var React33 = __toESM(require("react"));
2350
+ var import_icons19 = require("@elementor/icons");
2351
+ var import_i18n22 = require("@wordpress/i18n");
2172
2352
  function Restore({ post }) {
2173
2353
  const { setError, type } = usePostListContext();
2174
2354
  const { restorePost } = usePostActions(type);
@@ -2179,12 +2359,12 @@ function Restore({ post }) {
2179
2359
  setError();
2180
2360
  }
2181
2361
  };
2182
- return /* @__PURE__ */ React30.createElement(
2362
+ return /* @__PURE__ */ React33.createElement(
2183
2363
  ActionMenuItem,
2184
2364
  {
2185
- description: (0, import_i18n21.__)("Restored as draft", "elementor"),
2186
- title: (0, import_i18n21.__)("Restore", "elementor"),
2187
- icon: import_icons17.RefreshIcon,
2365
+ description: (0, import_i18n22.__)("Restored as draft", "elementor"),
2366
+ title: (0, import_i18n22.__)("Restore", "elementor"),
2367
+ icon: import_icons19.RefreshIcon,
2188
2368
  MenuItemProps: {
2189
2369
  disabled: restorePost.isPending || !post.user_can.delete,
2190
2370
  onClick: () => void handleClick()
@@ -2194,11 +2374,11 @@ function Restore({ post }) {
2194
2374
  }
2195
2375
 
2196
2376
  // src/components/panel/actions-menu/actions/set-home.tsx
2197
- var React31 = __toESM(require("react"));
2198
- var import_editor_ui5 = require("@elementor/editor-ui");
2199
- var import_icons18 = require("@elementor/icons");
2200
- var import_ui21 = require("@elementor/ui");
2201
- var import_i18n22 = require("@wordpress/i18n");
2377
+ var React34 = __toESM(require("react"));
2378
+ var import_editor_ui6 = require("@elementor/editor-ui");
2379
+ var import_icons20 = require("@elementor/icons");
2380
+ var import_ui23 = require("@elementor/ui");
2381
+ var import_i18n23 = require("@wordpress/i18n");
2202
2382
 
2203
2383
  // src/hooks/use-homepage-actions.ts
2204
2384
  var import_query8 = require("@elementor/query");
@@ -2256,12 +2436,12 @@ function SetHome({ post, closeMenu, onRequestRemoveHomepage }) {
2256
2436
  const isSetHomeDisabled = !canManageOptions || !isPostPublished || updateSettingsMutation.isPending;
2257
2437
  const isRemoveHomeDisabled = !canManageOptions || updateSettingsMutation.isPending;
2258
2438
  const isDisabled = isPostHomepage ? isRemoveHomeDisabled : isSetHomeDisabled;
2259
- const title = isPostHomepage ? (0, import_i18n22.__)("Remove as homepage", "elementor") : (0, import_i18n22.__)("Set as homepage", "elementor");
2260
- return /* @__PURE__ */ React31.createElement(
2439
+ const title = isPostHomepage ? (0, import_i18n23.__)("Remove as homepage", "elementor") : (0, import_i18n23.__)("Set as homepage", "elementor");
2440
+ return /* @__PURE__ */ React34.createElement(
2261
2441
  ActionMenuItem,
2262
2442
  {
2263
2443
  title,
2264
- icon: !updateSettingsMutation.isPending ? import_icons18.HomeIcon : import_ui21.CircularProgress,
2444
+ icon: !updateSettingsMutation.isPending ? import_icons20.HomeIcon : import_ui23.CircularProgress,
2265
2445
  MenuItemProps: {
2266
2446
  disabled: isDisabled,
2267
2447
  onClick: handleMenuClick
@@ -2294,12 +2474,12 @@ function RemoveHomepageDialog({ open, onClose }) {
2294
2474
  }
2295
2475
  };
2296
2476
  const isPending = updateSettingsMutation.isPending;
2297
- const removeHomepageLabel = (0, import_i18n22.__)("Remove as homepage", "elementor");
2298
- return /* @__PURE__ */ React31.createElement(import_editor_ui5.ConfirmationDialog, { open: true, onClose: handleCancel }, /* @__PURE__ */ React31.createElement(import_editor_ui5.ConfirmationDialog.Title, { iconColor: "secondary" }, (0, import_i18n22.__)("Remove this page as your homepage?", "elementor")), /* @__PURE__ */ React31.createElement(import_editor_ui5.ConfirmationDialog.Content, null, /* @__PURE__ */ React31.createElement(import_editor_ui5.ConfirmationDialog.ContentText, null, (0, import_i18n22.__)(
2477
+ const removeHomepageLabel = (0, import_i18n23.__)("Remove as homepage", "elementor");
2478
+ return /* @__PURE__ */ React34.createElement(import_editor_ui6.ConfirmationDialog, { open: true, onClose: handleCancel }, /* @__PURE__ */ React34.createElement(import_editor_ui6.ConfirmationDialog.Title, { iconColor: "secondary" }, (0, import_i18n23.__)("Remove this page as your homepage?", "elementor")), /* @__PURE__ */ React34.createElement(import_editor_ui6.ConfirmationDialog.Content, null, /* @__PURE__ */ React34.createElement(import_editor_ui6.ConfirmationDialog.ContentText, null, (0, import_i18n23.__)(
2299
2479
  "Your homepage will go back to showing your latest posts. You can set a page as your homepage again at any time.",
2300
2480
  "elementor"
2301
- ))), /* @__PURE__ */ React31.createElement(import_ui21.DialogActions, null, /* @__PURE__ */ React31.createElement(import_ui21.Button, { color: "secondary", disabled: isPending, onClick: handleCancel }, (0, import_i18n22.__)("Not now", "elementor")), /* @__PURE__ */ React31.createElement(
2302
- import_ui21.Button,
2481
+ ))), /* @__PURE__ */ React34.createElement(import_ui23.DialogActions, null, /* @__PURE__ */ React34.createElement(import_ui23.Button, { color: "secondary", disabled: isPending, onClick: handleCancel }, (0, import_i18n23.__)("Not now", "elementor")), /* @__PURE__ */ React34.createElement(
2482
+ import_ui23.Button,
2303
2483
  {
2304
2484
  color: "secondary",
2305
2485
  disabled: isPending,
@@ -2307,22 +2487,22 @@ function RemoveHomepageDialog({ open, onClose }) {
2307
2487
  sx: { ml: 1 },
2308
2488
  variant: "contained"
2309
2489
  },
2310
- !isPending ? removeHomepageLabel : /* @__PURE__ */ React31.createElement(import_ui21.CircularProgress, null)
2490
+ !isPending ? removeHomepageLabel : /* @__PURE__ */ React34.createElement(import_ui23.CircularProgress, null)
2311
2491
  )));
2312
2492
  }
2313
2493
 
2314
2494
  // src/components/panel/actions-menu/actions/view.tsx
2315
- var React32 = __toESM(require("react"));
2316
- var import_icons19 = require("@elementor/icons");
2317
- var import_i18n23 = require("@wordpress/i18n");
2495
+ var React35 = __toESM(require("react"));
2496
+ var import_icons21 = require("@elementor/icons");
2497
+ var import_i18n24 = require("@wordpress/i18n");
2318
2498
  function View({ post }) {
2319
2499
  const { type } = usePostListContext();
2320
- const title = (0, import_i18n23.__)("View %s", "elementor").replace("%s", postTypesMap[type].labels.singular_name);
2321
- return /* @__PURE__ */ React32.createElement(
2500
+ const title = (0, import_i18n24.__)("View %s", "elementor").replace("%s", postTypesMap[type].labels.singular_name);
2501
+ return /* @__PURE__ */ React35.createElement(
2322
2502
  ActionMenuItem,
2323
2503
  {
2324
2504
  title,
2325
- icon: import_icons19.EyeIcon,
2505
+ icon: import_icons21.EyeIcon,
2326
2506
  MenuItemProps: {
2327
2507
  onClick: () => window.open(post.link, "_blank")
2328
2508
  }
@@ -2345,17 +2525,17 @@ var DisabledPostTooltip = ({
2345
2525
  postTypeSlug
2346
2526
  }) => {
2347
2527
  if (isDisabled) {
2348
- const title = /* @__PURE__ */ React33.createElement(import_ui22.Typography, { variant: "caption" }, getCannotEditPanelItemMessage(postTypeSlug), /* @__PURE__ */ React33.createElement("br", null), (0, import_i18n24.__)("To edit it directly, contact the site owner", "elementor"));
2349
- return /* @__PURE__ */ React33.createElement(import_ui22.Tooltip, { title, placement: "bottom", arrow: false }, /* @__PURE__ */ React33.createElement("span", null, children));
2528
+ const title = /* @__PURE__ */ React36.createElement(import_ui24.Typography, { variant: "caption" }, getCannotEditPanelItemMessage(postTypeSlug), /* @__PURE__ */ React36.createElement("br", null), (0, import_i18n25.__)("To edit it directly, contact the site owner", "elementor"));
2529
+ return /* @__PURE__ */ React36.createElement(import_ui24.Tooltip, { title, placement: "bottom", arrow: false }, /* @__PURE__ */ React36.createElement("span", null, children));
2350
2530
  }
2351
- return /* @__PURE__ */ React33.createElement(React33.Fragment, null, children);
2531
+ return /* @__PURE__ */ React36.createElement(React36.Fragment, null, children);
2352
2532
  };
2353
2533
  function ListItemView({ post }) {
2354
2534
  const { type } = usePostListContext();
2355
- const [isRemoveHomeDialogOpen, setIsRemoveHomeDialogOpen] = (0, import_react14.useState)(false);
2535
+ const [isRemoveHomeDialogOpen, setIsRemoveHomeDialogOpen] = (0, import_react15.useState)(false);
2356
2536
  const activeDocument = (0, import_editor_documents5.__useActiveDocument)();
2357
2537
  const navigateToDocument = (0, import_editor_documents5.__useNavigateToDocument)();
2358
- const popupState = (0, import_ui22.usePopupState)({
2538
+ const popupState = (0, import_ui24.usePopupState)({
2359
2539
  variant: "popover",
2360
2540
  popupId: "post-actions",
2361
2541
  disableAutoFocus: true
@@ -2366,24 +2546,24 @@ function ListItemView({ post }) {
2366
2546
  const isTrashed = "trash" === post.status;
2367
2547
  const isEditBlocked = !post.user_can.edit && !isTrashed;
2368
2548
  const isRowDisabled = isEditBlocked || isTrashed;
2369
- const menuTriggerProps = (0, import_ui22.bindTrigger)(popupState);
2549
+ const menuTriggerProps = (0, import_ui24.bindTrigger)(popupState);
2370
2550
  const hasListItemActions = useSiteContentListItemActionsInjections().length > 0;
2371
2551
  const showListItemActions = isActive && post.user_can.edit && !isTrashed && hasListItemActions;
2372
2552
  const isHome = Boolean(post.isHome);
2373
2553
  const trailingActionCount = 1 + (showListItemActions ? 1 : 0) + (isHome ? 1 : 0);
2374
2554
  const allowRowHover = !isEditBlocked;
2375
- const listRow = /* @__PURE__ */ React33.createElement(
2376
- import_ui22.ListItem,
2555
+ const listRow = /* @__PURE__ */ React36.createElement(
2556
+ import_ui24.ListItem,
2377
2557
  {
2378
2558
  disablePadding: true,
2379
2559
  sx: {
2380
2560
  ...getContentPanelListItemSx(trailingActionCount),
2381
2561
  ...getContentPanelListItemRowStateSx(isActive, allowRowHover)
2382
2562
  },
2383
- secondaryAction: /* @__PURE__ */ React33.createElement(import_ui22.Stack, { alignItems: "center", direction: "row", spacing: 0 }, showListItemActions && /* @__PURE__ */ React33.createElement(SiteContentListItemActionsSlot, { post, title }), isHome && /* @__PURE__ */ React33.createElement(import_icons20.HomeIcon, { color: "disabled", fontSize: "tiny", titleAccess: (0, import_i18n24.__)("Homepage", "elementor") }), /* @__PURE__ */ React33.createElement(
2384
- import_ui22.IconButton,
2563
+ secondaryAction: /* @__PURE__ */ React36.createElement(import_ui24.Stack, { alignItems: "center", direction: "row", spacing: 0 }, showListItemActions && /* @__PURE__ */ React36.createElement(SiteContentListItemActionsSlot, { post, title }), isHome && /* @__PURE__ */ React36.createElement(import_icons22.HomeIcon, { color: "disabled", fontSize: "tiny", titleAccess: (0, import_i18n25.__)("Homepage", "elementor") }), /* @__PURE__ */ React36.createElement(
2564
+ import_ui24.IconButton,
2385
2565
  {
2386
- "aria-label": (0, import_i18n24.__)("More actions", "elementor"),
2566
+ "aria-label": (0, import_i18n25.__)("More actions", "elementor"),
2387
2567
  size: "tiny",
2388
2568
  ...menuTriggerProps,
2389
2569
  onClick: (event) => {
@@ -2391,11 +2571,11 @@ function ListItemView({ post }) {
2391
2571
  menuTriggerProps.onClick?.(event);
2392
2572
  }
2393
2573
  },
2394
- /* @__PURE__ */ React33.createElement(import_icons20.DotsVerticalIcon, { fontSize: "tiny" })
2574
+ /* @__PURE__ */ React36.createElement(import_icons22.DotsVerticalIcon, { fontSize: "tiny" })
2395
2575
  ))
2396
2576
  },
2397
- /* @__PURE__ */ React33.createElement(
2398
- import_ui22.ListItemButton,
2577
+ /* @__PURE__ */ React36.createElement(
2578
+ import_ui24.ListItemButton,
2399
2579
  {
2400
2580
  dense: true,
2401
2581
  disableGutters: true,
@@ -2410,17 +2590,17 @@ function ListItemView({ post }) {
2410
2590
  shape: "rounded",
2411
2591
  sx: contentPanelListItemButtonSx
2412
2592
  },
2413
- /* @__PURE__ */ React33.createElement(import_ui22.ListItemText, { disableTypography: true, sx: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React33.createElement(PageTitleAndStatus, { title, status }))
2593
+ /* @__PURE__ */ React36.createElement(import_ui24.ListItemText, { disableTypography: true, sx: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React36.createElement(PageTitleAndStatus, { title, status }))
2414
2594
  )
2415
2595
  );
2416
- return /* @__PURE__ */ React33.createElement(React33.Fragment, null, isEditBlocked ? /* @__PURE__ */ React33.createElement(DisabledPostTooltip, { isDisabled: true, postTypeSlug: type }, listRow) : listRow, /* @__PURE__ */ React33.createElement(
2417
- import_ui22.Menu,
2596
+ return /* @__PURE__ */ React36.createElement(React36.Fragment, null, isEditBlocked ? /* @__PURE__ */ React36.createElement(DisabledPostTooltip, { isDisabled: true, postTypeSlug: type }, listRow) : listRow, /* @__PURE__ */ React36.createElement(
2597
+ import_ui24.Menu,
2418
2598
  {
2419
2599
  PaperProps: { sx: { mt: 2, width: 200 } },
2420
2600
  MenuListProps: { dense: true },
2421
- ...(0, import_ui22.bindMenu)(popupState)
2601
+ ...(0, import_ui24.bindMenu)(popupState)
2422
2602
  },
2423
- isTrashed ? /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement(Restore, { post }), /* @__PURE__ */ React33.createElement(ForceDelete, { post })) : /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement(Rename, { post }), /* @__PURE__ */ React33.createElement(Duplicate, { post, popupState }), /* @__PURE__ */ React33.createElement(Delete, { post }), /* @__PURE__ */ React33.createElement(View, { post }), type === "page" && /* @__PURE__ */ React33.createElement(React33.Fragment, null, /* @__PURE__ */ React33.createElement(import_ui22.Divider, null), /* @__PURE__ */ React33.createElement(
2603
+ isTrashed ? /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(Restore, { post }), /* @__PURE__ */ React36.createElement(ForceDelete, { post })) : /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(Rename, { post }), /* @__PURE__ */ React36.createElement(Duplicate, { post, popupState }), /* @__PURE__ */ React36.createElement(Delete, { post }), /* @__PURE__ */ React36.createElement(View, { post }), type === "page" && /* @__PURE__ */ React36.createElement(React36.Fragment, null, /* @__PURE__ */ React36.createElement(import_ui24.Divider, null), /* @__PURE__ */ React36.createElement(
2424
2604
  SetHome,
2425
2605
  {
2426
2606
  post,
@@ -2428,7 +2608,7 @@ function ListItemView({ post }) {
2428
2608
  onRequestRemoveHomepage: () => setIsRemoveHomeDialogOpen(true)
2429
2609
  }
2430
2610
  )))
2431
- ), /* @__PURE__ */ React33.createElement(
2611
+ ), /* @__PURE__ */ React36.createElement(
2432
2612
  RemoveHomepageDialog,
2433
2613
  {
2434
2614
  open: isRemoveHomeDialogOpen,
@@ -2441,25 +2621,25 @@ function ListItemView({ post }) {
2441
2621
  function PostListItem({ post }) {
2442
2622
  const { editMode } = usePostListContext();
2443
2623
  if ("rename" === editMode.mode && post?.id && post?.id === editMode.details.postId) {
2444
- return /* @__PURE__ */ React34.createElement(ListItemRename, { post });
2624
+ return /* @__PURE__ */ React37.createElement(ListItemRename, { post });
2445
2625
  }
2446
2626
  if ("create" === editMode.mode && !post) {
2447
- return /* @__PURE__ */ React34.createElement(ListItemCreate, null);
2627
+ return /* @__PURE__ */ React37.createElement(ListItemCreate, null);
2448
2628
  }
2449
2629
  if ("duplicate" === editMode.mode && !post) {
2450
- return /* @__PURE__ */ React34.createElement(ListItemDuplicate, null);
2630
+ return /* @__PURE__ */ React37.createElement(ListItemDuplicate, null);
2451
2631
  }
2452
2632
  if (!post) {
2453
2633
  return null;
2454
2634
  }
2455
- return /* @__PURE__ */ React34.createElement(ListItemView, { post });
2635
+ return /* @__PURE__ */ React37.createElement(ListItemView, { post });
2456
2636
  }
2457
2637
 
2458
2638
  // src/components/panel/posts-list/post-list-pagination-actions.tsx
2459
- var React35 = __toESM(require("react"));
2460
- var import_editor_ui6 = require("@elementor/editor-ui");
2461
- var import_ui23 = require("@elementor/ui");
2462
- var import_i18n25 = require("@wordpress/i18n");
2639
+ var React38 = __toESM(require("react"));
2640
+ var import_editor_ui7 = require("@elementor/editor-ui");
2641
+ var import_ui25 = require("@elementor/ui");
2642
+ var import_i18n26 = require("@wordpress/i18n");
2463
2643
  var listPaginationButtonProps = {
2464
2644
  color: "secondary",
2465
2645
  size: "small",
@@ -2476,28 +2656,28 @@ function PostListPaginationActions({
2476
2656
  if (!canLoadMore && !canShowLess) {
2477
2657
  return null;
2478
2658
  }
2479
- const loadMoreLabel = (0, import_i18n25.__)("Load more", "elementor");
2480
- const showLessLabel = (0, import_i18n25.__)("Show less", "elementor");
2481
- const loadMoreButton = /* @__PURE__ */ React35.createElement(
2482
- import_ui23.Button,
2659
+ const loadMoreLabel = (0, import_i18n26.__)("Load more", "elementor");
2660
+ const showLessLabel = (0, import_i18n26.__)("Show less", "elementor");
2661
+ const loadMoreButton = /* @__PURE__ */ React38.createElement(
2662
+ import_ui25.Button,
2483
2663
  {
2484
2664
  ...listPaginationButtonProps,
2485
2665
  ref: loadMoreButtonRef,
2486
2666
  "aria-label": loadMoreLabel,
2487
2667
  disabled: isLoadingMore,
2488
- endIcon: isLoadingMore ? void 0 : /* @__PURE__ */ React35.createElement(import_editor_ui6.CollapseIcon, { open: false }),
2668
+ endIcon: isLoadingMore ? void 0 : /* @__PURE__ */ React38.createElement(import_editor_ui7.CollapseIcon, { open: false }),
2489
2669
  fullWidth: true,
2490
2670
  onClick: onLoadMore,
2491
2671
  sx: { flex: 1, my: 0.5 }
2492
2672
  },
2493
- isLoadingMore ? /* @__PURE__ */ React35.createElement(import_ui23.CircularProgress, { size: 20 }) : loadMoreLabel
2673
+ isLoadingMore ? /* @__PURE__ */ React38.createElement(import_ui25.CircularProgress, { size: 20 }) : loadMoreLabel
2494
2674
  );
2495
- const showLessButton = /* @__PURE__ */ React35.createElement(
2496
- import_ui23.Button,
2675
+ const showLessButton = /* @__PURE__ */ React38.createElement(
2676
+ import_ui25.Button,
2497
2677
  {
2498
2678
  ...listPaginationButtonProps,
2499
2679
  "aria-label": showLessLabel,
2500
- endIcon: /* @__PURE__ */ React35.createElement(import_editor_ui6.CollapseIcon, { open: true }),
2680
+ endIcon: /* @__PURE__ */ React38.createElement(import_editor_ui7.CollapseIcon, { open: true }),
2501
2681
  fullWidth: true,
2502
2682
  onClick: onShowLess,
2503
2683
  sx: { flex: 1, my: 0.5 }
@@ -2505,9 +2685,9 @@ function PostListPaginationActions({
2505
2685
  showLessLabel
2506
2686
  );
2507
2687
  if (canShowLess && canLoadMore) {
2508
- return /* @__PURE__ */ React35.createElement(import_ui23.Box, { sx: { px: 2, width: "100%" } }, /* @__PURE__ */ React35.createElement(import_ui23.Stack, { direction: "row", spacing: 1 }, showLessButton, loadMoreButton));
2688
+ return /* @__PURE__ */ React38.createElement(import_ui25.Box, { sx: { px: 2, width: "100%" } }, /* @__PURE__ */ React38.createElement(import_ui25.Stack, { direction: "row", spacing: 1 }, showLessButton, loadMoreButton));
2509
2689
  }
2510
- return /* @__PURE__ */ React35.createElement(import_ui23.Box, { sx: { px: 2, width: "100%" } }, canShowLess ? showLessButton : loadMoreButton);
2690
+ return /* @__PURE__ */ React38.createElement(import_ui25.Box, { sx: { px: 2, width: "100%" } }, canShowLess ? showLessButton : loadMoreButton);
2511
2691
  }
2512
2692
 
2513
2693
  // src/components/panel/posts-list/posts-collapsible-list.tsx
@@ -2515,11 +2695,11 @@ function PostsCollapsibleListContent({ isOpenByDefault = false }) {
2515
2695
  const { type, editMode, resetEditMode, setEditMode } = usePostListContext();
2516
2696
  const { registerSection, unregisterSection } = useContentPanelCoordinator();
2517
2697
  const { clearStatusFilters, debouncedSearch, siteContentSort, statusFilters } = useSiteContentSectionToolbar();
2518
- const [isOpen, setIsOpen] = (0, import_react15.useState)(isOpenByDefault);
2519
- const focusAfterShowLessRef = (0, import_react15.useRef)(false);
2520
- const listTopRef = (0, import_react15.useRef)(null);
2521
- const loadMoreButtonRef = (0, import_react15.useRef)(null);
2522
- const sectionHeaderRef = (0, import_react15.useRef)(null);
2698
+ const [isOpen, setIsOpen] = (0, import_react16.useState)(isOpenByDefault);
2699
+ const focusAfterShowLessRef = (0, import_react16.useRef)(false);
2700
+ const listTopRef = (0, import_react16.useRef)(null);
2701
+ const loadMoreButtonRef = (0, import_react16.useRef)(null);
2702
+ const sectionHeaderRef = (0, import_react16.useRef)(null);
2523
2703
  const {
2524
2704
  data: { posts, total },
2525
2705
  isError: postsError,
@@ -2535,12 +2715,12 @@ function PostsCollapsibleListContent({ isOpenByDefault = false }) {
2535
2715
  const { data: homepageId } = useHomepage();
2536
2716
  const isPageType = type === "page";
2537
2717
  const statusFiltersKey = serializeSiteContentStatusFilters(statusFilters);
2538
- (0, import_react15.useEffect)(() => {
2718
+ (0, import_react16.useEffect)(() => {
2539
2719
  if (isTrashFilter) {
2540
2720
  resetEditMode();
2541
2721
  }
2542
2722
  }, [isTrashFilter, resetEditMode]);
2543
- (0, import_react15.useEffect)(() => {
2723
+ (0, import_react16.useEffect)(() => {
2544
2724
  registerSection(type, {
2545
2725
  setExpanded: setIsOpen,
2546
2726
  startCreate: () => {
@@ -2552,7 +2732,7 @@ function PostsCollapsibleListContent({ isOpenByDefault = false }) {
2552
2732
  });
2553
2733
  return () => unregisterSection(type);
2554
2734
  }, [clearStatusFilters, registerSection, setEditMode, statusFilters, type, unregisterSection]);
2555
- const filteredPosts = (0, import_react15.useMemo)(() => {
2735
+ const filteredPosts = (0, import_react16.useMemo)(() => {
2556
2736
  if (!posts) {
2557
2737
  return [];
2558
2738
  }
@@ -2577,7 +2757,7 @@ function PostsCollapsibleListContent({ isOpenByDefault = false }) {
2577
2757
  resetKey: `${type}:${debouncedSearch}:${statusFiltersKey}:${siteContentSort}`,
2578
2758
  totalCount: total
2579
2759
  });
2580
- const displayedPosts = (0, import_react15.useMemo)(
2760
+ const displayedPosts = (0, import_react16.useMemo)(
2581
2761
  () => filteredPosts.slice(0, pagination.visibleCount),
2582
2762
  [filteredPosts, pagination.visibleCount]
2583
2763
  );
@@ -2589,7 +2769,7 @@ function PostsCollapsibleListContent({ isOpenByDefault = false }) {
2589
2769
  listTop.scrollIntoView({ block: "nearest" });
2590
2770
  }
2591
2771
  };
2592
- (0, import_react15.useEffect)(() => {
2772
+ (0, import_react16.useEffect)(() => {
2593
2773
  if (!focusAfterShowLessRef.current) {
2594
2774
  return;
2595
2775
  }
@@ -2601,27 +2781,27 @@ function PostsCollapsibleListContent({ isOpenByDefault = false }) {
2601
2781
  }
2602
2782
  sectionHeaderRef.current?.focus();
2603
2783
  }, [pagination.canLoadMore, pagination.visibleCount]);
2604
- (0, import_react15.useEffect)(() => {
2784
+ (0, import_react16.useEffect)(() => {
2605
2785
  if ((debouncedSearch || hasActiveSiteContentStatusFilters(statusFilters)) && filteredPosts.length > 0) {
2606
2786
  setIsOpen(true);
2607
2787
  }
2608
2788
  }, [debouncedSearch, filteredPosts.length, statusFilters]);
2609
2789
  if (postsError) {
2610
- return /* @__PURE__ */ React36.createElement(ErrorState, null);
2790
+ return /* @__PURE__ */ React39.createElement(ErrorState, null);
2611
2791
  }
2612
2792
  if (postsPending && !posts?.length) {
2613
- return /* @__PURE__ */ React36.createElement(import_ui24.Box, { sx: { px: 2 } }, /* @__PURE__ */ React36.createElement(import_ui24.Box, null, /* @__PURE__ */ React36.createElement(import_ui24.Skeleton, { sx: { my: 3 }, animation: "wave", variant: "rounded", width: "100%", height: "24px" }), /* @__PURE__ */ React36.createElement(import_ui24.Skeleton, { sx: { my: 3 }, animation: "wave", variant: "rounded", width: "70%", height: "24px" }), /* @__PURE__ */ React36.createElement(import_ui24.Skeleton, { sx: { my: 3 }, animation: "wave", variant: "rounded", width: "70%", height: "24px" }), /* @__PURE__ */ React36.createElement(import_ui24.Skeleton, { sx: { my: 3 }, animation: "wave", variant: "rounded", width: "70%", height: "24px" })));
2793
+ return /* @__PURE__ */ React39.createElement(import_ui26.Box, { sx: { px: 2 } }, /* @__PURE__ */ React39.createElement(import_ui26.Box, null, /* @__PURE__ */ React39.createElement(import_ui26.Skeleton, { sx: { my: 3 }, animation: "wave", variant: "rounded", width: "100%", height: "24px" }), /* @__PURE__ */ React39.createElement(import_ui26.Skeleton, { sx: { my: 3 }, animation: "wave", variant: "rounded", width: "70%", height: "24px" }), /* @__PURE__ */ React39.createElement(import_ui26.Skeleton, { sx: { my: 3 }, animation: "wave", variant: "rounded", width: "70%", height: "24px" }), /* @__PURE__ */ React39.createElement(import_ui26.Skeleton, { sx: { my: 3 }, animation: "wave", variant: "rounded", width: "70%", height: "24px" })));
2614
2794
  }
2615
2795
  const displayCount = total;
2616
2796
  const sectionTitle = postTypesMap[type].labels.plural_name;
2617
2797
  const showNoResults = (debouncedSearch || hasActiveSiteContentStatusFilters(statusFilters)) && filteredPosts.length === 0;
2618
2798
  const countChipLabel = isNarrowed && baselineTotal !== void 0 ? `${total} / ${baselineTotal}` : void 0;
2619
- const searchAriaLabel = (0, import_i18n26.sprintf)(
2799
+ const searchAriaLabel = (0, import_i18n27.sprintf)(
2620
2800
  /* translators: %s: document type plural label. */
2621
- (0, import_i18n26.__)("Search %s", "elementor"),
2801
+ (0, import_i18n27.__)("Search %s", "elementor"),
2622
2802
  sectionTitle
2623
2803
  );
2624
- return /* @__PURE__ */ React36.createElement(
2804
+ return /* @__PURE__ */ React39.createElement(
2625
2805
  CollapsibleList,
2626
2806
  {
2627
2807
  count: displayCount,
@@ -2629,22 +2809,22 @@ function PostsCollapsibleListContent({ isOpenByDefault = false }) {
2629
2809
  headerRef: sectionHeaderRef,
2630
2810
  isOpen,
2631
2811
  onOpenChange: setIsOpen,
2632
- sectionToolbar: /* @__PURE__ */ React36.createElement(
2812
+ sectionToolbar: /* @__PURE__ */ React39.createElement(
2633
2813
  ContentPanelSectionToolbar,
2634
2814
  {
2635
- addAction: isTrashFilter ? void 0 : /* @__PURE__ */ React36.createElement(SectionAddButton, { onBeforeCreate: () => setIsOpen(true) }),
2815
+ addAction: isTrashFilter ? void 0 : /* @__PURE__ */ React39.createElement(SectionAddButton, { onBeforeCreate: () => setIsOpen(true) }),
2636
2816
  searchAriaLabel
2637
2817
  }
2638
2818
  ),
2639
2819
  title: sectionTitle
2640
2820
  },
2641
- showNoResults && /* @__PURE__ */ React36.createElement(import_ui24.Box, { sx: { py: 2, px: 2 } }, /* @__PURE__ */ React36.createElement(import_ui24.Typography, { variant: "body2", color: "text.secondary" }, (0, import_i18n26.__)("No results found", "elementor"))),
2642
- /* @__PURE__ */ React36.createElement(import_ui24.Box, { ref: listTopRef }),
2821
+ showNoResults && /* @__PURE__ */ React39.createElement(import_ui26.Box, { sx: { py: 2, px: 2 } }, /* @__PURE__ */ React39.createElement(import_ui26.Typography, { variant: "body2", color: "text.secondary" }, (0, import_i18n27.__)("No results found", "elementor"))),
2822
+ /* @__PURE__ */ React39.createElement(import_ui26.Box, { ref: listTopRef }),
2643
2823
  displayedPosts.map((post) => {
2644
- return /* @__PURE__ */ React36.createElement(PostListItem, { key: post.id, post });
2824
+ return /* @__PURE__ */ React39.createElement(PostListItem, { key: post.id, post });
2645
2825
  }),
2646
- !isTrashFilter && ["duplicate", "create"].includes(editMode.mode) && /* @__PURE__ */ React36.createElement(PostListItem, null),
2647
- /* @__PURE__ */ React36.createElement(
2826
+ !isTrashFilter && ["duplicate", "create"].includes(editMode.mode) && /* @__PURE__ */ React39.createElement(PostListItem, null),
2827
+ /* @__PURE__ */ React39.createElement(
2648
2828
  PostListPaginationActions,
2649
2829
  {
2650
2830
  canLoadMore: pagination.canLoadMore,
@@ -2659,15 +2839,15 @@ function PostsCollapsibleListContent({ isOpenByDefault = false }) {
2659
2839
  }
2660
2840
  function PostsCollapsibleList(props) {
2661
2841
  const { type } = usePostListContext();
2662
- return /* @__PURE__ */ React36.createElement(SiteContentSectionToolbarProvider, { statusFilterCountSlugs: [type] }, /* @__PURE__ */ React36.createElement(PostsCollapsibleListContent, { ...props }));
2842
+ return /* @__PURE__ */ React39.createElement(SiteContentSectionToolbarProvider, { statusFilterCountSlugs: [type] }, /* @__PURE__ */ React39.createElement(PostsCollapsibleListContent, { ...props }));
2663
2843
  }
2664
2844
 
2665
2845
  // src/components/panel/user-load-error.tsx
2666
- var React37 = __toESM(require("react"));
2667
- var import_ui25 = require("@elementor/ui");
2668
- var import_i18n27 = require("@wordpress/i18n");
2846
+ var React40 = __toESM(require("react"));
2847
+ var import_ui27 = require("@elementor/ui");
2848
+ var import_i18n28 = require("@wordpress/i18n");
2669
2849
  function UserLoadError() {
2670
- return /* @__PURE__ */ React37.createElement(import_ui25.Box, { sx: { px: 2, py: 2 } }, /* @__PURE__ */ React37.createElement(import_ui25.Typography, { variant: "body2", color: "text.secondary" }, (0, import_i18n27.__)(
2850
+ return /* @__PURE__ */ React40.createElement(import_ui27.Box, { sx: { px: 2, py: 2 } }, /* @__PURE__ */ React40.createElement(import_ui27.Typography, { variant: "body2", color: "text.secondary" }, (0, import_i18n28.__)(
2671
2851
  "We couldn\u2019t load your content permissions. Try closing and reopening this panel.",
2672
2852
  "elementor"
2673
2853
  )));
@@ -2681,22 +2861,31 @@ function ShellPanelBodyContent({
2681
2861
  showUserLoadError
2682
2862
  }) {
2683
2863
  if (isUserPending) {
2684
- return /* @__PURE__ */ React38.createElement(import_ui26.Stack, { spacing: 1, sx: { px: 2, py: 1 } }, /* @__PURE__ */ React38.createElement(import_ui26.Skeleton, { animation: "wave", height: 28, variant: "rounded", width: "100%" }), /* @__PURE__ */ React38.createElement(import_ui26.Skeleton, { animation: "wave", height: 28, variant: "rounded", width: "80%" }));
2864
+ return /* @__PURE__ */ React41.createElement(import_ui28.Stack, { spacing: 1, sx: { px: 2, py: 1 } }, /* @__PURE__ */ React41.createElement(import_ui28.Skeleton, { animation: "wave", height: 28, variant: "rounded", width: "100%" }), /* @__PURE__ */ React41.createElement(import_ui28.Skeleton, { animation: "wave", height: 28, variant: "rounded", width: "80%" }));
2685
2865
  }
2686
2866
  if (showUserLoadError) {
2687
- return /* @__PURE__ */ React38.createElement(UserLoadError, null);
2867
+ return /* @__PURE__ */ React41.createElement(UserLoadError, null);
2688
2868
  }
2869
+ return /* @__PURE__ */ React41.createElement(ShellPanelBodySections, { accessiblePostTypes, onListError });
2870
+ }
2871
+ function ShellPanelBodySections({
2872
+ accessiblePostTypes,
2873
+ onListError
2874
+ }) {
2875
+ const { isSectionVisible } = useSiteContentPanelSectionsFilter();
2689
2876
  const extraSections = getSiteContentSections();
2690
- return /* @__PURE__ */ React38.createElement(import_ui26.List, { dense: true, disablePadding: true, sx: { py: 0, width: "100%" } }, accessiblePostTypes.map((postTypeSlug, index) => /* @__PURE__ */ React38.createElement(PostListContextProvider, { key: postTypeSlug, type: postTypeSlug, setError: onListError }, /* @__PURE__ */ React38.createElement(PostsCollapsibleList, { isOpenByDefault: index === 0 }))), extraSections.map((section) => /* @__PURE__ */ React38.createElement(React38.Fragment, { key: section.id }, section.render())));
2877
+ const visiblePostTypes = accessiblePostTypes.filter((postTypeSlug) => isSectionVisible(postTypeSlug));
2878
+ const visibleSections = extraSections.filter((section) => isSectionVisible(section.id));
2879
+ return /* @__PURE__ */ React41.createElement(import_ui28.List, { dense: true, disablePadding: true, sx: { py: 0, width: "100%" } }, visiblePostTypes.map((postTypeSlug, index) => /* @__PURE__ */ React41.createElement(PostListContextProvider, { key: postTypeSlug, type: postTypeSlug, setError: onListError }, /* @__PURE__ */ React41.createElement(PostsCollapsibleList, { isOpenByDefault: index === 0 }))), visibleSections.map((section) => /* @__PURE__ */ React41.createElement(React41.Fragment, { key: section.id }, section.render())));
2691
2880
  }
2692
2881
 
2693
2882
  // src/components/panel/shell.tsx
2694
2883
  var Shell = () => {
2695
2884
  const sidebarPanelChrome = (0, import_editor_sidebar.isSidebarEnabled)();
2696
- const [isErrorSnackbarOpen, setIsErrorSnackbarOpen] = (0, import_react16.useState)(false);
2885
+ const [isErrorSnackbarOpen, setIsErrorSnackbarOpen] = (0, import_react17.useState)(false);
2697
2886
  const { accessiblePostTypes, isUserPending, showUserLoadError } = useAccessiblePanelPostTypes();
2698
- return /* @__PURE__ */ React39.createElement(ContentPanelCoordinatorProvider, null, /* @__PURE__ */ React39.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React39.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React39.createElement(
2699
- import_ui27.Stack,
2887
+ return /* @__PURE__ */ React42.createElement(ContentPanelCoordinatorProvider, null, /* @__PURE__ */ React42.createElement(SiteContentPanelSectionsFilterProvider, null, /* @__PURE__ */ React42.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React42.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React42.createElement(
2888
+ import_ui29.Stack,
2700
2889
  {
2701
2890
  alignItems: "center",
2702
2891
  direction: "row",
@@ -2706,9 +2895,10 @@ var Shell = () => {
2706
2895
  ...sidebarPanelChrome ? {} : { p: 1, pl: 2 }
2707
2896
  }
2708
2897
  },
2709
- /* @__PURE__ */ React39.createElement(import_editor_panels.PanelHeaderTitle, { sx: { flex: 1, minWidth: 0, textAlign: "start" } }, (0, import_i18n28.__)("Site content", "elementor")),
2710
- /* @__PURE__ */ React39.createElement(ContentPanelHeaderAdd, null)
2711
- )), /* @__PURE__ */ React39.createElement(import_ui27.Divider, null), /* @__PURE__ */ React39.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React39.createElement(
2898
+ /* @__PURE__ */ React42.createElement(import_editor_panels.PanelHeaderTitle, { sx: { flex: 1, minWidth: 0, textAlign: "start" } }, (0, import_i18n29.__)("Site content", "elementor")),
2899
+ /* @__PURE__ */ React42.createElement(ContentPanelSectionsFilter, null),
2900
+ /* @__PURE__ */ React42.createElement(ContentPanelHeaderAdd, null)
2901
+ )), /* @__PURE__ */ React42.createElement(import_ui29.Divider, null), /* @__PURE__ */ React42.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React42.createElement(
2712
2902
  ShellPanelBodyContent,
2713
2903
  {
2714
2904
  accessiblePostTypes,
@@ -2716,7 +2906,7 @@ var Shell = () => {
2716
2906
  onListError: () => setIsErrorSnackbarOpen(true),
2717
2907
  showUserLoadError
2718
2908
  }
2719
- ), /* @__PURE__ */ React39.createElement(error_snackbar_default, { open: isErrorSnackbarOpen, onClose: () => setIsErrorSnackbarOpen(false) }))));
2909
+ ), /* @__PURE__ */ React42.createElement(error_snackbar_default, { open: isErrorSnackbarOpen, onClose: () => setIsErrorSnackbarOpen(false) })))));
2720
2910
  };
2721
2911
  var shell_default = Shell;
2722
2912
 
@@ -2727,26 +2917,26 @@ var { panel, usePanelStatus, usePanelActions } = (0, import_editor_panels2.creat
2727
2917
  });
2728
2918
 
2729
2919
  // src/components/top-bar/recently-edited.tsx
2730
- var React44 = __toESM(require("react"));
2920
+ var React47 = __toESM(require("react"));
2731
2921
  var import_editor_documents8 = require("@elementor/editor-documents");
2732
- var import_icons23 = require("@elementor/icons");
2733
- var import_ui32 = require("@elementor/ui");
2734
- var import_i18n30 = require("@wordpress/i18n");
2922
+ var import_icons25 = require("@elementor/icons");
2923
+ var import_ui34 = require("@elementor/ui");
2924
+ var import_i18n31 = require("@wordpress/i18n");
2735
2925
 
2736
2926
  // src/components/top-bar/create-post-list-item.tsx
2737
- var React40 = __toESM(require("react"));
2927
+ var React43 = __toESM(require("react"));
2738
2928
  var import_editor_documents6 = require("@elementor/editor-documents");
2739
2929
  var import_events = require("@elementor/events");
2740
- var import_icons21 = require("@elementor/icons");
2741
- var import_ui28 = require("@elementor/ui");
2742
- var import_i18n29 = require("@wordpress/i18n");
2930
+ var import_icons23 = require("@elementor/icons");
2931
+ var import_ui30 = require("@elementor/ui");
2932
+ var import_i18n30 = require("@wordpress/i18n");
2743
2933
 
2744
2934
  // src/hooks/use-create-page.ts
2745
- var import_react17 = require("react");
2935
+ var import_react18 = require("react");
2746
2936
  var import_api_fetch5 = __toESM(require("@wordpress/api-fetch"));
2747
2937
  var endpointPath = "/elementor/v1/site-navigation/add-new-post";
2748
2938
  function useCreatePage() {
2749
- const [isLoading, setIsLoading] = (0, import_react17.useState)(false);
2939
+ const [isLoading, setIsLoading] = (0, import_react18.useState)(false);
2750
2940
  return {
2751
2941
  create: () => {
2752
2942
  setIsLoading(true);
@@ -2769,8 +2959,8 @@ function CreatePostListItem({ closePopup, ...props }) {
2769
2959
  const navigateToDocument = (0, import_editor_documents6.__useNavigateToDocument)();
2770
2960
  const { data: user } = useUser();
2771
2961
  const { dispatchEvent, config } = (0, import_events.useMixpanel)();
2772
- return /* @__PURE__ */ React40.createElement(
2773
- import_ui28.MenuItem,
2962
+ return /* @__PURE__ */ React43.createElement(
2963
+ import_ui30.MenuItem,
2774
2964
  {
2775
2965
  disabled: isLoading || !user?.capabilities?.edit_pages,
2776
2966
  onClick: async () => {
@@ -2793,26 +2983,26 @@ function CreatePostListItem({ closePopup, ...props }) {
2793
2983
  },
2794
2984
  ...props
2795
2985
  },
2796
- /* @__PURE__ */ React40.createElement(import_ui28.ListItemIcon, null, isLoading ? /* @__PURE__ */ React40.createElement(import_ui28.CircularProgress, { size: "1.25rem" }) : /* @__PURE__ */ React40.createElement(import_icons21.PlusIcon, { fontSize: "small" })),
2797
- /* @__PURE__ */ React40.createElement(
2798
- import_ui28.ListItemText,
2986
+ /* @__PURE__ */ React43.createElement(import_ui30.ListItemIcon, null, isLoading ? /* @__PURE__ */ React43.createElement(import_ui30.CircularProgress, { size: "1.25rem" }) : /* @__PURE__ */ React43.createElement(import_icons23.PlusIcon, { fontSize: "small" })),
2987
+ /* @__PURE__ */ React43.createElement(
2988
+ import_ui30.ListItemText,
2799
2989
  {
2800
2990
  primaryTypographyProps: { variant: "body2" },
2801
- primary: (0, import_i18n29.__)("Add new page", "elementor")
2991
+ primary: (0, import_i18n30.__)("Add new page", "elementor")
2802
2992
  }
2803
2993
  )
2804
2994
  );
2805
2995
  }
2806
2996
 
2807
2997
  // src/components/top-bar/indicator.tsx
2808
- var React41 = __toESM(require("react"));
2809
- var import_ui29 = require("@elementor/ui");
2998
+ var React44 = __toESM(require("react"));
2999
+ var import_ui31 = require("@elementor/ui");
2810
3000
  function Indicator({ title, status }) {
2811
- return /* @__PURE__ */ React41.createElement(Tooltip5, { title }, /* @__PURE__ */ React41.createElement(import_ui29.Stack, { component: "span", direction: "row", alignItems: "center", spacing: 0.5 }, /* @__PURE__ */ React41.createElement(import_ui29.Typography, { component: "span", variant: "body2", sx: { maxWidth: "120px" }, noWrap: true }, title), status.value !== "publish" && /* @__PURE__ */ React41.createElement(import_ui29.Typography, { component: "span", variant: "body2", sx: { fontStyle: "italic" } }, "(", status.label, ")")));
3001
+ return /* @__PURE__ */ React44.createElement(Tooltip6, { title }, /* @__PURE__ */ React44.createElement(import_ui31.Stack, { component: "span", direction: "row", alignItems: "center", spacing: 0.5 }, /* @__PURE__ */ React44.createElement(import_ui31.Typography, { component: "span", variant: "body2", sx: { maxWidth: "120px" }, noWrap: true }, title), status.value !== "publish" && /* @__PURE__ */ React44.createElement(import_ui31.Typography, { component: "span", variant: "body2", sx: { fontStyle: "italic" } }, "(", status.label, ")")));
2812
3002
  }
2813
- function Tooltip5(props) {
2814
- return /* @__PURE__ */ React41.createElement(
2815
- import_ui29.Tooltip,
3003
+ function Tooltip6(props) {
3004
+ return /* @__PURE__ */ React44.createElement(
3005
+ import_ui31.Tooltip,
2816
3006
  {
2817
3007
  PopperProps: {
2818
3008
  sx: {
@@ -2827,21 +3017,21 @@ function Tooltip5(props) {
2827
3017
  }
2828
3018
 
2829
3019
  // src/components/top-bar/post-list-item.tsx
2830
- var React43 = __toESM(require("react"));
3020
+ var React46 = __toESM(require("react"));
2831
3021
  var import_editor_documents7 = require("@elementor/editor-documents");
2832
3022
  var import_events2 = require("@elementor/events");
2833
- var import_ui31 = require("@elementor/ui");
3023
+ var import_ui33 = require("@elementor/ui");
2834
3024
 
2835
3025
  // src/components/top-bar/chip-doc-type.tsx
2836
- var React42 = __toESM(require("react"));
2837
- var import_icons22 = require("@elementor/icons");
2838
- var import_ui30 = require("@elementor/ui");
3026
+ var React45 = __toESM(require("react"));
3027
+ var import_icons24 = require("@elementor/icons");
3028
+ var import_ui32 = require("@elementor/ui");
2839
3029
  var iconsMap2 = getIconsMap();
2840
3030
  function DocTypeChip({ postType, docType, label }) {
2841
3031
  const color = "elementor_library" === postType ? "global" : "accent";
2842
- const Icon = iconsMap2[docType] || import_icons22.PostTypeIcon;
2843
- return /* @__PURE__ */ React42.createElement(
2844
- import_ui30.Chip,
3032
+ const Icon = iconsMap2[docType] || import_icons24.PostTypeIcon;
3033
+ return /* @__PURE__ */ React45.createElement(
3034
+ import_ui32.Chip,
2845
3035
  {
2846
3036
  component: "span",
2847
3037
  size: "small",
@@ -2849,7 +3039,7 @@ function DocTypeChip({ postType, docType, label }) {
2849
3039
  label,
2850
3040
  "data-value": docType,
2851
3041
  color,
2852
- icon: /* @__PURE__ */ React42.createElement(Icon, null),
3042
+ icon: /* @__PURE__ */ React45.createElement(Icon, null),
2853
3043
  sx: { ml: 1, cursor: "inherit" }
2854
3044
  }
2855
3045
  );
@@ -2860,8 +3050,8 @@ function PostListItem2({ post, closePopup, ...props }) {
2860
3050
  const navigateToDocument = (0, import_editor_documents7.__useNavigateToDocument)();
2861
3051
  const postTitle = useReverseHtmlEntities(post.title);
2862
3052
  const { dispatchEvent, config } = (0, import_events2.useMixpanel)();
2863
- return /* @__PURE__ */ React43.createElement(
2864
- import_ui31.MenuItem,
3053
+ return /* @__PURE__ */ React46.createElement(
3054
+ import_ui33.MenuItem,
2865
3055
  {
2866
3056
  disabled: !post.user_can.edit,
2867
3057
  onClick: async () => {
@@ -2883,15 +3073,15 @@ function PostListItem2({ post, closePopup, ...props }) {
2883
3073
  },
2884
3074
  ...props
2885
3075
  },
2886
- /* @__PURE__ */ React43.createElement(
2887
- import_ui31.ListItemText,
3076
+ /* @__PURE__ */ React46.createElement(
3077
+ import_ui33.ListItemText,
2888
3078
  {
2889
3079
  sx: { flexGrow: 0 },
2890
3080
  primaryTypographyProps: { variant: "body2", noWrap: true },
2891
3081
  primary: postTitle
2892
3082
  }
2893
3083
  ),
2894
- /* @__PURE__ */ React43.createElement(DocTypeChip, { postType: post.type.post_type, docType: post.type.doc_type, label: post.type.label })
3084
+ /* @__PURE__ */ React46.createElement(DocTypeChip, { postType: post.type.post_type, docType: post.type.doc_type, label: post.type.label })
2895
3085
  );
2896
3086
  }
2897
3087
 
@@ -2908,7 +3098,7 @@ function RecentlyEdited() {
2908
3098
  return data.filter((post) => post.id !== document2?.id).splice(0, NUMBER_OF_RECENT_POSTS - 1);
2909
3099
  };
2910
3100
  const recentPosts = getRecentPosts();
2911
- const popupState = (0, import_ui32.usePopupState)({
3101
+ const popupState = (0, import_ui34.usePopupState)({
2912
3102
  variant: "popover",
2913
3103
  popupId: "elementor-v2-top-bar-recently-edited"
2914
3104
  });
@@ -2916,13 +3106,13 @@ function RecentlyEdited() {
2916
3106
  if (!document2) {
2917
3107
  return null;
2918
3108
  }
2919
- const buttonProps = (0, import_ui32.bindTrigger)(popupState);
2920
- return /* @__PURE__ */ React44.createElement(React44.Fragment, null, /* @__PURE__ */ React44.createElement(
2921
- import_ui32.Button,
3109
+ const buttonProps = (0, import_ui34.bindTrigger)(popupState);
3110
+ return /* @__PURE__ */ React47.createElement(React47.Fragment, null, /* @__PURE__ */ React47.createElement(
3111
+ import_ui34.Button,
2922
3112
  {
2923
3113
  color: "inherit",
2924
3114
  size: "small",
2925
- endIcon: /* @__PURE__ */ React44.createElement(import_icons23.ChevronDownIcon, { fontSize: "small" }),
3115
+ endIcon: /* @__PURE__ */ React47.createElement(import_icons25.ChevronDownIcon, { fontSize: "small" }),
2926
3116
  ...buttonProps,
2927
3117
  onClick: (e) => {
2928
3118
  const extendedWindow = window;
@@ -2941,41 +3131,41 @@ function RecentlyEdited() {
2941
3131
  buttonProps.onClick(e);
2942
3132
  }
2943
3133
  },
2944
- /* @__PURE__ */ React44.createElement(Indicator, { title: documentTitle, status: document2.status })
2945
- ), /* @__PURE__ */ React44.createElement(
2946
- import_ui32.Menu,
3134
+ /* @__PURE__ */ React47.createElement(Indicator, { title: documentTitle, status: document2.status })
3135
+ ), /* @__PURE__ */ React47.createElement(
3136
+ import_ui34.Menu,
2947
3137
  {
2948
3138
  MenuListProps: {
2949
- subheader: /* @__PURE__ */ React44.createElement(import_ui32.ListSubheader, { sx: { color: "accent.main", fontStyle: "italic", fontWeight: "300" } }, (0, import_i18n30.__)("Recent", "elementor"))
3139
+ subheader: /* @__PURE__ */ React47.createElement(import_ui34.ListSubheader, { sx: { color: "accent.main", fontStyle: "italic", fontWeight: "300" } }, (0, import_i18n31.__)("Recent", "elementor"))
2950
3140
  },
2951
3141
  PaperProps: { sx: { mt: 2.5, width: 320 } },
2952
- ...(0, import_ui32.bindMenu)(popupState)
3142
+ ...(0, import_ui34.bindMenu)(popupState)
2953
3143
  },
2954
- recentPosts.map((post) => /* @__PURE__ */ React44.createElement(PostListItem2, { key: post.id, post, closePopup: popupState.close })),
2955
- recentPosts.length === 0 && /* @__PURE__ */ React44.createElement(import_ui32.MenuItem, { disabled: true }, /* @__PURE__ */ React44.createElement(
2956
- import_ui32.ListItemText,
3144
+ recentPosts.map((post) => /* @__PURE__ */ React47.createElement(PostListItem2, { key: post.id, post, closePopup: popupState.close })),
3145
+ recentPosts.length === 0 && /* @__PURE__ */ React47.createElement(import_ui34.MenuItem, { disabled: true }, /* @__PURE__ */ React47.createElement(
3146
+ import_ui34.ListItemText,
2957
3147
  {
2958
3148
  primaryTypographyProps: {
2959
3149
  variant: "caption",
2960
3150
  fontStyle: "italic"
2961
3151
  },
2962
- primary: (0, import_i18n30.__)("There are no other pages or templates on this site yet.", "elementor")
3152
+ primary: (0, import_i18n31.__)("There are no other pages or templates on this site yet.", "elementor")
2963
3153
  }
2964
3154
  )),
2965
- /* @__PURE__ */ React44.createElement(import_ui32.Divider, { disabled: recentPosts.length === 0 }),
2966
- /* @__PURE__ */ React44.createElement(CreatePostListItem, { closePopup: popupState.close })
3155
+ /* @__PURE__ */ React47.createElement(import_ui34.Divider, { disabled: recentPosts.length === 0 }),
3156
+ /* @__PURE__ */ React47.createElement(CreatePostListItem, { closePopup: popupState.close })
2967
3157
  ));
2968
3158
  }
2969
3159
 
2970
3160
  // src/hooks/use-toggle-button-props.ts
2971
- var import_icons24 = require("@elementor/icons");
2972
- var import_i18n31 = require("@wordpress/i18n");
3161
+ var import_icons26 = require("@elementor/icons");
3162
+ var import_i18n32 = require("@wordpress/i18n");
2973
3163
  function useToggleButtonProps() {
2974
3164
  const { isOpen: selectedState, isBlocked } = usePanelStatus();
2975
3165
  const { open, close } = usePanelActions();
2976
3166
  return {
2977
- title: (0, import_i18n31.__)("Site content", "elementor"),
2978
- icon: import_icons24.PagesIcon,
3167
+ title: (0, import_i18n32.__)("Site content", "elementor"),
3168
+ icon: import_icons26.PagesIcon,
2979
3169
  onClick: () => {
2980
3170
  const extendedWindow = window;
2981
3171
  const config = extendedWindow?.elementorCommon?.eventsManager?.config;
@@ -3018,25 +3208,25 @@ function registerButton() {
3018
3208
  }
3019
3209
 
3020
3210
  // src/components/panel/popups/popup-section-add-button.tsx
3021
- var React45 = __toESM(require("react"));
3022
- var import_react18 = require("react");
3023
- var import_ui33 = require("@elementor/ui");
3024
- var import_i18n32 = require("@wordpress/i18n");
3025
- var PopupSectionAddButton = (0, import_react18.forwardRef)(
3211
+ var React48 = __toESM(require("react"));
3212
+ var import_react19 = require("react");
3213
+ var import_ui35 = require("@elementor/ui");
3214
+ var import_i18n33 = require("@wordpress/i18n");
3215
+ var PopupSectionAddButton = (0, import_react19.forwardRef)(
3026
3216
  ({ disabled, onBeforeCreate, onCreate }, ref) => {
3027
- const promotionRef = (0, import_react18.useRef)(null);
3217
+ const promotionRef = (0, import_react19.useRef)(null);
3028
3218
  const canCreate = env.popups?.can_use ?? false;
3029
- const togglePromotion = (0, import_react18.useCallback)(() => {
3219
+ const togglePromotion = (0, import_react19.useCallback)(() => {
3030
3220
  promotionRef.current?.toggle();
3031
3221
  }, []);
3032
- (0, import_react18.useImperativeHandle)(ref, () => ({ togglePromotion }), [togglePromotion]);
3033
- const ariaLabel = (0, import_i18n32.sprintf)(
3222
+ (0, import_react19.useImperativeHandle)(ref, () => ({ togglePromotion }), [togglePromotion]);
3223
+ const ariaLabel = (0, import_i18n33.sprintf)(
3034
3224
  /* translators: %s: Document type singular name. */
3035
- (0, import_i18n32.__)("New %s", "elementor"),
3036
- (0, import_i18n32.__)("Popup", "elementor")
3225
+ (0, import_i18n33.__)("New %s", "elementor"),
3226
+ (0, import_i18n33.__)("Popup", "elementor")
3037
3227
  );
3038
3228
  if (canCreate) {
3039
- return /* @__PURE__ */ React45.createElement(
3229
+ return /* @__PURE__ */ React48.createElement(
3040
3230
  ContentPanelAddIconButton,
3041
3231
  {
3042
3232
  "aria-label": ariaLabel,
@@ -3049,8 +3239,8 @@ var PopupSectionAddButton = (0, import_react18.forwardRef)(
3049
3239
  }
3050
3240
  );
3051
3241
  }
3052
- return /* @__PURE__ */ React45.createElement(
3053
- import_ui33.Stack,
3242
+ return /* @__PURE__ */ React48.createElement(
3243
+ import_ui35.Stack,
3054
3244
  {
3055
3245
  alignItems: "center",
3056
3246
  direction: "row",
@@ -3061,8 +3251,8 @@ var PopupSectionAddButton = (0, import_react18.forwardRef)(
3061
3251
  },
3062
3252
  sx: { cursor: "pointer" }
3063
3253
  },
3064
- /* @__PURE__ */ React45.createElement(ContentPanelAddIconButton, { "aria-label": ariaLabel, tabIndex: -1 }),
3065
- /* @__PURE__ */ React45.createElement(SiteContentPopupsPromotionChip, { ref: promotionRef })
3254
+ /* @__PURE__ */ React48.createElement(ContentPanelAddIconButton, { "aria-label": ariaLabel, tabIndex: -1 }),
3255
+ /* @__PURE__ */ React48.createElement(SiteContentPopupsPromotionChip, { ref: promotionRef })
3066
3256
  );
3067
3257
  }
3068
3258
  );