videomail-client 5.0.2 → 5.1.0
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/TODO.md +2 -2
- package/package.json +11 -11
- package/prototype/js/videomail-client.js +4787 -4539
- package/prototype/js/videomail-client.min.js +15 -7
- package/prototype/js/videomail-client.min.js.map +1 -1
- package/src/js/options.js +2 -0
- package/src/js/resource.js +6 -3
- package/src/js/wrappers/container.js +2 -0
package/src/js/options.js
CHANGED
|
@@ -50,6 +50,8 @@ export default {
|
|
|
50
50
|
subjectInputName: 'subject', // the form input name for subject
|
|
51
51
|
fromInputName: 'from', // the form input name for the from email
|
|
52
52
|
toInputName: 'to', // the form input name for the to email
|
|
53
|
+
ccInputName: 'cc', // the form input name for the cc email
|
|
54
|
+
bccInputName: 'bcc', // the form input name for the bcc email
|
|
53
55
|
bodyInputName: 'body', // the form input name for the message (body)
|
|
54
56
|
sendCopyInputName: 'sendCopy', // the form checkbox name for sending myself a copy
|
|
55
57
|
|
package/src/js/resource.js
CHANGED
|
@@ -3,6 +3,7 @@ import superagent from 'superagent'
|
|
|
3
3
|
import Constants from './constants'
|
|
4
4
|
|
|
5
5
|
const CACHE_KEY = 'alias'
|
|
6
|
+
const timezoneId = Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
6
7
|
|
|
7
8
|
export default function (options) {
|
|
8
9
|
const cache = {}
|
|
@@ -19,6 +20,8 @@ export default function (options) {
|
|
|
19
20
|
if (options.defaults) {
|
|
20
21
|
videomail = applyDefaultValue(videomail, 'from')
|
|
21
22
|
videomail = applyDefaultValue(videomail, 'to')
|
|
23
|
+
videomail = applyDefaultValue(videomail, 'cc')
|
|
24
|
+
videomail = applyDefaultValue(videomail, 'bcc')
|
|
22
25
|
videomail = applyDefaultValue(videomail, 'subject')
|
|
23
26
|
videomail = applyDefaultValue(videomail, 'body')
|
|
24
27
|
}
|
|
@@ -40,12 +43,10 @@ export default function (options) {
|
|
|
40
43
|
}
|
|
41
44
|
|
|
42
45
|
function fetch(alias, cb) {
|
|
43
|
-
const timezoneId = Intl.DateTimeFormat().resolvedOptions().timeZone
|
|
44
|
-
|
|
45
46
|
superagent
|
|
46
47
|
.get('/videomail/' + alias + '/snapshot')
|
|
47
48
|
.set('Accept', 'application/json')
|
|
48
|
-
.set('
|
|
49
|
+
.set('Timezone-Id', timezoneId)
|
|
49
50
|
.set(Constants.SITE_NAME_LABEL, options.siteName)
|
|
50
51
|
.timeout(options.timeouts.connection)
|
|
51
52
|
.end(function (err, res) {
|
|
@@ -85,6 +86,7 @@ export default function (options) {
|
|
|
85
86
|
|
|
86
87
|
request
|
|
87
88
|
.query(queryParams)
|
|
89
|
+
.set('Timezone-Id', timezoneId)
|
|
88
90
|
.send(videomail)
|
|
89
91
|
.timeout(options.timeout)
|
|
90
92
|
.end(function (err, res) {
|
|
@@ -185,6 +187,7 @@ export default function (options) {
|
|
|
185
187
|
superagent
|
|
186
188
|
.post(url)
|
|
187
189
|
.type(formType)
|
|
190
|
+
.set('Timezone-Id', timezoneId)
|
|
188
191
|
.send(formData)
|
|
189
192
|
.timeout(options.timeout)
|
|
190
193
|
.end(function (err, res) {
|
|
@@ -232,6 +232,8 @@ const Container = function (options) {
|
|
|
232
232
|
subject: options.selectors.subjectInputName,
|
|
233
233
|
from: options.selectors.fromInputName,
|
|
234
234
|
to: options.selectors.toInputName,
|
|
235
|
+
cc: options.selectors.ccInputName,
|
|
236
|
+
bcc: options.selectors.bccInputName,
|
|
235
237
|
body: options.selectors.bodyInputName,
|
|
236
238
|
key: options.selectors.keyInputName,
|
|
237
239
|
parentKey: options.selectors.parentKeyInputName,
|