bhl-forms 0.0.83 → 0.0.84

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.
@@ -4675,6 +4675,9 @@ function dbg$1() {
4675
4675
  return;
4676
4676
  console.debug(...arguments);
4677
4677
  }
4678
+ const sleep = (time) => __async(this, null, function* () {
4679
+ return new Promise((resolve2) => setTimeout(resolve2, time));
4680
+ });
4678
4681
  const getCoords$1 = (elem) => {
4679
4682
  let box2 = elem.getBoundingClientRect();
4680
4683
  return {
@@ -5956,8 +5959,10 @@ const dataDefaults = {
5956
5959
  redirect = strSubUrl(redirect, formData);
5957
5960
  }
5958
5961
  redirectTo(redirect);
5962
+ yield sleep(2e3);
5959
5963
  } else if (redirect) {
5960
- yield redirect(formData, node);
5964
+ redirect(formData, node);
5965
+ yield sleep(2e3);
5961
5966
  }
5962
5967
  }),
5963
5968
  stringify: (value) => JSON.stringify(value, null, 2)
@@ -11344,7 +11349,7 @@ const doRedirect = (redirectUrl, newTabUrl) => {
11344
11349
  dbg("redirect:", redirectUrl, "newTab:", newTabUrl);
11345
11350
  redirectTo(redirectUrl);
11346
11351
  };
11347
- const handleRedirect = (formData, node) => __async(this, null, function* () {
11352
+ const handleRedirect = (formData, node) => {
11348
11353
  try {
11349
11354
  var redirectUrl = getRedirect(formData, node);
11350
11355
  if (redirectUrl && redirectUrl !== "null") {
@@ -11363,7 +11368,6 @@ const handleRedirect = (formData, node) => __async(this, null, function* () {
11363
11368
  } else {
11364
11369
  doRedirect(redirectUrl, null);
11365
11370
  }
11366
- yield new Promise((resolve2) => setTimeout(resolve2, 2e3));
11367
11371
  } else {
11368
11372
  rollbar("warning", "No redirectUrl found");
11369
11373
  }
@@ -11372,7 +11376,7 @@ const handleRedirect = (formData, node) => __async(this, null, function* () {
11372
11376
  console.warn(msg);
11373
11377
  rollbar("warning", msg);
11374
11378
  }
11375
- });
11379
+ };
11376
11380
  const textClassification = {
11377
11381
  label: "t-block t-mb-3 t-font-semibold t-text-base formkit-invalid:t-text-red-500",
11378
11382
  inner: `