chore: remove unused imports (#1534)
This commit is contained in:
parent
99d4b2b50c
commit
4f6e8cea44
@ -3,7 +3,6 @@ import React from 'react';
|
|||||||
import styled from 'react-emotion';
|
import styled from 'react-emotion';
|
||||||
import { partial } from 'lodash';
|
import { partial } from 'lodash';
|
||||||
import {
|
import {
|
||||||
Icon,
|
|
||||||
AuthenticationPage,
|
AuthenticationPage,
|
||||||
buttons,
|
buttons,
|
||||||
shadows,
|
shadows,
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import GoTrue from "gotrue-js";
|
import GoTrue from "gotrue-js";
|
||||||
import jwtDecode from 'jwt-decode';
|
import jwtDecode from 'jwt-decode';
|
||||||
import { List } from 'immutable';
|
|
||||||
import { get, pick, intersection } from "lodash";
|
import { get, pick, intersection } from "lodash";
|
||||||
import { unsentRequest } from "netlify-cms-lib-util";
|
import { unsentRequest } from "netlify-cms-lib-util";
|
||||||
import { GitHubBackend } from "netlify-cms-backend-github";
|
import { GitHubBackend } from "netlify-cms-backend-github";
|
||||||
|
@ -2,7 +2,7 @@ import React from 'react';
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import styled from 'react-emotion';
|
import styled from 'react-emotion';
|
||||||
import { NetlifyAuthenticator } from 'netlify-cms-lib-auth';
|
import { NetlifyAuthenticator } from 'netlify-cms-lib-auth';
|
||||||
import { AuthenticationPage, Icon, buttons, shadows } from 'netlify-cms-ui-default';
|
import { AuthenticationPage, Icon } from 'netlify-cms-ui-default';
|
||||||
|
|
||||||
const LoginButtonIcon = styled(Icon)`
|
const LoginButtonIcon = styled(Icon)`
|
||||||
margin-right: 18px;
|
margin-right: 18px;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { localForage, unsentRequest, then, APIError, Cursor } from "netlify-cms-lib-util";
|
import { localForage, unsentRequest, then, APIError, Cursor } from "netlify-cms-lib-util";
|
||||||
import { Base64 } from "js-base64";
|
import { Base64 } from "js-base64";
|
||||||
import { fromJS, List, Map } from "immutable";
|
import { List, Map } from "immutable";
|
||||||
import { cond, flow, isString, partial, partialRight, pick, omit, set, update, get } from "lodash";
|
import { flow, partial, pick, get } from "lodash";
|
||||||
|
|
||||||
export default class API {
|
export default class API {
|
||||||
constructor(config) {
|
constructor(config) {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import trimStart from 'lodash/trimStart';
|
import trimStart from 'lodash/trimStart';
|
||||||
import semaphore from "semaphore";
|
import semaphore from "semaphore";
|
||||||
import { fileExtension, Cursor, CURSOR_COMPATIBILITY_SYMBOL } from 'netlify-cms-lib-util';
|
import { CURSOR_COMPATIBILITY_SYMBOL } from 'netlify-cms-lib-util';
|
||||||
import AuthenticationPage from "./AuthenticationPage";
|
import AuthenticationPage from "./AuthenticationPage";
|
||||||
import API from "./API";
|
import API from "./API";
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { fromJS } from 'immutable';
|
import { attempt, isError, take } from 'lodash';
|
||||||
import { remove, attempt, isError, take } from 'lodash';
|
|
||||||
import uuid from 'uuid/v4';
|
import uuid from 'uuid/v4';
|
||||||
import { EditorialWorkflowError } from 'netlify-cms-lib-util';
|
import { EditorialWorkflowError } from 'netlify-cms-lib-util';
|
||||||
import { Cursor, CURSOR_COMPATIBILITY_SYMBOL } from 'netlify-cms-lib-util';
|
import { Cursor, CURSOR_COMPATIBILITY_SYMBOL } from 'netlify-cms-lib-util';
|
||||||
|
@ -5,7 +5,7 @@ import { serializeValues } from 'Lib/serializeEntryValues';
|
|||||||
import { currentBackend } from 'src/backend';
|
import { currentBackend } from 'src/backend';
|
||||||
import { getAsset } from 'Reducers';
|
import { getAsset } from 'Reducers';
|
||||||
import { selectFields } from 'Reducers/collections';
|
import { selectFields } from 'Reducers/collections';
|
||||||
import { status, EDITORIAL_WORKFLOW } from 'Constants/publishModes';
|
import { EDITORIAL_WORKFLOW } from 'Constants/publishModes';
|
||||||
import { EditorialWorkflowError } from 'netlify-cms-lib-util';
|
import { EditorialWorkflowError } from 'netlify-cms-lib-util';
|
||||||
import { loadEntry } from './entries';
|
import { loadEntry } from './entries';
|
||||||
import ValidationErrorTypes from 'Constants/validationErrorTypes';
|
import ValidationErrorTypes from 'Constants/validationErrorTypes';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { fromJS, List, Set } from 'immutable';
|
import { fromJS, List } from 'immutable';
|
||||||
import { actions as notifActions } from 'redux-notifications';
|
import { actions as notifActions } from 'redux-notifications';
|
||||||
import { serializeValues } from 'Lib/serializeEntryValues';
|
import { serializeValues } from 'Lib/serializeEntryValues';
|
||||||
import { currentBackend } from 'src/backend';
|
import { currentBackend } from 'src/backend';
|
||||||
@ -9,7 +9,6 @@ import { selectCollectionEntriesCursor } from 'Reducers/cursors';
|
|||||||
import { Cursor } from 'netlify-cms-lib-util';
|
import { Cursor } from 'netlify-cms-lib-util';
|
||||||
import { createEntry } from 'ValueObjects/Entry';
|
import { createEntry } from 'ValueObjects/Entry';
|
||||||
import ValidationErrorTypes from 'Constants/validationErrorTypes';
|
import ValidationErrorTypes from 'Constants/validationErrorTypes';
|
||||||
import isArray from 'lodash/isArray';
|
|
||||||
|
|
||||||
const { notifSend } = notifActions;
|
const { notifSend } = notifActions;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import { actions as notifActions } from 'redux-notifications';
|
import { actions as notifActions } from 'redux-notifications';
|
||||||
import { currentBackend } from 'src/backend';
|
import { currentBackend } from 'src/backend';
|
||||||
import { createAssetProxy } from 'ValueObjects/AssetProxy';
|
import { createAssetProxy } from 'ValueObjects/AssetProxy';
|
||||||
import { getAsset, selectIntegration } from 'Reducers';
|
import { selectIntegration } from 'Reducers';
|
||||||
import { getIntegrationProvider } from 'Integrations';
|
import { getIntegrationProvider } from 'Integrations';
|
||||||
import { addAsset } from './media';
|
import { addAsset } from './media';
|
||||||
import { sanitizeSlug } from "Lib/urlHelper";
|
import { sanitizeSlug } from "Lib/urlHelper";
|
||||||
|
@ -1,10 +1,6 @@
|
|||||||
import fuzzy from 'fuzzy';
|
|
||||||
import { currentBackend } from 'src/backend';
|
import { currentBackend } from 'src/backend';
|
||||||
import { getIntegrationProvider } from 'Integrations';
|
import { getIntegrationProvider } from 'Integrations';
|
||||||
import { selectIntegration, selectEntries } from 'Reducers';
|
import { selectIntegration } from 'Reducers';
|
||||||
import { selectInferedField } from 'Reducers/collections';
|
|
||||||
import { WAIT_UNTIL_ACTION } from 'Redux/middleware/waitUntilAction';
|
|
||||||
import { loadEntries, ENTRIES_SUCCESS } from './entries';
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Contant Declarations
|
* Contant Declarations
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { attempt, flatten, isError } from 'lodash';
|
import { attempt, flatten, isError } from 'lodash';
|
||||||
import { fromJS, Map } from 'immutable';
|
import { Map } from 'immutable';
|
||||||
import fuzzy from 'fuzzy';
|
import fuzzy from 'fuzzy';
|
||||||
import { resolveFormat } from "Formats/formats";
|
import { resolveFormat } from "Formats/formats";
|
||||||
import { selectIntegration } from 'Reducers/integrations';
|
import { selectIntegration } from 'Reducers/integrations';
|
||||||
@ -15,7 +15,7 @@ import {
|
|||||||
} from "Reducers/collections";
|
} from "Reducers/collections";
|
||||||
import { createEntry } from "ValueObjects/Entry";
|
import { createEntry } from "ValueObjects/Entry";
|
||||||
import { sanitizeSlug } from "Lib/urlHelper";
|
import { sanitizeSlug } from "Lib/urlHelper";
|
||||||
import { registerBackend, getBackend } from 'Lib/registry';
|
import { getBackend } from 'Lib/registry';
|
||||||
import { Cursor, CURSOR_COMPATIBILITY_SYMBOL } from 'netlify-cms-lib-util';
|
import { Cursor, CURSOR_COMPATIBILITY_SYMBOL } from 'netlify-cms-lib-util';
|
||||||
import { EDITORIAL_WORKFLOW, status } from 'Constants/publishModes';
|
import { EDITORIAL_WORKFLOW, status } from 'Constants/publishModes';
|
||||||
|
|
||||||
|
@ -4,19 +4,18 @@ import { hot } from 'react-hot-loader';
|
|||||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
import styled from 'react-emotion';
|
import styled from 'react-emotion';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { Route, Switch, Link, Redirect } from 'react-router-dom';
|
import { Route, Switch, Redirect } from 'react-router-dom';
|
||||||
import { Notifs } from 'redux-notifications';
|
import { Notifs } from 'redux-notifications';
|
||||||
import TopBarProgress from 'react-topbar-progress-indicator';
|
import TopBarProgress from 'react-topbar-progress-indicator';
|
||||||
import { loadConfig as actionLoadConfig } from 'Actions/config';
|
import { loadConfig as actionLoadConfig } from 'Actions/config';
|
||||||
import { loginUser as actionLoginUser, logoutUser as actionLogoutUser } from 'Actions/auth';
|
import { loginUser as actionLoginUser, logoutUser as actionLogoutUser } from 'Actions/auth';
|
||||||
import { currentBackend } from 'src/backend';
|
import { currentBackend } from 'src/backend';
|
||||||
import { showCollection, createNewEntry } from 'Actions/collections';
|
import { createNewEntry } from 'Actions/collections';
|
||||||
import { openMediaLibrary as actionOpenMediaLibrary } from 'Actions/mediaLibrary';
|
import { openMediaLibrary as actionOpenMediaLibrary } from 'Actions/mediaLibrary';
|
||||||
import MediaLibrary from 'MediaLibrary/MediaLibrary';
|
import MediaLibrary from 'MediaLibrary/MediaLibrary';
|
||||||
import { Toast } from 'UI';
|
import { Toast } from 'UI';
|
||||||
import { Loader, colors } from 'netlify-cms-ui-default';
|
import { Loader, colors } from 'netlify-cms-ui-default';
|
||||||
import history from 'Routing/history';
|
import history from 'Routing/history';
|
||||||
import { getCollectionUrl, getNewEntryUrl } from 'Lib/urlHelper';
|
|
||||||
import { SIMPLE, EDITORIAL_WORKFLOW } from 'Constants/publishModes';
|
import { SIMPLE, EDITORIAL_WORKFLOW } from 'Constants/publishModes';
|
||||||
import Collection from 'Collection/Collection';
|
import Collection from 'Collection/Collection';
|
||||||
import Workflow from 'Workflow/Workflow';
|
import Workflow from 'Workflow/Workflow';
|
||||||
|
@ -3,14 +3,12 @@ import React from "react";
|
|||||||
import ImmutablePropTypes from "react-immutable-proptypes";
|
import ImmutablePropTypes from "react-immutable-proptypes";
|
||||||
import styled, { css } from 'react-emotion';
|
import styled, { css } from 'react-emotion';
|
||||||
import { NavLink } from 'react-router-dom';
|
import { NavLink } from 'react-router-dom';
|
||||||
import uuid from 'uuid/v4';
|
|
||||||
import {
|
import {
|
||||||
Icon,
|
Icon,
|
||||||
Dropdown,
|
Dropdown,
|
||||||
DropdownItem,
|
DropdownItem,
|
||||||
StyledDropdownButton,
|
StyledDropdownButton,
|
||||||
colors,
|
colors,
|
||||||
colorsRaw,
|
|
||||||
lengths,
|
lengths,
|
||||||
shadows,
|
shadows,
|
||||||
buttons,
|
buttons,
|
||||||
|
@ -8,7 +8,7 @@ import Sidebar from './Sidebar';
|
|||||||
import CollectionTop from './CollectionTop';
|
import CollectionTop from './CollectionTop';
|
||||||
import EntriesCollection from './Entries/EntriesCollection';
|
import EntriesCollection from './Entries/EntriesCollection';
|
||||||
import EntriesSearch from './Entries/EntriesSearch';
|
import EntriesSearch from './Entries/EntriesSearch';
|
||||||
import { VIEW_STYLE_LIST, VIEW_STYLE_GRID } from 'Constants/collectionViews';
|
import { VIEW_STYLE_LIST } from 'Constants/collectionViews';
|
||||||
|
|
||||||
const CollectionContainer = styled.div`
|
const CollectionContainer = styled.div`
|
||||||
margin: ${lengths.pageMargin};
|
margin: ${lengths.pageMargin};
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
import PropTypes from 'prop-types';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
|
||||||
import styled from 'react-emotion';
|
import styled from 'react-emotion';
|
||||||
import { Link } from 'react-router-dom';
|
import { Link } from 'react-router-dom';
|
||||||
import { resolvePath } from 'netlify-cms-lib-util';
|
import { resolvePath } from 'netlify-cms-lib-util';
|
||||||
import { colors, colorsRaw, components, lengths } from 'netlify-cms-ui-default';
|
import { colors, colorsRaw, components, lengths } from 'netlify-cms-ui-default';
|
||||||
import history from 'Routing/history';
|
|
||||||
import { VIEW_STYLE_LIST, VIEW_STYLE_GRID } from 'Constants/collectionViews';
|
import { VIEW_STYLE_LIST, VIEW_STYLE_GRID } from 'Constants/collectionViews';
|
||||||
|
|
||||||
const ListCardLink = styled(Link)`
|
const ListCardLink = styled(Link)`
|
||||||
|
@ -1,12 +1,9 @@
|
|||||||
import PropTypes from 'prop-types';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
import styled, { css } from 'react-emotion';
|
import styled, { css } from 'react-emotion';
|
||||||
import { NavLink } from 'react-router-dom';
|
import { NavLink } from 'react-router-dom';
|
||||||
import uuid from 'uuid/v4';
|
|
||||||
import { Icon, components, colors, colorsRaw, lengths } from 'netlify-cms-ui-default';
|
import { Icon, components, colors, colorsRaw, lengths } from 'netlify-cms-ui-default';
|
||||||
import { searchCollections } from 'Actions/collections';
|
import { searchCollections } from 'Actions/collections';
|
||||||
import { getCollectionUrl } from 'Lib/urlHelper';
|
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
sidebarNavLinkActive: css`
|
sidebarNavLinkActive: css`
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
import { Map } from 'immutable';
|
|
||||||
import { get } from 'lodash';
|
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { Loader } from 'netlify-cms-ui-default';
|
import { Loader } from 'netlify-cms-ui-default';
|
||||||
import history from 'Routing/history';
|
import history from 'Routing/history';
|
||||||
|
@ -3,7 +3,7 @@ import React, { Component } from 'react';
|
|||||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
import styled, { css, injectGlobal } from 'react-emotion';
|
import styled, { css, injectGlobal } from 'react-emotion';
|
||||||
import SplitPane from 'react-split-pane';
|
import SplitPane from 'react-split-pane';
|
||||||
import { Icon, colors, colorsRaw, components, transitions } from 'netlify-cms-ui-default';
|
import { colors, colorsRaw, components, transitions } from 'netlify-cms-ui-default';
|
||||||
import { ScrollSync, ScrollSyncPane } from './EditorScrollSync';
|
import { ScrollSync, ScrollSyncPane } from './EditorScrollSync';
|
||||||
import EditorControlPane from './EditorControlPane/EditorControlPane';
|
import EditorControlPane from './EditorControlPane/EditorControlPane';
|
||||||
import EditorPreviewPane from './EditorPreviewPane/EditorPreviewPane';
|
import EditorPreviewPane from './EditorPreviewPane/EditorPreviewPane';
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
import { EDITORIAL_WORKFLOW } from 'Constants/publishModes';
|
import { EDITORIAL_WORKFLOW } from 'Constants/publishModes';
|
||||||
import { selectUnpublishedEntry, selectEntry } from 'Reducers';
|
import { selectUnpublishedEntry } from 'Reducers';
|
||||||
import { selectAllowDeletion } from 'Reducers/collections';
|
import { selectAllowDeletion } from 'Reducers/collections';
|
||||||
import { loadUnpublishedEntry, persistUnpublishedEntry } from 'Actions/editorialWorkflow';
|
import { loadUnpublishedEntry, persistUnpublishedEntry } from 'Actions/editorialWorkflow';
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ import { connect } from 'react-redux';
|
|||||||
import { orderBy, map } from 'lodash';
|
import { orderBy, map } from 'lodash';
|
||||||
import fuzzy from 'fuzzy';
|
import fuzzy from 'fuzzy';
|
||||||
import { resolvePath, fileExtension } from 'netlify-cms-lib-util';
|
import { resolvePath, fileExtension } from 'netlify-cms-lib-util';
|
||||||
import { changeDraftField } from 'Actions/entries';
|
|
||||||
import {
|
import {
|
||||||
loadMedia as loadMediaAction,
|
loadMedia as loadMediaAction,
|
||||||
persistMedia as persistMediaAction,
|
persistMedia as persistMediaAction,
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import styled, { css } from 'react-emotion';
|
import styled from 'react-emotion';
|
||||||
import { isEmpty } from 'lodash';
|
import { isEmpty } from 'lodash';
|
||||||
import Waypoint from 'react-waypoint';
|
import Waypoint from 'react-waypoint';
|
||||||
import { Modal } from 'UI';
|
import { Modal } from 'UI';
|
||||||
@ -9,7 +9,7 @@ import MediaLibraryHeader from './MediaLibraryHeader';
|
|||||||
import MediaLibraryActions from './MediaLibraryActions';
|
import MediaLibraryActions from './MediaLibraryActions';
|
||||||
import MediaLibraryCardGrid from './MediaLibraryCardGrid';
|
import MediaLibraryCardGrid from './MediaLibraryCardGrid';
|
||||||
import EmptyMessage from './EmptyMessage';
|
import EmptyMessage from './EmptyMessage';
|
||||||
import { buttons, shadows, colors, borders, lengths } from 'netlify-cms-ui-default';
|
import { colors } from 'netlify-cms-ui-default';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Responsive styling needs to be overhauled. Current setup requires specifying
|
* Responsive styling needs to be overhauled. Current setup requires specifying
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
import PropTypes from 'prop-types';
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { css } from 'react-emotion';
|
import { css } from 'react-emotion';
|
||||||
import { colors } from 'netlify-cms-ui-default';
|
import { colors } from 'netlify-cms-ui-default';
|
||||||
|
|
||||||
const DefaultErrorComponent = () => {
|
|
||||||
};
|
|
||||||
|
|
||||||
const ISSUE_URL = "https://github.com/netlify/netlify-cms/issues/new";
|
const ISSUE_URL = "https://github.com/netlify/netlify-cms/issues/new";
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
|
@ -3,8 +3,7 @@ import React from 'react';
|
|||||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
import styled, { css, cx } from 'react-emotion';
|
import styled, { css, cx } from 'react-emotion';
|
||||||
import moment from 'moment';
|
import moment from 'moment';
|
||||||
import { capitalize } from 'lodash'
|
import { colors, lengths } from 'netlify-cms-ui-default';
|
||||||
import { colors, colorsRaw, lengths } from 'netlify-cms-ui-default';
|
|
||||||
import { status } from 'Constants/publishModes';
|
import { status } from 'Constants/publishModes';
|
||||||
import { DragSource, DropTarget, HTML5DragDrop } from 'UI'
|
import { DragSource, DropTarget, HTML5DragDrop } from 'UI'
|
||||||
import WorkflowCard from './WorkflowCard';
|
import WorkflowCard from './WorkflowCard';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { isArray, isObject, isEmpty, isNil } from 'lodash';
|
import { isNil } from 'lodash';
|
||||||
import { Map, List } from 'immutable';
|
import { Map, List } from 'immutable';
|
||||||
import { getWidgetValueSerializer } from './registry';
|
import { getWidgetValueSerializer } from './registry';
|
||||||
|
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import { List } from 'immutable';
|
import { List } from 'immutable';
|
||||||
import { has, get, escapeRegExp } from 'lodash';
|
import { escapeRegExp } from 'lodash';
|
||||||
import consoleError from 'Lib/consoleError';
|
import consoleError from 'Lib/consoleError';
|
||||||
import { CONFIG_SUCCESS } from 'Actions/config';
|
import { CONFIG_SUCCESS } from 'Actions/config';
|
||||||
import { FILES, FOLDER } from 'Constants/collectionTypes';
|
import { FILES, FOLDER } from 'Constants/collectionTypes';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { fromJS, Map } from 'immutable';
|
import { fromJS } from 'immutable';
|
||||||
import { Cursor } from 'netlify-cms-lib-util';
|
import { Cursor } from 'netlify-cms-lib-util';
|
||||||
import {
|
import {
|
||||||
ENTRIES_SUCCESS,
|
ENTRIES_SUCCESS,
|
||||||
|
@ -1,8 +1,6 @@
|
|||||||
import { get } from "lodash";
|
import { get } from "lodash";
|
||||||
import { fromJS } from "immutable";
|
import { fromJS } from "immutable";
|
||||||
import { fileExtension } from "./path";
|
import { fileExtension } from "./path";
|
||||||
import unsentRequest from "./unsentRequest";
|
|
||||||
import { CURSOR_COMPATIBILITY_SYMBOL } from "./Cursor";
|
|
||||||
|
|
||||||
export const filterByPropExtension = (extension, propName) => arr =>
|
export const filterByPropExtension = (extension, propName) => arr =>
|
||||||
arr.filter(el => fileExtension(get(el, propName)) === extension);
|
arr.filter(el => fileExtension(get(el, propName)) === extension);
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import styled from 'react-emotion';
|
import styled from 'react-emotion';
|
||||||
import Icon from './Icon';
|
import Icon from './Icon';
|
||||||
import { buttons, shadows } from './styles';
|
import { buttons, shadows } from './styles';
|
||||||
|
@ -1,8 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
|
||||||
import styled, { css } from 'react-emotion';
|
import styled, { css } from 'react-emotion';
|
||||||
import { Wrapper, Button as DropdownButton, Menu, MenuItem } from 'react-aria-menubutton';
|
import { Wrapper, Button as DropdownButton, Menu, MenuItem } from 'react-aria-menubutton';
|
||||||
import { shadows, colors, colorsRaw, lengths, buttons, components } from './styles';
|
import { buttons, components } from './styles';
|
||||||
import Icon from './Icon';
|
import Icon from './Icon';
|
||||||
|
|
||||||
const StyledWrapper = styled(Wrapper)`
|
const StyledWrapper = styled(Wrapper)`
|
||||||
|
@ -9,9 +9,6 @@ injectGlobal`
|
|||||||
${dateTimeStyles}
|
${dateTimeStyles}
|
||||||
`
|
`
|
||||||
|
|
||||||
const DEFAULT_DATE_FORMAT = 'YYYY-MM-DD';
|
|
||||||
const DEFAULT_DATETIME_FORMAT = moment.defaultFormat;
|
|
||||||
|
|
||||||
export default class DateControl extends React.Component {
|
export default class DateControl extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
field: PropTypes.object.isRequired,
|
field: PropTypes.object.isRequired,
|
||||||
|
@ -7,7 +7,6 @@ import { partial } from 'lodash';
|
|||||||
import { SortableContainer, SortableElement, SortableHandle } from 'react-sortable-hoc';
|
import { SortableContainer, SortableElement, SortableHandle } from 'react-sortable-hoc';
|
||||||
import { ObjectControl } from 'netlify-cms-widget-object';
|
import { ObjectControl } from 'netlify-cms-widget-object';
|
||||||
import {
|
import {
|
||||||
Icon,
|
|
||||||
ListItemTopBar,
|
ListItemTopBar,
|
||||||
ObjectWidgetTopBar,
|
ObjectWidgetTopBar,
|
||||||
colors,
|
colors,
|
||||||
|
@ -4,7 +4,6 @@ import ImmutablePropTypes from 'react-immutable-proptypes';
|
|||||||
import styled, { css } from 'react-emotion';
|
import styled, { css } from 'react-emotion';
|
||||||
import { List } from 'immutable';
|
import { List } from 'immutable';
|
||||||
import {
|
import {
|
||||||
Icon,
|
|
||||||
Toggle,
|
Toggle,
|
||||||
Dropdown,
|
Dropdown,
|
||||||
DropdownItem,
|
DropdownItem,
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
import ImmutablePropTypes from 'react-immutable-proptypes';
|
||||||
import styled, { css, cx } from 'react-emotion';
|
import styled, { cx } from 'react-emotion';
|
||||||
import { get, isEmpty, debounce } from 'lodash';
|
import { get, isEmpty, debounce } from 'lodash';
|
||||||
import { Map } from 'immutable';
|
import { Map } from 'immutable';
|
||||||
import { Value, Document, Block, Text } from 'slate';
|
import { Value, Document, Block, Text } from 'slate';
|
||||||
import { Editor as Slate } from 'slate-react';
|
import { Editor as Slate } from 'slate-react';
|
||||||
import { lengths, fonts } from 'netlify-cms-ui-default';
|
|
||||||
import { slateToMarkdown, markdownToSlate, htmlToSlate } from '../serializers';
|
import { slateToMarkdown, markdownToSlate, htmlToSlate } from '../serializers';
|
||||||
import Toolbar from '../MarkdownControl/Toolbar';
|
import Toolbar from '../MarkdownControl/Toolbar';
|
||||||
import { renderNode, renderMark } from './renderers';
|
import { renderNode, renderMark } from './renderers';
|
||||||
@ -14,7 +13,7 @@ import { validateNode } from './validators';
|
|||||||
import plugins, { EditListConfigured } from './plugins';
|
import plugins, { EditListConfigured } from './plugins';
|
||||||
import onKeyDown from './keys';
|
import onKeyDown from './keys';
|
||||||
import visualEditorStyles from './visualEditorStyles';
|
import visualEditorStyles from './visualEditorStyles';
|
||||||
import { editorStyleVars, EditorControlBar } from '../styles';
|
import { EditorControlBar } from '../styles';
|
||||||
|
|
||||||
const VisualEditorContainer = styled.div`
|
const VisualEditorContainer = styled.div`
|
||||||
position: relative;
|
position: relative;
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import { Text, Inline } from 'slate';
|
import { Text, Inline } from 'slate';
|
||||||
import isHotkey from 'is-hotkey';
|
import isHotkey from 'is-hotkey';
|
||||||
import SlateSoftBreak from 'slate-soft-break';
|
|
||||||
import EditList from 'slate-edit-list';
|
import EditList from 'slate-edit-list';
|
||||||
import EditTable from 'slate-edit-table';
|
import EditTable from 'slate-edit-table';
|
||||||
|
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { List } from 'immutable';
|
|
||||||
import Shortcode from './Shortcode';
|
import Shortcode from './Shortcode';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,14 +1,11 @@
|
|||||||
/* eslint max-len:0 */
|
/* eslint max-len:0 */
|
||||||
|
|
||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { shallow } from 'enzyme';
|
|
||||||
import renderer from 'react-test-renderer';
|
import renderer from 'react-test-renderer';
|
||||||
import { padStart } from 'lodash';
|
import { padStart } from 'lodash';
|
||||||
import MarkdownPreview from '../MarkdownPreview';
|
import MarkdownPreview from '../MarkdownPreview';
|
||||||
import { markdownToHtml } from '../serializers';
|
import { markdownToHtml } from '../serializers';
|
||||||
|
|
||||||
const parser = markdownToHtml;
|
|
||||||
|
|
||||||
describe('Markdown Preview renderer', () => {
|
describe('Markdown Preview renderer', () => {
|
||||||
describe('Markdown rendering', () => {
|
describe('Markdown rendering', () => {
|
||||||
describe('General', () => {
|
describe('General', () => {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { get, isEmpty, reduce, pull, trimEnd } from 'lodash';
|
import { trimEnd } from 'lodash';
|
||||||
import unified from 'unified';
|
import unified from 'unified';
|
||||||
import u from 'unist-builder';
|
import u from 'unist-builder';
|
||||||
import markdownToRemarkPlugin from 'remark-parse';
|
import markdownToRemarkPlugin from 'remark-parse';
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { concat, last, nth, isEmpty, set } from 'lodash';
|
import { concat, last, nth, isEmpty } from 'lodash';
|
||||||
import visitParents from 'unist-util-visit-parents';
|
import visitParents from 'unist-util-visit-parents';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { has, flow, partial, flatMap, flatten, map } from 'lodash';
|
import { has, flow, partial, map } from 'lodash';
|
||||||
import { joinPatternSegments, combinePatterns, replaceWhen } from '../regexHelper';
|
import { joinPatternSegments, combinePatterns, replaceWhen } from '../regexHelper';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1,13 +1,10 @@
|
|||||||
import {
|
import {
|
||||||
get,
|
|
||||||
set,
|
|
||||||
find,
|
find,
|
||||||
findLast,
|
findLast,
|
||||||
startsWith,
|
startsWith,
|
||||||
endsWith,
|
endsWith,
|
||||||
trimStart,
|
trimStart,
|
||||||
trimEnd,
|
trimEnd,
|
||||||
concat,
|
|
||||||
flatMap
|
flatMap
|
||||||
} from 'lodash';
|
} from 'lodash';
|
||||||
import u from 'unist-builder';
|
import u from 'unist-builder';
|
||||||
|
@ -1,5 +1,4 @@
|
|||||||
import { get, isEmpty, isArray, last, flatMap } from 'lodash';
|
import { get, isEmpty, isArray, last, flatMap } from 'lodash';
|
||||||
import u from 'unist-builder';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* A Remark plugin for converting an MDAST to Slate Raw AST. Remark plugins
|
* A Remark plugin for converting an MDAST to Slate Raw AST. Remark plugins
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import styled, { css } from 'react-emotion';
|
import styled from 'react-emotion';
|
||||||
|
|
||||||
export const editorStyleVars = {
|
export const editorStyleVars = {
|
||||||
stickyDistanceBottom: '100px',
|
stickyDistanceBottom: '100px',
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
import React, { Component } from 'react';
|
import React, { Component } from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import ImmutablePropTypes from 'react-immutable-proptypes';
|
import { css, cx } from 'react-emotion';
|
||||||
import styled, { css, cx } from 'react-emotion';
|
|
||||||
import { Map } from 'immutable';
|
import { Map } from 'immutable';
|
||||||
import { partial } from 'lodash';
|
import { ObjectWidgetTopBar, components } from 'netlify-cms-ui-default';
|
||||||
import { ObjectWidgetTopBar, Icon, colors, components } from 'netlify-cms-ui-default';
|
|
||||||
|
|
||||||
const styles = {
|
const styles = {
|
||||||
nestedObjectControl: css`
|
nestedObjectControl: css`
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import PropTypes from 'prop-types';
|
import PropTypes from 'prop-types';
|
||||||
import { injectGlobal, css } from 'react-emotion';
|
import { injectGlobal } from 'react-emotion';
|
||||||
import Autosuggest from 'react-autosuggest';
|
import Autosuggest from 'react-autosuggest';
|
||||||
import uuid from 'uuid/v4';
|
import uuid from 'uuid/v4';
|
||||||
import { List, Map } from 'immutable';
|
import { List } from 'immutable';
|
||||||
import { debounce } from 'lodash';
|
import { debounce } from 'lodash';
|
||||||
import { Loader, components } from 'netlify-cms-ui-default';
|
import { Loader, components } from 'netlify-cms-ui-default';
|
||||||
|
|
||||||
@ -45,10 +45,6 @@ injectGlobal`
|
|||||||
}
|
}
|
||||||
`
|
`
|
||||||
|
|
||||||
function escapeRegexCharacters(str) {
|
|
||||||
return str.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
|
|
||||||
}
|
|
||||||
|
|
||||||
export default class RelationControl extends React.Component {
|
export default class RelationControl extends React.Component {
|
||||||
static propTypes = {
|
static propTypes = {
|
||||||
onChange: PropTypes.func.isRequired,
|
onChange: PropTypes.func.isRequired,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user