Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove flow #2028

Merged
merged 7 commits into from
Dec 5, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Definitely remove all the flow things and prettier
  • Loading branch information
emmatown committed Dec 2, 2019
commit de9b91e0cbc068a76843bbdfb8d18ddb9ec81a5f
1 change: 0 additions & 1 deletion docs/api/hooks.md
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ const afterDelete = ({
| `actions` | `Object` | An Object providing access to List functions, see [`actions` Argument](#actions-argument). |
| `operation` | `String` | A key indicating the current operation being performed, ie. `'create'`, `'update'` or `'delete'`. |


### `actions` Argument

The `actions` argument is an object containing a query helper:
Expand Down
1 change: 0 additions & 1 deletion packages/app-admin-ui/client/components/AnimateHeight.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { Component, useMemo } from 'react';
Expand Down
1 change: 0 additions & 1 deletion packages/app-admin-ui/client/components/DocTitle.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React, { Children } from 'react';
import DocumentTitle from 'react-document-title';

Expand Down
1 change: 0 additions & 1 deletion packages/app-admin-ui/client/components/Popout.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React, { Fragment } from 'react';
import styled from '@emotion/styled';

Expand Down
14 changes: 3 additions & 11 deletions packages/app-admin-ui/client/pages/List/FieldSelect.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ function getOptionValue(opt) {
return opt.path;
}

export const pseudoLabelField = { label: 'Label', path: '_label_' };

/**
* Why does this exist?
* --------------------
Expand All @@ -24,17 +26,7 @@ function getOptionValue(opt) {
* and returning it during `onChange`.
*/

type FieldType = Object;
export type FieldSelectProps = {
fields: Array<FieldType>,
onChange: FieldType => void,
value: FieldType | Array<FieldType>,
includeLabelField: boolean,
};

export const pseudoLabelField = { label: 'Label', path: '_label_' };

export default class FieldSelect extends Component<FieldSelectProps> {
export default class FieldSelect extends Component {
constructor(props) {
super(props);
const { fields, includeLabelField } = props;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,7 @@ import React, { Component } from 'react';
import { POPOUT_GUTTER } from '../../../components/Popout';
import PopoutForm from './PopoutForm';

type Props = {
filter: Object,
onChange: Event => void,
};
type State = {
value: string,
};

export default class EditFilterPopout extends Component<Props, State> {
export default class EditFilterPopout extends Component {
state = { value: this.props.filter.value };

onChangeFilter = value => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,11 +29,7 @@ const FooterButton = ({ isPrimary, ...props }) => (
/>
);

type Props = {
onSubmit: Event => void,
};

export default class FilterPopout extends Component<Props> {
export default class FilterPopout extends Component {
onSubmit = event => {
const { onSubmit } = this.props;

Expand Down
9 changes: 1 addition & 8 deletions packages/app-admin-ui/client/pages/List/Management.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,7 @@ const SelectedCount = styled.div({
marginRight: gridSize,
});

type Props = {
list: Object,
onDeleteMany: (*) => void,
onUpdateMany: (*) => void,
selectedItems: Array<string>,
};

export default function ListManage(props: Props) {
export default function ListManage(props) {
const { onDeleteMany, onUpdateMany, selectedItems } = props;
const [deleteModalIsVisible, setDeleteModal] = useState(false);
const [updateModalIsVisible, setUpdateModal] = useState(false);
Expand Down
6 changes: 1 addition & 5 deletions packages/arch/docs/src/StyleGuide/Components/Loading.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,8 @@ const LoadingBox = styled.div(({ on, size }) => ({
}));

const appearances = ['default', 'dark', 'primary', 'inverted'];
type State = {
size: number,
appearance: 'default' | 'dark' | 'primary' | 'inverted',
};

export default class ProgressGuide extends Component<*, State> {
export default class ProgressGuide extends Component {
state = { appearance: 'default', size: 8 };
handleAppearance = ({ target: { value } }) => {
this.setState({ appearance: value });
Expand Down
1 change: 0 additions & 1 deletion packages/arch/packages/badge/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React, { PureComponent } from 'react';
import styled from '@emotion/styled';

Expand Down
1 change: 0 additions & 1 deletion packages/arch/packages/button/src/icon.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { forwardRef } from 'react';
Expand Down
1 change: 0 additions & 1 deletion packages/arch/packages/button/src/loading.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/** @jsx jsx */
import { forwardRef } from 'react';
import { jsx } from '@emotion/core';
Expand Down
1 change: 0 additions & 1 deletion packages/arch/packages/button/src/primitives.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { forwardRef } from 'react';
Expand Down
1 change: 0 additions & 1 deletion packages/arch/packages/dialog/src/Dialog.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React, { PureComponent, Fragment } from 'react';
import { createPortal } from 'react-dom';
import ScrollLock from 'react-scrolllock';
Expand Down
1 change: 0 additions & 1 deletion packages/arch/packages/dialog/src/primitives.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { forwardRef } from 'react';
Expand Down
1 change: 0 additions & 1 deletion packages/arch/packages/drawer/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { Fragment, forwardRef, memo, useMemo, useEffect, useRef } from 'react';
Expand Down
1 change: 0 additions & 1 deletion packages/arch/packages/layout/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { Children, cloneElement, forwardRef } from 'react';
Expand Down
1 change: 0 additions & 1 deletion packages/arch/packages/loading/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React from 'react';
import styled from '@emotion/styled';
import { keyframes } from '@emotion/core';
Expand Down
1 change: 0 additions & 1 deletion packages/arch/packages/lozenge/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import styled from '@emotion/styled';

import { borderRadius, colors, gridSize } from '@arch-ui/theme';
Expand Down
1 change: 0 additions & 1 deletion packages/arch/packages/navbar/src/PrimaryNav.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import styled from '@emotion/styled';

import { colors, gridSize } from '@arch-ui/theme';
Expand Down
1 change: 0 additions & 1 deletion packages/arch/packages/navbar/src/SecondaryNav.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React from 'react';
import styled from '@emotion/styled';

Expand Down
1 change: 0 additions & 1 deletion packages/arch/packages/navbar/src/common.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import * as React from 'react';
import { Link } from 'react-router-dom';

Expand Down
1 change: 0 additions & 1 deletion packages/arch/packages/pill/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/** @jsx jsx */
import { jsx } from '@emotion/core';
import styled from '@emotion/styled';
Expand Down
1 change: 0 additions & 1 deletion packages/arch/packages/select/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import * as React from 'react';
import { useMemo } from 'react';
import BaseSelect from 'react-select';
Expand Down
1 change: 0 additions & 1 deletion packages/arch/packages/tooltip/src/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

/** @jsx jsx */
import { jsx } from '@emotion/core';
import { Component, createRef, Fragment } from 'react';
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

export default 'something';
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

export default 'something';
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@

export default 'something';
1 change: 0 additions & 1 deletion packages/build-field-types/src/constants.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

exports.EXTENSIONS = ['.js', '.jsx', '.ts', '.tsx'];

exports.PKG_JSON_CONFIG_FIELD = 'field-types';
1 change: 0 additions & 1 deletion packages/build-field-types/src/errors.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

export class FatalError extends Error {
constructor(message, item) {
super(message);
Expand Down
1 change: 0 additions & 1 deletion packages/build-field-types/src/messages.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { PKG_JSON_CONFIG_FIELD } from './constants';

export let errors = {
Expand Down
1 change: 0 additions & 1 deletion packages/build-field-types/src/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

export function getNameForDist(name) {
return name.replace(/.*\//, '');
}
Expand Down
1 change: 0 additions & 1 deletion packages/fields/src/types/CalendarDay/views/Filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React, { Component } from 'react';
import { format } from 'date-fns';
import { TextDayPicker } from '@arch-ui/day-picker';
Expand Down
1 change: 0 additions & 1 deletion packages/fields/src/types/Checkbox/views/Cell.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { Component } from 'react';

export default class CheckboxCellView extends Component {
Expand Down
1 change: 0 additions & 1 deletion packages/fields/src/types/Checkbox/views/Filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React, { Component } from 'react';

export default class CheckboxFilterView extends Component {
Expand Down
1 change: 0 additions & 1 deletion packages/fields/src/types/DateTime/views/Cell.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import { format } from 'date-fns';

const DateTimeCell = props => {
Expand Down
1 change: 0 additions & 1 deletion packages/fields/src/types/DateTime/views/Filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React from 'react';
import { format } from 'date-fns';
import { DayTimePicker } from '@arch-ui/day-picker';
Expand Down
1 change: 0 additions & 1 deletion packages/fields/src/types/Decimal/views/Filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React, { Component } from 'react';
import { Input } from '@arch-ui/input';
export default class TextFilterView extends Component {
Expand Down
1 change: 0 additions & 1 deletion packages/fields/src/types/File/views/Filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React, { Component } from 'react';
import { Input } from '@arch-ui/input';

Expand Down
1 change: 0 additions & 1 deletion packages/fields/src/types/Float/views/Filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React, { Component } from 'react';
import { Input } from '@arch-ui/input';

Expand Down
1 change: 0 additions & 1 deletion packages/fields/src/types/Integer/views/Filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React, { Component } from 'react';
import { Input } from '@arch-ui/input';

Expand Down
1 change: 0 additions & 1 deletion packages/fields/src/types/Password/views/Filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React, { Component } from 'react';
import { RadioGroup, Radio } from '@arch-ui/filters';

Expand Down
1 change: 0 additions & 1 deletion packages/fields/src/types/Relationship/views/Cell.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React, { Fragment } from 'react';

export default ({ data, field, Link }) => {
Expand Down
1 change: 0 additions & 1 deletion packages/fields/src/types/Relationship/views/Filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React, { Component } from 'react';
import RelationshipSelect from './RelationshipSelect';

Expand Down
8 changes: 4 additions & 4 deletions packages/fields/src/types/Text/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ keystone.createList('Product', {

### Config

| Option | Type | Default | Description |
| ------------ | --------- | ------- | --------------------------------------------------------------- |
| `isRequired` | `Boolean` | `false` | Does this field require a value? |
| `isUnique` | `Boolean` | `false` | Adds a unique index that allows only unique values to be stored |
| Option | Type | Default | Description |
| ------------- | --------- | ------- | --------------------------------------------------------------- |
| `isRequired` | `Boolean` | `false` | Does this field require a value? |
| `isUnique` | `Boolean` | `false` | Adds a unique index that allows only unique values to be stored |
| `isMultiline` | `Boolean` | `false` | Makes the field render as a textarea |
1 change: 0 additions & 1 deletion packages/fields/src/types/Text/views/Filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React, { Component } from 'react';
import { Input } from '@arch-ui/input';

Expand Down
1 change: 0 additions & 1 deletion packages/fields/src/types/Uuid/views/Filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React, { Component } from 'react';
import { Input } from '@arch-ui/input';

Expand Down
2 changes: 1 addition & 1 deletion packages/fields/src/types/Virtual/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,4 +68,4 @@ keystone.createList('Example', {
| `resolver` | `Function` | (required) | |
| `graphQLReturnType` | `String` | 'String' | A GraphQL Type String |
| `graphQLReturnFragment` | `String` | '' | A GraphQL Fragment String -required for nested return types |
| `extendGraphQLTypes` | `Array` | [] | An array of custom GraphQL type definitions |
| `extendGraphQLTypes` | `Array` | \[] | An array of custom GraphQL type definitions |
1 change: 0 additions & 1 deletion packages/fields/src/types/Virtual/views/Filter.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

import React, { Component } from 'react';
import { Input } from '@arch-ui/input';

Expand Down