@elementor/editor-site-navigation 0.4.2 → 0.5.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -3,6 +3,28 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [0.5.1](https://github.com/elementor/elementor-packages/compare/@elementor/editor-site-navigation@0.5.0...@elementor/editor-site-navigation@0.5.1) (2023-06-05)
7
+
8
+
9
+ ### Bug Fixes
10
+
11
+ * **site-navigation:** chip margin removed from library ([#49](https://github.com/elementor/elementor-packages/issues/49)) ([fdcbc85](https://github.com/elementor/elementor-packages/commit/fdcbc856495c005a2f66b0b267abecf0d65522a2))
12
+
13
+
14
+
15
+
16
+
17
+ # [0.5.0](https://github.com/elementor/elementor-packages/compare/@elementor/editor-site-navigation@0.4.2...@elementor/editor-site-navigation@0.5.0) (2023-06-01)
18
+
19
+
20
+ ### Features
21
+
22
+ * add support for React 18 [ED-10905] ([#46](https://github.com/elementor/elementor-packages/issues/46)) ([c8915c6](https://github.com/elementor/elementor-packages/commit/c8915c6ea62550bcdeb5c8a576f311bedc35bcad))
23
+
24
+
25
+
26
+
27
+
6
28
  ## [0.4.2](https://github.com/elementor/elementor-packages/compare/@elementor/editor-site-navigation@0.4.1...@elementor/editor-site-navigation@0.4.2) (2023-05-30)
7
29
 
8
30
  **Note:** Version bump only for package @elementor/editor-site-navigation
package/dist/index.js CHANGED
@@ -129,7 +129,8 @@ function DocTypeChip({ postType, docType, label }) {
129
129
  variant: "standard",
130
130
  label,
131
131
  color,
132
- icon: /* @__PURE__ */ React2.createElement(Icon, null)
132
+ icon: /* @__PURE__ */ React2.createElement(Icon, null),
133
+ sx: { ml: 3 }
133
134
  }
134
135
  );
135
136
  }
package/dist/index.mjs CHANGED
@@ -111,7 +111,8 @@ function DocTypeChip({ postType, docType, label }) {
111
111
  variant: "standard",
112
112
  label,
113
113
  color,
114
- icon: /* @__PURE__ */ React2.createElement(Icon, null)
114
+ icon: /* @__PURE__ */ React2.createElement(Icon, null),
115
+ sx: { ml: 3 }
115
116
  }
116
117
  );
117
118
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elementor/editor-site-navigation",
3
- "version": "0.4.2",
3
+ "version": "0.5.1",
4
4
  "private": false,
5
5
  "author": "Elementor Team",
6
6
  "homepage": "https://elementor.com/",
@@ -32,19 +32,19 @@
32
32
  "dev": "tsup src/index.ts --format esm --clean"
33
33
  },
34
34
  "dependencies": {
35
- "@elementor/editor-app-bar": "^0.4.1",
36
- "@elementor/editor-documents": "^0.5.0",
37
- "@elementor/icons": "^0.2.1",
35
+ "@elementor/editor-app-bar": "^0.5.0",
36
+ "@elementor/editor-documents": "^0.6.0",
37
+ "@elementor/icons": "^0.3.0",
38
38
  "@elementor/ui": "^1.4.50",
39
39
  "@wordpress/api-fetch": "^6.27.0",
40
40
  "@wordpress/i18n": "^4.31.0",
41
41
  "@wordpress/url": "^3.31.0"
42
42
  },
43
43
  "peerDependencies": {
44
- "react": "17.x"
44
+ "react": "17.x || 18.x"
45
45
  },
46
46
  "elementor": {
47
47
  "type": "extension"
48
48
  },
49
- "gitHead": "2299a390624d60ea9d1e35e7d8dcc4208816d555"
49
+ "gitHead": "14587e8fd0c01c4722c8d4622e68b60c2cc331c6"
50
50
  }
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { render, waitFor } from '@testing-library/react';
2
+ import { fireEvent, render, waitFor } from '@testing-library/react';
3
3
  import { useHostDocument, useActiveDocument, useNavigateToDocument } from '@elementor/editor-documents';
4
4
  import RecentlyEdited from '../recently-edited';
5
5
  import { createMockDocument } from 'test-utils';
@@ -49,7 +49,7 @@ describe( '@elementor/recently-edited - Top bar add new page', () => {
49
49
 
50
50
  // Act.
51
51
  const buttons = getAllByRole( 'button' );
52
- buttons[ 0 ].click(); // Opens the recently edited menu
52
+ fireEvent.click( buttons[ 0 ] ); // Opens the recently edited menu
53
53
 
54
54
  // Assert.
55
55
  const label = getByText( 'Add new page', { exact: false } );
@@ -73,10 +73,10 @@ describe( '@elementor/recently-edited - Top bar add new page', () => {
73
73
 
74
74
  // Act.
75
75
  const buttons = getAllByRole( 'button' );
76
- buttons[ 0 ].click(); // Opens the recently edited menu
76
+ fireEvent.click( buttons[ 0 ] ); // Opens the recently edited menu
77
77
 
78
78
  const addNewPage = getByText( 'Add new page', { exact: false } );
79
- addNewPage.click();
79
+ fireEvent.click( addNewPage );
80
80
 
81
81
  // Assert.
82
82
  await waitFor( () => {
@@ -1,5 +1,5 @@
1
1
  import * as React from 'react';
2
- import { render } from '@testing-library/react';
2
+ import { fireEvent, render } from '@testing-library/react';
3
3
  import { useHostDocument, useActiveDocument, useNavigateToDocument } from '@elementor/editor-documents';
4
4
  import RecentlyEdited from '../recently-edited';
5
5
  import { createMockDocument } from 'test-utils';
@@ -126,7 +126,7 @@ describe( '@elementor/recently-edited - Top bar Recently Edited', () => {
126
126
 
127
127
  // Act.
128
128
  const buttons = getAllByRole( 'button' );
129
- buttons[ 0 ].click(); // Opens the recently edited menu
129
+ fireEvent.click( buttons[ 0 ] ); // Opens the recently edited menu
130
130
 
131
131
  // Assert.
132
132
  const label = getByText( 'There are no other pages or templates on this site yet', { exact: false } );
@@ -165,7 +165,7 @@ describe( '@elementor/recently-edited - Top bar Recently Edited', () => {
165
165
 
166
166
  // Act.
167
167
  const buttons = getAllByRole( 'button' );
168
- buttons[ 0 ].click(); // Opens the recently edited menu
168
+ fireEvent.click( buttons[ 0 ] ); // Opens the recently edited menu
169
169
 
170
170
  // Assert.
171
171
  const menu = getByRole( 'menu' );
@@ -225,7 +225,7 @@ describe( '@elementor/recently-edited - Top bar Recently Edited', () => {
225
225
  expect( getByText( 'Header title with special char ¥' ) ).toBeInTheDocument();
226
226
 
227
227
  // Open the posts list.
228
- getByRole( 'button' ).click();
228
+ fireEvent.click( getByRole( 'button' ) );
229
229
 
230
230
  // Assert - the post title should be rendered with the HTML entity.
231
231
  expect( getByText( 'Post title with <h1>HTML</h1>' ) ).toBeInTheDocument();
@@ -256,10 +256,10 @@ describe( '@elementor/recently-edited - Top bar Recently Edited', () => {
256
256
  const { getByText, getByRole } = render( <RecentlyEdited /> );
257
257
 
258
258
  // Open the posts list.
259
- getByRole( 'button' ).click();
259
+ fireEvent.click( getByRole( 'button' ) );
260
260
 
261
261
  // Act.
262
- getByText( 'Test post' ).click();
262
+ fireEvent.click( getByText( 'Test post' ) );
263
263
 
264
264
  // Assert.
265
265
  expect( navigateToDocument ).toHaveBeenCalledTimes( 1 );
@@ -24,6 +24,7 @@ export default function DocTypeChip( { postType, docType, label }: Props ) {
24
24
  label={ label }
25
25
  color={ color }
26
26
  icon={ <Icon /> }
27
+ sx={ { ml: 3 } }
27
28
  />
28
29
  );
29
30
  }
@@ -1,5 +1,4 @@
1
- import { renderHook } from '@testing-library/react-hooks';
2
- import { waitFor } from '@testing-library/react';
1
+ import { waitFor, renderHook } from '@testing-library/react';
3
2
  import apiFetch from '@wordpress/api-fetch';
4
3
  import useCreatePage, { endpointPath } from '../use-create-page';
5
4
 
@@ -1,5 +1,4 @@
1
- import { waitFor } from '@testing-library/react';
2
- import { renderHook } from '@testing-library/react-hooks';
1
+ import { waitFor, renderHook } from '@testing-library/react';
3
2
  import apiFetch from '@wordpress/api-fetch';
4
3
  import useRecentPosts, { endpointPath } from '../use-recent-posts';
5
4