File: /home/nepi/public_html/public/admin/js/chunk-8dd65600.ec474a20.js.map
{"version":3,"sources":["webpack:///./src/interfaces/interface-options/input.vue?dfff","webpack:///./node_modules/@directus/extension-toolkit/mixins/interface.js","webpack:///./src/interfaces/interface-options/input.vue?ad32","webpack:///src/interfaces/interface-options/input.vue","webpack:///./src/interfaces/interface-options/input.vue?83a0","webpack:///./src/interfaces/interface-options/input.vue"],"names":["module","exports","props","id","type","String","required","name","value","default","length","Number","readonly","Boolean","collection","primaryKey","options","Object","newItem","relation","fields","values","width","val","includes","render","_vm","this","_h","$createElement","_c","_self","keys","interfaceOptions","_v","_s","$t","on","$event","preventDefault","_l","option","optionID","key","staticClass","attrs","interface","loading","stageValue","domProps","$helpers","snarkdown","comment","staticRenderFns","component"],"mappings":"kHAAA,yBAAujB,EAAG,G,8CCA1jBA,EAAOC,QAAU,CACfC,MAAO,CAILC,GAAI,CACFC,KAAMC,OACNC,UAAU,GAGZC,KAAM,CACJH,KAAMC,OACNC,UAAU,GAIZE,MAAO,CACLJ,KAAM,KACNK,QAAS,MAGXL,KAAM,CACJA,KAAMC,OACNC,UAAU,GAGZI,OAAQ,CACNN,KAAM,CAACC,OAAQM,QACfF,QAAS,MAGXG,SAAU,CACRR,KAAMS,QACNJ,SAAS,GAGXK,WAAY,CACVV,KAAMC,OACNI,QAAS,MAGXM,WAAY,CACVX,KAAM,CAACO,OAAQN,QACfI,QAAS,MAGXH,SAAU,CACRF,KAAMS,QACNJ,SAAS,GAGXO,QAAS,CACPZ,KAAMa,OACNR,QAAS,KAAM,KAGjBS,QAAS,CACPd,KAAMS,QACNJ,SAAS,GAIXU,SAAU,CACRf,KAAMa,OACNR,QAAS,MAGXW,OAAQ,CACNhB,KAAMa,OACNR,QAAS,MAIXY,OAAQ,CACNjB,KAAMa,OACNR,QAAS,MAEXa,MAAO,CACLlB,KAAMC,OACNI,QAAS,KACT,UAAUc,GACR,MAAO,CACL,OACA,YACA,aACA,OACA,QACAC,SAASD,Q,yCCvFn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,yCACA,+CACA,yBCxD8V,I,wBCQ1VC,EAAY,eACd,EACA7B,EACA4B,GACA,EACA,KACA,WACA,MAIa,aAAAC,E","file":"js/chunk-8dd65600.ec474a20.js","sourcesContent":["import mod from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./input.vue?vue&type=style&index=0&id=2a01c07c&lang=scss&scoped=true&\"; export default mod; export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./input.vue?vue&type=style&index=0&id=2a01c07c&lang=scss&scoped=true&\"","module.exports = {\n props: {\n // Unique id for this interface. Should be added to the lower level \n // HTML input element if applicable. This ID will be used in the label's\n // `for` attribute\n id: {\n type: String,\n required: true\n },\n // Name of the field\n name: {\n type: String,\n required: true\n },\n // The current value. This can either be the default value, the saved database\n // value or the current state after the user made an edit\n value: {\n type: null,\n default: null\n },\n // Type of the field, eg `string`, `hash`, or `array`\n type: {\n type: String,\n required: true\n },\n // Max length\n length: {\n type: [String, Number],\n default: null\n },\n // If the field is readonly or not\n readonly: {\n type: Boolean,\n default: false\n },\n // Name of the collection\n collection: {\n type: String,\n default: null\n },\n // Primary key of the item you're editing in this context\n primaryKey: {\n type: [Number, String],\n default: null\n },\n // If the field is required or not\n required: {\n type: Boolean,\n default: false\n },\n // Field options. A json object based on the interface's meta.json file\n options: {\n type: Object,\n default: () => ({})\n },\n // If the item that's currently being edited is new\n newItem: {\n type: Boolean,\n default: false\n },\n // The relation of the current field. Will contain information on the related\n // collection and field(s)\n relation: {\n type: Object,\n default: null\n },\n // The other fields in the current edit page\n fields: {\n type: Object,\n default: null\n },\n // The values of the other fields on the edit page. Can be used for things like\n // automatically generating a slug based on another field\n values: {\n type: Object,\n default: null\n },\n width: {\n type: String,\n default: null,\n validator(val) {\n return [\n 'half',\n 'half-left',\n 'half-right',\n 'full',\n 'fill'\n ].includes(val);\n }\n }\n }\n};\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return (Object.keys(_vm.interfaceOptions).length === 0)?_c('v-notice',[_vm._v(\" \"+_vm._s(_vm.$t('interface_has_no_options'))+\" \")]):(_vm.interfaceOptions)?_c('v-sheet',[_c('form',{on:{\"submit\":function($event){$event.preventDefault();}}},_vm._l((_vm.interfaceOptions),function(option,optionID){return _c('div',{key:optionID,staticClass:\"options\"},[_c('label',{attrs:{\"for\":optionID}},[_vm._v(_vm._s(option.name))]),_c('v-ext-input',{attrs:{\"id\":option.interface,\"name\":optionID,\"type\":option.type,\"length\":option.length,\"readonly\":option.readonly,\"required\":option.required,\"loading\":option.loading,\"options\":option.options,\"value\":(_vm.value || {})[optionID],\"fields\":_vm.interfaceOptions,\"values\":_vm.val},on:{\"input\":function($event){return _vm.stageValue(optionID, $event)}}}),_c('p',{staticClass:\"note\",domProps:{\"innerHTML\":_vm._s(_vm.$helpers.snarkdown(option.comment || ''))}})],1)}),0)]):_c('v-notice',[_vm._v(\" \"+_vm._s(_vm.$t('select_interface'))+\" \")])}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\n\t<v-notice v-if=\"Object.keys(interfaceOptions).length === 0\">\n\t\t{{ $t('interface_has_no_options') }}\n\t</v-notice>\n\t<v-sheet v-else-if=\"interfaceOptions\">\n\t\t<form @submit.prevent>\n\t\t\t<div v-for=\"(option, optionID) in interfaceOptions\" :key=\"optionID\" class=\"options\">\n\t\t\t\t<label :for=\"optionID\">{{ option.name }}</label>\n\t\t\t\t<v-ext-input\n\t\t\t\t\t:id=\"option.interface\"\n\t\t\t\t\t:name=\"optionID\"\n\t\t\t\t\t:type=\"option.type\"\n\t\t\t\t\t:length=\"option.length\"\n\t\t\t\t\t:readonly=\"option.readonly\"\n\t\t\t\t\t:required=\"option.required\"\n\t\t\t\t\t:loading=\"option.loading\"\n\t\t\t\t\t:options=\"option.options\"\n\t\t\t\t\t:value=\"(value || {})[optionID]\"\n\t\t\t\t\t:fields=\"interfaceOptions\"\n\t\t\t\t\t:values=\"val\"\n\t\t\t\t\t@input=\"stageValue(optionID, $event)\"\n\t\t\t\t/>\n\t\t\t\t<p class=\"note\" v-html=\"$helpers.snarkdown(option.comment || '')\" />\n\t\t\t</div>\n\t\t</form>\n\t</v-sheet>\n\t<v-notice v-else>\n\t\t{{ $t('select_interface') }}\n\t</v-notice>\n</template>\n\n<script>\nimport mixin from '@directus/extension-toolkit/mixins/interface';\nimport { clone, merge } from 'lodash';\n\nexport default {\n\tname: 'InterfaceOptions',\n\tmixins: [mixin],\n\tcomputed: {\n\t\tinterfaceName() {\n\t\t\tconst interfaceNameField = this.options.interfaceField;\n\t\t\tif (!interfaceNameField) return;\n\t\t\treturn this.values[interfaceNameField];\n\t\t},\n\t\tinterfaceOptions() {\n\t\t\tif (!this.interfaceName) return;\n\t\t\treturn this.$store.state.extensions.interfaces[this.interfaceName].options;\n\t\t},\n\t\tval() {\n\t\t\treturn Array.isArray(this.value) ? {} : this.value;\n\t\t}\n\t},\n\tmethods: {\n\t\tstageValue(field, value) {\n\t\t\tconst oldValue = clone(this.value || {});\n\t\t\tconst newValue = merge(oldValue, { [field]: value });\n\t\t\tthis.$emit('input', newValue);\n\t\t}\n\t}\n};\n</script>\n\n<style lang=\"scss\" scoped>\nlabel {\n\tmargin-bottom: 8px;\n\tfont-size: 15px;\n\tmargin-bottom: 8px;\n}\n\ndiv.options {\n\tmargin-bottom: 30px;\n\n\t&:last-of-type {\n\t\tmargin-bottom: 0;\n\t}\n}\n\n.note {\n\tdisplay: block;\n\tmargin-top: 4px;\n\tmargin-bottom: 10px;\n\tfont-style: italic;\n\tfont-size: var(--size-3);\n\tline-height: 1.5em;\n\tcolor: var(--blue-grey-300);\n\tfont-weight: var(--weight-bold);\n}\n</style>\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./input.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./input.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./input.vue?vue&type=template&id=2a01c07c&scoped=true&\"\nimport script from \"./input.vue?vue&type=script&lang=js&\"\nexport * from \"./input.vue?vue&type=script&lang=js&\"\nimport style0 from \"./input.vue?vue&type=style&index=0&id=2a01c07c&lang=scss&scoped=true&\"\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 \"2a01c07c\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}