2017-09-10 19:31:54 -07:00
|
|
|
import { CommentTypeUnion } from 'wherehows-web/typings/api/datasets/comments';
|
|
|
|
|
|
|
|
/**
|
|
|
|
* List of CrUD actions that can be performed on a stream comment
|
|
|
|
*/
|
2019-08-31 20:51:14 -07:00
|
|
|
export type StreamCommentActionsUnion = 'create' | 'update' | 'destroy';
|
2017-09-10 19:31:54 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* List of CrUD actions that can be performed on the dataset stream
|
|
|
|
*/
|
2019-08-31 20:51:14 -07:00
|
|
|
export type DatasetStreamActionsUnion = 'add' | 'modify' | 'destroy';
|
2017-09-10 19:31:54 -07:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Common options to pass to the editor component on instantiation
|
|
|
|
* @type {object}
|
|
|
|
*/
|
|
|
|
const baseCommentEditorOptions = {
|
|
|
|
disableDoubleReturn: true,
|
|
|
|
disableExtraSpaces: true,
|
2018-08-27 16:21:52 -07:00
|
|
|
disableEditing: false
|
2017-09-10 19:31:54 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Options relevant to the new comment editor
|
|
|
|
* @type {object}
|
|
|
|
*/
|
|
|
|
const newCommentEditorOptions = {
|
|
|
|
placeholder: {
|
|
|
|
text: 'Type here. You can format text by selecting it, and/or using keyboard shortcuts like cmd-b, e.t.c',
|
|
|
|
hideOnClick: false
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
/**
|
|
|
|
* List of Dataset Comment types
|
|
|
|
* @type {ReadonlyArray<CommentTypeUnion>}
|
|
|
|
*/
|
|
|
|
const CommentTypes: ReadonlyArray<CommentTypeUnion> = Object.freeze<CommentTypeUnion>([
|
|
|
|
'Comment',
|
|
|
|
'Question',
|
|
|
|
'Description',
|
|
|
|
'Partition',
|
|
|
|
'ETL Schedule',
|
|
|
|
'Grain',
|
|
|
|
'DQ Issue'
|
|
|
|
]);
|
|
|
|
|
2019-08-31 20:51:14 -07:00
|
|
|
export { baseCommentEditorOptions, newCommentEditorOptions, CommentTypes };
|