Skip to content
This repository has been archived by the owner on Oct 11, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1256 from withspectrum/ablaze
Browse files Browse the repository at this point in the history
DraftJS Editor
  • Loading branch information
mxstbr authored Oct 4, 2017
2 parents 811823f + 390aa3f commit 48e4592
Show file tree
Hide file tree
Showing 93 changed files with 6,965 additions and 1,858 deletions.
3 changes: 3 additions & 0 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@

[options]
suppress_comment=.*\\$FlowFixMe
suppress_comment=.*\\$FlowIssue
esproposal.class_instance_fields=enable
module.system.node.resolve_dirname=node_modules
module.system.node.resolve_dirname=spectrum

[lints]
all=warn
Expand Down
6 changes: 5 additions & 1 deletion athena/queues/message-notification.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import { getThreadNotificationUsers } from '../models/usersThreads';
import { getDirectMessageThreadMembers } from '../models/usersDirectMessageThreads';
import sentencify from '../utils/sentencify';
import bufferNotificationEmail from './buffer-message-notification-email';
import { toPlainText, toState } from 'shared/draft-utils';

const formatAndBufferNotificationEmail = (
recipient,
Expand Down Expand Up @@ -45,7 +46,10 @@ const formatAndBufferNotificationEmail = (
name: user.name,
},
content: {
body: message.content.body,
body:
message.messageType === 'draftjs'
? toPlainText(toState(JSON.parse(message.content.body)))
: message.content.body,
},
},
],
Expand Down
5 changes: 4 additions & 1 deletion chronos/models/community.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@
const { db } = require('./db');

export const getCommunityById = (id: string): Promise<Object> => {
return db.table('communities').get(id).run();
return db
.table('communities')
.get(id)
.run();
};

export const getTopCommunities = (amount: number): Array<Object> => {
Expand Down
81 changes: 81 additions & 0 deletions flow-typed/npm/draft-js-drag-n-drop-plugin_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
// flow-typed signature: f69f403c3f9e7e52c46f225a280964d1
// flow-typed version: <<STUB>>/draft-js-drag-n-drop-plugin_v2.0.0-rc2/flow_v0.55.0

/**
* This is an autogenerated libdef stub for:
*
* 'draft-js-drag-n-drop-plugin'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

declare module 'draft-js-drag-n-drop-plugin' {
declare module.exports: any;
}

/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'draft-js-drag-n-drop-plugin/lib/constants/index' {
declare module.exports: any;
}

declare module 'draft-js-drag-n-drop-plugin/lib/createDecorator' {
declare module.exports: any;
}

declare module 'draft-js-drag-n-drop-plugin/lib/handleDrop' {
declare module.exports: any;
}

declare module 'draft-js-drag-n-drop-plugin/lib/index' {
declare module.exports: any;
}

declare module 'draft-js-drag-n-drop-plugin/lib/modifiers/addBlock' {
declare module.exports: any;
}

declare module 'draft-js-drag-n-drop-plugin/lib/modifiers/removeBlock' {
declare module.exports: any;
}

declare module 'draft-js-drag-n-drop-plugin/postcss.config' {
declare module.exports: any;
}

declare module 'draft-js-drag-n-drop-plugin/webpack.config' {
declare module.exports: any;
}

// Filename aliases
declare module 'draft-js-drag-n-drop-plugin/lib/constants/index.js' {
declare module.exports: $Exports<'draft-js-drag-n-drop-plugin/lib/constants/index'>;
}
declare module 'draft-js-drag-n-drop-plugin/lib/createDecorator.js' {
declare module.exports: $Exports<'draft-js-drag-n-drop-plugin/lib/createDecorator'>;
}
declare module 'draft-js-drag-n-drop-plugin/lib/handleDrop.js' {
declare module.exports: $Exports<'draft-js-drag-n-drop-plugin/lib/handleDrop'>;
}
declare module 'draft-js-drag-n-drop-plugin/lib/index.js' {
declare module.exports: $Exports<'draft-js-drag-n-drop-plugin/lib/index'>;
}
declare module 'draft-js-drag-n-drop-plugin/lib/modifiers/addBlock.js' {
declare module.exports: $Exports<'draft-js-drag-n-drop-plugin/lib/modifiers/addBlock'>;
}
declare module 'draft-js-drag-n-drop-plugin/lib/modifiers/removeBlock.js' {
declare module.exports: $Exports<'draft-js-drag-n-drop-plugin/lib/modifiers/removeBlock'>;
}
declare module 'draft-js-drag-n-drop-plugin/postcss.config.js' {
declare module.exports: $Exports<'draft-js-drag-n-drop-plugin/postcss.config'>;
}
declare module 'draft-js-drag-n-drop-plugin/webpack.config.js' {
declare module.exports: $Exports<'draft-js-drag-n-drop-plugin/webpack.config'>;
}
102 changes: 102 additions & 0 deletions flow-typed/npm/draft-js-focus-plugin_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// flow-typed signature: ca3fc9f543ceddf725d7a1bd33e0bb39
// flow-typed version: <<STUB>>/draft-js-focus-plugin_v2.0.0-rc2/flow_v0.55.0

/**
* This is an autogenerated libdef stub for:
*
* 'draft-js-focus-plugin'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

declare module 'draft-js-focus-plugin' {
declare module.exports: any;
}

/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'draft-js-focus-plugin/lib/createDecorator' {
declare module.exports: any;
}

declare module 'draft-js-focus-plugin/lib/index' {
declare module.exports: any;
}

declare module 'draft-js-focus-plugin/lib/modifiers/removeBlock' {
declare module.exports: any;
}

declare module 'draft-js-focus-plugin/lib/modifiers/setSelection' {
declare module.exports: any;
}

declare module 'draft-js-focus-plugin/lib/modifiers/setSelectionToBlock' {
declare module.exports: any;
}

declare module 'draft-js-focus-plugin/lib/utils/blockInSelection' {
declare module.exports: any;
}

declare module 'draft-js-focus-plugin/lib/utils/createBlockKeyStore' {
declare module.exports: any;
}

declare module 'draft-js-focus-plugin/lib/utils/getBlockMapKeys' {
declare module.exports: any;
}

declare module 'draft-js-focus-plugin/lib/utils/getSelectedBlocksMapKeys' {
declare module.exports: any;
}

declare module 'draft-js-focus-plugin/postcss.config' {
declare module.exports: any;
}

declare module 'draft-js-focus-plugin/webpack.config' {
declare module.exports: any;
}

// Filename aliases
declare module 'draft-js-focus-plugin/lib/createDecorator.js' {
declare module.exports: $Exports<'draft-js-focus-plugin/lib/createDecorator'>;
}
declare module 'draft-js-focus-plugin/lib/index.js' {
declare module.exports: $Exports<'draft-js-focus-plugin/lib/index'>;
}
declare module 'draft-js-focus-plugin/lib/modifiers/removeBlock.js' {
declare module.exports: $Exports<'draft-js-focus-plugin/lib/modifiers/removeBlock'>;
}
declare module 'draft-js-focus-plugin/lib/modifiers/setSelection.js' {
declare module.exports: $Exports<'draft-js-focus-plugin/lib/modifiers/setSelection'>;
}
declare module 'draft-js-focus-plugin/lib/modifiers/setSelectionToBlock.js' {
declare module.exports: $Exports<'draft-js-focus-plugin/lib/modifiers/setSelectionToBlock'>;
}
declare module 'draft-js-focus-plugin/lib/utils/blockInSelection.js' {
declare module.exports: $Exports<'draft-js-focus-plugin/lib/utils/blockInSelection'>;
}
declare module 'draft-js-focus-plugin/lib/utils/createBlockKeyStore.js' {
declare module.exports: $Exports<'draft-js-focus-plugin/lib/utils/createBlockKeyStore'>;
}
declare module 'draft-js-focus-plugin/lib/utils/getBlockMapKeys.js' {
declare module.exports: $Exports<'draft-js-focus-plugin/lib/utils/getBlockMapKeys'>;
}
declare module 'draft-js-focus-plugin/lib/utils/getSelectedBlocksMapKeys.js' {
declare module.exports: $Exports<'draft-js-focus-plugin/lib/utils/getSelectedBlocksMapKeys'>;
}
declare module 'draft-js-focus-plugin/postcss.config.js' {
declare module.exports: $Exports<'draft-js-focus-plugin/postcss.config'>;
}
declare module 'draft-js-focus-plugin/webpack.config.js' {
declare module.exports: $Exports<'draft-js-focus-plugin/webpack.config'>;
}
60 changes: 60 additions & 0 deletions flow-typed/npm/draft-js-image-plugin_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
// flow-typed signature: 1b6bfd1d8094619e9134e61f63e92a0f
// flow-typed version: <<STUB>>/draft-js-image-plugin_v2.0.0-rc8/flow_v0.55.0

/**
* This is an autogenerated libdef stub for:
*
* 'draft-js-image-plugin'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

declare module 'draft-js-image-plugin' {
declare module.exports: any;
}

/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'draft-js-image-plugin/lib/Image/index' {
declare module.exports: any;
}

declare module 'draft-js-image-plugin/lib/index' {
declare module.exports: any;
}

declare module 'draft-js-image-plugin/lib/modifiers/addImage' {
declare module.exports: any;
}

declare module 'draft-js-image-plugin/postcss.config' {
declare module.exports: any;
}

declare module 'draft-js-image-plugin/webpack.config' {
declare module.exports: any;
}

// Filename aliases
declare module 'draft-js-image-plugin/lib/Image/index.js' {
declare module.exports: $Exports<'draft-js-image-plugin/lib/Image/index'>;
}
declare module 'draft-js-image-plugin/lib/index.js' {
declare module.exports: $Exports<'draft-js-image-plugin/lib/index'>;
}
declare module 'draft-js-image-plugin/lib/modifiers/addImage.js' {
declare module.exports: $Exports<'draft-js-image-plugin/lib/modifiers/addImage'>;
}
declare module 'draft-js-image-plugin/postcss.config.js' {
declare module.exports: $Exports<'draft-js-image-plugin/postcss.config'>;
}
declare module 'draft-js-image-plugin/webpack.config.js' {
declare module.exports: $Exports<'draft-js-image-plugin/webpack.config'>;
}
46 changes: 46 additions & 0 deletions flow-typed/npm/draft-js-import-markdown_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// flow-typed signature: 0ade55a84154638d6fb4ea8060bba647
// flow-typed version: <<STUB>>/draft-js-import-markdown_v^1.2.0/flow_v0.55.0

/**
* This is an autogenerated libdef stub for:
*
* 'draft-js-import-markdown'
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

declare module 'draft-js-import-markdown' {
declare module.exports: any;
}

/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module 'draft-js-import-markdown/lib/main' {
declare module.exports: any;
}

declare module 'draft-js-import-markdown/lib/MarkdownParser' {
declare module.exports: any;
}

declare module 'draft-js-import-markdown/lib/stateFromMarkdown' {
declare module.exports: any;
}

// Filename aliases
declare module 'draft-js-import-markdown/lib/main.js' {
declare module.exports: $Exports<'draft-js-import-markdown/lib/main'>;
}
declare module 'draft-js-import-markdown/lib/MarkdownParser.js' {
declare module.exports: $Exports<'draft-js-import-markdown/lib/MarkdownParser'>;
}
declare module 'draft-js-import-markdown/lib/stateFromMarkdown.js' {
declare module.exports: $Exports<'draft-js-import-markdown/lib/stateFromMarkdown'>;
}
Loading

0 comments on commit 48e4592

Please sign in to comment.