@bigbinary/neeto-molecules 1.0.74 → 1.0.76-beta
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/dist/Container.cjs.js +1 -1
- package/dist/Container.js +1 -1
- package/dist/CustomDomainDashboard.cjs.js +12 -26
- package/dist/CustomDomainDashboard.cjs.js.map +1 -1
- package/dist/CustomDomainDashboard.js +14 -28
- package/dist/CustomDomainDashboard.js.map +1 -1
- package/dist/EmailForm.cjs.js +2941 -0
- package/dist/EmailForm.cjs.js.map +1 -0
- package/dist/EmailForm.js +2911 -0
- package/dist/EmailForm.js.map +1 -0
- package/dist/EmailPreview.cjs.js +5 -3
- package/dist/EmailPreview.cjs.js.map +1 -1
- package/dist/EmailPreview.js +6 -4
- package/dist/EmailPreview.js.map +1 -1
- package/dist/Header.cjs.js +11 -25
- package/dist/Header.cjs.js.map +1 -1
- package/dist/Header.js +14 -28
- package/dist/Header.js.map +1 -1
- package/dist/MenuBar.cjs.js +1 -1
- package/dist/MenuBar.js +1 -1
- package/dist/Rename.cjs.js +9 -9
- package/dist/Rename.cjs.js.map +1 -1
- package/dist/Rename.js +9 -9
- package/dist/Rename.js.map +1 -1
- package/dist/ShareViaEmail.cjs.js +5 -3
- package/dist/ShareViaEmail.cjs.js.map +1 -1
- package/dist/ShareViaEmail.js +6 -4
- package/dist/ShareViaEmail.js.map +1 -1
- package/dist/Sidebar.cjs.js +181 -95
- package/dist/Sidebar.cjs.js.map +1 -1
- package/dist/Sidebar.js +183 -97
- package/dist/Sidebar.js.map +1 -1
- package/package.json +2 -2
- package/src/translations/en.json +33 -2
- package/types/EmailForm.d.ts +55 -0
- package/types/EmailFormProvider.d.ts +35 -0
- package/types/Sidebar.d.ts +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-molecules",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.76-beta",
|
|
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>",
|
|
@@ -51,7 +51,7 @@
|
|
|
51
51
|
"@bigbinary/neeto-commons-frontend": "2.0.106",
|
|
52
52
|
"@bigbinary/neeto-editor": "1.27.0-beta.1",
|
|
53
53
|
"@bigbinary/neeto-filters-frontend": "^2.11.15",
|
|
54
|
-
"@bigbinary/neeto-icons": "^1.
|
|
54
|
+
"@bigbinary/neeto-icons": "^1.14.0",
|
|
55
55
|
"@bigbinary/neeto-molecules": "^1.0.5",
|
|
56
56
|
"@bigbinary/neetoui": "^5.0.9",
|
|
57
57
|
"@faker-js/faker": "7.6.0",
|
package/src/translations/en.json
CHANGED
|
@@ -67,12 +67,16 @@
|
|
|
67
67
|
"logout": "Log out",
|
|
68
68
|
"help": "Help",
|
|
69
69
|
"productSwitcher": "Product switcher",
|
|
70
|
+
"neetoProducts": "neeto products",
|
|
70
71
|
"helpLinks": {
|
|
71
72
|
"liveChat": "Live chat",
|
|
72
73
|
"helpCenter": "Help center",
|
|
73
74
|
"whatsNew": "What's new",
|
|
74
|
-
"keyboardShortcuts": "Keyboard shortcuts"
|
|
75
|
-
|
|
75
|
+
"keyboardShortcuts": "Keyboard shortcuts",
|
|
76
|
+
"helpArticles": "Help articles"
|
|
77
|
+
},
|
|
78
|
+
"showMenu": "Show menu",
|
|
79
|
+
"hideMenu": "Hide menu"
|
|
76
80
|
},
|
|
77
81
|
"appSwitcher": {
|
|
78
82
|
"noApps": "No apps found",
|
|
@@ -444,6 +448,33 @@
|
|
|
444
448
|
"fileSizeLimitExceeded": "Your file is larger than {{maxSizeInReadableUnits}}. Please try again with a smaller file.",
|
|
445
449
|
"fileTypeError": "Please upload a file with one of the following file types: {{acceptedTypes}}."
|
|
446
450
|
}
|
|
451
|
+
},
|
|
452
|
+
"emailForm": {
|
|
453
|
+
"errors": {
|
|
454
|
+
"required": "{{entity}} is required",
|
|
455
|
+
"invalidEmailAddress": "Please enter a valid email address",
|
|
456
|
+
"messageRequired": "Message is required",
|
|
457
|
+
"subjectRequired": "Subject is required"
|
|
458
|
+
},
|
|
459
|
+
"fields": {
|
|
460
|
+
"sendToEmailAddress": "'Send to' email address",
|
|
461
|
+
"replyToEmailAddress": "'Reply to' email address"
|
|
462
|
+
},
|
|
463
|
+
"helpText": "You can customize the {{type}} by using \"dynamic variables\". To use \"dynamic variables\" click on the <span>{ }</span> icon.",
|
|
464
|
+
"uploadCSV": "Upload CSV",
|
|
465
|
+
"labels": {
|
|
466
|
+
"sendTo": "Send to",
|
|
467
|
+
"replyTo": "Reply to",
|
|
468
|
+
"message": "Message",
|
|
469
|
+
"subject": "Subject",
|
|
470
|
+
"ccBcc": "Cc/Bcc",
|
|
471
|
+
"cc": "CC",
|
|
472
|
+
"bCc": "BCC"
|
|
473
|
+
},
|
|
474
|
+
"placeholders": {
|
|
475
|
+
"emailPlaceholder": "Write email address",
|
|
476
|
+
"commaSeparatedEmails": "Use comma (‘) to add multiple email addresses"
|
|
477
|
+
}
|
|
447
478
|
}
|
|
448
479
|
}
|
|
449
480
|
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
type ContentVariables = {
|
|
3
|
+
label: string;
|
|
4
|
+
key: string;
|
|
5
|
+
};
|
|
6
|
+
type FieldOptions = {
|
|
7
|
+
label: string;
|
|
8
|
+
value: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
*
|
|
12
|
+
* This is a component used to create or edit an email template. It includes fields for defining the email subject, message, sender details, and recipient details. It also provides options to insert variables into the message and subject field, validate input, and handle save or cancel actions."
|
|
13
|
+
*
|
|
14
|
+
* 
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
*
|
|
18
|
+
* import React from "react";
|
|
19
|
+
* import { EmailForm, EmailFormProvider } from "components/EmailForm";
|
|
20
|
+
*
|
|
21
|
+
* const EmailComposer = () => {
|
|
22
|
+
* return (
|
|
23
|
+
* <EmailFormProvider>
|
|
24
|
+
* {({ values }) => (
|
|
25
|
+
* <div className="flex gap-2 p-6">
|
|
26
|
+
* <EmailForm
|
|
27
|
+
* showReplyToField
|
|
28
|
+
* showSendToField
|
|
29
|
+
* messageVariables={messageVariables}
|
|
30
|
+
* replyToOptions={replyToOptions}
|
|
31
|
+
* subjectVariables={subjectVariables}
|
|
32
|
+
* />
|
|
33
|
+
* <EmailPreview
|
|
34
|
+
* body={values.message}
|
|
35
|
+
* subject={values.subject}
|
|
36
|
+
* to={pluck("value", values.sendTo)}
|
|
37
|
+
* />
|
|
38
|
+
* </div>
|
|
39
|
+
* )}
|
|
40
|
+
* </EmailFormProvider>
|
|
41
|
+
* );
|
|
42
|
+
* };
|
|
43
|
+
*
|
|
44
|
+
* export default EmailComposer;
|
|
45
|
+
* @endexample
|
|
46
|
+
*/
|
|
47
|
+
const EmailForm: React.FC<{
|
|
48
|
+
messageVariables?: ContentVariables[];
|
|
49
|
+
subjectVariables?: ContentVariables[];
|
|
50
|
+
handleCancel: () => void;
|
|
51
|
+
isLoading?: boolean;
|
|
52
|
+
replyToOptions?: FieldOptions[];
|
|
53
|
+
isUpdating?: boolean;
|
|
54
|
+
}>;
|
|
55
|
+
export default EmailForm;
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import React from "react";
|
|
2
|
+
/**
|
|
3
|
+
*
|
|
4
|
+
* This is a container component for EmailForm that maintains the context values such as the Formik container. By using this context, EmailForm and its child components can easily access and manage form state, handle form submission, and perform form validation, among other operations.
|
|
5
|
+
*
|
|
6
|
+
* @example
|
|
7
|
+
*
|
|
8
|
+
* import React from "react";
|
|
9
|
+
* import { EmailFormProvider } from "components/EmailForm";
|
|
10
|
+
*
|
|
11
|
+
* const EmailComposer = () => {
|
|
12
|
+
* return (
|
|
13
|
+
* <EmailFormProvider>
|
|
14
|
+
* {({ values }) => (
|
|
15
|
+
* { children }
|
|
16
|
+
* )}
|
|
17
|
+
* </EmailFormProvider>
|
|
18
|
+
* );
|
|
19
|
+
* };
|
|
20
|
+
*
|
|
21
|
+
* export default EmailComposer;
|
|
22
|
+
* @endexample
|
|
23
|
+
*/
|
|
24
|
+
declare const EmailFormProvider: <T extends {}>(props: {
|
|
25
|
+
showSendToField?: boolean;
|
|
26
|
+
showReplyToField?: boolean;
|
|
27
|
+
onSubmit: FormikConfig<T>['onSubmit'];
|
|
28
|
+
initialValues: T;
|
|
29
|
+
children: ReactNode;
|
|
30
|
+
formikProps: {
|
|
31
|
+
[key: string]: any;
|
|
32
|
+
};
|
|
33
|
+
validationSchema: yup.Schema<T>;
|
|
34
|
+
}) => JSX.Element;
|
|
35
|
+
export default EmailFormProvider;
|
package/types/Sidebar.d.ts
CHANGED