Skip to content

Commit

Permalink
chore: remove 'matchMedia' mock
Browse files Browse the repository at this point in the history
The 'matchMedia' mock was previously introduced to workaround the
'Hidden' component of Material UI not rendering in case media queries
are not available in the environment.

With JSON Forms 3.3.0 we removed all usages of the 'Hidden' component
so the 'matchMedia' mock is also no longer required.
  • Loading branch information
sdirix committed Aug 27, 2024
1 parent bd11754 commit 8baefa6
Show file tree
Hide file tree
Showing 35 changed files with 0 additions and 70 deletions.
36 changes: 0 additions & 36 deletions packages/material-renderers/test/renderers/MatchMediaMock.ts

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import React from 'react';

import Enzyme, { mount, ReactWrapper } from 'enzyme';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import React from 'react';

import Enzyme, { mount, ReactWrapper } from 'enzyme';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import React from 'react';

import Enzyme, { mount, ReactWrapper } from 'enzyme';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import {
ArrayTranslationEnum,
ControlElement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import {
ArrayTranslationEnum,
ControlElement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import * as React from 'react';
import { ControlElement, NOT_APPLICABLE } from '@jsonforms/core';
import BooleanCell, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import * as React from 'react';
import {
ControlElement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import * as React from 'react';
import {
ControlElement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import React from 'react';
import {
Categorization,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import React from 'react';
import {
Categorization,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import * as React from 'react';
import { ControlElement, NOT_APPLICABLE } from '@jsonforms/core';
import { JsonFormsStateProvider } from '@jsonforms/react';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import { ControlElement, NOT_APPLICABLE } from '@jsonforms/core';
import MaterialDateControl, {
materialDateControlTester,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import React from 'react';
import {
ControlElement,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import './MatchMediaMock';
import { ControlElement, NOT_APPLICABLE } from '@jsonforms/core';
import { JsonForms } from '@jsonforms/react';
import Enzyme, { mount, ReactWrapper } from 'enzyme';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import * as React from 'react';
import { ControlElement } from '@jsonforms/core';
import MaterialEnumCell, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import * as React from 'react';
import { ControlElement } from '@jsonforms/core';
import { materialRenderers, MuiSelect, MaterialEnumControl } from '../../src';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import * as React from 'react';
import Enzyme, { mount } from 'enzyme';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import Enzyme, { mount, ReactWrapper } from 'enzyme';
import { materialRenderers } from '../../src';
import Adapter from '@wojtekmaj/enzyme-adapter-react-17';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import * as React from 'react';
import { ControlElement, NOT_APPLICABLE } from '@jsonforms/core';
import IntegerCell, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import * as React from 'react';
import { LabelElement, NOT_APPLICABLE } from '@jsonforms/core';
import '../../src/cells';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import React from 'react';
import Enzyme, { mount } from 'enzyme';
import { materialRenderers } from '../../src';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import {
ArrayTranslationEnum,
ControlElement,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import React from 'react';
import Enzyme, { mount, ReactWrapper } from 'enzyme';
import { MaterialNativeControl } from '../../src/controls/MaterialNativeControl';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import * as React from 'react';
import { ControlElement, JsonSchema, NOT_APPLICABLE } from '@jsonforms/core';
import NumberCell, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import { ControlElement, NOT_APPLICABLE } from '@jsonforms/core';
import * as React from 'react';
import { materialRenderers } from '../../src';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import * as React from 'react';
import { ControlElement } from '@jsonforms/core';
import MaterialOneOfEnumCell, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import * as React from 'react';
import { ControlElement, NOT_APPLICABLE } from '@jsonforms/core';
import MaterialOneOfRadioGroupControl, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import React from 'react';
import Dialog from '@mui/material/Dialog';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import * as React from 'react';
import { ControlElement, NOT_APPLICABLE } from '@jsonforms/core';
import MaterialRadioGroupControl, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import * as React from 'react';
import { ControlElement, JsonSchema, NOT_APPLICABLE } from '@jsonforms/core';
import SliderControl, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import * as React from 'react';
import { ControlElement, JsonSchema, NOT_APPLICABLE } from '@jsonforms/core';
import TextCell, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import React from 'react';
import Enzyme, { mount, ReactWrapper } from 'enzyme';
import { MaterialTextControl } from '../../src/controls/MaterialTextControl';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import * as React from 'react';
import { ControlElement, NOT_APPLICABLE } from '@jsonforms/core';
import TimeCell, {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
import './MatchMediaMock';
import { ControlElement, NOT_APPLICABLE } from '@jsonforms/core';
import MaterialTimeControl, {
materialTimeControlTester,
Expand Down

0 comments on commit 8baefa6

Please sign in to comment.