{"version":3,"sources":["webpack:///./src/views/pages/app/processes/onlinePayment/onlinePayment.vue?8ef4","webpack:///./src/views/pages/app/processes/onlinePayment/schema/1.schema.ts","webpack:///./src/views/pages/app/processes/onlinePayment/schema/2.schema.ts","webpack:///./src/views/pages/app/processes/onlinePayment/schema/3.schema.ts","webpack:///./src/views/pages/app/processes/onlinePayment/onlinePayment.vue?e165","webpack:///./src/views/pages/app/processes/onlinePayment/onlinePayment.vue?b297","webpack:///./src/views/pages/app/processes/onlinePayment/onlinePayment.vue","webpack:///./node_modules/@glittr/frontend-core/src/plugins/validation/queryBuilder.ts"],"names":["render","_vm","this","_h","$createElement","_c","_self","attrs","title","steps","initializeData","serviceFunction","model","staticRenderFns","queryBuilder","properties","amount","type","required","extend","auth","hasBackButton","data","memberShip","OnlinePaymentResourceViewModel","breadcrumb","component","schema","sendData","disablePreviousSteps","clearProgressOnMounted","computed","contactId","$route","params","id","methods","wizardData","$service","api","invoices","payMyInvoice","initializedModel","fromDTO","items","onlinePayment","deepSetProperty","property","value","setRequired","propertyPath","split","currentNode","nodes","forEach","prop","i","push","lastNode","length","lastProp","constValues","propValues","propsRequired","Object","keys","key","const","if","ifNot","not","thenRequired","propNames","then","thenValue","elseRequired","else","elseValue","computedRequired","computedProps","filteredValue","sameAs","isObject","pattern","$validation","REF_PREFIX","nestedProps"],"mappings":"uHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,YAAY,CAACE,MAAM,CAAC,MAAQN,EAAIO,MAAM,MAAQP,EAAIQ,MAAM,kBAAkBR,EAAIS,eAAe,mBAAmBT,EAAIU,gBAAgB,cAAcV,EAAIW,UACrPC,EAAkB,G,oECCtB,oBACKC,EAAA,KAAaC,WAAW,CACzBC,OAAQ,CAAEC,KAAM,SAAUC,UAAU,MCFxC,oBACKJ,EAAA,KAAaC,WAAW,KCD7B,oBACKD,EAAA,K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,GAA6B,WAAzB,EAAWA,GAAKjD,KAApB,CAKA,IAAM,EAAiC,EAAWiD,GAA7Bc,GAAL,WAAkB,iBAA5B,eAEND,EAAcb,GAAOc,EACjBA,EAAcC,QAAU,OAAEC,SAASH,EAAcb,MAClDa,EAAcb,GAAqBiB,QAAU,UAAG,OAAIC,YAAYC,YAAU,OAAGL,EAAcC,aAT9F,CACE,IAAMK,EAAc,EAAWpB,GAAKnD,WACpCgE,EAAcb,GAAO,EAAKnD,WAAWuE,OAUlC,CACLrE,KAAM,SACNC,SAAU4D,EACV/D,WAAYgE,KAKH","file":"js/chunk-5eb84c04.4844bb02.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('mp-wizard',{attrs:{\"title\":_vm.title,\"steps\":_vm.steps,\"initialize-data\":_vm.initializeData,\"service-function\":_vm.serviceFunction,\"model-class\":_vm.model}})}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","import queryBuilder from '@glittr/frontend-core/src/plugins/validation/queryBuilder';\r\n\r\nexport default {\r\n ...queryBuilder.properties({\r\n amount: { type: 'number', required: true },\r\n }),\r\n};\r\n","import queryBuilder from '@glittr/frontend-core/src/plugins/validation/queryBuilder';\r\n\r\nexport default {\r\n ...queryBuilder.properties({}),\r\n};\r\n","import queryBuilder from '@glittr/frontend-core/src/plugins/validation/queryBuilder';\r\n\r\nexport default {\r\n ...queryBuilder.properties({}),\r\n};\r\n","\n\n\n\n\n\n\n\n\n\n\nimport Vue from 'vue';\nimport { StepData } from '@/src/components/processes/mp-wizard.vue';\nimport oneSchema from './schema/1.schema';\nimport twoSchema from './schema/2.schema';\nimport threeSchema from './schema/3.schema';\nimport OnlinePaymentResourceViewModel from '@/src/services/viewModel/resource/OnlinePaymentResourceViewModel';\n\nexport default Vue.extend({\n auth: true,\n hasBackButton: true,\n data: () => ({\n memberShip: '',\n title: 'page.invoice.title.onlinePayment',\n model: OnlinePaymentResourceViewModel,\n steps: [\n {\n breadcrumb: 'page.invoice.label.stepTitles.1',\n component: () => import('./onlinePayment1.vue'),\n schema: oneSchema,\n sendData: false,\n },\n {\n breadcrumb: 'page.invoice.label.stepTitles.2',\n component: () => import('./onlinePayment2.vue'),\n schema: twoSchema,\n sendData: true,\n },\n {\n breadcrumb: 'page.invoice.label.stepTitles.3',\n component: () => import('./onlinePayment3.vue'),\n schema: threeSchema,\n sendData: false,\n disablePreviousSteps: true,\n clearProgressOnMounted: true,\n },\n ] as StepData[],\n }),\n computed: {\n contactId() {\n return this.$route.params.id;\n },\n },\n methods: {\n async serviceFunction(wizardData: OnlinePaymentResourceViewModel) {\n await this.$service.api.invoices.payMyInvoice(wizardData);\n },\n initializeData() {\n const initializedModel = new OnlinePaymentResourceViewModel().fromDTO({\n items: [],\n onlinePayment: {},\n } as Parameters[0]);\n return initializedModel;\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/@vue/cli-plugin-typescript/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!./onlinePayment.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/@vue/cli-plugin-typescript/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!./onlinePayment.vue?vue&type=script&lang=ts&\"","import { render, staticRenderFns } from \"./onlinePayment.vue?vue&type=template&id=7613141b&\"\nimport script from \"./onlinePayment.vue?vue&type=script&lang=ts&\"\nexport * from \"./onlinePayment.vue?vue&type=script&lang=ts&\"\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 null,\n null\n \n)\n\nexport default component.exports","import Vue from 'vue';\r\nimport _ from '../../utils';\r\nimport { IJSONSchema } from './IJSONSchema';\r\n\r\ntype PropertiesOptions = Omit & {\r\n required?: boolean,\r\n sameAs?: string\r\n properties?: Record,\r\n};\r\n\r\nconst queryBuilder = {\r\n deepSetProperty(schema: IJSONSchema, property: string, value: Record, setRequired: boolean = false) {\r\n const propertyPath = property.split('.');\r\n let currentNode = schema ?? {};\r\n const nodes = [] as IJSONSchema[];\r\n propertyPath.forEach((prop, i) => {\r\n currentNode.properties = currentNode.properties ?? {};\r\n currentNode.type = currentNode.type ?? 'object';\r\n currentNode.properties[prop] = currentNode.properties[prop] ?? {};\r\n nodes.push(currentNode);\r\n currentNode = currentNode.properties[prop] as IJSONSchema;\r\n });\r\n const lastNode = nodes[nodes.length - 1];\r\n const lastProp = propertyPath[propertyPath.length - 1];\r\n if (setRequired) {\r\n lastNode.required = [...(lastNode.required ?? []), lastProp];\r\n }\r\n if (value) {\r\n lastNode.properties![lastProp] = { ...lastNode.properties![lastProp] as {}, ...value };\r\n }\r\n },\r\n constValues(propValues: Record, propsRequired: boolean = false) {\r\n const schema: IJSONSchema = {};\r\n Object.keys(propValues).forEach((key) => {\r\n this.deepSetProperty(schema, key, { const: propValues[key] }, propsRequired);\r\n });\r\n return schema;\r\n },\r\n if(propValues: Record, propsRequired: boolean = true) {\r\n const properties = this.constValues(propValues, propsRequired);\r\n return { if: properties };\r\n },\r\n ifNot(propValues: Record, propsRequired: boolean = true) {\r\n const properties = this.constValues(propValues, propsRequired);\r\n return { if: { not: properties } };\r\n },\r\n thenRequired(propNames: string[]) {\r\n return { then: { required: propNames } };\r\n },\r\n thenValue(propValues: Record, propsRequired: boolean = false) {\r\n const properties = this.constValues(propValues, propsRequired);\r\n return { then: properties };\r\n },\r\n elseRequired(propNames: string[]) {\r\n return { else: { required: propNames } };\r\n },\r\n elseValue(propValues: Record, propsRequired: boolean = false) {\r\n const properties = this.constValues(propValues, propsRequired);\r\n return { else: properties };\r\n },\r\n\r\n properties(properties: Record) {\r\n const computedRequired = [] as string[];\r\n Object.keys(properties).forEach((key) => {\r\n if (properties[key].required) {\r\n computedRequired.push(key);\r\n }\r\n });\r\n const computedProps = {} as NonNullable;\r\n Object.keys(properties).forEach((key) => {\r\n if (properties[key].type === 'object') {\r\n const nestedProps = properties[key].properties;\r\n computedProps[key] = this.properties(nestedProps as Record);\r\n return;\r\n }\r\n const { required, ...filteredValue } = properties[key];\r\n // In nested cases this has already been converted above, so casting to any here\r\n computedProps[key] = filteredValue as any;\r\n if (filteredValue.sameAs && _.isObject(computedProps[key])) {\r\n (computedProps[key] as IJSONSchema).pattern = `${Vue.$validation.REF_PREFIX}${filteredValue.sameAs}`;\r\n }\r\n });\r\n return {\r\n type: 'object' as IJSONSchema['type'],\r\n required: computedRequired as IJSONSchema['required'],\r\n properties: computedProps as IJSONSchema['properties'],\r\n };\r\n },\r\n};\r\n\r\nexport default queryBuilder;\r\n"],"sourceRoot":""}