bhl-forms 0.0.84 → 0.0.85

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.
@@ -11128,6 +11128,18 @@ function rollbar(type, msg) {
11128
11128
  }
11129
11129
  }
11130
11130
  }
11131
+ function valid_phone(node) {
11132
+ if (!node.value) {
11133
+ return true;
11134
+ }
11135
+ if (node.value.replace(/-/g, "").match(/([0-9])\1{5,9}/)) {
11136
+ return false;
11137
+ }
11138
+ if (node.value.match(/^[0-1]{1}/)) {
11139
+ return false;
11140
+ }
11141
+ return true;
11142
+ }
11131
11143
  function analyticsEvent(event, body) {
11132
11144
  try {
11133
11145
  dbg(body);
@@ -11349,11 +11361,14 @@ const doRedirect = (redirectUrl, newTabUrl) => {
11349
11361
  dbg("redirect:", redirectUrl, "newTab:", newTabUrl);
11350
11362
  redirectTo(redirectUrl);
11351
11363
  };
11364
+ function isIOS() {
11365
+ return /(iPad|iPhone|iPod)/g.test(navigator.userAgent || "");
11366
+ }
11352
11367
  const handleRedirect = (formData, node) => {
11353
11368
  try {
11354
11369
  var redirectUrl = getRedirect(formData, node);
11355
11370
  if (redirectUrl && redirectUrl !== "null") {
11356
- if (node && node.props.attrs.popUnder) {
11371
+ if (node && node.props.attrs.popUnder && !isIOS()) {
11357
11372
  var popUnderUrl = node.props.attrs.popUnder;
11358
11373
  const res = openNewTab(redirectUrl);
11359
11374
  if (res !== null) {
@@ -15804,6 +15819,9 @@ const init = () => {
15804
15819
  inputs: {
15805
15820
  DatePicker: createInput(_sfc_main)
15806
15821
  },
15822
+ rules: {
15823
+ valid_phone
15824
+ },
15807
15825
  config: {
15808
15826
  classes
15809
15827
  }