@humandialog/forms.svelte 0.4.33 → 0.4.35

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.
@@ -2,7 +2,7 @@
2
2
  import { onMount } from "svelte";
3
3
  export let color = "blue";
4
4
  export let size = 8;
5
- export let delay = 100;
5
+ export let delay = 1e3;
6
6
  let user_class = $$props.class ?? "";
7
7
  const sizes = {
8
8
  1: "w-1 h-1",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@humandialog/forms.svelte",
3
- "version": "0.4.33",
3
+ "version": "0.4.35",
4
4
  "description": "Basic Svelte UI components for Object Reef applications",
5
5
  "devDependencies": {
6
6
  "@playwright/test": "^1.28.1",
@@ -265,8 +265,28 @@
265
265
 
266
266
  function is_valid_email_address(e)
267
267
  {
268
- let pattern = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
269
- return (e.match(pattern) != null);
268
+ //let pattern = /^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/
269
+ //return (e.match(pattern) != null);
270
+
271
+ var at_idx = e.indexOf("@");
272
+ var dot_idx = e.lastIndexOf(".");
273
+ var space_idx = e.indexOf(" ");
274
+
275
+ if ((at_idx != -1) &&
276
+ (at_idx != 0) &&
277
+ (dot_idx != -1) &&
278
+ (dot_idx != 0) &&
279
+ (dot_idx > at_idx + 1) &&
280
+ (e.length > dot_idx + 1) &&
281
+ (space_idx == -1))
282
+ {
283
+ return true;
284
+ }
285
+ else
286
+ {
287
+ return false;
288
+ }
289
+
270
290
  }
271
291
 
272
292
  function is_valid_name(s)