{"version":3,"file":"rockValidation.js","sources":["../../../Framework/Controls/rockValidation.ts"],"sourcesContent":["// \r\n// Copyright by the Spark Development Network\r\n//\r\n// Licensed under the Rock Community License (the \"License\");\r\n// you may not use this file except in compliance with the License.\r\n// You may obtain a copy of the License at\r\n//\r\n// http://www.rockrms.com/license\r\n//\r\n// Unless required by applicable law or agreed to in writing, software\r\n// distributed under the License is distributed on an \"AS IS\" BASIS,\r\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r\n// See the License for the specific language governing permissions and\r\n// limitations under the License.\r\n// \r\n//\r\nimport NotificationBox from \"./notificationBox.obs\";\r\nimport { computed, defineComponent, PropType } from \"vue\";\r\nimport { FormError } from \"@Obsidian/Utility/form\";\r\n\r\nexport default defineComponent({\r\n name: \"RockValidation\",\r\n\r\n components: {\r\n NotificationBox\r\n },\r\n\r\n props: {\r\n /** The errors that should be displayed. */\r\n errors: {\r\n type: Array as PropType,\r\n required: true\r\n }\r\n },\r\n\r\n setup(props) {\r\n const hasErrors = computed((): boolean => props.errors.length > 0);\r\n\r\n return {\r\n hasErrors\r\n };\r\n },\r\n\r\n template: `\r\n\r\n Please correct the following:\r\n \r\n - \r\n {{error.name}}\r\n {{error.text}}\r\n
\r\n
\r\n\r\n`\r\n});\r\n"],"names":["defineComponent","name","components","NotificationBox","props","errors","type","Array","required","setup","hasErrors","computed","length","template"],"mappings":";;;;;;;;;;;;AAoBA,oDAAeA,eAAe,CAAC;YAC3BC,EAAAA,IAAI,EAAE,gBAAgB;YAEtBC,EAAAA,UAAU,EAAE;YACRC,IAAAA,eAAAA;eACH;YAEDC,EAAAA,KAAK,EAAE;YAEHC,IAAAA,MAAM,EAAE;YACJC,MAAAA,IAAI,EAAEC,KAA8B;YACpCC,MAAAA,QAAQ,EAAE,IAAA;YACd,KAAA;eACH;cAEDC,KAAKA,CAACL,KAAK,EAAE;YACT,IAAA,IAAMM,SAAS,GAAGC,QAAQ,CAAC,MAAeP,KAAK,CAACC,MAAM,CAACO,MAAM,GAAG,CAAC,CAAC,CAAA;gBAElE,OAAO;YACHF,MAAAA,SAAAA;iBACH,CAAA;eACJ;cAEDG,QAAQ,EAAA,iRAAA;YAWZ,CAAC,EAAC;;;;;;;;"}