1 line
6.6 KiB
Plaintext
1 line
6.6 KiB
Plaintext
|
{"version":3,"sources":["../../src/schema/fields.js"],"names":["fieldErrors","AddFieldValidationFailed","allowedTypes","all","getNewField","type","id","name","typeOptions","label","getInitialValue","getUndefinedValue","fieldRules","allFields","f","t","typeOptionsRules","field","def","optName","optionDefinitions","keys","o","isValid","requirementDescription","validateField","everySingleField","validateAllFields","recordNode","fields","flatten","addField","recordTemplate","validationMessages","length","errors","m","error","BadRequestError","join","push"],"mappings":"uZAAA;AACA;;;;;;;AAOA;AACA;AACA;AACA;;AAEO,IAAMA,WAAW,GAAG;AACzBC,EAAAA,wBAAwB,EAAE,wBADD,EAApB,C;;;AAIA,IAAMC,YAAY,GAAG,SAAfA,YAAe,WAAM,cAAKC,UAAL,CAAN,EAArB,C;;AAEA,IAAMC,WAAW,GAAG,SAAdA,WAAc,CAAAC,IAAI,UAAK;AAClCC,IAAAA,EAAE,EAAE,wBAD8B;AAElCC,IAAAA,IAAI,EAAE,EAF4B,EAExB;AACVF,IAAAA,IAAI,EAAJA,IAHkC;AAIlCG,IAAAA,WAAW,EAAE,8BAAkBH,IAAlB,CAJqB;AAKlCI,IAAAA,KAAK,EAAE,EAL2B,EAKvB;AACXC,IAAAA,eAAe,EAAE,SANiB,EAMN;AAC5BC,IAAAA,iBAAiB,EAAE,SAPe,CAOJ;AAPI,GAAL,EAAxB,C;;AAUP,IAAMC,UAAU,GAAG,SAAbA,UAAa,CAAAC,SAAS,UAAI;AAC9B,kCAAS,MAAT,EAAiB,uBAAjB,EAA0C,UAAAC,CAAC,UAAI,8BAAiBA,CAAC,CAACP,IAAnB,CAAJ,EAA3C,CAD8B;AAE9B,kCAAS,MAAT,EAAiB,uBAAjB,EAA0C,UAAAO,CAAC,UAAI,8BAAiBA,CAAC,CAACT,IAAnB,CAAJ,EAA3C,CAF8B;AAG9B,kCAAS,OAAT,EAAkB,wBAAlB,EAA4C,UAAAS,CAAC,UAAI,8BAAiBA,CAAC,CAACL,KAAnB,C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,cACuCkC,MAAM,CAACI,IAAP,CAAY,IAAZ,CADvC,EAAN;;AAGD;AACDP,EAAAA,cAAc,CAACH,MAAf,CAAsBW,IAAtB,CAA2BvB,KAA3B;AACD,CAdM,C","sourcesContent":["import { some, map, filter, keys, includes, countBy, flatten } from \"lodash/fp\"\nimport {\n isSomething,\n $,\n isNonEmptyString,\n isNothingOrEmpty,\n isNothing,\n} from \"../common\"\nimport { all, getDefaultOptions } from \"./types/index.js\"\nimport { applyRuleSet, makerule } from \"../common/validationCommon\"\nimport { BadRequestError } from \"../common/errors\"\nimport { generate } from \"shortid\"\n\nexport const fieldErrors = {\n AddFieldValidationFailed: \"Add field validation: \"
|