@elementor/editor-site-navigation 4.5.0-1251 → 4.5.0-1253

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.d.mts CHANGED
@@ -11,12 +11,17 @@ declare function extendIconsMap(additionalIcons: IconsMap): void;
11
11
  declare function init(): void;
12
12
 
13
13
  type SiteContentSection = {
14
+ description?: string;
14
15
  id: string;
15
16
  label?: string;
16
17
  priority?: number;
17
18
  render: () => ReactNode;
19
+ renderHubCount?: () => ReactNode;
20
+ usesDrillInToolbarShell?: boolean;
21
+ wrapDrillInPanel?: (panel: ReactNode) => ReactNode;
18
22
  };
19
23
  declare function registerSiteContentSection(section: SiteContentSection): void;
24
+ declare function getSiteContentSectionById(sectionId: string): SiteContentSection | undefined;
20
25
  declare function getSiteContentSections(): SiteContentSection[];
21
26
  declare function resetSiteContentSections(): void;
22
27
 
@@ -71,13 +76,17 @@ type SectionHandlers = {
71
76
  startCreate: () => void;
72
77
  };
73
78
  type ContentPanelCoordinatorValue = {
79
+ clearPendingCreate: () => void;
74
80
  registerSection: (type: ContentPanelSectionId, handlers: SectionHandlers) => void;
75
81
  requestCreate: (type: ContentPanelSectionId) => void;
76
82
  unregisterSection: (type: ContentPanelSectionId) => void;
77
83
  };
78
- declare function ContentPanelCoordinatorProvider({ children }: {
84
+ type ContentPanelCoordinatorProviderProps = {
79
85
  children: ReactNode;
80
- }): React.JSX.Element;
86
+ clearPendingCreateRef?: React.MutableRefObject<(() => void) | undefined>;
87
+ onNavigateToSection?: (type: ContentPanelSectionId) => void;
88
+ };
89
+ declare function ContentPanelCoordinatorProvider({ children, clearPendingCreateRef, onNavigateToSection, }: ContentPanelCoordinatorProviderProps): React.JSX.Element;
81
90
  declare function useContentPanelCoordinator(): ContentPanelCoordinatorValue;
82
91
 
83
92
  type SiteContentSortOption = 'newest' | 'oldest';
@@ -129,9 +138,10 @@ declare function useSiteContentSectionToolbar(): SiteContentSectionToolbarContex
129
138
 
130
139
  type Props$2 = {
131
140
  addAction?: ReactNode;
141
+ actionsInHeader?: boolean;
132
142
  searchAriaLabel?: string;
133
143
  };
134
- declare function ContentPanelSectionToolbar({ addAction, searchAriaLabel }: Props$2): React.JSX.Element;
144
+ declare function ContentPanelSectionToolbar({ addAction, actionsInHeader, searchAriaLabel }: Props$2): React.JSX.Element;
135
145
 
136
146
  type Props$1 = {
137
147
  count: number;
@@ -184,21 +194,21 @@ declare function getContentPanelListItemSx(trailingActionCount: number): {
184
194
  paddingInline: number;
185
195
  };
186
196
  declare function getContentPanelListItemRowStateSx(isActive: boolean, allowRowHover: boolean): {
187
- borderRadius: number;
188
- backgroundColor: string;
189
- '&:hover': {
197
+ '&&': {
190
198
  backgroundColor: string;
199
+ '&:hover': {
200
+ backgroundColor: string;
201
+ };
191
202
  };
203
+ '&&:hover'?: undefined;
192
204
  } | {
193
- borderRadius: number;
194
- backgroundColor?: undefined;
195
- '&:hover'?: undefined;
205
+ '&&'?: undefined;
206
+ '&&:hover'?: undefined;
196
207
  } | {
197
- borderRadius: number;
198
- '&:hover': {
208
+ '&&:hover': {
199
209
  backgroundColor: string;
200
210
  };
201
- backgroundColor?: undefined;
211
+ '&&'?: undefined;
202
212
  };
203
213
  declare const contentPanelListItemButtonSx: {
204
214
  justifyContent: string;
@@ -258,6 +268,13 @@ declare const env: {
258
268
  popups?: PopupsSiteContentEnv;
259
269
  };
260
270
 
271
+ type SiteContentView = ContentPanelSectionId | null;
272
+ declare function setPendingSiteContentSection(sectionId: ContentPanelSectionId): void;
273
+ declare function setPendingSiteContentHome(): void;
274
+ declare function getInitialSiteContentView(): SiteContentView;
275
+ declare function notifySiteContentViewChange(view: SiteContentView): void;
276
+ declare function getActiveSiteContentView(): SiteContentView;
277
+
261
278
  type SiteContentListItemActionsProps = {
262
279
  post: Post;
263
280
  title: string;
@@ -265,4 +282,4 @@ type SiteContentListItemActionsProps = {
265
282
  declare const SiteContentListItemActionsSlot: React.ComponentType<SiteContentListItemActionsProps>;
266
283
  declare const injectIntoSiteContentListItemActions: (args: _elementor_locations.InjectArgs<SiteContentListItemActionsProps>) => void;
267
284
 
268
- export { ContentPanelAddIconButton, ContentPanelCoordinatorProvider, type ContentPanelSectionId, DEFAULT_SITE_CONTENT_SORT, EMPTY_SITE_CONTENT_STATUS_FILTERS, POPUPS_SITE_CONTENT_SECTION_ID, POST_PER_PAGE, PopupSectionAddButton, type PopupSectionAddButtonRef, type PopupsSiteContentEnv, type Post, SITE_CONTENT_SELECTABLE_STATUS_FILTERS, CollapsibleList as SiteContentCollapsibleList, EditModeTemplate as SiteContentEditModeTemplate, type SiteContentHeaderCreateItem, ErrorState as SiteContentListErrorState, type SiteContentListItemActionsProps, SiteContentListItemActionsSlot, PageTitleAndStatus as SiteContentPageTitleAndStatus, PostListPaginationActions as SiteContentPaginationActions, type SiteContentSection, ContentPanelSectionToolbar as SiteContentSectionToolbar, SiteContentSectionToolbarProvider, type SiteContentSelectableStatus, type SiteContentSortOption, type SiteContentStatusFilters, contentPanelListItemButtonSx, contentPanelListRowPaddingSx, env, extendIconsMap, getContentPanelListItemRowStateSx, getContentPanelListItemSx, getRestOrderForSiteContentSort, getRestStatusForSiteContentFilters, getSiteContentHeaderCreateItems, getSiteContentSections, getSiteContentStatusFilterForCount, hasActiveSiteContentStatusFilters, init, injectIntoSiteContentListItemActions, isSiteContentListNarrowed, isSiteContentTrashFilterActive, registerSiteContentHeaderCreateItem, registerSiteContentSection, resetSiteContentHeaderCreateItems, resetSiteContentSections, serializeSiteContentStatusFilters, useContentPanelCoordinator, usePostListPagination, useSiteContentSectionToolbar };
285
+ export { ContentPanelAddIconButton, ContentPanelCoordinatorProvider, type ContentPanelSectionId, DEFAULT_SITE_CONTENT_SORT, EMPTY_SITE_CONTENT_STATUS_FILTERS, POPUPS_SITE_CONTENT_SECTION_ID, POST_PER_PAGE, PopupSectionAddButton, type PopupSectionAddButtonRef, type PopupsSiteContentEnv, type Post, SITE_CONTENT_SELECTABLE_STATUS_FILTERS, CollapsibleList as SiteContentCollapsibleList, EditModeTemplate as SiteContentEditModeTemplate, type SiteContentHeaderCreateItem, ErrorState as SiteContentListErrorState, type SiteContentListItemActionsProps, SiteContentListItemActionsSlot, PageTitleAndStatus as SiteContentPageTitleAndStatus, PostListPaginationActions as SiteContentPaginationActions, type SiteContentSection, ContentPanelSectionToolbar as SiteContentSectionToolbar, SiteContentSectionToolbarProvider, type SiteContentSelectableStatus, type SiteContentSortOption, type SiteContentStatusFilters, type SiteContentView, contentPanelListItemButtonSx, contentPanelListRowPaddingSx, env, extendIconsMap, getActiveSiteContentView, getContentPanelListItemRowStateSx, getContentPanelListItemSx, getInitialSiteContentView, getRestOrderForSiteContentSort, getRestStatusForSiteContentFilters, getSiteContentHeaderCreateItems, getSiteContentSectionById, getSiteContentSections, getSiteContentStatusFilterForCount, hasActiveSiteContentStatusFilters, init, injectIntoSiteContentListItemActions, isSiteContentListNarrowed, isSiteContentTrashFilterActive, notifySiteContentViewChange, registerSiteContentHeaderCreateItem, registerSiteContentSection, resetSiteContentHeaderCreateItems, resetSiteContentSections, serializeSiteContentStatusFilters, setPendingSiteContentHome, setPendingSiteContentSection, useContentPanelCoordinator, usePostListPagination, useSiteContentSectionToolbar };
package/dist/index.d.ts CHANGED
@@ -11,12 +11,17 @@ declare function extendIconsMap(additionalIcons: IconsMap): void;
11
11
  declare function init(): void;
12
12
 
13
13
  type SiteContentSection = {
14
+ description?: string;
14
15
  id: string;
15
16
  label?: string;
16
17
  priority?: number;
17
18
  render: () => ReactNode;
19
+ renderHubCount?: () => ReactNode;
20
+ usesDrillInToolbarShell?: boolean;
21
+ wrapDrillInPanel?: (panel: ReactNode) => ReactNode;
18
22
  };
19
23
  declare function registerSiteContentSection(section: SiteContentSection): void;
24
+ declare function getSiteContentSectionById(sectionId: string): SiteContentSection | undefined;
20
25
  declare function getSiteContentSections(): SiteContentSection[];
21
26
  declare function resetSiteContentSections(): void;
22
27
 
@@ -71,13 +76,17 @@ type SectionHandlers = {
71
76
  startCreate: () => void;
72
77
  };
73
78
  type ContentPanelCoordinatorValue = {
79
+ clearPendingCreate: () => void;
74
80
  registerSection: (type: ContentPanelSectionId, handlers: SectionHandlers) => void;
75
81
  requestCreate: (type: ContentPanelSectionId) => void;
76
82
  unregisterSection: (type: ContentPanelSectionId) => void;
77
83
  };
78
- declare function ContentPanelCoordinatorProvider({ children }: {
84
+ type ContentPanelCoordinatorProviderProps = {
79
85
  children: ReactNode;
80
- }): React.JSX.Element;
86
+ clearPendingCreateRef?: React.MutableRefObject<(() => void) | undefined>;
87
+ onNavigateToSection?: (type: ContentPanelSectionId) => void;
88
+ };
89
+ declare function ContentPanelCoordinatorProvider({ children, clearPendingCreateRef, onNavigateToSection, }: ContentPanelCoordinatorProviderProps): React.JSX.Element;
81
90
  declare function useContentPanelCoordinator(): ContentPanelCoordinatorValue;
82
91
 
83
92
  type SiteContentSortOption = 'newest' | 'oldest';
@@ -129,9 +138,10 @@ declare function useSiteContentSectionToolbar(): SiteContentSectionToolbarContex
129
138
 
130
139
  type Props$2 = {
131
140
  addAction?: ReactNode;
141
+ actionsInHeader?: boolean;
132
142
  searchAriaLabel?: string;
133
143
  };
134
- declare function ContentPanelSectionToolbar({ addAction, searchAriaLabel }: Props$2): React.JSX.Element;
144
+ declare function ContentPanelSectionToolbar({ addAction, actionsInHeader, searchAriaLabel }: Props$2): React.JSX.Element;
135
145
 
136
146
  type Props$1 = {
137
147
  count: number;
@@ -184,21 +194,21 @@ declare function getContentPanelListItemSx(trailingActionCount: number): {
184
194
  paddingInline: number;
185
195
  };
186
196
  declare function getContentPanelListItemRowStateSx(isActive: boolean, allowRowHover: boolean): {
187
- borderRadius: number;
188
- backgroundColor: string;
189
- '&:hover': {
197
+ '&&': {
190
198
  backgroundColor: string;
199
+ '&:hover': {
200
+ backgroundColor: string;
201
+ };
191
202
  };
203
+ '&&:hover'?: undefined;
192
204
  } | {
193
- borderRadius: number;
194
- backgroundColor?: undefined;
195
- '&:hover'?: undefined;
205
+ '&&'?: undefined;
206
+ '&&:hover'?: undefined;
196
207
  } | {
197
- borderRadius: number;
198
- '&:hover': {
208
+ '&&:hover': {
199
209
  backgroundColor: string;
200
210
  };
201
- backgroundColor?: undefined;
211
+ '&&'?: undefined;
202
212
  };
203
213
  declare const contentPanelListItemButtonSx: {
204
214
  justifyContent: string;
@@ -258,6 +268,13 @@ declare const env: {
258
268
  popups?: PopupsSiteContentEnv;
259
269
  };
260
270
 
271
+ type SiteContentView = ContentPanelSectionId | null;
272
+ declare function setPendingSiteContentSection(sectionId: ContentPanelSectionId): void;
273
+ declare function setPendingSiteContentHome(): void;
274
+ declare function getInitialSiteContentView(): SiteContentView;
275
+ declare function notifySiteContentViewChange(view: SiteContentView): void;
276
+ declare function getActiveSiteContentView(): SiteContentView;
277
+
261
278
  type SiteContentListItemActionsProps = {
262
279
  post: Post;
263
280
  title: string;
@@ -265,4 +282,4 @@ type SiteContentListItemActionsProps = {
265
282
  declare const SiteContentListItemActionsSlot: React.ComponentType<SiteContentListItemActionsProps>;
266
283
  declare const injectIntoSiteContentListItemActions: (args: _elementor_locations.InjectArgs<SiteContentListItemActionsProps>) => void;
267
284
 
268
- export { ContentPanelAddIconButton, ContentPanelCoordinatorProvider, type ContentPanelSectionId, DEFAULT_SITE_CONTENT_SORT, EMPTY_SITE_CONTENT_STATUS_FILTERS, POPUPS_SITE_CONTENT_SECTION_ID, POST_PER_PAGE, PopupSectionAddButton, type PopupSectionAddButtonRef, type PopupsSiteContentEnv, type Post, SITE_CONTENT_SELECTABLE_STATUS_FILTERS, CollapsibleList as SiteContentCollapsibleList, EditModeTemplate as SiteContentEditModeTemplate, type SiteContentHeaderCreateItem, ErrorState as SiteContentListErrorState, type SiteContentListItemActionsProps, SiteContentListItemActionsSlot, PageTitleAndStatus as SiteContentPageTitleAndStatus, PostListPaginationActions as SiteContentPaginationActions, type SiteContentSection, ContentPanelSectionToolbar as SiteContentSectionToolbar, SiteContentSectionToolbarProvider, type SiteContentSelectableStatus, type SiteContentSortOption, type SiteContentStatusFilters, contentPanelListItemButtonSx, contentPanelListRowPaddingSx, env, extendIconsMap, getContentPanelListItemRowStateSx, getContentPanelListItemSx, getRestOrderForSiteContentSort, getRestStatusForSiteContentFilters, getSiteContentHeaderCreateItems, getSiteContentSections, getSiteContentStatusFilterForCount, hasActiveSiteContentStatusFilters, init, injectIntoSiteContentListItemActions, isSiteContentListNarrowed, isSiteContentTrashFilterActive, registerSiteContentHeaderCreateItem, registerSiteContentSection, resetSiteContentHeaderCreateItems, resetSiteContentSections, serializeSiteContentStatusFilters, useContentPanelCoordinator, usePostListPagination, useSiteContentSectionToolbar };
285
+ export { ContentPanelAddIconButton, ContentPanelCoordinatorProvider, type ContentPanelSectionId, DEFAULT_SITE_CONTENT_SORT, EMPTY_SITE_CONTENT_STATUS_FILTERS, POPUPS_SITE_CONTENT_SECTION_ID, POST_PER_PAGE, PopupSectionAddButton, type PopupSectionAddButtonRef, type PopupsSiteContentEnv, type Post, SITE_CONTENT_SELECTABLE_STATUS_FILTERS, CollapsibleList as SiteContentCollapsibleList, EditModeTemplate as SiteContentEditModeTemplate, type SiteContentHeaderCreateItem, ErrorState as SiteContentListErrorState, type SiteContentListItemActionsProps, SiteContentListItemActionsSlot, PageTitleAndStatus as SiteContentPageTitleAndStatus, PostListPaginationActions as SiteContentPaginationActions, type SiteContentSection, ContentPanelSectionToolbar as SiteContentSectionToolbar, SiteContentSectionToolbarProvider, type SiteContentSelectableStatus, type SiteContentSortOption, type SiteContentStatusFilters, type SiteContentView, contentPanelListItemButtonSx, contentPanelListRowPaddingSx, env, extendIconsMap, getActiveSiteContentView, getContentPanelListItemRowStateSx, getContentPanelListItemSx, getInitialSiteContentView, getRestOrderForSiteContentSort, getRestStatusForSiteContentFilters, getSiteContentHeaderCreateItems, getSiteContentSectionById, getSiteContentSections, getSiteContentStatusFilterForCount, hasActiveSiteContentStatusFilters, init, injectIntoSiteContentListItemActions, isSiteContentListNarrowed, isSiteContentTrashFilterActive, notifySiteContentViewChange, registerSiteContentHeaderCreateItem, registerSiteContentSection, resetSiteContentHeaderCreateItems, resetSiteContentSections, serializeSiteContentStatusFilters, setPendingSiteContentHome, setPendingSiteContentSection, useContentPanelCoordinator, usePostListPagination, useSiteContentSectionToolbar };