{"version":3,"sources":["webpack:///./src/components/PersonalInformationForm.vue","webpack:///./src/components/PersonalInformationForm.vue?b47e","webpack:///./src/components/PersonalInformationForm.vue?f9b1","webpack:///./src/components/PersonalInformationForm.vue?ac60","webpack:///./src/components/PersonalInformationForm.vue?9859"],"names":["_setup","_vm","ref","staticClass","attrs","model","expression","$event","updateFormValidity","Vue","extend","name","data","loading","nameRules","v","test","firstNameInput","lastNameInput","watch","computed","isFormValid","_this$$refs","_form$validate","form","this","$refs","personalInfoForm","validate","methods","supplements","$store","getters","getContext","onboardingSupplements","firstName","lastName","dispatch","ActionTypes","setOnboardingSupplementInfo","validatedSteps","setValidatedSteps","component","staticRenderFns"],"mappings":"qJAA4DA,EAAOC,WAAsB,MAAU,KAAUC,EAAI,WAAmBC,EAAY,kBAAgD,OAAM,SAAM,CAACA,uBAA4B,YAAU,kDAACA,SAAW,CAAQ,YAAS,iBAAgCA,QAAW,CAAQC,YAAM,Q,CAAC,kBAAc,U,YAAW,O,MAAI,CAAU,UAAS,GAAC,YAAuC,KAAO,GAAW,KAAO,GAAe,YAAU,yBAAG,gBAAG,MAAC,YAAC,QAAQ,I,GAAgD,CAAE,kBAACC,OAAM,yB,MAAwD,CAAmB,MAAC,iBAACC,SAAU,SAAC,GAAgB,oBAAkBH,WAAY,qBAA2BA,WAAY,CAAO,YAAS,iBAAkCC,GAAK,KAAC,C,YAAY,Q,CAAI,oBAAa,U,MAAC,CAAU,UAAS,GAAC,YAAyC,KAAO,GAAa,KAAO,GAAe,YAAU,2BAAG,kBAAG,MAAC,YAAC,QAAS,I,GAAiD,CAAC,OAAQ,SAASG,GAAQ,OAAON,EAAIO,sBAAsB,kBAACH,OAAM,yB,MAAuD,CAAkB,MAAC,gBAACC,SAAU,SAAC,GAAe,mBACznC,+BAGD,M,6BCKeG,aAAIC,OAAO,CACtBC,KAAM,0BACNC,OAMI,MAAO,CACHC,SAAS,EACTC,UAAW,CACVC,GAAU,cAAcC,KAAKD,IAAM,0CAEpCE,eAAgB,GAChBC,cAAe,KAGvBC,MAAO,GAGPC,SAAU,CACNC,cAAW,IAAAC,EAAAC,EACP,IAAIC,EAEJ,OADAA,EAAW,OAAJC,WAAI,IAAJA,MAAW,QAAPH,EAAJG,KAAMC,aAAK,IAAAJ,OAAA,EAAXA,EAAaK,iBACE,QAAtBJ,EAAOC,EAAKI,kBAAU,IAAAL,OAG9BM,QAAS,CACL,2BAEI,GAAGJ,KAAKJ,YAAY,CAChB,IAAIS,QAA2CL,KAAKM,OAAOC,QAAQC,WAAWC,sBAC9EJ,EAAYK,UAAYV,KAAKR,eAC7Ba,EAAYM,SAAWX,KAAKP,cAC5BO,KAAKM,OAAOM,SAASC,OAAYC,4BAA6BT,GAElEL,KAAKjB,sBAET,2BAEI,MAAMgC,QAAuCf,KAAKM,OAAOC,QAAQC,WAAWO,eAC5EA,EAAeb,iBAAmBF,KAAKJ,YAEvCI,KAAKM,OAAOM,SAASC,OAAYG,kBAAmBD,OCpDkV,I,wBCQ9YE,EAAY,eACd,EACA,EACAC,GACA,EACA,KACA,WACA,MAIa,aAAAD,E,2CCnBf,W","file":"js/chunk-f7fae0f0.16badd0f.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c,_setup=_vm._self._setupProxy;return _c('v-form',{ref:\"personalInfoForm\",staticClass:\"stepper-form d-flex justify-center flex-column\"},[_c('div',{staticClass:\"input-wrapper\"},[_c('h3',{staticClass:\"mb-1\"},[_vm._v(\"Fornavn\")]),_c('v-text-field',{staticClass:\"mb-1\",attrs:{\"clearable\":\"\",\"outlined\":\"\",\"solo\":\"\",\"flat\":\"\",\"placeholder\":\"Skriv inn ditt fornavn\",\"label\":\"Fornavn\",\"rules\":_vm.nameRules,\"counter\":30},on:{\"input\":function($event){return _vm.updatePersonalInfo()}},model:{value:(_vm.firstNameInput),callback:function ($$v) {_vm.firstNameInput=$$v},expression:\"firstNameInput\"}})],1),_c('div',{staticClass:\"input-wrapper\"},[_c('h3',{staticClass:\"mb-1\"},[_vm._v(\"Etternavn\")]),_c('v-text-field',{attrs:{\"clearable\":\"\",\"outlined\":\"\",\"solo\":\"\",\"flat\":\"\",\"placeholder\":\"Skriv inn ditt etternavn\",\"label\":\"Etternavn\",\"rules\":_vm.nameRules,\"counter\":30},on:{\"change\":function($event){return _vm.updatePersonalInfo()},\"input\":function($event){return _vm.updateFormValidity()}},model:{value:(_vm.lastNameInput),callback:function ($$v) {_vm.lastNameInput=$$v},expression:\"lastNameInput\"}})],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","\n\nimport Vue from \"vue\";\nimport { BusinessInfo, OnboardingSupplements, RouteInvitationLink, ValidatedSteps } from \"@/types/data\";\nimport { Dictionary, update } from \"lodash\";\nimport axios from \"axios\";\nimport _ from 'lodash'\nimport { ActionTypes, MutationTypes } from \"@/enums/vuex\";\nconst brregUrl = \"https://data.brreg.no/enhetsregisteret/api/enheter/\"\nexport default Vue.extend({\n name: \"PersonalInformationForm\",\n data(): {\n loading: boolean\n nameRules: any\n firstNameInput: string\n lastNameInput: string\n } {\n return {\n loading: false,\n nameRules: [\n (v:any) => /^(.){2,30}$/.test(v) || 'Navn må være mellom 2 og 30 bokstaver.', // [a-zæøåA-ZÆØÅäöÄÖ\\- ]\n ],\n firstNameInput: \"\",\n lastNameInput: \"\",\n }\n },\n watch: {\n\n },\n computed: {\n isFormValid(): boolean {\n let form: any\n form = this?.$refs?.personalInfoForm\n return form.validate() ?? false\n },\n },\n methods: {\n async updatePersonalInfo(){\n\n if(this.isFormValid){\n let supplements: OnboardingSupplements = await this.$store.getters.getContext.onboardingSupplements\n supplements.firstName = this.firstNameInput\n supplements.lastName = this.lastNameInput\n this.$store.dispatch(ActionTypes.setOnboardingSupplementInfo, supplements)\n }\n this.updateFormValidity()\n },\n async updateFormValidity() {\n \n const validatedSteps: ValidatedSteps = await this.$store.getters.getContext.validatedSteps\n validatedSteps.personalInfoForm = this.isFormValid\n\n this.$store.dispatch(ActionTypes.setValidatedSteps, validatedSteps)\n \n }\n }\n});\n","import mod from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PersonalInformationForm.vue?vue&type=script&lang=ts&\"; export default mod; export * from \"-!../../node_modules/cache-loader/dist/cjs.js??ref--14-0!../../node_modules/thread-loader/dist/cjs.js!../../node_modules/babel-loader/lib/index.js!../../node_modules/ts-loader/index.js??ref--14-3!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PersonalInformationForm.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./PersonalInformationForm.vue?vue&type=template&id=a5f68d60&scoped=true&\"\nimport script from \"./PersonalInformationForm.vue?vue&type=script&lang=ts&\"\nexport * from \"./PersonalInformationForm.vue?vue&type=script&lang=ts&\"\nimport style0 from \"./PersonalInformationForm.vue?vue&type=style&index=0&id=a5f68d60&prod&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"a5f68d60\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../node_modules/vue-loader/lib/index.js??vue-loader-options!./PersonalInformationForm.vue?vue&type=style&index=0&id=a5f68d60&prod&scoped=true&lang=css&\""],"sourceRoot":""}