Merge pull request #3761 from matrix-org/travis/babel7-wp-es6-export

Convert CommonJS exports to ES6 exports
This commit is contained in:
Travis Ralston 2020-01-08 09:09:11 -07:00 committed by GitHub
commit 59f608ffd6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
159 changed files with 745 additions and 717 deletions

View file

@ -1,6 +1,7 @@
/*
Copyright 2017 Aidan Gauland
Copyright 2018 New Vector Ltd.
Copyright 2019 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -23,7 +24,7 @@ import { _t } from '../../../languageHandler';
/**
* Basic container for buttons in modal dialogs.
*/
module.exports = createReactClass({
export default createReactClass({
displayName: "DialogButtons",
propTypes: {

View file

@ -20,7 +20,7 @@ import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
import {Key} from "../../../Keyboard";
module.exports = createReactClass({
export default createReactClass({
displayName: 'EditableText',
propTypes: {

View file

@ -17,7 +17,7 @@ limitations under the License.
import React from "react";
import createReactClass from 'create-react-class';
module.exports = createReactClass({
export default createReactClass({
displayName: 'InlineSpinner',
render: function() {

View file

@ -24,7 +24,7 @@ import { formatCommaSeparatedList } from '../../../utils/FormattingUtils';
import * as sdk from "../../../index";
import {MatrixEvent} from "matrix-js-sdk";
module.exports = createReactClass({
export default createReactClass({
displayName: 'MemberEventListSummary',
propTypes: {

View file

@ -17,7 +17,7 @@ limitations under the License.
import React from 'react';
import createReactClass from 'create-react-class';
module.exports = createReactClass({
export default createReactClass({
displayName: 'MessageSpinner',
render: function() {

View file

@ -1,5 +1,6 @@
/*
Copyright 2018 New Vector Ltd
Copyright 2019 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -22,7 +23,7 @@ import WidgetUtils from '../../../utils/WidgetUtils';
import * as sdk from '../../../index';
import {MatrixClientPeg} from '../../../MatrixClientPeg';
module.exports = createReactClass({
export default createReactClass({
displayName: 'PersistentApp',
getInitialState: function() {

View file

@ -22,7 +22,7 @@ import { _t } from '../../../languageHandler';
import Field from "./Field";
import {Key} from "../../../Keyboard";
module.exports = createReactClass({
export default createReactClass({
displayName: 'PowerSelector',
propTypes: {

View file

@ -1,5 +1,6 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2019 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -18,7 +19,7 @@ import React from "react";
import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
module.exports = createReactClass({
export default createReactClass({
displayName: 'ProgressBar',
propTypes: {
value: PropTypes.number,

View file

@ -1,5 +1,6 @@
/*
Copyright 2017 Travis Ralston
Copyright 2019 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -21,7 +22,7 @@ import SettingsStore from "../../../settings/SettingsStore";
import { _t } from '../../../languageHandler';
import ToggleSwitch from "./ToggleSwitch";
module.exports = createReactClass({
export default createReactClass({
displayName: 'SettingsFlag',
propTypes: {
name: PropTypes.string.isRequired,

View file

@ -1,5 +1,6 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2019 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -17,7 +18,7 @@ limitations under the License.
import React from "react";
import createReactClass from 'create-react-class';
module.exports = createReactClass({
export default createReactClass({
displayName: 'Spinner',
render: function() {

View file

@ -1,5 +1,6 @@
/*
Copyright 2015 OpenMarket Ltd
Copyright 2019 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -83,4 +84,4 @@ Tinter.registerTintable(function() {
}
});
module.exports = TintableSvg;
export default TintableSvg;

View file

@ -2,6 +2,7 @@
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2019 New Vector Ltd
Copyright 2019 Michael Telatynski <7t3chguy@gmail.com>
Copyright 2019 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -26,7 +27,7 @@ import classNames from 'classnames';
const MIN_TOOLTIP_HEIGHT = 25;
module.exports = createReactClass({
export default createReactClass({
displayName: 'Tooltip',
propTypes: {

View file

@ -19,7 +19,7 @@ import React from 'react';
import createReactClass from 'create-react-class';
import * as sdk from '../../../index';
module.exports = createReactClass({
export default createReactClass({
displayName: 'TooltipButton',
getInitialState: function() {

View file

@ -20,7 +20,7 @@ import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
import { _t } from '../../../languageHandler';
module.exports = createReactClass({
export default createReactClass({
displayName: 'TruncatedList',
propTypes: {

View file

@ -1,5 +1,6 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2019 The Matrix.org Foundation C.I.C.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@ -19,7 +20,7 @@ import PropTypes from 'prop-types';
import createReactClass from 'create-react-class';
import { _t } from '../../../languageHandler';
module.exports = createReactClass({
export default createReactClass({
displayName: 'UserSelector',
propTypes: {