/** @license @lljj/schema-form-components (c) 2020-2021 Jino License: MIT */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("@lljj/vue-json-schema-form")):"function"==typeof define&&define.amd?define(["exports","@lljj/vue-json-schema-form"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).schemaFormComponents={},e.vueJsonSchemaForm)}(this,(function(e,t){"use strict";function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function o(e){for(var t=1;t<arguments.length;t++){var o=null!=arguments[t]?arguments[t]:{};t%2?n(Object(o),!0).forEach((function(t){r(e,t,o[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(o)):n(Object(o)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(o,t))}))}return e}var i=function(e,t,r,n,o,i,s,a,c,u){"boolean"!=typeof s&&(c=a,a=s,s=!1);var l,p="function"==typeof r?r.options:r;if(e&&e.render&&(p.render=e.render,p.staticRenderFns=e.staticRenderFns,p._compiled=!0,o&&(p.functional=!0)),n&&(p._scopeId=n),i?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),t&&t.call(this,c(e)),e&&e._registeredComponents&&e._registeredComponents.add(i)},p._ssrRegister=l):t&&(l=s?function(e){t.call(this,u(e,this.$root.$options.shadowRoot))}:function(e){t.call(this,a(e))}),l)if(p.functional){var d=p.render;p.render=function(e,t){return l.call(t),d(e,t)}}else{var f=p.beforeCreate;p.beforeCreate=f?[].concat(f,l):[l]}return r},s={name:"TabField",components:{SchemaField:t.SchemaField},props:o(o({},t.fieldProps),{},{fieldProps:{type:null,default:null}}),data:function(){return{activeName:this.getProperties()[0]}},computed:{tabs:function(){var e=this,r=this.$props,n=r.schema,i=r.uiSchema,s=r.errorSchema,a=function(e){return Array.isArray(n.required)&&!!~n.required.indexOf(e)};return this.getProperties().map((function(r){return{name:r,title:n.properties[r].title,schemaProps:o(o({},e.$props),{},{schema:o(o({},n.properties[r]),{},{title:""}),uiSchema:i[r],errorSchema:s[r],required:a(r),curNodePath:t.vueUtils.computedCurPath(e.curNodePath,r)})}}))}},methods:{getProperties:function(){return Object.keys(this.schema.properties||{})}}},a=function(){var e=this,t=e.$createElement,r=e._self._c||t;return r("el-tabs",{model:{value:e.activeName,callback:function(t){e.activeName=t},expression:"activeName"}},e._l(e.tabs,(function(t){return r("el-tab-pane",{key:t.name,attrs:{label:t.title,name:t.name}},[r("SchemaField",e._b({},"SchemaField",t.schemaProps,!1))],1)})),1)};a._withStripped=!0;var c=i({render:a,staticRenderFns:[]},void 0,s,void 0,!1,void 0,!1,void 0,void 0,void 0);e.TabField=c,Object.defineProperty(e,"__esModule",{value:!0})}));
