videomail-client 13.0.0 → 13.1.1

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.
@@ -10664,7 +10664,7 @@ var __webpack_exports__ = {};
10664
10664
  var client = __webpack_require__("./node_modules/superagent/lib/client.js");
10665
10665
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10666
10666
  var package_namespaceObject = {
10667
- rE: "13.0.0"
10667
+ rE: "13.1.1"
10668
10668
  };
10669
10669
  var defined = __webpack_require__("./node_modules/defined/index.js");
10670
10670
  var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
@@ -14419,8 +14419,9 @@ var __webpack_exports__ = {};
14419
14419
  for (const formControl of this.formElement.elements){
14420
14420
  const name = formControl.getAttribute("name");
14421
14421
  if (name) {
14422
- const value = videomail[name];
14422
+ let value = videomail[name];
14423
14423
  const tagName = formControl.tagName;
14424
+ if (this.options.callbacks.adjustFormValueBeforePopulating) value = this.options.callbacks.adjustFormValueBeforePopulating(name, value, videomail);
14424
14425
  switch(tagName){
14425
14426
  case "INPUT":
14426
14427
  {
@@ -14904,7 +14905,8 @@ var __webpack_exports__ = {};
14904
14905
  },
14905
14906
  loadUserMediaOnRecord: false,
14906
14907
  callbacks: {
14907
- adjustFormDataBeforePosting: void 0
14908
+ adjustFormDataBeforePosting: void 0,
14909
+ adjustFormValueBeforePopulating: void 0
14908
14910
  },
14909
14911
  defaults: {
14910
14912
  from: void 0,
package/dist/esm/index.js CHANGED
@@ -3606,7 +3606,7 @@ const constants = {
3606
3606
  }
3607
3607
  };
3608
3608
  var package_namespaceObject = {
3609
- rE: "13.0.0"
3609
+ rE: "13.1.1"
3610
3610
  };
3611
3611
  function canPlayType_canPlayType(video, type) {
3612
3612
  const canPlayType = video.canPlayType(`video/${type}`);
@@ -4070,8 +4070,9 @@ class Form extends util_Despot {
4070
4070
  for (const formControl of this.formElement.elements){
4071
4071
  const name = formControl.getAttribute("name");
4072
4072
  if (name) {
4073
- const value = videomail[name];
4073
+ let value = videomail[name];
4074
4074
  const tagName = formControl.tagName;
4075
+ if (this.options.callbacks.adjustFormValueBeforePopulating) value = this.options.callbacks.adjustFormValueBeforePopulating(name, value, videomail);
4075
4076
  switch(tagName){
4076
4077
  case "INPUT":
4077
4078
  {
@@ -4523,7 +4524,8 @@ const options_options = {
4523
4524
  },
4524
4525
  loadUserMediaOnRecord: false,
4525
4526
  callbacks: {
4526
- adjustFormDataBeforePosting: void 0
4527
+ adjustFormDataBeforePosting: void 0,
4528
+ adjustFormValueBeforePopulating: void 0
4527
4529
  },
4528
4530
  defaults: {
4529
4531
  from: void 0,
@@ -1,5 +1,5 @@
1
1
  import { PartialDeep } from "type-fest";
2
- import { PartialVideomail } from "./Videomail";
2
+ import { PartialVideomail, Videomail } from "./Videomail";
3
3
  export interface VideomailClientOptions {
4
4
  logger: {
5
5
  debug: (message: unknown) => void;
@@ -99,6 +99,7 @@ export interface VideomailClientOptions {
99
99
  loadUserMediaOnRecord: boolean;
100
100
  callbacks: {
101
101
  adjustFormDataBeforePosting?: undefined | ((videomail: PartialVideomail) => PartialVideomail);
102
+ adjustFormValueBeforePopulating?: undefined | ((name: string, value: any, videomail: Videomail) => string);
102
103
  };
103
104
  defaults: {
104
105
  from?: string | undefined;
package/dist/umd/index.js CHANGED
@@ -10670,7 +10670,7 @@
10670
10670
  var client = __webpack_require__("./node_modules/superagent/lib/client.js");
10671
10671
  var client_default = /*#__PURE__*/ __webpack_require__.n(client);
10672
10672
  var package_namespaceObject = {
10673
- rE: "13.0.0"
10673
+ rE: "13.1.1"
10674
10674
  };
10675
10675
  var defined = __webpack_require__("./node_modules/defined/index.js");
10676
10676
  var defined_default = /*#__PURE__*/ __webpack_require__.n(defined);
@@ -14405,8 +14405,9 @@
14405
14405
  for (const formControl of this.formElement.elements){
14406
14406
  const name = formControl.getAttribute("name");
14407
14407
  if (name) {
14408
- const value = videomail[name];
14408
+ let value = videomail[name];
14409
14409
  const tagName = formControl.tagName;
14410
+ if (this.options.callbacks.adjustFormValueBeforePopulating) value = this.options.callbacks.adjustFormValueBeforePopulating(name, value, videomail);
14410
14411
  switch(tagName){
14411
14412
  case "INPUT":
14412
14413
  {
@@ -14858,7 +14859,8 @@
14858
14859
  },
14859
14860
  loadUserMediaOnRecord: false,
14860
14861
  callbacks: {
14861
- adjustFormDataBeforePosting: void 0
14862
+ adjustFormDataBeforePosting: void 0,
14863
+ adjustFormValueBeforePopulating: void 0
14862
14864
  },
14863
14865
  defaults: {
14864
14866
  from: void 0,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "videomail-client",
3
- "version": "13.0.0",
3
+ "version": "13.1.1",
4
4
  "description": "A wicked npm package to record videos directly in the browser, wohooo!",
5
5
  "keywords": [
6
6
  "webcam",