@verifiedinc-public/shared-ui-elements 8.16.2 → 8.17.0

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.
@@ -0,0 +1 @@
1
+ "use strict";import*as r from"zod";import{z as i}from"zod";const m=r.string().refine(e=>{if(/^\d{2}\/\d{2}\/\d{4}$/.test(e)){const t=Date.parse(String(new Date(e)));return!isNaN(t)}return!1},"Date is invalid"),U=e=>r.date().refine(t=>t.getTime()<Date.now(),{message:e}),o=e=>{if(!/^-?\d+$/.test(e)||e==="NaN"||e==="")return!1;const t=parseInt(e,10);if(isNaN(t))return!1;const s=new Date(t);if(isNaN(s.getTime()))return!1;const n=s.getUTCHours(),a=s.getUTCMinutes(),c=s.getUTCSeconds(),D=s.getUTCMilliseconds();return!(n!==12||a!==0||c!==0||D!==0)},f=e=>{if(e==="NaN"||e==="")return!1;const t=parseInt(e,10);if(isNaN(t))return!1;const s=new Date(t);if(isNaN(s.getTime()))return!1;const n=Date.UTC(1900,0,1,0,0,0,0);return t>=n},g=e=>o(e),d=e=>/^-?\d+$/.test(e)?f(e):!1,N=e=>{const t=parseInt(e,10),s=new Date(t),n=new Date,a=new Date(Date.UTC(n.getUTCFullYear()-18,n.getUTCMonth(),n.getUTCDate(),23,59,59,999));return s.getTime()<=a.getTime()},u=e=>N(e),l=r.string().refine(g,"").refine(d,""),C=r.string().refine(g,"").refine(d,"").refine(u,"Must be 18 years or older"),p=r.string().refine(e=>/\+1\d{3}\d{3}\d{4}/.test(e),"Phone is invalid"),T=/^(?!666|9\d{2})\d{3}(?!00)\d{2}(?!0{4})\d{4}$/,w=i.string().regex(T),I=i.string().refine(e=>/^•••-••-(\d{4})$/.test(e)||T.test(e),{message:"Invalid SSN"}),M=i.string().refine(e=>/^[0-9]{10}$/.test(e),"Invalid NPI");export{I as M,w as S,m as U,f as a,d as b,N as c,u as d,l as e,C as f,U as g,M as n,p,g as r,o as v};
@@ -1,3 +1,11 @@
1
1
  import * as zod from 'zod';
2
2
  export declare const USDateSchema: zod.ZodEffects<zod.ZodString, string, string>;
3
3
  export declare const getDateSchemaWithPastValidation: (message: string) => zod.ZodEffects<zod.ZodDate, Date, Date>;
4
+ export declare const validateTimestamp: (timestampString: string) => boolean;
5
+ export declare const validateMinimumDate1900: (timestampString: string) => boolean;
6
+ export declare const refineTimestamp: (value: string) => boolean;
7
+ export declare const refineMinimumDate1900: (value: string) => boolean;
8
+ export declare const validateAge18Plus: (timestampString: string) => boolean;
9
+ export declare const refineAge18Plus: (value: string) => boolean;
10
+ export declare const dateSchema: zod.ZodEffects<zod.ZodEffects<zod.ZodString, string, string>, string, string>;
11
+ export declare const birthDateSchema: zod.ZodEffects<zod.ZodEffects<zod.ZodEffects<zod.ZodString, string, string>, string, string>, string, string>;
@@ -1 +1 @@
1
- "use strict";import{M as a,S as s,U as e,g as m,n as S,p as h}from"../shared/npi.schema-BsAQ0yLj.mjs";import{d as t,e as c,f as i,g as n,s as o}from"../shared/unix.schema-D7g4VIKT.mjs";export{a as MaskedAndUnmaskedSSNSchema,s as SSNSchema,e as USDateSchema,t as descriptionSchema,c as emailSchema,i as fieldSchema,m as getDateSchemaWithPastValidation,n as getUnixSchema,S as npiSchema,h as phoneSchema,o as stateSchema};
1
+ "use strict";import{M as a,S as s,U as e,f as m,e as i,g as t,n as S,p as h,d as c,b as n,r as d,c as r,a as p,v as f}from"../shared/npi.schema-Ce7G1Xs4.mjs";import{d as l,e as o,f as g,g as D,s as u}from"../shared/unix.schema-D7g4VIKT.mjs";export{a as MaskedAndUnmaskedSSNSchema,s as SSNSchema,e as USDateSchema,m as birthDateSchema,i as dateSchema,l as descriptionSchema,o as emailSchema,g as fieldSchema,t as getDateSchemaWithPastValidation,D as getUnixSchema,S as npiSchema,h as phoneSchema,c as refineAge18Plus,n as refineMinimumDate1900,d as refineTimestamp,u as stateSchema,r as validateAge18Plus,p as validateMinimumDate1900,f as validateTimestamp};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@verifiedinc-public/shared-ui-elements",
3
- "version": "8.16.2",
3
+ "version": "8.17.0",
4
4
  "description": "A set of UI components, utilities that is shareable with the core apps.",
5
5
  "private": false,
6
6
  "keywords": [],
@@ -1 +0,0 @@
1
- "use strict";import*as t from"zod";import{z as i}from"zod";const r=t.string().refine(e=>/\+1\d{3}\d{3}\d{4}/.test(e),"Phone is invalid"),n=/^(?!666|9\d{2})\d{3}(?!00)\d{2}(?!0{4})\d{4}$/,a=i.string().regex(n),d=i.string().refine(e=>/^•••-••-(\d{4})$/.test(e)||n.test(e),{message:"Invalid SSN"}),g=t.string().refine(e=>{if(/^\d{2}\/\d{2}\/\d{4}$/.test(e)){const s=Date.parse(String(new Date(e)));return!isNaN(s)}return!1},"Date is invalid"),o=e=>t.date().refine(s=>s.getTime()<Date.now(),{message:e}),f=i.string().refine(e=>/^[0-9]{10}$/.test(e),"Invalid NPI");export{d as M,a as S,g as U,o as g,f as n,r as p};