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.
@@ -17913,6 +17913,18 @@ function rollbar(type, msg) {
17913
17913
  }
17914
17914
  }
17915
17915
  }
17916
+ function valid_phone(node2) {
17917
+ if (!node2.value) {
17918
+ return true;
17919
+ }
17920
+ if (node2.value.replace(/-/g, "").match(/([0-9])\1{5,9}/)) {
17921
+ return false;
17922
+ }
17923
+ if (node2.value.match(/^[0-1]{1}/)) {
17924
+ return false;
17925
+ }
17926
+ return true;
17927
+ }
17916
17928
  function analyticsEvent(event, body) {
17917
17929
  try {
17918
17930
  dbg(body);
@@ -18141,11 +18153,14 @@ var doRedirect = (redirectUrl, newTabUrl) => {
18141
18153
  dbg("redirect:", redirectUrl, "newTab:", newTabUrl);
18142
18154
  redirectTo(redirectUrl);
18143
18155
  };
18156
+ function isIOS() {
18157
+ return /(iPad|iPhone|iPod)/g.test(navigator.userAgent || "");
18158
+ }
18144
18159
  var handleRedirect = (formData, node2) => {
18145
18160
  try {
18146
18161
  var redirectUrl = getRedirect(formData, node2);
18147
18162
  if (redirectUrl && redirectUrl !== "null") {
18148
- if (node2 && node2.props.attrs.popUnder) {
18163
+ if (node2 && node2.props.attrs.popUnder && !isIOS()) {
18149
18164
  var popUnderUrl = node2.props.attrs.popUnder;
18150
18165
  var res = openNewTab(redirectUrl);
18151
18166
  if (res !== null) {
@@ -22576,6 +22591,9 @@ var init = () => {
22576
22591
  inputs: {
22577
22592
  DatePicker: createInput(_sfc_main)
22578
22593
  },
22594
+ rules: {
22595
+ valid_phone
22596
+ },
22579
22597
  config: {
22580
22598
  classes
22581
22599
  }