@bigbinary/neeto-molecules 1.1.18 → 1.1.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -0
- package/dist/DocumentEditor.js +274 -0
- package/dist/DocumentEditor.js.map +1 -0
- package/dist/EmailForm.js +38 -5
- package/dist/EmailForm.js.map +1 -1
- package/package.json +3 -2
- package/src/translations/en.json +3 -0
- package/types/DocumentEditor.d.ts +58 -0
- package/types/EmailForm.d.ts +2 -0
- package/types/EmailFormProvider.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-molecules",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.20",
|
|
4
4
|
"description": "A package of reusable molecular components for neeto products.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-molecules.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@bigbinary/eslint-plugin-neeto": "^1.1.14",
|
|
66
66
|
"@bigbinary/neeto-audit-frontend": "2.0.1",
|
|
67
67
|
"@bigbinary/neeto-commons-frontend": "2.0.134",
|
|
68
|
-
"@bigbinary/neeto-editor": "1.
|
|
68
|
+
"@bigbinary/neeto-editor": "1.28.25",
|
|
69
69
|
"@bigbinary/neeto-filters-frontend": "^2.11.15",
|
|
70
70
|
"@bigbinary/neeto-icons": "^1.14.0",
|
|
71
71
|
"@bigbinary/neeto-molecules": "^1.0.5",
|
|
@@ -107,6 +107,7 @@
|
|
|
107
107
|
"babel-plugin-istanbul": "^6.1.1",
|
|
108
108
|
"babel-plugin-js-logger": "1.0.17",
|
|
109
109
|
"babel-plugin-macros": "3.1.0",
|
|
110
|
+
"babel-plugin-preval": "^5.1.0",
|
|
110
111
|
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
|
|
111
112
|
"babel-preset-react": "6.24.1",
|
|
112
113
|
"babel-preset-typescript": "^7.0.0-alpha.19",
|
package/src/translations/en.json
CHANGED
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
import { FormikEditorProps, attachment } from "@bigbinary/neeto-editor";
|
|
2
|
+
import { TextareaProps } from "@bigbinary/neetoui";
|
|
3
|
+
/**
|
|
4
|
+
*
|
|
5
|
+
* NeetoEditor with a better writing experience.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
*
|
|
9
|
+
* import React from "react";
|
|
10
|
+
* import DocumentEditor from "@bigbinary/neeto-molecules/DocumentEditor";
|
|
11
|
+
*
|
|
12
|
+
* const Component = () => (
|
|
13
|
+
* <Container isHeaderFixed>
|
|
14
|
+
* <FormikFormWrapper
|
|
15
|
+
* className="flex h-full w-full flex-grow"
|
|
16
|
+
* formikProps={{
|
|
17
|
+
* enableReinitialize: true,
|
|
18
|
+
* initialValues: initialFormValues,
|
|
19
|
+
* onSubmit: handleSubmit,
|
|
20
|
+
* validationSchema,
|
|
21
|
+
* }}
|
|
22
|
+
* >
|
|
23
|
+
* <DocumentEditor
|
|
24
|
+
* attachments={attachments}
|
|
25
|
+
* onAttachmentChange={handleAttachmentChange}
|
|
26
|
+
* onContentChange={handleContentChange}
|
|
27
|
+
* onTitleChange={handleTitleChange}
|
|
28
|
+
* getTitleRef={setTitleRef}
|
|
29
|
+
* getEditorRef={setEditorRef}
|
|
30
|
+
* editorProps={{
|
|
31
|
+
* editorSecrets,
|
|
32
|
+
* uploadEndpoint,
|
|
33
|
+
* openImageInNewTab: false,
|
|
34
|
+
* key: "document-editor",
|
|
35
|
+
* }}
|
|
36
|
+
* titleProps={{
|
|
37
|
+
* autoFocus: true,
|
|
38
|
+
* placeholder: "Document title",
|
|
39
|
+
* }}
|
|
40
|
+
* />
|
|
41
|
+
* </FormikFormWrapper>
|
|
42
|
+
* </Container>
|
|
43
|
+
* );
|
|
44
|
+
* @endexample
|
|
45
|
+
*/
|
|
46
|
+
const DocumentEditor: React.FC<{
|
|
47
|
+
attachments: attachment[];
|
|
48
|
+
onContentChange: (content: string) => void;
|
|
49
|
+
onAttachmentChange: (attachments: attachment[]) => void;
|
|
50
|
+
onTitleChange: (title: string) => void;
|
|
51
|
+
getTitleRef: (ref: HTMLTextAreaElement | null) => void;
|
|
52
|
+
getEditorRef: (ref: any) => void;
|
|
53
|
+
editorContentFieldName: string;
|
|
54
|
+
titleFieldName: string;
|
|
55
|
+
editorProps: FormikEditorProps;
|
|
56
|
+
titleProps: TextareaProps;
|
|
57
|
+
}>;
|
|
58
|
+
export default DocumentEditor;
|
package/types/EmailForm.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ type FieldOptions = {
|
|
|
34
34
|
* showSendToField
|
|
35
35
|
* messageVariables={messageVariables}
|
|
36
36
|
* replyToOptions={replyToOptions}
|
|
37
|
+
* sendToOptions={sendToOptions}
|
|
37
38
|
* subjectVariables={subjectVariables}
|
|
38
39
|
* />
|
|
39
40
|
* <EmailPreview
|
|
@@ -56,6 +57,7 @@ const EmailForm: React.FC<{
|
|
|
56
57
|
handleCancel: () => void;
|
|
57
58
|
isLoading?: boolean;
|
|
58
59
|
replyToOptions?: FieldOptions[];
|
|
60
|
+
sendToOptions?: FieldOptions[];
|
|
59
61
|
isUpdating?: boolean;
|
|
60
62
|
showFields?: boolean;
|
|
61
63
|
className?: string;
|
|
@@ -34,6 +34,7 @@ type ValidationMap = {
|
|
|
34
34
|
declare const EmailFormProvider: <T extends {}>(props: {
|
|
35
35
|
showSendToField?: boolean;
|
|
36
36
|
showReplyToField?: boolean;
|
|
37
|
+
showSendToAsRadio?: boolean;
|
|
37
38
|
onSubmit: FormikConfig<T>['onSubmit'];
|
|
38
39
|
initialValues: T;
|
|
39
40
|
children: ReactNode;
|