@elementor/editor-site-navigation 4.5.0-1221 → 4.5.0-1223

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
@@ -63,19 +63,44 @@ var import_editor_sidebar2 = require("@elementor/editor-sidebar");
63
63
  var import_editor_panels2 = require("@elementor/editor-panels");
64
64
 
65
65
  // src/components/panel/shell.tsx
66
- var React34 = __toESM(require("react"));
66
+ var React36 = __toESM(require("react"));
67
67
  var import_react11 = require("react");
68
68
  var import_editor_panels = require("@elementor/editor-panels");
69
69
  var import_editor_sidebar = require("@elementor/editor-sidebar");
70
- var import_ui23 = require("@elementor/ui");
71
- var import_i18n24 = require("@wordpress/i18n");
70
+ var import_ui25 = require("@elementor/ui");
71
+ var import_i18n26 = require("@wordpress/i18n");
72
72
 
73
73
  // src/contexts/content-panel-coordinator.tsx
74
74
  var React = __toESM(require("react"));
75
75
  var import_react = require("react");
76
76
 
77
- // src/site-content-status-filter.ts
77
+ // src/site-content-sort.ts
78
78
  var import_i18n = require("@wordpress/i18n");
79
+ var SITE_CONTENT_SORT_OPTIONS = ["oldest", "newest"];
80
+ var DEFAULT_SITE_CONTENT_SORT = "oldest";
81
+ var SITE_CONTENT_SORT_POPOVER_WIDTH_PX = 280;
82
+ var sortLabels = {
83
+ oldest: (0, import_i18n.__)("Oldest", "elementor"),
84
+ newest: (0, import_i18n.__)("Newest", "elementor")
85
+ };
86
+ function getSiteContentSortLabel(sort) {
87
+ return sortLabels[sort];
88
+ }
89
+ function hasActiveSiteContentSort(sort) {
90
+ return sort !== DEFAULT_SITE_CONTENT_SORT;
91
+ }
92
+ function getRestOrderForSiteContentSort(sort) {
93
+ if (sort === "newest") {
94
+ return { order: "desc", orderby: "date" };
95
+ }
96
+ return { order: "asc", orderby: "date" };
97
+ }
98
+ function shouldPinHomepageForSiteContentSort(sort) {
99
+ return sort === DEFAULT_SITE_CONTENT_SORT;
100
+ }
101
+
102
+ // src/site-content-status-filter.ts
103
+ var import_i18n2 = require("@wordpress/i18n");
79
104
  var SITE_CONTENT_SELECTABLE_STATUS_FILTERS = [
80
105
  "publish",
81
106
  "draft",
@@ -93,14 +118,14 @@ var EMPTY_SITE_CONTENT_STATUS_FILTERS = {
93
118
  trash: false
94
119
  };
95
120
  var filterLabels = {
96
- publish: (0, import_i18n.__)("Published", "elementor"),
97
- draft: (0, import_i18n.__)("Drafts", "elementor"),
98
- pending: (0, import_i18n.__)("Pending", "elementor"),
99
- private: (0, import_i18n.__)("Private", "elementor"),
100
- future: (0, import_i18n.__)("Scheduled", "elementor"),
101
- trash: (0, import_i18n.__)("Trash", "elementor")
121
+ publish: (0, import_i18n2.__)("Published", "elementor"),
122
+ draft: (0, import_i18n2.__)("Drafts", "elementor"),
123
+ pending: (0, import_i18n2.__)("Pending", "elementor"),
124
+ private: (0, import_i18n2.__)("Private", "elementor"),
125
+ future: (0, import_i18n2.__)("Scheduled", "elementor"),
126
+ trash: (0, import_i18n2.__)("Trash", "elementor")
102
127
  };
103
- var SITE_CONTENT_ALL_FILTER_LABEL = (0, import_i18n.__)("All", "elementor");
128
+ var SITE_CONTENT_ALL_FILTER_LABEL = (0, import_i18n2.__)("All", "elementor");
104
129
  var SITE_CONTENT_FILTER_POPOVER_WIDTH_PX = 280;
105
130
  function getSiteContentStatusFilterLabel(filter) {
106
131
  return filterLabels[filter];
@@ -157,6 +182,7 @@ var ContentPanelCoordinatorContext = (0, import_react.createContext)(null);
157
182
  function ContentPanelCoordinatorProvider({ children }) {
158
183
  const sectionsRef = (0, import_react.useRef)(/* @__PURE__ */ new Map());
159
184
  const [searchQuery, setSearchQuery] = (0, import_react.useState)("");
185
+ const [siteContentSort, setSiteContentSortState] = (0, import_react.useState)(DEFAULT_SITE_CONTENT_SORT);
160
186
  const [statusFilters, setStatusFilters] = (0, import_react.useState)(
161
187
  EMPTY_SITE_CONTENT_STATUS_FILTERS
162
188
  );
@@ -174,28 +200,46 @@ function ContentPanelCoordinatorProvider({ children }) {
174
200
  handlers.setExpanded(true);
175
201
  handlers.startCreate();
176
202
  }, []);
203
+ const clearActiveToolbarFilters = (0, import_react.useCallback)(() => {
204
+ setSiteContentSortState(DEFAULT_SITE_CONTENT_SORT);
205
+ setStatusFilters(EMPTY_SITE_CONTENT_STATUS_FILTERS);
206
+ }, []);
207
+ const clearSiteContentSort = (0, import_react.useCallback)(() => {
208
+ setSiteContentSortState(DEFAULT_SITE_CONTENT_SORT);
209
+ }, []);
177
210
  const clearStatusFilters = (0, import_react.useCallback)(() => {
178
211
  setStatusFilters(EMPTY_SITE_CONTENT_STATUS_FILTERS);
179
212
  }, []);
213
+ const setSiteContentSort = (0, import_react.useCallback)((sort) => {
214
+ setSiteContentSortState(sort);
215
+ }, []);
180
216
  const toggleStatusFilter = (0, import_react.useCallback)((filter) => {
181
217
  setStatusFilters((current) => toggleSiteContentStatusFilter(current, filter));
182
218
  }, []);
183
219
  const value = (0, import_react.useMemo)(
184
220
  () => ({
221
+ clearActiveToolbarFilters,
222
+ clearSiteContentSort,
185
223
  clearStatusFilters,
186
224
  registerSection,
187
225
  requestCreate,
188
226
  searchQuery,
189
227
  setSearchQuery,
228
+ setSiteContentSort,
229
+ siteContentSort,
190
230
  statusFilters,
191
231
  toggleStatusFilter,
192
232
  unregisterSection
193
233
  }),
194
234
  [
235
+ clearActiveToolbarFilters,
236
+ clearSiteContentSort,
195
237
  clearStatusFilters,
196
238
  registerSection,
197
239
  requestCreate,
198
240
  searchQuery,
241
+ siteContentSort,
242
+ setSiteContentSort,
199
243
  statusFilters,
200
244
  toggleStatusFilter,
201
245
  unregisterSection
@@ -218,20 +262,20 @@ var import_react2 = require("react");
218
262
 
219
263
  // src/api/post.ts
220
264
  var import_api_fetch = __toESM(require("@wordpress/api-fetch"));
221
- var import_i18n2 = require("@wordpress/i18n");
265
+ var import_i18n3 = require("@wordpress/i18n");
222
266
  var postTypesMap = {
223
267
  page: {
224
268
  labels: {
225
- singular_name: (0, import_i18n2.__)("Page", "elementor"),
226
- plural_name: (0, import_i18n2.__)("Pages", "elementor")
269
+ singular_name: (0, import_i18n3.__)("Page", "elementor"),
270
+ plural_name: (0, import_i18n3.__)("Pages", "elementor")
227
271
  },
228
272
  rest_base: "pages",
229
273
  createCapability: "edit_pages"
230
274
  },
231
275
  post: {
232
276
  labels: {
233
- singular_name: (0, import_i18n2.__)("Post", "elementor"),
234
- plural_name: (0, import_i18n2.__)("Posts", "elementor")
277
+ singular_name: (0, import_i18n3.__)("Post", "elementor"),
278
+ plural_name: (0, import_i18n3.__)("Posts", "elementor")
235
279
  },
236
280
  rest_base: "posts",
237
281
  createCapability: "edit_posts"
@@ -246,18 +290,20 @@ function getAccessiblePanelPostTypes(capabilities) {
246
290
  }
247
291
  function getCannotEditPanelItemMessage(postTypeSlug) {
248
292
  if ("page" === postTypeSlug) {
249
- return (0, import_i18n2.__)("You cannot edit this page.", "elementor");
293
+ return (0, import_i18n3.__)("You cannot edit this page.", "elementor");
250
294
  }
251
- return (0, import_i18n2.__)("You cannot edit this post.", "elementor");
295
+ return (0, import_i18n3.__)("You cannot edit this post.", "elementor");
252
296
  }
253
297
  var POST_PER_PAGE = 10;
254
298
  var COUNT_QUERY_PER_PAGE = 1;
255
- var getRequest = async (postTypeSlug, page, search = "", status = "any", perPage = POST_PER_PAGE) => {
299
+ var getRequest = async (postTypeSlug, page, search = "", status = "any", perPage = POST_PER_PAGE, sort = DEFAULT_SITE_CONTENT_SORT) => {
256
300
  const baseUri = `/wp/v2/${postTypesMap[postTypeSlug].rest_base}`;
257
301
  const keys = ["id", "type", "title", "link", "status", "user_can"];
302
+ const { order, orderby } = getRestOrderForSiteContentSort(sort);
258
303
  const queryParams = new URLSearchParams({
259
304
  status,
260
- order: "asc",
305
+ order,
306
+ orderby,
261
307
  page: page.toString(),
262
308
  per_page: perPage.toString(),
263
309
  _fields: keys.join(",")
@@ -443,7 +489,7 @@ var contentPanelListItemButtonSx = {
443
489
  var React3 = __toESM(require("react"));
444
490
  var import_icons3 = require("@elementor/icons");
445
491
  var import_ui2 = require("@elementor/ui");
446
- var import_i18n3 = require("@wordpress/i18n");
492
+ var import_i18n4 = require("@wordpress/i18n");
447
493
 
448
494
  // src/hooks/use-can-create.ts
449
495
  function useCanCreate(postTypeSlug) {
@@ -491,7 +537,7 @@ function ContentPanelHeaderAdd() {
491
537
  return /* @__PURE__ */ React3.createElement(React3.Fragment, null, /* @__PURE__ */ React3.createElement(
492
538
  ContentPanelAddIconButton,
493
539
  {
494
- "aria-label": (0, import_i18n3.__)("Add new", "elementor"),
540
+ "aria-label": (0, import_i18n4.__)("Add new", "elementor"),
495
541
  ...buttonProps,
496
542
  disabled: !canAddAny
497
543
  }
@@ -499,13 +545,13 @@ function ContentPanelHeaderAdd() {
499
545
  }
500
546
 
501
547
  // src/components/panel/content-panel-toolbar.tsx
502
- var React9 = __toESM(require("react"));
503
- var import_ui8 = require("@elementor/ui");
548
+ var React11 = __toESM(require("react"));
549
+ var import_ui10 = require("@elementor/ui");
504
550
 
505
551
  // src/components/panel/content-panel-active-filters.tsx
506
552
  var React5 = __toESM(require("react"));
507
553
  var import_ui4 = require("@elementor/ui");
508
- var import_i18n4 = require("@wordpress/i18n");
554
+ var import_i18n5 = require("@wordpress/i18n");
509
555
 
510
556
  // src/components/panel/content-panel-clear-filters-button.tsx
511
557
  var React4 = __toESM(require("react"));
@@ -526,12 +572,22 @@ var contentPanelFilterChipSx = {
526
572
  }
527
573
  };
528
574
  function ContentPanelActiveFilters() {
529
- const { clearStatusFilters, statusFilters, toggleStatusFilter } = useContentPanelCoordinator();
530
- if (!hasActiveSiteContentStatusFilters(statusFilters)) {
575
+ const { clearActiveToolbarFilters, setSiteContentSort, siteContentSort, statusFilters, toggleStatusFilter } = useContentPanelCoordinator();
576
+ const hasStatusFilters = hasActiveSiteContentStatusFilters(statusFilters);
577
+ const hasSort = hasActiveSiteContentSort(siteContentSort);
578
+ if (!hasStatusFilters && !hasSort) {
531
579
  return null;
532
580
  }
533
581
  const activeKeys = getActiveSiteContentStatusFilterKeys(statusFilters);
534
- return /* @__PURE__ */ React5.createElement(import_ui4.Stack, { alignItems: "center", direction: "row", justifyContent: "space-between" }, /* @__PURE__ */ React5.createElement(import_ui4.Stack, { alignItems: "center", direction: "row", flexWrap: "wrap", gap: 0.5 }, activeKeys.map((key) => /* @__PURE__ */ React5.createElement(
582
+ return /* @__PURE__ */ React5.createElement(import_ui4.Stack, { alignItems: "center", direction: "row", justifyContent: "space-between" }, /* @__PURE__ */ React5.createElement(import_ui4.Stack, { alignItems: "center", direction: "row", flexWrap: "wrap", gap: 0.5 }, hasSort && /* @__PURE__ */ React5.createElement(
583
+ import_ui4.Chip,
584
+ {
585
+ label: getSiteContentSortLabel(siteContentSort),
586
+ onDelete: () => setSiteContentSort(DEFAULT_SITE_CONTENT_SORT),
587
+ size: "tiny",
588
+ sx: contentPanelFilterChipSx
589
+ }
590
+ ), activeKeys.map((key) => /* @__PURE__ */ React5.createElement(
535
591
  import_ui4.Chip,
536
592
  {
537
593
  key,
@@ -543,10 +599,10 @@ function ContentPanelActiveFilters() {
543
599
  ))), /* @__PURE__ */ React5.createElement(
544
600
  ContentPanelClearFiltersButton,
545
601
  {
546
- ariaLabel: (0, import_i18n4.__)("Clear Filters", "elementor"),
547
- onClear: clearStatusFilters,
602
+ ariaLabel: (0, import_i18n5.__)("Clear Filters", "elementor"),
603
+ onClear: clearActiveToolbarFilters,
548
604
  sx: { margin: "0 0 auto auto" },
549
- tooltipText: (0, import_i18n4.__)("Clear Filters", "elementor")
605
+ tooltipText: (0, import_i18n5.__)("Clear Filters", "elementor")
550
606
  }
551
607
  ));
552
608
  }
@@ -555,19 +611,19 @@ function ContentPanelActiveFilters() {
555
611
  var React6 = __toESM(require("react"));
556
612
  var import_icons5 = require("@elementor/icons");
557
613
  var import_ui5 = require("@elementor/ui");
558
- var import_i18n5 = require("@wordpress/i18n");
614
+ var import_i18n6 = require("@wordpress/i18n");
559
615
  function ContentPanelSearch() {
560
616
  const { searchQuery, setSearchQuery } = useContentPanelCoordinator();
561
- return /* @__PURE__ */ React6.createElement(import_ui5.Box, { component: "search", "aria-label": (0, import_i18n5.__)("Search site content", "elementor") }, /* @__PURE__ */ React6.createElement(
617
+ return /* @__PURE__ */ React6.createElement(import_ui5.Box, { component: "search", "aria-label": (0, import_i18n6.__)("Search site content", "elementor") }, /* @__PURE__ */ React6.createElement(
562
618
  import_ui5.TextField,
563
619
  {
564
620
  fullWidth: true,
565
621
  size: "tiny",
566
622
  value: searchQuery,
567
- placeholder: (0, import_i18n5.__)("Search", "elementor"),
623
+ placeholder: (0, import_i18n6.__)("Search", "elementor"),
568
624
  onChange: (event) => setSearchQuery(event.target.value),
569
625
  inputProps: {
570
- "aria-label": (0, import_i18n5.__)("Search", "elementor")
626
+ "aria-label": (0, import_i18n6.__)("Search", "elementor")
571
627
  },
572
628
  InputProps: {
573
629
  startAdornment: /* @__PURE__ */ React6.createElement(import_ui5.InputAdornment, { position: "start" }, /* @__PURE__ */ React6.createElement(import_icons5.SearchIcon, { fontSize: "tiny" }))
@@ -576,17 +632,105 @@ function ContentPanelSearch() {
576
632
  ));
577
633
  }
578
634
 
579
- // src/components/panel/content-panel-status-filter.tsx
635
+ // src/components/panel/content-panel-sort.tsx
580
636
  var React8 = __toESM(require("react"));
581
637
  var import_editor_ui = require("@elementor/editor-ui");
582
638
  var import_icons7 = require("@elementor/icons");
583
639
  var import_ui7 = require("@elementor/ui");
584
- var import_i18n6 = require("@wordpress/i18n");
640
+ var import_i18n7 = require("@wordpress/i18n");
585
641
 
586
- // src/components/panel/content-panel-status-filter-list.tsx
642
+ // src/components/panel/content-panel-sort-list.tsx
587
643
  var React7 = __toESM(require("react"));
588
644
  var import_icons6 = require("@elementor/icons");
589
645
  var import_ui6 = require("@elementor/ui");
646
+ var renderSortMenuItemContent = (label, selected) => /* @__PURE__ */ React7.createElement(import_ui6.Stack, { alignItems: "center", direction: "row", gap: 1, width: "100%" }, /* @__PURE__ */ React7.createElement(import_ui6.Typography, { sx: { color: "text.secondary", flex: 1 }, variant: "caption" }, label), selected ? /* @__PURE__ */ React7.createElement(import_icons6.CheckIcon, { "aria-hidden": true, fontSize: "tiny" }) : null);
647
+ function ContentPanelSortList() {
648
+ const { setSiteContentSort, siteContentSort } = useContentPanelCoordinator();
649
+ return /* @__PURE__ */ React7.createElement(import_ui6.MenuList, { dense: true }, SITE_CONTENT_SORT_OPTIONS.map((option) => {
650
+ const isSelected = siteContentSort === option;
651
+ return /* @__PURE__ */ React7.createElement(
652
+ import_ui6.MenuItem,
653
+ {
654
+ key: option,
655
+ "aria-checked": isSelected,
656
+ onClick: () => setSiteContentSort(option),
657
+ role: "menuitemradio",
658
+ selected: isSelected
659
+ },
660
+ renderSortMenuItemContent(getSiteContentSortLabel(option), isSelected)
661
+ );
662
+ }));
663
+ }
664
+
665
+ // src/components/panel/content-panel-sort.tsx
666
+ function ContentPanelSort() {
667
+ const { clearSiteContentSort, siteContentSort } = useContentPanelCoordinator();
668
+ const popupState = (0, import_ui7.usePopupState)({
669
+ variant: "popover",
670
+ disableAutoFocus: true
671
+ });
672
+ const hasActiveSort = hasActiveSiteContentSort(siteContentSort);
673
+ return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(import_ui7.Tooltip, { placement: "top", title: (0, import_i18n7.__)("Sort", "elementor") }, /* @__PURE__ */ React8.createElement(
674
+ import_ui7.ToggleButton,
675
+ {
676
+ "aria-label": (0, import_i18n7.__)("Sort", "elementor"),
677
+ selected: popupState.isOpen || hasActiveSort,
678
+ size: "tiny",
679
+ value: "sort",
680
+ ...(0, import_ui7.bindToggle)(popupState)
681
+ },
682
+ /* @__PURE__ */ React8.createElement(import_icons7.ArrowsSortIcon, { fontSize: "tiny" })
683
+ )), /* @__PURE__ */ React8.createElement(
684
+ import_ui7.Popover,
685
+ {
686
+ anchorOrigin: {
687
+ horizontal: "right",
688
+ vertical: "top"
689
+ },
690
+ sx: {
691
+ maxWidth: `${SITE_CONTENT_SORT_POPOVER_WIDTH_PX}px`
692
+ },
693
+ transformOrigin: {
694
+ horizontal: -21,
695
+ vertical: "top"
696
+ },
697
+ ...(0, import_ui7.bindPopover)(popupState)
698
+ },
699
+ /* @__PURE__ */ React8.createElement(
700
+ import_editor_ui.PopoverHeader,
701
+ {
702
+ actions: hasActiveSort ? [
703
+ /* @__PURE__ */ React8.createElement(
704
+ ContentPanelClearFiltersButton,
705
+ {
706
+ ariaLabel: (0, import_i18n7.__)("Clear sort", "elementor"),
707
+ key: "clear-sort",
708
+ onClear: clearSiteContentSort,
709
+ tooltipText: (0, import_i18n7.__)("Clear sort", "elementor")
710
+ }
711
+ )
712
+ ] : [],
713
+ icon: /* @__PURE__ */ React8.createElement(import_icons7.ArrowsSortIcon, { fontSize: "tiny" }),
714
+ onClose: popupState.close,
715
+ title: (0, import_i18n7.__)("Sort", "elementor")
716
+ }
717
+ ),
718
+ /* @__PURE__ */ React8.createElement(import_ui7.Divider, { sx: { borderWidth: "1px 0 0 0" } }),
719
+ /* @__PURE__ */ React8.createElement(import_editor_ui.PopoverBody, { height: "auto", width: SITE_CONTENT_SORT_POPOVER_WIDTH_PX }, /* @__PURE__ */ React8.createElement(ContentPanelSortList, null))
720
+ ));
721
+ }
722
+
723
+ // src/components/panel/content-panel-status-filter.tsx
724
+ var React10 = __toESM(require("react"));
725
+ var import_editor_ui2 = require("@elementor/editor-ui");
726
+ var import_icons9 = require("@elementor/icons");
727
+ var import_ui9 = require("@elementor/ui");
728
+ var import_i18n8 = require("@wordpress/i18n");
729
+
730
+ // src/components/panel/content-panel-status-filter-list.tsx
731
+ var React9 = __toESM(require("react"));
732
+ var import_icons8 = require("@elementor/icons");
733
+ var import_ui8 = require("@elementor/ui");
590
734
 
591
735
  // src/hooks/use-site-content-status-filter-counts.ts
592
736
  var import_query2 = require("@elementor/query");
@@ -628,7 +772,7 @@ function useSiteContentStatusFilterCounts(postTypes, enabled) {
628
772
  }
629
773
 
630
774
  // src/components/panel/content-panel-status-filter-list.tsx
631
- var renderFilterMenuItemContent = (label, selected) => /* @__PURE__ */ React7.createElement(import_ui6.Stack, { alignItems: "center", direction: "row", gap: 1, width: "100%" }, /* @__PURE__ */ React7.createElement(import_ui6.Typography, { sx: { color: "text.secondary", flex: 1 }, variant: "caption" }, label), selected ? /* @__PURE__ */ React7.createElement(import_icons6.CheckIcon, { "aria-hidden": true, fontSize: "tiny" }) : null);
775
+ var renderFilterMenuItemContent = (label, selected) => /* @__PURE__ */ React9.createElement(import_ui8.Stack, { alignItems: "center", direction: "row", gap: 1, width: "100%" }, /* @__PURE__ */ React9.createElement(import_ui8.Typography, { sx: { color: "text.secondary", flex: 1 }, variant: "caption" }, label), selected ? /* @__PURE__ */ React9.createElement(import_icons8.CheckIcon, { "aria-hidden": true, fontSize: "tiny" }) : null);
632
776
  function ContentPanelStatusFilterList({ loadCounts }) {
633
777
  const { clearStatusFilters, statusFilters, toggleStatusFilter } = useContentPanelCoordinator();
634
778
  const { accessiblePostTypes } = useAccessiblePanelPostTypes();
@@ -640,8 +784,8 @@ function ContentPanelStatusFilterList({ loadCounts }) {
640
784
  const visibleFilters = SITE_CONTENT_SELECTABLE_STATUS_FILTERS.filter(
641
785
  (filter) => shouldShowSiteContentStatusFilterRow(statusCounts?.[filter], isLoadingCounts, statusFilters[filter])
642
786
  );
643
- return /* @__PURE__ */ React7.createElement(import_ui6.MenuList, { dense: true }, /* @__PURE__ */ React7.createElement(
644
- import_ui6.MenuItem,
787
+ return /* @__PURE__ */ React9.createElement(import_ui8.MenuList, { dense: true }, /* @__PURE__ */ React9.createElement(
788
+ import_ui8.MenuItem,
645
789
  {
646
790
  "aria-checked": isAllSelected,
647
791
  onClick: clearStatusFilters,
@@ -651,8 +795,8 @@ function ContentPanelStatusFilterList({ loadCounts }) {
651
795
  renderFilterMenuItemContent(SITE_CONTENT_ALL_FILTER_LABEL, isAllSelected)
652
796
  ), visibleFilters.map((filter) => {
653
797
  const isSelected = statusFilters[filter];
654
- return /* @__PURE__ */ React7.createElement(
655
- import_ui6.MenuItem,
798
+ return /* @__PURE__ */ React9.createElement(
799
+ import_ui8.MenuItem,
656
800
  {
657
801
  key: filter,
658
802
  "aria-checked": isSelected,
@@ -668,23 +812,23 @@ function ContentPanelStatusFilterList({ loadCounts }) {
668
812
  // src/components/panel/content-panel-status-filter.tsx
669
813
  function ContentPanelStatusFilter() {
670
814
  const { clearStatusFilters, statusFilters } = useContentPanelCoordinator();
671
- const popupState = (0, import_ui7.usePopupState)({
815
+ const popupState = (0, import_ui9.usePopupState)({
672
816
  variant: "popover",
673
817
  disableAutoFocus: true
674
818
  });
675
819
  const hasActiveFilters = hasActiveSiteContentStatusFilters(statusFilters);
676
- return /* @__PURE__ */ React8.createElement(React8.Fragment, null, /* @__PURE__ */ React8.createElement(import_ui7.Tooltip, { placement: "top", title: (0, import_i18n6.__)("Filters", "elementor") }, /* @__PURE__ */ React8.createElement(
677
- import_ui7.ToggleButton,
820
+ return /* @__PURE__ */ React10.createElement(React10.Fragment, null, /* @__PURE__ */ React10.createElement(import_ui9.Tooltip, { placement: "top", title: (0, import_i18n8.__)("Filters", "elementor") }, /* @__PURE__ */ React10.createElement(
821
+ import_ui9.ToggleButton,
678
822
  {
679
- "aria-label": (0, import_i18n6.__)("Filters", "elementor"),
823
+ "aria-label": (0, import_i18n8.__)("Filters", "elementor"),
680
824
  selected: popupState.isOpen || hasActiveFilters,
681
825
  size: "tiny",
682
826
  value: "filter",
683
- ...(0, import_ui7.bindToggle)(popupState)
827
+ ...(0, import_ui9.bindToggle)(popupState)
684
828
  },
685
- /* @__PURE__ */ React8.createElement(import_icons7.FilterIcon, { fontSize: "tiny" })
686
- )), /* @__PURE__ */ React8.createElement(
687
- import_ui7.Popover,
829
+ /* @__PURE__ */ React10.createElement(import_icons9.FilterIcon, { fontSize: "tiny" })
830
+ )), /* @__PURE__ */ React10.createElement(
831
+ import_ui9.Popover,
688
832
  {
689
833
  anchorOrigin: {
690
834
  horizontal: "right",
@@ -697,43 +841,43 @@ function ContentPanelStatusFilter() {
697
841
  horizontal: -21,
698
842
  vertical: "top"
699
843
  },
700
- ...(0, import_ui7.bindPopover)(popupState)
844
+ ...(0, import_ui9.bindPopover)(popupState)
701
845
  },
702
- /* @__PURE__ */ React8.createElement(
703
- import_editor_ui.PopoverHeader,
846
+ /* @__PURE__ */ React10.createElement(
847
+ import_editor_ui2.PopoverHeader,
704
848
  {
705
849
  actions: hasActiveFilters ? [
706
- /* @__PURE__ */ React8.createElement(
850
+ /* @__PURE__ */ React10.createElement(
707
851
  ContentPanelClearFiltersButton,
708
852
  {
709
- ariaLabel: (0, import_i18n6.__)("Clear all", "elementor"),
853
+ ariaLabel: (0, import_i18n8.__)("Clear all", "elementor"),
710
854
  key: "clear-all-filters",
711
855
  onClear: clearStatusFilters,
712
- tooltipText: (0, import_i18n6.__)("Clear all", "elementor")
856
+ tooltipText: (0, import_i18n8.__)("Clear all", "elementor")
713
857
  }
714
858
  )
715
859
  ] : [],
716
- icon: /* @__PURE__ */ React8.createElement(import_icons7.FilterIcon, { fontSize: "tiny" }),
860
+ icon: /* @__PURE__ */ React10.createElement(import_icons9.FilterIcon, { fontSize: "tiny" }),
717
861
  onClose: popupState.close,
718
- title: (0, import_i18n6.__)("Filters", "elementor")
862
+ title: (0, import_i18n8.__)("Filters", "elementor")
719
863
  }
720
864
  ),
721
- /* @__PURE__ */ React8.createElement(import_ui7.Divider, { sx: { borderWidth: "1px 0 0 0" } }),
722
- /* @__PURE__ */ React8.createElement(import_editor_ui.PopoverBody, { height: "auto", width: SITE_CONTENT_FILTER_POPOVER_WIDTH_PX }, /* @__PURE__ */ React8.createElement(ContentPanelStatusFilterList, { loadCounts: popupState.isOpen }))
865
+ /* @__PURE__ */ React10.createElement(import_ui9.Divider, { sx: { borderWidth: "1px 0 0 0" } }),
866
+ /* @__PURE__ */ React10.createElement(import_editor_ui2.PopoverBody, { height: "auto", width: SITE_CONTENT_FILTER_POPOVER_WIDTH_PX }, /* @__PURE__ */ React10.createElement(ContentPanelStatusFilterList, { loadCounts: popupState.isOpen }))
723
867
  ));
724
868
  }
725
869
 
726
870
  // src/components/panel/content-panel-toolbar.tsx
727
871
  function ContentPanelToolbar() {
728
- return /* @__PURE__ */ React9.createElement(import_ui8.Box, { sx: contentPanelSearchBoxSx }, /* @__PURE__ */ React9.createElement(import_ui8.Stack, { gap: 0.75, width: "100%" }, /* @__PURE__ */ React9.createElement(import_ui8.Stack, { alignItems: "center", direction: "row", gap: 0.5, width: "100%" }, /* @__PURE__ */ React9.createElement(import_ui8.Box, { sx: { flexGrow: 1, minWidth: 0 } }, /* @__PURE__ */ React9.createElement(ContentPanelSearch, null)), /* @__PURE__ */ React9.createElement(ContentPanelStatusFilter, null)), /* @__PURE__ */ React9.createElement(ContentPanelActiveFilters, null)));
872
+ return /* @__PURE__ */ React11.createElement(import_ui10.Box, { sx: contentPanelSearchBoxSx }, /* @__PURE__ */ React11.createElement(import_ui10.Stack, { gap: 0.75, width: "100%" }, /* @__PURE__ */ React11.createElement(import_ui10.Stack, { alignItems: "center", direction: "row", gap: 0.5, width: "100%" }, /* @__PURE__ */ React11.createElement(import_ui10.Box, { sx: { flexGrow: 1, minWidth: 0 } }, /* @__PURE__ */ React11.createElement(ContentPanelSearch, null)), /* @__PURE__ */ React11.createElement(ContentPanelStatusFilter, null), /* @__PURE__ */ React11.createElement(ContentPanelSort, null)), /* @__PURE__ */ React11.createElement(ContentPanelActiveFilters, null)));
729
873
  }
730
874
 
731
875
  // src/components/panel/error-snackbar.tsx
732
- var React10 = __toESM(require("react"));
733
- var import_ui9 = require("@elementor/ui");
876
+ var React12 = __toESM(require("react"));
877
+ var import_ui11 = require("@elementor/ui");
734
878
  var ErrorSnackbar = ({ open, onClose }) => {
735
- return /* @__PURE__ */ React10.createElement(
736
- import_ui9.Snackbar,
879
+ return /* @__PURE__ */ React12.createElement(
880
+ import_ui11.Snackbar,
737
881
  {
738
882
  open,
739
883
  onClose,
@@ -742,8 +886,8 @@ var ErrorSnackbar = ({ open, onClose }) => {
742
886
  horizontal: "left"
743
887
  }
744
888
  },
745
- /* @__PURE__ */ React10.createElement(import_ui9.Alert, { onClose, severity: "error", sx: { width: "100%" } }, /* @__PURE__ */ React10.createElement(
746
- import_ui9.Typography,
889
+ /* @__PURE__ */ React12.createElement(import_ui11.Alert, { onClose, severity: "error", sx: { width: "100%" } }, /* @__PURE__ */ React12.createElement(
890
+ import_ui11.Typography,
747
891
  {
748
892
  component: "span",
749
893
  sx: {
@@ -757,11 +901,11 @@ var ErrorSnackbar = ({ open, onClose }) => {
757
901
  var error_snackbar_default = ErrorSnackbar;
758
902
 
759
903
  // src/components/panel/shell-panel-body-content.tsx
760
- var React33 = __toESM(require("react"));
761
- var import_ui22 = require("@elementor/ui");
904
+ var React35 = __toESM(require("react"));
905
+ var import_ui24 = require("@elementor/ui");
762
906
 
763
907
  // src/contexts/post-list-context.tsx
764
- var React11 = __toESM(require("react"));
908
+ var React13 = __toESM(require("react"));
765
909
  var import_react3 = require("react");
766
910
  var defaultValues = {
767
911
  type: "page",
@@ -780,7 +924,7 @@ var PostListContextProvider = ({
780
924
  const resetEditMode = () => {
781
925
  setEditMode(defaultValues.editMode);
782
926
  };
783
- return /* @__PURE__ */ React11.createElement(
927
+ return /* @__PURE__ */ React13.createElement(
784
928
  PostListContext.Provider,
785
929
  {
786
930
  value: {
@@ -803,10 +947,10 @@ function usePostListContext() {
803
947
  }
804
948
 
805
949
  // src/components/panel/posts-list/posts-collapsible-list.tsx
806
- var React31 = __toESM(require("react"));
950
+ var React33 = __toESM(require("react"));
807
951
  var import_react10 = require("react");
808
- var import_ui20 = require("@elementor/ui");
809
- var import_i18n22 = require("@wordpress/i18n");
952
+ var import_ui22 = require("@elementor/ui");
953
+ var import_i18n24 = require("@wordpress/i18n");
810
954
 
811
955
  // src/hooks/use-homepage.ts
812
956
  var import_query3 = require("@elementor/query");
@@ -902,27 +1046,30 @@ function usePostListPagination({
902
1046
  // src/hooks/use-posts.ts
903
1047
  var import_query4 = require("@elementor/query");
904
1048
  var postsQueryKeyBase = (postTypeSlug) => ["site-navigation", "posts", postTypeSlug];
905
- var postsQueryKey = (postTypeSlug, trimmedSearch = "", restStatus = "any") => [
906
- ...postsQueryKeyBase(postTypeSlug),
907
- restStatus,
908
- trimmedSearch
909
- ];
1049
+ var postsQueryKey = (postTypeSlug, trimmedSearch = "", restStatus = "any", sort = DEFAULT_SITE_CONTENT_SORT) => [...postsQueryKeyBase(postTypeSlug), restStatus, trimmedSearch, sort];
910
1050
  var flattenData = (data) => {
911
1051
  if (!data) {
912
1052
  return data;
913
1053
  }
914
1054
  const flattened = [];
1055
+ const seenIds = /* @__PURE__ */ new Set();
915
1056
  data.pages.forEach((page) => {
916
- flattened.push(...page.data);
1057
+ page.data.forEach((post) => {
1058
+ if (seenIds.has(post.id)) {
1059
+ return;
1060
+ }
1061
+ seenIds.add(post.id);
1062
+ flattened.push(post);
1063
+ });
917
1064
  });
918
1065
  return flattened;
919
1066
  };
920
- function usePosts(postTypeSlug, search = "", statusFilters = EMPTY_SITE_CONTENT_STATUS_FILTERS) {
1067
+ function usePosts(postTypeSlug, search = "", statusFilters = EMPTY_SITE_CONTENT_STATUS_FILTERS, sort = DEFAULT_SITE_CONTENT_SORT) {
921
1068
  const trimmedSearch = search.trim();
922
1069
  const restStatus = getRestStatusForSiteContentFilters(statusFilters);
923
1070
  const query = (0, import_query4.useInfiniteQuery)({
924
- queryKey: postsQueryKey(postTypeSlug, trimmedSearch, restStatus),
925
- queryFn: ({ pageParam = 1 }) => getRequest(postTypeSlug, pageParam, trimmedSearch, restStatus),
1071
+ queryKey: postsQueryKey(postTypeSlug, trimmedSearch, restStatus, sort),
1072
+ queryFn: ({ pageParam = 1 }) => getRequest(postTypeSlug, pageParam, trimmedSearch, restStatus, POST_PER_PAGE, sort),
926
1073
  initialPageParam: 1,
927
1074
  getNextPageParam: (lastPage) => {
928
1075
  return lastPage.currentPage < lastPage.totalPages ? lastPage.currentPage + 1 : void 0;
@@ -952,18 +1099,18 @@ function usePostsBaselineTotal(postTypeSlug, enabled, status = "any") {
952
1099
  }
953
1100
 
954
1101
  // src/components/panel/section-add-button.tsx
955
- var React12 = __toESM(require("react"));
956
- var import_i18n7 = require("@wordpress/i18n");
1102
+ var React14 = __toESM(require("react"));
1103
+ var import_i18n9 = require("@wordpress/i18n");
957
1104
  function SectionAddButton({ onBeforeCreate }) {
958
1105
  const { type, setEditMode } = usePostListContext();
959
1106
  const canCreate = useCanCreate(type);
960
1107
  const singularName = postTypesMap[type].labels.singular_name;
961
- const ariaLabel = (0, import_i18n7.sprintf)(
1108
+ const ariaLabel = (0, import_i18n9.sprintf)(
962
1109
  /* translators: %s: Post type singular name (e.g. Page, Post). */
963
- (0, import_i18n7.__)("New %s", "elementor"),
1110
+ (0, import_i18n9.__)("New %s", "elementor"),
964
1111
  singularName
965
1112
  );
966
- return /* @__PURE__ */ React12.createElement(
1113
+ return /* @__PURE__ */ React14.createElement(
967
1114
  ContentPanelAddIconButton,
968
1115
  {
969
1116
  "aria-label": ariaLabel,
@@ -978,10 +1125,10 @@ function SectionAddButton({ onBeforeCreate }) {
978
1125
  }
979
1126
 
980
1127
  // src/components/panel/posts-list/collapsible-list.tsx
981
- var React13 = __toESM(require("react"));
1128
+ var React15 = __toESM(require("react"));
982
1129
  var import_react5 = require("react");
983
- var import_editor_ui2 = require("@elementor/editor-ui");
984
- var import_ui10 = require("@elementor/ui");
1130
+ var import_editor_ui3 = require("@elementor/editor-ui");
1131
+ var import_ui12 = require("@elementor/ui");
985
1132
  var sectionHeaderListItemButtonSx = {
986
1133
  flexGrow: 1,
987
1134
  justifyContent: "flex-start",
@@ -1010,8 +1157,8 @@ function CollapsibleList({
1010
1157
  const chipLabel = countChipLabel ?? count.toString();
1011
1158
  const sectionHeaderAriaLabel = getSectionHeaderAriaLabel(title, chipLabel);
1012
1159
  const handleClick = () => onOpenChange(!isOpen);
1013
- return /* @__PURE__ */ React13.createElement(React13.Fragment, null, /* @__PURE__ */ React13.createElement(
1014
- import_ui10.Box,
1160
+ return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(
1161
+ import_ui12.Box,
1015
1162
  {
1016
1163
  sx: {
1017
1164
  ...contentPanelSectionHeaderSx,
@@ -1021,8 +1168,8 @@ function CollapsibleList({
1021
1168
  width: "100%"
1022
1169
  }
1023
1170
  },
1024
- /* @__PURE__ */ React13.createElement(
1025
- import_ui10.ListItemButton,
1171
+ /* @__PURE__ */ React15.createElement(
1172
+ import_ui12.ListItemButton,
1026
1173
  {
1027
1174
  ref: headerRef,
1028
1175
  id: labelId,
@@ -1035,8 +1182,8 @@ function CollapsibleList({
1035
1182
  onClick: handleClick,
1036
1183
  sx: sectionHeaderListItemButtonSx
1037
1184
  },
1038
- /* @__PURE__ */ React13.createElement(import_ui10.Stack, { alignItems: "center", direction: "row", flexGrow: 1, gap: 0.5, minWidth: 0, width: "100%" }, /* @__PURE__ */ React13.createElement(import_ui10.Stack, { alignItems: "center", direction: "row", flex: 1, gap: 0.5, minWidth: 0 }, /* @__PURE__ */ React13.createElement(
1039
- import_ui10.ListItemText,
1185
+ /* @__PURE__ */ React15.createElement(import_ui12.Stack, { alignItems: "center", direction: "row", flexGrow: 1, gap: 0.5, minWidth: 0, width: "100%" }, /* @__PURE__ */ React15.createElement(import_ui12.Stack, { alignItems: "center", direction: "row", flex: 1, gap: 0.5, minWidth: 0 }, /* @__PURE__ */ React15.createElement(
1186
+ import_ui12.ListItemText,
1040
1187
  {
1041
1188
  secondary: title,
1042
1189
  secondaryTypographyProps: {
@@ -1046,10 +1193,10 @@ function CollapsibleList({
1046
1193
  },
1047
1194
  sx: { flexGrow: 0, flexShrink: 1, marginInlineEnd: 1 }
1048
1195
  }
1049
- ), /* @__PURE__ */ React13.createElement(import_ui10.Chip, { label: chipLabel, size: "tiny" })), /* @__PURE__ */ React13.createElement(import_editor_ui2.CollapseIcon, { color: "secondary", fontSize: "tiny", open: isOpen, sx: { flexShrink: 0 } }))
1196
+ ), /* @__PURE__ */ React15.createElement(import_ui12.Chip, { label: chipLabel, size: "tiny" })), /* @__PURE__ */ React15.createElement(import_editor_ui3.CollapseIcon, { color: "secondary", fontSize: "tiny", open: isOpen, sx: { flexShrink: 0 } }))
1050
1197
  ),
1051
- trailingActions && /* @__PURE__ */ React13.createElement(
1052
- import_ui10.Stack,
1198
+ trailingActions && /* @__PURE__ */ React15.createElement(
1199
+ import_ui12.Stack,
1053
1200
  {
1054
1201
  alignItems: "center",
1055
1202
  direction: "row",
@@ -1059,17 +1206,17 @@ function CollapsibleList({
1059
1206
  },
1060
1207
  trailingActions
1061
1208
  )
1062
- ), /* @__PURE__ */ React13.createElement(import_ui10.Collapse, { "aria-labelledby": labelId, id: contentId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React13.createElement(import_ui10.List, { dense: true, disablePadding: true, sx: contentPanelListSectionListSx }, children)), /* @__PURE__ */ React13.createElement(import_ui10.Divider, null));
1209
+ ), /* @__PURE__ */ React15.createElement(import_ui12.Collapse, { "aria-labelledby": labelId, id: contentId, in: isOpen, timeout: "auto", unmountOnExit: true }, /* @__PURE__ */ React15.createElement(import_ui12.List, { dense: true, disablePadding: true, sx: contentPanelListSectionListSx }, children)), /* @__PURE__ */ React15.createElement(import_ui12.Divider, null));
1063
1210
  }
1064
1211
 
1065
1212
  // src/components/panel/posts-list/error-state.tsx
1066
- var React14 = __toESM(require("react"));
1067
- var import_icons8 = require("@elementor/icons");
1068
- var import_ui11 = require("@elementor/ui");
1069
- var import_i18n8 = require("@wordpress/i18n");
1213
+ var React16 = __toESM(require("react"));
1214
+ var import_icons10 = require("@elementor/icons");
1215
+ var import_ui13 = require("@elementor/ui");
1216
+ var import_i18n10 = require("@wordpress/i18n");
1070
1217
  function ErrorState() {
1071
- return /* @__PURE__ */ React14.createElement(
1072
- import_ui11.Box,
1218
+ return /* @__PURE__ */ React16.createElement(
1219
+ import_ui13.Box,
1073
1220
  {
1074
1221
  sx: {
1075
1222
  display: "flex",
@@ -1080,9 +1227,9 @@ function ErrorState() {
1080
1227
  gap: "16px"
1081
1228
  }
1082
1229
  },
1083
- /* @__PURE__ */ React14.createElement(import_icons8.Error404TemplateIcon, null),
1084
- /* @__PURE__ */ React14.createElement(
1085
- import_ui11.Box,
1230
+ /* @__PURE__ */ React16.createElement(import_icons10.Error404TemplateIcon, null),
1231
+ /* @__PURE__ */ React16.createElement(
1232
+ import_ui13.Box,
1086
1233
  {
1087
1234
  sx: {
1088
1235
  display: "flex",
@@ -1092,19 +1239,19 @@ function ErrorState() {
1092
1239
  gap: "8px"
1093
1240
  }
1094
1241
  },
1095
- /* @__PURE__ */ React14.createElement(import_ui11.Typography, { variant: "body1", color: "text.primary" }, (0, import_i18n8.__)("We couldn\u2019t display your pages.", "elementor")),
1096
- /* @__PURE__ */ React14.createElement(import_ui11.Box, null, /* @__PURE__ */ React14.createElement(import_ui11.Typography, { variant: "body2", color: "text.primary", sx: { textAlign: "center" } }, (0, import_i18n8.__)("It\u2019s probably a temporary issue.", "elementor")), /* @__PURE__ */ React14.createElement(import_ui11.Typography, { variant: "body2", color: "text.primary", sx: { textAlign: "center" } }, (0, import_i18n8.__)("If the problem persists,", "elementor"), " ", /* @__PURE__ */ React14.createElement(import_ui11.Link, { target: "_blank", href: "https://go.elementor.com/wp-editor-support-open-ticket/" }, "Notify support")))
1242
+ /* @__PURE__ */ React16.createElement(import_ui13.Typography, { variant: "body1", color: "text.primary" }, (0, import_i18n10.__)("We couldn\u2019t display your pages.", "elementor")),
1243
+ /* @__PURE__ */ React16.createElement(import_ui13.Box, null, /* @__PURE__ */ React16.createElement(import_ui13.Typography, { variant: "body2", color: "text.primary", sx: { textAlign: "center" } }, (0, import_i18n10.__)("It\u2019s probably a temporary issue.", "elementor")), /* @__PURE__ */ React16.createElement(import_ui13.Typography, { variant: "body2", color: "text.primary", sx: { textAlign: "center" } }, (0, import_i18n10.__)("If the problem persists,", "elementor"), " ", /* @__PURE__ */ React16.createElement(import_ui13.Link, { target: "_blank", href: "https://go.elementor.com/wp-editor-support-open-ticket/" }, "Notify support")))
1097
1244
  )
1098
1245
  );
1099
1246
  }
1100
1247
 
1101
1248
  // src/components/panel/posts-list/post-list-item.tsx
1102
- var React29 = __toESM(require("react"));
1249
+ var React31 = __toESM(require("react"));
1103
1250
 
1104
1251
  // src/components/panel/posts-list/list-items/list-item-create.tsx
1105
- var React16 = __toESM(require("react"));
1252
+ var React18 = __toESM(require("react"));
1106
1253
  var import_editor_documents = require("@elementor/editor-documents");
1107
- var import_i18n10 = require("@wordpress/i18n");
1254
+ var import_i18n12 = require("@wordpress/i18n");
1108
1255
 
1109
1256
  // src/hooks/use-posts-actions.ts
1110
1257
  var import_query7 = require("@elementor/query");
@@ -1185,11 +1332,11 @@ function useInvalidatePosts(postTypeSlug) {
1185
1332
  }
1186
1333
 
1187
1334
  // src/components/panel/posts-list/list-items/edit-mode-template.tsx
1188
- var React15 = __toESM(require("react"));
1335
+ var React17 = __toESM(require("react"));
1189
1336
  var import_react6 = require("react");
1190
- var import_icons9 = require("@elementor/icons");
1191
- var import_ui12 = require("@elementor/ui");
1192
- var import_i18n9 = require("@wordpress/i18n");
1337
+ var import_icons11 = require("@elementor/icons");
1338
+ var import_ui14 = require("@elementor/ui");
1339
+ var import_i18n11 = require("@wordpress/i18n");
1193
1340
  var EDIT_ROW_FOCUS_BORDER_WIDTH_PX = 2;
1194
1341
  var EDIT_ROW_MIN_HEIGHT_PX = 36;
1195
1342
  var editModeListItemButtonSx = {
@@ -1261,32 +1408,32 @@ function EditModeTemplate({ postTitle, isLoading, callback }) {
1261
1408
  }
1262
1409
  const value = e.target.value;
1263
1410
  if (!validateInput(value)) {
1264
- setInputError((0, import_i18n9.__)("Name is required", "elementor"));
1411
+ setInputError((0, import_i18n11.__)("Name is required", "elementor"));
1265
1412
  } else {
1266
1413
  setInputError(null);
1267
1414
  }
1268
1415
  setTitle(value);
1269
1416
  };
1270
- return /* @__PURE__ */ React15.createElement(React15.Fragment, null, /* @__PURE__ */ React15.createElement(
1271
- import_ui12.ListItem,
1417
+ return /* @__PURE__ */ React17.createElement(React17.Fragment, null, /* @__PURE__ */ React17.createElement(
1418
+ import_ui14.ListItem,
1272
1419
  {
1273
1420
  disablePadding: true,
1274
1421
  sx: contentPanelListRowPaddingSx,
1275
- secondaryAction: /* @__PURE__ */ React15.createElement(CloseButton, { isLoading, closeButton })
1422
+ secondaryAction: /* @__PURE__ */ React17.createElement(CloseButton, { isLoading, closeButton })
1276
1423
  },
1277
- /* @__PURE__ */ React15.createElement(
1278
- import_ui12.Box,
1424
+ /* @__PURE__ */ React17.createElement(
1425
+ import_ui14.Box,
1279
1426
  {
1280
1427
  component: "form",
1281
1428
  onSubmit: onFormSubmit,
1282
1429
  sx: { ...editModeListItemButtonSx, display: "flex", width: "100%" }
1283
1430
  },
1284
- /* @__PURE__ */ React15.createElement(import_ui12.Box, { sx: editRowIndicatorSx(!!inputError) }, /* @__PURE__ */ React15.createElement(
1285
- import_ui12.Box,
1431
+ /* @__PURE__ */ React17.createElement(import_ui14.Box, { sx: editRowIndicatorSx(!!inputError) }, /* @__PURE__ */ React17.createElement(
1432
+ import_ui14.Box,
1286
1433
  {
1287
1434
  autoFocus: true,
1288
1435
  "aria-invalid": !!inputError,
1289
- "aria-label": (0, import_i18n9.__)("Name", "elementor"),
1436
+ "aria-label": (0, import_i18n11.__)("Name", "elementor"),
1290
1437
  component: "input",
1291
1438
  disabled: isLoading,
1292
1439
  onBlur,
@@ -1297,11 +1444,11 @@ function EditModeTemplate({ postTitle, isLoading, callback }) {
1297
1444
  }
1298
1445
  ))
1299
1446
  )
1300
- ), inputError && /* @__PURE__ */ React15.createElement(import_ui12.ListItem, { disablePadding: true, sx: contentPanelListRowPaddingSx }, /* @__PURE__ */ React15.createElement(import_ui12.ListItemText, { sx: { color: "error.main", ...contentPanelListRowTitleSx } }, inputError)));
1447
+ ), inputError && /* @__PURE__ */ React17.createElement(import_ui14.ListItem, { disablePadding: true, sx: contentPanelListRowPaddingSx }, /* @__PURE__ */ React17.createElement(import_ui14.ListItemText, { sx: { color: "error.main", ...contentPanelListRowTitleSx } }, inputError)));
1301
1448
  }
1302
1449
  function CloseButton({ isLoading, closeButton }) {
1303
1450
  const { resetEditMode } = usePostListContext();
1304
- return /* @__PURE__ */ React15.createElement(import_ui12.IconButton, { size: "tiny", color: "secondary", onClick: resetEditMode, ref: closeButton, disabled: isLoading }, isLoading ? /* @__PURE__ */ React15.createElement(import_ui12.CircularProgress, { size: "1rem" }) : /* @__PURE__ */ React15.createElement(import_icons9.XIcon, { fontSize: "tiny" }));
1451
+ return /* @__PURE__ */ React17.createElement(import_ui14.IconButton, { size: "tiny", color: "secondary", onClick: resetEditMode, ref: closeButton, disabled: isLoading }, isLoading ? /* @__PURE__ */ React17.createElement(import_ui14.CircularProgress, { size: "1rem" }) : /* @__PURE__ */ React17.createElement(import_icons11.XIcon, { fontSize: "tiny" }));
1305
1452
  }
1306
1453
 
1307
1454
  // src/components/panel/posts-list/list-items/list-item-create.tsx
@@ -1323,12 +1470,12 @@ function ListItemCreate() {
1323
1470
  resetEditMode();
1324
1471
  }
1325
1472
  };
1326
- const newItemLabel = (0, import_i18n10.sprintf)(
1473
+ const newItemLabel = (0, import_i18n12.sprintf)(
1327
1474
  /* translators: %s: Post type singular name (e.g. Page, Post). */
1328
- (0, import_i18n10.__)("New %s", "elementor"),
1475
+ (0, import_i18n12.__)("New %s", "elementor"),
1329
1476
  postTypesMap[type].labels.singular_name
1330
1477
  );
1331
- return /* @__PURE__ */ React16.createElement(
1478
+ return /* @__PURE__ */ React18.createElement(
1332
1479
  EditModeTemplate,
1333
1480
  {
1334
1481
  postTitle: newItemLabel,
@@ -1339,9 +1486,9 @@ function ListItemCreate() {
1339
1486
  }
1340
1487
 
1341
1488
  // src/components/panel/posts-list/list-items/list-item-duplicate.tsx
1342
- var React17 = __toESM(require("react"));
1489
+ var React19 = __toESM(require("react"));
1343
1490
  var import_editor_documents2 = require("@elementor/editor-documents");
1344
- var import_i18n11 = require("@wordpress/i18n");
1491
+ var import_i18n13 = require("@wordpress/i18n");
1345
1492
  function ListItemDuplicate() {
1346
1493
  const { type, editMode, resetEditMode } = usePostListContext();
1347
1494
  const navigateToDocument = (0, import_editor_documents2.__useNavigateToDocument)();
@@ -1363,10 +1510,10 @@ function ListItemDuplicate() {
1363
1510
  resetEditMode();
1364
1511
  }
1365
1512
  };
1366
- return /* @__PURE__ */ React17.createElement(
1513
+ return /* @__PURE__ */ React19.createElement(
1367
1514
  EditModeTemplate,
1368
1515
  {
1369
- postTitle: `${editMode.details.title} ${(0, import_i18n11.__)("copy", "elementor")}`,
1516
+ postTitle: `${editMode.details.title} ${(0, import_i18n13.__)("copy", "elementor")}`,
1370
1517
  isLoading: duplicatePost.isPending,
1371
1518
  callback: duplicatePostCallback
1372
1519
  }
@@ -1374,7 +1521,7 @@ function ListItemDuplicate() {
1374
1521
  }
1375
1522
 
1376
1523
  // src/components/panel/posts-list/list-items/list-item-rename.tsx
1377
- var React18 = __toESM(require("react"));
1524
+ var React20 = __toESM(require("react"));
1378
1525
  var import_editor_documents3 = require("@elementor/editor-documents");
1379
1526
 
1380
1527
  // src/hooks/use-rename-active-document.ts
@@ -1425,20 +1572,20 @@ function ListItemRename({ post }) {
1425
1572
  resetEditMode();
1426
1573
  }
1427
1574
  };
1428
- return /* @__PURE__ */ React18.createElement(EditModeTemplate, { postTitle: title, isLoading: updatePost.isPending, callback: renamePostCallback });
1575
+ return /* @__PURE__ */ React20.createElement(EditModeTemplate, { postTitle: title, isLoading: updatePost.isPending, callback: renamePostCallback });
1429
1576
  }
1430
1577
 
1431
1578
  // src/components/panel/posts-list/list-items/list-item-view.tsx
1432
- var React28 = __toESM(require("react"));
1579
+ var React30 = __toESM(require("react"));
1433
1580
  var import_editor_documents5 = require("@elementor/editor-documents");
1434
- var import_icons17 = require("@elementor/icons");
1435
- var import_ui18 = require("@elementor/ui");
1436
- var import_i18n20 = require("@wordpress/i18n");
1581
+ var import_icons19 = require("@elementor/icons");
1582
+ var import_ui20 = require("@elementor/ui");
1583
+ var import_i18n22 = require("@wordpress/i18n");
1437
1584
 
1438
1585
  // src/components/shared/page-title-and-status.tsx
1439
- var React19 = __toESM(require("react"));
1440
- var import_ui13 = require("@elementor/ui");
1441
- var import_i18n12 = require("@wordpress/i18n");
1586
+ var React21 = __toESM(require("react"));
1587
+ var import_ui15 = require("@elementor/ui");
1588
+ var import_i18n14 = require("@wordpress/i18n");
1442
1589
 
1443
1590
  // src/hooks/use-reverse-html-entities.ts
1444
1591
  var import_react7 = require("react");
@@ -1465,19 +1612,19 @@ function humanizeStatusSlug(status) {
1465
1612
  var statusChipConfig = {
1466
1613
  draft: {
1467
1614
  color: "default",
1468
- label: (0, import_i18n12.__)("Draft", "elementor")
1615
+ label: (0, import_i18n14.__)("Draft", "elementor")
1469
1616
  },
1470
1617
  future: {
1471
1618
  color: "default",
1472
- label: (0, import_i18n12.__)("Scheduled", "elementor")
1619
+ label: (0, import_i18n14.__)("Scheduled", "elementor")
1473
1620
  },
1474
1621
  pending: {
1475
1622
  color: "warning",
1476
- label: (0, import_i18n12.__)("Pending Review", "elementor")
1623
+ label: (0, import_i18n14.__)("Pending Review", "elementor")
1477
1624
  },
1478
1625
  private: {
1479
1626
  color: "default",
1480
- label: (0, import_i18n12.__)("Private", "elementor")
1627
+ label: (0, import_i18n14.__)("Private", "elementor")
1481
1628
  }
1482
1629
  };
1483
1630
  function getStatusChipConfig(status) {
@@ -1499,8 +1646,8 @@ var PageStatus = ({ status }) => {
1499
1646
  }
1500
1647
  const { color, label } = getStatusChipConfig(status);
1501
1648
  const isKnownStatus = isKnownPanelStatus(status);
1502
- return /* @__PURE__ */ React19.createElement(
1503
- import_ui13.Chip,
1649
+ return /* @__PURE__ */ React21.createElement(
1650
+ import_ui15.Chip,
1504
1651
  {
1505
1652
  color,
1506
1653
  component: "span",
@@ -1524,8 +1671,8 @@ var PageStatus = ({ status }) => {
1524
1671
  };
1525
1672
  var PageTitle = ({ title }) => {
1526
1673
  const modifiedTitle = useReverseHtmlEntities(title);
1527
- return /* @__PURE__ */ React19.createElement(
1528
- import_ui13.Typography,
1674
+ return /* @__PURE__ */ React21.createElement(
1675
+ import_ui15.Typography,
1529
1676
  {
1530
1677
  component: "span",
1531
1678
  variant: "body2",
@@ -1542,30 +1689,30 @@ var PageTitle = ({ title }) => {
1542
1689
  );
1543
1690
  };
1544
1691
  function PageTitleAndStatus({ title, status }) {
1545
- return /* @__PURE__ */ React19.createElement(import_ui13.Box, { alignItems: "center", display: "flex", minWidth: 0 }, /* @__PURE__ */ React19.createElement(PageTitle, { title }), /* @__PURE__ */ React19.createElement(PageStatus, { status }));
1692
+ return /* @__PURE__ */ React21.createElement(import_ui15.Box, { alignItems: "center", display: "flex", minWidth: 0 }, /* @__PURE__ */ React21.createElement(PageTitle, { title }), /* @__PURE__ */ React21.createElement(PageStatus, { status }));
1546
1693
  }
1547
1694
 
1548
1695
  // src/components/panel/actions-menu/actions/delete.tsx
1549
- var React21 = __toESM(require("react"));
1696
+ var React23 = __toESM(require("react"));
1550
1697
  var import_react8 = require("react");
1551
1698
  var import_editor_documents4 = require("@elementor/editor-documents");
1552
- var import_icons10 = require("@elementor/icons");
1553
- var import_ui15 = require("@elementor/ui");
1554
- var import_i18n13 = require("@wordpress/i18n");
1699
+ var import_icons12 = require("@elementor/icons");
1700
+ var import_ui17 = require("@elementor/ui");
1701
+ var import_i18n15 = require("@wordpress/i18n");
1555
1702
 
1556
1703
  // src/components/panel/actions-menu/action-menu-item.tsx
1557
- var React20 = __toESM(require("react"));
1558
- var import_ui14 = require("@elementor/ui");
1704
+ var React22 = __toESM(require("react"));
1705
+ var import_ui16 = require("@elementor/ui");
1559
1706
  function ActionMenuItem({ description, icon: Icon, MenuItemProps, title }) {
1560
- return /* @__PURE__ */ React20.createElement(import_ui14.MenuItem, { ...MenuItemProps }, /* @__PURE__ */ React20.createElement(
1561
- import_ui14.ListItemIcon,
1707
+ return /* @__PURE__ */ React22.createElement(import_ui16.MenuItem, { ...MenuItemProps }, /* @__PURE__ */ React22.createElement(
1708
+ import_ui16.ListItemIcon,
1562
1709
  {
1563
1710
  sx: {
1564
1711
  color: "inherit"
1565
1712
  }
1566
1713
  },
1567
- /* @__PURE__ */ React20.createElement(Icon, null)
1568
- ), /* @__PURE__ */ React20.createElement(import_ui14.ListItemText, { primary: title, secondary: description }));
1714
+ /* @__PURE__ */ React22.createElement(Icon, null)
1715
+ ), /* @__PURE__ */ React22.createElement(import_ui16.ListItemText, { primary: title, secondary: description }));
1569
1716
  }
1570
1717
 
1571
1718
  // src/components/panel/actions-menu/actions/delete.tsx
@@ -1575,18 +1722,18 @@ function Delete({ post }) {
1575
1722
  const isPostActive = activeDocument?.id === post.id;
1576
1723
  const userCanDelete = post.user_can.delete;
1577
1724
  const isDisabled = !userCanDelete || post.isHome || isPostActive;
1578
- return /* @__PURE__ */ React21.createElement(React21.Fragment, null, /* @__PURE__ */ React21.createElement(
1725
+ return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(
1579
1726
  ActionMenuItem,
1580
1727
  {
1581
- title: (0, import_i18n13.__)("Delete", "elementor"),
1582
- icon: import_icons10.TrashIcon,
1728
+ title: (0, import_i18n15.__)("Delete", "elementor"),
1729
+ icon: import_icons12.TrashIcon,
1583
1730
  MenuItemProps: {
1584
1731
  disabled: isDisabled,
1585
1732
  onClick: () => setIsDialogOpen(true),
1586
1733
  sx: { "&:hover": { color: "error.main" } }
1587
1734
  }
1588
1735
  }
1589
- ), isDialogOpen && /* @__PURE__ */ React21.createElement(DeleteDialog, { post, setIsDialogOpen }));
1736
+ ), isDialogOpen && /* @__PURE__ */ React23.createElement(DeleteDialog, { post, setIsDialogOpen }));
1590
1737
  }
1591
1738
  function DeleteDialog({
1592
1739
  post,
@@ -1595,11 +1742,11 @@ function DeleteDialog({
1595
1742
  const { type } = usePostListContext();
1596
1743
  const { deletePost } = usePostActions(type);
1597
1744
  const { setError } = usePostListContext();
1598
- const dialogTitle = (0, import_i18n13.sprintf)((0, import_i18n13.__)('Delete "%s"?', "elementor"), post.title.rendered);
1599
- const dialogBody = type === "post" ? (0, import_i18n13.__)(
1745
+ const dialogTitle = (0, import_i18n15.sprintf)((0, import_i18n15.__)('Delete "%s"?', "elementor"), post.title.rendered);
1746
+ const dialogBody = type === "post" ? (0, import_i18n15.__)(
1600
1747
  "The post and its content will be deleted forever and we won\u2019t be able to recover them.",
1601
1748
  "elementor"
1602
- ) : (0, import_i18n13.__)(
1749
+ ) : (0, import_i18n15.__)(
1603
1750
  "The page and its content will be deleted forever and we won\u2019t be able to recover them.",
1604
1751
  "elementor"
1605
1752
  );
@@ -1617,22 +1764,22 @@ function DeleteDialog({
1617
1764
  }
1618
1765
  setIsDialogOpen(false);
1619
1766
  };
1620
- return /* @__PURE__ */ React21.createElement(import_ui15.Dialog, { open: true, onClose: handleCancel, "aria-labelledby": "delete-dialog" }, /* @__PURE__ */ React21.createElement(import_ui15.DialogTitle, { noWrap: true }, dialogTitle), /* @__PURE__ */ React21.createElement(import_ui15.Divider, null), /* @__PURE__ */ React21.createElement(import_ui15.DialogContent, null, /* @__PURE__ */ React21.createElement(import_ui15.DialogContentText, null, dialogBody)), /* @__PURE__ */ React21.createElement(import_ui15.DialogActions, null, /* @__PURE__ */ React21.createElement(
1621
- import_ui15.Button,
1767
+ return /* @__PURE__ */ React23.createElement(import_ui17.Dialog, { open: true, onClose: handleCancel, "aria-labelledby": "delete-dialog" }, /* @__PURE__ */ React23.createElement(import_ui17.DialogTitle, { noWrap: true }, dialogTitle), /* @__PURE__ */ React23.createElement(import_ui17.Divider, null), /* @__PURE__ */ React23.createElement(import_ui17.DialogContent, null, /* @__PURE__ */ React23.createElement(import_ui17.DialogContentText, null, dialogBody)), /* @__PURE__ */ React23.createElement(import_ui17.DialogActions, null, /* @__PURE__ */ React23.createElement(
1768
+ import_ui17.Button,
1622
1769
  {
1623
1770
  variant: "contained",
1624
1771
  color: "secondary",
1625
1772
  onClick: handleCancel,
1626
1773
  disabled: deletePost.isPending
1627
1774
  },
1628
- (0, import_i18n13.__)("Cancel", "elementor")
1629
- ), /* @__PURE__ */ React21.createElement(import_ui15.Button, { variant: "contained", color: "error", onClick: deletePage, disabled: deletePost.isPending }, !deletePost.isPending ? (0, import_i18n13.__)("Delete", "elementor") : /* @__PURE__ */ React21.createElement(import_ui15.CircularProgress, null))));
1775
+ (0, import_i18n15.__)("Cancel", "elementor")
1776
+ ), /* @__PURE__ */ React23.createElement(import_ui17.Button, { variant: "contained", color: "error", onClick: deletePage, disabled: deletePost.isPending }, !deletePost.isPending ? (0, import_i18n15.__)("Delete", "elementor") : /* @__PURE__ */ React23.createElement(import_ui17.CircularProgress, null))));
1630
1777
  }
1631
1778
 
1632
1779
  // src/components/panel/actions-menu/actions/duplicate.tsx
1633
- var React22 = __toESM(require("react"));
1634
- var import_icons11 = require("@elementor/icons");
1635
- var import_i18n14 = require("@wordpress/i18n");
1780
+ var React24 = __toESM(require("react"));
1781
+ var import_icons13 = require("@elementor/icons");
1782
+ var import_i18n16 = require("@wordpress/i18n");
1636
1783
  function Duplicate({ post, popupState }) {
1637
1784
  const { setEditMode, type } = usePostListContext();
1638
1785
  const canCreate = useCanCreate(type);
@@ -1647,11 +1794,11 @@ function Duplicate({ post, popupState }) {
1647
1794
  });
1648
1795
  };
1649
1796
  const isDisabled = !canCreate;
1650
- return /* @__PURE__ */ React22.createElement(
1797
+ return /* @__PURE__ */ React24.createElement(
1651
1798
  ActionMenuItem,
1652
1799
  {
1653
- title: (0, import_i18n14.__)("Duplicate", "elementor"),
1654
- icon: import_icons11.CopyIcon,
1800
+ title: (0, import_i18n16.__)("Duplicate", "elementor"),
1801
+ icon: import_icons13.CopyIcon,
1655
1802
  MenuItemProps: {
1656
1803
  disabled: isDisabled,
1657
1804
  onClick
@@ -1661,25 +1808,25 @@ function Duplicate({ post, popupState }) {
1661
1808
  }
1662
1809
 
1663
1810
  // src/components/panel/actions-menu/actions/force-delete.tsx
1664
- var React23 = __toESM(require("react"));
1811
+ var React25 = __toESM(require("react"));
1665
1812
  var import_react9 = require("react");
1666
- var import_icons12 = require("@elementor/icons");
1667
- var import_ui16 = require("@elementor/ui");
1668
- var import_i18n15 = require("@wordpress/i18n");
1813
+ var import_icons14 = require("@elementor/icons");
1814
+ var import_ui18 = require("@elementor/ui");
1815
+ var import_i18n17 = require("@wordpress/i18n");
1669
1816
  function ForceDelete({ post }) {
1670
1817
  const [isDialogOpen, setIsDialogOpen] = (0, import_react9.useState)(false);
1671
- return /* @__PURE__ */ React23.createElement(React23.Fragment, null, /* @__PURE__ */ React23.createElement(
1818
+ return /* @__PURE__ */ React25.createElement(React25.Fragment, null, /* @__PURE__ */ React25.createElement(
1672
1819
  ActionMenuItem,
1673
1820
  {
1674
- icon: import_icons12.TrashIcon,
1821
+ icon: import_icons14.TrashIcon,
1675
1822
  MenuItemProps: {
1676
1823
  disabled: !post.user_can.delete,
1677
1824
  onClick: () => setIsDialogOpen(true),
1678
1825
  sx: { "&:hover": { color: "error.main" } }
1679
1826
  },
1680
- title: (0, import_i18n15.__)("Delete permanently", "elementor")
1827
+ title: (0, import_i18n17.__)("Delete permanently", "elementor")
1681
1828
  }
1682
- ), isDialogOpen && /* @__PURE__ */ React23.createElement(ForceDeleteDialog, { post, setIsDialogOpen }));
1829
+ ), isDialogOpen && /* @__PURE__ */ React25.createElement(ForceDeleteDialog, { post, setIsDialogOpen }));
1683
1830
  }
1684
1831
  function ForceDeleteDialog({
1685
1832
  post,
@@ -1687,8 +1834,8 @@ function ForceDeleteDialog({
1687
1834
  }) {
1688
1835
  const { setError, type } = usePostListContext();
1689
1836
  const { forceDeletePost } = usePostActions(type);
1690
- const dialogTitle = (0, import_i18n15.sprintf)((0, import_i18n15.__)('Delete "%s" permanently?', "elementor"), post.title.rendered);
1691
- const dialogBody = (0, import_i18n15.__)("This will permanently delete the item. You cannot undo this action.", "elementor");
1837
+ const dialogTitle = (0, import_i18n17.sprintf)((0, import_i18n17.__)('Delete "%s" permanently?', "elementor"), post.title.rendered);
1838
+ const dialogBody = (0, import_i18n17.__)("This will permanently delete the item. You cannot undo this action.", "elementor");
1692
1839
  const handleDelete = async () => {
1693
1840
  try {
1694
1841
  await forceDeletePost.mutateAsync(post.id);
@@ -1704,38 +1851,38 @@ function ForceDeleteDialog({
1704
1851
  }
1705
1852
  setIsDialogOpen(false);
1706
1853
  };
1707
- return /* @__PURE__ */ React23.createElement(import_ui16.Dialog, { "aria-labelledby": "force-delete-dialog", onClose: handleCancel, open: true }, /* @__PURE__ */ React23.createElement(import_ui16.DialogTitle, { noWrap: true }, dialogTitle), /* @__PURE__ */ React23.createElement(import_ui16.Divider, null), /* @__PURE__ */ React23.createElement(import_ui16.DialogContent, null, /* @__PURE__ */ React23.createElement(import_ui16.DialogContentText, null, dialogBody)), /* @__PURE__ */ React23.createElement(import_ui16.DialogActions, null, /* @__PURE__ */ React23.createElement(
1708
- import_ui16.Button,
1854
+ return /* @__PURE__ */ React25.createElement(import_ui18.Dialog, { "aria-labelledby": "force-delete-dialog", onClose: handleCancel, open: true }, /* @__PURE__ */ React25.createElement(import_ui18.DialogTitle, { noWrap: true }, dialogTitle), /* @__PURE__ */ React25.createElement(import_ui18.Divider, null), /* @__PURE__ */ React25.createElement(import_ui18.DialogContent, null, /* @__PURE__ */ React25.createElement(import_ui18.DialogContentText, null, dialogBody)), /* @__PURE__ */ React25.createElement(import_ui18.DialogActions, null, /* @__PURE__ */ React25.createElement(
1855
+ import_ui18.Button,
1709
1856
  {
1710
1857
  variant: "contained",
1711
1858
  color: "secondary",
1712
1859
  onClick: handleCancel,
1713
1860
  disabled: forceDeletePost.isPending
1714
1861
  },
1715
- (0, import_i18n15.__)("Cancel", "elementor")
1716
- ), /* @__PURE__ */ React23.createElement(
1717
- import_ui16.Button,
1862
+ (0, import_i18n17.__)("Cancel", "elementor")
1863
+ ), /* @__PURE__ */ React25.createElement(
1864
+ import_ui18.Button,
1718
1865
  {
1719
1866
  variant: "contained",
1720
1867
  color: "error",
1721
1868
  onClick: () => void handleDelete(),
1722
1869
  disabled: forceDeletePost.isPending
1723
1870
  },
1724
- !forceDeletePost.isPending ? (0, import_i18n15.__)("Delete permanently", "elementor") : /* @__PURE__ */ React23.createElement(import_ui16.CircularProgress, null)
1871
+ !forceDeletePost.isPending ? (0, import_i18n17.__)("Delete permanently", "elementor") : /* @__PURE__ */ React25.createElement(import_ui18.CircularProgress, null)
1725
1872
  )));
1726
1873
  }
1727
1874
 
1728
1875
  // src/components/panel/actions-menu/actions/rename.tsx
1729
- var React24 = __toESM(require("react"));
1730
- var import_icons13 = require("@elementor/icons");
1731
- var import_i18n16 = require("@wordpress/i18n");
1876
+ var React26 = __toESM(require("react"));
1877
+ var import_icons15 = require("@elementor/icons");
1878
+ var import_i18n18 = require("@wordpress/i18n");
1732
1879
  function Rename({ post }) {
1733
1880
  const { setEditMode } = usePostListContext();
1734
- return /* @__PURE__ */ React24.createElement(
1881
+ return /* @__PURE__ */ React26.createElement(
1735
1882
  ActionMenuItem,
1736
1883
  {
1737
- title: (0, import_i18n16.__)("Rename", "elementor"),
1738
- icon: import_icons13.EraseIcon,
1884
+ title: (0, import_i18n18.__)("Rename", "elementor"),
1885
+ icon: import_icons15.EraseIcon,
1739
1886
  MenuItemProps: {
1740
1887
  disabled: !post.user_can.edit,
1741
1888
  onClick: () => {
@@ -1752,9 +1899,9 @@ function Rename({ post }) {
1752
1899
  }
1753
1900
 
1754
1901
  // src/components/panel/actions-menu/actions/restore.tsx
1755
- var React25 = __toESM(require("react"));
1756
- var import_icons14 = require("@elementor/icons");
1757
- var import_i18n17 = require("@wordpress/i18n");
1902
+ var React27 = __toESM(require("react"));
1903
+ var import_icons16 = require("@elementor/icons");
1904
+ var import_i18n19 = require("@wordpress/i18n");
1758
1905
  function Restore({ post }) {
1759
1906
  const { setError, type } = usePostListContext();
1760
1907
  const { restorePost } = usePostActions(type);
@@ -1765,12 +1912,12 @@ function Restore({ post }) {
1765
1912
  setError();
1766
1913
  }
1767
1914
  };
1768
- return /* @__PURE__ */ React25.createElement(
1915
+ return /* @__PURE__ */ React27.createElement(
1769
1916
  ActionMenuItem,
1770
1917
  {
1771
- description: (0, import_i18n17.__)("Restored as draft", "elementor"),
1772
- title: (0, import_i18n17.__)("Restore", "elementor"),
1773
- icon: import_icons14.RefreshIcon,
1918
+ description: (0, import_i18n19.__)("Restored as draft", "elementor"),
1919
+ title: (0, import_i18n19.__)("Restore", "elementor"),
1920
+ icon: import_icons16.RefreshIcon,
1774
1921
  MenuItemProps: {
1775
1922
  disabled: restorePost.isPending || !post.user_can.delete,
1776
1923
  onClick: () => void handleClick()
@@ -1780,10 +1927,10 @@ function Restore({ post }) {
1780
1927
  }
1781
1928
 
1782
1929
  // src/components/panel/actions-menu/actions/set-home.tsx
1783
- var React26 = __toESM(require("react"));
1784
- var import_icons15 = require("@elementor/icons");
1785
- var import_ui17 = require("@elementor/ui");
1786
- var import_i18n18 = require("@wordpress/i18n");
1930
+ var React28 = __toESM(require("react"));
1931
+ var import_icons17 = require("@elementor/icons");
1932
+ var import_ui19 = require("@elementor/ui");
1933
+ var import_i18n20 = require("@wordpress/i18n");
1787
1934
 
1788
1935
  // src/hooks/use-homepage-actions.ts
1789
1936
  var import_query8 = require("@elementor/query");
@@ -1822,11 +1969,11 @@ function SetHome({ post, closeMenu }) {
1822
1969
  const isPostPublished = post.status === "publish";
1823
1970
  const isPostHomepage = !!post.isHome;
1824
1971
  const isDisabled = !canManageOptions || isPostHomepage || !isPostPublished || updateSettingsMutation.isPending;
1825
- return /* @__PURE__ */ React26.createElement(
1972
+ return /* @__PURE__ */ React28.createElement(
1826
1973
  ActionMenuItem,
1827
1974
  {
1828
- title: (0, import_i18n18.__)("Set as homepage", "elementor"),
1829
- icon: !updateSettingsMutation.isPending ? import_icons15.HomeIcon : import_ui17.CircularProgress,
1975
+ title: (0, import_i18n20.__)("Set as homepage", "elementor"),
1976
+ icon: !updateSettingsMutation.isPending ? import_icons17.HomeIcon : import_ui19.CircularProgress,
1830
1977
  MenuItemProps: {
1831
1978
  disabled: isDisabled,
1832
1979
  onClick: handleClick
@@ -1836,17 +1983,17 @@ function SetHome({ post, closeMenu }) {
1836
1983
  }
1837
1984
 
1838
1985
  // src/components/panel/actions-menu/actions/view.tsx
1839
- var React27 = __toESM(require("react"));
1840
- var import_icons16 = require("@elementor/icons");
1841
- var import_i18n19 = require("@wordpress/i18n");
1986
+ var React29 = __toESM(require("react"));
1987
+ var import_icons18 = require("@elementor/icons");
1988
+ var import_i18n21 = require("@wordpress/i18n");
1842
1989
  function View({ post }) {
1843
1990
  const { type } = usePostListContext();
1844
- const title = (0, import_i18n19.__)("View %s", "elementor").replace("%s", postTypesMap[type].labels.singular_name);
1845
- return /* @__PURE__ */ React27.createElement(
1991
+ const title = (0, import_i18n21.__)("View %s", "elementor").replace("%s", postTypesMap[type].labels.singular_name);
1992
+ return /* @__PURE__ */ React29.createElement(
1846
1993
  ActionMenuItem,
1847
1994
  {
1848
1995
  title,
1849
- icon: import_icons16.EyeIcon,
1996
+ icon: import_icons18.EyeIcon,
1850
1997
  MenuItemProps: {
1851
1998
  onClick: () => window.open(post.link, "_blank")
1852
1999
  }
@@ -1869,16 +2016,16 @@ var DisabledPostTooltip = ({
1869
2016
  postTypeSlug
1870
2017
  }) => {
1871
2018
  if (isDisabled) {
1872
- const title = /* @__PURE__ */ React28.createElement(import_ui18.Typography, { variant: "caption" }, getCannotEditPanelItemMessage(postTypeSlug), /* @__PURE__ */ React28.createElement("br", null), (0, import_i18n20.__)("To edit it directly, contact the site owner", "elementor"));
1873
- return /* @__PURE__ */ React28.createElement(import_ui18.Tooltip, { title, placement: "bottom", arrow: false }, /* @__PURE__ */ React28.createElement("span", null, children));
2019
+ const title = /* @__PURE__ */ React30.createElement(import_ui20.Typography, { variant: "caption" }, getCannotEditPanelItemMessage(postTypeSlug), /* @__PURE__ */ React30.createElement("br", null), (0, import_i18n22.__)("To edit it directly, contact the site owner", "elementor"));
2020
+ return /* @__PURE__ */ React30.createElement(import_ui20.Tooltip, { title, placement: "bottom", arrow: false }, /* @__PURE__ */ React30.createElement("span", null, children));
1874
2021
  }
1875
- return /* @__PURE__ */ React28.createElement(React28.Fragment, null, children);
2022
+ return /* @__PURE__ */ React30.createElement(React30.Fragment, null, children);
1876
2023
  };
1877
2024
  function ListItemView({ post }) {
1878
2025
  const { type } = usePostListContext();
1879
2026
  const activeDocument = (0, import_editor_documents5.__useActiveDocument)();
1880
2027
  const navigateToDocument = (0, import_editor_documents5.__useNavigateToDocument)();
1881
- const popupState = (0, import_ui18.usePopupState)({
2028
+ const popupState = (0, import_ui20.usePopupState)({
1882
2029
  variant: "popover",
1883
2030
  popupId: "post-actions",
1884
2031
  disableAutoFocus: true
@@ -1889,18 +2036,18 @@ function ListItemView({ post }) {
1889
2036
  const isTrashed = "trash" === post.status;
1890
2037
  const isEditBlocked = !post.user_can.edit && !isTrashed;
1891
2038
  const isRowDisabled = isEditBlocked || isTrashed;
1892
- const menuTriggerProps = (0, import_ui18.bindTrigger)(popupState);
2039
+ const menuTriggerProps = (0, import_ui20.bindTrigger)(popupState);
1893
2040
  const hasListItemActions = useSiteContentListItemActionsInjections().length > 0;
1894
2041
  const showListItemActions = isActive && post.user_can.edit && !isTrashed && hasListItemActions;
1895
- const listRow = /* @__PURE__ */ React28.createElement(
1896
- import_ui18.ListItem,
2042
+ const listRow = /* @__PURE__ */ React30.createElement(
2043
+ import_ui20.ListItem,
1897
2044
  {
1898
2045
  disablePadding: true,
1899
2046
  sx: getContentPanelListItemSx(showListItemActions),
1900
- secondaryAction: /* @__PURE__ */ React28.createElement(import_ui18.Stack, { alignItems: "center", direction: "row", spacing: 0 }, showListItemActions && /* @__PURE__ */ React28.createElement(SiteContentListItemActionsSlot, { post, title }), /* @__PURE__ */ React28.createElement(
1901
- import_ui18.IconButton,
2047
+ secondaryAction: /* @__PURE__ */ React30.createElement(import_ui20.Stack, { alignItems: "center", direction: "row", spacing: 0 }, showListItemActions && /* @__PURE__ */ React30.createElement(SiteContentListItemActionsSlot, { post, title }), /* @__PURE__ */ React30.createElement(
2048
+ import_ui20.IconButton,
1902
2049
  {
1903
- "aria-label": (0, import_i18n20.__)("More actions", "elementor"),
2050
+ "aria-label": (0, import_i18n22.__)("More actions", "elementor"),
1904
2051
  size: "tiny",
1905
2052
  ...menuTriggerProps,
1906
2053
  onClick: (event) => {
@@ -1908,11 +2055,11 @@ function ListItemView({ post }) {
1908
2055
  menuTriggerProps.onClick?.(event);
1909
2056
  }
1910
2057
  },
1911
- /* @__PURE__ */ React28.createElement(import_icons17.DotsVerticalIcon, { fontSize: "tiny" })
2058
+ /* @__PURE__ */ React30.createElement(import_icons19.DotsVerticalIcon, { fontSize: "tiny" })
1912
2059
  ))
1913
2060
  },
1914
- /* @__PURE__ */ React28.createElement(
1915
- import_ui18.ListItemButton,
2061
+ /* @__PURE__ */ React30.createElement(
2062
+ import_ui20.ListItemButton,
1916
2063
  {
1917
2064
  dense: true,
1918
2065
  disableGutters: true,
@@ -1927,18 +2074,18 @@ function ListItemView({ post }) {
1927
2074
  shape: "rounded",
1928
2075
  sx: contentPanelListItemButtonSx
1929
2076
  },
1930
- /* @__PURE__ */ React28.createElement(import_ui18.ListItemText, { disableTypography: true, sx: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React28.createElement(PageTitleAndStatus, { title, status })),
1931
- post.isHome && /* @__PURE__ */ React28.createElement(import_icons17.HomeIcon, { titleAccess: (0, import_i18n20.__)("Homepage", "elementor"), color: "disabled" })
2077
+ /* @__PURE__ */ React30.createElement(import_ui20.ListItemText, { disableTypography: true, sx: { flex: 1, minWidth: 0 } }, /* @__PURE__ */ React30.createElement(PageTitleAndStatus, { title, status })),
2078
+ post.isHome && /* @__PURE__ */ React30.createElement(import_icons19.HomeIcon, { titleAccess: (0, import_i18n22.__)("Homepage", "elementor"), color: "disabled" })
1932
2079
  )
1933
2080
  );
1934
- return /* @__PURE__ */ React28.createElement(React28.Fragment, null, isEditBlocked ? /* @__PURE__ */ React28.createElement(DisabledPostTooltip, { isDisabled: true, postTypeSlug: type }, listRow) : listRow, /* @__PURE__ */ React28.createElement(
1935
- import_ui18.Menu,
2081
+ return /* @__PURE__ */ React30.createElement(React30.Fragment, null, isEditBlocked ? /* @__PURE__ */ React30.createElement(DisabledPostTooltip, { isDisabled: true, postTypeSlug: type }, listRow) : listRow, /* @__PURE__ */ React30.createElement(
2082
+ import_ui20.Menu,
1936
2083
  {
1937
2084
  PaperProps: { sx: { mt: 2, width: 200 } },
1938
2085
  MenuListProps: { dense: true },
1939
- ...(0, import_ui18.bindMenu)(popupState)
2086
+ ...(0, import_ui20.bindMenu)(popupState)
1940
2087
  },
1941
- isTrashed ? /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(Restore, { post }), /* @__PURE__ */ React28.createElement(ForceDelete, { post })) : /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(Rename, { post }), /* @__PURE__ */ React28.createElement(Duplicate, { post, popupState }), /* @__PURE__ */ React28.createElement(Delete, { post }), /* @__PURE__ */ React28.createElement(View, { post }), type === "page" && /* @__PURE__ */ React28.createElement(React28.Fragment, null, /* @__PURE__ */ React28.createElement(import_ui18.Divider, null), /* @__PURE__ */ React28.createElement(SetHome, { post, closeMenu: () => popupState.close() })))
2088
+ isTrashed ? /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement(Restore, { post }), /* @__PURE__ */ React30.createElement(ForceDelete, { post })) : /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement(Rename, { post }), /* @__PURE__ */ React30.createElement(Duplicate, { post, popupState }), /* @__PURE__ */ React30.createElement(Delete, { post }), /* @__PURE__ */ React30.createElement(View, { post }), type === "page" && /* @__PURE__ */ React30.createElement(React30.Fragment, null, /* @__PURE__ */ React30.createElement(import_ui20.Divider, null), /* @__PURE__ */ React30.createElement(SetHome, { post, closeMenu: () => popupState.close() })))
1942
2089
  ));
1943
2090
  }
1944
2091
 
@@ -1946,25 +2093,25 @@ function ListItemView({ post }) {
1946
2093
  function PostListItem({ post }) {
1947
2094
  const { editMode } = usePostListContext();
1948
2095
  if ("rename" === editMode.mode && post?.id && post?.id === editMode.details.postId) {
1949
- return /* @__PURE__ */ React29.createElement(ListItemRename, { post });
2096
+ return /* @__PURE__ */ React31.createElement(ListItemRename, { post });
1950
2097
  }
1951
2098
  if ("create" === editMode.mode && !post) {
1952
- return /* @__PURE__ */ React29.createElement(ListItemCreate, null);
2099
+ return /* @__PURE__ */ React31.createElement(ListItemCreate, null);
1953
2100
  }
1954
2101
  if ("duplicate" === editMode.mode && !post) {
1955
- return /* @__PURE__ */ React29.createElement(ListItemDuplicate, null);
2102
+ return /* @__PURE__ */ React31.createElement(ListItemDuplicate, null);
1956
2103
  }
1957
2104
  if (!post) {
1958
2105
  return null;
1959
2106
  }
1960
- return /* @__PURE__ */ React29.createElement(ListItemView, { post });
2107
+ return /* @__PURE__ */ React31.createElement(ListItemView, { post });
1961
2108
  }
1962
2109
 
1963
2110
  // src/components/panel/posts-list/post-list-pagination-actions.tsx
1964
- var React30 = __toESM(require("react"));
1965
- var import_editor_ui3 = require("@elementor/editor-ui");
1966
- var import_ui19 = require("@elementor/ui");
1967
- var import_i18n21 = require("@wordpress/i18n");
2111
+ var React32 = __toESM(require("react"));
2112
+ var import_editor_ui4 = require("@elementor/editor-ui");
2113
+ var import_ui21 = require("@elementor/ui");
2114
+ var import_i18n23 = require("@wordpress/i18n");
1968
2115
  var listPaginationButtonProps = {
1969
2116
  color: "secondary",
1970
2117
  size: "small",
@@ -1981,28 +2128,28 @@ function PostListPaginationActions({
1981
2128
  if (!canLoadMore && !canShowLess) {
1982
2129
  return null;
1983
2130
  }
1984
- const loadMoreLabel = (0, import_i18n21.__)("Load more", "elementor");
1985
- const showLessLabel = (0, import_i18n21.__)("Show less", "elementor");
1986
- const loadMoreButton = /* @__PURE__ */ React30.createElement(
1987
- import_ui19.Button,
2131
+ const loadMoreLabel = (0, import_i18n23.__)("Load more", "elementor");
2132
+ const showLessLabel = (0, import_i18n23.__)("Show less", "elementor");
2133
+ const loadMoreButton = /* @__PURE__ */ React32.createElement(
2134
+ import_ui21.Button,
1988
2135
  {
1989
2136
  ...listPaginationButtonProps,
1990
2137
  ref: loadMoreButtonRef,
1991
2138
  "aria-label": loadMoreLabel,
1992
2139
  disabled: isLoadingMore,
1993
- endIcon: isLoadingMore ? void 0 : /* @__PURE__ */ React30.createElement(import_editor_ui3.CollapseIcon, { open: false }),
2140
+ endIcon: isLoadingMore ? void 0 : /* @__PURE__ */ React32.createElement(import_editor_ui4.CollapseIcon, { open: false }),
1994
2141
  fullWidth: true,
1995
2142
  onClick: onLoadMore,
1996
2143
  sx: { flex: 1, my: 0.5 }
1997
2144
  },
1998
- isLoadingMore ? /* @__PURE__ */ React30.createElement(import_ui19.CircularProgress, { size: 20 }) : loadMoreLabel
2145
+ isLoadingMore ? /* @__PURE__ */ React32.createElement(import_ui21.CircularProgress, { size: 20 }) : loadMoreLabel
1999
2146
  );
2000
- const showLessButton = /* @__PURE__ */ React30.createElement(
2001
- import_ui19.Button,
2147
+ const showLessButton = /* @__PURE__ */ React32.createElement(
2148
+ import_ui21.Button,
2002
2149
  {
2003
2150
  ...listPaginationButtonProps,
2004
2151
  "aria-label": showLessLabel,
2005
- endIcon: /* @__PURE__ */ React30.createElement(import_editor_ui3.CollapseIcon, { open: true }),
2152
+ endIcon: /* @__PURE__ */ React32.createElement(import_editor_ui4.CollapseIcon, { open: true }),
2006
2153
  fullWidth: true,
2007
2154
  onClick: onShowLess,
2008
2155
  sx: { flex: 1, my: 0.5 }
@@ -2010,16 +2157,16 @@ function PostListPaginationActions({
2010
2157
  showLessLabel
2011
2158
  );
2012
2159
  if (canShowLess && canLoadMore) {
2013
- return /* @__PURE__ */ React30.createElement(import_ui19.Box, { sx: { px: 2, width: "100%" } }, /* @__PURE__ */ React30.createElement(import_ui19.Stack, { direction: "row", spacing: 1 }, showLessButton, loadMoreButton));
2160
+ return /* @__PURE__ */ React32.createElement(import_ui21.Box, { sx: { px: 2, width: "100%" } }, /* @__PURE__ */ React32.createElement(import_ui21.Stack, { direction: "row", spacing: 1 }, showLessButton, loadMoreButton));
2014
2161
  }
2015
- return /* @__PURE__ */ React30.createElement(import_ui19.Box, { sx: { px: 2, width: "100%" } }, canShowLess ? showLessButton : loadMoreButton);
2162
+ return /* @__PURE__ */ React32.createElement(import_ui21.Box, { sx: { px: 2, width: "100%" } }, canShowLess ? showLessButton : loadMoreButton);
2016
2163
  }
2017
2164
 
2018
2165
  // src/components/panel/posts-list/posts-collapsible-list.tsx
2019
2166
  var SEARCH_DEBOUNCE_MS = 300;
2020
2167
  function PostsCollapsibleList({ isOpenByDefault = false }) {
2021
2168
  const { type, editMode, resetEditMode, setEditMode } = usePostListContext();
2022
- const { registerSection, searchQuery, statusFilters, unregisterSection } = useContentPanelCoordinator();
2169
+ const { registerSection, searchQuery, siteContentSort, statusFilters, unregisterSection } = useContentPanelCoordinator();
2023
2170
  const [isOpen, setIsOpen] = (0, import_react10.useState)(isOpenByDefault);
2024
2171
  const trimmedSearch = searchQuery.trim();
2025
2172
  const [debouncedSearch, setDebouncedSearch] = (0, import_react10.useState)(trimmedSearch);
@@ -2038,7 +2185,7 @@ function PostsCollapsibleList({ isOpenByDefault = false }) {
2038
2185
  fetchNextPage,
2039
2186
  hasNextPage,
2040
2187
  isFetchingNextPage
2041
- } = usePosts(type, debouncedSearch, statusFilters);
2188
+ } = usePosts(type, debouncedSearch, statusFilters, siteContentSort);
2042
2189
  const isNarrowed = isSiteContentListNarrowed(statusFilters, debouncedSearch);
2043
2190
  const isTrashFilter = isSiteContentTrashFilterActive(statusFilters);
2044
2191
  const baselineStatus = isTrashFilter ? "trash" : "any";
@@ -2063,7 +2210,8 @@ function PostsCollapsibleList({ isOpenByDefault = false }) {
2063
2210
  return [];
2064
2211
  }
2065
2212
  const mappedPosts = isPageType ? posts.map((post) => post.id === homepageId ? { ...post, isHome: true } : post) : posts;
2066
- const sorted = isPageType ? [...mappedPosts].sort((a, b) => {
2213
+ const shouldPinHomepage = isPageType && shouldPinHomepageForSiteContentSort(siteContentSort);
2214
+ const sorted = shouldPinHomepage ? [...mappedPosts].sort((a, b) => {
2067
2215
  if (a.id === homepageId) {
2068
2216
  return -1;
2069
2217
  }
@@ -2073,13 +2221,13 @@ function PostsCollapsibleList({ isOpenByDefault = false }) {
2073
2221
  return 0;
2074
2222
  }) : mappedPosts;
2075
2223
  return sorted;
2076
- }, [posts, isPageType, homepageId]);
2224
+ }, [homepageId, isPageType, posts, siteContentSort]);
2077
2225
  const pagination = usePostListPagination({
2078
2226
  fetchNextPage,
2079
2227
  hasNextPage,
2080
2228
  isFetchingNextPage,
2081
2229
  loadedCount: filteredPosts.length,
2082
- resetKey: `${type}:${debouncedSearch}:${statusFiltersKey}`,
2230
+ resetKey: `${type}:${debouncedSearch}:${statusFiltersKey}:${siteContentSort}`,
2083
2231
  totalCount: total
2084
2232
  });
2085
2233
  const displayedPosts = (0, import_react10.useMemo)(
@@ -2112,16 +2260,16 @@ function PostsCollapsibleList({ isOpenByDefault = false }) {
2112
2260
  }
2113
2261
  }, [debouncedSearch, filteredPosts.length, statusFilters]);
2114
2262
  if (postsError) {
2115
- return /* @__PURE__ */ React31.createElement(ErrorState, null);
2263
+ return /* @__PURE__ */ React33.createElement(ErrorState, null);
2116
2264
  }
2117
2265
  if (postsPending && !posts?.length) {
2118
- return /* @__PURE__ */ React31.createElement(import_ui20.Box, { sx: { px: 2 } }, /* @__PURE__ */ React31.createElement(import_ui20.Box, null, /* @__PURE__ */ React31.createElement(import_ui20.Skeleton, { sx: { my: 3 }, animation: "wave", variant: "rounded", width: "100%", height: "24px" }), /* @__PURE__ */ React31.createElement(import_ui20.Skeleton, { sx: { my: 3 }, animation: "wave", variant: "rounded", width: "70%", height: "24px" }), /* @__PURE__ */ React31.createElement(import_ui20.Skeleton, { sx: { my: 3 }, animation: "wave", variant: "rounded", width: "70%", height: "24px" }), /* @__PURE__ */ React31.createElement(import_ui20.Skeleton, { sx: { my: 3 }, animation: "wave", variant: "rounded", width: "70%", height: "24px" })));
2266
+ return /* @__PURE__ */ React33.createElement(import_ui22.Box, { sx: { px: 2 } }, /* @__PURE__ */ React33.createElement(import_ui22.Box, null, /* @__PURE__ */ React33.createElement(import_ui22.Skeleton, { sx: { my: 3 }, animation: "wave", variant: "rounded", width: "100%", height: "24px" }), /* @__PURE__ */ React33.createElement(import_ui22.Skeleton, { sx: { my: 3 }, animation: "wave", variant: "rounded", width: "70%", height: "24px" }), /* @__PURE__ */ React33.createElement(import_ui22.Skeleton, { sx: { my: 3 }, animation: "wave", variant: "rounded", width: "70%", height: "24px" }), /* @__PURE__ */ React33.createElement(import_ui22.Skeleton, { sx: { my: 3 }, animation: "wave", variant: "rounded", width: "70%", height: "24px" })));
2119
2267
  }
2120
2268
  const displayCount = total;
2121
2269
  const sectionTitle = postTypesMap[type].labels.plural_name;
2122
2270
  const showNoResults = (debouncedSearch || hasActiveSiteContentStatusFilters(statusFilters)) && filteredPosts.length === 0;
2123
2271
  const countChipLabel = isNarrowed && baselineTotal !== void 0 ? `${total} / ${baselineTotal}` : void 0;
2124
- return /* @__PURE__ */ React31.createElement(
2272
+ return /* @__PURE__ */ React33.createElement(
2125
2273
  CollapsibleList,
2126
2274
  {
2127
2275
  count: displayCount,
@@ -2130,15 +2278,15 @@ function PostsCollapsibleList({ isOpenByDefault = false }) {
2130
2278
  isOpen,
2131
2279
  onOpenChange: setIsOpen,
2132
2280
  title: sectionTitle,
2133
- trailingActions: isTrashFilter ? null : /* @__PURE__ */ React31.createElement(SectionAddButton, { onBeforeCreate: () => setIsOpen(true) })
2281
+ trailingActions: isTrashFilter ? null : /* @__PURE__ */ React33.createElement(SectionAddButton, { onBeforeCreate: () => setIsOpen(true) })
2134
2282
  },
2135
- showNoResults && /* @__PURE__ */ React31.createElement(import_ui20.Box, { sx: { py: 2, px: 2 } }, /* @__PURE__ */ React31.createElement(import_ui20.Typography, { variant: "body2", color: "text.secondary" }, (0, import_i18n22.__)("No results found", "elementor"))),
2136
- /* @__PURE__ */ React31.createElement(import_ui20.Box, { ref: listTopRef }),
2283
+ showNoResults && /* @__PURE__ */ React33.createElement(import_ui22.Box, { sx: { py: 2, px: 2 } }, /* @__PURE__ */ React33.createElement(import_ui22.Typography, { variant: "body2", color: "text.secondary" }, (0, import_i18n24.__)("No results found", "elementor"))),
2284
+ /* @__PURE__ */ React33.createElement(import_ui22.Box, { ref: listTopRef }),
2137
2285
  displayedPosts.map((post) => {
2138
- return /* @__PURE__ */ React31.createElement(PostListItem, { key: post.id, post });
2286
+ return /* @__PURE__ */ React33.createElement(PostListItem, { key: post.id, post });
2139
2287
  }),
2140
- !isTrashFilter && ["duplicate", "create"].includes(editMode.mode) && /* @__PURE__ */ React31.createElement(PostListItem, null),
2141
- /* @__PURE__ */ React31.createElement(
2288
+ !isTrashFilter && ["duplicate", "create"].includes(editMode.mode) && /* @__PURE__ */ React33.createElement(PostListItem, null),
2289
+ /* @__PURE__ */ React33.createElement(
2142
2290
  PostListPaginationActions,
2143
2291
  {
2144
2292
  canLoadMore: pagination.canLoadMore,
@@ -2153,11 +2301,11 @@ function PostsCollapsibleList({ isOpenByDefault = false }) {
2153
2301
  }
2154
2302
 
2155
2303
  // src/components/panel/user-load-error.tsx
2156
- var React32 = __toESM(require("react"));
2157
- var import_ui21 = require("@elementor/ui");
2158
- var import_i18n23 = require("@wordpress/i18n");
2304
+ var React34 = __toESM(require("react"));
2305
+ var import_ui23 = require("@elementor/ui");
2306
+ var import_i18n25 = require("@wordpress/i18n");
2159
2307
  function UserLoadError() {
2160
- return /* @__PURE__ */ React32.createElement(import_ui21.Box, { sx: { px: 2, py: 2 } }, /* @__PURE__ */ React32.createElement(import_ui21.Typography, { variant: "body2", color: "text.secondary" }, (0, import_i18n23.__)(
2308
+ return /* @__PURE__ */ React34.createElement(import_ui23.Box, { sx: { px: 2, py: 2 } }, /* @__PURE__ */ React34.createElement(import_ui23.Typography, { variant: "body2", color: "text.secondary" }, (0, import_i18n25.__)(
2161
2309
  "We couldn\u2019t load your content permissions. Try closing and reopening this panel.",
2162
2310
  "elementor"
2163
2311
  )));
@@ -2171,12 +2319,12 @@ function ShellPanelBodyContent({
2171
2319
  showUserLoadError
2172
2320
  }) {
2173
2321
  if (isUserPending) {
2174
- return /* @__PURE__ */ React33.createElement(import_ui22.Stack, { spacing: 1, sx: { px: 2, py: 1 } }, /* @__PURE__ */ React33.createElement(import_ui22.Skeleton, { animation: "wave", height: 28, variant: "rounded", width: "100%" }), /* @__PURE__ */ React33.createElement(import_ui22.Skeleton, { animation: "wave", height: 28, variant: "rounded", width: "80%" }));
2322
+ return /* @__PURE__ */ React35.createElement(import_ui24.Stack, { spacing: 1, sx: { px: 2, py: 1 } }, /* @__PURE__ */ React35.createElement(import_ui24.Skeleton, { animation: "wave", height: 28, variant: "rounded", width: "100%" }), /* @__PURE__ */ React35.createElement(import_ui24.Skeleton, { animation: "wave", height: 28, variant: "rounded", width: "80%" }));
2175
2323
  }
2176
2324
  if (showUserLoadError) {
2177
- return /* @__PURE__ */ React33.createElement(UserLoadError, null);
2325
+ return /* @__PURE__ */ React35.createElement(UserLoadError, null);
2178
2326
  }
2179
- return /* @__PURE__ */ React33.createElement(import_ui22.List, { dense: true, disablePadding: true, sx: { py: 0, width: "100%" } }, accessiblePostTypes.map((postTypeSlug, index) => /* @__PURE__ */ React33.createElement(PostListContextProvider, { key: postTypeSlug, type: postTypeSlug, setError: onListError }, /* @__PURE__ */ React33.createElement(PostsCollapsibleList, { isOpenByDefault: index === 0 }))));
2327
+ return /* @__PURE__ */ React35.createElement(import_ui24.List, { dense: true, disablePadding: true, sx: { py: 0, width: "100%" } }, accessiblePostTypes.map((postTypeSlug, index) => /* @__PURE__ */ React35.createElement(PostListContextProvider, { key: postTypeSlug, type: postTypeSlug, setError: onListError }, /* @__PURE__ */ React35.createElement(PostsCollapsibleList, { isOpenByDefault: index === 0 }))));
2180
2328
  }
2181
2329
 
2182
2330
  // src/components/panel/shell.tsx
@@ -2184,8 +2332,8 @@ var Shell = () => {
2184
2332
  const sidebarPanelChrome = (0, import_editor_sidebar.isSidebarEnabled)();
2185
2333
  const [isErrorSnackbarOpen, setIsErrorSnackbarOpen] = (0, import_react11.useState)(false);
2186
2334
  const { accessiblePostTypes, isUserPending, showUserLoadError } = useAccessiblePanelPostTypes();
2187
- return /* @__PURE__ */ React34.createElement(ContentPanelCoordinatorProvider, null, /* @__PURE__ */ React34.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React34.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React34.createElement(
2188
- import_ui23.Stack,
2335
+ return /* @__PURE__ */ React36.createElement(ContentPanelCoordinatorProvider, null, /* @__PURE__ */ React36.createElement(import_editor_panels.Panel, null, /* @__PURE__ */ React36.createElement(import_editor_panels.PanelHeader, null, /* @__PURE__ */ React36.createElement(
2336
+ import_ui25.Stack,
2189
2337
  {
2190
2338
  alignItems: "center",
2191
2339
  direction: "row",
@@ -2195,9 +2343,9 @@ var Shell = () => {
2195
2343
  ...sidebarPanelChrome ? {} : { p: 1, pl: 2 }
2196
2344
  }
2197
2345
  },
2198
- /* @__PURE__ */ React34.createElement(import_editor_panels.PanelHeaderTitle, { sx: { flex: 1, minWidth: 0, textAlign: "start" } }, (0, import_i18n24.__)("Site content", "elementor")),
2199
- /* @__PURE__ */ React34.createElement(ContentPanelHeaderAdd, null)
2200
- )), /* @__PURE__ */ React34.createElement(import_ui23.Divider, null), /* @__PURE__ */ React34.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React34.createElement(ContentPanelToolbar, null), /* @__PURE__ */ React34.createElement(import_ui23.Divider, null), /* @__PURE__ */ React34.createElement(
2346
+ /* @__PURE__ */ React36.createElement(import_editor_panels.PanelHeaderTitle, { sx: { flex: 1, minWidth: 0, textAlign: "start" } }, (0, import_i18n26.__)("Site content", "elementor")),
2347
+ /* @__PURE__ */ React36.createElement(ContentPanelHeaderAdd, null)
2348
+ )), /* @__PURE__ */ React36.createElement(import_ui25.Divider, null), /* @__PURE__ */ React36.createElement(import_editor_panels.PanelBody, null, /* @__PURE__ */ React36.createElement(ContentPanelToolbar, null), /* @__PURE__ */ React36.createElement(import_ui25.Divider, null), /* @__PURE__ */ React36.createElement(
2201
2349
  ShellPanelBodyContent,
2202
2350
  {
2203
2351
  accessiblePostTypes,
@@ -2205,7 +2353,7 @@ var Shell = () => {
2205
2353
  onListError: () => setIsErrorSnackbarOpen(true),
2206
2354
  showUserLoadError
2207
2355
  }
2208
- ), /* @__PURE__ */ React34.createElement(error_snackbar_default, { open: isErrorSnackbarOpen, onClose: () => setIsErrorSnackbarOpen(false) }))));
2356
+ ), /* @__PURE__ */ React36.createElement(error_snackbar_default, { open: isErrorSnackbarOpen, onClose: () => setIsErrorSnackbarOpen(false) }))));
2209
2357
  };
2210
2358
  var shell_default = Shell;
2211
2359
 
@@ -2216,19 +2364,19 @@ var { panel, usePanelStatus, usePanelActions } = (0, import_editor_panels2.creat
2216
2364
  });
2217
2365
 
2218
2366
  // src/components/top-bar/recently-edited.tsx
2219
- var React39 = __toESM(require("react"));
2367
+ var React41 = __toESM(require("react"));
2220
2368
  var import_editor_documents8 = require("@elementor/editor-documents");
2221
- var import_icons20 = require("@elementor/icons");
2222
- var import_ui28 = require("@elementor/ui");
2223
- var import_i18n26 = require("@wordpress/i18n");
2369
+ var import_icons22 = require("@elementor/icons");
2370
+ var import_ui30 = require("@elementor/ui");
2371
+ var import_i18n28 = require("@wordpress/i18n");
2224
2372
 
2225
2373
  // src/components/top-bar/create-post-list-item.tsx
2226
- var React35 = __toESM(require("react"));
2374
+ var React37 = __toESM(require("react"));
2227
2375
  var import_editor_documents6 = require("@elementor/editor-documents");
2228
2376
  var import_events = require("@elementor/events");
2229
- var import_icons18 = require("@elementor/icons");
2230
- var import_ui24 = require("@elementor/ui");
2231
- var import_i18n25 = require("@wordpress/i18n");
2377
+ var import_icons20 = require("@elementor/icons");
2378
+ var import_ui26 = require("@elementor/ui");
2379
+ var import_i18n27 = require("@wordpress/i18n");
2232
2380
 
2233
2381
  // src/hooks/use-create-page.ts
2234
2382
  var import_react12 = require("react");
@@ -2258,8 +2406,8 @@ function CreatePostListItem({ closePopup, ...props }) {
2258
2406
  const navigateToDocument = (0, import_editor_documents6.__useNavigateToDocument)();
2259
2407
  const { data: user } = useUser();
2260
2408
  const { dispatchEvent, config } = (0, import_events.useMixpanel)();
2261
- return /* @__PURE__ */ React35.createElement(
2262
- import_ui24.MenuItem,
2409
+ return /* @__PURE__ */ React37.createElement(
2410
+ import_ui26.MenuItem,
2263
2411
  {
2264
2412
  disabled: isLoading || !user?.capabilities?.edit_pages,
2265
2413
  onClick: async () => {
@@ -2282,26 +2430,26 @@ function CreatePostListItem({ closePopup, ...props }) {
2282
2430
  },
2283
2431
  ...props
2284
2432
  },
2285
- /* @__PURE__ */ React35.createElement(import_ui24.ListItemIcon, null, isLoading ? /* @__PURE__ */ React35.createElement(import_ui24.CircularProgress, { size: "1.25rem" }) : /* @__PURE__ */ React35.createElement(import_icons18.PlusIcon, { fontSize: "small" })),
2286
- /* @__PURE__ */ React35.createElement(
2287
- import_ui24.ListItemText,
2433
+ /* @__PURE__ */ React37.createElement(import_ui26.ListItemIcon, null, isLoading ? /* @__PURE__ */ React37.createElement(import_ui26.CircularProgress, { size: "1.25rem" }) : /* @__PURE__ */ React37.createElement(import_icons20.PlusIcon, { fontSize: "small" })),
2434
+ /* @__PURE__ */ React37.createElement(
2435
+ import_ui26.ListItemText,
2288
2436
  {
2289
2437
  primaryTypographyProps: { variant: "body2" },
2290
- primary: (0, import_i18n25.__)("Add new page", "elementor")
2438
+ primary: (0, import_i18n27.__)("Add new page", "elementor")
2291
2439
  }
2292
2440
  )
2293
2441
  );
2294
2442
  }
2295
2443
 
2296
2444
  // src/components/top-bar/indicator.tsx
2297
- var React36 = __toESM(require("react"));
2298
- var import_ui25 = require("@elementor/ui");
2445
+ var React38 = __toESM(require("react"));
2446
+ var import_ui27 = require("@elementor/ui");
2299
2447
  function Indicator({ title, status }) {
2300
- return /* @__PURE__ */ React36.createElement(Tooltip4, { title }, /* @__PURE__ */ React36.createElement(import_ui25.Stack, { component: "span", direction: "row", alignItems: "center", spacing: 0.5 }, /* @__PURE__ */ React36.createElement(import_ui25.Typography, { component: "span", variant: "body2", sx: { maxWidth: "120px" }, noWrap: true }, title), status.value !== "publish" && /* @__PURE__ */ React36.createElement(import_ui25.Typography, { component: "span", variant: "body2", sx: { fontStyle: "italic" } }, "(", status.label, ")")));
2448
+ return /* @__PURE__ */ React38.createElement(Tooltip5, { title }, /* @__PURE__ */ React38.createElement(import_ui27.Stack, { component: "span", direction: "row", alignItems: "center", spacing: 0.5 }, /* @__PURE__ */ React38.createElement(import_ui27.Typography, { component: "span", variant: "body2", sx: { maxWidth: "120px" }, noWrap: true }, title), status.value !== "publish" && /* @__PURE__ */ React38.createElement(import_ui27.Typography, { component: "span", variant: "body2", sx: { fontStyle: "italic" } }, "(", status.label, ")")));
2301
2449
  }
2302
- function Tooltip4(props) {
2303
- return /* @__PURE__ */ React36.createElement(
2304
- import_ui25.Tooltip,
2450
+ function Tooltip5(props) {
2451
+ return /* @__PURE__ */ React38.createElement(
2452
+ import_ui27.Tooltip,
2305
2453
  {
2306
2454
  PopperProps: {
2307
2455
  sx: {
@@ -2316,21 +2464,21 @@ function Tooltip4(props) {
2316
2464
  }
2317
2465
 
2318
2466
  // src/components/top-bar/post-list-item.tsx
2319
- var React38 = __toESM(require("react"));
2467
+ var React40 = __toESM(require("react"));
2320
2468
  var import_editor_documents7 = require("@elementor/editor-documents");
2321
2469
  var import_events2 = require("@elementor/events");
2322
- var import_ui27 = require("@elementor/ui");
2470
+ var import_ui29 = require("@elementor/ui");
2323
2471
 
2324
2472
  // src/components/top-bar/chip-doc-type.tsx
2325
- var React37 = __toESM(require("react"));
2326
- var import_icons19 = require("@elementor/icons");
2327
- var import_ui26 = require("@elementor/ui");
2473
+ var React39 = __toESM(require("react"));
2474
+ var import_icons21 = require("@elementor/icons");
2475
+ var import_ui28 = require("@elementor/ui");
2328
2476
  var iconsMap2 = getIconsMap();
2329
2477
  function DocTypeChip({ postType, docType, label }) {
2330
2478
  const color = "elementor_library" === postType ? "global" : "accent";
2331
- const Icon = iconsMap2[docType] || import_icons19.PostTypeIcon;
2332
- return /* @__PURE__ */ React37.createElement(
2333
- import_ui26.Chip,
2479
+ const Icon = iconsMap2[docType] || import_icons21.PostTypeIcon;
2480
+ return /* @__PURE__ */ React39.createElement(
2481
+ import_ui28.Chip,
2334
2482
  {
2335
2483
  component: "span",
2336
2484
  size: "small",
@@ -2338,7 +2486,7 @@ function DocTypeChip({ postType, docType, label }) {
2338
2486
  label,
2339
2487
  "data-value": docType,
2340
2488
  color,
2341
- icon: /* @__PURE__ */ React37.createElement(Icon, null),
2489
+ icon: /* @__PURE__ */ React39.createElement(Icon, null),
2342
2490
  sx: { ml: 1, cursor: "inherit" }
2343
2491
  }
2344
2492
  );
@@ -2349,8 +2497,8 @@ function PostListItem2({ post, closePopup, ...props }) {
2349
2497
  const navigateToDocument = (0, import_editor_documents7.__useNavigateToDocument)();
2350
2498
  const postTitle = useReverseHtmlEntities(post.title);
2351
2499
  const { dispatchEvent, config } = (0, import_events2.useMixpanel)();
2352
- return /* @__PURE__ */ React38.createElement(
2353
- import_ui27.MenuItem,
2500
+ return /* @__PURE__ */ React40.createElement(
2501
+ import_ui29.MenuItem,
2354
2502
  {
2355
2503
  disabled: !post.user_can.edit,
2356
2504
  onClick: async () => {
@@ -2372,15 +2520,15 @@ function PostListItem2({ post, closePopup, ...props }) {
2372
2520
  },
2373
2521
  ...props
2374
2522
  },
2375
- /* @__PURE__ */ React38.createElement(
2376
- import_ui27.ListItemText,
2523
+ /* @__PURE__ */ React40.createElement(
2524
+ import_ui29.ListItemText,
2377
2525
  {
2378
2526
  sx: { flexGrow: 0 },
2379
2527
  primaryTypographyProps: { variant: "body2", noWrap: true },
2380
2528
  primary: postTitle
2381
2529
  }
2382
2530
  ),
2383
- /* @__PURE__ */ React38.createElement(DocTypeChip, { postType: post.type.post_type, docType: post.type.doc_type, label: post.type.label })
2531
+ /* @__PURE__ */ React40.createElement(DocTypeChip, { postType: post.type.post_type, docType: post.type.doc_type, label: post.type.label })
2384
2532
  );
2385
2533
  }
2386
2534
 
@@ -2397,7 +2545,7 @@ function RecentlyEdited() {
2397
2545
  return data.filter((post) => post.id !== document2?.id).splice(0, NUMBER_OF_RECENT_POSTS - 1);
2398
2546
  };
2399
2547
  const recentPosts = getRecentPosts();
2400
- const popupState = (0, import_ui28.usePopupState)({
2548
+ const popupState = (0, import_ui30.usePopupState)({
2401
2549
  variant: "popover",
2402
2550
  popupId: "elementor-v2-top-bar-recently-edited"
2403
2551
  });
@@ -2405,13 +2553,13 @@ function RecentlyEdited() {
2405
2553
  if (!document2) {
2406
2554
  return null;
2407
2555
  }
2408
- const buttonProps = (0, import_ui28.bindTrigger)(popupState);
2409
- return /* @__PURE__ */ React39.createElement(React39.Fragment, null, /* @__PURE__ */ React39.createElement(
2410
- import_ui28.Button,
2556
+ const buttonProps = (0, import_ui30.bindTrigger)(popupState);
2557
+ return /* @__PURE__ */ React41.createElement(React41.Fragment, null, /* @__PURE__ */ React41.createElement(
2558
+ import_ui30.Button,
2411
2559
  {
2412
2560
  color: "inherit",
2413
2561
  size: "small",
2414
- endIcon: /* @__PURE__ */ React39.createElement(import_icons20.ChevronDownIcon, { fontSize: "small" }),
2562
+ endIcon: /* @__PURE__ */ React41.createElement(import_icons22.ChevronDownIcon, { fontSize: "small" }),
2415
2563
  ...buttonProps,
2416
2564
  onClick: (e) => {
2417
2565
  const extendedWindow = window;
@@ -2430,41 +2578,41 @@ function RecentlyEdited() {
2430
2578
  buttonProps.onClick(e);
2431
2579
  }
2432
2580
  },
2433
- /* @__PURE__ */ React39.createElement(Indicator, { title: documentTitle, status: document2.status })
2434
- ), /* @__PURE__ */ React39.createElement(
2435
- import_ui28.Menu,
2581
+ /* @__PURE__ */ React41.createElement(Indicator, { title: documentTitle, status: document2.status })
2582
+ ), /* @__PURE__ */ React41.createElement(
2583
+ import_ui30.Menu,
2436
2584
  {
2437
2585
  MenuListProps: {
2438
- subheader: /* @__PURE__ */ React39.createElement(import_ui28.ListSubheader, { sx: { color: "accent.main", fontStyle: "italic", fontWeight: "300" } }, (0, import_i18n26.__)("Recent", "elementor"))
2586
+ subheader: /* @__PURE__ */ React41.createElement(import_ui30.ListSubheader, { sx: { color: "accent.main", fontStyle: "italic", fontWeight: "300" } }, (0, import_i18n28.__)("Recent", "elementor"))
2439
2587
  },
2440
2588
  PaperProps: { sx: { mt: 2.5, width: 320 } },
2441
- ...(0, import_ui28.bindMenu)(popupState)
2589
+ ...(0, import_ui30.bindMenu)(popupState)
2442
2590
  },
2443
- recentPosts.map((post) => /* @__PURE__ */ React39.createElement(PostListItem2, { key: post.id, post, closePopup: popupState.close })),
2444
- recentPosts.length === 0 && /* @__PURE__ */ React39.createElement(import_ui28.MenuItem, { disabled: true }, /* @__PURE__ */ React39.createElement(
2445
- import_ui28.ListItemText,
2591
+ recentPosts.map((post) => /* @__PURE__ */ React41.createElement(PostListItem2, { key: post.id, post, closePopup: popupState.close })),
2592
+ recentPosts.length === 0 && /* @__PURE__ */ React41.createElement(import_ui30.MenuItem, { disabled: true }, /* @__PURE__ */ React41.createElement(
2593
+ import_ui30.ListItemText,
2446
2594
  {
2447
2595
  primaryTypographyProps: {
2448
2596
  variant: "caption",
2449
2597
  fontStyle: "italic"
2450
2598
  },
2451
- primary: (0, import_i18n26.__)("There are no other pages or templates on this site yet.", "elementor")
2599
+ primary: (0, import_i18n28.__)("There are no other pages or templates on this site yet.", "elementor")
2452
2600
  }
2453
2601
  )),
2454
- /* @__PURE__ */ React39.createElement(import_ui28.Divider, { disabled: recentPosts.length === 0 }),
2455
- /* @__PURE__ */ React39.createElement(CreatePostListItem, { closePopup: popupState.close })
2602
+ /* @__PURE__ */ React41.createElement(import_ui30.Divider, { disabled: recentPosts.length === 0 }),
2603
+ /* @__PURE__ */ React41.createElement(CreatePostListItem, { closePopup: popupState.close })
2456
2604
  ));
2457
2605
  }
2458
2606
 
2459
2607
  // src/hooks/use-toggle-button-props.ts
2460
- var import_icons21 = require("@elementor/icons");
2461
- var import_i18n27 = require("@wordpress/i18n");
2608
+ var import_icons23 = require("@elementor/icons");
2609
+ var import_i18n29 = require("@wordpress/i18n");
2462
2610
  function useToggleButtonProps() {
2463
2611
  const { isOpen: selectedState, isBlocked } = usePanelStatus();
2464
2612
  const { open, close } = usePanelActions();
2465
2613
  return {
2466
- title: (0, import_i18n27.__)("Site content", "elementor"),
2467
- icon: import_icons21.PagesIcon,
2614
+ title: (0, import_i18n29.__)("Site content", "elementor"),
2615
+ icon: import_icons23.PagesIcon,
2468
2616
  onClick: () => {
2469
2617
  const extendedWindow = window;
2470
2618
  const config = extendedWindow?.elementorCommon?.eventsManager?.config;