{ "version": 3, "sources": ["src/app/shared/helpers/value-validation.service.ts"], "sourcesContent": ["import { Injectable } from \"@angular/core\";\r\nimport { FormControl } from \"@angular/forms\";\r\n\r\n@Injectable({\r\n\tprovidedIn: \"root\",\r\n})\r\nexport class ValueValidationHelper {\r\n\tisNull = (value: any) => (value == null ? true : false);\r\n\tisUndefined = (value: any) => (value == undefined ? true : false);\r\n\tisEmpty = (value: any) => (value === \"\" ? true : false);\r\n\r\n\tisNullOrEmpty = (value: any) => this.isNull(value) || this.isEmpty(value);\r\n\tisUndefinedOrEmpty = (value: any) => this.isUndefined(value) || this.isEmpty(value);\r\n\tisNullUndefinedOrEmpty = (value: any) => this.isNull(value) || this.isUndefinedOrEmpty(value);\r\n\r\n\tstatic requiredNoWhitespace = (control: FormControl) => \r\n\t\tcontrol.value?.trim().length > 0\r\n\t\t\t? null\r\n\t\t\t: { required: true };\r\n}\r\n"], "mappings": "wCAMA,IAAaA,GAAqB,IAAA,CAA5B,MAAOA,CAAqB,CACjCC,OAAUC,GAAgBA,GAAS,KACnCC,YAAeD,GAAgBA,GAASE,KACxCC,QAAWH,GAAgBA,IAAU,GAErCI,cAAiBJ,GAAe,KAAKD,OAAOC,CAAK,GAAK,KAAKG,QAAQH,CAAK,EACxEK,mBAAsBL,GAAe,KAAKC,YAAYD,CAAK,GAAK,KAAKG,QAAQH,CAAK,EAClFM,uBAA0BN,GAAe,KAAKD,OAAOC,CAAK,GAAK,KAAKK,mBAAmBL,CAAK,EAE5F,OAAOO,qBAAwBC,GAC9BA,EAAQR,OAAOS,KAAI,EAAGC,OAAS,EAC5B,KACA,CAAEC,SAAU,EAAI,6CAZRb,EAAqB,6BAArBA,EAAqBc,QAArBd,EAAqBe,UAAAC,WAFrB,MAAM,CAAA,SAENhB,CAAqB,GAAA", "names": ["ValueValidationHelper", "isNull", "value", "isUndefined", "undefined", "isEmpty", "isNullOrEmpty", "isUndefinedOrEmpty", "isNullUndefinedOrEmpty", "requiredNoWhitespace", "control", "trim", "length", "required", "factory", "\u0275fac", "providedIn"] }