(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-Amis"],{"0046":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConditionGroup=void 0;var a=n("9ab4"),r=(0,a.__importDefault)(n("ab5b")),o=n("d77e"),i=(0,a.__importDefault)(n("f602")),l=(0,a.__importDefault)(n("ccf5")),s=n("d369"),u=n("32e1"),d=(0,a.__importDefault)(n("79ae")),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,a.__extends)(t,e),t.prototype.getValue=function(){return(0,a.__assign)({id:(0,s.guid)(),conjunction:"and"},this.props.value)},t.prototype.handleNotClick=function(){var e=this.props.onChange,t=this.getValue();t.not=!t.not,e(t)},t.prototype.handleConjunctionChange=function(e){var t=this.props.onChange,n=this.getValue();n.conjunction=e.value,t(n)},t.prototype.handleAdd=function(){var e=this.props.onChange,t=this.getValue();t.children=Array.isArray(t.children)?t.children.concat():[],t.children.push({id:(0,s.guid)()}),e(t)},t.prototype.handleAddGroup=function(){var e=this.props.onChange,t=this.getValue();t.children=Array.isArray(t.children)?t.children.concat():[],t.children.push({id:(0,s.guid)(),conjunction:"and",children:[{id:(0,s.guid)()}]}),e(t)},t.prototype.handleItemChange=function(e,t){var n=this.props.onChange,a=this.getValue();a.children=Array.isArray(a.children)?a.children.concat():[],a.children.splice(t,1,e),n(a)},t.prototype.handleItemRemove=function(e){var t=this.props.onChange,n=this.getValue();n.children=Array.isArray(n.children)?n.children.concat():[],n.children.splice(e,1),t(n)},t.prototype.render=function(){var e=this,t=this.props,n=t.builderMode,a=t.classnames,o=t.fieldClassName,s=t.value,u=t.data,c=t.fields,p=t.funcs,f=t.config,m=t.removeable,h=t.onRemove,v=t.onDragStart,g=t.showNot,y=t.showANDOR,b=void 0!==y&&y,_=t.disabled,C=t.searchable,E=t.translate,x=t.formula,w=t.popOverContainer,S=t.renderEtrValue;return r.default.createElement("div",{className:a("CBGroup"),"data-group-id":null===s||void 0===s?void 0:s.id},"simple"===n&&!1===b?null:r.default.createElement("div",{className:a("CBGroup-toolbarCondition")},g?r.default.createElement(i.default,{onClick:this.handleNotClick,className:"m-r-xs",size:"xs",active:null===s||void 0===s?void 0:s.not,disabled:_},E("Condition.not")):null,r.default.createElement(d.default,{options:[{label:E("Condition.and"),value:"and"},{label:E("Condition.or"),value:"or"}],value:(null===s||void 0===s?void 0:s.conjunction)||"and",disabled:_,onChange:this.handleConjunctionChange,clearable:!1})),r.default.createElement("div",{className:a("CBGroup-body")},Array.isArray(null===s||void 0===s?void 0:s.children)&&s.children.length?s.children.map((function(t,a){return r.default.createElement(l.default,{draggable:s.children.length>1,onDragStart:v,config:f,key:t.id,fields:c,fieldClassName:o,value:t,index:a,onChange:e.handleItemChange,funcs:p,onRemove:e.handleItemRemove,data:u,disabled:_,searchable:C,builderMode:n,formula:x,popOverContainer:w,renderEtrValue:S})})):r.default.createElement("div",{className:a("CBGroup-placeholder ".concat("simple"===n?"simple":""))},E("Condition.blank"))),r.default.createElement("div",{className:a("CBGroup-toolbar")},r.default.createElement("div",{className:a("CBGroup-toolbarConditionAdd".concat("simple"===n?"-simple":""))},r.default.createElement("div",{className:a("ButtonGroup")},r.default.createElement(i.default,{level:"link",onClick:this.handleAdd,size:"xs",disabled:_},E("Condition.add_cond")),"simple"===n?null:r.default.createElement(i.default,{onClick:this.handleAddGroup,size:"xs",disabled:_,level:"link"},E("Condition.add_cond_group")))),m?r.default.createElement("a",{className:a("CBDelete"),onClick:h},E("Condition.delete_cond_group")):null))},(0,a.__decorate)([s.autobind,(0,a.__metadata)("design:type",Function),(0,a.__metadata)("design:paramtypes",[]),(0,a.__metadata)("design:returntype",void 0)],t.prototype,"handleNotClick",null),(0,a.__decorate)([s.autobind,(0,a.__metadata)("design:type",Function),(0,a.__metadata)("design:paramtypes",[Object]),(0,a.__metadata)("design:returntype",void 0)],t.prototype,"handleConjunctionChange",null),(0,a.__decorate)([s.autobind,(0,a.__metadata)("design:type",Function),(0,a.__metadata)("design:paramtypes",[]),(0,a.__metadata)("design:returntype",void 0)],t.prototype,"handleAdd",null),(0,a.__decorate)([s.autobind,(0,a.__metadata)("design:type",Function),(0,a.__metadata)("design:paramtypes",[]),(0,a.__metadata)("design:returntype",void 0)],t.prototype,"handleAddGroup",null),(0,a.__decorate)([s.autobind,(0,a.__metadata)("design:type",Function),(0,a.__metadata)("design:paramtypes",[Object,Number]),(0,a.__metadata)("design:returntype",void 0)],t.prototype,"handleItemChange",null),(0,a.__decorate)([s.autobind,(0,a.__metadata)("design:type",Function),(0,a.__metadata)("design:paramtypes",[Number]),(0,a.__metadata)("design:returntype",void 0)],t.prototype,"handleItemRemove",null),t}(r.default.Component);t.ConditionGroup=c,t.default=(0,o.themeable)((0,u.localeable)(c))},"0053":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ContinueAction=void 0;var a=n("9ab4"),r=n("0d19"),o=function(){function e(){}return e.prototype.run=function(e,t,n){return(0,a.__awaiter)(this,void 0,void 0,(function(){return(0,a.__generator)(this,(function(e){return t.loopStatus=r.LoopStatus.CONTINUE,[2]}))}))},e}();t.ContinueAction=o,(0,r.registerAction)("continue",new o)},"0069":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ServerError=void 0;var a=n("9ab4"),r=function(e){function t(t,n){var a=e.call(this,t)||this;return a.type="ServerError",a.response=n,a}return(0,a.__extends)(t,e),t}(Error);t.ServerError=r},"00b6":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n("9ab4"),r=(0,a.__importDefault)(n("ab5b")),o=function(e){return r.default.createElement("svg",(0,a.__assign)({viewBox:"0 0 42 31",className:"icon"},e),r.default.createElement("defs",null,r.default.createElement("filter",{id:"filter-1"},r.default.createElement("feColorMatrix",{in:"SourceGraphic",type:"matrix",values:"0 0 0 0 0.831373 0 0 0 0 0.839216 0 0 0 0 0.850980 0 0 0 1.000000 0"}))),r.default.createElement("g",{id:"\\u6570\\u636E\\u8F93\\u5165",stroke:"none",strokeWidth:1,fill:"none",fillRule:"evenodd"},r.default.createElement("g",{id:"13-\\u4E0A\\u4F20-Upload",transform:"translate(-279.000000, -4033.000000)"},r.default.createElement("g",{id:"3.\\u6570\\u636E\\u8F93\\u5165/4.\\u4E0A\\u4F20/2.\\u62D6\\u62FD\\u4E0A\\u4F20/1.\\u672A\\u4E0A\\u4F20",transform:"translate(120.000000, 3986.000000)"},r.default.createElement("g",{id:"\\u7F16\\u7EC4-2",transform:"translate(101.000000, 40.000000)"},r.default.createElement("g",{id:"\\u56FE\\u6807-2",transform:"translate(55.000000, 0.000000)",filter:"url(#filter-1)"},r.default.createElement("g",{id:"\\u56FE\\u6807"},r.default.createElement("rect",{id:"\\u77E9\\u5F62",stroke:"#979797",strokeWidth:3,fill:"#D8D8D8",opacity:0,x:1.5,y:1.5,width:45,height:45}),r.default.createElement("path",{d:"M23.8719,22.49754 L28.3839,28.50054 L25.3719,28.50054 L25.3719,37.50054 L22.3719,37.50054 L22.3719,28.50054 L19.3809,28.50054 L23.8719,22.49754 Z M23.8716,7.49904 C30.3426,7.49904 35.8176,11.64204 37.9176,17.39604 C41.8746,18.34104 44.8356,21.88704 44.8356,26.12904 C44.8356,31.09104 40.7976,35.12904 35.8356,35.12904 C34.7916,35.12904 33.8016,34.91604 32.8716,34.58304 L32.8716,34.58304 L32.8716,31.26804 C33.6096,31.69404 34.4226,32.00004 35.3166,32.07804 C35.4906,32.09004 35.6586,32.12904 35.8356,32.12904 C39.1446,32.12904 41.8356,29.43804 41.8356,26.12904 C41.8356,23.86704 40.5636,21.91704 38.7096,20.89404 C37.8516,20.42304 36.8826,20.12904 35.8356,20.12904 C35.7666,20.12904 35.7036,20.14704 35.6346,20.15004 C35.4276,19.12404 35.0586,18.16704 34.6116,17.25204 C32.6586,13.27104 28.5996,10.49904 23.8716,10.49904 C19.1466,10.49904 15.0936,13.26804 13.1346,17.24304 C12.6846,18.15804 12.3156,19.11504 12.1086,20.14104 L12.1086,20.14104 L12.0006,20.12904 C10.9146,20.12904 9.9066,20.44404 9.0276,20.95104 C7.2276,21.98604 6.0006,23.90904 6.0006,26.12904 C6.0006,29.43804 8.6916,32.12904 12.0006,32.12904 C12.1476,32.12904 12.2856,32.09604 12.4326,32.08404 C13.3206,32.02104 14.1306,31.72704 14.8716,31.32504 L14.8716,31.32504 L14.8716,34.61004 C13.9656,34.92504 13.0116,35.12904 12.0006,35.12904 C7.0386,35.12904 3.0006,31.09104 3.0006,26.12904 C3.0006,21.92604 5.9106,18.41304 9.8136,17.42904 C11.9046,11.66004 17.3886,7.49904 23.8716,7.49904 Z",id:"\\u5F62\\u72B6\\u7ED3\\u5408",fill:"#151B26"}))))))))};t.default=o},"00f2":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeadCellSort=void 0;var a=n("9ab4"),r=(0,a.__importDefault)(n("ab5b")),o=n("d77e"),i=n("32e1"),l=n("c264"),s=function(e){function t(t){var n=e.call(this,t)||this;return n.state={order:"",orderBy:""},n}return(0,a.__extends)(t,e),t.prototype.render=function(){var e=this,t=this.props,n=t.column,o=t.onSort,i=t.classnames;return r.default.createElement("span",{className:i("TableCell-sortBtn"),onClick:function(){return(0,a.__awaiter)(e,void 0,void 0,(function(){var e,t;return(0,a.__generator)(this,(function(a){return e={},e=n.key===this.state.orderBy?"descend"===this.state.order?{orderBy:"",order:"ascend"}:{order:"descend"}:{orderBy:n.key,order:"ascend"},o&&(t=o({orderBy:this.state.orderBy,order:this.state.order}),t)||this.setState(e),[2]}))}))}},r.default.createElement("i",{className:i("TableCell-sortBtn--down",this.state.orderBy===n.key&&"descend"===this.state.order?"is-active":"")},r.default.createElement(l.Icon,{icon:"sort-desc",className:"icon"})),r.default.createElement("i",{className:i("TableCell-sortBtn--up",this.state.orderBy===n.key&&"ascend"===this.state.order?"is-active":"")},r.default.createElement(l.Icon,{icon:"sort-asc",className:"icon"})),r.default.createElement("i",{className:i("TableCell-sortBtn--default",this.state.orderBy===n.key?"":"is-active")},r.default.createElement(l.Icon,{icon:"sort-default",className:"icon"})))},t}(r.default.Component);t.HeadCellSort=s,t.default=(0,o.themeable)((0,i.localeable)(s))},"01af":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.HeadCellSearchDropDown=void 0;var a=n("9ab4"),r=(0,a.__importDefault)(n("ab5b")),o=n("c264"),i=(0,a.__importDefault)(n("35b7")),l=n("8bc8"),s=(0,a.__importDefault)(n("dbb0")),u=n("d369"),d=function(e){function t(t){var n=e.call(this,t)||this;return n.state={isOpened:!1},n.formItems=[],n.open=n.open.bind(n),n.close=n.close.bind(n),n.handleSubmit=n.handleSubmit.bind(n),n.handleAction=n.handleAction.bind(n),n}return(0,a.__extends)(t,e),t.prototype.buildSchema=function(){var e,t,n=this.props,r=n.searchable,o=n.sortable,i=n.name,l=n.label,s=n.translate;if(!0===r?t={title:"",controls:[{type:"text",name:i,placeholder:l,clearable:!0}]}:r&&(t=r.controls||r.tabs||r.fieldSet?(0,a.__assign)((0,a.__assign)({title:""},r),{controls:Array.isArray(r.controls)?r.controls.concat():void 0}):{title:"",className:r.formClassName,controls:[(0,a.__assign)({type:r.type||"text",name:r.name||i,placeholder:l},r)]}),t&&t.controls&&o&&t.controls.unshift({type:"hidden",name:"orderBy",value:i},{type:"button-group",name:"orderDir",label:s("sort"),options:[{label:s("asc"),value:"asc"},{label:s("desc"),value:"desc"}]}),t){var u=[];null===(e=t.controls)||void 0===e||e.forEach((function(e){return e.name&&"orderBy"!==e.name&&"orderDir"!==e.name&&u.push(e.name)})),this.formItems=u,t=(0,a.__assign)((0,a.__assign)({},t),{type:"form",wrapperComponent:"div",actions:[{type:"button",label:s("reset"),actionType:"clear-and-submit"},{type:"button",label:s("cancel"),actionType:"cancel"},{label:s("search"),type:"submit",primary:!0}]})}return t||"error"},t.prototype.handleClickOutside=function(){this.close()},t.prototype.open=function(){this.setState({isOpened:!0})},t.prototype.close=function(){this.setState({isOpened:!1})},t.prototype.handleAction=function(e,t,n){var a=this.props.onAction;if("cancel"!==t.actionType&&"close"!==t.actionType)return"reset"===t.actionType?(this.close(),void this.handleReset()):void(a&&a(e,t,n));this.close()},t.prototype.handleReset=function(){var e=this.props,t=e.onQuery,n=e.data,r=e.name,o=(0,a.__assign)({},n);this.formItems.forEach((function(e){return(0,u.setVariable)(o,e,void 0)})),o.orderBy===r&&(o.orderBy="",o.orderDir="asc"),t(o)},t.prototype.handleSubmit=function(e){return(0,a.__awaiter)(this,void 0,void 0,(function(){var t,n,r,o,i,l;return(0,a.__generator)(this,(function(s){switch(s.label){case 0:return t=this.props,n=t.onQuery,r=t.name,o=t.data,i=t.dispatchEvent,e.orderDir&&(e=(0,a.__assign)((0,a.__assign)({},e),{orderBy:r})),[4,i("columnSearch",(0,u.createObject)(o,{searchName:r,searchValue:e}))];case 1:return l=s.sent(),(null===l||void 0===l?void 0:l.prevented)?[2]:(this.close(),n(e),[2])}}))}))},t.prototype.isActive=function(){var e=this.props,t=e.data,n=e.name,a=e.orderBy;return a===n||this.formItems.some((function(e){return null===t||void 0===t?void 0:t[e]}))},t.prototype.render=function(){var e=this,t=this.props,n=t.render,u=t.name,d=t.data,c=t.searchable,p=t.store,f=t.orderBy,m=t.popOverContainer,h=t.classPrefix,v=t.classnames,g=this.buildSchema(),y=this.isActive();return r.default.createElement("span",{className:v("".concat(h,"TableCell-searchBtn"),y?"is-active":"")},r.default.createElement("span",{onClick:this.open},r.default.createElement(o.Icon,{icon:"search",className:"icon"})),this.state.isOpened?r.default.createElement(i.default,{container:m||function(){return(0,l.findDOMNode)(e)},placement:"left-bottom-left-top right-bottom-right-top",target:m?function(){return(0,l.findDOMNode)(e).parentNode}:null,show:!0},r.default.createElement(s.default,{classPrefix:h,onHide:this.close,className:v("".concat(h,"TableCell-searchPopOver"),c.className),overlay:!0},n("quick-search-form",g,{data:(0,a.__assign)((0,a.__assign)({},d),{orderBy:f,orderDir:f===u?p.orderDir:""}),onSubmit:this.handleSubmit,onAction:this.handleAction}))):null)},t}(r.default.Component);t.HeadCellSearchDropDown=d},"01c4":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n("9ab4"),r=(0,a.__importDefault)(n("ab5b")),o=function(e){return r.default.createElement("svg",(0,a.__assign)({viewBox:"0 0 1024 1024",fill:"currentColor",className:"icon"},e),r.default.createElement("path",{d:"M512 64A448 448 0 1 1 512 960 448 448 0 0 1 512 64z m0 627.2A38.4 38.4 0 1 0 512 768a38.4 38.4 0 0 0 0-76.8zM544 256h-64v349.12h64V256z",fill:"#FFB200"}))};t.default=o},"0224":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.RegisterStore=t.IIRendererStore=t.iRendererStore=t.RendererStore=void 0;var a=n("9ab4"),r=n("f7d3"),o=n("9007");Object.defineProperty(t,"iRendererStore",{enumerable:!0,get:function(){return o.iRendererStore}}),Object.defineProperty(t,"IIRendererStore",{enumerable:!0,get:function(){return o.IIRendererStore}});var i=n("1727"),l=n("7f9f"),s=n("689c"),u=n("51cd"),d=n("e8da"),c=n("2b5b"),p=n("2602"),f=n("62c6"),m=(0,a.__importDefault)(n("2769")),h=n("dce3"),v=n("bd60"),g=n("628b"),y=n("73d5"),b=n("df0b");(0,r.setLivelynessChecking)("ignore");var _=[i.ServiceStore,s.FormStore,l.ComboStore,u.CRUDStore,d.TableStore,c.TableStoreV2,p.ListStore,f.ModalStore,h.FormItemStore,g.PaginationStore,y.AppStore];t.RendererStore=r.types.model("RendererStore",{storeType:"RendererStore"}).props({visibleState:r.types.optional(r.types.frozen(),{}),disableState:r.types.optional(r.types.frozen(),{})}).views((function(e){return{get fetcher(){return(0,r.getEnv)(e).fetcher},get notify(){return(0,r.getEnv)(e).notify},get isCancel(){return(0,r.getEnv)(e).isCancel},get __(){return(0,r.getEnv)(e).translate},getStoreById:function(e){return(0,v.getStoreById)(e)},get stores(){return(0,v.getStores)()}}})).actions((function(e){return{addStore:function(t){if(t.storeType===b.RootStore.name)return(0,v.addStore)(b.RootStore.create(t,(0,r.getEnv)(e)));var n=(0,m.default)(_,(function(e){return e.name===t.storeType}));return(0,v.addStore)(n.create(t,(0,r.getEnv)(e)))},removeStore:function(e){(0,v.removeStore)(e)},setVisible:function(t,n){var r,o=(0,a.__assign)((0,a.__assign)({},e.visibleState),(r={},r[t]=n,r));e.visibleState=o},setDisable:function(t,n){var r,o=(0,a.__assign)((0,a.__assign)({},e.disableState),(r={},r[t]=n,r));e.disableState=o}}}));var C=function(e){_.push(e)};t.RegisterStore=C},"02245":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Radios=void 0;var a=n("9ab4"),r=(0,a.__importDefault)(n("ab5b")),o=n("cbc0"),i=(0,a.__importDefault)(n("3473")),l=(0,a.__importDefault)(n("f602")),s=n("79ae"),u=n("d77e"),d=n("27d6"),c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return(0,a.__extends)(t,e),t.prototype.toggleOption=function(e){var t=this.props,n=t.value,a=t.onChange,r=t.valueField,o=t.clearable,i=t.delimiter,l=t.options,u=(0,s.value2array)(n,{multiple:!1,delimiter:i,valueField:r,options:l}),d=u.indexOf(e);~d?o&&u.splice(d,1):u=[e];var c=u[0];a&&a(c)},t.prototype.renderGroup=function(e,t,n){var a=this,o=this.props,i=o.classnames;o.optionType,o.classPrefix;return r.default.createElement("div",{key:t,className:i("RadiosControl-group",e.className)},r.default.createElement("label",{className:i("RadiosControl-groupLabel",e.labelClassName)},e.label),e.children&&e.children.length?e.children.map((function(e,t){return a.renderItem(e,t,n)})):null)},t.prototype.renderItem=function(e,t,n){var a=this;if(e.children)return this.renderGroup(e,t,n);var o=this.props,s=o.disabled,u=o.inline,d=o.itemClassName,c=o.classnames,p=o.labelClassName,f=o.labelField,m=o.optionType,h=o.level,v=o.btnActiveLevel;o.classPrefix;if("button"===m){var g=!!~n.indexOf(e);return r.default.createElement(l.default,{key:t,active:g,onClick:function(){return a.toggleOption(e)},className:c(d,e.className),disabled:s||e.disabled,level:(g?v:"")||h},r.default.createElement("span",null,"".concat(e[f||"label"])))}return r.default.createElement(i.default,{type:"radio",key:t,onChange:function(){return a.toggleOption(e)},checked:!!~n.indexOf(e),className:c(d,e.className),disabled:s||e.disabled,description:e.description,inline:u,labelClassName:p},"".concat(e[f||"label"]))},t.prototype.render=function(){var e=this,t=this.props,n=t.value,a=t.options,o=t.className,i=t.classnames,l=t.placeholder,u=t.columnsCount,c=(t.joinValues,t.extractValue,t.disabled,t.inline),p=t.delimiter,f=t.valueField,m=(0,s.value2array)(n,{multiple:!1,delimiter:p,valueField:f,options:a}),h=[];return a&&(h=a.map((function(t,n){return e.renderItem(t,n,m)}))),c||(h=(0,d.columnsSplit)(h,i,u)),r.default.createElement("div",{className:o},h&&h.length?h:l)},t.defaultProps={type:"radio",optionType:"default",btnActiveLevel:"primary",resetValue:"",inline:!0,joinValues:!0,clearable:!1,columnsCount:1},t}(r.default.Component);t.Radios=c,t.default=(0,u.themeable)((0,o.uncontrollable)(c,{value:"onChange"}))},"0271":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var a=n("9ab4"),r=(0,a.__importDefault)(n("ab5b")),o=function(e){return r.default.createElement("svg",(0,a.__assign)({viewBox:"0 0 12 2",className:"icon"},e),r.default.createElement("g",{id:"minus",fill:"currentColor",fillRule:"nonzero"},r.default.createElement("polygon",{id:"path-1",points:"0 1.6 0 0.4 12 0.4 12 1.6"})))};t.default=o},"0458":function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PageRenderer=void 0;var a=n("9ab4"),r=(0,a.__importDefault)(n("ab5b")),o=n("f83d"),i=n("1727"),l=n("a97c"),s=n("d369"),u=n("2b46"),d=(0,a.__importDefault)(n("454d")),c=n("7f82"),p=n("4afe"),f=n("c6ba"),m=(0,a.__importDefault)(n("3206")),h=n("d813"),v=function(e){function t(t){var n=e.call(this,t)||this;return n.asideInner=r.default.createRef(),(0,s.bulkBindFunctions)(n,["handleAction","handleChange","handleQuery","handleDialogConfirm","handleDialogClose","handleDrawerConfirm","handleDrawerClose","handleClick","reload","silentReload","initInterval"]),n.style=document.createElement("style"),n.style.setAttribute("data-page",""),document.getElementsByTagName("head")[0].appendChild(n.style),n.updateStyle(),n.varStyle=document.createElement("style"),n.style.setAttribute("data-vars",""),document.getElementsByTagName("head")[0].appendChild(n.varStyle),n.updateVarStyle(),n}var n,o;return(0,a.__extends)(t,e),t.prototype.updateStyle=function(){this.props.css||this.props.mobileCSS?this.style.innerHTML="\n ".concat(this.buildCSS(this.props.css),"\n\n @media (max-width: 768px) {\n ").concat(this.buildCSS(this.props.mobileCSS),"\n }\n "):this.style.innerHTML=""},t.prototype.buildCSS=function(e){if(!e)return"";var t="";for(var n in e){var a=e[n],r="";for(var o in a)r+=" ".concat(o,": ").concat(a[o],";\n");t+="\n ".concat(n," {\n ").concat(r,"\n }\n ")}return t},t.prototype.updateVarStyle=function(){var e=this.props.cssVars,t="";if(e){for(var n in e)if(n.startsWith("--")){if(-1!==n.indexOf(":"))continue;var a=e[n];if("string"===typeof a&&(-1!==a.indexOf("expression(")||-1!==a.indexOf(";")))continue;t+="".concat(n,": ").concat(a,"; \n")}this.varStyle.innerHTML="\n :root {\n ".concat(t,"\n }\n ")}},t.prototype.componentDidMount=function(){var e=this.props,t=e.initApi,n=e.initFetch,a=e.initFetchOn,r=e.store,o=e.messages,i=e.asideSticky;if(this.mounted=!0,(0,c.isEffectiveApi)(t,r.data,n,a)&&r.fetchInitData(t,r.data,{successMessage:o&&o.fetchSuccess,errorMessage:o&&o.fetchFailed}).then(this.initInterval),i&&this.asideInner.current){var l=this.asideInner.current;l.style.cssText+="position: sticky; top: ".concat((0,h.scrollPosition)(l).top,"px;")}},t.prototype.componentDidUpdate=function(e){var t=this.props,n=t.store,a=t.initApi;if(t.initFetchOn&&t.initFetch&&!e.initFetch||!1!==t.initFetch&&(0,c.isApiOutdated)(e.initApi,a,e.data,t.data)){var r=t.messages;(0,c.isEffectiveApi)(a,n.data)&&n.fetchData(a,n.data,{successMessage:r&&r.fetchSuccess,errorMessage:r&&r.fetchFailed}).then(this.initInterval)}else JSON.stringify(t.css)!==JSON.stringify(e.css)||JSON.stringify(t.mobileCSS)!==JSON.stringify(e.mobileCSS)?this.updateStyle():JSON.stringify(t.cssVars)!==JSON.stringify(e.cssVars)?this.updateVarStyle():(0,s.isObjectShallowModified)(e.defaultData,t.defaultData)&&n.reInitData(t.defaultData)},t.prototype.componentWillUnmount=function(){var e,t;this.mounted=!1,clearTimeout(this.timer),this.style&&(null===(e=this.style.parentNode)||void 0===e||e.removeChild(this.style)),this.varStyle&&(null===(t=this.varStyle.parentNode)||void 0===t||t.removeChild(this.varStyle))},t.prototype.reloadTarget=function(e,t){},t.prototype.handleAction=function(e,t,n,r,o){var i=this;void 0===r&&(r=!1);var u=this.props,d=u.env,p=u.store,f=u.messages,m=u.onAction;if("dialog"===t.actionType)p.setCurrentAction(t),p.openDialog(n);else{if("drawer"!==t.actionType){if("ajax"===t.actionType){if(p.setCurrentAction(t),!(0,c.isEffectiveApi)(t.api,n))return;return p.saveRemote(t.api,n,{successMessage:t.messages&&t.messages.success||f&&f.saveSuccess,errorMessage:t.messages&&t.messages.failed||f&&f.saveSuccess}).then((function(){return(0,a.__awaiter)(i,void 0,void 0,(function(){var e;return(0,a.__generator)(this,(function(n){switch(n.label){case 0:return t.feedback&&(0,s.isVisible)(t.feedback,p.data)?[4,this.openFeedback(t.feedback,p.data)]:[3,2];case 1:n.sent(),n.label=2;case 2:return e=t.redirect&&(0,l.filter)(t.redirect,p.data),e&&d.jumpTo(e,t),t.reload&&this.reloadTarget(t.reload,p.data),[2]}}))}))})).catch((function(e){if(r||t.countDown)throw e}))}return m(e,t,n,r,o||this.context)}p.setCurrentAction(t),p.openDrawer(n)}},t.prototype.handleQuery=function(e){this.receive(e)},t.prototype.handleDialogConfirm=function(e,t){for(var n=[],r=2;r 当没开启数据映射时,发送数据自动切成白名单模式,配置啥发送啥,请绑定数据。如: 如果希望在默认的基础上定制,请先添加一个 Key 为 `&` Value 为 `\\$$` 作为第一行。 当没开启数据映射时,发送数据自动切成白名单模式,配置啥发送啥,请绑定数据。如: 如果希望在默认的基础上定制,请先添加一个 Key 为 `&` Value 为 `\\$$` 作为第一行。 当前为字段内容节点配置,选择上层还有更多的配置。 当前为字段内容节点配置,选择上层还有更多的配置。 html 片段 签名:(config, echarts, data) => config 参数说明 示例 内容 自定义容器区域0):p,selected:c||y?s.selectedItemsAsArray:void 0,keepItemSelectionOnPageChange:y,maxKeepItemSelectionLength:b,valueField:f||m,primaryField:m,hideQuickSaveBtn:h,items:s.data.items,query:s.query,orderBy:s.query.orderBy,orderDir:s.query.orderDir,popOverContainer:C,onAction:this.handleAction,onSave:this.handleSave,onSaveOrder:this.handleSaveOrder,onQuery:this.handleQuery,onSelect:this.handleSelect,onPopOverOpened:this.handleChildPopOverOpen,onPopOverClosed:this.handleChildPopOverClose,onSearchableFromReset:this.handleFilterReset,onSearchableFromSubmit:this.handleFilterSubmit,onSearchableFromInit:this.handleFilterInit,headerToolbarRender:this.renderHeaderToolbar,footerToolbarRender:this.renderFooterToolbar,data:s.mergedData}),r.default.createElement(_.Spinner,{overlay:!0,size:"lg",key:"info",show:s.loading}),l("dialog",(0,a.__assign)((0,a.__assign)({},s.action&&s.action.dialog),{type:"dialog"}),{key:"dialog",data:s.dialogData,onConfirm:this.handleDialogConfirm,onClose:this.handleDialogClose,show:s.dialogOpen}))},t.propsList=["bulkActions","itemActions","mode","orderField","syncLocation","toolbar","toolbarInline","messages","value","options","multiple","valueField","defaultParams","bodyClassName","perPageAvailable","pageField","perPageField","hideQuickSaveBtn","autoJumpToTopOnPagerChange","interval","silentPolling","stopAutoRefreshWhen","stopAutoRefreshWhenModalIsOpen","api","affixHeader","columnsTogglable","placeholder","tableClassName","headerClassName","footerClassName","headerToolbar","footerToolbar","filterTogglable","filterDefaultVisible","autoGenerateFilter","syncResponse2Query","keepItemSelectionOnPageChange","labelTpl","labelField","loadDataOnce","loadDataOnceFetchOnFilter","source","header","columns","size","onChange","onInit","onSaved","onQuery","formStore","autoFillHeight"],t.defaultProps={toolbarInline:!0,headerToolbar:["bulkActions"],footerToolbar:["statistics","pagination"],primaryField:"id",syncLocation:!0,pageField:"page",perPageField:"perPage",hideQuickSaveBtn:!1,autoJumpToTopOnPagerChange:!0,silentPolling:!1,filterTogglable:!1,filterDefaultVisible:!0,loadDataOnce:!1,loadDataOnceFetchOnFilter:!0,autoFillHeight:!1},t}(r.default.Component);t.default=x;var w=function(e){function t(t,n){var a=e.call(this,t)||this,r=n;return r.registerComponent(a),a}var n;return(0,a.__extends)(t,e),t.prototype.componentWillUnmount=function(){e.prototype.componentWillUnmount.call(this);var t=this.context;t.unRegisterComponent(this)},t.prototype.reload=function(t,n,a){var r=this.context;return t?r.reload(n?"".concat(t,"?").concat((0,l.qsstringify)(n)):t,a):e.prototype.reload.call(this,t,n)},t.prototype.receive=function(t,n){var a=this.context;return n?a.send(n,t):e.prototype.receive.call(this,t)},t.prototype.reloadTarget=function(e,t){var n=this.context;n.reload(e,t)},t.prototype.closeTarget=function(e){var t=this.context;t.close(e)},t.contextType=s.ScopedContext,t=(0,a.__decorate)([(0,o.Renderer)({type:"crud",storeType:i.CRUDStore.name,isolateScope:!0}),(0,a.__metadata)("design:paramtypes",[Object,"function"===typeof(n="undefined"!==typeof s.IScopedContext&&s.IScopedContext)?n:Object])],t),t}(x);t.CRUDRenderer=w},4303:function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SubFormControlRenderer=void 0;var a,r=n("9ab4"),o=(0,r.__importDefault)(n("ab5b")),i=n("2ab5"),l=(0,r.__importDefault)(n("4d26")),s=(0,r.__importDefault)(n("3eea")),u=(0,r.__importDefault)(n("2593")),d=n("d369"),c=n("c264"),p=(0,r.__importDefault)(n("aa47")),f=n("8bc8"),m=function(e){return e?(a=a||document.createElement("div"),a.innerHTML=e,a.innerText):e},h=function(e){function t(t){var n=e.call(this,t)||this;return n.state={},n.id=(0,d.guid)(),n.addItem=n.addItem.bind(n),n.removeItem=n.removeItem.bind(n),n.editSingle=n.editSingle.bind(n),n.open=n.open.bind(n),n.close=n.close.bind(n),n.dragTipRef=n.dragTipRef.bind(n),n.handleDialogConfirm=n.handleDialogConfirm.bind(n),n}return(0,r.__extends)(t,e),t.prototype.addItem=function(){this.setState({dialogData:(0,d.createObject)(this.props.data,this.props.scaffold||{}),dialogCtx:{mode:"add"}})},t.prototype.removeItem=function(e){e.stopPropagation(),e.preventDefault();var t=parseInt(e.currentTarget.getAttribute("data-index"),10),n=this.props.value;Array.isArray(n)&&(n=n.concat(),n.splice(t,1),this.props.onChange(n))},t.prototype.editSingle=function(){var e=this.props.value;e?this.setState({dialogData:(0,d.createObject)(this.props.data,this.props.value),dialogCtx:{mode:"edit"}}):this.addItem()},t.prototype.open=function(e){var t=parseInt(e.currentTarget.getAttribute("data-index"),10),n=this.props.value;Array.isArray(n)&&n[t]&&this.setState({dialogData:(0,d.createObject)(this.props.data,n[t]),dialogCtx:{mode:"edit",index:t}})},t.prototype.close=function(){this.setState({dialogData:void 0,dialogCtx:void 0})},t.prototype.handleDialogConfirm=function(e){var t=this.props,n=t.multiple,a=t.onChange,o=t.value,i=this.state.dialogCtx;if(n){var l=Array.isArray(o)?o.concat():[];"add"===(null===i||void 0===i?void 0:i.mode)?l.push((0,r.__assign)({},e[0])):l[i.index]=(0,r.__assign)((0,r.__assign)({},l[i.index]),e[0]),a(l)}else a((0,r.__assign)((0,r.__assign)({},o),e[0]));this.close()},t.prototype.dragTipRef=function(e){!this.dragTip&&e?this.initDragging():this.dragTip&&!e&&this.destroyDragging(),this.dragTip=e},t.prototype.initDragging=function(){var e=this,t=this.props.classPrefix,n=this.props.submitOnChange,a=(0,f.findDOMNode)(this);this.sortable=new p.default(a.querySelector(".".concat(t,"SubForm-values")),{group:"SubForm-".concat(this.id),animation:150,handle:".".concat(t,"SubForm-valueDragBar"),ghostClass:"".concat(t,"SubForm-value--dragging"),onEnd:function(t){if(t.newIndex!==t.oldIndex){var a=t.to;t.oldIndex
`,用于简单换行的场景\n\n示例:`LINEBREAK("\\n")`\n\n返回:`
`',example:"LINEBREAK(text)",params:[{type:"string",name:"text",description:"文本"}],returns:{type:"string",description:"处理后的文本"},namespace:"文本函数"},{name:"STARTSWITH",description:"判断字符串(text)是否以特定字符串(startString)开始,是则返回 True,否则返回 False",example:"STARTSWITH(text, '片段')",params:[{type:"string",name:"text",description:"文本"},{type:"string",name:"startString",description:"起始文本"}],returns:{type:"string",description:"判断结果"},namespace:"文本函数"},{name:"ENDSWITH",description:"判断字符串(text)是否以特定字符串(endString)结束,是则返回 True,否则返回 False",example:"ENDSWITH(text, '片段')",params:[{type:"string",name:"text",description:"文本"},{type:"string",name:"endString",description:"结束文本"}],returns:{type:"string",description:"判断结果"},namespace:"文本函数"},{name:"CONTAINS",description:"判断参数 1 中的文本是否包含参数 2 中的文本。",example:"CONTAINS(text, searchText)",params:[{type:"string",name:"text",description:"文本"},{type:"string",name:"searchText",description:"搜索文本"}],returns:{type:"string",description:"判断结果"},namespace:"文本函数"},{name:"REPLACE",description:"对文本进行全量替换。",example:"REPLACE(text, search, replace)",params:[{type:"string",name:"text",description:"要处理的文本"},{type:"string",name:"search",description:"要被替换的文本"},{type:"string",name:"replace",description:"要替换的文本"}],returns:{type:"string",description:"处理结果"},namespace:"文本函数"},{name:"SEARCH",description:"对文本进行搜索,返回命中的位置",example:"SEARCH(text, search, 0)",params:[{type:"string",name:"text",description:"要处理的文本"},{type:"string",name:"search",description:"用来搜索的文本"},{type:"number",name:"start",description:"起始位置"}],returns:{type:"number",description:"命中的位置"},namespace:"文本函数"},{name:"MID",description:"返回文本字符串中从指定位置开始的特定数目的字符",example:"MID(text, from, len)",params:[{type:"string",name:"text",description:"要处理的文本"},{type:"number",name:"from",description:"起始位置"},{type:"number",name:"len",description:"处理长度"}],returns:{type:"number",description:"命中的位置"},namespace:"文本函数"},{name:"BASENAME",description:"返回路径中的文件名\n\n示例:`/home/amis/a.json`\n\n返回:a.json`",example:"BASENAME(text)",params:[{type:"string",name:"text",description:"要处理的文本"}],returns:{type:"string",description:"文件名"},namespace:"文本函数"},{name:"DATE",description:"创建日期对象,可以通过特定格式的字符串,或者数值。\n\n需要注意的是,其中月份的数值是从0开始的,也就是说,\n如果是12月份,你应该传入数值11。",example:"DATE('2021-12-06 08:20:00')",params:[],returns:{type:"Date",description:"日期对象"},namespace:"日期函数"},{name:"TIMESTAMP",description:"返回时间的时间戳",example:'TIMESTAMP(date[, format = "X"])',params:[{type:"date",name:"date",description:"日期对象"},{type:"string",name:"format",description:"时间戳格式,带毫秒传入 'x'。默认为 'X' 不带毫秒的。"}],returns:{type:"number",description:"时间戳"},namespace:"日期函数"},{name:"TODAY",description:"返回今天的日期",example:"TODAY()",params:[],returns:{type:"number",description:"日期"},namespace:"日期函数"},{name:"NOW",description:"返回现在的日期",example:"NOW()",params:[],returns:{type:"number",description:"日期"},namespace:"日期函数"},{name:"DATETOSTR",description:"将日期转成日期字符串",example:'DATETOSTR(date[, format="YYYY-MM-DD HH:mm:ss"])',params:[{type:"date",name:"date",description:"日期对象"},{type:"string",name:"format",description:'日期格式,默认为 "YYYY-MM-DD HH:mm:ss"'}],returns:{type:"number",description:"日期字符串"},namespace:"日期函数"},{name:"STARTOF",description:"返回日期的指定范围的开端",example:'STARTOF(date[unit = "day"])',params:[{type:"date",name:"date",description:"日期对象"},{type:"string",name:"unit",description:"比如可以传入 'day'、'month'、'year' 或者 `week` 等等"}],returns:{type:"date",description:"新的日期对象"},namespace:"日期函数"},{name:"ENDOF",description:"返回日期的指定范围的末尾",example:'ENDOF(date[unit = "day"])',params:[{type:"date",name:"date",description:"日期对象"},{type:"string",name:"unit",description:"比如可以传入 'day'、'month'、'year' 或者 `week` 等等"}],returns:{type:"date",description:"新的日期对象"},namespace:"日期函数"},{name:"YEAR",description:"返回日期的年份",example:"YEAR(date)",params:[{type:"date",name:"date",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"MONTH",description:"返回日期的月份,这里就是自然月份。",example:"MONTH(date)",params:[{type:"date",name:"date",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"DAY",description:"返回日期的天",example:"DAY(date)",params:[{type:"date",name:"date",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"HOUR",description:"返回日期的小时",example:"HOUR(date)",params:[{type:"date",name:"date",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"MINUTE",description:"返回日期的分",example:"MINUTE(date)",params:[{type:"date",name:"date",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"SECOND",description:"返回日期的秒",example:"SECOND(date)",params:[{type:"date",name:"date",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"YEARS",description:"返回两个日期相差多少年",example:"YEARS(endDate, startDate)",params:[{type:"date",name:"endDate",description:"日期对象"},{type:"date",name:"startDate",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"MINUTES",description:"返回两个日期相差多少分钟",example:"MINUTES(endDate, startDate)",params:[{type:"date",name:"endDate",description:"日期对象"},{type:"date",name:"startDate",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"DAYS",description:"返回两个日期相差多少天",example:"DAYS(endDate, startDate)",params:[{type:"date",name:"endDate",description:"日期对象"},{type:"date",name:"startDate",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"HOURS",description:"返回两个日期相差多少小时",example:"HOURS(endDate, startDate)",params:[{type:"date",name:"endDate",description:"日期对象"},{type:"date",name:"startDate",description:"日期对象"}],returns:{type:"number",description:"数值"},namespace:"日期函数"},{name:"DATEMODIFY",description:"修改日期,对日期进行加减天、月份、年等操作\n\n示例:\n\nDATEMODIFY(A, -2, 'month')\n\n对日期 A 进行往前减2月的操作。",example:"DATEMODIFY(date, 2, 'days')",params:[{type:"date",name:"date",description:"日期对象"},{type:"number",name:"num",description:"数值"},{type:"string",name:"unit",description:"单位:支持年、月、天等等"}],returns:{type:"date",description:"日期对象"},namespace:"日期函数"},{name:"STRTODATE",description:"将字符日期转成日期对象,可以指定日期格式。\n\n示例:STRTODATE('2021/12/6', 'YYYY/MM/DD')",example:'STRTODATE(value[, format=""])',params:[{type:"string",name:"value",description:"日期字符"},{type:"string",name:"format",description:"日期格式"}],returns:{type:"date",description:"日期对象"},namespace:"日期函数"},{name:"ISBEFORE",description:"判断两个日期,是否第一个日期在第二个日期的前面",example:"ISBEFORE(a, b)",params:[{type:"date",name:"a",description:"第一个日期"},{type:"date",name:"b",description:"第二个日期"},{type:"string",name:"unit",description:"单位,默认是 'day', 即之比较到天"}],returns:{type:"boolean",description:"判断结果"},namespace:"日期函数"},{name:"ISAFTER",description:"判断两个日期,是否第一个日期在第二个日期的后面",example:"ISAFTER(a, b)",params:[{type:"date",name:"a",description:"第一个日期"},{type:"date",name:"b",description:"第二个日期"},{type:"string",name:"unit",description:"单位,默认是 'day', 即之比较到天"}],returns:{type:"boolean",description:"判断结果"},namespace:"日期函数"},{name:"ISSAMEORBEFORE",description:"判断两个日期,是否第一个日期在第二个日期的前面或者相等",example:"ISSAMEORBEFORE(a, b)",params:[{type:"date",name:"a",description:"第一个日期"},{type:"date",name:"b",description:"第二个日期"},{type:"string",name:"unit",description:"单位,默认是 'day', 即之比较到天"}],returns:{type:"boolean",description:"判断结果"},namespace:"日期函数"},{name:"ISSAMEORAFTER",description:"判断两个日期,是否第一个日期在第二个日期的后面或者相等",example:"ISSAMEORAFTER(a, b)",params:[{type:"date",name:"a",description:"第一个日期"},{type:"date",name:"b",description:"第二个日期"},{type:"string",name:"unit",description:"单位,默认是 'day', 即之比较到天"}],returns:{type:"boolean",description:"判断结果"},namespace:"日期函数"},{name:"COUNT",description:"返回数组的长度",example:"COUNT(arr)",params:[{type:"Array{"a": "\\${a}", "b": 2}
__undefined
时,表示删除对应的字段,可以结合{"&": "\\$$"}
来达到黑名单效果。headers
对象,添加自定义请求头",placement:"right"},pipeIn:function(e){return!!e},pipeOut:function(e){return e?{}:null}},{type:"combo",name:"headers",mode:"row",syncDefaultValue:!1,multiple:!0,visibleOn:"this.headers",items:[{type:"input-text",name:"key",placeholder:"Key",unique:!0,required:!0,options:[{label:"Accept",value:"Accept"},{label:"Accept-Charset",value:"Accept-Charset"},{label:"Accept-Encoding",value:"Accept-Encoding"},{label:"Authorization",value:"Authorization"},{label:"Cache-Control",value:"Cache-Control"},{label:"Content-Encoding",value:"Content-Encoding"},{label:"Content-Type",value:"Content-Type"}]},{type:"input-text",name:"value",placeholder:"Value",disabled:!1}],pipeIn:function(e){if(!(0,u.isObject)(e))return e;var t=[];return Object.keys(e).forEach((function(n){t.push({key:n||"",value:"string"==typeof e[n]?e[n]:JSON.stringify(e[n])})})),t},pipeOut:function(e){if(!Array.isArray(e))return e;var t={};return e.forEach((function(e){var n=e.key||"",a=e.value;try{a=JSON.parse(a)}catch(e){}t[n]=a})),t}}]},{title:"自定义适配器",type:"fieldSet",collapsable:!0,collapsed:!0,body:[{type:"grid",columns:[{body:[{label:"发送适配器",name:"requestAdaptor",type:"js-editor",allowFullscreen:!0,description:"函数签名:(api) => api, 数据在 api.data 中,修改后返回 api 对象。"}],md:6},{body:[{label:"接收适配器",name:"adaptor",type:"js-editor",allowFullscreen:!0,description:"函数签名: (payload, response, api) => payload"}],md:6}]}]}]},{title:"其他",tab:[{label:"默认消息提示",type:"combo",name:"messages",multiLine:!0,description:e||"设置 ajax 默认提示信息,当 ajax 没有返回 msg 信息时有用,如果 ajax 返回携带了 msg 值,则还是以 ajax 返回为主",items:[{label:"获取成功提示",type:"input-text",name:"fetchSuccess"},{label:"获取失败提示",type:"input-text",name:"fetchFailed"},{label:"保存顺序成功提示",type:"input-text",name:"saveOrderSuccess"},{label:"保存顺序失败提示",type:"input-text",name:"saveOrderFailed"},{label:"快速保存成功提示",type:"input-text",name:"quickSaveSuccess"},{label:"快速保存失败提示",type:"input-text",name:"quickSaveFailed"}]}]}]}]}]}}]}},t.prototype.render=function(){var e=this,t=this.props,n=t.render,a=t.className,o=t.value;return r.default.createElement("div",{className:(0,l.default)("ae-ApiControl",a)},r.default.createElement(i.InputBox,{className:"ae-ApiControl-input m-b-none",value:this.state.apiStr,clearable:!1,placeholder:"http://",onChange:function(t){return e.handleSubmit(t,"input")}}),n("api-control-actions",this.buildActionsSchema(),{data:(0,s.normalizeApi)(o)}))},a.__decorate([u.autobind,a.__metadata("design:type",Function),a.__metadata("design:paramtypes",[Object,Object]),a.__metadata("design:returntype",void 0)],t.prototype,"handleSubmit",null),t}(r.default.Component);t.APIControl=d;var c=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),a.__decorate([(0,i.FormItem)({type:"ae-apiControl"})],t)}(d);t.APIControlRenderer=c},8595:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OptionControlRenderer=t.OptionControl=void 0;var a=n(752),r=a.__importDefault(n(6689)),o=n(6405),i=a.__importDefault(n(9003)),l=a.__importDefault(n(9309)),s=a.__importDefault(n(3901)),u=a.__importDefault(n(35)),d=n(1502),c=n(4122),p=n(3570),f=function(e){function t(t){var n=e.call(this,t)||this;return n.internalProps=["checked"],n.state={options:n.transformOptions(t),popOverData:void 0,popOverCtx:void 0,source:"custom",sourceOptions:[{label:"自定义选项",value:"custom"},{label:"接口获取",value:"api"},{label:"表单实体",value:"form"}]},n}return a.__extends(t,e),t.prototype.componentDidUpdate=function(e){var t=this.props;(e.value!==t.value||(0,p.isObjectShallowModified)(e.data,t.data))&&this.setState({options:this.transformOptions(t)})},t.prototype.getOptionValueType=function(e){return"string"==typeof e?"text":"boolean"==typeof e?"boolean":"number"==typeof e?"number":"text"},t.prototype.normalizeOptionValue=function(e,t){if("text"===t)return String(e);if("number"===t){var n=Number(e);return isNaN(n)?0:n}return"boolean"===t?!(!e||"false"===e):""},t.prototype.transformOptionValue=function(e){return null==e?"":"string"==typeof e?e:JSON.stringify(e)},t.prototype.transformOptions=function(e){var t=e.data,n=e.value,r=t.value,o=(0,c.value2array)(r,t).map((function(e){var n;return e[null!==(n=null==t?void 0:t.valueField)&&void 0!==n?n:"value"]}));return Array.isArray(n)?n.map((function(e){var n;return a.__assign(a.__assign({},e),{checked:!!~o.indexOf(e[null!==(n=null==t?void 0:t.valueField)&&void 0!==n?n:"value"])})})):[]},t.prototype.normalizeValue=function(){var e,t=this,n=this.props.data,a=void 0===n?{}:n,r=a.joinValues,o=void 0===r||r,i=a.extractValue,l=a.multiple,u=a.delimiter,d=a.valueField,c=this.state.options.filter((function(e){return e.checked})).map((function(e){return(0,s.default)(e,t.internalProps)}));return c.length?(l?(e=c,o?e=c.map((function(e){return e[d||"value"]})).join(u||","):i&&(e=c.map((function(e){return e[d||"value"]})))):(e=c[0],(o||i)&&(e=e[d||"value"])),e):""},t.prototype.onChangeOptions=function(){var e=this,t=this.state.options.concat(),n=this.props,a=n.onBulkChange,r=(n.onChange,this.normalizeValue());a&&a({options:t.map((function(t){return(0,s.default)(t,e.internalProps)})),value:r||void 0})},t.prototype.targetRef=function(e){this.target=e?(0,o.findDOMNode)(e):null},t.prototype.dragRef=function(e){!this.drag&&e?this.initDragging():this.drag&&!e&&this.destroyDragging(),this.drag=e},t.prototype.initDragging=function(){var e=this,t=(0,o.findDOMNode)(this);this.sortable=new u.default(t.querySelector(".ae-OptionControl-content"),{group:"OptionControlGroup",animation:150,handle:".ae-OptionControlItem-dragBar",ghostClass:"ae-OptionControlItem--dragging",onEnd:function(t){if(t.newIndex!==t.oldIndex){var n=t.to;t.newIndexname
属性,多个组件请用,
隔开,如果目标组件为表单项,请先填写表单的名字,再用.
连接表单项的名字如:xxForm.xxControl
。另外如果刷新目标对象设置为 window
,则会刷新整个页面。",labelRemark:{trigger:"click",className:"m-l-xs",rootClose:!0,content:"设置名字后,当前组件操作完成会触发目标组件(根据设置的名字)的刷新。",placement:"left"}},className:{label:"CSS 类名",type:"ae-classname",name:"className",labelRemark:{trigger:"click",className:"m-l-xs",rootClose:!0,content:'有哪些辅助类 CSS 类名?请前往 样式说明,除此之外你可以添加自定义类名,然后在系统配置中添加自定义样式。',placement:"left"}},apiControl:function(e){void 0===e&&(e={});var t=e.name,n=e.label,a=(e.value,e.description),r=e.sampleBuilder,i=o.__rest(e,["name","label","value","description","sampleBuilder"]);return o.__assign({type:"ae-apiControl",label:n,name:t,description:a,labelRemark:r?{icon:"",label:"示例",title:"接口返回示例",tooltipClassName:"ae-ApiSample-tooltip",render:function(e){return d.createElement(s.Html,{className:"ae-ApiSample",inline:!1,html:"\n
\n ")})},trigger:"click",className:"m-l-xs",rootClose:!0,placement:"left"}:void 0},i)},api:function(e){void 0===e&&(e={});var t=e.name,n=e.label,a=e.value,r=e.description,i=e.sampleBuilder,l=o.__rest(e,["name","label","value","description","sampleBuilder"]);return o.__assign({type:"container",body:[{type:"checkbox",label:n||"API",labelRemark:i?{icon:"",label:"示例",title:"接口返回示例",tooltipClassName:"ae-ApiSample-tooltip",render:function(e){return d.createElement(s.Html,{className:"ae-ApiSample",inline:!1,html:"\n ".concat(r(e),"
\n ")})},trigger:"click",className:"m-l-xs",rootClose:!0,placement:"left"}:void 0,option:"高级配置",name:t||"api",mode:"inline",className:"w-full m-b-sm",inputClassName:"pull-right text-sm m-t-sm p-t-none",onChange:function(){},pipeIn:function(e){return e&&"string"!=typeof e},pipeOut:function(e,t){var n=(0,s.buildApi)(t);return e?{method:n.method,url:n.url}:n.url?"".concat(n.method?"".concat(n.method,":"):"").concat(n.url):""}},{name:t||"api",type:"input-text",value:a,placeholder:"http://",description:r,visibleOn:"!this.".concat(t||"api"," || typeof this.").concat(t||"api"," === 'string'"),className:"m-b-none",labelRemark:{}},{type:"combo",name:t||"api",description:r,syncDefaultValue:!1,multiLine:!0,visibleOn:"this.".concat(t||"api"," && typeof this.").concat(t||"api"," !== 'string'"),className:"m-b-none",messages:{validateFailed:"接口配置中存在错误,请仔细检查"},pipeIn:function(e){if("string"==typeof e){var t=e,n="get",a=/^(raw:|external:)?(get|post|put|patch|delete):(.*)$/.exec(t);return a&&(t=a[1]+a[3],n=a[2]),{method:n,url:t}}return e},items:[{label:"发送方式",name:"method",value:"get",type:"select",mode:"horizontal",horizontal:{leftFixed:"sm"},options:[{value:"get",label:"GET"},{value:"post",label:"POST"},{value:"put",label:"PUT"},{value:"patch",label:"PATCH"},{value:"delete",label:"DELETE"}]},{label:"接口地址",type:"input-text",name:"url",placeholder:"http://",required:!0},{type:"switch",label:"数据映射",name:"data",mode:"inline",className:"w-full m-b-xs",pipeIn:function(e){return!!e},pipeOut:function(e){return e?{"&":"$$"}:null}},{type:"tpl",visibleOn:"!this.data",inline:!1,className:"text-sm text-muted m-b",tpl:"当没开启数据映射时,发送 API 的时候会发送尽可能多的数据,如果你想自己控制发送的数据,或者需要额外的数据处理,请开启此选项"},{type:"input-kv",syncDefaultValue:!1,name:"data",visibleOn:"this.data",descriptionClassName:"help-block text-xs m-b-none",description:'".concat(i(e),"
{"a": "\\${a}", "b": 2}
__undefined
时,表示删除对应的字段,可以结合{"&": "\\$$"}
来达到黑名单效果。\\${xxx}
来获取变量,或者用 lodash.template 语法来写模板逻辑。详情',size:"lg"},showCounter:{label:"是否显示计数器",name:"showCounter",type:"switch",mode:"inline",className:"w-full"},borderMode:{type:"select",name:"borderMode",label:"边框模式",options:[{label:"全边框",value:"full"},{label:"半边框",value:"half"},{label:"无边框",value:"none"}]},data:{type:"input-kv",name:"data",label:"初始静态数据"}};function m(e,t){var n=f[e];return"function"==typeof n?n(t):n?t?o.__assign(o.__assign({},n),t):n:null}function h(e,t){return void 0===t&&(t=!0),t?function(t){return void 0===t?e:t}:function(t){return t||e}}t.styleTpl={name:"style",type:"combo",label:"",noBorder:!0,multiLine:!0,items:[{type:"fieldSet",title:"文字",body:[{type:"group",body:[{label:"文字大小",type:"input-text",name:"fontSize"},{label:"文字粗细",name:"fontWeight",type:"select",options:["normal","bold","lighter","bolder"]}]},{type:"group",body:[{label:"文字颜色",type:"input-color",name:"color"},{label:"对齐方式",name:"textAlign",type:"select",options:["left","right","center","justify","justify-all","start","end","match-parent"]}]}]},{type:"fieldSet",title:"背景",body:[{label:"颜色",name:"backgroundColor",type:"input-color"},m("imageUrl",{name:"backgroundImage"})]},{type:"fieldSet",title:"边距",body:[{type:"group",label:"外边距",body:[{label:"上",name:"marginTop",type:"input-text"},{label:"右",name:"marginRight",type:"input-text"},{label:"下",name:"marginBottom",type:"input-text"},{label:"左",name:"marginLeft",type:"input-text"}]},{type:"group",label:"内边距",body:[{label:"上",name:"paddingTop",type:"input-text"},{label:"右",name:"paddingRight",type:"input-text"},{label:"下",name:"paddingBottom",type:"input-text"},{label:"左",name:"paddingLeft",type:"input-text"}]}]},{type:"fieldSet",title:"边框",body:[{type:"group",body:[{label:"样式",name:"borderStyle",type:"select",options:["none","solid","dotted","dashed"]},{label:"颜色",name:"borderColor",type:"input-color"}]},{type:"group",body:[{label:"宽度",name:"borderWidth",type:"input-text"},{label:"圆角宽度",name:"borderRadius",type:"input-text"}]}]},{type:"fieldSet",title:"特效",body:[{label:"透明度",name:"opacity",min:0,max:1,step:.05,type:"input-range",pipeIn:h(1)},{label:"阴影",name:"boxShadow",type:"input-text"}]}]},f.style=t.styleTpl,t.getSchemaTpl=m,t.setSchemaTpl=function(e,t){f[e]=t},t.valuePipeOut=function(e){try{if("undefined"===e)return;return JSON.parse(e)}catch(t){return e}},t.defaultValue=h},5610:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DefaultDNDMode=void 0;var a=n(752),r=n(1502),o=a.__importDefault(n(8425)),i=n(9703),l=function(){function e(e,t){this.dnd=e,this.region=t,this.exchangeX=0,this.exchangeY=0,this.dndContainer=this.dnd.store.getDoc().querySelector('[data-region="'.concat(t.region,'"][data-region-host="').concat(t.id,'"]'))}return e.prototype.enter=function(e,t){var n=this.dnd.dragElement,a=Array.isArray(this.region.schema)?this.region.schema:[];if(n&&n.closest("[data-region]")===this.dndContainer){var r=this.getChild(this.dndContainer,n),l=n.getAttribute("data-editor-id"),s=(0,o.default)(a,(function(e){return e.$$id===l}));~s&&a[s+1]&&(this.dropBeforeId=a[s+1].$$id),this.dndContainer.insertBefore(t,r);var u=n.outerHTML.replace("ae-is-draging","").replace(/\bdata\-editor\-id=(?:'.+?'|".+?")/g,"");t.innerHTML=u}else{var d=this.dnd.manager,c=d.store;(0,i.renderThumbToGhost)(t,this.region,c.dragSchema,d),this.dndContainer.appendChild(t)}},e.prototype.leave=function(e,t){this.dndContainer.removeChild(t)},e.prototype.over=function(e,t){var n,a,i=this.getTarget(e),l=this.dndContainer,s=Array.isArray(this.region.schema)?this.region.schema:[],u=e.clientX-this.exchangeX,d=e.clientY-this.exchangeY;if(Math.abs(d),Math.abs(u),i&&!r.animation.animating){var c=i.getAttribute("data-editor-id"),p=this.getChild(l,i),f=(0,o.default)(s,(function(e){return e.$$id===c})),m=Array.prototype.indexOf.call(l.children,t),h=Array.prototype.indexOf.call(l.children,p);~m&&m>h&&(!this.exchangeY||d<0||u<0)?(this.exchangeX=e.clientX,this.exchangeY=e.clientY,this.dropBeforeId=null===(n=s[f])||void 0===n?void 0:n.$$id,m!==h-1&&(r.animation.capture(l),l.insertBefore(t,p),r.animation.animateAll())):~m&&mvisibleOn
用来做错误信息提示。",t.docLink="/amis/zh-CN/components/alert",t.icon="fa fa-exclamation-circle",t.scaffold={type:"alert",body:{type:"tpl",tpl:"提示内容",inline:!1},level:"info"},t.previewSchema=a.__assign(a.__assign({},t.scaffold),{className:"text-left",showCloseButton:!0}),t.regions=[{key:"body",label:"内容区",placeholder:"提示内容"}],t.panelTitle="提示",t.panelBody=(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[{type:"switch",name:"showCloseButton",mode:"inline",className:"w-full",label:"显示关闭按钮"}]},{title:"外观",body:[{label:"样式",name:"level",type:"select",options:[{label:"提示",value:"info"},{label:"成功",value:"success"},{label:"警告",value:"warning"},{label:"严重",value:"danger"}]},(0,i.getSchemaTpl)("className")]},{title:"显隐",body:[(0,i.getSchemaTpl)("ref"),(0,i.getSchemaTpl)("visible")]}]),t}return a.__extends(t,e),t}(o.BasePlugin);t.AlertPlugin=l,(0,r.registerEditorPlugin)(l)},1509:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AnchorNavPlugin=void 0;var a=n(752),r=a.__importDefault(n(6689)),o=n(9756),i=n(9547),l=n(9933),s=n(5863),u=n(9703),d=a.__importDefault(n(8425)),c=n(1548),p=n(3437),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="anchor-nav",t.$schema="/schemas/AnchorNavSchema.json",t.name="锚点导航",t.isBaseComponent=!0,t.description="锚点导航,在多行内容展示时,可以将内容用锚点导航分组的形式展示,点击导航菜单可以定位到对应内容区域。",t.docLink="/amis/zh-CN/components/anchor-nav",t.tags=["容器"],t.icon="fa fa-link",t.scaffold={type:"anchor-nav",links:[{title:"用户信息",body:"用户信息"},{title:"系统配置信息",body:[{type:"form",body:[{type:"fieldSet",title:"系统配置信息",body:[{type:"input-email",name:"email",placeholder:"请输入邮箱地址",label:"邮箱"}]}]}]},{title:"权限管理",body:[{type:"form",body:[{type:"fieldSet",title:"权限管理",body:[{type:"input-email",name:"email",placeholder:"请输入邮箱地址",label:"邮箱"}]}]}]},{title:"角色管理",body:"角色管理"},{title:"网络配置信息",body:"网络配置信息"}]},t.previewSchema=a.__assign({},t.scaffold),t.panelTitle="锚点导航",t.panelBody=[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[{name:"links",type:"combo",label:"锚点管理",multiple:!0,draggable:!0,minLength:1,items:[{type:"input-text",name:"title",required:!0}],scaffold:{title:"锚点内容",body:{type:"tpl",tpl:"内容",inline:!1}},addButtonText:"新增锚点",draggableTip:""}]},{title:"外观",body:[(0,i.getSchemaTpl)("className"),(0,i.getSchemaTpl)("className",{name:"linkClassName",label:"导航 CSS 类名"}),(0,i.getSchemaTpl)("className",{name:"sectionClassName",label:"区域内容 CSS 类名"})]}])],t.patchContainers=["anchor-nav.body"],t.vRendererConfig={regions:{body:{key:"body",label:"内容区"}},panelTitle:"内容区域",panelBody:[(0,i.getSchemaTpl)("fieldSet",{title:"常规",body:[{name:"title",label:"标题",type:"input-text",required:!0}]}),(0,i.getSchemaTpl)("fieldSet",{title:"外观",body:[(0,i.getSchemaTpl)("className")]})]},t.wrapperProps={unmountOnExit:!0,mountOnEnter:!0},t.sectionWrapperResolve=function(e){return e.parentElement},t.overrides={render:function(){var e=this,t=this.super();if(!this.renderSection&&this.props.$$editor&&t){var n=this.props.links;return(0,u.mapReactElement)(t,(function(t){var a,o;if(t.type===p.AnchorNavSection&&t.props.$$id){var i=t.props.$$id,l=(0,d.default)(n,(function(e){return e.$$id===i})),u=e.props.$$editor,f=u.plugin;if(~l){var m=null===(o=null===(a=f.vRendererConfig)||void 0===a?void 0:a.regions)||void 0===o?void 0:o.body;return m?r.default.cloneElement(t,{children:r.default.createElement(s.VRenderer,{key:i,plugin:u.plugin,renderer:u.renderer,$schema:"/schemas/SectionSchema.json",hostId:u.id,memberIndex:l,name:"".concat(t.props.title||"锚点内容".concat(l+1)),id:i,draggable:!1,wrapperResolve:f.sectionWrapperResolve,schemaPath:"".concat(u.schemaPath,"/anchor-nav/").concat(l),path:"".concat(e.props.$path,"/").concat(l),data:e.props.data},r.default.createElement(c.RegionWrapper,{key:m.key,preferTag:m.preferTag,name:m.key,label:m.label,regionConfig:m,placeholder:m.placeholder,editorStore:f.manager.store,manager:f.manager,children:t.props.children,wrapperResolve:m.wrapperResolve,rendererName:u.renderer.name}))}):t}}return t}))}return t}},t}return a.__extends(t,e),t}(l.BasePlugin);t.AnchorNavPlugin=f,(0,o.registerEditorPlugin)(f)},1596:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AudioPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="audio",t.$schema="/schemas/AudioSchema.json",t.name="音频",t.isBaseComponent=!0,t.description="音频控件,可以用来播放各种音频文件。",t.tags=["功能"],t.icon="fa fa-music",t.scaffold={type:"audio",autoPlay:!1,src:""},t.previewSchema=a.__assign({},t.scaffold),t.panelTitle="音频",t.panelBodyCreator=function(e){var t=/\/field\/\w+$/.test(e.path);return[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[t?{type:"tpl",inline:!1,className:"text-info text-sm",tpl:"\\${audioSrc}
"},{type:"select",name:"rates",label:"音频倍速",description:"加速范围在0.1到16之间",multiple:!0,pipeIn:function(e){return Array.isArray(e)?e.join(","):[]},pipeOut:function(e){if(e&&e.length){var t=e.split(",");return t=t.filter((function(e){return Number(e)&&Number(e)>0&&Number(e)<=16})).map((function(e){return Number(Number(e).toFixed(1))})),Array.from(new Set(t))}return[]},options:["0.5","1","1.5","2","2.5","3","3.5","4"]},{name:"controls",type:"select",label:"内部控件",multiple:!0,extractValue:!0,joinValues:!1,options:[{label:"倍速",value:"rates"},{label:"播放",value:"play"},{label:"时间",value:"time"},{label:"进度",value:"process"},{label:"音量",value:"volume"}],pipeIn:(0,i.defaultValue)(["rates","play","time","process","volume"]),labelRemark:{trigger:"click",className:"m-l-xs",rootClose:!0,content:"选择倍速后,还需要在常规选择栏中配置倍速",placement:"left"}},{name:"autoPlay",type:"switch",mode:"inline",className:"w-full",label:"自动播放"},{name:"loop",type:"switch",mode:"inline",className:"w-full",label:"循环播放"}]},{title:"外观",body:[(0,i.getSchemaTpl)("className"),{name:"inline",type:"switch",mode:"inline",className:"w-full",label:"内联模式",pipeIn:(0,i.defaultValue)(!0)}]},{title:"显隐",body:[(0,i.getSchemaTpl)("ref"),(0,i.getSchemaTpl)("visible")]}])]},t}return a.__extends(t,e),t}(o.BasePlugin);t.AudioPlugin=l,(0,r.registerEditorPlugin)(l)},7717:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.AvatarPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="avatar",t.$schema="/schemas/AvatarSchema.json",t.name="头像",t.isBaseComponent=!0,t.icon="fa fa-user",t.description="用户头像",t.docLink="/amis/zh-CN/components/avatar",t.tags=["其他"],t.scaffold={type:"avatar",icon:"fa fa-user"},t.previewSchema=a.__assign({},t.scaffold),t.panelTitle="面包屑",t.panelBody=[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[{type:"input-text",label:"文字",name:"text"},{type:"select",label:"图片拉伸方式",options:["cover","fill","contain","none","scale-down"]},{type:"radios",name:"shape",inline:!0,value:"circle",label:"形状",options:["circle","square"]},{name:"icon",label:"图标",type:"icon-picker"},{name:"size",label:"大小",value:40,type:"input-number"}]},{title:"外观",body:[(0,i.getSchemaTpl)("className"),(0,i.getSchemaTpl)("style")]},{title:"显隐",body:[(0,i.getSchemaTpl)("ref"),(0,i.getSchemaTpl)("visible")]}])],t}return a.__extends(t,e),t}(o.BasePlugin);t.AvatarPlugin=l,(0,r.registerEditorPlugin)(l)},2029:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BreadcrumbPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="breadcrumb",t.$schema="/schemas/BreadcrumbSchema.json",t.disabledRendererPlugin=!0,t.name="面包屑",t.isBaseComponent=!0,t.icon="fa fa-list",t.description="面包屑导航",t.docLink="/amis/zh-CN/components/breadcrumb",t.tags=["其他"],t.scaffold={type:"breadcrumb",items:[{label:"首页",href:"/",icon:"fa fa-home"},{label:"上级页面"},{label:"当前页面"}]},t.previewSchema=a.__assign({},t.scaffold),t.panelTitle="面包屑",t.panelBody=[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[{label:"分隔符",type:"input-text",name:"separator"},(0,i.getSchemaTpl)("api",{label:"动态数据",name:"source"}),{label:"面包屑",name:"items",type:"combo",multiple:!0,multiLine:!0,draggable:!0,addButtonText:"新增",items:[{type:"input-text",placeholder:"文本",name:"label"},{type:"input-text",name:"href",placeholder:"链接"},{name:"icon",label:"图标",type:"icon-picker"}]}]},{title:"外观",body:[(0,i.getSchemaTpl)("className"),(0,i.getSchemaTpl)("className",{name:"itemClassName",label:"面包屑的 CSS 类名"}),,(0,i.getSchemaTpl)("className",{name:"separatorClassName",label:"分隔符的 CSS 类名"})]},{title:"显隐",body:[(0,i.getSchemaTpl)("ref"),(0,i.getSchemaTpl)("visible")]}])],t}return a.__extends(t,e),t}(o.BasePlugin);t.BreadcrumbPlugin=l,(0,r.registerEditorPlugin)(l)},6460:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="button",t.$schema="/schemas/ActionSchema.json",t.name="按钮",t.isBaseComponent=!0,t.description="用来展示一个按钮,你可以配置不同的展示样式,配置不同的点击行为。",t.docLink="/amis/zh-CN/components/button",t.tags=["按钮"],t.icon="fa fa-square",t.scaffold={type:"button",label:"按钮",actionType:"dialog",dialog:{title:"系统提示",body:"对你点击了"}},t.previewSchema={type:"button",label:"按钮"},t.panelTitle="按钮",t.panelBodyCreator=function(e){/(?:\/|^)dialog\/.+$/.test(e.path);var t=/(?:\/|^)dropdown-button\/.+$/.test(e.path);return[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[{label:"名称",type:"input-text",name:"label"},{label:"类型",type:"button-group-select",name:"type",size:"sm",options:[{label:"按钮",value:"button"},{label:"提交",value:"submit"},{label:"重置",value:"reset"}]},{type:"input-text",name:"tooltip",hidden:t,label:"提示文案",description:"鼠标停留时弹出该内容"},{type:"button-group-select",name:"tooltipPlacement",visibleOn:"data.tooltip || data.disabledTip",label:"提示信息位置",size:"sm",mode:"inline",className:"w-full",value:"bottom",options:[{label:"上",value:"top"},{label:"右",value:"right"},{label:"下",value:"bottom"},{label:"左",value:"left"}]},(0,i.getSchemaTpl)("icon"),{type:"button-group-select",label:"图标位置",clearable:!0,visibleOn:"this.icon",name:"iconClassName",size:"sm",pipeIn:function(e){return"string"==typeof e&&/\bpull\-(left|right)\b/.test(e)?RegExp.$1:""},pipeOut:function(e,t){return(t||"").replace(/\bpull\-(left|right)\b/,"").trim()+e?"pull-".concat(e):""},options:[{label:"居左",value:"left"},{label:"居右",value:"right"}]},(0,i.getSchemaTpl)("size",{label:"尺寸"}),{label:"样式",type:"select",name:"level",hidden:t,clearable:!1,btnActiveLevel:"",options:[{label:"默认",value:"default",level:"default"},{label:"链接",value:"link",level:"link"},{label:"主色",value:"primary",level:"primary"},{label:"淡色",value:"light",level:"light"},{label:"深色",value:"dark",level:"dark"},{label:"提示",value:"info",level:"info"},{label:"成功",value:"success",level:"success"},{label:"警告",value:"warning",level:"warning"},{label:"严重",value:"danger",level:"danger"}]},{name:"block",type:"switch",label:"块状显示",mode:"inline"},(0,i.getSchemaTpl)("className",{label:"按钮 CSS 类名"}),(0,i.getSchemaTpl)("className",{name:"iconClassName",label:"图标 CSS 类名",visibleOn:"this.icon"})]},{title:"显隐",body:[(0,i.getSchemaTpl)("disabled",[{type:"input-text",name:"disabledTip",label:"禁用提示信息",hidden:t,description:"按钮被禁用时,鼠标停留弹出该段文字"}]),(0,i.getSchemaTpl)("visible")]}])]},t}return a.__extends(t,e),t.prototype.filterProps=function(e){return e.disabled=!1,e},t.prototype.getRendererInfo=function(e){var t=e.renderer,n=e.schema,a=this;if(n.$$id&&a.name&&a.rendererName&&a.rendererName===t.name)return{name:n.label?n.label:a.name,regions:a.regions,patchContainers:a.patchContainers,vRendererConfig:a.vRendererConfig,wrapperProps:a.wrapperProps,wrapperResolve:a.wrapperResolve,filterProps:a.filterProps,$schema:a.$schema,renderRenderer:a.renderRenderer}},t}(o.BasePlugin);t.ButtonPlugin=l,(0,r.registerEditorPlugin)(l)},4930:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonGroupPlugin=void 0;var a=n(752),r=n(9756),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="button-group",t.$schema="/schemas/ButtonGroupSchema.json",t.name="按钮组",t.isBaseComponent=!0,t.description="用来展示多个按钮,视觉上会作为一个整体呈现。",t.tags=["按钮"],t.icon="fa fa-object-group",t.docLink="/amis/zh-CN/components/button-group",t.scaffold={type:"button-group",buttons:[{type:"button",label:"按钮1",actionType:"dialog",dialog:{title:"系统提示",body:"对你点击了"}},{type:"button",label:"按钮2",actionType:"dialog",dialog:{title:"系统提示",body:"对你点击了"}}]},t.previewSchema=a.__assign({},t.scaffold),t.panelTitle="按钮组",t.panelBody=[{name:"buttons",type:"combo",label:"按钮管理",multiple:!0,addable:!0,minLength:1,draggable:!0,draggableTip:"",editable:!1,visibleOn:"this.buttons && this.buttons.length",items:[{type:"tpl",inline:!1,className:"p-t-xs",tpl:'<% if (data.type === "button-group") { %> 按钮组 <% } else { %><%= data.label %><% if (data.icon) { %><% }%><% } %>'}],addButtonText:"新增按钮",scaffold:{type:"button",label:"按钮"}}],t.regions=[{key:"buttons",label:"子按钮",renderMethod:"render",preferTag:"按钮",insertPosition:"inner"}],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.ButtonGroupPlugin=o,(0,r.registerEditorPlugin)(o)},1838:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ButtonToolbarPlugin=void 0;var a=n(752),r=n(9933),o=n(9547),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="button-toolbar",t.$schema="/schemas/ButtonToolbarSchema.json",t.name="按钮工具栏",t.isBaseComponent=!0,t.description="可以用来放置多个按钮或者按钮组,按钮之间会存在一定的间隔",t.tags=["按钮"],t.icon="fa fa-ellipsis-h",t.scaffold={type:"button-toolbar",buttons:[{type:"button",label:"按钮1",actionType:"dialog",dialog:{title:"系统提示",body:"对你点击了"}},{type:"button",label:"按钮2",actionType:"dialog",dialog:{title:"系统提示",body:"对你点击了"}}]},t.previewSchema=a.__assign({},t.scaffold),t.panelTitle="按钮工具栏",t.panelBody=[(0,o.getSchemaTpl)("tabs",[{title:"常规",body:[{name:"buttons",type:"combo",label:"按钮管理",multiple:!0,addable:!0,draggable:!0,draggableTip:"可排序、可移除、如要编辑请在预览区选中编辑",editable:!1,visibleOn:"this.buttons && this.buttons.length",items:[{type:"tpl",inline:!1,className:"p-t-xs",tpl:'<% if (data.type === "button-group") { %> 按钮组 <% } else { %><%= data.label %><% if (data.icon) { %><% }%><% } %>'}],addButtonText:"新增按钮",scaffold:{type:"button",label:"按钮"}}]},{title:"外观",body:[(0,o.getSchemaTpl)("className")]},{title:"显隐",body:[(0,o.getSchemaTpl)("ref"),(0,o.getSchemaTpl)("visible")]}])],t}return a.__extends(t,e),t}(r.BasePlugin);t.ButtonToolbarPlugin=i},6062:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CRUDPlugin=void 0;var a=n(752),r=n(1502),o=a.__importDefault(n(1712)),i=a.__importDefault(n(9591)),l=a.__importDefault(n(6689)),s=n(9756),u=n(9933),d=n(9547),c=n(3570),p=n(3893),f=n(2717),m=n(8663),h=function(e){return"tpl"===e?"input-text":"status"===e||"mapping"===e?"select":"input-".concat(e)},v=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="crud",t.$schema="/schemas/CRUDSchema.json",t.order=-1e3,t.name="增删改查",t.isBaseComponent=!0,t.description="用来实现对数据的增删改查,支持三种模式展示:table、cards和list. 负责数据的拉取,分页,单条操作,批量操作,排序,快速编辑等等功能。集成查询条件。",t.docLink="/amis/zh-CN/components/crud",t.tags=["功能"],t.icon="fa fa-table",t.scaffold={type:"crud",syncLocation:!1,api:"",columns:[{name:"id",label:"ID",type:"text"},{name:"engine",label:"渲染引擎",type:"text"}],bulkActions:[],itemActions:[]},t.sampleBuilder=function(e){var t={items:[],total:0};if(Array.isArray(e.columns)){var n={};e.columns.forEach((function(e){e.name&&(0,p.setVariable)(n,e.name,"sample")})),t.items.push(n)}return JSON.stringify({status:0,msg:"",data:t},null,2)},t.btnSchemas={create:{label:"新增",type:"button",actionType:"dialog",level:"primary",dialog:{title:"新增",body:{type:"form",api:"xxx/create",body:[]}}},update:{label:"编辑",type:"button",actionType:"dialog",level:"link",dialog:{title:"编辑",body:{type:"form",api:"xxx/update",body:[]}}},view:{label:"查看",type:"button",actionType:"dialog",level:"link",dialog:{title:"查看详情",body:{type:"form",api:"xxx/update",body:[]}}},delete:{type:"button",label:"删除",actionType:"ajax",level:"link",className:"text-danger",confirmText:"确定要删除?",api:"delete:/xxx/delete"},bulkDelete:{type:"button",level:"danger",label:"批量删除",actionType:"ajax",confirmText:"确定要删除?",api:"/xxx/batch-delete"},bulkUpdate:{type:"button",label:"批量编辑",actionType:"dialog",dialog:{title:"批量编辑",size:"md",body:{type:"form",api:"/xxx/bacth-edit",body:[{label:"字段1",text:"字段1",type:"input-text"}]}}},filter:{title:"查询条件",body:[{type:"input-text",name:"keywords",label:"关键字"}]}},t.scaffoldForm={title:"增删改查快速开始-CRUD",body:[(0,d.getSchemaTpl)("api",{label:"接口地址",sampleBuilder:function(e){var t={items:[],total:0};if(Array.isArray(e.columns)){var n={};e.columns.forEach((function(e){e.name&&(0,p.setVariable)(n,e.name,"sample")})),t.items.push(n)}return JSON.stringify({status:0,msg:"",data:t},null,2)}}),{type:"button",label:"格式校验并自动生成列配置",className:"m-t-xs m-b-xs",onClick:function(e,n){return a.__awaiter(t,void 0,void 0,(function(){var e,t,o,i,l,s,u,d;return a.__generator(this,(function(a){switch(a.label){case 0:return e=n.data,t=(0,f.getEnv)(window.editorStore).schemaFilter,o=e.api,t&&(o=t({api:e.api}).api),[4,n.env.fetcher(o,e)];case 1:return i=a.sent(),l=[],(null==(s=(null===(u=i.data)||void 0===u?void 0:u.rows)||(null===(d=i.data)||void 0===d?void 0:d.items))?void 0:s.length)?(Object.keys(s[0]).forEach((function(e){s[0][e],l.push({label:e,type:"text",name:e})})),n.formStore.setValues({columns:l}),n.formStore.setValues({filterSettingSource:l.map((function(e){return e.name}))})):r.toast.warning("API返回格式不正确,请点击接口地址右侧示例的问号查看示例"),[2]}}))}))}},{name:"features",label:"启用功能",type:"checkboxes",joinValues:!1,extractValue:!0,itemClassName:"max-w-lg",options:[{label:"新增",value:"create"},{label:"查询",value:"filter"},{label:"批量删除",value:"bulkDelete"},{label:"批量修改",value:"bulkUpdate"},{label:"操作栏-编辑",value:"update"},{label:"操作栏-查看详情",value:"view"},{label:"操作栏-删除",value:"delete"}]},{type:"group",body:[{columnRatio:10,type:"checkboxes",label:"启用的查询字段",name:"filterEnabledList",joinValues:!1,source:"${filterSettingSource}"},{columnRatio:2,type:"input-number",label:"每列显示几个字段",value:3,name:"filterColumnCount"}],visibleOn:'data.features && data.features.includes("filter")'},{name:"columns",type:"input-table",label:!1,addable:!0,removable:!0,needConfirm:!1,columns:[{type:"input-text",name:"label",label:"标题"},{type:"input-text",name:"name",label:"绑定字段名"},{type:"select",name:"type",label:"类型",value:"text",options:[{value:"text",label:"纯文本"},{value:"tpl",label:"模板"},{value:"image",label:"图片"},{value:"date",label:"日期"},{value:"progress",label:"进度"},{value:"status",label:"状态"},{value:"mapping",label:"映射"},{value:"operation",label:"操作栏"}]}]}],pipeOut:function(e){var n=(0,i.default)(e),r=n.features,l={type:"operation",label:"操作",buttons:[]},s=["update","view","delete"],u=(0,o.default)(r,"length");n.bulkActions=[],n.api=(0,m.normalizeApi)(n.api),u&&r.forEach((function(r){var o,u;if(s.includes(r)){var d=void 0;"update"===r?(d=(0,i.default)(t.btnSchemas.update)).dialog.body.body=e.columns.filter((function(e){var t=e.type;return"progress"!==t&&"operation"!==t})).map((function(e){var t=e.type,n=a.__rest(e,["type"]);return a.__assign(a.__assign({},n),{type:h(t)})})):"view"===r?(d=(0,i.default)(t.btnSchemas.view)).dialog.body.body=e.columns.map((function(e){e.type;var t=a.__rest(e,["type"]);return a.__assign(a.__assign({},t),{type:"static"})})):"delete"===r&&((d=(0,i.default)(t.btnSchemas.delete)).api=(null===(o=n.api)||void 0===o?void 0:o.method.match(/^(post|delete)$/i))?n.api:a.__assign(a.__assign({},n.api),{method:"post"})),t.addItem(l.buttons,d)}else{if("bulkUpdate"===r&&t.addItem(n.bulkActions,(0,i.default)(t.btnSchemas.bulkUpdate)),"bulkDelete"===r&&t.addItem(n.bulkActions,(0,i.default)(t.btnSchemas.bulkDelete)),"create"===r){var c=t.btnSchemas.create;c.dialog.body={type:"form",api:(null===(u=n.api)||void 0===u?void 0:u.method.match(/^(post|put)$/i))?n.api:a.__assign(a.__assign({},n.api),{method:"post"}),body:n.columns.map((function(e){var t=e.type;return{type:h(t),name:e.name,label:e.label}}))},n.headerToolbar=[c,"bulkActions"]}var p=Object.keys(n.filter||{});"filter"!==r||p.length||n.filterEnabledList&&(n.filter={title:"查询条件"},n.filter.columnCount=e.filterColumnCount,n.filter.mode="horizontal",n.filter.body=n.filterEnabledList.map((function(e){return{type:"input-text",label:e.label,name:e.value}})))}}));var d=n.columns.find((function(e){return"operation"===e.type}));return u&&!d&&n.columns.push(l),n},canRebuild:!0},t.multifactor=!0,t.previewSchema={syncLocation:!1,type:"crud",className:"text-left",bodyClassName:"m-b-none",affixHeader:!1,data:{items:[{a:1,b:2},{a:3,b:4},{a:5,b:6}]},source:"${items}",columns:[{label:"A",name:"a"},{label:"B",name:"b"},{type:"operation",label:"操作",buttons:[{icon:"fa fa-eye",type:"button"},{icon:"fa fa-edit",type:"button"}]}]},t.panelTitle="增删改查",t.panelBodyCreator=function(e){t.manager.store;var n=e.id;return(0,d.getSchemaTpl)("tabs",[{title:"常规",body:[{name:"filter",type:"switch",mode:"inline",className:"block",label:"启用查询条件",pipeIn:function(e){return!!e},pipeOut:function(e,n){return e?t.oldFilter||(0,c.JSONPipeIn)({title:"查询条件",body:[{type:"input-text",name:"keywords",label:"关键字"}]}):(t.oldFilter=n,null)}},{type:"divider"},{label:"批量操作",name:"bulkActions",type:"combo",hiddenOn:"data.pickerMode && data.multiple",inputClassName:"ae-BulkActions-control",multiple:!0,draggable:!0,draggableTip:"",scaffold:{label:"按钮",type:"button"},labelRemark:{className:"m-l-xs",trigger:"click",rootClose:!0,content:"通过此可以管理批量操作按钮,只有设置了批量操作按钮才会出现选择框,可在外观中配置批量操作按钮位置。",placement:"left"},items:[{type:"tpl",tpl:'${label}',columnClassName:"p-t-xs"},{columnClassName:"p-t-xs col-edit",children:function(e){var a=e.index;return l.default.createElement("button",{onClick:t.handleBulkActionEdit.bind(t,n,a),"data-tooltip":"修改","data-position":"bottom",className:"text-muted"},l.default.createElement("i",{className:"fa fa-pencil"}))}}]},{type:"divider"},{label:"单条操作",name:"itemActions",type:"combo",labelRemark:{className:"m-l-xs",trigger:"click",rootClose:!0,content:"设置后,当鼠标悬停行数据上,会出现该操作按钮,同时顶部操作栏也会显示该按钮,勾选成员时与批量按钮智能切换。",placement:"left"},hiddenOn:'this.mode && this.mode !== "table" || this.pickerMode',inputClassName:"ae-BulkActions-control",multiple:!0,draggable:!0,scaffold:{label:"按钮",type:"button"},items:[{type:"tpl",tpl:'${label}',columnClassName:"p-t-xs"},{type:"checkbox",className:"text-xs",option:"悬停隐藏",name:"hiddenOnHover"},{columnClassName:"p-t-xs col-edit",children:function(e){var a=e.index;return l.default.createElement("button",{onClick:t.handleItemActionEdit.bind(t,n,a),"data-tooltip":"修改","data-position":"bottom",className:"text-muted"},l.default.createElement("i",{className:"fa fa-pencil"}))}}]},{type:"divider",hiddenOn:'this.mode && this.mode !== "table" || this.pickerMode'},{name:"syncLocation",label:"同步地址栏",type:"switch",mode:"inline",className:"block",pipeIn:(0,d.defaultValue)(!0),labelRemark:{className:"m-l-xs",trigger:"click",rootClose:!0,content:"开启后会把查询条件数据和分页信息同步到地址栏中,页面中出现多个时,建议只保留一个同步地址栏,否则会相互影响。",placement:"left"}},{label:"默认参数",type:"input-kv",name:"defaultParams",labelRemark:{className:"m-l-xs",trigger:"click",rootClose:!0,content:"可以用来设置默认参数,比如 perPage:20
",placement:"left"}},{type:"divider"},{name:"keepItemSelectionOnPageChange",label:"保留条目选择",type:"switch",mode:"inline",className:"block",visbileOn:"this.bulkActions && this.bulkActions.length || this.itemActions && this.itemActions.length",labelRemark:{className:"m-l-xs",trigger:"click",rootClose:!0,content:"默认分页、搜索后,用户选择条目会被清空,开启此选项后会保留用户选择,可以实现跨页面批量操作。",placement:"left"}},{name:"labelTpl",type:"input-text",label:"单条描述模板",visibleOn:"this.keepItemSelectionOnPageChange",labelRemark:{className:"m-l-xs",trigger:"click",rootClose:!0,content:"开启【保留条目选择】后会把所有已选择条目列出来,此选项可以用来定制条目展示文案。",placement:"left"}},{name:"primaryField",label:"指定主键",type:"input-text",pipeIn:(0,d.defaultValue)("id"),description:"默认id
,用于批量操作获取行级数据"}]},{title:"接口",body:[(0,d.getSchemaTpl)("api",{label:"数据拉取接口",sampleBuilder:function(e){var t={items:[],total:0};if(Array.isArray(e.columns)){var n={};e.columns.forEach((function(e){e.name&&(0,p.setVariable)(n,e.name,"sample")})),t.items.push(n)}return JSON.stringify({status:0,msg:"",data:t},null,2)}}),{name:"initFetch",type:"radios",label:"是否初始拉取",pipeIn:function(e){return"boolean"==typeof e&&e||"boolean"!=typeof e&&""},inline:!0,onChange:function(){},options:[{label:"是",value:!0},{label:"否",value:!1},{label:"表达式",value:""}]},{name:"initFetch",autoComplete:!1,visibleOn:'typeof this.initFetch !== "boolean"',type:"input-text",placeholder:"用 JS 表达式来决定",className:"m-t-n-sm"},{name:"loadDataOnce",label:"一次性拉取",type:"switch",mode:"inline",className:"block",labelRemark:{className:"m-l-xs",trigger:"click",rootClose:!0,content:"开启后,数据只会在初始的时候拉取,后续分页、排序不再请求接口,都由前端直接完成。",placement:"left"}},{label:"开启定时刷新",type:"switch",name:"interval",visibleOn:"data.api",pipeIn:function(e){return!!e},pipeOut:function(e){return e?3e3:void 0},mode:"inline",className:"block"},{name:"interval",type:"input-number",visibleOn:'typeof data.interval === "number"',step:500,className:"m-t-n-sm",description:"设置后将自动定时刷新,单位 ms"},{name:"silentPolling",label:"静默刷新",type:"switch",mode:"inline",visibleOn:"!!data.interval",description:"设置自动定时刷新时是否显示loading"},{name:"stopAutoRefreshWhen",label:"停止定时刷新检测表达式",type:"input-text",visibleOn:"!!data.interval",description:"定时刷新一旦设置会一直刷新,除非给出表达式,条件满足后则不刷新了。"},{name:"stopAutoRefreshWhenModalIsOpen",label:"当有弹框时关闭自动刷新",type:"switch",visibleOn:"!!data.interval",mode:"inline",className:"block",description:"弹框打开关闭自动刷新,关闭弹框又恢复"},{type:"divider"},{name:"draggable",label:"是否可拖拽排序",type:"switch",mode:"inline",className:"block"},(0,d.getSchemaTpl)("api",{label:"顺序保存接口",name:"saveOrderApi",visibleOn:"data.draggable"}),{type:"divider"},(0,d.getSchemaTpl)("api",{label:"快速保存接口",name:"quickSaveApi",description:"当 column 中设置了快速编辑后将使用此接口批量保存数据。"}),{type:"divider"},(0,d.getSchemaTpl)("api",{label:"快速保存单条接口",name:"quickSaveItemApi",description:"当 column 中设置了快速编辑且设置了立即保存,将使用此接口保存数据。"}),{type:"divider"},{label:"默认消息提示",type:"combo",name:"messages",multiLine:!0,description:"覆盖默认消息提示,但如果 api 返回 msg 则会优先使用这个 msg",items:[{label:"获取成功提示",type:"input-text",name:"fetchSuccess"},{label:"获取失败提示",type:"input-text",name:"fetchFailed"},{label:"保存顺序成功提示",type:"input-text",name:"saveOrderSuccess"},{label:"保存顺序失败提示",type:"input-text",name:"saveOrderFailed"},{label:"快速保存成功提示",type:"input-text",name:"quickSaveSuccess"},{label:"快速保存失败提示",type:"input-text",name:"quickSaveFailed"}]}]},{title:"外观",body:[{label:"内容展示模式",name:"mode",type:"button-group-select",size:"xs",pipeIn:function(e,t){var n;return null!==(n="grid"===e?"cards":e)&&void 0!==n?n:"table"},onChange:function(e,t,n,a){var r,o,l,s,u,d,c=null===(o=null===(r=null==a?void 0:a.data)||void 0===r?void 0:r.headerToolbar)||void 0===o?void 0:o.some((function(e){return"columns-toggler"===e.type})),p=(0,i.default)(null===(l=null==a?void 0:a.data)||void 0===l?void 0:l.headerToolbar);"table"!==e&&"table"===t&&(d=(null==p?void 0:p.find((function(e){return"columns-toggler"===e.type})))||{type:"columns-toggler",align:"right"},a.setValues({__headerHasColumnsToggler:c})),p="table"===e?p:null==p?void 0:p.filter((function(e){return"columns-toggler"!==e.type})),"table"===e?((null===(s=null==a?void 0:a.data)||void 0===s?void 0:s.__headerHasColumnsToggler)&&!c&&(null==p||p.push((null===(u=null==a?void 0:a.data)||void 0===u?void 0:u.__cacheColumnsToggler)||{type:"columns-toggler",align:"right"})),a.setValues({headerToolbar:p,columns:a.data.__columns||[{label:"ID",name:"id"},{label:"列信息",name:"name"}],__headerHasColumnsToggler:c,__card:a.data.card||a.data.__card,__listItem:a.data.listItem||a.data.__listItem}),a.deleteValueByName("card"),a.deleteValueByName("listItem")):"cards"===e?("table"===t&&a.setValues({__cacheColumnsToggler:d}),a.setValues({headerToolbar:p,card:a.data.__card||{type:"card",header:{title:"标题",subTitle:"副标题"},body:[{name:"a",label:"A"},{name:"b",label:"B"}],actions:[{label:"详情",type:"button"}]},__columns:a.data.columns||a.data.__columns,__listItem:a.data.listItem||a.data.__listItem}),a.deleteValueByName("columns"),a.deleteValueByName("listItem")):("table"===t&&a.setValues({__cacheColumnsToggler:d}),a.setValues({headerToolbar:p,listItem:a.data.__listItem||{body:[{type:"tpl",tpl:"简单的展示数据:$a $b"}],actions:[{icon:"fa fa-eye",type:"button"}]},__columns:a.data.columns||a.data.__columns,__card:a.data.card||a.data.__card}),a.deleteValueByName("columns"),a.deleteValueByName("card"))},options:[{value:"table",label:"表格"},{value:"cards",label:"卡片"},{value:"list",label:"列表"}]},{name:"headerToolbar",type:"combo",draggable:!0,draggableTip:"",descrition:"非内建内容请在预览区选中后编辑",label:"顶部工具栏配置",pipeIn:function(e){return Array.isArray(e)||(e=e?[e]:["bulkActions"]),e.map((function(e){var t=e.type;return"string"==typeof e&&~["bulkActions","bulk-actions","pagination","statistics","switch-per-page","filter-toggler","load-more","export-csv","export-excel"].indexOf(e)?e={type:t="bulkActions"===e?"bulk-actions":e}:"string"==typeof e&&(t="tpl",e="string"==typeof e?{type:"tpl",tpl:e}:e),a.__assign({type:t},e)}))},pipeOut:function(e){return Array.isArray(e)?e.map((function(e){return"button"===e.type?(0,c.JSONPipeIn)(a.__assign({label:"按钮",type:"button"},e)):"tpl"===e.type?(0,c.JSONPipeIn)(a.__assign({type:"tpl",tpl:"内容"},e)):e})):[]},scaffold:{type:"tpl",tpl:"内容"},multiple:!0,items:[{type:"select",name:"type",columnClassName:"w-ssm",options:[{value:"bulk-actions",label:"操作栏"},{value:"pagination",label:"分页"},{value:"statistics",label:"统计数据"},{value:"switch-per-page",label:"切换页码"},{value:"load-more",label:"加载更多"},{value:"export-csv",label:"导出 CSV"},{value:"export-excel",label:"导出 Excel"},{value:"columns-toggler",label:"列选择器",visibleOn:'!this.mode || this.mode === "table"'},{value:"filter-toggler",label:"查询条件切换"},{value:"drag-toggler",label:"拖拽切换"},{value:"check-all",label:"全选",hiddenOn:'!this.mode || this.mode === "table"'},{value:"tpl",label:"文本"},{value:"button",label:"按钮"}]},{name:"align",placeholder:"对齐方式",type:"select",size:"xs",options:[{label:"左对齐",value:"left"},{label:"右对齐",value:"right"}]}]},{name:"footerToolbar",type:"combo",draggable:!0,draggableTip:"",descrition:"非内建内容请在预览区选中后编辑",label:"底部工具栏配置",pipeIn:function(e){return Array.isArray(e)||(e=e?[e]:["statistics","pagination"]),e.map((function(e){var t=e.type;return"string"==typeof e&&~["bulkActions","bulk-actions","pagination","statistics","switch-per-page","filter-toggler","load-more","export-csv","export-excel"].indexOf(e)?e={type:t="bulkActions"===e?"bulk-actions":e}:"string"==typeof e&&(t="tpl",e="string"==typeof e?{type:"tpl",tpl:e}:e),a.__assign({type:t},e)}))},pipeOut:function(e){return Array.isArray(e)?e.map((function(e){return"button"===e.type?(0,c.JSONPipeIn)(a.__assign({label:"按钮",type:"button"},e)):"tpl"===e.type?(0,c.JSONPipeIn)(a.__assign({type:"tpl",tpl:"内容"},e)):e})):[]},scaffold:{type:"tpl",tpl:"内容"},multiple:!0,items:[{type:"select",name:"type",columnClassName:"w-ssm",options:[{value:"bulk-actions",label:"操作栏"},{value:"pagination",label:"分页"},{value:"statistics",label:"统计数据"},{value:"switch-per-page",label:"切换页码"},{value:"load-more",label:"加载更多"},{value:"export-csv",label:"导出 CSV"},{value:"export-excel",label:"导出 Excel"},{value:"columns-toggler",label:"列选择器",hiddenOn:'["grid", "cards", "list"].indexOf(this.mode)'},{value:"filter-toggler",label:"查询条件切换"},{value:"drag-toggler",label:"拖拽切换"},{value:"check-all",label:"全选",hiddenOn:'!this.mode || this.mode === "table"'},{value:"tpl",label:"文本"},{value:"button",label:"按钮"}]},{name:"align",placeholder:"对齐方式",size:"xs",type:"select",options:[{label:"左对齐",value:"left"},{label:"右对齐",value:"right"}]},{type:"remark",content:"详情请在预览区域选中后进行编辑。",trigger:["click"],rootClose:!0,placement:"left",visibleOn:'!~["bulkActions", "drag-toggler", "check-all", "bulk-actions", "pagination", "statistics", "switch-per-page", "filter-toggler", "load-more", "export-csv", "export-excel"].indexOf(this.type)',columnClassName:"no-grow w-3x p-t-xs",className:"m-l-none"}]},{name:"filterTogglable",type:"switch",label:"是否可显隐查询条件",mode:"inline",className:"block",visibleOn:"data.filter"},{name:"filterDefaultVisible",type:"switch",label:"查询条件默认是否可见",pipeIn:(0,d.defaultValue)(!0),mode:"inline",className:"block",visibleOn:"data.filter && data.filterTogglable"},{name:"hideQuickSaveBtn",label:"隐藏顶部快速保存提示",type:"switch",mode:"inline",className:"block"},{name:"alwaysShowPagination",label:"是否总是显示分页",type:"switch",mode:"inline",className:"block"},{name:"hideCheckToggler",type:"switch",label:"隐藏选择按钮",mode:"inline",className:"block",visibleOn:"data.checkOnItemClick"},(0,d.getSchemaTpl)("className"),(0,d.getSchemaTpl)("className",{name:"bodyClassName",label:"内容 CSS 类名"})]},{title:"其他",body:[(0,d.getSchemaTpl)("ref"),{name:"source",label:"数据源",type:"input-text",description:"不填写,默认读取接口返回的 items 或者 rows 属性,如果是别的,请在此设置,如: \\${xxxx}
"},{name:"perPage",label:"每页数量",type:"input-number"},{name:"keepItemSelectionOnPageChange",label:"翻页时保留选择",type:"switch",mode:"inline",className:"block"},{name:"maxKeepItemSelectionLength",label:"最大选择数量",type:"input-number",mode:"inline",className:"block"},{name:"pageField",label:"页码字段名",type:"input-text",pipeIn:(0,d.defaultValue)("page")},{name:"perPageField",label:"分页步长字段名",type:"input-text",pipeIn:(0,d.defaultValue)("perPage")},{name:"orderField",label:"排序权重字段",type:"input-text",labelRemark:{className:"m-l-xs",trigger:"click",rootClose:!0,content:"设置用来确定位置的字段名,设置后新的顺序将被赋值到该字段中。",placement:"left"}},{name:"perPageAvailable",label:"切换每页数",type:"input-array",hiddenOn:"data.loadDataOnce",items:{type:"input-number",required:!0},value:[10]},(0,d.getSchemaTpl)("name"),{name:"itemCheckableOn",type:"input-text",label:"配置单条可选中的表达式",description:"请使用 js 表达式,不设置的话每条都可选中。",visibleOn:"data.bulkActions && data.bulkActions.length || data.pickerMode"},{name:"checkOnItemClick",type:"switch",label:"开启单条点击整个区域选中",mode:"inline",className:"block",visibleOn:"data.bulkActions && data.bulkActions.length || data.pickerMode"},{name:"autoJumpToTopOnPagerChange",type:"switch",label:"自动跳顶部",mode:"inline",className:"block",description:"当切分页的时候,是否自动跳顶部"},{name:"syncResponse2Query",type:"switch",label:"同步查询条件",mode:"inline",className:"block",description:"查询后将返回的数据同步到查询条件上"}]}])},t.wrapperProps={affixHeader:!1},t}return a.__extends(t,e),t.prototype.addItem=function(e,t){e.find((function(e){return e.label===t.label}))||e.push(t)},t.prototype.handleBulkActionEdit=function(e,t){var n=this.manager.store,a=n.getSchema(e),r=null==a?void 0:a.bulkActions[t];r&&r.$$id&&n.setActiveId(r.$$id)},t.prototype.handleItemActionEdit=function(e,t){var n=this.manager.store,a=n.getSchema(e),r=null==a?void 0:a.itemActions[t];r&&r.$$id&&n.setActiveId(r.$$id)},t.prototype.buildSubRenderers=function(e,t){var n=this;if(n.name&&n.description)return{name:n.name,icon:n.icon,description:n.description,previewSchema:n.previewSchema,tags:n.tags,docLink:n.docLink,type:n.type,scaffold:n.scaffold,disabledRendererPlugin:n.disabledRendererPlugin,isBaseComponent:n.isBaseComponent,scaffoldForm:this.scaffoldForm,rendererName:n.rendererName}},t.prototype.getRendererInfo=function(t){var n=e.prototype.getRendererInfo.call(this,t);return n&&(n.scaffoldForm=this.scaffoldForm),n},t.prototype.renderEditableComponents=function(e){var t=e.render,n=e.bulkActions,r=e.itemActions,o=[];return Array.isArray(n)&&n.length&&o.push(l.default.createElement("div",{key:"bulkActions",className:"ae-EditableRender"},l.default.createElement("div",{className:"ae-EditableRender-title"},"批量操作"),l.default.createElement("div",{className:"ae-EditableRender-body"},n.map((function(e){return t("bulk-action",a.__assign({type:"button",size:"sm"},e),{key:e.$$id})}))))),Array.isArray(r)&&r.length&&o.push(l.default.createElement("div",{key:"itemActions",className:"ae-EditableRender"},l.default.createElement("div",{className:"ae-EditableRender-title"},"单条操作"),l.default.createElement("div",{className:"ae-EditableRender-body"},r.map((function(e){return t("bulk-action",a.__assign({type:"button",size:"sm"},e),{key:e.$$id})}))))),o.length?l.default.createElement("div",{className:"ae-EditableRenderers"},l.default.createElement("div",{className:"ae-EditableRenderers-tip"},"「增删改查」编辑辅助区"),o):null},t.prototype.renderRenderer=function(e){var t=e.$$editor.renderer;return l.default.createElement("div",{className:"ae-CRUDEditor"},this.renderEditableComponents(e),l.default.createElement(t.component,a.__assign({},e)))},t.prototype.filterProps=function(e){return e.pickerMode&&(e.options=e.data.options),e},t.prototype.afterUpdate=function(e){var t,n=this,a=e.context;a.info.plugin===this&&(null===(t=a.diff)||void 0===t?void 0:t.some((function(e){var t;return"mode"===(null===(t=e.path)||void 0===t?void 0:t.join("."))})))&&setTimeout((function(){n.manager.buildPanels(),n.manager.buildToolbars()}),20)},t}(u.BasePlugin);t.CRUDPlugin=v,(0,s.registerEditorPlugin)(v)},1663:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardPlugin=void 0;var a=n(752),r=n(1502),o=a.__importDefault(n(6689)),i=n(9756),l=n(9933),s=n(9547),u=a.__importDefault(n(8579)),d=n(5863),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="card",t.$schema="/schemas/CardSchema.json",t.name="卡片",t.isBaseComponent=!0,t.description="展示单个卡片。",t.docLink="/amis/zh-CN/components/card",t.tags=["展示"],t.icon="",t.scaffold={type:"card",header:{title:"标题",subTitle:"副标题"},body:"内容",actions:[{type:"button",label:"按钮",actionType:"dialog",dialog:{title:"标题",body:"内容"}}]},t.previewSchema=a.__assign({},t.scaffold),t.regions=[{key:"body",label:"内容区",renderMethod:"renderBody",preferTag:"展示"},{key:"actions",label:"按钮组",renderMethod:"renderActions",wrapperResolve:function(e){return e},preferTag:"按钮"}],t.panelTitle="卡片",t.panelBodyCreator=function(e){return[(0,s.getSchemaTpl)("tabs",[{title:"常规",body:(0,u.default)([{children:o.default.createElement(r.Button,{size:"sm",className:"m-b-sm",level:"info",block:!0,onClick:function(){return t.manager.showRendererPanel("按钮","请从左侧组件面板中点击添加按钮元素")}},"新增按钮")},{children:o.default.createElement("div",null,o.default.createElement(r.Button,{block:!0,level:"primary",size:"sm",onClick:function(){return t.manager.showRendererPanel("展示","请从左侧组件面板中点击添加内容元素")}},"新增内容"))},{type:"divider"},{name:"header.title",type:"input-text",label:"标题",description:"支持模板语法如: \\${xxx}
"},{name:"header.subTitle",type:"input-text",label:"副标题",description:"支持模板语法如: \\${xxx}
"},{name:"header.avatar",type:"input-text",label:"图片地址",description:"支持模板语法如: \\${xxx}
"},{name:"header.desc",type:"textarea",label:"描述",description:"支持模板语法如: \\${xxx}
"},{name:"header.highlight",type:"input-text",label:"是否高亮表达式",description:"如: this.isOwner
"}])},{title:"外观",body:[{type:"input-range",name:"actionsCount",pipeIn:(0,s.defaultValue)(4),min:1,max:10,step:1,label:"卡片一行最多能放按钮个数"},(0,s.getSchemaTpl)("className",{name:"titleClassName",label:"标题 CSS 类名"}),(0,s.getSchemaTpl)("className",{name:"highlightClassName",label:"高亮 CSS 类名"}),(0,s.getSchemaTpl)("className",{name:"subTitleClassName",label:"副标题 CSS 类名"}),(0,s.getSchemaTpl)("className",{name:"descClassName",label:"描述 CSS 类名"}),(0,s.getSchemaTpl)("className",{name:"avatarClassName",label:"图片外层 CSS 类名"}),(0,s.getSchemaTpl)("className",{name:"imageClassName",label:"图片 CSS 类名"}),(0,s.getSchemaTpl)("className",{name:"bodyClassName",label:"内容区 CSS 类名"}),(0,s.getSchemaTpl)("className")]},{title:"显隐",body:[(0,s.getSchemaTpl)("ref"),(0,s.getSchemaTpl)("visible")]}])]},t.fieldWrapperResolve=function(e){return e},t.overrides={renderFeild:function(e,t,n,a){var r=this.super(e,t,n,a),i=this.props.$$editor;if(!i||!t.$$id)return r;var l=i.plugin,s=t.$$id;return o.default.createElement(d.VRenderer,{plugin:i.plugin,renderer:i.renderer,multifactor:!0,key:s,$schema:"/schemas/CardBodyField.json",hostId:i.id,memberIndex:n,name:"".concat("字段".concat(n+1)),id:s,draggable:!1,wrapperResolve:l.fieldWrapperResolve,schemaPath:"".concat(i.schemaPath,"/body/").concat(n),path:"".concat(this.props.$path,"/").concat(n),data:this.props.data},r)}},t.vRendererConfig={panelTitle:"字段",panelBodyCreator:function(e){return[(0,s.getSchemaTpl)("label"),(0,s.getSchemaTpl)("className",{name:"labelClassName",label:"Label CSS 类名",visibleOn:"this.label"})]}},t}return a.__extends(t,e),t.prototype.beforeInsert=function(e){var t,n,r,o,i=e.context;i.info.plugin!==this&&(null===(t=i.node.sameIdChild)||void 0===t?void 0:t.info.plugin)!==this||"body"!==i.region||(i.data=a.__assign(a.__assign({},i.data),{label:null!==(o=null!==(n=i.data.label)&&void 0!==n?n:null===(r=i.subRenderer)||void 0===r?void 0:r.name)&&void 0!==o?o:"列名称"}))},t}(l.BasePlugin);t.CardPlugin=c,(0,i.registerEditorPlugin)(c)},8863:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CardsPlugin=void 0;var a=n(752),r=n(1502),o=a.__importDefault(n(6689)),i=n(9756),l=n(9933),s=n(9547),u=n(3570),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="cards",t.$schema="/schemas/CardsSchema.json",t.name="卡片列表",t.isBaseComponent=!0,t.description="功能类似于表格,但是用一个个小卡片来展示数据。当前组件需要配置数据源,不自带数据拉取,请优先使用 「CRUD」 组件。",t.docLink="/amis/zh-CN/components/cards",t.tags=["展示"],t.icon="fa fa-window-maximize",t.scaffold={type:"cards",data:{items:[{a:1,b:2},{a:3,b:4}]},columnsCount:2,card:{type:"card",className:"m-b-none",header:{title:"标题",subTitle:"副标题"},body:[{name:"a",label:"A"},{name:"b",label:"B"}],actions:[{label:"详情",type:"button"}]}},t.previewSchema=a.__assign(a.__assign({},t.scaffold),{className:"text-left "}),t.panelTitle="卡片集",t.panelBodyCreator=function(e){var n="crud"===e.schema.type;return[(0,s.getSchemaTpl)("tabs",[{title:"常规",body:[{children:o.default.createElement("div",{className:"m-b"},o.default.createElement(r.Button,{level:"success",size:"sm",block:!0,onClick:t.editDetail.bind(t,e.id)},"配置单项信息"))},{type:"divider"},{name:"title",type:"input-text",label:"标题"},{name:"href",type:"input-text",label:"打开外部链接"},n?null:{name:"source",type:"input-text",label:"数据源",pipeIn:(0,s.defaultValue)("${items}"),description:"绑定当前环境变量",test:!n},{name:"placeholder",value:"暂无数据",type:"input-text",label:"无数据提示"}]},{title:"外观",body:[{name:"showHeader",type:"switch",mode:"inline",className:"block",label:"是否显示头部",pipeIn:(0,s.defaultValue)(!0)},{name:"showFooter",type:"switch",mode:"inline",className:"block",label:"是否显示底部",pipeIn:(0,s.defaultValue)(!0)},(0,s.getSchemaTpl)("className",{label:"CSS 类名"}),(0,s.getSchemaTpl)("className",{name:"headerClassName",label:"头部 CSS 类名"}),(0,s.getSchemaTpl)("className",{name:"footerClassName",label:"底部 CSS 类名"}),(0,s.getSchemaTpl)("className",{name:"itemsClassName",label:"内容 CSS 类名"}),(0,s.getSchemaTpl)("className",{pipeIn:(0,s.defaultValue)("Grid-col--sm6 Grid-col--md4 Grid-col--lg3"),name:"itemClassName",label:"卡片 CSS 类名"}),{name:"columnsCount",type:"input-range",visibleOn:"!this.leftFixed",min:0,max:12,step:1,label:"每行显示个数",description:"不设置时,由卡片 CSS 类名决定"},{name:"masonryLayout",type:"switch",mode:"inline",label:"启用瀑布流"}]},{title:"显隐",body:[(0,s.getSchemaTpl)("ref"),(0,s.getSchemaTpl)("visible")]}])]},t}return a.__extends(t,e),t.prototype.editDetail=function(e){var t=this.manager,n=t.store,r=n.getNodeById(e),o=n.getValueOf(e);r&&o&&this.manager.openSubEditor({title:"配置成员渲染器",value:a.__assign({type:"card"},o.card),slot:{type:"container",body:"$$"},typeMutable:!1,onChange:function(e){e=a.__assign(a.__assign({},o),{card:e}),t.panelChangeValue(e,(0,u.diff)(o,e))},data:{item:"mocked data",index:0}})},t.prototype.buildEditorToolbar=function(e,t){var n=e.id,a=e.info,r=e.schema;("cards"===a.renderer.name||"crud"===a.renderer.name&&"cards"===r.mode)&&t.push({icon:"fa fa-expand",order:100,tooltip:"配置成员渲染器",onClick:this.editDetail.bind(this,n)})},t.prototype.buildEditorContextMenu=function(e,t){var n=e.id,a=e.schema,r=(e.region,e.info);e.selections.length||(null==r?void 0:r.plugin)!==this||("cards"===r.renderer.name||"crud"===r.renderer.name&&"cards"===a.mode)&&t.push("|",{label:"配置成员渲染器",onSelect:this.editDetail.bind(this,n)})},t.prototype.filterProps=function(e){var t=a.__assign(a.__assign({},e.defaultData),e.data),n=Array.isArray(e.value)?e.value:"string"==typeof e.source?(0,r.resolveVariable)(e.source,t):(0,r.resolveVariable)("items",t);Array.isArray(n)&&n.length||(e.value=(0,u.repeatArray)({id:666,title:"假数据",description:"假数据",a:"假数据",b:"假数据"},1).map((function(e,t){return a.__assign(a.__assign({},e),{id:t+1})})));var o=e.$schema,i=a.__rest(e,["$schema"]);return a.__assign(a.__assign({},(0,u.JSONPipeOut)(i)),{$schema:o})},t.prototype.getRendererInfo=function(t){var n,r=this,o=t.renderer,i=t.schema;return i.$$id||"crud"!==(null===(n=i.$$editor)||void 0===n?void 0:n.renderer.name)||"cards"!==o.name?e.prototype.getRendererInfo.call(this,t):a.__assign(a.__assign({},{id:i.$$editor.id}),{name:r.name,regions:r.regions,patchContainers:r.patchContainers,vRendererConfig:r.vRendererConfig,wrapperProps:r.wrapperProps,wrapperResolve:r.wrapperResolve,filterProps:r.filterProps,$schema:r.$schema,renderRenderer:r.renderRenderer})},t}(l.BasePlugin);t.CardsPlugin=d,(0,i.registerEditorPlugin)(d)},8395:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CarouselPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=n(6374),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="carousel",t.$schema="/schemas/CarouselSchema.json",t.name="轮播图",t.isBaseComponent=!0,t.description="用来渲染轮播图,可以配置每一页的内容(不只是图片),可以配置过渡动画。",t.docLink="/amis/zh-CN/components/carousel",t.tags=["展示"],t.icon="fa fa-images",t.scaffold={type:"carousel",options:[{image:(0,l.mockValue)({type:"image"})},{html:'\n
\n config
原始数据echarts
echarts 对象data
如果配置了数据接口,接口返回的数据通过此变量传入debugger; // 可以浏览器中断点调试\n\n// 查看原始数据\nconsole.log(config)\n\n// 返回新的结果 \nreturn {}
\n "},{label:"Chart 配置完全替换?",labelRemark:{trigger:"click",className:"m-l-xs",rootClose:!0,content:"默认为追加模式,新的配置会跟旧的配置合并,如果勾选将直接完全覆盖。",placement:"left"},name:"replaceChartOption",type:"switch",mode:"inline",className:"block"}]},{title:"外观",body:[(0,s.getSchemaTpl)("className")]},{title:"显隐",body:[(0,s.getSchemaTpl)("visible")]},{title:"其他",body:[(0,s.getSchemaTpl)("name")]}])]},t}return a.__extends(t,e),t.prototype.editDrillDown=function(e){var t=this.manager,n=t.store,r=n.getNodeById(e),o=n.getValueOf(e),i=o.clickAction&&o.clickAction.dialog||{title:"标题",body:["${value|json}
hello, world!
hello, world!
\n
当开启数据映射时,弹框中的数据只会包含设置的部分,请绑定数据。如:{"a": "\\${a}", "b": 2}
如果希望在默认的基础上定制,请先添加一个 Key 为 `&` Value 为 `\\$$` 作为第一行。
__undefined
时,表示删除对应的字段,可以结合{"&": "\\$$"}
来达到黑名单效果。当开启数据映射时,弹框中的数据只会包含设置的部分,请绑定数据。如:{"a": "\\${a}", "b": 2}
如果希望在默认的基础上定制,请先添加一个 Key 为 `&` Value 为 `\\$$` 作为第一行。
__undefined
时,表示删除对应的字段,可以结合{"&": "\\$$"}
来达到黑名单效果。source
拉取选项,只要有返回结果,就可以无限级别增加",t.docLink="/amis/zh-CN/components/form/chain-select",t.tags=["表单项"],t.scaffold={type:"chained-select",label:"级联选择",name:"chained-select"},t.previewSchema={type:"form",className:"text-left",wrapWithPanel:!1,mode:"horizontal",body:a.__assign({},t.scaffold)},t.panelTitle="级联选择",t.panelBody=[(0,i.getSchemaTpl)("switchDefaultValue"),{type:"input-text",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"',description:"请填入选项 Options 中 value 值"},(0,i.getSchemaTpl)("api",{name:"source",label:"获取选项接口",description:"value
当前值level
拉取级别,从 1
开始。parentId
上一层选中的 value
值parent
上一层选中选项,包含 label
和 value
的值。options
配置多个勾选框,也可以通过source
拉取选项",t.docLink="/amis/zh-CN/components/form/checkboxes",t.tags=["表单项"],t.scaffold={type:"checkboxes",label:"复选框",name:"checkboxes",options:[{label:"选项A",value:"A"},{label:"选项B",value:"B"}]},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({value:"A"},t.scaffold)]},t.panelTitle="复选框",t.panelBody=[(0,r.getSchemaTpl)("tabs",[{title:"常规",body:[(0,r.getSchemaTpl)("switchDefaultValue",{visibleOn:"!this.defaultCheckAll"}),{type:"checkboxes",name:"value",label:"默认值",source:"${options}",visibleOn:'typeof this.value !== "undefined"',multiple:!0},(0,r.getSchemaTpl)("fieldSet",{title:"选项",body:[(0,r.getSchemaTpl)("options"),(0,r.getSchemaTpl)("source"),{name:"checkAll",label:"是否开启全选功能",type:"switch",mode:"inline",className:"w-full"},{name:"defaultCheckAll",label:"是否默认全选",type:"switch",mode:"inline",className:"w-full",description:"勾选后,默认值的配置将无效。",onChange:function(e,t,n,a){return e&&a.setValueByName("value",void 0)}},(0,r.getSchemaTpl)("joinValues",{visibleOn:!0}),(0,r.getSchemaTpl)("delimiter",{hiddenOn:"data.joinValues === false"}),(0,r.getSchemaTpl)("extractValue"),(0,r.getSchemaTpl)("autoFill"),(0,r.getSchemaTpl)("creatable"),(0,r.getSchemaTpl)("createBtnLabel"),(0,r.getSchemaTpl)("api",{label:"新增选项接口",name:"addApi"}),(0,r.getSchemaTpl)("editable"),(0,r.getSchemaTpl)("api",{label:"编辑选项接口",name:"editApi"}),(0,r.getSchemaTpl)("removable"),(0,r.getSchemaTpl)("api",{label:"删除选项接口",name:"deleteApi"})]})]},{title:"外观",body:[{label:"选项在一行显示",name:"inline",type:"switch",visibleOn:'data.mode != "inline"',mode:"inline",className:"w-full",pipeIn:(0,r.defaultValue)(!0)},{label:"每行显示多少列",name:"columnsCount",hiddenOn:'typeof data.inline === "undefined" || data.inline === true',type:"input-range",min:1,max:6,pipeIn:(0,r.defaultValue)(1)},(0,r.getSchemaTpl)("className",{label:"单个 Checkbox 的 CSS 类名",name:"itemClassName"})]}])],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.CheckboxesControlPlugin=i,(0,o.registerEditorPlugin)(i)},4635:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CodeEditorControlPlugin=void 0;var a=n(752),r=n(5322),o=n(9547),i=n(9756),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="editor",t.$schema="/schemas/EditorControlSchema.json",t.name="代码编辑器",t.isBaseComponent=!0,t.icon="fa fa-code",t.description="代码编辑器,采用 monaco-editor 支持:".concat(r.availableLanguages.slice(0,10).join(","),"等等"),t.docLink="/amis/zh-CN/components/form/editor",t.tags=["表单项"],t.scaffold={type:"editor",label:"代码编辑器",name:"editor"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign(a.__assign({},t.scaffold),{value:'console.log("Hello world.");'})]},t.panelTitle="Editor",t.panelBody=[{label:"语言",name:"language",type:"select",value:"javascript",searchable:!0,options:r.availableLanguages.concat()},{name:"size",type:"button-group-select",size:"xs",pipeIn:(0,o.defaultValue)(""),label:"控件大小",options:[{label:"默认",value:""},{label:"中",value:"md"},{label:"大",value:"lg"},{label:"加大",value:"xl"},{label:"加加大",value:"xxl"}]}],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.CodeEditorControlPlugin=l,(0,i.registerEditorPlugin)(l)},7452:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ComboControlPlugin=void 0;var a=n(752),r=n(1502),o=n(9756),i=n(9933),l=n(9547),s=a.__importDefault(n(6689)),u=n(3570),d=n(3570),c=n(6374),p=n(3893),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="combo",t.$schema="/schemas/ComboControlSchema.json",t.name="组合输入",t.isBaseComponent=!0,t.icon="fa fa-group",t.description="多个表单项的组合,可配置是否增加和删除初始设定的模板",t.docLink="/amis/zh-CN/components/form/combo",t.tags=["表单项"],t.scaffold={type:"combo",label:"组合输入",name:"combo",multiple:!0,items:[{type:"input-text",name:"input-text",placeholder:"文本"},{type:"select",name:"select",placeholder:"选项",options:[{label:"A",value:"a"},{label:"B",value:"b"}]}]},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign(a.__assign({},t.scaffold),{value:[{text:"Row 1",select:"a"},{}]})]},t.panelTitle="组合输入",t.panelBodyCreator=function(e){return[{name:"conditions",type:"button-group-select",size:"sm",mode:"inline",className:"block",options:[{label:"固定成员类型",value:"1"},{label:"多分支",value:"2"}],pipeIn:function(e){return e?"2":"1"},pipeOut:function(e){return 2==e?[{label:"类型名称",test:"",items:[{type:"input-text",label:"文本",name:"text"}],scaffold:{}}]:void 0}},{name:"conditions",visibleOn:"this.conditions",type:"combo",label:"分支管理",multiple:!0,multiLine:!0,minLength:1,items:[{label:"名称",name:"label",type:"input-text",required:!0},{label:"命中条件",name:"test",required:!0,type:"input-text",placeholder:'比如: this.type === "text"',description:"根据成员数据判断是否使用此分支"},{name:"items",asFormItem:!0,children:function(e){var n=e.value,a=e.onChange;return s.default.createElement(r.Button,{size:"sm",level:"danger",className:"m-b",block:!0,onClick:function(){return t.manager.openSubEditor({title:"配置子表单项",value:n,slot:{type:"form",mode:"normal",body:"$$",wrapWithPanel:!1,className:"wrapper"},onChange:a})}},"配置子表单集合")}},{type:"textarea",name:"scaffold",required:!0,label:"新增初始值",pipeOut:l.valuePipeOut}],scaffold:{label:"类型名称",test:"",items:[{type:"input-text",label:"文本",name:"text"}],scaffold:{}}},{name:"typeSwitchable",visibleOn:"this.conditions",label:"是否可切换类型",type:"switch",mode:"inline",className:"block",pipeIn:(0,l.defaultValue)(!0)},{name:"items",visibleOn:"!this.conditions",asFormItem:!0,children:function(e){var n=e.value,a=e.onChange;return s.default.createElement(r.Button,{size:"sm",level:"danger",className:"m-b",block:!0,onClick:function(){t.manager.openSubEditor({title:"配置子表单集合",value:n,slot:{type:"form",mode:"normal",body:"$$",wrapWithPanel:!1,className:"wrapper"},onChange:function(e){return a(e)}})}},"配置子表单集合")}},(0,l.getSchemaTpl)("switchDefaultValue",{visibleOn:"!this.defaultCheckAll"}),{type:"textarea",name:"value",label:"默认值",pipeOut:l.valuePipeOut,visibleOn:'typeof this.value !== "undefined"'},{label:"多行模式",name:"multiLine",type:"switch",mode:"inline",className:"w-full",value:!1,option:"即是否要换行"},(0,l.getSchemaTpl)("multiple"),(0,l.getSchemaTpl)("joinValues"),(0,l.getSchemaTpl)("delimiter"),{type:"switch",name:"flat",mode:"inline",className:"w-full",label:"是否将值打平",visibleOn:"Array.isArray(data.items) && data.items.length === 1 && data.multiple",description:"默认数组内的数据结构为对象,如果只有一个表单项,可以配置将值打平,那么数组内放置的就是那个表单项的值"},{label:"是否可新增",type:"switch",name:"addable",mode:"inline",className:"w-full",visibleOn:"this.multiple",pipeIn:(0,l.defaultValue)(!0)},{type:"textarea",name:"scaffold",label:"新增初始值",visibleOn:"this.multiple && this.addable !== false",pipeOut:l.valuePipeOut,pipeIn:(0,l.defaultValue)({})},{label:"新增按钮文字",name:"addButtonText",type:"input-text",visibleOn:"data.addable",pipeIn:(0,l.defaultValue)("新增")},{label:"是否可删除",type:"switch",name:"removable",mode:"inline",className:"w-full",visibleOn:"this.multiple",pipeIn:(0,l.defaultValue)(!0)},(0,l.getSchemaTpl)("api",{name:"deleteApi",label:"删除前的请求",hiddenOn:"!data.removable"}),{label:"删除确认提示",name:"deleteConfirmText",type:"input-text",visibleOn:"data.deleteApi",pipeIn:(0,l.defaultValue)("确认要删除")},{name:"draggable",label:"是否可拖拽排序",type:"switch",visibleOn:"this.multiple",mode:"inline",className:"w-full"},{label:"拖拽排序的提示文字",name:"draggableTip",type:"input-text",visibleOn:"data.draggable",pipeIn:(0,l.defaultValue)("可通过拖动每行中的【交换】按钮进行顺序调整")},{name:"noBorder",label:"去掉边框",type:"switch",visibleOn:"this.multiLine",mode:"inline",className:"w-full"},{name:"minLength",type:"input-number",label:"限制最小数量"},{name:"maxLength",type:"input-number",label:"限制最大数量"},{label:"默认消息提示",type:"combo",name:"messages",multiLine:!0,description:"",items:[{label:"有子表单项限制失败时提示",type:"input-text",name:"validateFailed"},{label:"最小长度验证失败时提示",type:"input-text",name:"minLengthValidateFailed"},{label:"最大长度验证失败时提示",type:"input-text",name:"maxLengthValidateFailed"}]},{name:"canAccessSuperData",label:"是否自动填充父级同名变量",type:"switch",pipeIn:(0,l.defaultValue)(!1),mode:"inline",className:"w-full"},{name:"tabsMode",label:"采用 Tabs 展示方式",type:"switch",mode:"inline",className:"w-full",pipeIn:(0,l.defaultValue)(!1)},{name:"tabsStyle",label:"Tabs 的展示模式",visibleOn:"data.tabsMode",type:"list-select",options:[{label:"正常",value:"normal"},{label:"水平",value:"horizontal"},{label:"内联",value:"inline"}],mode:"inline",className:"w-full"},{name:"tabsLabelTpl",label:"选项卡标题的生成模板",visibleOn:"data.tabsMode",type:"input-text",mode:"inline",className:"w-full"},{name:"lazyLoad",label:"懒加载",type:"switch",mode:"inline",className:"w-full",pipeIn:(0,l.defaultValue)(!1),description:"如果数据比较多,比较卡顿时,可开启此配置项"},{name:"strictMode",label:"严格模式",type:"switch",mode:"inline",className:"w-full",pipeIn:(0,l.defaultValue)(!0),description:"如果你希望环境变量的值实时透传到 Combo 中,请关闭此选项。"},{name:"syncFields",visibleOn:"!data.strictMode",label:"配置同步字段",type:"input-text",multiple:!0,joinValues:!1,extractValue:!0,description:"如果 Combo 层级比较深,底层的获取外层的数据可能不同步。但是给 combo 配置这个属性就能同步下来。"},{name:"nullable",label:"允许为空",type:"switch",mode:"inline",className:"w-full",pipeIn:(0,l.defaultValue)(!1),description:"如果子表单项里面配置验证器,且又是单条模式。可以允许用户选择清空(不填)。"},{name:"items",label:"各列 CSS 配置",hiddenOn:"this.multiLine",type:"combo",addable:!1,removable:!1,multiple:!0,items:[{name:"columnClassName",placeholder:"CSS 类名",type:"input-text"}]},(0,l.getSchemaTpl)("subFormItemMode",{visibleOn:"this.multiLine"}),(0,l.getSchemaTpl)("subFormHorizontalMode"),(0,l.getSchemaTpl)("subFormHorizontal")]},t}return a.__extends(t,e),t.prototype.filterProps=function(e){if((e=(0,d.JSONPipeOut)(e)).multiple&&!e.value&&!e.$ref){var t={};Array.isArray(e.items)&&e.items.forEach((function(e){e.name&&(0,p.setVariable)(t,e.name,(0,c.mockValue)(e))})),e.value=[t]}return e},t.prototype.buildEditorToolbar=function(e,t){var n=e.id,a=e.info,r=e.schema;"combo"!==a.renderer.name||Array.isArray(r.conditions)||t.push({icon:"fa fa-expand",order:100,tooltip:"配置子表单项",onClick:this.editDetail.bind(this,n)})},t.prototype.buildEditorContextMenu=function(e,t){var n=e.id,a=e.schema;e.region,"combo"!==e.info.renderer.name||Array.isArray(a.conditions)||t.push("|",{label:"配置成员渲染器",onSelect:this.editDetail.bind(this,n)})},t.prototype.editDetail=function(e){var t=this.manager,n=t.store,r=n.getNodeById(e),o=n.getValueOf(e);r&&o&&this.manager.openSubEditor({title:"配置子表单项",value:o.items,slot:{type:"form",mode:"normal",body:"$$",wrapWithPanel:!1,className:"wrapper"},onChange:function(e){e=a.__assign(a.__assign({},o),{items:e}),t.panelChangeValue(e,(0,u.diff)(o,e))}})},t}(i.BasePlugin);t.ComboControlPlugin=f,(0,o.registerEditorPlugin)(f)},2888:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ConditionBilderPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=a.__importStar(n(6372)),s=n(6517),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="condition-builder",t.$schema="/schemas/ConditionBuilderControlSchema.json",t.name="条件组件",t.isBaseComponent=!0,t.icon="fa fa-group",t.description="用于设置复杂组合条件,支持添加条件,添加分组,设置组合方式,拖拽排序等功能。",t.docLink="/amis/zh-CN/components/form/condition-builder",t.tags=["表单项"],t.scaffold={type:"condition-builder",label:"条件组件",name:"conditions",description:"适合让用户自己拼查询条件,然后后端根据数据生成 query where",fields:[{label:"文本",type:"text",name:"text"},{label:"数字",type:"number",name:"number"},{label:"布尔",type:"boolean",name:"boolean"},{label:"选项",type:"select",name:"select",options:[{label:"A",value:"a"},{label:"B",value:"b"},{label:"C",value:"c"},{label:"D",value:"d"},{label:"E",value:"e"}]},{label:"日期",type:"date",name:"date"},{label:"时间",type:"time",name:"time"},{label:"日期时间",type:"datetime",name:"datetime"}]},t.scaffoldForm={title:"快速开始-条件组合",body:[{type:"combo",name:"fields",multiple:!0,draggable:!0,multiLine:!0,items:[{type:"group",body:[{type:"select",name:"type",placeholder:"条件类型",options:[{label:"文本",value:"text"},{label:"数字",value:"number"},{label:"布尔",value:"boolean"},{label:"日期",value:"date"},{label:"日期时间",value:"datetime"},{label:"时间",value:"time"},{label:"选项",value:"select"}]},{type:"input-text",name:"name",placeholder:"字段名"},{type:"input-text",placeholder:"字段名称",name:"label"}]},{type:"group",visibleOn:'data.type === "number"',body:[{type:"input-number",name:"minimum",placeholder:"最小值"},{type:"input-number",name:"maximum",placeholder:"最大值"},{type:"input-number",name:"step",min:0,placeholder:"步长"}]},{type:"group",visibleOn:'!!~["date", "datetime", "time"].indexOf(data.type)',body:[{type:"input-text",name:"format",placeholder:"值格式"},{type:"input-text",name:"inputFormat",placeholder:"日期显示格式"},{type:"input-text",name:"timeFormat",placeholder:"时间显示格式",visibleOn:'data.type === "datetime"'}]},{type:"group",visibleOn:'data.type === "select"',body:[{type:"input-text",name:"source",placeholder:"字段选项远程拉取,支持接口或数据映射"}]},{type:"group",body:[{type:"input-text",placeholder:"占位符",name:"placeholder"},{name:"operators",placeholder:"操作符",asFormItem:!0,children:function(e){var t,n,a=e.data,r=e.render,o=e.onChange;return r("operations",{type:"select",name:"operators",multiple:!0,value:a.value||(null===(t=l.default.types[a.type])||void 0===t?void 0:t.operators)||[],joinValues:!1,extractValue:!0,options:null===(n=l.default.types[a.type])||void 0===n?void 0:n.operators.map((function(e){return(0,s.isObject)(e)&&e.label&&e.value?{label:e.label,value:e.value}||[]:(0,s.isString)(e)&&{label:l.OperationMap[e],value:e}||[]}))},{onChange:function(e){return o(e)}})}}]}]}],canRebuild:!0},t.previewSchema={type:"form",mode:"horizontal",wrapWithPanel:!1,body:[t.scaffold]},t.panelTitle="条件组件",t.panelBodyCreator=function(e){return[(0,i.getSchemaTpl)("source")]},t}return a.__extends(t,e),t.prototype.buildSubRenderers=function(e,t){var n=this;if(n.name&&n.description)return{name:n.name,icon:n.icon,description:n.description,previewSchema:n.previewSchema,tags:n.tags,docLink:n.docLink,type:n.type,scaffold:n.scaffold,scaffoldForm:this.scaffoldForm,disabledRendererPlugin:n.disabledRendererPlugin,isBaseComponent:n.isBaseComponent,rendererName:n.rendererName}},t}(o.BasePlugin);t.ConditionBilderPlugin=u,(0,r.registerEditorPlugin)(u)},8322:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ControlPlugin=void 0;var a=n(752),r=a.__importDefault(n(6689)),o=n(1502),i=n(9547),l=n(9756),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="control",t.$schema="/schemas/FormControlSchema.json",t.name="表单项容器",t.isBaseComponent=!0,t.icon="fa fa-object-group",t.description="表单项容器",t.docLink="/amis/zh-CN/components/form/group",t.tags=["容器"],t.scaffold={type:"control",label:"表单项容器",body:[{type:"tpl",tpl:"a"}]},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.regions=[{key:"body",label:"元素集合",preferTag:"展示"}],t.panelTitle="表单项容器",t.panelBody=[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[{children:r.default.createElement(o.Button,{className:"m-b",onClick:function(){return t.manager.showRendererPanel("表单项")},level:"danger",tooltip:"插入一个新的元素",size:"sm",block:!0},"新增元素")},(0,i.getSchemaTpl)("description"),(0,i.getSchemaTpl)("placeholder"),(0,i.getSchemaTpl)("remark"),(0,i.getSchemaTpl)("labelRemark")]},{title:"外观",body:[(0,i.getSchemaTpl)("formItemMode"),(0,i.getSchemaTpl)("horizontalMode"),(0,i.getSchemaTpl)("horizontal",{label:"",visibleOn:'data.mode == "horizontal" && data.label !== false && data.horizontal'}),(0,i.getSchemaTpl)("formItemInline"),(0,i.getSchemaTpl)("className"),(0,i.getSchemaTpl)("className",{label:"Label CSS 类名",name:"labelClassName"}),(0,i.getSchemaTpl)("className",{label:"控件 CSS 类名",name:"inputClassName"}),(0,i.getSchemaTpl)("className",{label:"描述 CSS 类名",name:"descriptionClassName",visibleOn:"this.description"})]},{title:"显隐",body:[(0,i.getSchemaTpl)("disabled"),(0,i.getSchemaTpl)("visible"),{type:"switch",name:"clearValueOnHidden",label:"隐藏时删除表单项值",mode:"inline",className:"w-full"}]},{title:"验证",body:[(0,i.getSchemaTpl)("validations"),(0,i.getSchemaTpl)("validationErrors"),(0,i.getSchemaTpl)("validateOnChange"),(0,i.getSchemaTpl)("submitOnChange")]}])],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.ControlPlugin=s,(0,l.registerEditorPlugin)(s)},5561:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DiffEditorControlPlugin=void 0;var a=n(752),r=n(5322),o=n(9547),i=n(9756),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="diff-editor",t.$schema="/schemas/DiffEditorControlSchema.json",t.name="Diff编辑器",t.isBaseComponent=!0,t.icon="fa fa-columns",t.description="左右两边的代码做对比,支持的语言包括:".concat(r.availableLanguages.slice(0,10).join(","),"等等"),t.docLink="/amis/zh-CN/components/form/diff-editor",t.tags=["表单项"],t.scaffold={type:"diff-editor",label:"diff编辑器",name:"diff"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign(a.__assign({},t.scaffold),{value:"Hello World\nLine 1\nNew line\nBla Bla",diffValue:"Hello World\nLine 2"})]},t.panelTitle="Diff编辑器",t.panelBody=[{type:"textarea",name:"diffValue",label:"左侧值",pipeOut:o.valuePipeOut,description:"支持使用 \\${xxx}
来获取变量"},(0,o.getSchemaTpl)("switchDefaultValue",{label:"设置右侧默认值"}),{type:"textarea",name:"value",label:"右侧默认值",pipeOut:o.valuePipeOut,visibleOn:'typeof this.value !== "undefined"'},{label:"语言",name:"language",type:"select",value:"javascript",searchable:!0,options:r.availableLanguages.concat()},{name:"size",type:"button-group-select",size:"sm",pipeIn:(0,o.defaultValue)(""),className:"w-full",label:"控件尺寸",options:[{label:"默认",value:""},{label:"中",value:"md"},{label:"大",value:"lg"},{label:"加大",value:"xl"},{label:"再加大",value:"xxl"}]}],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.DiffEditorControlPlugin=l,(0,i.registerEditorPlugin)(l)},4624:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FieldSetControlPlugin=void 0;var a=n(752),r=n(1502),o=a.__importDefault(n(6689)),i=n(9547),l=n(9756),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="fieldset",t.$schema="/schemas/FieldSetControlSchema.json",t.disabledRendererPlugin=!0,t.name="字段集",t.isBaseComponent=!0,t.icon="fa fa-toggle-down",t.description="多个表单项的组合,可配置是否折叠",t.docLink="/amis/zh-CN/components/form/fieldset",t.tags=["表单项"],t.scaffold={type:"fieldset",title:"标题",collapsable:!0,body:[{type:"input-text",label:"文本1",name:"text"},{type:"input-text",label:"文本2",name:"text"}]},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.regions=[{key:"body",label:"子表单项",renderMethod:"renderBody",insertPosition:"inner",preferTag:"表单项"}],t.panelTitle="字段集",t.panelBodyCreator=function(e){return[{label:"标题",name:"title",type:"input-text"},{name:"collapsable",label:"是否可折叠",type:"switch",mode:"inline",className:"w-full",pipeIn:(0,i.defaultValue)(!1)},{name:"collapsed",label:"默认是否折叠",type:"switch",mode:"inline",visibleOn:"this.collapsable",className:"w-full"},{name:"className",type:"button-group-select",clearable:!0,size:"sm",label:"控件样式",className:"w-full",pipeIn:(0,i.defaultValue)(""),options:[{label:"默认",value:""},{value:"Collapse--xs",label:"极小"},{value:"Collapse--sm",label:"小"},{value:"Collapse--base",label:"正常"},{value:"Collapse--md",label:"大"},{value:"Collapse--lg",label:"超大"}]},(0,i.getSchemaTpl)("className",{name:"headingClassName",label:"标题 CSS 类名"}),(0,i.getSchemaTpl)("className",{name:"bodyClassName",label:"内容区域 CSS 类名"}),{children:o.default.createElement(r.Button,{level:"info",size:"sm",className:"m-b-sm",block:!0,onClick:function(){t.manager.showRendererPanel("表单项","请从左侧组件面板中点击添加子表单项")}},"添加子表单项")},(0,i.getSchemaTpl)("subFormItemMode"),(0,i.getSchemaTpl)("subFormHorizontalMode"),(0,i.getSchemaTpl)("subFormHorizontal")]},t}return a.__extends(t,e),t.prototype.filterProps=function(e){return e.collapsed=!1,e},t}(n(9933).BasePlugin);t.FieldSetControlPlugin=s,(0,l.registerEditorPlugin)(s)},1506:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FormPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=n(3893),s=[{name:"type",label:"控件类型",type:"select",required:!0,options:[{label:"单行文本框",value:"input-text"},{label:"多行文本",value:"textarea"},{label:"分组",value:"group"},{label:"数字输入",value:"input-number"},{label:"单选框",value:"radios"},{label:"勾选框",value:"checkbox"},{label:"复选框",value:"checkboxes"},{label:"下拉框",value:"select"},{label:"开关",value:"switch"},{label:"日期",value:"input-date"},{label:"表格",value:"input-table"},{label:"文件上传",value:"input-file"},{label:"图片上传",value:"input-image"},{label:"富文本编辑器",value:"input-rich-text"}]},{name:"label",label:"显示名称",type:"input-text",hiddenOn:'data.type === "group"'},{name:"name",label:"提交字段名",required:!0,type:"input-text",hiddenOn:'data.type === "group"'}],u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="form",t.$schema="/schemas/FormSchema.json",t.order=-999,t.name="表单",t.isBaseComponent=!0,t.description="可用于新建、编辑或者展示数据,配置初始化接口可从远端加载数据,配置提交接口可将数据发送远端。另外也可以将数据提交给其他组件,与其他组件通信。",t.docLink="/amis/zh-CN/components/form/index",t.tags=["功能"],t.icon="fa fa-list-alt",t.scaffold={type:"form",title:"表单",body:[{label:"文本框",type:"input-text",name:"text"}]},t.previewSchema={type:"form",panelClassName:"Panel--default text-left m-b-none",mode:"horizontal",body:[{label:"文本",name:"a",type:"input-text"}]},t.scaffoldForm={title:"快速创建表单",body:[(0,i.getSchemaTpl)("api",{label:"提交地址"}),{name:"mode",label:"文字与输入框展示模式",type:"button-group-select",pipeIn:(0,i.defaultValue)("normal",!1),options:[{label:"上下",value:"normal"},{label:"左右摆放",value:"horizontal"},{label:"内联",value:"inline"}]},{label:"表单控件",type:"combo",name:"body",multiple:!0,draggable:!0,multiLine:!1,items:a.__spreadArray(a.__spreadArray([],s,!0),[{visibleOn:'data.type === "group"',type:"combo",name:"body",label:"分组内的控件",multiple:!0,draggable:!0,multiLine:!0,items:a.__spreadArray([],s,!0)}],!1)}]},t.regions=[{key:"body",label:"表单集合",matchRegion:function(e){return!!(null==e?void 0:e.props.noValidate)},renderMethod:"renderBody",preferTag:"表单项"},{label:"按钮组",key:"actions",preferTag:"按钮"}],t.panelTitle="表单",t.panelBodyCreator=function(e){var t=/\/crud\/filter\/form$/.test(e.path),n=/(?:\/|^)dialog\/.+$/.test(e.path);return[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[{name:"title",type:"input-text",label:"标题",visibleOn:"this.wrapWithPanel !== false"},{name:"submitText",type:"input-text",label:"提交按钮名称",pipeIn:(0,i.defaultValue)("提交"),visibleOn:"this.wrapWithPanel !== false && !this.actions && (!Array.isArray(this.body) || !this.body.some(function(item) {return !!~['submit','button','reset','button-group'].indexOf(item.type);}))",description:"当没有自定义按钮时有效。"},{name:"autoFocus",type:"switch",label:"自动聚焦",mode:"inline",className:"block",labelRemark:{className:"m-l-xs",trigger:"click",rootClose:!0,content:"设置后将让表单的第一个可输入的表单项获得焦点",placement:"left"}},(0,i.getSchemaTpl)("submitOnChange"),{label:"提交完后重置表单",type:"switch",name:"resetAfterSubmit",mode:"inline",className:"block",labelRemark:{className:"m-l-xs",trigger:"click",rootClose:!0,content:"即表单提交完后,让所有表单项的值还原成初始值",placement:"left"}},t?null:{label:"初始化后提交一次",type:"switch",name:"submitOnInit",mode:"inline",className:"block",labelRemark:{className:"m-l-xs",trigger:"click",rootClose:!0,content:"开启后,表单初始完成便会触发一次提交。",placement:"left"}},n?{label:"提交后是否关闭对话框",type:"switch",name:"closeDialogOnSubmit",mode:"inline",className:"block",pipeIn:function(e){return!1!==e}}:null,t?null:{label:"提交给其他组件",name:"target",type:"input-text",description:"可以通过设置此属性,把当前表单的值提交给目标组件,而不是自己来通过接口保存,请填写目标组件的 name
属性,多个组件请用逗号隔开。当 target
为 window
时,则把表单数据附属到地址栏。"},(0,i.getSchemaTpl)("reload",{test:!t}),t?null:{label:"跳转",name:"redirect",type:"input-text",description:"当设置此值后,表单提交完后跳转到目标地址。"},{name:"canAccessSuperData",label:"是否自动填充父级同名变量",type:"switch",pipeIn:(0,i.defaultValue)(!0),mode:"inline",className:"block"},{name:"persistData",label:"是否开启本地缓存",type:"switch",pipeIn:(0,i.defaultValue)(!1),mode:"inline",className:"block",labelRemark:{className:"m-l-xs",trigger:"click",rootClose:!0,content:"开启后,表单的数据会缓存在浏览器中,切换页面或关闭弹框不会清空当前表单内的数据",placement:"left"}},{name:"clearPersistDataAfterSubmit",label:"提交成功后清空本地缓存",type:"switch",pipeIn:(0,i.defaultValue)(!1),mode:"inline",className:"block",visibleOn:"data.persistData",labelRemark:{className:"m-l-xs",trigger:"click",rootClose:!0,content:"开启本地缓存并开启本配置项后,表单提交成功后,会自动清除浏览器中当前表单的缓存数据",placement:"left"}},{name:"rules",label:"表单组合校验",type:"combo",multiple:!0,multiLine:!0,items:[{name:"rule",label:"校验规则",type:"input-text"},{name:"message",label:"报错提示",type:"input-text"}]}]},t?null:{title:"接口",body:[(0,i.getSchemaTpl)("api",{label:"保存接口",description:"用来保存表单数据",sampleBuilder:function(e){return'{\n "status": 0,\n "msg": "",\n\n // 可以不返回,如果返回了数据将被 merge 进来。\n data: {}\n }'}}),{label:"采用异步方式?",remark:{trigger:"click",rootClose:!0,title:"什么是异步方式?",content:"异步方式主要用来解决请求超时问题,启用异步方式后,程序会在请求完后,定时轮询请求额外的接口用来咨询操作是否完成。所以接口可以快速的返回,而不需要等待流程真正完成。",placement:"left"},type:"switch",name:"asyncApi",visibleOn:"data.api",pipeIn:function(e){return null!=e},pipeOut:function(e){return e?"":void 0},mode:"inline",className:"block"},(0,i.getSchemaTpl)("api",{name:"asyncApi",label:"异步检测接口",visibleOn:"data.asyncApi != null",description:"设置此属性后,表单提交发送保存接口后,还会继续轮训请求该接口,直到返回 finished 属性为 true 才 结束"}),{type:"divider"},(0,i.getSchemaTpl)("api",{name:"initApi",label:"初始化接口",description:"用来初始化表单数据",sampleBuilder:function(e){var t={};return Array.isArray(e.body)&&e.body.forEach((function(e){e.name&&!~["combo","input-array","form"].indexOf(e.type)&&(0,l.setVariable)(t,e.name,"sample")})),JSON.stringify({status:0,msg:"",data:t},null,2)}}),{label:"开启定时刷新",type:"switch",name:"interval",visibleOn:"data.initApi",pipeIn:function(e){return!!e},pipeOut:function(e){return e?3e3:void 0},mode:"inline"},{name:"interval",type:"input-number",visibleOn:"data.interval",step:500,className:"m-t-n-sm",description:"设置后将自动定时刷新,单位 ms"},{name:"silentPolling",label:"静默刷新",type:"switch",mode:"inline",visibleOn:"!!data.interval",description:"设置自动定时刷新时是否显示loading"},{name:"stopAutoRefreshWhen",label:"停止定时刷新检测表达式",type:"input-text",visibleOn:"!!data.interval",description:"定时刷新一旦设置会一直刷新,除非给出表达式,条件满足后则不刷新了。"},{label:"采用异步方式?",remark:{trigger:"click",rootClose:!0,title:"什么是异步方式?",content:"异步方式主要用来解决请求超时问题,启用异步方式后,程序会在请求完后,定时轮询请求额外的接口用来咨询操作是否完成。所以接口可以快速的返回,而不需要等待流程真正完成。",placement:"left"},type:"switch",name:"initAsyncApi",visibleOn:"data.initApi",pipeIn:function(e){return null!=e},pipeOut:function(e){return e?"":void 0},mode:"inline"},(0,i.getSchemaTpl)("api",{name:"initAsyncApi",label:"异步检测接口",visibleOn:"data.initAsyncApi != null",description:"设置此属性后,表单请求 initApi 后,还会继续轮训请求该接口,直到返回 finished 属性为 true 才 结束"}),{type:"divider"},t?{name:"messages",pipeIn:(0,i.defaultValue)({fetchFailed:"初始化失败"}),label:"默认消息信息",type:"combo",multiLine:!0,description:"可以不设置,接口返回的 msg 字段,优先级更高",items:[{label:"获取成功提示",name:"fetchSuccess",type:"input-text"},{label:"获取失败提示",name:"fetchFailed",type:"input-text"}]}:{name:"messages",pipeIn:(0,i.defaultValue)({fetchFailed:"初始化失败",saveSuccess:"保存成功",saveFailed:"保存失败"}),label:"默认消息提示",type:"combo",multiLine:!0,description:"可以不设置,接口返回的 msg 字段,优先级更高",items:[{label:"获取成功提示",name:"fetchSuccess",type:"input-text"},{label:"获取失败提示",name:"fetchFailed",type:"input-text"},{label:"保存成功提示",name:"saveSuccess",type:"input-text"},{label:"保存失败提示",name:"saveFailed",type:"input-text"},{label:"验证失败提示",name:"validateFailed",type:"input-text"}]}]},{title:"外观",body:[{name:"wrapWithPanel",type:"switch",mode:"inline",className:"block",label:"用 Panel 包裹",pipeIn:(0,i.defaultValue)(!0),labelRemark:{className:"m-l-xs",trigger:"click",rootClose:!0,content:"关闭后,表单只会展示表单项,标题和操作栏将不会显示。",placement:"left"}},{name:"mode",label:"展示模式",type:"button-group-select",size:"sm",pipeIn:(0,i.defaultValue)("normal",!1),options:[{label:"默认",value:"normal"},{label:"左右摆放",value:"horizontal"},{label:"内联",value:"inline"}]},(0,i.getSchemaTpl)("horizontal",{visibleOn:'this.mode == "horizontal"'}),(0,i.getSchemaTpl)("className"),(0,i.getSchemaTpl)("className",{name:"panelClassName",visibleOn:"this.wrapWithPanel !== false",label:"Panel 的 CSS 类名",description:"可以设置 Panel--info 之类的"})]},{title:"其他",body:[(0,i.getSchemaTpl)("ref"),(0,i.getSchemaTpl)("name",{test:!t}),{name:"debug",label:"开启调试",type:"switch",mode:"inline",labelRemark:"显示当前表单的数据在表单顶部"},(0,i.getSchemaTpl)("disabled"),(0,i.getSchemaTpl)("visible")]}])]},t}return a.__extends(t,e),t.prototype.afterUpdate=function(e){var t,n=e.context;"form"===n.info.renderer.name&&(null===(t=n.diff)||void 0===t?void 0:t.some((function(e){var t;return"wrapWithPanel"===(null===(t=e.path)||void 0===t?void 0:t.join("."))})))&&this.manager.buildPanels()},t}(o.BasePlugin);t.FormPlugin=u,(0,r.registerEditorPlugin)(u)},1808:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FormulaControlPlugin=void 0;var a=n(752),r=n(9547),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="formula",t.$schema="/schemas/FormulaControlSchema.json",t.name="公式",t.isBaseComponent=!0,t.icon="fa fa-calculator",t.description="通过公式计算指定的变量值,并将其结果作用到指定的变量中",t.docLink="/amis/zh-CN/components/form/formula",t.tags=["表单项"],t.scaffold={type:"formula",name:"formula"},t.previewSchema={type:"tpl",tpl:"计算公式"},t.panelTitle="公式",t.panelBody=[{label:"字段名",name:"name",type:"input-text",description:"公式计算结果会作用到此字段名对应的变量中。"},{type:"input-text",name:"value",label:"默认值"},{type:"input-text",name:"formula",label:"公式",description:"支持 JS 表达式,如: data.var_a + 2
,即当表单项 var_a
变化的时候,会自动给当前表单项设置为 var_a + 2
的值。若设置为字符串,则需要加引号"},{type:"input-text",name:"condition",label:"作用条件",description:'支持如:\\${xxx}
或者data.xxx == "a"
表达式来配置作用条件,当满足该作用条件时,会将计算结果设置到目标变量上。'},{name:"initSet",type:"switch",label:"是否初始应用",pipeIn:(0,r.defaultValue)(!0),description:"是否初始化的时候运行公式结果,并设置到目标变量上。",mode:"inline",className:"block"},{name:"autoSet",type:"switch",label:"是否自动应用",pipeIn:(0,r.defaultValue)(!0),mode:"inline",className:"block",description:"是否自动计算公式结果,有变化时自动设置到目标变量上。hex、hls、rgb、rgba
格式,默认为hex
格式",t.docLink="/amis/zh-CN/components/form/input-color",t.tags=["表单项"],t.scaffold={type:"input-color",label:"颜色",name:"color"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="颜色框",t.panelBody=[{label:"格式",name:"format",type:"button-group-select",size:"sm",value:"hex",options:["hex","hsl","rgb","rgba"],onChange:function(e,t,n,a){a.setValueByName("value",""),a.setValueByName("presetColors","")}},(0,r.getSchemaTpl)("switchDefaultValue"),t.getConditionalColorPanel("hex"),t.getConditionalColorPanel("hsl"),t.getConditionalColorPanel("rgb"),t.getConditionalColorPanel("rgba"),(0,r.getSchemaTpl)("switchDefaultValue",{name:"presetColors",label:"设置选择器中颜色默认值",description:"为空时不显示选择器中的默认值"}),t.getConditionalColorArray("hex"),t.getConditionalColorArray("hsl"),t.getConditionalColorArray("rgb"),t.getConditionalColorArray("rgba"),(0,r.getSchemaTpl)("clearable",{label:"显示清除按钮",pipeIn:(0,r.defaultValue)(!0)})],t}return a.__extends(t,e),t.prototype.getConditionalColorPanel=function(e){return{type:"input-color",name:"value",format:e,visibleOn:'typeof this.value !== "undefined" && this.format==="'.concat(e,'"'),label:"默认值"}},t.prototype.getConditionalColorArray=function(e){return{type:"input-array",name:"presetColors",label:"选择器中颜色默认值",addable:!0,removable:!0,visibleOn:'typeof this.presetColors !== "undefined" && this.format === "'.concat(e,'"'),items:{type:"input-color",format:e},value:["#D0021B","#F5A623","#F8E71C","#8B572A","#7ED321","#417505","#BD10E0","#9013FE","#4A90E2","#50E3C2","#B8E986","#000000","#4A4A4A","#9B9B9B","#FFFFFF"]}},t}(n(9933).BasePlugin);t.ColorControlPlugin=i,(0,o.registerEditorPlugin)(i)},4189:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateControlPlugin=void 0;var a=n(752),r=n(1502),o=n(9547),i=n(9756),l=n(9933),s=a.__importDefault(n(2245)),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-date",t.$schema="/schemas/DateControlSchema.json",t.order=-450,t.icon="fa fa-calendar",t.name="日期框",t.isBaseComponent=!0,t.description="年月日选择,支持相对值设定,如+2days
两天后",t.docLink="/amis/zh-CN/components/form/input-date",t.tags=["表单项"],t.scaffold={type:"input-date",label:"日期",name:"date"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="日期配置",t.panelBody=[(0,o.getSchemaTpl)("placeholder",{pipeIn:(0,o.defaultValue)("请选择日期")}),{type:"input-text",name:"format",label:"值格式",description:'请参考 moment 中的格式用法。',pipeIn:(0,o.defaultValue)("X"),onChange:function(e,t,n,a){a.setValueByName("value",""),a.setValueByName("minDate",""),a.setValueByName("maxDate","")}},(0,o.getSchemaTpl)("switchDefaultValue"),{type:"input-text",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"',placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法"},{type:"fieldSet",title:"使用固定值",collapsed:!0,collapsable:!0,className:"fieldset",visibleOn:'typeof this.value !== "undefined"',body:[{type:"input-date",name:"value",pipeIn:function(e){return(0,s.default)(r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e).format("X")},pipeOut:function(e,t,n){return(0,s.default)(parseInt(e,10),"X").format(n.format)}}]},(0,o.getSchemaTpl)("clearable",{pipeIn:(0,o.defaultValue)(!0)}),{type:"input-text",name:"minDate",label:"最小日期",placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法,同时支持变量如\\${start_date}
"},{type:"fieldSet",title:"使用固定值",collapsed:!0,collapsable:!0,className:"fieldset",body:[{type:"input-date",name:"minDate",pipeIn:function(e){return(0,s.default)(r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e).format("X")},pipeOut:function(e,t,n){return(0,s.default)(parseInt(e,10),"X").format(n.format)}}]},{type:"divider"},{type:"input-text",name:"maxDate",label:"最大日期",placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法,同时支持变量如\\${start_date}
"},{type:"fieldSet",title:"使用固定值",collapsed:!0,collapsable:!0,className:"fieldset",body:[{type:"input-date",name:"maxDate",pipeIn:function(e){return(0,s.default)(r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e).format("X")},pipeOut:function(e,t,n){return(0,s.default)(parseInt(e,10),"X").format(n.format)}}]}],t}return a.__extends(t,e),t}(l.BasePlugin);t.DateControlPlugin=u,(0,i.registerEditorPlugin)(u)},3751:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateRangeControlPlugin=void 0;var a=n(752),r=n(1502),o=n(9547),i=n(9756),l=n(9933),s=a.__importDefault(n(2245)),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-date-range",t.$schema="/schemas/DateRangeControlSchema.json",t.order=-440,t.icon="fa fa-calendar",t.name="日期范围",t.isBaseComponent=!0,t.description="日期范围选择,可通过minDate
、maxDate
设定最小、最大日期",t.docLink="/amis/zh-CN/components/form/input-date-range",t.tags=["表单项"],t.scaffold={type:"input-date-range",label:"日期范围",name:"date-range"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="日期范围",t.panelBody=[(0,o.getSchemaTpl)("placeholder",{pipeIn:(0,o.defaultValue)("请选择日期范围")}),{type:"input-text",name:"format",label:"值格式",description:'请参考 moment 中的格式用法。',pipeIn:(0,o.defaultValue)("X"),onChange:function(e,t,n,a){a.setValueByName("value",""),a.setValueByName("minDate",""),a.setValueByName("maxDate","")}},(0,o.getSchemaTpl)("switchDefaultValue"),{type:"input-text",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"',placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法,由于包含开始和结束时间,请用逗号隔开。"},{type:"fieldSet",title:"使用固定值",visibleOn:'typeof this.value !== "undefined"',collapsed:!0,collapsable:!0,className:"fieldset",body:[{type:"input-date-range",name:"value",pipeIn:function(e){return e?e.split(",").map((function(e){return(0,s.default)(r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e).format("X")})):""},pipeOut:function(e,t,n){var a=n.format;if(a){var r=e.split(",");e=r.map((function(e){return(0,s.default)(parseInt(e,10),"X").format(a)})).join(",")}return e}}]},(0,o.getSchemaTpl)("clearable",{pipeIn:(0,o.defaultValue)(!0)}),{type:"input-text",name:"minDate",label:"最小日期",placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法,同时支持变量如\\${start_date}
"},{type:"fieldSet",title:"使用固定值",collapsed:!0,collapsable:!0,className:"fieldset",body:[{type:"input-date",name:"minDate",pipeIn:function(e){return(0,s.default)(r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e).format("X")},pipeOut:function(e,t,n){return(0,s.default)(parseInt(e,10),"X").format(n.format)}}]},{type:"divider"},{type:"input-text",name:"maxDate",label:"最大日期",placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法,同时支持变量如\\${start_date}
"},{type:"fieldSet",title:"使用固定值",collapsed:!0,collapsable:!0,className:"fieldset",body:[{type:"input-date",name:"maxDate",pipeIn:function(e){return(0,s.default)(r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e).format("X")},pipeOut:function(e,t,n){return(0,s.default)(parseInt(e,10),"X").format(n.format)}}]},{type:"input-text",name:"minDuration",label:"限制最小跨度",description:"比如 2days"},{type:"input-text",name:"ranges",label:"日期范围快捷键",description:"比如 today, yesterday, 1dayago, 7daysago, 90daysago, prevweek, thismonth, prevmonth, prevquarter, thisquarter"},{type:"input-text",name:"maxDuration",label:"限制最大跨度",description:"比如 1year"},{name:"utc",label:"是否使用 UTC 时间",type:"switch",mode:"inline",className:"block"},{name:"embed",label:"是否内嵌模式",type:"switch",mode:"inline",className:"block"}],t}return a.__extends(t,e),t}(l.BasePlugin);t.DateRangeControlPlugin=u,(0,i.registerEditorPlugin)(u)},8107:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateTimeControlPlugin=void 0;var a=n(752),r=n(1502),o=n(9547),i=n(9756),l=n(9933),s=a.__importDefault(n(2245)),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-datetime",t.$schema="/schemas/DateTimeControlSchema.json",t.icon="fa fa-calendar",t.name="日期时间",t.isBaseComponent=!0,t.description="年月日时分选择",t.docLink="/amis/zh-CN/components/form/input-datetime",t.tags=["表单项"],t.scaffold={type:"input-datetime",label:"日期时间",name:"datetime"},t.previewSchema={type:"form",className:"text-left",wrapWithPanel:!1,mode:"horizontal",body:[a.__assign({},t.scaffold)]},t.panelTitle="日期时间",t.panelBody=[(0,o.getSchemaTpl)("placeholder",{pipeIn:(0,o.defaultValue)("请选择日期时间")}),{type:"input-text",name:"format",label:"值格式",description:'请参考 moment 中的格式用法。',pipeIn:(0,o.defaultValue)("X"),onChange:function(e,t,n,a){a.setValueByName("value",""),a.setValueByName("minDate",""),a.setValueByName("maxDate","")}},(0,o.getSchemaTpl)("switchDefaultValue"),{type:"input-text",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"',placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法"},{type:"fieldSet",title:"使用固定值",collapsed:!0,collapsable:!0,className:"fieldset",visibleOn:'typeof this.value !== "undefined"',body:[{type:"input-datetime",name:"value",pipeIn:function(e){return(0,s.default)(r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e).format("X")},pipeOut:function(e,t,n){return(0,s.default)(parseInt(e,10),"X").format(n.format)}}]},(0,o.getSchemaTpl)("clearable",{pipeIn:(0,o.defaultValue)(!0)}),{type:"input-text",name:"inputFormat",label:"显示格式",description:'请参考 moment 中的格式用法。',pipeIn:(0,o.defaultValue)("YYYY-MM-DD HH:mm")},{type:"input-text",name:"minDate",label:"最小日期",placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法,同时支持变量如\\${start_date}
"},{type:"fieldSet",title:"使用固定值",collapsed:!0,collapsable:!0,className:"fieldset",body:[{type:"input-date",name:"minDate",pipeIn:function(e){return(0,s.default)(r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e).format("X")},pipeOut:function(e,t,n){return(0,s.default)(parseInt(e,10),"X").format(n.format)}}]},{type:"divider"},{type:"input-text",name:"maxDate",label:"最大日期",placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法,同时支持变量如\\${start_date}
"},{type:"fieldSet",title:"使用固定值",collapsed:!0,collapsable:!0,className:"fieldset",body:[{type:"input-date",name:"maxDate",pipeIn:function(e){return(0,s.default)(r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e).format("X")},pipeOut:function(e,t,n){return(0,s.default)(parseInt(e,10),"X").format(n.format)}}]}],t}return a.__extends(t,e),t}(l.BasePlugin);t.DateTimeControlPlugin=u,(0,i.registerEditorPlugin)(u)},6083:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.DateTimeRangeControlPlugin=void 0;var a=n(752),r=n(1502),o=n(9547),i=n(9756),l=n(9933),s=a.__importDefault(n(2245)),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-datetime-range",t.$schema="/schemas/DateTimeRangeControlSchema.json",t.order=-440,t.icon="fa fa-calendar",t.name="日期时间范围",t.isBaseComponent=!0,t.description="日期时间范围选择,可通过minDate
、maxDate
设定最小、最大日期",t.docLink="/amis/zh-CN/components/form/input-datetime-range",t.tags=["表单项"],t.scaffold={type:"input-datetime-range",label:"日期时间范围",name:"input-datetime-range"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="日期时间范围",t.panelBody=[(0,o.getSchemaTpl)("placeholder",{pipeIn:(0,o.defaultValue)("请选择日期时间范围")}),{type:"input-text",name:"format",label:"值格式",description:'请参考 moment 中的格式用法。',pipeIn:(0,o.defaultValue)("X"),onChange:function(e,t,n,a){a.setValueByName("value",""),a.setValueByName("minDate",""),a.setValueByName("maxDate","")}},(0,o.getSchemaTpl)("switchDefaultValue"),{type:"input-text",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"',placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法,由于包含开始和结束时间,请用逗号隔开。"},{type:"fieldSet",title:"使用固定值",visibleOn:'typeof this.value !== "undefined"',collapsed:!0,collapsable:!0,className:"fieldset",body:[{type:"input-datetime-range",name:"value",pipeIn:function(e){return e?e.split(",").map((function(e){return(0,s.default)(r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e).format("X")})):""},pipeOut:function(e,t,n){var a=n.format;if(a){var r=e.split(",");e=r.map((function(e){return(0,s.default)(parseInt(e,10),"X").format(a)})).join(",")}return e}}]},(0,o.getSchemaTpl)("clearable",{pipeIn:(0,o.defaultValue)(!0)}),{type:"input-text",name:"minDate",label:"最小日期时间",placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法,同时支持变量如\\${start_date}
"},{type:"fieldSet",title:"使用固定值",collapsed:!0,collapsable:!0,className:"fieldset",body:[{type:"input-datetime",name:"minDate",pipeIn:function(e){return(0,s.default)(r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e).format("X")},pipeOut:function(e,t,n){return(0,s.default)(parseInt(e,10),"X").format(n.format)}}]},{type:"divider"},{type:"input-text",name:"maxDate",label:"最大日期时间",placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法,同时支持变量如\\${start_date}
"},{type:"fieldSet",title:"使用固定值",collapsed:!0,collapsable:!0,className:"fieldset",body:[{type:"input-datetime",name:"maxDate",pipeIn:function(e){return(0,s.default)(r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e).format("X")},pipeOut:function(e,t,n){return(0,s.default)(parseInt(e,10),"X").format(n.format)}}]},{type:"input-text",name:"minDuration",label:"限制最小跨度",description:"比如 2days"},{type:"input-text",name:"ranges",label:"日期范围快捷键",description:"比如 today, yesterday, 1dayago, 7daysago, 90daysago, prevweek, thismonth, prevmonth, prevquarter, thisquarter"},{type:"input-text",name:"maxDuration",label:"限制最大跨度",description:"比如 1year"},{name:"utc",label:"是否使用 UTC 时间",type:"switch",mode:"inline",className:"block"},{name:"embed",label:"是否内嵌模式",type:"switch",mode:"inline",className:"block"}],t}return a.__extends(t,e),t}(l.BasePlugin);t.DateTimeRangeControlPlugin=u,(0,i.registerEditorPlugin)(u)},5225:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EmailControlPlugin=void 0;var a=n(752),r=n(9756),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-email",t.$schema="/schemas/TextControlSchema.json",t.name="邮箱框",t.isBaseComponent=!0,t.icon="fa fa-envelope-o",t.description="验证输入是否符合邮箱的格式",t.scaffold={type:"input-email",label:"邮箱",name:"email"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:a.__assign({},t.scaffold)},t.panelTitle=t.name,t}return a.__extends(t,e),t}(n(9890).TextControlPlugin);t.EmailControlPlugin=o,(0,r.registerEditorPlugin)(o)},377:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ExcelControlPlugin=void 0;var a=n(752),r=n(9547),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-excel",t.$schema="/schemas/ExcelControlSchema.json",t.name="上传 Excel",t.isBaseComponent=!0,t.icon="fa fa-eyedropper",t.description="自动解析 Excel",t.docLink="/amis/zh-CN/components/form/input-excel",t.tags=["表单项"],t.scaffold={type:"input-excel",label:"Excel",name:"excel"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="上传 Excel",t.panelBody=[{label:"解析模式",name:"parseMode",type:"select",options:[{label:"对象",value:"object"},{label:"数组",value:"array"}]},{type:"switch",name:"allSheets",label:"是否解析所有 Sheet",mode:"inline",className:"w-full"},{type:"switch",name:"plainText",label:"是否解析为纯文本",pipeIn:(0,r.defaultValue)(!0),mode:"inline",className:"w-full"},{type:"switch",name:"includeEmpty",label:"是否包含空内容",mode:"inline",visibleOn:'data.parseMode === "array"',className:"w-full"}],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.ExcelControlPlugin=i,(0,o.registerEditorPlugin)(i)},6253:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.FileControlPlugin=void 0;var a=n(752),r=n(9547),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-file",t.$schema="/schemas/FileControlSchema.json",t.name="文件上传",t.isBaseComponent=!0,t.icon="fa fa-upload",t.description="可上传多个文件,可配置是否自动上传以及大文件分片上传",t.docLink="/amis/zh-CN/components/form/input-file",t.tags=["表单项"],t.scaffold={type:"input-file",label:"文件上传",name:"file"},t.previewSchema={type:"form",className:"text-left",wrapWithPanel:!1,mode:"horizontal",body:[a.__assign({},t.scaffold)]},t.panelTitle="文件域",t.panelBody=[(0,r.getSchemaTpl)("tabs",[{title:"常规",body:[{type:"input-text",name:"btnLabel",label:"上传按钮名称",value:"请选择文件"},(0,r.getSchemaTpl)("api",{label:"文件接收器",name:"receiver",description:"默认不填写将上传到 bos,可以在系统配置中设置为自己的 bos 地址。",value:"/api/upload/file",__isUpload:!0}),(0,r.getSchemaTpl)("autoFill"),{type:"fieldSet",title:"分块上传相关",collapsed:!0,collapsable:!0,className:"fieldset",body:[{type:"button-group-select",name:"useChunk",label:"启用分块",size:"xs",pipeOut:r.valuePipeOut,value:"auto",options:[{label:"自动",value:"auto"},{label:"启用",value:!0},{label:"关闭",value:!1}]},{name:"chunkSize",type:"input-number",label:"分块大小",visibleOn:"data.useChunk != false",value:5242880},(0,r.getSchemaTpl)("api",{name:"startChunkApi",label:"startChunkApi",value:"/api/upload/startChunk"}),(0,r.getSchemaTpl)("api",{name:"chunkApi",label:"chunkApi",value:"/api/upload/chunk"}),(0,r.getSchemaTpl)("api",{name:"finishChunkApi",label:"finishChunkApi",value:"/api/upload/finishChunk"})]},{type:"input-text",name:"accept",label:"文件类型",value:"",description:"请填写文件的 mime-types
,参考 input[type=file]
的 accept
说明"},(0,r.getSchemaTpl)("switchDefaultValue"),{type:"input-text",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"'},(0,r.getSchemaTpl)("multiple",{pipeIn:(0,r.defaultValue)(!1)}),(0,r.getSchemaTpl)("joinValues"),(0,r.getSchemaTpl)("delimiter"),(0,r.getSchemaTpl)("extractValue")]},{title:"外观",body:[(0,r.getSchemaTpl)("className",{name:"btnClassName",label:"按钮 CSS 类名",pipeIn:(0,r.defaultValue)("btn-sm btn-info")}),(0,r.getSchemaTpl)("className",{name:"btnUploadClassName",label:"上传按钮 CSS 类名",pipeIn:(0,r.defaultValue)("btn-sm btn-success")})]},{title:"其他",body:[{name:"maxSize",type:"input-number",label:"文件最大体积",description:"超出大小不允许上传,单位字节"},{name:"maxLength",type:"input-number",label:"文件最大数量",description:"超出数量不允许上传",visibleOn:"data.multiple != false"},{name:"fileField",type:"input-text",label:"文件域名称",value:"file"},{name:"asBase64",type:"switch",mode:"inline",className:"block",label:"作为 Base64 提交",hiddenOn:"data.asBlob",description:"小文件时可以使用,默认给 Form 提交的是文件下载地址,设置后给 Form 提交文件内容的 base64 格式字符串。"},{name:"asBlob",type:"switch",mode:"inline",className:"block",label:"作为二进制提交",hiddenOn:"data.asBase64",description:"File 控件不接管文件上传,直接由表单的保存接口完成。和 Base64 选项二选一。"},{name:"autoUpload",type:"switch",mode:"inline",className:"block",label:"是否自动上传",value:!0},{name:"hideUploadButton",type:"switch",mode:"inline",className:"block",label:"是否隐藏上传按钮",value:!1},(0,r.getSchemaTpl)("fileUrl",{name:"templateUrl",label:"模板地址"})]}])],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.FileControlPlugin=i,(0,o.registerEditorPlugin)(i)},2053:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InputGroupControlPlugin=void 0;var a=n(752),r=a.__importDefault(n(6689)),o=n(1502),i=n(9547),l=n(9756),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-group",t.$schema="/schemas/InputGroupControlSchema.json",t.name="输入组合",t.isBaseComponent=!0,t.icon="fa fa-object-group",t.description="输入组合,支持多种类型的控件组合",t.docLink="/amis/zh-CN/components/form/input-group",t.tags=["表单项"],t.scaffold={type:"input-group",name:"input-group",label:"input 组合",body:[{type:"input-text",inputClassName:"b-r-none p-r-none",name:"input-group"},{type:"submit",label:"提交",level:"primary"}]},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="Input 组合",t.panelBody=[[{name:"body",type:"combo",multiple:!0,addable:!1,draggable:!0,draggableTip:"可排序、可移除、如要编辑请在预览区选中编辑",editable:!1,visibleOn:"this.body && this.body.length",items:[{type:"tpl",inline:!1,className:"p-t-xs",tpl:'<%= data.label %><% if (data.icon) { %><% }%>'}]},{children:r.default.createElement(o.Button,{className:"m-b",onClick:function(){t.manager.showRendererPanel("表单项")},level:"danger",tooltip:"插入一个新的元素",size:"sm",block:!0},"新增元素")},(0,i.getSchemaTpl)("formItemName",{required:!0})]],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.InputGroupControlPlugin=s,(0,l.registerEditorPlugin)(s)},200:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ImageControlPlugin=void 0;var a=n(752),r=n(9547),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-image",t.$schema="/schemas/ImageControlSchema.json",t.name="图片上传",t.isBaseComponent=!0,t.description="可以对图片实现裁剪,限制图片的宽高以及大小,支持自动上传及上传多张图片",t.docLink="/amis/zh-CN/components/form/input-image",t.tags=["表单项"],t.icon="fa fa-crop",t.scaffold={type:"input-image",label:"图片上传",name:"image",imageClassName:"r w-full"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="图片上传",t.panelBody=[(0,r.getSchemaTpl)("switchDefaultValue"),{type:"input-text",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"'},(0,r.getSchemaTpl)("multiple",{value:!1,visibleOn:"!data.crop",description:"开启后,不能同时开启裁剪功能"}),(0,r.getSchemaTpl)("joinValues"),(0,r.getSchemaTpl)("delimiter"),(0,r.getSchemaTpl)("extractValue"),{name:"maxSize",type:"input-number",label:"图片最大体积",description:"超出大小不允许上传,单位字节"},{name:"maxLength",type:"input-number",label:"图片最大数量",visibleOn:"data.multiple",description:"超出数量不允许上传"},(0,r.getSchemaTpl)("api",{label:"文件接收接口",name:"receiver",description:"文件接收接口,默认不填则上传到 hiphoto",value:"/api/upload",__isUpload:!0}),(0,r.getSchemaTpl)("autoFill"),{type:"input-text",value:".jpeg, .jpg, .png, .gif",name:"accept",label:"图片类型",description:"请填入图片的后缀或 MimeType
,多个类型用,
隔开"},{type:"input-text",name:"defaultImage",label:"占位图片地址"},{type:"switch",name:"fixedSize",value:!1,label:"是否开启固定尺寸",mode:"inline",className:"w-full"},{type:"switch",name:"hideUploadButton",value:!1,label:"隐藏上传按钮",mode:"inline",className:"w-full"},{type:"switch",name:"autoUpload",value:!1,label:"自动上传",mode:"inline",className:"w-full"},{name:"compress",type:"switch",label:"开启压缩",value:!0,mode:"inline",className:"w-full",description:"由 hiphoto 实现,自定义接口将无效"},{type:"combo",name:"compressOptions",multiLine:!0,label:"压缩配置",visibleOn:"data.compress",items:[{type:"input-number",label:"最大宽度",name:"maxWidth"},{type:"input-number",label:"最大高度",name:"maxHeight"}]},{name:"showCompressOptions",type:"switch",label:"是否显示压缩选项",mode:"inline",className:"w-full"},{name:"crop",type:"switch",label:"是否开启裁剪",mode:"inline",visibleOn:"!data.multiple",className:"w-full",description:"开启后,不能同时开启多选模式",pipeIn:function(e){return!!e}},{name:"crop.aspectRatio",type:"input-text",label:"裁剪比率",visibleOn:"data.crop",pipeOut:r.valuePipeOut},{name:"crop.rotatable",type:"switch",label:"裁剪时是否可旋转",visibleOn:"data.crop",pipeOut:r.valuePipeOut},{name:"crop.scalable",type:"switch",label:"裁剪时否可缩放",visibleOn:"data.crop",pipeOut:r.valuePipeOut},{name:"crop.viewMode",type:"select",label:"裁剪区域限制",value:1,options:[{label:"无限制",value:0},{label:"绘图区域",value:1}],visibleOn:"data.crop",pipeOut:r.valuePipeOut},{type:"fieldSet",title:"图片限制",collapsed:!0,collapsable:!0,className:"fieldset",body:[{type:"input-number",name:"limit.width",label:"限制宽度"},{type:"input-number",name:"limit.height",label:"限制高度"},{type:"input-number",name:"limit.maxWidth",label:"限制最大宽度"},{type:"input-number",name:"limit.maxHeight",label:"限制最大高度"},{type:"input-number",name:"limit.minWidth",label:"限制最小宽度"},{type:"input-number",name:"limit.minHeight",label:"限制最小高度"},{type:"input-number",name:"limit.aspectRatio",label:"限制宽高比率"},{type:"input-text",name:"limit.限制最小高度",label:"宽高比描述",description:"当宽高比没有满足条件时,此描述将作为提示信息显示"}]}],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.ImageControlPlugin=i,(0,o.registerEditorPlugin)(i)},4659:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.KVControlPlugin=void 0;var a=n(752),r=n(9547),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-kv",t.$schema="/schemas/KVControlSchema.json",t.name="KV 键值对",t.isBaseComponent=!0,t.icon="fa fa-eyedropper",t.description="用于编辑键值对类型的数据",t.docLink="/amis/zh-CN/components/form/input-kv",t.tags=["表单项"],t.scaffold={type:"input-kv",label:"KV",name:"kv"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="KV 键值对",t.panelBody=[{type:"input-text",name:"valueType",label:"值类型",pipeIn:(0,r.defaultValue)("input-text")},{type:"input-text",name:"keyPlaceholder",label:"key 的提示信息"},{type:"input-text",name:"valuePlaceholder",label:"value 的提示信息"},{type:"switch",name:"draggable",label:"是否可排序",pipeIn:(0,r.defaultValue)(!0)}],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.KVControlPlugin=i,(0,o.registerEditorPlugin)(i)},8803:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MonthControlPlugin=void 0;var a=n(752),r=n(9756),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-month",t.$schema="/schemas/MonthControlSchema.json",t.name="Month",t.isBaseComponent=!0,t.icon="fa fa-calendar",t.description="月份选择",t.docLink="/amis/zh-CN/components/form/input-month",t.tags=["表单项"],t.scaffold={type:"input-month",name:"month"},t.previewSchema={type:"form",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="Month",t}return a.__extends(t,e),t}(n(4189).DateControlPlugin);t.MonthControlPlugin=o,(0,r.registerEditorPlugin)(o)},3428:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MonthRangeControlPlugin=void 0;var a=n(752),r=n(1502),o=n(9547),i=n(9756),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-month-range",t.$schema="/schemas/MonthRangeControlSchema.json",t.order=-440,t.icon="fa fa-calendar",t.name="月份范围",t.isBaseComponent=!0,t.description="月份范围选择,可通过minDate
、maxDate
设定最小、最大日期",t.docLink="/amis/zh-CN/components/form/input-month-range",t.tags=["表单项"],t.scaffold={type:"input-month-range",label:"月份范围",name:"month-range"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="月份范围",t.panelBody=[(0,o.getSchemaTpl)("placeholder",{pipeIn:(0,o.defaultValue)("请选择月份范围")}),{type:"input-text",name:"format",label:"值格式",description:'请参考 moment 中的格式用法。',pipeIn:(0,o.defaultValue)("X")},(0,o.getSchemaTpl)("switchDefaultValue"),{type:"input-text",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"',placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法,由于包含开始和结束时间,请用逗号隔开。"},{type:"fieldSet",title:"使用固定值",visibleOn:'typeof this.value !== "undefined"',collapsed:!0,collapsable:!0,className:"fieldset",body:[{type:"input-month-range",name:"value",pipeIn:function(e){return e?e.split(",").map((function(e){return r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e})):""}}]},(0,o.getSchemaTpl)("clearable",{pipeIn:(0,o.defaultValue)(!0)}),{type:"input-text",name:"minDate",label:"最小日期",placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法,同时支持变量如\\${start_date}
"},{type:"fieldSet",title:"使用固定值",collapsed:!0,collapsable:!0,className:"fieldset",body:[{type:"input-date",name:"minDate",pipeIn:function(e){return r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e}}]},{type:"divider"},{type:"input-text",name:"maxDate",label:"最大日期",placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法,同时支持变量如\\${start_date}
"},{type:"fieldSet",title:"使用固定值",collapsed:!0,collapsable:!0,className:"fieldset",body:[{type:"input-date",name:"maxDate",pipeIn:function(e){return r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e}}]},{type:"input-text",name:"minDuration",label:"限制最小跨度",description:"比如 2days"},{type:"input-text",name:"maxDuration",label:"限制最大跨度",description:"比如 1year"},{name:"utc",label:"是否使用 UTC 时间",type:"switch",mode:"inline",className:"block"},{name:"clearable",label:"是否可清除",type:"switch",mode:"inline",className:"block"},{name:"embed",label:"是否内嵌模式",type:"switch",mode:"inline",className:"block"}],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.MonthRangeControlPlugin=l,(0,i.registerEditorPlugin)(l)},1143:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NumberControlPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-number",t.$schema="/schemas/NumberControlSchema.json",t.order=-410,t.name="数字框",t.isBaseComponent=!0,t.icon="fa fa-sort-numeric-asc",t.description="支持设定最大值和最小值,以及步长与精度",t.docLink="/amis/zh-CN/components/form/input-number",t.tags=["表单项"],t.scaffold={type:"input-number",label:"数字",name:"number-text"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign(a.__assign({},t.scaffold),{value:88})]},t.panelTitle="数字框",t.panelBody=[(0,i.getSchemaTpl)("switchDefaultValue"),{type:"input-number",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"'},{type:"input-text",name:"min",label:"最小值",description:"请输入数字或使用 \\${xxx}
来获取变量,否则该配置不生效"},{type:"input-text",name:"max",label:"最大值",description:"请输入数字或使用 \\${xxx}
来获取变量,否则该配置不生效"},{type:"input-number",name:"step",label:"步长"},{type:"input-number",name:"precision",label:"小数点精度",min:0,max:100},{type:"input-array",name:"unitOptions",label:"单位选项",items:{type:"input-text"}}],t}return a.__extends(t,e),t}(o.BasePlugin);t.NumberControlPlugin=l,(0,r.registerEditorPlugin)(l)},812:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PasswordControlPlugin=void 0;var a=n(752),r=n(9756),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-password",t.$schema="/schemas/TextControlSchema.json",t.name="密码框",t.isBaseComponent=!0,t.icon="fa fa-asterisk",t.description="验证输入是否符合邮箱的格式",t.scaffold={type:"input-password",label:"密码",name:"password"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:a.__assign({},t.scaffold)},t.panelTitle=t.name,t}return a.__extends(t,e),t}(n(9890).TextControlPlugin);t.PasswordControlPlugin=o,(0,r.registerEditorPlugin)(o)},5922:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.InputQuarterPlugin=void 0;var a=n(752),r=n(9756),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-quarter",t.$schema="/schemas/QuarterControlSchema.json",t.name="Quarter",t.isBaseComponent=!0,t.icon="fa fa-calendar",t.description="季度选择",t.docLink="/amis/zh-CN/components/form/input-quarter",t.tags=["表单项"],t.scaffold={type:"input-quarter",name:"month"},t.previewSchema={type:"form",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="Quarter",t}return a.__extends(t,e),t}(n(4189).DateControlPlugin);t.InputQuarterPlugin=o,(0,r.registerEditorPlugin)(o)},8859:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.QuarterRangePlugin=void 0;var a=n(752),r=n(1502),o=n(9547),i=n(9756),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-quarter-range",t.$schema="/schemas/MonthRangeControlSchema.json",t.order=-440,t.icon="fa fa-calendar",t.name="季度范围",t.isBaseComponent=!0,t.description="月份范围选择,可通过minDate
、maxDate
设定最小、最大日期",t.docLink="/amis/zh-CN/components/form/input-quarter-range",t.tags=["表单项"],t.scaffold={type:"input-quarter-range",label:"季度范围",name:"quarter-range"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="季度范围",t.panelBody=[(0,o.getSchemaTpl)("placeholder",{pipeIn:(0,o.defaultValue)("请选择月份范围")}),{type:"input-text",name:"format",label:"值格式",description:'请参考 moment 中的格式用法。',pipeIn:(0,o.defaultValue)("X")},(0,o.getSchemaTpl)("switchDefaultValue"),{type:"input-text",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"',placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法,由于包含开始和结束时间,请用逗号隔开。"},{type:"fieldSet",title:"使用固定值",visibleOn:'typeof this.value !== "undefined"',collapsed:!0,collapsable:!0,className:"fieldset",body:[{type:"input-quarter-range",name:"value",pipeIn:function(e){return e?e.split(",").map((function(e){return r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e})):""}}]},(0,o.getSchemaTpl)("clearable",{pipeIn:(0,o.defaultValue)(!0)}),{type:"input-text",name:"minDate",label:"最小日期",placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法,同时支持变量如\\${start_date}
"},{type:"fieldSet",title:"使用固定值",collapsed:!0,collapsable:!0,className:"fieldset",body:[{type:"input-date",name:"minDate",pipeIn:function(e){return r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e}}]},{type:"divider"},{type:"input-text",name:"maxDate",label:"最大日期",placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法,同时支持变量如\\${start_date}
"},{type:"fieldSet",title:"使用固定值",collapsed:!0,collapsable:!0,className:"fieldset",body:[{type:"input-date",name:"maxDate",pipeIn:function(e){return r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e}}]},{type:"input-text",name:"minDuration",label:"限制最小跨度",description:"比如 2days"},{type:"input-text",name:"maxDuration",label:"限制最大跨度",description:"比如 1year"},{name:"utc",label:"是否使用 UTC 时间",type:"switch",mode:"inline",className:"block"},{name:"clearable",label:"是否可清除",type:"switch",mode:"inline",className:"block"},{name:"embed",label:"是否内嵌模式",type:"switch",mode:"inline",className:"block"}],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.QuarterRangePlugin=l,(0,i.registerEditorPlugin)(l)},6772:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RangeControlPlugin=void 0;var a=n(752),r=n(9547),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-range",t.$schema="/schemas/RangeControlSchema.json",t.name="滑块",t.isBaseComponent=!0,t.icon="fa fa-sliders",t.description="选择某个值或者某个范围",t.docLink="/amis/zh-CN/components/form/input-range",t.tags=["表单项"],t.scaffold={type:"input-range",label:"滑块",name:"range"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="滑块",t.panelBody=[(0,r.getSchemaTpl)("switchDefaultValue"),{type:"input-number",name:"value",label:"默认值",validations:"isNumeric",visibleOn:'typeof data.value !== "undefined" && !data.multiple',pipeIn:function(e){return"number"==typeof e?e:0},pipeOut:function(e,t,n){return e|
可将配置栏分组,参考文档',minRows:5,value:["paragraphFormat","quote","color","|","bold","italic","underline","strikeThrough","|","formatOL","formatUL","align","|","insertLink","insertImage","insertEmotion","insertTable","|","undo","redo","html"],pipeIn:function(e){return Array.isArray(e)?e.join(" "):""},pipeOut:function(e){return e.replace(/\s+/g," ").split(" ")}},{type:"textarea",name:"toolbarButtonsMD",label:"中屏时展示的配置项",labelRemark:"屏幕宽度 ≥ 992px",description:'使用空格分开配置,使用|
可将配置栏分组,参考文档',minRows:5,pipeIn:function(e){return Array.isArray(e)?e.join(" "):""},pipeOut:function(e){return e.replace(/\s+/g," ").split(" ")}},{type:"textarea",name:"toolbarButtonsSM",label:"小屏时展示的配置项",labelRemark:"屏幕宽度 ≥ 768px",description:'使用空格分开配置,使用|
可将配置栏分组,参考文档',minRows:5,pipeIn:function(e){return Array.isArray(e)?e.join(" "):""},pipeOut:function(e){return e.replace(/\s+/g," ").split(" ")}}]}]}),(0,r.getSchemaTpl)("fieldSet",{title:"tinymce 设置项",visibleOn:'data.vendor === "tinymce"',body:[{type:"combo",name:"options",noBorder:!0,multiLine:!0,items:[{type:"switch",label:"是否显示菜单栏",value:"true",name:"menubar"},{type:"input-number",label:"高度",min:0,value:400,name:"height"},{type:"textarea",name:"plugins",label:"启用的插件",description:'使用空格分开配置,参考文档',value:"advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking table emoticons template paste help"},{type:"textarea",name:"toolbar",label:"工具栏",value:"undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link image | print preview media fullpage | forecolor backcolor emoticons | help"}]}]})],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.RichTextControlPlugin=i,(0,o.registerEditorPlugin)(i)},4560:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SubFormControlPlugin=void 0;var a=n(752),r=n(1502),o=a.__importDefault(n(6689)),i=n(9756),l=n(9933),s=n(3570),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-sub-form",t.$schema="/schemas/SubFormControlSchema.json",t.name="子表单项",t.isBaseComponent=!0,t.icon="fa fa-window-restore",t.description="SubForm, 配置一个子form
作为当前的表单项",t.docLink="/amis/zh-CN/components/form/input-sub-form",t.tags=["表单项"],t.scaffold={type:"input-sub-form",name:"subform",label:"子表单",form:{title:"标题",body:[{type:"input-text",label:"文本",name:"text"}]}},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="子表单项",t.panelBodyCreator=function(e){return[{children:function(n){return n.value,n.onChange,o.default.createElement(r.Button,{size:"sm",level:"danger",className:"m-b",block:!0,onClick:t.editDetail.bind(t,e.id)},"配置成员渲染器")}},{name:"labelField",type:"input-text",value:"label",label:"名称字段名",description:"当值中存在这个字段,则按钮名称将使用此字段的值来展示。"},{name:"btnLabel",label:"按钮标签名",value:"设置",type:"input-text"},{name:"minLength",visibleOn:"data.multiple",label:"允许最少个数",type:"input-number"},{name:"maxLength",visibleOn:"data.multiple",label:"允许最多个数",type:"input-number"}]},t}return a.__extends(t,e),t.prototype.filterProps=function(e){return(e=(0,s.JSONPipeOut)(e)).value||(e.value=[""]),e},t.prototype.buildEditorToolbar=function(e,t){var n=e.id;"input-sub-form"===e.info.renderer.name&&t.push({icon:"fa fa-expand",order:100,tooltip:"配置成员渲染器",onClick:this.editDetail.bind(this,n)})},t.prototype.buildEditorContextMenu=function(e,t){var n=e.id;e.schema,e.region,"input-sub-form"===e.info.renderer.name&&t.push("|",{label:"配置成员渲染器",onSelect:this.editDetail.bind(this,n)})},t.prototype.editDetail=function(e){var t=this.manager,n=t.store,r=n.getNodeById(e),o=n.getValueOf(e);if(r&&o){var i=o.form,l=i.title,u=i.actions,d=i.name,c=i.size,p=i.closeOnEsc,f=i.showCloseButton,m=i.bodyClassName,h=(i.type,a.__rest(i,["title","actions","name","size","closeOnEsc","showCloseButton","bodyClassName","type"])),v={title:l,actions:u,name:d,size:c,closeOnEsc:p,showCloseButton:f,bodyClassName:m,type:"dialog",body:a.__assign({type:"form"},h)};this.manager.openSubEditor({title:"配置子表单项",value:v,memberImmutable:["body"],onChange:function(e){var n=e.body[0];delete(e=a.__assign(a.__assign({},o),{form:n})).form.type,t.panelChangeValue(e,(0,s.diff)(o,e))}})}},t}(l.BasePlugin);t.SubFormControlPlugin=u,(0,i.registerEditorPlugin)(u)},8332:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TableControlPlugin=void 0;var a=n(752),r=n(1502),o=a.__importDefault(n(8579)),i=n(9547),l=n(9756),s=n(9933),u=n(3893),d=n(3570),c=n(6374),p=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-table",t.$schema="/schemas/TableControlSchema.json",t.name="表格编辑框",t.isBaseComponent=!0,t.icon="fa fa-table",t.description="可以用来展现数据的,可以用来展示数组类型的数据,比如 multiple
的子 form
",t.docLink="/amis/zh-CN/components/form/input-table",t.tags=["表单项"],t.scaffold={type:"input-table",name:"table",label:"表格表单",columns:[{label:"color",name:"color",quickEdit:{type:"input-color"}},{label:"说明文字",name:"name",quickEdit:{type:"input-text",mode:"inline"}}],strictMode:!0},t.regions=[{key:"columns",label:"列集合",renderMethod:"renderTableContent",preferTag:"展示",dndMode:"position-h"}],t.previewSchema={type:"form",className:"text-left",wrapWithPanel:!1,mode:"horizontal",body:a.__assign(a.__assign({},t.scaffold),{value:[{color:"green",name:"绿色"}]})},t.scaffoldForm={title:"快速构建表格",body:[{name:"columns",type:"combo",multiple:!0,label:!1,addButtonText:"新增一列",draggable:!0,items:[{type:"input-text",name:"label",placeholder:"标题"},{type:"input-text",name:"name",placeholder:"绑定字段名"},{type:"select",name:"type",placeholder:"类型",value:"input-text",options:[{value:"text",label:"纯文本"},{value:"tpl",label:"模板"},{value:"image",label:"图片"},{value:"date",label:"日期"},{value:"progress",label:"进度"},{value:"status",label:"状态"},{value:"mapping",label:"映射"},{value:"operation",label:"操作栏"}]}]}],canRebuild:!0},t.panelTitle="表格编辑",t.panelBodyCreator=function(e){return e.schema.type,(0,i.getSchemaTpl)("tabs",[{title:"常规",body:(0,o.default)([(0,i.getSchemaTpl)("formItemName",{required:!0}),(0,i.getSchemaTpl)("label"),(0,i.getSchemaTpl)("description"),{label:"是否可新增",type:"switch",name:"addable",mode:"inline",className:"w-full"},{type:"input-text",name:"addBtnLabel",label:"增加按钮名称",visibleOn:"data.addable",pipeIn:(0,i.defaultValue)("")},{name:"addBtnIcon",label:"增加按钮图标",type:"icon-picker",visibleOn:"data.addable"},(0,i.getSchemaTpl)("api",{name:"addApi",label:"新增时提交的 API",visibleOn:"data.addable"}),{label:"是否可删除",type:"switch",name:"removable",mode:"inline",className:"w-full"},{type:"input-text",name:"deleteBtnLabel",label:"删除按钮名称",visibleOn:"data.removable",pipeIn:(0,i.defaultValue)("")},{name:"deleteBtnIcon",label:"删除按钮图标",type:"icon-picker",visibleOn:"data.removable"},(0,i.getSchemaTpl)("api",{name:"deleteApi",label:"删除时提交的 API",visibleOn:"data.removable"}),{label:"是否可编辑",type:"switch",name:"editable",mode:"inline",className:"w-full"},{type:"input-text",name:"editBtnLabel",label:"编辑按钮名称",visibleOn:"data.editable",pipeIn:(0,i.defaultValue)("")},{name:"editBtnIcon",label:"编辑按钮图标",type:"icon-picker",visibleOn:"data.editable"},{label:"是否可复制",type:"switch",name:"copyable",mode:"inline",className:"w-full"},{type:"input-text",name:"copyBtnLabel",label:"复制按钮名称",visibleOn:"data.copyable",pipeIn:(0,i.defaultValue)("")},{name:"copyBtnIcon",label:"复制按钮图标",type:"icon-picker",visibleOn:"data.copyable"},(0,i.getSchemaTpl)("api",{name:"updateApi",label:"修改时提交的 API",visibleOn:"data.editable"}),{type:"input-text",name:"confirmBtnLabel",label:"确认编辑按钮名称",visibleOn:"data.editable",pipeIn:(0,i.defaultValue)("")},{name:"confirmBtnIcon",label:"确认编辑按钮图标",type:"icon-picker",visibleOn:"data.editable"},{type:"input-text",name:"cancelBtnLabel",label:"取消编辑按钮名称",visibleOn:"data.editable",pipeIn:(0,i.defaultValue)("")},{name:"cancelBtnIcon",label:"取消编辑按钮图标",type:"icon-picker",visibleOn:"data.editable"},{label:"是否可拖拽排序",type:"switch",name:"draggable",mode:"inline",className:"w-full"},{label:"确认模式",type:"switch",name:"needConfirm",mode:"inline",className:"w-full"},{label:"严格模式",type:"switch",name:"strictMode",value:!0,mode:"inline",className:"w-full"},{label:"获取父级数据",labelRemark:{trigger:"click",className:"m-l-xs",rootClose:!0,content:'配置"canAccessSuperData": true 同时配置 "strictMode": false 开启此特性,初始会自动映射父级数据域的同名变量。需要注意的是,这里只会初始会映射,一旦修改过就是当前行数据为主了。也就是说,表单项类型的,只会起到初始值的作用',placement:"left"},type:"switch",onChange:function(e,t,n,a){e&&!t?a.setValues({strictMode:!1}):a.setValues({strictMode:!0})},name:"canAccessSuperData",mode:"inline",className:"w-full"}])},{title:"外观",body:[(0,i.getSchemaTpl)("formItemMode"),(0,i.getSchemaTpl)("horizontalMode"),(0,i.getSchemaTpl)("horizontal",{label:"",visibleOn:'(data.$$formMode == "horizontal" || data.mode == "horizontal") && data.label !== false && data.horizontal'}),(0,i.getSchemaTpl)("className"),(0,i.getSchemaTpl)("className",{label:"Label CSS 类名",name:"labelClassName"}),(0,i.getSchemaTpl)("className",{label:"Input CSS 类名",name:"inputClassName"}),(0,i.getSchemaTpl)("className",{label:"描述 CSS 类名",name:"descriptionClassName",visibleOn:"data.description"})]},{title:"显隐",body:[(0,i.getSchemaTpl)("disabled"),(0,i.getSchemaTpl)("visible")]},{title:"其他",body:[(0,i.getSchemaTpl)("required"),(0,i.getSchemaTpl)("validateOnChange"),(0,i.getSchemaTpl)("submitOnChange")]}])},t}return a.__extends(t,e),t.prototype.filterProps=function(e){var t=Array.isArray(e.value)?e.value:"string"==typeof e.source?(0,r.resolveVariable)(e.source,e.data):(0,r.resolveVariable)("items",e.data);if(Array.isArray(t)&&t.length)e.value=t.slice(0,10);else{var n={};Array.isArray(e.columns)&&e.columns.forEach((function(e){e.name&&(0,u.setVariable)(n,e.name,(0,c.mockValue)(e))})),e.value=(0,d.repeatArray)(n,1).map((function(e,t){return a.__assign(a.__assign({},e),{id:t+1})}))}return e},t.prototype.beforeInsert=function(e){var t,n,r,o,i=e.context;i.info.plugin!==this&&(null===(t=i.node.sameIdChild)||void 0===t?void 0:t.info.plugin)!==this||"columns"!==i.region||(i.data=a.__assign(a.__assign({},i.data),{label:null!==(o=null!==(n=i.data.label)&&void 0!==n?n:null===(r=i.subRenderer)||void 0===r?void 0:r.name)&&void 0!==o?o:"列名称"}))},t}(s.BasePlugin);t.TableControlPlugin=p,(0,l.registerEditorPlugin)(p)},9114:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TagControlPlugin=void 0;var a=n(752),r=n(9547),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-tag",t.$schema="/schemas/TagControlSchema.json",t.order=-420,t.name="标签",t.isBaseComponent=!0,t.icon="fa fa-tag",t.description="配置options
可以实现选择选项",t.docLink="/amis/zh-CN/components/form/input-tag",t.tags=["表单项"],t.scaffold={type:"input-tag",label:"标签",name:"tag",options:["红色","绿色","蓝色"]},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:a.__assign(a.__assign({},t.scaffold),{value:"红色"})},t.panelTitle="标签",t.panelBody=[{type:"input-text",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"'},(0,r.getSchemaTpl)("clearable"),(0,r.getSchemaTpl)("fieldSet",{title:"选项",body:[(0,r.getSchemaTpl)("options",{visibleOn:"data.autoComplete !== false",description:"设置选项后,输入时会下拉这些选项供用户参考。"}),(0,r.getSchemaTpl)("source",{visibleOn:"data.autoComplete !== false"}),{type:"input-text",name:"optionsTip",label:"选项提示",value:"最近您使用的标签"},(0,r.getSchemaTpl)("joinValues"),(0,r.getSchemaTpl)("delimiter"),(0,r.getSchemaTpl)("extractValue"),(0,r.getSchemaTpl)("autoFill")]})],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.TagControlPlugin=i,(0,o.registerEditorPlugin)(i)},9890:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextControlPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-text",t.$schema="/schemas/TextControlSchema.json",t.order=-500,t.name="文本框",t.isBaseComponent=!0,t.icon="fa fa-terminal",t.description="配置options
可以实现选择选项,效果同select
",t.docLink="/amis/zh-CN/components/form/input-text",t.tags=["表单项"],t.scaffold={type:"input-text",label:"文本",name:"text"},t.previewSchema={type:"form",className:"text-left",wrapWithPanel:!1,mode:"horizontal",body:[a.__assign({},t.scaffold)]},t.panelTitle="文本框",t.panelBody=[(0,i.getSchemaTpl)("switchDefaultValue"),{type:"input-text",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"'},(0,i.getSchemaTpl)("hint"),(0,i.getSchemaTpl)("showCounter"),{name:"addOn",label:"启用 addOn",type:"switch",mode:"inline",className:"w-full",pipeIn:function(e){return!!e},pipeOut:function(e){return e?{label:"按钮",type:"button"}:null}},{type:"combo",multiLine:!0,name:"addOn",visibleOn:"data.addOn",items:[{name:"type",label:"类型",type:"button-group-select",size:"xs",options:[{label:"文本",value:"text"},{label:"按钮",value:"button"},{label:"提交",value:"submit"}]},{name:"label",label:"文字",type:"input-text",visibleOn:'this.type === "text"'},{name:"icon",label:"Icon",type:"icon-picker",visibleOn:'this.type === "text"'},(0,i.getSchemaTpl)("className",{visibleOn:'this.type === "text"'}),{name:"position",label:"位置",type:"button-group-select",size:"xs",pipeIn:(0,i.defaultValue)("right"),options:[{label:"左边",value:"left"},{label:"右边",value:"right"}]}]},{name:"autoComplete",label:"自动补全",mode:"inline",className:"w-full",type:"switch",pipeIn:function(e){return!1!==e},pipeOut:function(e){return!!e&&""},onChange:function(e,t,n,a){""===t||t?a.setValues({__options:a.data.options,options:[]}):a.setValues({options:a.data.__options})}},(0,i.getSchemaTpl)("options",{visibleOn:"data.autoComplete !== false",description:"设置选项后,输入时会下拉这些选项供用户参考。"}),(0,i.getSchemaTpl)("source",{visibleOn:"data.autoComplete !== false"}),(0,i.getSchemaTpl)("api",{name:"autoComplete",label:"自动补全接口",description:"每次输入新内容后,将调用接口,根据接口返回更新选项。当前用户输入值在 `\\${term}` 中。",visibleOn:"data.autoComplete !== false"}),(0,i.getSchemaTpl)("multiple",{visibleOn:"data.options || data.source || data.autoComplete"}),(0,i.getSchemaTpl)("joinValues"),(0,i.getSchemaTpl)("delimiter"),(0,i.getSchemaTpl)("extractValue"),(0,i.getSchemaTpl)("autoFill")],t}return a.__extends(t,e),t}(o.BasePlugin);t.TextControlPlugin=l,(0,r.registerEditorPlugin)(l)},1533:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TimeControlPlugin=void 0;var a=n(752),r=n(1502),o=n(9547),i=n(9756),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-time",t.$schema="/schemas/TimeControlSchema.json",t.name="时间框",t.isBaseComponent=!0,t.icon="fa fa-clock-o",t.description="时分秒输入",t.docLink="/amis/zh-CN/components/form/input-time",t.tags=["表单项"],t.scaffold={type:"input-time",label:"时间",name:"time"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:a.__assign({},t.scaffold)},t.panelTitle="时间框",t.panelBody=[(0,o.getSchemaTpl)("switchDefaultValue"),{type:"input-text",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"',placeholder:"请输入相对值",description:"支持 now、+1day、-2weeks
这种相对值用法"},{type:"fieldSet",title:"使用固定值",collapsed:!0,collapsable:!0,className:"fieldset",visibleOn:'typeof this.value !== "undefined"',body:[{type:"input-time",name:"value",pipeIn:function(e){return r.relativeValueRe.test(e)||~["now","today"].indexOf(e)?"":e}}]},{type:"input-text",name:"timeFormat",label:"值格式",description:'请参考 moment 中的格式用法。',pipeIn:(0,o.defaultValue)("HH:mm")},(0,o.getSchemaTpl)("clearable",{pipeIn:(0,o.defaultValue)(!0)}),{type:"input-text",name:"inputFormat",label:"显示格式",description:'请参考 moment 中的格式用法。',pipeIn:(0,o.defaultValue)("HH:mm")}],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.TimeControlPlugin=l,(0,i.registerEditorPlugin)(l)},8936:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TreeControlPlugin=void 0;var a=n(752),r=n(9547),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-tree",t.$schema="/schemas/TreeControlSchema.json",t.name="树选择框",t.isBaseComponent=!0,t.icon="fa fa-list-alt",t.description="树型结构来选择,可通过options
来配置选项,也可通过source
拉取选项",t.docLink="/amis/zh-CN/components/form/input-tree",t.tags=["表单项"],t.scaffold={type:"input-tree",label:"树选择框",name:"tree",options:[{label:"选项A",value:"A",children:[{label:"选项C",value:"C"},{label:"选项D",value:"D"}]},{label:"选项B",value:"B"}]},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:a.__assign({},t.scaffold)},t.panelTitle="树选择",t.panelDefinitions={options:{label:"选项 Options",name:"options",type:"combo",multiple:!0,multiLine:!0,draggable:!0,addButtonText:"新增选项",scaffold:{label:"",value:""},items:[{type:"group",body:[{type:"input-text",name:"label",placeholder:"名称",required:!0},{type:"input-text",name:"value",placeholder:"值",unique:!0}]},{$ref:"options",label:"子选项",name:"children",addButtonText:"新增子选项"}]}},t.panelBody=[(0,r.getSchemaTpl)("tabs",[{title:"常规",body:[(0,r.getSchemaTpl)("switchDefaultValue"),{type:"input-text",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"'},(0,r.getSchemaTpl)("fieldSet",{title:"选项",body:[{$ref:"options",name:"options"},(0,r.getSchemaTpl)("source",{sampleBuilder:function(e){return JSON.stringify({status:0,msg:"",data:{options:[{label:"选项A",value:"a",children:[{label:"子选项",value:"c"}]},{label:"选项B",value:"b"}]}},null,2)}}),{label:"隐藏顶级",name:"hideRoot",type:"switch",mode:"inline",className:"w-full"},{name:"showIcon",label:"是否显示图标",type:"switch",mode:"inline",className:"w-full",pipeIn:(0,r.defaultValue)(!0)},(0,r.getSchemaTpl)("multiple"),{name:"cascade",visibleOn:"data.multiple",label:"不自动选中子节点?",type:"switch",description:"选中父级时,孩子节点是否自动选中",mode:"inline",className:"w-full"},{name:"withChildren",visibleOn:"data.cascade !== true && data.multiple",label:"数值是否携带子节点",type:"switch",disabledOn:"data.onlyChildren",mode:"inline",className:"w-full"},{name:"onlyChildren",visibleOn:"data.cascade !== true && data.multiple",label:"数值是否只包含子节点",disabledOn:"data.withChildren",type:"switch",mode:"inline",className:"w-full"},(0,r.getSchemaTpl)("joinValues"),(0,r.getSchemaTpl)("delimiter"),(0,r.getSchemaTpl)("extractValue"),(0,r.getSchemaTpl)("autoFill")]})]},{title:"外观",body:[{label:"顶级文字",name:"rootLabel",type:"input-text",pipeIn:(0,r.defaultValue)("顶级"),visibleOn:"data.hideRoot !== true"},{name:"showIcon",label:"是否显示图标",type:"switch",mode:"inline",className:"w-full",pipeIn:(0,r.defaultValue)(!0)},{label:"是否显示单选按钮",name:"showRadio",type:"switch",mode:"inline",className:"w-full",visibleOn:"!data.multiple"}]}])],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.TreeControlPlugin=i,(0,o.registerEditorPlugin)(i)},3581:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.URLControlPlugin=void 0;var a=n(752),r=n(9756),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-url",t.$schema="/schemas/TextControlSchema.json",t.name="URL输入框",t.isBaseComponent=!0,t.icon="fa fa-link",t.description="验证输入是否为合法的 URL",t.docLink="/amis/zh-CN/components/form/input-url",t.scaffold={type:"input-url",label:"链接",name:"url"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:a.__assign({},t.scaffold)},t.panelTitle="URL",t}return a.__extends(t,e),t}(n(9890).TextControlPlugin);t.URLControlPlugin=o,(0,r.registerEditorPlugin)(o)},4950:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.YearControlPlugin=void 0;var a=n(752),r=n(9756),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="input-year",t.$schema="/schemas/YearControlSchema.json",t.name="Year",t.isBaseComponent=!0,t.icon="fa fa-calendar",t.description="年选择",t.docLink="/amis/zh-CN/components/form/input-year",t.tags=["表单项"],t.scaffold={type:"input-year",name:"year"},t.previewSchema={type:"form",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="Year",t}return a.__extends(t,e),t}(n(4189).DateControlPlugin);t.YearControlPlugin=o,(0,r.registerEditorPlugin)(o)},3482:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ItemPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=a.__importDefault(n(6918)),s=n(3570),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.panelTitle="表单项",t.panelBodyCreator=function(e){var t=~["button","submit","reset"].indexOf(e.schema.type),n=~["button-toobar","container","fieldSet","group","grid","hbox","input-group","panel","service","tabs","table","elevator","static"].indexOf(e.schema.type),a=~["switch","wizard","diff-editor","editor","input-rating","input-text","textarea"].indexOf(e.schema.type),r=!!~["input-group"].indexOf(e.schema.type),o=e.schema.autoFillApi,l=e.info.renderer;return[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[t?null:(0,i.getSchemaTpl)("formItemName",{required:!n}),!1!==l.renderLabel?(0,i.getSchemaTpl)("label"):null,a?{type:"switch",name:"readOnly",label:"只读模式",mode:"inline",className:"w-full"}:null,{type:"switch",name:"disabled",label:"禁用",mode:"inline",className:"w-full"},r?null:(0,i.getSchemaTpl)("required"),(0,i.getSchemaTpl)("description"),(0,i.getSchemaTpl)("placeholder"),(0,i.getSchemaTpl)("remark"),!1!==l.renderLabel?(0,i.getSchemaTpl)("labelRemark"):null,o?(0,i.getSchemaTpl)("autoFillApi"):null]},{title:"外观",body:[(0,i.getSchemaTpl)("formItemMode"),(0,i.getSchemaTpl)("horizontalMode"),(0,i.getSchemaTpl)("horizontal",{label:"",visibleOn:'data.mode == "horizontal" && data.label !== false && data.horizontal'}),!1!==l.sizeMutable?(0,i.getSchemaTpl)("formItemSize"):null,(0,i.getSchemaTpl)("formItemInline"),(0,i.getSchemaTpl)("className"),(0,i.getSchemaTpl)("className",{label:"Label CSS 类名",name:"labelClassName"}),(0,i.getSchemaTpl)("className",{label:"控件 CSS 类名",name:"inputClassName"}),(0,i.getSchemaTpl)("className",{label:"描述 CSS 类名",name:"descriptionClassName",visibleOn:"this.description"})]},{title:"显隐",body:[(0,i.getSchemaTpl)("disabled"),(0,i.getSchemaTpl)("visible"),{type:"switch",name:"clearValueOnHidden",label:"隐藏时删除表单项值",mode:"inline",className:"w-full",disabledOn:'typeof this.visible === "boolean"'}]},r?null:{title:"验证",body:[(0,i.getSchemaTpl)("validations"),(0,i.getSchemaTpl)("validationErrors"),(0,i.getSchemaTpl)("validateOnChange"),(0,i.getSchemaTpl)("submitOnChange"),(0,i.getSchemaTpl)("api",{name:"validateApi",label:"校验接口",description:"单独校验这个表单项的接口"})]}])]},t}return a.__extends(t,e),t.prototype.buildEditorPanel=function(e,t){var n=e.info.renderer;e.selections.length||!e.info.hostId&&(null==n?void 0:n.isFormItem)&&t.push({key:"form-item",icon:"fa fa-desktop",title:this.panelTitle,render:this.manager.makeSchemaFormRender({body:this.panelBodyCreator(e)}),order:-200})},t.prototype.onDndAccept=function(e){var t=e.context,n=this.manager.store;if("schema"===t.sourceType){var a=n.getNodeById(t.sourceId);"body"!==(null==a?void 0:a.parentRegion)||"body"===t.targetRegion||~["button","reset","submit"].indexOf(t.data.type)||e.preventDefault()}},t.prototype.afterUpdate=function(e){var t,n,a=e.context;if(/\$/.test(a.info.renderer.name)&&(null===(t=a.diff)||void 0===t?void 0:t.some((function(e){var t;return"value"===(null===(t=e.path)||void 0===t?void 0:t.join("."))})))){var r=(0,l.default)(a.diff,(function(e){var t;return"value"===(null===(t=e.path)||void 0===t?void 0:t.join("."))})),o=null===(n=this.manager.store.getNodeById(a.id))||void 0===n?void 0:n.getComponent();null==o||o.props.onChange(null==r?void 0:r.rhs)}},t.prototype.beforeReplace=function(e){var t=e.context;t.info.renderer.isFormItem&&t.data&&t.subRenderer&&!~t.subRenderer.tags.indexOf("表单项")&&~t.subRenderer.tags.indexOf("展示")&&(t.data=a.__assign(a.__assign({},t.data),{type:"static-".concat(t.data.type),label:t.data.label||t.schema.label,name:t.data.name||t.schema.name})),t.schema&&(t.data.name=t.schema.name||t.data.name)},t.prototype.buildEditorContextMenu=function(e,t){var n=this,r=(e.id,e.schema,e.region,e.selections);if(r.length&&!(r.length>3)){var o=r.concat(),i=o.shift().node.parent;o.some((function(e){var t;return e.node.parent!==i||!(null===(t=e.info.renderer)||void 0===t?void 0:t.isFormItem)}))||t.unshift({label:"合成一行",icon:"merge-icon",onSelect:function(){var e=n.manager.store,t=r.concat(),o=t.shift(),i=e.schema,l=[a.__assign({},o.schema)];delete l[0].$$id,t.forEach((function(e){l.push(e.node.schema),i=(0,s.JSONDelete)(i,e.id)}));var u=(0,s.JSONPipeIn)({type:"group",body:l});i=(0,s.JSONUpdate)(i,o.id,u,!0),e.traceableSetSchema(i),setTimeout((function(){e.setActiveId(o.id)}),40)}},"|")}},t}(o.BasePlugin);t.ItemPlugin=u,(0,r.registerEditorPlugin)(u)},8952:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ListControlPlugin=void 0;var a=n(752),r=n(9547),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="list-select",t.$schema="/schemas/ListControlSchema.json",t.order=-430,t.name="列表选择",t.isBaseComponent=!0,t.icon="fa fa-ellipsis-h",t.description="单选或者多选,支持source
拉取选项,选项可配置图片,也可以自定义HTML
配置",t.docLink="/amis/zh-CN/components/form/list-select",t.tags=["表单项"],t.scaffold={type:"list-select",label:"列表",name:"list",options:[{label:"选项A",value:"A"},{label:"选项B",value:"B"}]},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign(a.__assign({},t.scaffold),{value:"A"})]},t.panelTitle="列表选择",t.panelBody=[(0,r.getSchemaTpl)("switchDefaultValue"),{type:"list-select",name:"value",label:"默认值",description:"请填入选项 Options 中 value 值",source:"${options}",visibleOn:'typeof this.value !== "undefined"'},(0,r.getSchemaTpl)("fieldSet",{title:"选项",body:[(0,r.getSchemaTpl)("multiple"),(0,r.getSchemaTpl)("joinValues"),(0,r.getSchemaTpl)("delimiter"),(0,r.getSchemaTpl)("extractValue"),(0,r.getSchemaTpl)("options"),(0,r.getSchemaTpl)("source")]})],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.ListControlPlugin=i,(0,o.registerEditorPlugin)(i)},1803:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LocationControlPlugin=void 0;var a=n(752),r=n(9756),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="location-picker",t.$schema="/schemas/LocationControlSchema.json",t.name="地理位置选择",t.isBaseComponent=!0,t.icon="fa fa-location-arrow",t.description="地理位置选择",t.docLink="/amis/zh-CN/components/form/location-picker",t.tags=["表单项"],t.scaffold={type:"location-picker",name:"location"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="地理位置选择",t.panelBody=[{name:"clearable",label:"是否可清除",type:"switch",mode:"inline",className:"block"},{type:"input-text",name:"ak",label:"百度地图的 AK",description:'请从百度地图开放平台获取'},{type:"select",name:"coordinatesType",label:"坐标格式",value:"bd09",options:[{label:"百度坐标",value:"bd09"},{label:"国测局坐标",value:"gcj02"}]}],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.LocationControlPlugin=o,(0,r.registerEditorPlugin)(o)},6489:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MatrixControlPlugin=void 0;var a=n(752),r=n(9547),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="matrix-checkboxes",t.$schema="/schemas/MatrixControlSchema.json",t.name="矩阵开关",t.isBaseComponent=!0,t.icon="fa fa-th-large",t.description="可配置行单选,列单选,以及全部选项只能单选或者全部选项多选",t.docLink="/amis/zh-CN/components/form/matrix-checkboxes",t.tags=["表单项"],t.scaffold={type:"matrix-checkboxes",name:"matrix",label:"矩阵开关",rowLabel:"行标题说明",columns:[{label:"列1"},{label:"列2"}],rows:[{label:"行1"},{label:"行2"}]},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="矩阵开关",t.panelBody=[(0,r.getSchemaTpl)("api",{name:"source",label:"获取矩阵数据接口"}),(0,r.getSchemaTpl)("multiple",{value:!0}),{type:"button-group-select",name:"singleSelectMode",label:"单选模式",description:"行级、列级或者单个单元单选",size:"xs",mode:"inline",className:"w-full",visibleOn:"!this.multiple",options:[{label:"行级",value:"row"},{label:"列级",value:"column"},{label:"单个单元",value:"cell"}],pipeIn:(0,r.defaultValue)("column")},(0,r.getSchemaTpl)("fieldSet",{title:"矩阵配置",body:[{label:"列配置",name:"columns",type:"combo",multiple:!0,addButtonText:"添加一列",scaffold:{label:"列说明"},items:[{type:"input-text",name:"label",placeholder:"列说明"}]},{name:"rowLabel",label:"行标题文字",type:"input-text"},{label:"行配置",name:"rows",type:"combo",multiple:!0,scaffold:{label:"行说明"},addButtonText:"添加一行",items:[{type:"input-text",name:"label",placeholder:"行说明"}]}]})],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.MatrixControlPlugin=i,(0,o.registerEditorPlugin)(i)},7798:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NestedSelectControlPlugin=void 0;var a=n(752),r=n(9547),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="nested-select",t.$schema="/schemas/NestedSelectControlSchema.json",t.name="嵌套下拉框",t.isBaseComponent=!0,t.icon="fa fa-indent",t.description="适用于选项中含有子项,可通过source
拉取选项,支持多选",t.docLink="/amis/zh-CN/components/form/nestedselect",t.tags=["表单项"],t.scaffold={type:"nested-select",label:"嵌套下拉框",name:"nestedSelect",options:[{label:"选项A",value:"A"},{label:"选项B",value:"B",children:[{label:"选项C",value:"C"},{label:"选项D",value:"D"}]}]},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="嵌套下拉",t.panelDefinitions={options:{label:"选项 Options",name:"options",type:"combo",multiple:!0,multiLine:!0,draggable:!0,addButtonText:"新增选项",scaffold:{label:"",value:""},items:[{type:"group",body:[{type:"input-text",name:"label",placeholder:"名称",required:!0},{type:"input-text",name:"value",placeholder:"值",unique:!0}]},{$ref:"options",label:"子选项",name:"children",addButtonText:"新增子选项"}]}},t.panelBody=[(0,r.getSchemaTpl)("tabs",[{title:"常规",body:[(0,r.getSchemaTpl)("switchDefaultValue"),{type:"input-text",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"'},(0,r.getSchemaTpl)("clearable"),{type:"switch",name:"searchable",label:"可否检索",mode:"inline",className:"w-full"},{type:"input-text",name:"searchPromptText",label:"搜索框占位文本"},{type:"input-text",name:"noResultsText",label:"无结果时的文本"},{type:"switch",name:"hideNodePathLabel",label:"隐藏选中节点的祖先节点文本信息",mode:"inline",className:"w-full"},{type:"switch",name:"enableNodePath",label:"节点路径模式",mode:"inline",className:"w-full"},{type:"switch",name:"onlyChildren",label:"选中父节点时只使用子节点的值",mode:"inline",className:"w-full"},{type:"input-text",name:"pathSeparator",visibleOn:"this.enableNodePath",label:"节点路径的分隔符"},(0,r.getSchemaTpl)("borderMode"),(0,r.getSchemaTpl)("fieldSet",{title:"选项",body:[{$ref:"options",name:"options"},(0,r.getSchemaTpl)("api",{name:"source",label:"获取选项接口"}),(0,r.getSchemaTpl)("multiple"),{name:"cascade",visibleOn:"data.multiple",label:"不自动选中子节点?",description:"选中父级时,孩子节点是否自动选中",type:"switch",mode:"inline",className:"w-full"},{name:"withChildren",visibleOn:"data.cascade !== true && data.multiple",label:"数值是否携带子节点",type:"switch",mode:"inline",className:"w-full"},(0,r.getSchemaTpl)("joinValues"),(0,r.getSchemaTpl)("delimiter"),(0,r.getSchemaTpl)("extractValue"),(0,r.getSchemaTpl)("autoFill")]})]},{title:"外观",body:[(0,r.getSchemaTpl)("className",{label:"菜单类名",name:"menuClassName"})]}])],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.NestedSelectControlPlugin=i,(0,o.registerEditorPlugin)(i)},2125:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PickerControlPlugin=void 0;var a=n(752),r=a.__importDefault(n(6689)),o=n(1502),i=n(9547),l=n(9756),s=n(9933),u=n(3570),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="picker",t.$schema="/schemas/PickerControlSchema.json",t.name="列表选取",t.isBaseComponent=!0,t.icon="fa fa-window-restore",t.description="通过pickerSchema
配置可供选取的数据源进行选择需要的数据,支持多选",t.docLink="/amis/zh-CN/components/form/picker",t.tags=["表单项"],t.scaffold={type:"picker",label:"列表选取",name:"picker",options:[{label:"选项A",value:"A"},{label:"选项B",value:"B"}]},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="列表选取",t.panelBodyCreator=function(e){return[{type:"switch",name:"embed",mode:"inline",className:"w-full",label:"开启内嵌模式"},(0,i.getSchemaTpl)("switchDefaultValue"),{type:"input-text",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"'},(0,i.getSchemaTpl)("fieldSet",{title:"选项",body:[(0,i.getSchemaTpl)("options"),(0,i.getSchemaTpl)("api",{name:"source",label:"获取选项接口"}),{children:r.default.createElement(o.Button,{size:"sm",level:"danger",className:"m-b",onClick:t.editDetail.bind(t,e.id),block:!0},"配置选框详情")},{label:"labelTpl",type:"textarea",name:"labelTpl",labelRemark:"已选定数据的展示样式",description:'支持使用 \\${xxx}
来获取变量,或者用 lodash.template 语法来写模板逻辑。详情'},{type:"button-group-select",name:"modalMode",label:"选框类型",value:"dialog",size:"xs",options:[{label:"弹框",value:"dialog"},{label:"抽出式弹框",value:"drawer"}]},(0,i.getSchemaTpl)("multiple"),(0,i.getSchemaTpl)("joinValues"),(0,i.getSchemaTpl)("delimiter"),(0,i.getSchemaTpl)("extractValue"),(0,i.getSchemaTpl)("autoFill")]})]},t}return a.__extends(t,e),t.prototype.buildEditorToolbar=function(e,t){var n=e.id;e.info.renderer.name===this.rendererName&&t.push({icon:"fa fa-expand",order:100,tooltip:"配置选框详情",onClick:this.editDetail.bind(this,n)})},t.prototype.buildEditorContextMenu=function(e,t){var n=e.id;e.schema,e.region,e.info.renderer.name===this.rendererName&&t.push("|",{label:"配置选框详情",onSelect:this.editDetail.bind(this,n)})},t.prototype.editDetail=function(e){var t=this.manager,n=t.store,r=n.getNodeById(e),o=n.getValueOf(e);if(r&&o){var i=r.getComponent(),l=a.__assign(a.__assign({type:"crud",mode:"list"},o.pickerSchema||{listItem:{title:"${label}"}}),{api:o.source,pickerMode:!0,multiple:o.multiple});this.manager.openSubEditor({title:"配置选框详情",value:l,data:{options:i.props.options},onChange:function(e){delete(e=a.__assign(a.__assign({},o),{pickerSchema:a.__assign({},e),source:e.api})).pickerSchema.api,delete e.pickerSchema.type,delete e.pickerSchema.pickerMode,delete e.pickerSchema.multiple,t.panelChangeValue(e,(0,u.diff)(o,e))}})}},t}(s.BasePlugin);t.PickerControlPlugin=d,(0,l.registerEditorPlugin)(d)},4715:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.RadiosControlPlugin=void 0;var a=n(752),r=n(9547),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="radios",t.$schema="/schemas/RadiosControlSchema.json",t.order=-460,t.name="单选框",t.isBaseComponent=!0,t.icon="fa fa-dot-circle-o",t.description="通过options
配置选项,可通过source
拉取选项",t.docLink="/amis/zh-CN/components/form/radios",t.tags=["表单项"],t.scaffold={type:"radios",label:"单选框",name:"radios",options:[{label:"选项A",value:"A"},{label:"选项B",value:"B"}]},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign(a.__assign({},t.scaffold),{value:"A"})]},t.panelTitle="单选框",t.panelBody=[(0,r.getSchemaTpl)("tabs",[{title:"常规",body:[(0,r.getSchemaTpl)("switchDefaultValue"),{type:"radios",name:"value",label:"默认值",source:"${options}",visibleOn:'typeof this.value !== "undefined"',multiple:!0},{label:"是否默认选择第一个",name:"selectFirst",type:"switch",mode:"inline",className:"w-full"},(0,r.getSchemaTpl)("fieldSet",{title:"选项",body:[(0,r.getSchemaTpl)("options"),(0,r.getSchemaTpl)("source"),(0,r.getSchemaTpl)("joinValues",{visibleOn:!0}),(0,r.getSchemaTpl)("extractValue"),(0,r.getSchemaTpl)("autoFill")]})]},{title:"外观",body:[{label:"选项在一行显示",name:"inline",type:"switch",visibleOn:'data.mode != "inline"',mode:"inline",className:"w-full",pipeIn:(0,r.defaultValue)(!0)},{label:"每行显示多少列",name:"columnsCount",hiddenOn:'typeof data.inline === "undefined" || data.inline === true',type:"input-range",min:1,max:6,pipeIn:(0,r.defaultValue)(1)},(0,r.getSchemaTpl)("className",{label:"单个 Radio 的 CSS 类名",name:"itemClassName"})]}])],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.RadiosControlPlugin=i,(0,o.registerEditorPlugin)(i)},6311:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SelectControlPlugin=void 0;var a=n(752),r=a.__importDefault(n(6689)),o=n(1502),i=n(9547),l=n(9756),s=n(9933),u=a.__importDefault(n(5599)),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="select",t.$schema="/schemas/SelectControlSchema.json",t.order=-480,t.name="下拉框",t.isBaseComponent=!0,t.icon="fa fa-th-list",t.description="支持多选,输入提示,可使用source
获取选项",t.docLink="/amis/zh-CN/components/form/select",t.tags=["表单项"],t.scaffold={type:"select",label:"选项",name:"select",options:[{label:"选项A",value:"A"},{label:"选项B",value:"B"}]},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="下拉框",t.panelBody=[(0,i.getSchemaTpl)("switchDefaultValue"),{type:"select",name:"value",label:"默认值",source:"${options}",visibleOn:'!data.multiple && typeof this.value !== "undefined"'},{type:"select",name:"value",label:"默认值",source:"${options}",multiple:!0,visibleOn:' data.multiple && typeof this.value !== "undefined"'},(0,i.getSchemaTpl)("clearable"),{label:"可检索",name:"searchable",type:"switch",mode:"inline",className:"w-full"},{label:"是否默认选择第一个",name:"selectFirst",type:"switch",mode:"inline",className:"w-full"},(0,i.getSchemaTpl)("fieldSet",{title:"选项",body:[(0,i.getSchemaTpl)("multiple"),{label:"选中内容以单行模式显示",name:"valuesNoWrap",type:"switch",mode:"inline",className:"w-full",visibleOn:"this.multiple"},{label:"可全选",name:"checkAll",type:"switch",mode:"inline",value:!1,className:"w-full",onChange:function(e,t,n,a){e&&a.setValueByName("multiple",!0)}},{label:"自定义菜单模板",name:"menuTpl",type:"input-text"},{label:"默认全选",name:"defaultCheckAll",type:"switch",value:!1,visibleOn:"this.checkAll",mode:"inline",className:"w-full"},{type:"input-text",name:"checkAllLabel",label:'默认为 "全选" 的文字',visibleOn:"this.checkAll",value:"全选"},(0,i.getSchemaTpl)("options"),(0,i.getSchemaTpl)("source"),(0,i.getSchemaTpl)("api",{name:"autoComplete",label:"自动完成接口",description:"每次输入新内容后,将调用接口,根据接口返回更新选项。当前用户输入值在 \\${term}
中。"}),(0,i.getSchemaTpl)("joinValues"),(0,i.getSchemaTpl)("delimiter"),(0,i.getSchemaTpl)("extractValue"),(0,i.getSchemaTpl)("autoFill"),(0,i.getSchemaTpl)("creatable"),(0,i.getSchemaTpl)("createBtnLabel",{visibleOn:"data.creatable"}),(0,i.getSchemaTpl)("api",{label:"新增选项接口",name:"addApi",visibleOn:"data.creatable"}),{name:"addControls",visibleOn:"data.creatable",pipeIn:(0,i.defaultValue)([{type:"input-text",name:"label",label:!1,placeholder:"请输入名称"}]),asFormItem:!0,children:function(e){return r.default.createElement(o.Button,{size:"sm",level:"danger",className:"m-b",onClick:function(){var n={type:"dialog",body:[{type:"input-text",name:"label",label:!1,placeholder:"请输入名称"}]};e.value&&e.value.body&&(0,u.default)(e.value.body)?n.body=e.value.body:e.value&&(0,u.default)(e.value)&&(n.body=e.value),t.manager.openSubEditor({title:"配置新建选项表单项",value:n,onChange:function(t){return t&&t.body&&(0,u.default)(t.body)?e.onChange(t.body,"addControls"):e.onChange([],"addControls")}})},block:!0},"配置新建选项表单项")}},(0,i.getSchemaTpl)("editable"),(0,i.getSchemaTpl)("api",{label:"编辑选项接口",name:"editApi"}),(0,i.getSchemaTpl)("removable"),(0,i.getSchemaTpl)("api",{label:"删除选项接口",name:"deleteApi"})]})],t}return a.__extends(t,e),t}(s.BasePlugin);t.SelectControlPlugin=d,(0,l.registerEditorPlugin)(d)},7681:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StaticControlPlugin=void 0;var a=n(752),r=a.__importDefault(n(6689)),o=n(1502),i=n(9547),l=n(9756),s=n(9933),u=n(6374),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="static",t.$schema="/schemas/StaticControlSchema.json",t.order=-390,t.name="静态展示框",t.isBaseComponent=!0,t.icon="fa fa-info",t.description="纯用来展示数据,可用来展示json、date、image、progress
等数据",t.docLink="/amis/zh-CN/components/form/static",t.tags=["表单项"],t.scaffold={type:"static",label:"描述"},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign(a.__assign({},t.scaffold),{value:"静态值"})]},t.multifactor=!0,t.panelTitle="静态展示",t.panelBodyCreator=function(e){return[(0,i.getSchemaTpl)("switchDefaultValue"),{type:"input-text",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"'},{name:"quickEdit",label:"启用快速编辑",type:"switch",pipeIn:function(e){return!!e},mode:"inline",className:"w-full"},{visibleOn:"data.quickEdit",name:"quickEdit.mode",type:"button-group-select",value:"popOver",label:"快速编辑模式",size:"xs",mode:"inline",className:"w-full",options:[{label:"下拉",value:"popOver"},{label:"内嵌",value:"inline"}]},{visibleOn:"data.quickEdit",name:"quickEdit.saveImmediately",label:"是否立即保存",type:"switch",mode:"inline",className:"w-full",description:"开启后修改即提交,而不是标记修改批量提交。",descriptionClassName:"help-block m-b-none",pipeIn:function(e){return!!e}},(0,i.getSchemaTpl)("api",{label:"立即保存接口",description:"是否单独给立即保存配置接口,如果不配置,则默认使用quickSaveItemApi。",name:"quickEdit.saveImmediately.api",visibleOn:"this.quickEdit && this.quickEdit.saveImmediately"}),{visibleOn:"data.quickEdit",name:"quickEdit",asFormItem:!0,children:function(e){var n=e.value,i=e.onChange,l=e.data;!0===n&&(n={});var s=n.mode;return delete(n=a.__assign({type:"input-text",name:l.name},n)).mode,r.default.createElement(o.Button,{level:"info",className:"m-b",size:"sm",block:!0,onClick:function(){t.manager.openSubEditor({title:"配置快速编辑类型",value:n,slot:{type:"form",mode:"normal",body:["$$"],wrapWithPanel:!1},onChange:function(e){return i(a.__assign(a.__assign({},e),{mode:s}),"quickEdit")}})}},"配置快速编辑")}},{name:"popOver",label:"启用查看更多展示",type:"switch",pipeIn:function(e){return!!e},mode:"inline",className:"w-full"},{name:"popOver.mode",label:"查看更多弹出模式",type:"select",visibleOn:"data.popOver",pipeIn:(0,i.defaultValue)("popOver"),options:[{label:"默认",value:"popOver"},{label:"弹框",value:"dialog"},{label:"抽出式弹框",value:"drawer"}]},{name:"popOver.position",label:"查看更多弹出模式",type:"select",visibleOn:'data.popOver && data.popOver.mode === "popOver"',pipeIn:(0,i.defaultValue)("center"),options:[{label:"目标中部",value:"center"},{label:"目标左上角",value:"left-top"},{label:"目标右上角",value:"right-top"},{label:"目标左下角",value:"left-bottom"},{label:"目标右下角",value:"right-bottom"},{label:"页面左上角",value:"fixed-left-top"},{label:"页面右上角",value:"fixed-right-top"},{label:"页面左下角",value:"fixed-left-bottom"},{label:"页面右下角",value:"fixed-right-bottom"}]},{visibleOn:"data.popOver",name:"popOver",asFormItem:!0,children:function(e){var n=e.value,i=e.onChange;return n=a.__assign({type:"panel",title:"查看详情",body:"内容详情"},n),r.default.createElement(o.Button,{level:"info",className:"m-b",size:"sm",block:!0,onClick:function(){t.manager.openSubEditor({title:"配置查看更多展示内容",value:n,onChange:function(e){return i(e,"quickEdit")}})}},"查看更多内容配置")}},(0,i.getSchemaTpl)("borderMode"),{name:"copyable",label:"启用内容复制功能",type:"switch",pipeIn:function(e){return!!e},mode:"inline",className:"w-full"},{visibleOn:"data.copyable",name:"copyable.content",type:"textarea",label:"复制内容模板",description:"默认为当前字段值,可定制。"}]},t}return a.__extends(t,e),t.prototype.filterProps=function(e,t){return e.$$id=t.id,void 0===e.value&&(e.value=(0,u.mockValue)(e)),e},t}(s.BasePlugin);t.StaticControlPlugin=d,(0,l.registerEditorPlugin)(d)},9940:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SwitchControlPlugin=void 0;var a=n(752),r=n(9547),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="switch",t.$schema="/schemas/SwitchControlSchema.json",t.order=-400,t.name="开关",t.isBaseComponent=!0,t.icon="fa fa-toggle-on",t.description="开关控件",t.docLink="/amis/zh-CN/components/form/switch",t.tags=["表单项"],t.scaffold={type:"switch",option:"开关",name:"switch",falseValue:!1,trueValue:!0},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign(a.__assign({},t.scaffold),{label:"开关表单"})]},t.panelTitle="开关",t.panelBody=[(0,r.getSchemaTpl)("switchDefaultValue",{pipeOut:function(e,t,n){return e?n.trueValue:void 0}}),{type:"switch",name:"value",label:"默认勾选",mode:"inline",className:"w-full",visibleOn:'typeof this.value !== "undefined"',pipeOut:function(e,t,n){return e?n.trueValue:n.falseValue}},{name:"option",type:"input-text",label:"选项说明"},{label:"选项位置",name:"optionAtLeft",type:"button-group-select",size:"sm",value:!1,options:[{label:"左",value:!0},{label:"右",value:!1}]},{type:"input-text",label:"勾选后的值",name:"trueValue",value:!0,pipeOut:r.valuePipeOut},{type:"input-text",label:"未勾选的值",name:"falseValue",value:!1,pipeOut:r.valuePipeOut},{name:"onText",type:"input-text",label:"开启时的文本"},{name:"offText",type:"input-text",label:"关闭时的文本"}],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.SwitchControlPlugin=i,(0,o.registerEditorPlugin)(i)},9352:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TabsTransferPlugin=void 0;var a=n(752),r=n(9547),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="tabs-transfer",t.$schema="/schemas/TransferControlSchema.json",t.name="组合穿梭器",t.isBaseComponent=!0,t.icon="fa fa-th-list",t.description="组合穿梭器组件",t.docLink="/amis/zh-CN/components/form/transfer",t.tags=["表单项"],t.scaffold={label:"组合穿梭器",type:"tabs-transfer",name:"a",sortable:!0,searchable:!0,options:[{label:"成员",selectMode:"tree",children:[{label:"法师",children:[{label:"诸葛亮",value:"zhugeliang"}]},{label:"战士",children:[{label:"曹操",value:"caocao"},{label:"钟无艳",value:"zhongwuyan"}]},{label:"打野",children:[{label:"李白",value:"libai"},{label:"韩信",value:"hanxin"},{label:"云中君",value:"yunzhongjun"}]}]},{label:"用户",selectMode:"chained",children:[{label:"法师",children:[{label:"诸葛亮",value:"zhugeliang2"}]},{label:"战士",children:[{label:"曹操",value:"caocao2"},{label:"钟无艳",value:"zhongwuyan2"}]},{label:"打野",children:[{label:"李白",value:"libai2"},{label:"韩信",value:"hanxin2"},{label:"云中君",value:"yunzhongjun2"}]}]}]},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="组合穿梭器",t.panelDefinitions={options:{label:"选项 Options",name:"options",type:"combo",multiple:!0,multiLine:!0,draggable:!0,addButtonText:"新增选项",scaffold:{label:"",value:""},items:[{type:"group",body:[{type:"input-text",name:"label",placeholder:"名称",required:!0},{type:"input-text",name:"value",placeholder:"值",unique:!0}]},{$ref:"options",label:"子选项",name:"children",addButtonText:"新增子选项"}]}},t.panelBody=[(0,r.getSchemaTpl)("switchDefaultValue"),{type:"select",name:"value",label:"默认值",source:"${options}",multiple:!0,visibleOn:'typeof this.value !== "undefined"'},{label:"可检索",name:"searchable",type:"switch",mode:"inline",className:"w-full"},(0,r.getSchemaTpl)("api",{label:"检索接口",name:"searchApi"}),{label:"查询时勾选展示模式",name:"searchResultMode",type:"select",mode:"inline",className:"w-full",options:[{label:"列表形式",value:"list"},{label:"表格形式",value:"table"},{label:"树形选择形式",value:"tree"},{label:"级联选择形式",value:"chained"}]},{label:"可排序",name:"sortable",type:"switch",mode:"inline",className:"w-full"},{label:"左侧的标题文字",name:"selectTitle",type:"input-text"},{label:"右侧结果的标题文字",name:"resultTitle",type:"input-text"},(0,r.getSchemaTpl)("fieldSet",{title:"选项",body:[{$ref:"options",name:"options"},(0,r.getSchemaTpl)("source"),(0,r.getSchemaTpl)("joinValues"),(0,r.getSchemaTpl)("delimiter"),(0,r.getSchemaTpl)("extractValue"),(0,r.getSchemaTpl)("autoFill")]})],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.TabsTransferPlugin=i,(0,o.registerEditorPlugin)(i)},9351:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TextareaControlPlugin=void 0;var a=n(752),r=n(9547),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="textarea",t.$schema="/schemas/TextareaControlSchema.json",t.order=-490,t.name="多行文本框",t.isBaseComponent=!0,t.icon="fa fa-paragraph",t.description="支持换行输入",t.docLink="/amis/zh-CN/components/form/textarea",t.tags=["表单项"],t.scaffold={type:"textarea",label:"多行文本",name:"textarea"},t.previewSchema={type:"form",className:"text-left",wrapWithPanel:!1,mode:"horizontal",body:a.__assign({},t.scaffold)},t.panelTitle="多行文本",t.panelBody=[(0,r.getSchemaTpl)("switchDefaultValue"),{type:"textarea",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"'},{type:"input-number",name:"minRows",value:3,label:"最小行数"},{type:"input-number",name:"maxRows",value:20,label:"最大行数"},{type:"input-number",name:"minLength",value:5,label:"最小字数限制"},{type:"input-number",name:"maxLength",value:120,label:"最大字数限制"},(0,r.getSchemaTpl)("showCounter"),{type:"switch",name:"readOnly",label:"是否只读"},{type:"switch",name:"trimContents",label:"去除首尾空白",mode:"inline",className:"w-full",description:"开启后,将不允许用户输入前后空格"}],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.TextareaControlPlugin=i,(0,o.registerEditorPlugin)(i)},6682:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TransferPlugin=void 0;var a=n(752),r=n(9547),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="transfer",t.$schema="/schemas/TransferControlSchema.json",t.name="穿梭器",t.isBaseComponent=!0,t.icon="fa fa-th-list",t.description="穿梭器组件",t.docLink="/amis/zh-CN/components/form/transfer",t.tags=["表单项"],t.scaffold={label:"分组",type:"transfer",name:"transfer",options:[{label:"法师",children:[{label:"诸葛亮",value:"zhugeliang"}]},{label:"战士",children:[{label:"曹操",value:"caocao"},{label:"钟无艳",value:"zhongwuyan"}]},{label:"打野",children:[{label:"李白",value:"libai"},{label:"韩信",value:"hanxin"},{label:"云中君",value:"yunzhongjun"}]}]},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="穿梭器",t.panelDefinitions={options:{label:"选项 Options",name:"options",type:"combo",multiple:!0,multiLine:!0,draggable:!0,addButtonText:"新增选项",scaffold:{label:"",value:""},items:[{type:"group",body:[{type:"input-text",name:"label",placeholder:"名称",required:!0},{type:"input-text",name:"value",placeholder:"值",unique:!0}]},{$ref:"options",label:"子选项",name:"children",addButtonText:"新增子选项"}]}},t.panelBody=[(0,r.getSchemaTpl)("switchDefaultValue"),{type:"select",name:"value",label:"默认值",source:"${options}",visibleOn:'!data.multiple && typeof this.value !== "undefined"'},{type:"select",name:"value",label:"默认值",source:"${options}",multiple:!0,visibleOn:' data.multiple && typeof this.value !== "undefined"'},{label:"勾选展示模式",name:"selectMode",type:"select",mode:"inline",className:"w-full",options:[{label:"列表形式",value:"list"},{label:"表格形式",value:"table"},{label:"树形选择形式",value:"tree"},{label:"级联选择形式",value:"chained"},{label:"关联选择形式",value:"associated"}]},{name:"columns",type:"combo",multiple:!0,label:!1,strictMode:!1,addButtonText:"新增一列",draggable:!1,visibleOn:'data.selectMode === "table"',items:[{type:"input-text",name:"label",placeholder:"标题"},{type:"input-text",name:"name",placeholder:"绑定字段名"},{type:"select",name:"type",placeholder:"类型",value:"input-text",options:[{value:"text",label:"纯文本"},{value:"tpl",label:"模板"},{value:"image",label:"图片"},{value:"date",label:"日期"},{value:"progress",label:"进度"},{value:"status",label:"状态"},{value:"mapping",label:"映射"},{value:"operation",label:"操作栏"}]}]},{$ref:"options",label:"左边的选项集",name:"leftOptions",visibleOn:'data.selectMode === "associated"'},{label:"左侧选择形式",name:"leftMode",type:"select",mode:"inline",className:"w-full",visibleOn:'data.selectMode === "associated"',options:[{label:"列表形式",value:"list"},{label:"树形选择形式",value:"tree"}]},{label:"右侧选择形式",name:"rightMode",type:"select",mode:"inline",className:"w-full",visibleOn:'data.selectMode === "associated"',options:[{label:"列表形式",value:"list"},{label:"树形选择形式",value:"tree"}]},{label:"可检索",name:"searchable",type:"switch",mode:"inline",className:"w-full"},(0,r.getSchemaTpl)("api",{label:"检索接口",name:"searchApi"}),{label:"查询时勾选展示模式",name:"searchResultMode",type:"select",mode:"inline",className:"w-full",options:[{label:"列表形式",value:"list"},{label:"表格形式",value:"table"},{label:"树形选择形式",value:"tree"},{label:"级联选择形式",value:"chained"}]},{label:"可排序",name:"sortable",type:"switch",mode:"inline",className:"w-full"},{label:"是否默认选择第一个",name:"selectFirst",type:"switch",mode:"inline",className:"w-full"},{label:"是否显示统计数据",name:"statistics",type:"switch",mode:"inline",className:"w-full"},{label:"左侧的标题文字",name:"selectTitle",type:"input-text"},{label:"右侧结果的标题文字",name:"resultTitle",type:"input-text"},(0,r.getSchemaTpl)("fieldSet",{title:"选项",body:[{$ref:"options",name:"options"},(0,r.getSchemaTpl)("source"),(0,r.getSchemaTpl)("joinValues"),(0,r.getSchemaTpl)("delimiter"),(0,r.getSchemaTpl)("extractValue"),(0,r.getSchemaTpl)("autoFill")]})],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.TransferPlugin=i,(0,o.registerEditorPlugin)(i)},3914:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TreeSelectControlPlugin=void 0;var a=n(752),r=n(9547),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="tree-select",t.$schema="/schemas/TreeSelectControlSchema.json",t.name="树下拉框",t.isBaseComponent=!0,t.icon="fa fa-chevron-down",t.description="点击输入框,弹出树型选择框进行选择",t.docLink="/amis/zh-CN/components/form/treeselect",t.tags=["表单项"],t.scaffold={type:"tree-select",label:"树下拉框",name:"tree-select",options:[{label:"选项A",value:"A",children:[{label:"选项C",value:"C"},{label:"选项D",value:"D"}]},{label:"选项B",value:"B"}]},t.previewSchema={type:"form",className:"text-left",mode:"horizontal",wrapWithPanel:!1,body:a.__assign({},t.scaffold)},t.panelTitle="树下拉",t.panelDefinitions={options:{label:"选项 Options",name:"options",type:"combo",multiple:!0,multiLine:!0,draggable:!0,addButtonText:"新增选项",scaffold:{label:"",value:""},items:[{type:"group",body:[{type:"input-text",name:"label",placeholder:"名称",required:!0},{type:"input-text",name:"value",placeholder:"值",unique:!0}]},{$ref:"options",label:"子选项",name:"children",addButtonText:"新增子选项"}]}},t.panelBody=[(0,r.getSchemaTpl)("switchDefaultValue"),{type:"input-text",name:"value",label:"默认值",visibleOn:'typeof this.value !== "undefined"'},(0,r.getSchemaTpl)("clearable"),{type:"switch",name:"hideNodePathLabel",label:"隐藏选中节点的祖先节点文本信息",mode:"inline",className:"w-full"},(0,r.getSchemaTpl)("fieldSet",{title:"选项",body:[{$ref:"options",name:"options"},(0,r.getSchemaTpl)("source",{sampleBuilder:function(e){return JSON.stringify({status:0,msg:"",data:{options:[{label:"选项A",value:"a",children:[{label:"子选项",value:"c"}]},{label:"选项B",value:"b"}]}},null,2)}}),(0,r.getSchemaTpl)("api",{name:"autoComplete",label:"自动完成接口",description:"每次输入新内容后,将调用接口,根据接口返回更新选项。当前用户输入值在 `\\${term}` 中。请不要与获取选项接口同时设置。
"}),{name:"initiallyOpen",label:"是否默认展开子选项",type:"switch",mode:"inline",className:"w-full",pipeIn:(0,r.defaultValue)(!0)},{type:"input-text",name:"unfoldedLevel",label:"选项默认展开级数",visibleOn:'typeof this.initiallyOpen !== "undefined" || !this.initiallyOpen'},{name:"showIcon",label:"是否显示图标",type:"switch",mode:"inline",className:"w-full",pipeIn:(0,r.defaultValue)(!0)},{label:"可搜索?",name:"searchable",type:"switch",mode:"inline",className:"w-full"},{label:"是否显示单选按钮",name:"showRadio",type:"switch",mode:"inline",className:"w-full",visibleOn:"!data.multiple"},(0,r.getSchemaTpl)("multiple"),{name:"cascade",visibleOn:"data.multiple",label:"不自动选中子节点?",description:"选中父级时,孩子节点是否自动选中",type:"switch",mode:"inline",className:"w-full"},{name:"withChildren",visibleOn:"data.cascade !== true && data.multiple",label:"数值是否携带子节点",type:"switch",mode:"inline",className:"w-full"},{name:"onlyChildren",visibleOn:"data.cascade !== true && data.multiple",label:"数值是否只包含子节点",disabledOn:"data.withChildren",type:"switch",mode:"inline",className:"w-full"},(0,r.getSchemaTpl)("joinValues"),(0,r.getSchemaTpl)("delimiter"),(0,r.getSchemaTpl)("extractValue"),(0,r.getSchemaTpl)("autoFill"),(0,r.getSchemaTpl)("creatable"),(0,r.getSchemaTpl)("api",{label:"新增选项接口",name:"addApi"}),(0,r.getSchemaTpl)("editable"),(0,r.getSchemaTpl)("api",{label:"编辑选项接口",name:"editApi"}),(0,r.getSchemaTpl)("removable"),(0,r.getSchemaTpl)("api",{label:"删除选项接口",name:"deleteApi"})]})],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.TreeSelectControlPlugin=i,(0,o.registerEditorPlugin)(i)},8746:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.UUIDControlPlugin=void 0;var a=n(752),r=a.__importDefault(n(6689)),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="uuid",t.$schema="/schemas/UUIDControlSchema.json",t.name="UUID",t.isBaseComponent=!0,t.icon="fa fa-eye-slash",t.description="自动生成的 UUID",t.docLink="/amis/zh-CN/components/form/uuid",t.tags=["表单项"],t.scaffold={type:"uuid",name:"uuid"},t.previewSchema={type:"form",wrapWithPanel:!1,body:[a.__assign({},t.scaffold)]},t.panelTitle="UUID",t.panelBody=[{type:"static",value:"自动按 UUID v4 格式生成,无需配置"}],t}return a.__extends(t,e),t.prototype.renderRenderer=function(e){return r.default.createElement("div",{key:e.key,className:"wrapper-sm b-a b-light m-b-sm"},r.default.createElement("span",{className:"text-muted"},"UUID(展现将隐藏)"))},t}(n(9933).BasePlugin);t.UUIDControlPlugin=i,(0,o.registerEditorPlugin)(i)},4887:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.GridPlugin=void 0;var a=n(752),r=n(1502),o=a.__importDefault(n(6689)),i=n(9756),l=n(9933),s=n(9547),u=n(5863),d=n(1548),c=n(9942),p=n(3570),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="grid",t.$schema="/schemas/GridSchema.json",t.name="分栏",t.isBaseComponent=!0,t.description="分栏布局",t.docLink="/amis/zh-CN/components/grid",t.tags=["容器"],t.icon="fa fa-th",t.scaffold={type:"grid",columns:[{body:[]},{body:[]}]},t.previewSchema={type:"grid",columns:[{body:[{type:"tpl",tpl:"栏",inline:!1,className:"bg-light wrapper"}]},{body:[{type:"tpl",tpl:"栏",className:"bg-light wrapper",inline:!1}]}]},t.panelTitle="分栏布局",t.panelWithOutOthers=!1,t.vRendererConfig={regions:{body:{key:"body",label:"内容区",placeholder:"栏",wrapperResolve:function(e){return e}}},panelTitle:"栏",panelBodyCreator:function(e){var n=e.node.host;return[(0,s.getSchemaTpl)("fieldSet",{title:"插入",collapsable:!1,body:[{type:"wrapper",size:"none",className:"grid grid-cols-2 gap-4",body:[n.isSecondFactor?null:{children:o.default.createElement(r.Button,{size:"sm",onClick:function(){return t.insertRowAfter(e.node.host)}},o.default.createElement(c.Icon,{className:"icon",icon:"arrow-to-bottom"}),o.default.createElement("span",null,"下方插入新行"))},n.isSecondFactor?null:{children:o.default.createElement(r.Button,{size:"sm",onClick:function(){return t.insertRowBefore(e.node.host)}},o.default.createElement(c.Icon,{className:"icon",icon:"top-arrow-to-top"}),o.default.createElement("span",null,"上方插入新行"))},{children:o.default.createElement(r.Button,{size:"sm",onClick:function(){return t.insertColumnBefore(e)}},o.default.createElement(c.Icon,{className:"icon",icon:"left-arrow-to-left"}),o.default.createElement("span",null,"左侧插入新列"))},{children:o.default.createElement(r.Button,{size:"sm",onClick:function(){return t.insertColumnAfter(e)}},o.default.createElement(c.Icon,{className:"icon",icon:"arrow-to-right"}),o.default.createElement("span",null,"右侧插入新列"))}].filter((function(e){return e}))}]}),(0,s.getSchemaTpl)("fieldSet",{title:"宽度设置",collapsable:!1,body:[{type:"button-group-select",name:"md",size:"sm",label:!1,pipeIn:function(e){return"number"==typeof e?"manual":e||""},pipeOut:function(e){return"manual"===e?1:e},tiled:!0,options:[{value:"",label:"适配宽度"},{value:"auto",label:"适配内容"},{value:"manual",label:"手动"}]},{visibleOn:'typeof this.md === "number"',label:"宽度占比",type:"input-range",name:"md",min:1,max:12,step:1}]}),(0,s.getSchemaTpl)("fieldSet",{title:"垂直对齐",collapsable:!1,body:[{type:"button-group-select",name:"valign",size:"sm",label:!1,tiled:!0,clearable:!0,options:[{value:"top",label:"顶部对齐"},{value:"middle",label:"中间对齐"},{value:"bottom",label:"底部对齐"},{value:"between",label:"两端对齐"}]}]}),t.panelWithOutOthers?null:(0,s.getSchemaTpl)("fieldSet",{title:"CSS 设置",body:[(0,s.getSchemaTpl)("className",{label:"栏 CSS 类名",name:"columnClassName"})]})].filter((function(e){return e}))}},t.vWrapperResolve=function(e){return e},t.overrides={renderColumn:function(e,t,n){var a,r,i=this.super(e,t,n),l=this.props.$$editor;if(l&&e.$$id){var s=l.plugin,c=null===(r=null===(a=s.vRendererConfig)||void 0===a?void 0:a.regions)||void 0===r?void 0:r.body;return c?o.default.createElement(u.VRenderer,{key:"".concat(e.$$id,"-").concat(t),plugin:l.plugin,renderer:l.renderer,$schema:"/schemas/GridColumn.json",hostId:l.id,memberIndex:t,name:"第".concat(t+1,"栏"),id:e.$$id,draggable:!1,schemaPath:"".concat(l.schemaPath,"/grid/").concat(t),wrapperResolve:s.vWrapperResolve,path:"".concat(this.props.$path,"/").concat(t),data:this.props.data,widthMutable:!0},c?o.default.createElement(d.RegionWrapper,{key:c.key,preferTag:c.preferTag,name:c.key,label:c.label,regionConfig:c,placeholder:c.placeholder,editorStore:s.manager.store,manager:s.manager,children:i,wrapperResolve:c.wrapperResolve,rendererName:l.renderer.name}):i):i}return i}},t}return a.__extends(t,e),t.prototype.panelBodyCreator=function(e){var t=this,n=e.secondFactor;return[(0,s.getSchemaTpl)("fieldSet",{title:"插入",collapsable:!1,body:[n?null:{type:"wrapper",size:"none",className:"grid grid-cols-2 gap-4 mb-4",body:[{children:o.default.createElement(r.Button,{size:"sm",onClick:function(){return t.insertRowAfter(e.node)}},o.default.createElement(c.Icon,{className:"icon",icon:"arrow-to-bottom"}),o.default.createElement("span",null,"下方插入新行"))},{children:o.default.createElement(r.Button,{size:"sm",onClick:function(){return t.insertRowBefore(e.node)}},o.default.createElement(c.Icon,{className:"icon",icon:"top-arrow-to-top"}),o.default.createElement("span",null,"上方插入新行"))}]},{label:"列数",name:"columns",type:"select",pipeIn:function(e){return Array.isArray(e)?e.length:void 0},pipeOut:function(e,t){return Array.isArray(t)&&(t.length>e?(t=t.concat()).splice(e-1,t.length-e):t=t.concat((0,p.repeatArray)({body:[]},e-t.length))),t},options:(0,p.repeatArray)(null,12).map((function(e,t){return{label:"".concat(t+1),value:t+1}}))},{type:"button-group-select",name:"gap",label:"列间距",size:"sm",clearable:!0,tiled:!0,options:[{label:"无",value:"none"},{label:"极小",value:"xs"},{label:"小",value:"sm"},{label:"正常",value:"base"},{label:"中",value:"md"},{label:"大",value:"lg"}]}].filter((function(e){return e}))}),(0,s.getSchemaTpl)("fieldSet",{title:"对齐",collapsable:!1,body:[{type:"button-group-select",name:"align",size:"sm",label:"水平对齐",tiled:!0,pipeIn:(0,s.defaultValue)("left"),options:[{value:"left",label:"左对齐"},{value:"center",label:"中间对齐"},{value:"right",label:"右对齐"},{value:"between",label:"两端对齐"}]},{type:"button-group-select",name:"valign",size:"sm",label:"垂直对齐",tiled:!0,pipeIn:(0,s.defaultValue)("top"),options:[{value:"top",label:"顶部对齐"},{value:"middle",label:"中间对齐"},{value:"bottom",label:"底部对齐"},{value:"between",label:"两端对齐"}]}]}),this.panelWithOutOthers?null:(0,s.getSchemaTpl)("fieldSet",{title:"其他",collapsable:!0,body:[(0,s.getSchemaTpl)("className"),(0,s.getSchemaTpl)("subFormItemMode"),(0,s.getSchemaTpl)("subFormHorizontalMode"),(0,s.getSchemaTpl)("subFormHorizontal")]})].filter((function(e){return e}))},t.prototype.afterResolveJsonSchema=function(e){var t,n,a=null===(t=e.context.node.parent)||void 0===t?void 0:t.host;(null===(n=null==a?void 0:a.info)||void 0===n?void 0:n.plugin)===this&&e.setData("/schemas/GridColumn.json")},t.prototype.buildEditorContextMenu=function(e,t){var n,a=this;e.selections.length||(null===(n=e.info)||void 0===n?void 0:n.plugin)!==this||(e.node.isVitualRenderer?(t.push("|"),t.push({label:"左侧插入一栏",onSelect:function(){return a.insertColumnBefore(e)}}),t.push({label:"右侧插入一栏",onSelect:function(){return a.insertColumnAfter(e)}}),t.push("|"),t.push({label:"上方插入一行",onSelect:function(){return a.insertRowBefore(e.node.host)}}),t.push({label:"下方插入一行",onSelect:function(){return a.insertRowAfter(e.node.host)}})):(t.push("|"),t.push({label:"上方插入一行",onSelect:function(){return a.insertRowBefore(e.node)}}),t.push({label:"下方插入一行",onSelect:function(){return a.insertRowAfter(e.node)}})))},t.prototype.onWidthChangeStart=function(e){var t,n,r=e.context,o=r.node;if((null===(t=o.info)||void 0===t?void 0:t.plugin)===this){var i=o.host;if(i&&(null===(n=i.info)||void 0===n?void 0:n.plugin)===this){var l=r.dom,s=l.parentElement;if(s){var u=r.resizer,d=s.getBoundingClientRect(),c=i.schema.columns,p=o.index,f=c[p].md,m=l.getBoundingClientRect();e.setData({onMove:function(e){var t=e.pageX-m.left,n=f=Math.max(1,Math.min(12,Math.round(12*t/d.width)));(c=c.concat())[p]=a.__assign(a.__assign({},c[p]),{md:n}),u.setAttribute("data-value","".concat(n)),i.updateState({columns:c}),requestAnimationFrame((function(){o.calculateHighlightBox()}))},onEnd:function(){i.updateState({},!0),u.removeAttribute("data-value"),o.updateSchema({md:f}),requestAnimationFrame((function(){o.calculateHighlightBox()}))}})}}}},t.prototype.insertRowAfter=function(e){var t,n=this;if((null===(t=e.info)||void 0===t?void 0:t.plugin)===this){var a=this.manager.store,r=a.schema,o=e.id;a.traceableSetSchema((0,p.JSONChangeInArray)(r,o,(function(e,t,a){e.splice(a+1,0,(0,p.JSONPipeIn)({type:n.rendererName||"grid",align:t.align,valign:t.valign,columns:t.columns.map((function(e){return{body:[],md:null==e?void 0:e.md}}))}))})))}},t.prototype.insertRowBefore=function(e){var t,n=this;if((null===(t=e.info)||void 0===t?void 0:t.plugin)===this){var a=this.manager.store,r=a.schema,o=e.id;a.traceableSetSchema((0,p.JSONChangeInArray)(r,o,(function(e,t,a){e.splice(a,0,(0,p.JSONPipeIn)({type:n.rendererName||"grid",align:t.align,valign:t.valign,columns:t.columns.map((function(e){return{body:[],md:null==e?void 0:e.md}}))}))})))}},t.prototype.insertColumnBefore=function(e){var t;if((null===(t=e.node.info)||void 0===t?void 0:t.plugin)===this){var n=this.manager.store,a=e.id,r=n.schema;n.traceableSetSchema((0,p.JSONChangeInArray)(r,a,(function(e,t,n){e.splice(n,0,(0,p.JSONPipeIn)({body:[]}))})))}},t.prototype.insertColumnAfter=function(e){var t;if((null===(t=e.node.info)||void 0===t?void 0:t.plugin)===this){var n=this.manager.store,a=n.schema,r=e.id;n.traceableSetSchema((0,p.JSONChangeInArray)(a,r,(function(e,t,n){e.splice(n+1,0,(0,p.JSONPipeIn)({body:[]}))})))}},t}(l.BasePlugin);t.GridPlugin=f,(0,i.registerEditorPlugin)(f)},2629:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.HBoxPlugin=void 0;var a=n(752),r=n(1502),o=a.__importDefault(n(6689)),i=n(9756),l=n(9933),s=n(9547),u=n(5863),d=n(1548),c=n(3570),p=n(9942),f=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="hbox",t.$schema="/schemas/HBoxSchema.json",t.disabledRendererPlugin=!0,t.name="HBox",t.isBaseComponent=!0,t.icon="fa fa-columns",t.description="用来实现左右排版布局,默认平均分配,可以通过 columnClassName 配置某列的宽度。",t.docLink="/amis/zh-CN/components/hbox",t.tags=["容器"],t.scaffold={type:"hbox",gap:"base",columns:[{body:[]},{body:[]}]},t.previewSchema={type:"hbox",columns:[{type:"tpl",tpl:"固定宽度name
与变量关联。",t.tags=["展示"],t.icon="fa fa-photo",t.scaffold={type:"image"},t.previewSchema=a.__assign(a.__assign({},t.scaffold),{thumbMode:"cover",value:(0,l.mockValue)({type:"image"})}),t.panelTitle="图片",t.panelBodyCreator=function(e){var t=/\/field\/\w+$/.test(e.path);return[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[{name:"imageMode",label:"展示模式",type:"select",pipeIn:(0,i.defaultValue)("thumb"),options:[{label:"缩率图",value:"thumb"},{label:"原图",value:"original"}]},{name:"title",type:"input-text",label:"图片标题"},{name:"imageCaption",type:"input-text",label:"图片描述"},{name:"width",label:"宽度",type:"input-number"},{name:"height",label:"高度",type:"input-number"},t?null:(0,i.getSchemaTpl)("imageUrl",{name:"src",type:"input-text",label:"缩略图地址",description:"如果已绑定字段名,可以不用设置,支持用变量。"}),{type:"input-text",label:"打开外部链接",name:"href"},(0,i.getSchemaTpl)("imageUrl",{name:"defaultImage",label:"无数据时显示的图片"})]},{title:"外观",body:[{type:"switch",name:"enlargeAble",label:"开启图片放大功能",mode:"inline",className:"w-full"},(0,i.getSchemaTpl)("imageUrl",{name:"originalSrc",visibleOn:"this.enlargeAble",label:"原图地址",description:"如果不配置将默认使用缩略图地址。"}),{type:"switch",name:"showDimensions",label:"是否显示图片尺寸",mode:"inline",className:"w-full"},{name:"thumbMode",type:"button-group-select",label:"缩略图展示模式",size:"sm",pipeIn:(0,i.defaultValue)("contain"),options:[{label:"宽度占满",value:"w-full"},{label:"高度占满",value:"h-full"},{label:"包含",value:"contain"},{label:"铺满",value:"cover"}]},{name:"thumbRatio",type:"button-group-select",label:"缩略图比率",size:"sm",pipeIn:(0,i.defaultValue)("1:1"),options:[{label:"1:1",value:"1:1"},{label:"4:3",value:"4:3"},{label:"16:9",value:"16:9"}]},(0,i.getSchemaTpl)("className",{autoComplete:!1}),(0,i.getSchemaTpl)("className",{name:"imageClassName",label:"图片 CSS 类名"}),(0,i.getSchemaTpl)("className",{name:"thumbClassName",label:"缩略图 CSS 类名"})]},{title:"显隐",body:[(0,i.getSchemaTpl)("visible")]}])]},t}return a.__extends(t,e),t.prototype.onActive=function(e){var t,n=e.context;if((null===(t=n.info)||void 0===t?void 0:t.plugin)===this&&n.node){var a=n.node;a.setHeightMutable(!0),a.setWidthMutable(!0)}},t.prototype.onWidthChangeStart=function(e){return this.onSizeChangeStart(e,"horizontal")},t.prototype.onHeightChangeStart=function(e){return this.onSizeChangeStart(e,"vertical")},t.prototype.onSizeChangeStart=function(e,t){var n;void 0===t&&(t="both");var a=e.context,r=a.node;if((null===(n=r.info)||void 0===n?void 0:n.plugin)===this){var o=a.resizer,i=a.dom,l=i.parentElement.getBoundingClientRect(),s=i.getBoundingClientRect(),u=a.nativeEvent.pageX,d=a.nativeEvent.pageY;e.setData({onMove:function(e){var n=e.pageY-d,a=e.pageX-u,i=Math.max(50,s.height+n),c=Math.max(100,Math.min(s.width+a,l.width)),p={width:c,height:i};"both"===t?o.setAttribute("data-value","".concat(c,"px x ").concat(i,"px")):"vertical"===t?(o.setAttribute("data-value","".concat(i,"px")),delete p.width):(o.setAttribute("data-value","".concat(c,"px")),delete p.height),r.updateState(p),requestAnimationFrame((function(){r.calculateHighlightBox()}))},onEnd:function(e){var n=e.pageY-d,a=e.pageX-u,i=Math.max(50,s.height+n),c={width:Math.max(100,Math.min(s.width+a,l.width)),height:i};"vertical"===t?delete c.width:"horizontal"===t&&delete c.height,o.removeAttribute("data-value"),r.updateSchema(c),requestAnimationFrame((function(){r.calculateHighlightBox()}))}})}},t}(o.BasePlugin);t.ImagePlugin=s,(0,r.registerEditorPlugin)(s)},4610:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ImagesPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=n(6374),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="images",t.$schema="/schemas/ImagesSchema.json",t.name="图片集",t.isBaseComponent=!0,t.description="展示多张图片",t.tags=["展示"],t.icon="fa fa-clone",t.scaffold={type:"images"},t.previewSchema=a.__assign(a.__assign({},t.scaffold),{listClassName:"nowrap",thumbMode:"cover",value:[{title:"图片1",image:(0,l.mockValue)({type:"image"}),src:(0,l.mockValue)({type:"image"})},{title:"图片2",image:(0,l.mockValue)({type:"image"}),src:(0,l.mockValue)({type:"image"})}]}),t.panelTitle="图片集",t.panelBodyCreator=function(e){var t=/\/field\/\w+$/.test(e.path);return[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:(t?[]:[{type:"formula",name:"__mode",autoSet:!1,formula:"!this.name && !this.source && Array.isArray(this.options) ? 2 : 1"},{label:"数据源",name:"__mode",type:"button-group-select",size:"xs",mode:"inline",className:"w-full",options:[{label:"关联字段",value:1},{label:"静态设置",value:2}],onChange:function(e,t,n,a){e!==t&&1==e&&a.deleteValueByName("options")}},{name:"source",type:"input-text",label:"关联数据",description:"比如:\\${listVar},用来关联作用域中的已有数据。",visibleOn:"this.__mode == 1"},{type:"combo",name:"options",visibleOn:"this.__mode == 2",minLength:1,label:"图片集数据",multiple:!0,multiLine:!0,addable:!0,removable:!0,items:[(0,i.getSchemaTpl)("imageUrl",{name:"image",label:"缩略图"}),(0,i.getSchemaTpl)("imageUrl",{name:"src",label:"原图"}),{type:"input-text",label:"图片标题",name:"title"},{type:"textarea",label:"图片描述",name:"caption"}]}]).concat([(0,i.getSchemaTpl)("imageUrl",{name:"defaultImage",label:"无数据时显示的图片"})])},{title:"外观",body:[{type:"switch",name:"enlargeAble",label:"开启图片放大功能",mode:"inline",className:"w-full"},{name:"originalSrc",visibleOn:"this.enlargeAble",type:"input-text",label:"原图地址",description:"如果不配置将默认使用缩略图地址。"},{type:"switch",name:"showDimensions",label:"是否显示图片尺寸",mode:"inline",className:"w-full"},{name:"thumbMode",type:"button-group-select",label:"缩略图展示模式",size:"sm",pipeIn:(0,i.defaultValue)("contain"),options:[{label:"宽度占满",value:"w-full"},{label:"高度占满",value:"h-full"},{label:"包含",value:"contain"},{label:"铺满",value:"cover"}]},{name:"thumbRatio",type:"button-group-select",label:"缩略图比率",size:"sm",pipeIn:(0,i.defaultValue)("1:1"),options:[{label:"1:1",value:"1:1"},{label:"4:3",value:"4:3"},{label:"16:9",value:"16:9"}]},(0,i.getSchemaTpl)("className",{autoComplete:!1}),(0,i.getSchemaTpl)("className",{name:"listClassName",label:"图片列表 CSS 类名"})]},{title:"显隐",body:[(0,i.getSchemaTpl)("visible")]}])]},t}return a.__extends(t,e),t}(o.BasePlugin);t.ImagesPlugin=s,(0,r.registerEditorPlugin)(s)},7197:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.JsonPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=n(8579),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="json",t.$schema="/schemas/JsonSchema.json",t.name="JSON展示",t.isBaseComponent=!0,t.description="用来展示 JSON 数据。",t.docLink="/amis/zh-CN/components/json",t.tags=["展示"],t.icon="fa fa-code",t.scaffold={type:"json"},t.previewSchema=a.__assign(a.__assign({},t.scaffold),{name:"json",value:{a:1,b:{c:2}}}),t.panelTitle="JSON",t.panelBodyCreator=function(e){var t=/\/field\/\w+$/.test(e.path);return[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:l([t?{type:"tpl",inline:!1,className:"text-info text-sm",tpl:"当前为字段内容节点配置,选择上层还有更多的配置。
"}:null,{name:"levelExpand",type:"input-number",label:"默认展开级别",pipeIn:(0,i.defaultValue)(1)}])},{title:"外观",body:l([(0,i.getSchemaTpl)("className")])},{title:"显隐",body:l([(0,i.getSchemaTpl)("ref"),(0,i.getSchemaTpl)("visible")])}])]},t}return a.__extends(t,e),t}(o.BasePlugin);t.JsonPlugin=s,(0,r.registerEditorPlugin)(s)},419:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LinkPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="link",t.$schema="/schemas/LinkSchema.json",t.name="链接",t.isBaseComponent=!0,t.description="用来展示文字链接",t.tags=["展示"],t.icon="fa fa-link",t.scaffold={type:"link",value:"http://www.baidu.com/"},t.previewSchema=a.__assign(a.__assign({},t.scaffold),{label:t.name}),t.panelTitle="链接",t.panelBody=[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[{name:"href",type:"input-text",label:"目标地址, 支持取变量。",description:"如果已绑定字段名,可以不用设置"},{name:"body",type:"input-text",label:"内容",description:"不填写时,自动使用目标地址值"},{name:"blank",type:"switch",label:"是否新窗口打开",mode:"inline",className:"w-full"},{name:"disabled",type:"switch",label:"是否禁用",mode:"inline",className:"w-full"},{name:"htmlTarget",type:"input-text",label:"HTML Target"},(0,i.getSchemaTpl)("icon",{label:"左侧图标"}),(0,i.getSchemaTpl)("icon",{label:"右侧图标",name:"rightIcon"})]},{title:"外观",body:[(0,i.getSchemaTpl)("className",{autoComplete:!1})]},{title:"显隐",body:[(0,i.getSchemaTpl)("ref"),(0,i.getSchemaTpl)("visible")]}])],t}return a.__extends(t,e),t}(o.BasePlugin);t.LinkPlugin=l,(0,r.registerEditorPlugin)(l)},1897:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ListPlugin=void 0;var a=n(752),r=n(1502),o=a.__importDefault(n(6689)),i=n(9756),l=n(9933),s=n(9547),u=n(3570),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="list",t.$schema="/schemas/ListSchema.json",t.name="列表",t.isBaseComponent=!0,t.description="展示一个列表,可以自定标题、副标题,内容及按钮组部分。当前组件需要配置数据源,不自带数据拉取,请优先使用 「CRUD」 组件。",t.docLink="/amis/zh-CN/components/list",t.tags=["展示"],t.icon="fa fa-list",t.scaffold={type:"list",listItem:{body:[{type:"tpl",tpl:"简单的展示数据:$a $b"}],actions:[{icon:"fa fa-eye",type:"button"}]}},t.previewSchema=a.__assign(a.__assign({},t.scaffold),{items:[{a:1,b:2},{a:3,b:4},{a:5,b:6}]}),t.panelTitle="列表",t.panelBodyCreator=function(e){var n="crud"===e.schema.type;return(0,s.getSchemaTpl)("tabs",[{title:"常规",body:[{children:o.default.createElement(r.Button,{level:"danger",size:"sm",block:!0,onClick:t.editDetail.bind(t,e.id)},"配置成员详情")},{type:"divider"},{name:"title",type:"input-text",label:"标题"},n?null:{name:"source",type:"input-text",label:"数据源",pipeIn:(0,s.defaultValue)("${items}"),description:"绑定当前环境变量"},{name:"placeholder",pipeIn:(0,s.defaultValue)("没有数据"),type:"input-text",label:"无数据提示"}]},{title:"外观",body:[{name:"showHeader",type:"switch",mode:"inline",className:"block",label:"是否显示头部",pipeIn:(0,s.defaultValue)(!0)},{name:"showFooter",type:"switch",mode:"inline",className:"block",label:"是否显示底部",pipeIn:(0,s.defaultValue)(!0)},(0,s.getSchemaTpl)("className",{label:"CSS 类名"}),(0,s.getSchemaTpl)("className",{name:"listClassName",label:"List div CSS 类名"}),(0,s.getSchemaTpl)("className",{name:"headerClassName",label:"头部 CSS 类名"}),(0,s.getSchemaTpl)("className",{name:"footerClassName",label:"底部 CSS 类名"})]},{title:"显隐",body:[(0,s.getSchemaTpl)("ref"),(0,s.getSchemaTpl)("visible")]}])},t}return a.__extends(t,e),t.prototype.filterProps=function(e){if(e.isSlot)return e.value=[e.data],e;var t=a.__assign(a.__assign({},e.defaultData),e.data),n=Array.isArray(e.value)?e.value:"string"==typeof e.source?(0,r.resolveVariable)(e.source,t):(0,r.resolveVariable)("items",t);if(!Array.isArray(n)||!n.length){var o=this.buildMockData();e.value=(0,u.repeatArray)(o,1).map((function(e,t){return a.__assign(a.__assign({},e),{id:t+1})}))}var i=e.$schema,l=a.__rest(e,["$schema"]);return a.__assign(a.__assign({},(0,u.JSONPipeOut)(l)),{$schema:i})},t.prototype.buildMockData=function(){return{id:666,title:"假数据",description:"假数据",a:"假数据",b:"假数据"}},t.prototype.editDetail=function(e){var t=this.manager,n=t.store,r=n.getNodeById(e),o=n.getValueOf(e);r&&o&&this.manager.openSubEditor({title:"配置成员详情",value:a.__assign({},o.listItem),slot:{type:"list",listItem:"$$"},onChange:function(e){e=a.__assign(a.__assign({},o),{listItem:e}),t.panelChangeValue(e,(0,u.diff)(o,e))},data:{items:[this.buildMockData()]}})},t.prototype.buildEditorToolbar=function(e,t){var n=e.id,a=e.info,r=e.schema;("list"===a.renderer.name||"crud"===a.renderer.name&&"list"===r.mode)&&t.push({icon:"fa fa-expand",order:100,tooltip:"配置成员渲染器",onClick:this.editDetail.bind(this,n)})},t.prototype.buildEditorContextMenu=function(e,t){var n=e.id,a=e.schema,r=(e.region,e.info);e.selections.length||(null==r?void 0:r.plugin)!==this||("list"===r.renderer.name||"crud"===r.renderer.name&&"list"===a.mode)&&t.push("|",{label:"配置成员详情",onSelect:this.editDetail.bind(this,n)})},t.prototype.getRendererInfo=function(t){var n,r=this,o=t.renderer,i=t.schema;return i.$$id||"crud"!==(null===(n=i.$$editor)||void 0===n?void 0:n.renderer.name)||"list"!==o.name?e.prototype.getRendererInfo.call(this,t):a.__assign(a.__assign({},{id:i.$$editor.id}),{name:r.name,regions:r.regions,patchContainers:r.patchContainers,vRendererConfig:r.vRendererConfig,wrapperProps:r.wrapperProps,wrapperResolve:r.wrapperResolve,filterProps:r.filterProps,$schema:r.$schema,renderRenderer:r.renderRenderer})},t}(l.BasePlugin);t.ListPlugin=d,(0,i.registerEditorPlugin)(d)},821:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ListItemPlugin=void 0;var a=n(752),r=a.__importDefault(n(6689)),o=n(9756),i=n(9933),l=n(9547),s=n(5863),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="list-item",t.isBaseComponent=!0,t.$schema="/schemas/ListItemSchema.json",t.regions=[{key:"body",label:"内容区",renderMethod:"renderBody",preferTag:"展示"},{key:"actions",label:"按钮集合",preferTag:"按钮",renderMethod:"renderRight",insertPosition:"inner"}],t.panelTitle="列表项",t.panelBody=(0,l.getSchemaTpl)("tabs",[{title:"基本",body:[{name:"title",type:"input-text",label:"标题",descrition:"支持模板语法如: ${xxx}"},{name:"subTitle",type:"input-text",label:"副标题",descrition:"支持模板语法如: ${xxx}"},{name:"avatar",type:"input-text",label:"图片地址",descrition:"支持模板语法如: ${xxx}"},{name:"desc",type:"textarea",label:"描述",descrition:"支持模板语法如: ${xxx}"}]},{title:"外观",body:[(0,l.getSchemaTpl)("className",{name:"avatarClassName",label:"图片 CSS 类名",pipeIn:(0,l.defaultValue)("thumb-sm avatar m-r")}),(0,l.getSchemaTpl)("className",{name:"titleClassName",label:"标题 CSS 类名"})]}]),t.fieldWrapperResolve=function(e){return e},t.overrides={renderFeild:function(e,t,n,a){var o=this.super(e,t,n,a),i=this.props.$$editor;if(!i||!t.$$id)return o;var l=i.plugin,u=t.$$id;return r.default.createElement(s.VRenderer,{plugin:i.plugin,renderer:i.renderer,multifactor:!0,key:u,$schema:"/schemas/ListBodyField.json",hostId:i.id,memberIndex:n,name:"".concat("字段".concat(n+1)),id:u,draggable:!1,wrapperResolve:l.fieldWrapperResolve,schemaPath:"".concat(i.schemaPath,"/body/").concat(n),path:"".concat(this.props.$path,"/").concat(n),data:this.props.data},o)}},t.vRendererConfig={panelTitle:"字段",panelBodyCreator:function(e){return[(0,l.getSchemaTpl)("label"),(0,l.getSchemaTpl)("className",{name:"labelClassName",label:"Label CSS 类名",visibleOn:"this.label"})]}},t}return a.__extends(t,e),t.prototype.getRendererInfo=function(e){var t=e.renderer;if(e.schema.$$id&&this.rendererName===t.name)return{name:this.panelTitle,regions:this.regions,$schema:this.$schema}},t.prototype.beforeInsert=function(e){var t,n,r,o,i=e.context;i.info.plugin!==this&&(null===(t=i.node.sameIdChild)||void 0===t?void 0:t.info.plugin)!==this||"body"!==i.region||(i.data=a.__assign(a.__assign({},i.data),{label:null!==(o=null!==(n=i.data.label)&&void 0!==n?n:null===(r=i.subRenderer)||void 0===r?void 0:r.name)&&void 0!==o?o:"列名称"}))},t}(i.BasePlugin);t.ListItemPlugin=u,(0,o.registerEditorPlugin)(u)},135:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.LogPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="log",t.$schema="/schemas/LogSchema.json",t.name="日志",t.isBaseComponent=!0,t.icon="fa fa-file-text-o",t.description="用来实时显示日志",t.docLink="/amis/zh-CN/components/log",t.tags=["展示"],t.previewSchema={type:"log",height:120},t.scaffold={type:"log"},t.panelTitle="日志",t.panelBodyCreator=function(e){return(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[(0,i.getSchemaTpl)("api",{label:"日志数据源",name:"source"})]},{title:"外观",body:[(0,i.getSchemaTpl)("className")]},{title:"显隐",body:[(0,i.getSchemaTpl)("ref"),(0,i.getSchemaTpl)("visible")]}])},t}return a.__extends(t,e),t}(o.BasePlugin);t.LogPlugin=l,(0,r.registerEditorPlugin)(l)},5218:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MappingPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=n(3570),s=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="mapping",t.$schema="/schemas/MappingSchema.json",t.name="映射",t.isBaseComponent=!0,t.description="对现有值做映射展示,比如原始值是:1、2、3...,需要展示成:下线、上线、过期等等。",t.docLink="/amis/zh-CN/components/mapping",t.tags=["展示"],t.icon="fa fa-exchange",t.scaffold={type:"mapping",value:2,map:{0:'一',1:'二',2:'三',3:'四',4:'五',"*":'-'}},t.previewSchema=a.__assign({},t.scaffold),t.panelTitle="映射",t.panelBodyCreator=function(e){var t=/\/field\/\w+$/.test(e.path);return[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[t?{type:"tpl",inline:!1,className:"text-info text-sm",tpl:"当前为字段内容节点配置,选择上层还有更多的配置。
"}:null,{label:"映射表",type:"combo",scaffold:{key:"key-{index}",value:"value-{index}"},required:!0,name:"map",descriptionClassName:"help-block text-xs m-b-none",description:"当值命中左侧 Key 时,展示右侧内容,当没有命中时,默认实现 Key 为 *
的内容(请确保key值唯一)",multiple:!0,pipeIn:function(e){if(!(0,l.isObject)(e))return[{key:"*",value:"通配值"}];var t=[];return Object.keys(e).forEach((function(n){t.push({key:n||"",value:"string"==typeof e[n]?e[n]:JSON.stringify(e[n])})})),t},pipeOut:function(e){if(!Array.isArray(e))return e;var t={};return e.forEach((function(e,n){var a=e.key||"",r=e.value;"key-{index}"===a&&"value-{index}"===r&&(a=a.replace("-{index}","".concat(n)),r=r.replace("-{index}","".concat(n)));try{r=JSON.parse(r)}catch(e){}t[a]=r})),t},items:[{placeholder:"Key",type:"input-text",unique:!0,name:"key",required:!0,columnClassName:"w-xs"},{placeholder:"内容",type:"input-text",name:"value"}]},{name:"placeholder",type:"input-text",pipeIn:(0,i.defaultValue)("-"),label:"占位符"}]},{title:"外观",body:[(0,i.getSchemaTpl)("className")]},{title:"显隐",body:[(0,i.getSchemaTpl)("ref"),(0,i.getSchemaTpl)("visible")]}])]},t}return a.__extends(t,e),t}(o.BasePlugin);t.MappingPlugin=s,(0,r.registerEditorPlugin)(s)},2460:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.MarkdownPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="markdown",t.$schema="/schemas/MarkdownSchema.json",t.name="Markdown",t.isBaseComponent=!0,t.description="展示 markdown 内容",t.docLink="/amis/zh-CN/components/markdown",t.tags=["展示"],t.icon="fa fa-file-text",t.scaffold={type:"markdown",value:"## 这是标题"},t.previewSchema=a.__assign({},t.scaffold),t.panelTitle="MD",t.panelBodyCreator=function(e){return/\/field\/\w+$/.test(e.path),[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[(0,i.getSchemaTpl)("markdownBody")]},{title:"外观",body:[(0,i.getSchemaTpl)("className")]},{title:"显隐",body:[(0,i.getSchemaTpl)("ref"),(0,i.getSchemaTpl)("visible")]}])]},t}return a.__extends(t,e),t}(o.BasePlugin);t.MarkdownPlugin=l,(0,r.registerEditorPlugin)(l)},5678:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.NavPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="nav",t.$schema="/schemas/NavSchema.json",t.name="导航",t.isBaseComponent=!0,t.description="用来渲染导航菜单,支持横排和竖排。",t.docLink="/amis/zh-CN/components/nav",t.tags=["功能"],t.icon="fa fa-map-signs",t.scaffold={type:"nav",stacked:!0,links:[{label:"页面1",to:"?id=1"},{label:"页面2",to:"?id=2"}]},t.previewSchema=a.__assign({},t.scaffold),t.panelTitle="导航",t.panelDefinitions={links:{label:"菜单管理",name:"links",type:"combo",multiple:!0,draggable:!0,addButtonText:"新增菜单",multiLine:!0,messages:{validateFailed:"菜单中存在配置错误,请仔细检查"},scaffold:{label:"",to:""},items:[{type:"input-text",name:"label",label:"名称",required:!0},{type:"input-text",name:"to",label:"跳转地址",required:!0},{type:"icon-picker",name:"icon",label:"图标"},{type:"group",label:"是否高亮",direction:"vertical",className:"m-b-none",labelRemark:{trigger:"click",rootClose:!0,className:"m-l-xs",content:"可以配置该菜单是否要高亮",placement:"left"},body:[{name:"active",type:"radios",inline:!0,options:[{label:"是",value:!0},{label:"否",value:!1},{label:"表达式",value:""}]},{name:"activeOn",autoComplete:!1,visibleOn:'typeof this.active !== "boolean"',type:"input-text",placeholder:"留空将自动分析菜单地址",className:"m-t-n-sm"}]},{type:"switch",label:"包含子菜单",name:"children",mode:"inline",className:"block",pipeIn:function(e){return!!e},pipeOut:function(e){return e?[{label:"",to:""}]:void 0},messages:{validateFailed:"子菜单中存在配置错误,请仔细检查"}},{name:"children",$ref:"links",visibleOn:'this.hasOwnProperty("children") && this.children',label:"子菜单管理",addButtonText:"新增子菜单"}]}},t.panelBody=[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[{$ref:"links",name:"links"},{type:"divider"},(0,i.getSchemaTpl)("api",{name:"source",label:"获取菜单接口",description:"如果菜单地址希望可以动态设置,请在此填入接口地址"})]},{title:"外观",body:[{name:"stacked",type:"switch",mode:"inline",className:"block",label:"是否竖着摆放"},(0,i.getSchemaTpl)("className")]},{title:"显隐",body:[(0,i.getSchemaTpl)("ref"),(0,i.getSchemaTpl)("visible")]}])],t}return a.__extends(t,e),t}(o.BasePlugin);t.NavPlugin=l,(0,r.registerEditorPlugin)(l)},3345:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.OperationPlugin=void 0;var a=n(752),r=n(1502),o=a.__importDefault(n(6689)),i=n(9756),l=n(9933),s=n(9547),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="operation",t.$schema="/schemas/OperationSchema.json",t.name="操作栏",t.isBaseComponent=!0,t.description="操作栏,用于表格。",t.tags=["展示"],t.icon="",t.scaffold={type:"operation",label:"操作",buttons:[{label:"按钮",type:"button"}]},t.previewSchema={type:"tpl",tpl:"操作栏"},t.regions=[{key:"buttons",label:"按钮集",renderMethod:"render",insertPosition:"inner",preferTag:"按钮"}],t.panelTitle="操作栏",t.panelBodyCreator=function(e){return[(0,s.getSchemaTpl)("className",{name:"innerClassName"}),{children:o.default.createElement(r.Button,{level:"info",size:"sm",className:"m-b-sm",block:!0,onClick:function(){t.manager.showRendererPanel("按钮","请从左侧组件面板中点击添加新的按钮")}},"添加按钮")}]},t}return a.__extends(t,e),t.prototype.buildSubRenderers=function(t,n){if(t&&t.info&&t.info.renderer&&("table"===t.info.renderer.name||"crud"===t.info.renderer.name))return e.prototype.buildSubRenderers.apply(this,arguments)},t}(l.BasePlugin);t.OperationPlugin=u,(0,i.registerEditorPlugin)(u)},9662:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ActionPlugin=void 0;var a=n(752),r=n(1502),o=a.__importDefault(n(6689)),i=n(9756),l=n(9933),s=n(9547),u=n(3570),d=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.panelTitle="按钮",t.panelBodyCreator=function(e){var n=/(?:\/|^)dialog\/.+$/.test(e.path);return/(?:\/|^)dropdown-button\/.+$/.test(e.path),[{label:"按钮行为",type:"select",name:"actionType",pipeIn:(0,s.defaultValue)(""),options:[{label:"默认",value:""},{label:"弹框",value:"dialog"},{label:"抽出式弹框(Drawer)",value:"drawer"},{label:"发送请求",value:"ajax"},{label:"下载文件",value:"download"},{label:"页面跳转(单页模式)",value:"link"},{label:"页面跳转",value:"url"},{label:"刷新目标",value:"reload"},{label:"复制内容",value:"copy"},{label:"提交",value:"submit"},{label:"重置",value:"reset"},{label:"重置表单并提交",value:"reset-and-submit"},{label:"清空表单并提交",value:"clear-and-submit"},{label:"确认",value:"confirm"},{label:"取消",value:"cancel"},{label:"跳转下一条",value:"next"},{label:"跳转上一条",value:"prev"}]},{type:"input-text",name:"content",visibleOn:'data.actionType == "copy"',label:"复制内容模板"},{type:"select",name:"copyFormat",options:[{label:"纯文本",value:"text/plain"},{label:"富文本",value:"text/html"}],visibleOn:'data.actionType == "copy"',label:"复制格式"},{type:"input-text",name:"target",visibleOn:'data.actionType == "reload"',label:"指定刷新目标",required:!0},{name:"dialog",pipeIn:(0,s.defaultValue)({title:"弹框标题",body:"
对,你刚刚点击了
"}),asFormItem:!0,children:function(e){var n=e.value,i=e.onChange;return"dialog"===e.data.actionType?o.default.createElement(r.Button,{size:"sm",level:"danger",className:"m-b",onClick:function(){return t.manager.openSubEditor({title:"配置弹框内容",value:a.__assign({type:"dialog"},n),onChange:function(e){return i(e)}})},block:!0},"配置弹框内容"):null}},{visibleOn:'data.actionType == "drawer"',name:"drawer",pipeIn:(0,s.defaultValue)({title:"弹框标题",body:"对,你刚刚点击了
"}),asFormItem:!0,children:function(e){var n=e.value,i=e.onChange;return"drawer"==e.data.actionType?o.default.createElement(r.Button,{size:"sm",level:"danger",className:"m-b",onClick:function(){return t.manager.openSubEditor({title:"配置抽出式弹框内容",value:a.__assign({type:"drawer"},n),onChange:function(e){return i(e)}})},block:!0},"配置抽出式弹框内容"):null}},(0,s.getSchemaTpl)("api",{label:"目标API",visibleOn:'data.actionType == "ajax" || data.actionType == "download"'}),{name:"feedback",pipeIn:(0,s.defaultValue)({title:"弹框标题",body:"内容
"}),asFormItem:!0,children:function(e){var n=e.onChange,i=e.value;return"ajax"==e.data.actionType?o.default.createElement("div",{className:"m-b"},o.default.createElement(r.Button,{size:"sm",level:i?"danger":"info",onClick:function(){return t.manager.openSubEditor({title:"配置反馈弹框详情",value:a.__assign({type:"dialog"},i),onChange:function(e){return n(e)}})}},"配置反馈弹框内容"),i?o.default.createElement(r.Button,{size:"sm",level:"link",className:"m-l",onClick:function(){return n("")}},"清空设置"):null):null}},{name:"feedback.visibleOn",label:"是否弹出表达式",type:"input-text",visibleOn:"this.feedback",autoComplete:!1,description:"请使用 JS 表达式如:`this.xxx == 1`"},{name:"feedback.skipRestOnCancel",label:"弹框取消是否中断后续操作",type:"switch",mode:"inline",className:"block",visibleOn:"this.feedback"},{name:"feedback.skipRestOnConfirm",label:"弹框确认是否中断后续操作",type:"switch",mode:"inline",className:"block",visibleOn:"this.feedback"},{type:"input-text",label:"目标地址",name:"link",visibleOn:'data.actionType == "link"'},{type:"input-text",label:"目标地址",name:"url",visibleOn:'data.actionType == "url"',placeholder:"http://"},{type:"switch",name:"blank",visibleOn:'data.actionType == "url"',mode:"inline",className:"w-full",label:"是否用新窗口打开",pipeIn:(0,s.defaultValue)(!0)},n?{visibleOn:'data.actionType == "submit" || data.type == "submit"',name:"close",type:"switch",mode:"inline",className:"w-full",pipeIn:(0,s.defaultValue)(!0),label:"是否关闭当前弹框"}:null,{name:"confirmText",type:"textarea",label:"确认文案",description:"点击后会弹出此内容,等用户确认后才进行相应的操作。"},{type:"input-text",name:"reload",label:"刷新目标组件",visibleOn:'data.actionType != "link" && data.actionType != "url"',description:"当前动作完成后,指定目标组件刷新。支持传递数据如:xxx?a=\\${a}&b=\\${b}
,多个目标请用英文逗号隔开。"},{type:"input-text",name:"target",visibleOn:'data.actionType != "reload"',label:"指定响应组件",description:"指定动作执行者,默认为当前组件所在的功能性性组件,如果指定则转交给目标组件来处理。"},{type:"js-editor",allowFullscreen:!0,name:"onClick",label:"自定义点击事件",description:"将会传递 event 和 props 两个参数"},{type:"input-text",name:"hotKey",label:"键盘快捷键"}]},t}return a.__extends(t,e),t.prototype.buildEditorPanel=function(t,n){if(!t.selections.length)if(~["action","button","submit","reset","sparkline"].indexOf(t.info.renderer.name)){var a=this.panelBodyCreator(t);"sparkline"===t.info.renderer.name&&(a={name:"clickAction",type:"combo",label:"",noBorder:!0,multiLine:!0,items:a}),n.push({key:"action",icon:"fa fa-gavel",title:"动作",render:this.manager.makeSchemaFormRender({body:a}),order:100})}else e.prototype.buildEditorPanel.call(this,t,n)},t.prototype.buildEditorToolbar=function(e,t){var n=this,a=e.id,r=e.schema,o=e.info;~["action","button","submit","reset"].indexOf(o.renderer.name)&&"dialog"===r.actionType&&t.push({iconSvg:"dialog",tooltip:"配置弹框内容",placement:"bottom",onClick:function(){return n.editDetail(a)}})},t.prototype.editDetail=function(e){var t=this.manager,n=t.store,r=n.getNodeById(e),o=n.getValueOf(e);r&&o&&this.manager.openSubEditor({title:"配置弹框内容",value:a.__assign({type:"dialog"},o.dialog),onChange:function(e){e=a.__assign(a.__assign({},o),{dialog:e}),t.panelChangeValue(e,(0,u.diff)(o,e))}})},t}(l.BasePlugin);t.ActionPlugin=d,(0,i.registerEditorPlugin)(d)},5503:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BasicToolbarPlugin=void 0;var a=n(752),r=n(9933),o=n(9756),i=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.order=-9999,t}return a.__extends(t,e),t.prototype.buildEditorToolbar=function(e,t){var n,a=this,r=e.id,o=e.schema,i=this.manager.store,l=i.getNodeById(r),s=i.getSchemaParentById(r),u=l.parent;if(Array.isArray(s)&&(null==u?void 0:u.isRegion)){var d=l.host;l.draggable&&t.push({iconSvg:"drag-btn",icon:"fa fa-arrows",tooltip:"按住拖动调整位置",placement:"bottom",draggable:!0,order:-1e3,onDragStart:this.manager.startDrag.bind(this.manager,r)});var c=s.indexOf(o);if(!(null==d?void 0:d.memberImmutable(u.region))&&i.panels.some((function(e){return"renderers"===e.key}))){var p=null===(n=s[c+1])||void 0===n?void 0:n.$$id;t.push({iconSvg:"left-arrow-to-left",tooltip:"向前插入组件",placement:"bottom",onClick:function(){return a.manager.showInsertPanel(u.region,u.id,u.preferTag,"insert",void 0,r)}},{iconSvg:"arrow-to-right",tooltip:"向后插入组件",placement:"bottom",onClick:function(){return a.manager.showInsertPanel(u.region,u.id,u.preferTag,"insert",void 0,p)}})}}l.isVitualRenderer||!l.info.plugin.popOverBody&&!l.info.plugin.popOverBodyCreator||t.push({icon:"fa fa-pencil",tooltip:"编辑",placement:"bottom",onClick:function(e){return a.manager.openNodePopOverForm(l.id)}}),(l.removable||void 0===l.removable)&&t.push({iconSvg:"delete-btn",icon:"fa",tooltip:"删除",placement:"bottom",order:999,onClick:this.manager.del.bind(this.manager,r)}),t.push({iconSvg:"more-btn",icon:"fa fa-cog",tooltip:"更多",placement:"bottom",order:1e3,onClick:function(e){if(!e.defaultPrevented){var t=e.target.parentElement.getBoundingClientRect();a.manager.openContextMenu(r,"",{x:window.scrollX+t.left+t.width-155,y:window.scrollY+t.top+t.height+8})}}})},t.prototype.buildEditorContextMenu=function(e,t){var n,a=e.id,r=e.schema,o=e.region,i=e.selections,l=this.manager,s=l.store,u=s.getSchemaParentById(a),d=s.getNodeById(a),c=s.getNodePathById(a),p=c.pop();if(d.host,d.parent,i.length)t.push({label:"重复一份",icon:"copy-icon",disabled:i.some((function(e){return!e.node.duplicatable})),onSelect:function(){return l.duplicate(i.map((function(e){return e.id})))}}),t.push({label:"取消多选",icon:"cancel-icon",onSelect:function(){return s.setActiveId(a)}}),t.push({label:"删除",icon:"delete-icon",disabled:i.some((function(e){return!e.node.removable})),className:"text-danger",onSelect:function(){return l.del(i.map((function(e){return e.id})))}});else if(o)(h=s.panels.find((function(e){return"renderers"===e.key})))&&(t.push({label:"插入组件",onHighlight:function(e){return e&&s.setHoverId(a,o)},onSelect:function(){return s.showInsertRendererPanel()}}),t.push({label:"清空",onSelect:function(){return l.emptyRegion(a,o)}}),t.push({label:"粘贴",onSelect:function(){return l.paste(a,o)}}));else{if(t.push({label:"选中".concat(p.label),disabled:s.activeId===p.id,data:a,onSelect:function(e){return s.setActiveId(e)},onHighlight:function(e,t){return e&&s.setHoverId(t)}}),c.length){var f=c.filter((function(e){var t;return!e.isRegion&&!1!==(null===(t=e.info)||void 0===t?void 0:t.editable)})).reverse().map((function(e){return{label:e.label,data:e.id,onSelect:function(e){return s.setActiveId(e)},onHighlight:function(e,t){return e&&s.setHoverId(t)}}}));f.length&&t.push({label:"选中层级",children:f})}t.push({label:"取消选中",disabled:!s.activeId||s.activeId!==a,onSelect:function(){return s.setActiveId("")}}),t.push("|"),t.push({label:"重复一份",disabled:!d.duplicatable,onSelect:function(){return l.duplicate(a)}}),t.push({label:"复制配置",onSelect:function(){return l.copy(a)}}),t.push({label:"剪切配置",disabled:!d.removable,onSelect:function(){return l.cut(a)}}),t.push({label:"粘贴配置",disabled:!Array.isArray(u)||!d.parent||!1===(null===(n=d.info)||void 0===n?void 0:n.typeMutable)||!d.replaceable,onSelect:function(){return l.paste(a)}}),t.push({label:"删除",disabled:!d.removable,className:"text-danger",onSelect:function(){return l.del(a)}}),t.push("|");var m=Array.isArray(u)?u.indexOf(r):-1;t.push({label:"向前移动",disabled:!(Array.isArray(u)&&m>0&&d.moveable&&d.prevSibling),onSelect:function(){return l.moveUp()}}),t.push({label:"向后移动",disabled:!(Array.isArray(u)&&m\\${xxx}
来获取变量,或者用 lodash.template 语法来写模板逻辑。详情'},{name:"placeholder",label:"占位符",type:"input-text",pipeIn:(0,i.defaultValue)("-")}]},t?null:{title:"外观",body:[{label:"内联模式",type:"switch",name:"inline",mode:"inline",className:"w-full",value:!0},(0,i.getSchemaTpl)("className")]},t?null:{title:"显隐",body:[(0,i.getSchemaTpl)("ref"),(0,i.getSchemaTpl)("visible")]}])},t}return a.__extends(t,e),t}(o.BasePlugin);t.PlainPlugin=l,(0,r.registerEditorPlugin)(l)},6218:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ProgressPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="progress",t.$schema="/schemas/ProgressSchema.json",t.name="进度展示",t.isBaseComponent=!0,t.description="用来展示进度。可配置各个进度段用不同的颜色展示。",t.docLink="/amis/zh-CN/components/progress",t.tags=["展示"],t.icon="fa fa-angle-double-right",t.scaffold={type:"progress",value:66.66},t.previewSchema=a.__assign({},t.scaffold),t.panelTitle="进度",t.panelBodyCreator=function(e){var t=/\/field\/\w+$/.test(e.path);return[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[t?{type:"tpl",inline:!1,className:"text-info text-sm",tpl:"当前为字段内容节点配置,选择上层还有更多的配置。
"}:null,{name:"showLabel",type:"switch",mode:"inline",pipeIn:(0,i.defaultValue)(!0),label:"是否显示文字"},{name:"stripe",type:"switch",mode:"inline",label:"是否显示条纹"},{name:"animate",type:"switch",mode:"inline",label:"是否显示动画"},{name:"map",label:"等级配置",type:"input-array",items:{type:"input-text"},descrition:"配置不通的值段,用不通的样式提示用户",pipeIn:(0,i.defaultValue)(["bg-danger","bg-warning","bg-info","bg-success","bg-success"])},(0,i.getSchemaTpl)("switchDefaultValue"),{type:"input-text",name:"value",label:"默认值",validations:"isNumeric",visibleOn:'typeof this.value !== "undefined"'},{name:"placeholder",type:"input-text",pipeIn:(0,i.defaultValue)("-"),label:"占位符"}]},{title:"外观",body:[(0,i.getSchemaTpl)("className"),(0,i.getSchemaTpl)("className",{name:"progressClassName",label:"进度外层 CSS 类名",pipeIn:(0,i.defaultValue)("progress-xs progress-striped active m-t-xs m-b-none")}),(0,i.getSchemaTpl)("className",{name:"progressBarClassName",label:"进度条 CSS 类名"})]},{title:"显隐",body:[(0,i.getSchemaTpl)("ref"),(0,i.getSchemaTpl)("visible")]}])]},t}return a.__extends(t,e),t}(o.BasePlugin);t.ProgressPlugin=l,(0,r.registerEditorPlugin)(l)},3470:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.PropertyPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="property",t.$schema="/schemas/PropertySchema.json",t.name="属性表",t.isBaseComponent=!0,t.icon="fa fa-list",t.description="属性表",t.docLink="/amis/zh-CN/components/property",t.tags=["其他"],t.scaffold={type:"property",title:"机器配置",items:[{label:"cpu",content:"1 core"},{label:"memory",content:"4G"},{label:"disk",content:"80G"},{label:"network",content:"4M",span:2},{label:"IDC",content:"beijing"},{label:"Note",content:"其它说明",span:3}]},t.previewSchema=a.__assign({},t.scaffold),t.panelTitle="属性表",t.panelBody=[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[{label:"标题",type:"input-text",name:"title"},{label:"每行显示几列",type:"input-number",value:3,name:"column"},{type:"radios",name:"mode",inline:!0,value:"table",label:"显示模式",options:["table","simple"]},{label:"分隔符",type:"input-text",name:"separator",visibleOn:'data.mode === "simple"'},{label:"属性取自变量",type:"input-text",name:"source"},{label:"属性列表",name:"items",type:"combo",multiple:!0,multiLine:!0,draggable:!0,addButtonText:"新增",items:[{type:"input-text",mode:"inline",size:"sm",label:"属性名",name:"label"},{type:"input-text",mode:"inline",size:"sm",label:"属性值",name:"content"},{type:"input-number",mode:"inline",size:"sm",label:"跨几列",value:1,name:"span"}]}]},{title:"外观",body:[(0,i.getSchemaTpl)("className")]},{title:"显隐",body:[(0,i.getSchemaTpl)("ref"),(0,i.getSchemaTpl)("visible")]}])],t}return a.__extends(t,e),t}(o.BasePlugin);t.PropertyPlugin=l,(0,r.registerEditorPlugin)(l)},2500:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.QRCodePlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="qrcode",t.$schema="/schemas/QRCodeSchema.json",t.name="二维码",t.isBaseComponent=!0,t.description="可以用来生成二维码",t.docLink="/amis/zh-CN/components/qrcode",t.tags=["功能"],t.icon="fa fa-qrcode",t.scaffold={type:"qrcode",value:"https://amis.baidu.com"},t.previewSchema=a.__assign({},t.scaffold),t.panelTitle="二维码",t.panelBody=[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[{name:"value",type:"input-text",label:"二维码值",pipeIn:(0,i.defaultValue)("https://www.baidu.com"),description:"支持使用\\${xxx}
来获取变量"},{name:"level",type:"select",label:"复杂度",pipeIn:(0,i.defaultValue)("L"),options:[{label:"L",value:"L"},{label:"M",value:"M"},{label:"Q",value:"Q"},{label:"H",value:"H"}]}]},{title:"外观",body:[{name:"codeSize",type:"input-number",label:"宽高值",pipeIn:(0,i.defaultValue)(128)},{name:"backgroundColor",type:"input-color",label:"背景色",pipeIn:(0,i.defaultValue)("#fff")},{name:"foregroundColor",type:"input-color",label:"前景色",pipeIn:(0,i.defaultValue)("#000")},(0,i.getSchemaTpl)("className")]},{title:"显隐",body:[(0,i.getSchemaTpl)("ref"),(0,i.getSchemaTpl)("visible")]}])],t}return a.__extends(t,e),t}(o.BasePlugin);t.QRCodePlugin=l,(0,r.registerEditorPlugin)(l)},7328:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ResetPlugin=void 0;var a=n(752),r=n(9756),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="reset",t.disabledRendererPlugin=!0,t.name="重置",t.isBaseComponent=!0,t.icon="fa fa-eraser",t.description="一般用来重置表单数据到初始值。",t.panelTitle="按钮",t.scaffold={type:"reset",label:"重置"},t.previewSchema=a.__assign({},t.scaffold),t}return a.__extends(t,e),t}(n(6460).ButtonPlugin);t.ResetPlugin=o,(0,r.registerEditorPlugin)(o)},946:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.ServicePlugin=void 0;var a=n(752),r=n(1502),o=a.__importDefault(n(6689)),i=n(9756),l=n(9933),s=n(9547),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="service",t.$schema="/schemas/ServiceSchema.json",t.name="服务 Service",t.isBaseComponent=!0,t.description="功能性容器,可以用来加载数据或者加载渲染器配置。加载到的数据在容器可以使用。",t.docLink="/amis/zh-CN/components/service",t.tags=["功能"],t.icon="fa fa-server",t.scaffold={type:"service",body:[{type:"tpl",tpl:"内容",inline:!1}]},t.previewSchema={type:"tpl",tpl:"功能性组件,用于数据拉取。"},t.regions=[{key:"body",label:"内容区"}],t.panelTitle="服务",t.panelBodyCreator=function(e){return(0,s.getSchemaTpl)("tabs",[{title:"常规",body:[{children:o.default.createElement(r.Button,{level:"info",size:"sm",className:"m-b-sm",block:!0,onClick:function(){t.manager.showRendererPanel("")}},"添加内容")},{type:"divider"},(0,s.getSchemaTpl)("api",{label:"数据接口"}),(0,s.getSchemaTpl)("data"),{name:"ws",type:"input-text",label:"WebSocket 实时更新接口"},(0,s.getSchemaTpl)("initFetch"),{name:"interval",label:"定时刷新间隔",visibleOn:"this.api",type:"input-number",step:500,description:"设置后将自动定时刷新,单位 ms"},{name:"silentPolling",label:"静默加载",mode:"inline",className:"block",type:"switch",visibleOn:"!!data.interval",description:"设置自动定时刷新是否显示加载动画"},{name:"stopAutoRefreshWhen",label:"停止定时刷新检测",type:"input-text",visibleOn:"!!data.interval",description:"定时刷新一旦设置会一直刷新,除非给出表达式,条件满足后则不刷新了。"},{type:"divider"},(0,s.getSchemaTpl)("api",{name:"schemaApi",label:"内容 Schema 接口"}),{type:"divider"},(0,s.getSchemaTpl)("initFetch",{name:"initFetchSchema",visibleOn:"data.schemaApi",label:"初始是否拉取内容 Schema 接口"}),{type:"js-editor",allowFullscreen:!0,name:"dataProvider",label:"自定义函数获取数据",description:"将会传递 data 和 setData 两个参数"},{label:"默认消息信息",type:"combo",name:"messages",multiLine:!0,description:"设置 service 默认提示信息,当 service 没有返回 msg 信息时有用,如果 service 返回携带了 msg 值,则还是以 service 返回为主",items:[{label:"获取成功",type:"input-text",name:"fetchSuccess"},{label:"获取失败",type:"input-text",name:"fetchFailed"}]}]},{title:"外观",body:[(0,s.getSchemaTpl)("className")]},{title:"其他",body:[(0,s.getSchemaTpl)("ref"),(0,s.getSchemaTpl)("name"),(0,s.getSchemaTpl)("visible")]}])},t}return a.__extends(t,e),t}(l.BasePlugin);t.ServicePlugin=u,(0,i.registerEditorPlugin)(u)},1886:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SparklinePlugin=void 0;var a=n(752),r=n(9756),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="sparkline",t.$schema="/schemas/SparklineSchema.json",t.name="走势图",t.isBaseComponent=!0,t.description="用于内嵌展示简单图表",t.docLink="/amis/zh-CN/components/sparkline",t.tags=["展示"],t.icon="fa fa-area-chart",t.scaffold={type:"sparkline",height:30,value:[3,5,2,4,1,8,3,7]},t.previewSchema=a.__assign({},t.scaffold),t.panelTitle="走势图",t.panelBody=[{name:"height",type:"input-number",label:"高度"}],t}return a.__extends(t,e),t}(n(9933).BasePlugin);t.SparklinePlugin=o,(0,r.registerEditorPlugin)(o)},8979:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StatusPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="status",t.$schema="/schemas/StatusSchema.json",t.name="状态显示",t.isBaseComponent=!0,t.description="用图标更具关联字段来展示状态,比如 1 展示 √、0 展示 x。这块可以自定义配置",t.docLink="/amis/zh-CN/components/status",t.tags=["展示"],t.icon="fa fa-check-square-o",t.scaffold={type:"status",value:1},t.previewSchema=a.__assign({},t.scaffold),t.panelTitle="状态",t.panelBodyCreator=function(e){var t=/\/field\/\w+$/.test(e.path);return[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[t?{type:"tpl",inline:!1,className:"text-info text-sm",tpl:"当前为字段内容节点配置,选择上层还有更多的配置。
"}:null,{name:"map",label:"图标配置",type:"input-array",items:{type:"input-text"},descrition:"配置不通的值段,用不通的样式提示用户",pipeIn:(0,i.defaultValue)(["fa fa-times text-danger","fa fa-check text-success"])},{name:"placeholder",type:"input-text",pipeIn:(0,i.defaultValue)("-"),label:"占位符"}]},{title:"外观",body:[(0,i.getSchemaTpl)("className")]},{title:"显隐",body:[(0,i.getSchemaTpl)("ref"),(0,i.getSchemaTpl)("visible")]}])]},t}return a.__extends(t,e),t}(o.BasePlugin);t.StatusPlugin=l,(0,r.registerEditorPlugin)(l)},46:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.StepsPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="steps",t.$schema="/schemas/StepsSchema.json",t.name="Steps 步骤条",t.isBaseComponent=!0,t.icon="fa fa-forward",t.description="Steps 步骤条",t.docLink="/amis/zh-CN/components/steps",t.tags=["展示"],t.scaffold={type:"steps",value:1,steps:[{title:"第一步",subTitle:"副标题",description:"描述"},{title:"第二步"},{title:"第三步"}]},t.previewSchema=a.__assign({},t.scaffold),t.panelTitle="Steps",t.panelBody=[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[{name:"steps",label:"步骤列表",type:"combo",scaffold:{type:"wrapper",body:"子节点内容"},minLength:2,multiple:!0,draggable:!0,items:[{type:"input-text",name:"title",label:!1,placeholder:"标题"},{type:"input-text",name:"subTitle",label:!1,placeholder:"副标题"},{type:"input-text",name:"description",label:!1,placeholder:"描述"}]},{name:"value",type:"input-text",label:"当前步骤",description:"以零为起点"},{name:"status",type:"select",label:"当前状态",creatable:!0,value:"finish",options:[{label:"进行中",value:"process"},{label:"等待",value:"wait"},{label:"完成",value:"finish"},{label:"出错",value:"error"}]},(0,i.getSchemaTpl)("api",{name:"source",label:"获取步骤接口"})]},{title:"外观",body:[(0,i.getSchemaTpl)("className")]},{title:"显隐",body:[(0,i.getSchemaTpl)("visible")]}])],t}return a.__extends(t,e),t}(o.BasePlugin);t.StepsPlugin=l,(0,r.registerEditorPlugin)(l)},9268:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.SubmitPlugin=void 0;var a=n(752),r=n(9756),o=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="submit",t.disabledRendererPlugin=!0,t.name="提交",t.isBaseComponent=!0,t.description="用来提交表单,要求表单验证,如果在弹窗中会自动关闭弹窗。",t.panelTitle="按钮",t.scaffold={type:"submit",label:"提交",level:"primary"},t.previewSchema=a.__assign({},t.scaffold),t}return a.__extends(t,e),t}(n(6460).ButtonPlugin);t.SubmitPlugin=o,(0,r.registerEditorPlugin)(o)},7599:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TablePlugin=void 0;var a=n(752),r=n(1502),o=n(9756),i=n(9933),l=n(9547),s=n(3570),u=n(3893),d=n(6374),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="table",t.$schema="/schemas/TableSchema.json",t.name="表格",t.isBaseComponent=!0,t.description="用来展示表格数据,可以配置列信息,然后关联数据便能完成展示。支持嵌套、超级表头、列固定、表头固顶、合并单元格等等。当前组件需要配置数据源,不自带数据拉取,请优先使用 「CRUD」 组件。",t.docLink="/amis/zh-CN/components/table",t.icon="fa fa-table",t.scaffold={type:"table",columns:[{label:"列信息",name:"a"}]},t.regions=[{key:"columns",label:"列集合",renderMethod:"renderTableContent",preferTag:"展示",dndMode:"position-h"}],t.previewSchema={type:"table",className:"text-left m-b-none",affixHeader:!1,items:[{a:1,b:2},{a:3,b:4},{a:5,b:6}],columns:[{label:"A",name:"a"},{label:"B",name:"b"}]},t.scaffoldForm={title:"快速构建表格",body:[{name:"columns",type:"combo",multiple:!0,label:!1,addButtonText:"新增一列",draggable:!0,items:[{type:"input-text",name:"label",placeholder:"标题"},{type:"input-text",name:"name",placeholder:"绑定字段名"},{type:"select",name:"type",placeholder:"类型",value:"text",options:[{value:"text",label:"纯文本"},{value:"tpl",label:"模板"},{value:"image",label:"图片"},{value:"date",label:"日期"},{value:"progress",label:"进度"},{value:"status",label:"状态"},{value:"mapping",label:"映射"},{value:"operation",label:"操作栏"}]}]}],canRebuild:!0},t.panelTitle="表格",t.panelBodyCreator=function(e){var t="crud"===e.schema.type;return(0,l.getSchemaTpl)("tabs",[{title:"常规",body:[{name:"title",type:"input-text",label:"标题"},t?null:{name:"source",type:"input-text",label:"数据源",pipeIn:(0,l.defaultValue)("${items}"),description:"绑定当前环境变量"},{name:"combineNum",label:"自动合并单元格",type:"input-number",placeholder:"设置列数",description:"设置从左到右多少列内启用自动合并单元格,根据字段值是否相同来决定是否合并。"}]},{title:"外观",body:[{name:"columnsTogglable",label:"展示列显示开关",type:"button-group-select",pipeIn:(0,l.defaultValue)("auto"),mode:"inline",className:"w-full",size:"xs",options:[{label:"自动",value:"auto"},{label:"开启",value:!0},{label:"关闭",value:!1}],description:"自动即列数量大于5个时自动开启"},{name:"affixHeader",type:"switch",label:"是否固顶表头",mode:"inline",className:"w-full",pipeIn:(0,l.defaultValue)(!0)},{name:"showHeader",type:"switch",mode:"inline",className:"w-full",label:"是否显示头部",pipeIn:(0,l.defaultValue)(!0)},{name:"showFooter",type:"switch",mode:"inline",className:"w-full",label:"是否显示底部",pipeIn:(0,l.defaultValue)(!0)},{name:"footable",type:"switch",mode:"inline",className:"w-full",label:"是否开启单条底部展示",description:"如果列太多显示会很臃肿,可以考虑把部分列放在当前行的底部展示",pipeIn:function(e){return!!e}},{name:"footable.expand",type:"button-group-select",size:"xs",visibleOn:"data.footable",label:"底部默认展开",pipeIn:(0,l.defaultValue)("none"),mode:"inline",className:"w-full",options:[{label:"第一条",value:"first"},{label:"所有",value:"all"},{label:"不展开",value:"none"}]},{name:"placeholder",pipeIn:(0,l.defaultValue)("暂无数据"),type:"input-text",label:"无数据提示"},{name:"rowClassNameExpr",type:"input-text",label:"行高亮规则",placeholder:"支持模板语法,如 <%= data.id % 2 ? 'bg-success' : '' %>"},(0,l.getSchemaTpl)("className",{label:"外层 CSS 类名"}),(0,l.getSchemaTpl)("className",{name:"tableClassName",label:"表格 CSS 类名"}),(0,l.getSchemaTpl)("className",{name:"headerClassName",label:"顶部外层 CSS 类名"}),(0,l.getSchemaTpl)("className",{name:"footerClassName",label:"底部外层 CSS 类名"}),(0,l.getSchemaTpl)("className",{name:"toolbarClassName",label:"工具栏 CSS 类名"})]},{title:"显隐",body:[(0,l.getSchemaTpl)("ref"),(0,l.getSchemaTpl)("visible")]}])},t}return a.__extends(t,e),t.prototype.filterProps=function(e){var t=Array.isArray(e.value)?e.value:"string"==typeof e.source?(0,r.resolveVariable)(e.source,e.data):(0,r.resolveVariable)("items",e.data);if(Array.isArray(t)&&t.length)e.value=t.slice(0,10);else{var n={};Array.isArray(e.columns)&&e.columns.forEach((function(e){e.name&&(0,u.setVariable)(n,e.name,(0,d.mockValue)(e))})),e.value=(0,s.repeatArray)(n,1).map((function(e,t){return a.__assign(a.__assign({},e),{id:t+1})}))}return e},t.prototype.getRendererInfo=function(t){var n,r=this,o=t.schema,i=t.renderer;return o.$$id||"crud"!==(null===(n=o.$$editor)||void 0===n?void 0:n.renderer.name)||"table"!==i.name?e.prototype.getRendererInfo.call(this,t):a.__assign(a.__assign({},{id:o.$$editor.id}),{name:r.name,regions:r.regions,patchContainers:r.patchContainers,vRendererConfig:r.vRendererConfig,wrapperProps:r.wrapperProps,wrapperResolve:r.wrapperResolve,filterProps:r.filterProps,$schema:r.$schema,renderRenderer:r.renderRenderer})},t.prototype.beforeInsert=function(e){var t,n,r,o,i=e.context;i.info.plugin!==this&&(null===(t=i.node.sameIdChild)||void 0===t?void 0:t.info.plugin)!==this||"columns"!==i.region||(i.data=a.__assign(a.__assign({},i.data),{label:null!==(o=null!==(n=i.data.label)&&void 0!==n?n:null===(r=i.subRenderer)||void 0===r?void 0:r.name)&&void 0!==o?o:"列名称"}))},t}(i.BasePlugin);t.TablePlugin=c,(0,o.registerEditorPlugin)(c)},2156:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.TableViewPlugin=void 0;var a=n(752),r=a.__importDefault(n(6689)),o=n(9756),i=n(9933),l=n(9547),s=n(5863),u=n(1578),d=n(3570),c={body:{type:"tpl",tpl:"---"}};function p(e){if(!e)return{trs:[]};for(var t=[],n=0,a=0,r=e.trs||[];a\\${xxx}
来获取变量,或者用 lodash.template 语法来写模板逻辑。详情'}),(0,i.setSchemaTpl)("tpl:wrapperComponent",{name:"wrapperComponent",type:"select",pipeIn:(0,i.defaultValue)("div"),label:"格式",options:[{label:"普通文字",value:"div"},{label:"段落",value:"p"},{label:"一级标题",value:"h1"},{label:"二级标题",value:"h2"},{label:"三级标题",value:"h3"},{label:"四级标题",value:"h4"},{label:"五级标题",value:"h5"},{label:"六级标题",value:"h6"}]}),(0,i.setSchemaTpl)("tpl:inline",{label:"内联模式",type:"switch",name:"inline",mode:"inline",className:"w-full",pipeIn:(0,i.defaultValue)(!0),labelRemark:{trigger:"click",className:"m-l-xs",rootClose:!0,content:"内联模式采用 span
标签、非内联将采用 div
标签作为容器。",placement:"left"}});var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="tpl",t.$schema="/schemas/TplSchema.json",t.name="文字",t.isBaseComponent=!0,t.icon="fa fa-file-o",t.description="用来展示文字或者段落,支持模板语法可用来关联动态数据。",t.docLink="/amis/zh-CN/components/tpl",t.tags=["展示"],t.previewSchema={type:"tpl",tpl:"这是模板内容当前时间<%- new Date() %>"},t.scaffold={type:"tpl",tpl:"请编辑内容",inline:!1},t.panelTitle="文字",t.panelBodyCreator=function(e){var t=/\/cell\/field\/tpl$/.test(e.path);return[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[(0,i.getSchemaTpl)("tpl:content"),t?null:(0,i.getSchemaTpl)("tpl:wrapperComponent")]},{title:"外观",body:[(0,i.getSchemaTpl)("tpl:inline"),(0,i.getSchemaTpl)("className"),(0,i.getSchemaTpl)("style")]},{title:"显隐",body:[(0,i.getSchemaTpl)("ref"),(0,i.getSchemaTpl)("visible")]}])]},t.popOverBody=[(0,i.getSchemaTpl)("tpl:content"),(0,i.getSchemaTpl)("tpl:wrapperComponent")],t}return a.__extends(t,e),t}(o.BasePlugin);t.TplPlugin=l,(0,r.registerEditorPlugin)(l)},2766:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.VideoPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=n(3570),s=n(6374),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="video",t.$schema="/schemas/VideoSchema.json",t.name="视频",t.isBaseComponent=!0,t.description="视频控件,可以用来播放各种视频文件,包括 flv 和 hls 格式。",t.docLink="/amis/zh-CN/components/video",t.tags=["功能"],t.icon="fa fa-video-camera",t.scaffold={type:"video",autoPlay:!1,src:"https://media.w3.org/2010/05/sintel/trailer_hd.mp4",poster:(0,s.mockValue)({type:"image"})},t.previewSchema=a.__assign({},t.scaffold),t.panelTitle="视频",t.panelBody=[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[{name:"src",type:"input-text",label:"视频地址",description:"可以写静态值,也可以用变量取比如:\\${videoSrc}
"},{name:"poster",type:"input-text",label:"视频封面图片地址",description:"可以写静态值,也可以用变量取比如:\\${videoPoster}
"},{name:"autoPlay",type:"switch",mode:"inline",className:"block",label:"自动播放"},{name:"muted",type:"switch",mode:"inline",className:"block",label:"静音"},{name:"isLive",type:"switch",mode:"inline",className:"block",label:"直播流",description:"如果是直播流,请勾选,否则有可能不能正常播放。"}]},{title:"外观",body:[{name:"aspectRatio",label:"视频比例",type:"button-group-select",size:"sm",mode:"inline",className:"block",value:"auto",options:[{label:"自动",value:"auto"},{label:"4:3",value:"4:3"},{label:"16:9",value:"16:9"}]},{name:"splitPoster",type:"switch",mode:"inline",className:"block",label:"分开显示封面"},(0,i.getSchemaTpl)("className")]},{title:"显隐",body:[(0,i.getSchemaTpl)("visible")]},{title:"其他",body:[(0,i.getSchemaTpl)("ref"),{type:"input-text",name:"rates",label:"视频速率",multiple:!0,joinValues:!1,extractValue:!0,options:[.5,1,1.25,1.5,2,2.5,3,3.5,4,4.5,5].map((function(e){return{label:e,value:e}}))},{name:"frames",type:"input-text",label:"视频帧信息",description:"比如填写:\\${videoFrames}
会在当前作用域中查找 videoFrames 变量,如果是对象,将生成视频截图列表,点击后可跳转到对应的帧。"}]}])],t}return a.__extends(t,e),t.prototype.filterProps=function(e){return e.frames=(0,l.JSONPipeOut)(e.frames),e},t}(o.BasePlugin);t.VideoPlugin=u,(0,r.registerEditorPlugin)(u)},9963:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WebComponentPlugin=void 0;var a=n(752),r=n(9756),o=n(9933);n(1779);var i=function(e){function t(){return null!==e&&e.apply(this,arguments)||this}return a.__extends(t,e),t.prototype.connectedCallback=function(){this.attachShadow({mode:"open"}).textContent="web-component-demo"},t}(HTMLElement);try{customElements.define("web-component-demo",i)}catch(e){console.log("[amis-editor]",e)}var l=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="web-component",t.$schema="/schemas/WebComponentSchema.json",t.name="Web Component",t.isBaseComponent=!0,t.description="用于渲染 Web Component 组件",t.docLink="/amis/zh-CN/components/web-component",t.tags=["容器"],t.icon="fa fa-square-o",t.scaffold={type:"web-component",tag:"web-component-demo"},t.previewSchema=a.__assign({},t.scaffold),t.panelTitle="包裹",t.panelBody=[{type:"input-text",label:"标签",name:"tag"},{type:"input-kv",label:"属性",name:"props"}],t}return a.__extends(t,e),t}(o.BasePlugin);t.WebComponentPlugin=l,(0,r.registerEditorPlugin)(l)},3306:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WizardPlugin=void 0;var a=n(752),r=n(9756),o=n(9933),i=n(9547),l=a.__importDefault(n(6689)),s=n(5863),u=n(9703),d=n(1548),c=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="wizard",t.$schema="/schemas/WizardSchema.json",t.name="向导",t.isBaseComponent=!0,t.description="表单向导,可以将复杂的多个表单项拆分成多个步骤,一步一步指引用户完成填写。",t.docLink="/amis/zh-CN/components/wizard",t.tags=["功能"],t.icon="fa fa-list-ol",t.scaffold={type:"wizard",steps:[{title:"第一步",body:[{type:"input-text",label:"文本",name:"var1"}]},{title:"第二步",body:[{type:"input-text",label:"文本2",name:"var2"}]}]},t.previewSchema={type:"wizard",className:"text-left m-b-none",steps:[{title:"第一步",body:[{type:"input-text",label:"文本",name:"var1"}]},{title:"第二步",body:[]}]},t.panelTitle="向导",t.panelBody=[(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[{name:"steps",label:"步骤设置",type:"combo",multiple:!0,multiLine:!0,addButtonText:"新增一步",scaffold:{title:"标题",items:[{type:"input-text",name:"var1",label:"文本"}]},items:[{name:"title",type:"input-text",label:"标题",pipeIn:function(e,t){return e||t.label}},{type:"fieldSet",title:"其他设置",collapsed:!0,collapsable:!0,className:"fieldset m-b-none",body:[{name:"mode",label:"展示模式",type:"button-group-select",size:"xs",mode:"inline",className:"w-full",value:"normal",options:[{label:"默认",value:"normal"},{label:"左右摆放",value:"horizontal"},{label:"内联",value:"inline"}]},(0,i.getSchemaTpl)("horizontal",{visibleOn:'data.mode == "horizontal"'}),(0,i.getSchemaTpl)("api",{label:"保存接口",description:"如果接口返回了 step
变量,且数值是数字类型,比如 3
,提交完后回跳到第 3 步"}),{label:"采用异步方式?",remark:{trigger:"click",rootClose:!0,title:"什么是异步方式?",content:"异步方式主要用来解决请求超时问题,启用异步方式后,程序会在请求完后,定时轮询请求额外的接口用来咨询操作是否完成。所以接口可以快速的返回,而不需要等待流程真正完成。",placement:"left"},type:"switch",name:"asyncApi",visibleOn:"data.api",pipeIn:function(e){return null!=e},pipeOut:function(e){return e?"":void 0},mode:"inline",className:"block"},(0,i.getSchemaTpl)("api",{name:"asyncApi",label:"异步检测接口",visibleOn:"data.asyncApi != null",description:"设置此属性后,表单提交发送保存接口后,还会继续轮训请求该接口,直到返回 finished 属性为 true 才 结束"}),{type:"divider"},(0,i.getSchemaTpl)("api",{name:"initApi",label:"初始化接口",description:"用来初始化表单数据"}),{label:"采用异步方式?",remark:{trigger:"click",rootClose:!0,title:"什么是异步方式?",content:"异步方式主要用来解决请求超时问题,启用异步方式后,程序会在请求完后,定时轮询请求额外的接口用来咨询操作是否完成。所以接口可以快速的返回,而不需要等待流程真正完成。",placement:"left"},type:"switch",name:"initAsyncApi",visibleOn:"data.initApi",pipeIn:function(e){return null!=e},pipeOut:function(e){return e?"":void 0},mode:"inline",className:"block"},(0,i.getSchemaTpl)("api",{name:"initAsyncApi",label:"异步检测接口",visibleOn:"data.initAsyncApi != null",description:"设置此属性后,表单请求 initApi 后,还会继续轮训请求该接口,直到返回 finished 属性为 true 才 结束"}),(0,i.getSchemaTpl)("initFetch"),{label:"是否可被点开",type:"input-text",name:"jumpableOn",description:"用表达式来决定,当前步骤是否可被点开。额外可用变量:currentStep 表示当前步骤。"}]}]},{type:"input-text",name:"startStep",label:"起始默认值",description:"从第几步开始。可支持模版,但是只有在组件创建时渲染模版并设置当前步数,在之后组件被刷新时,当前step不会根据startStep改变"}]},{title:"接口",body:[(0,i.getSchemaTpl)("api",{name:"initApi",label:"初始化接口",description:"用来初始化向导数据,当接口中返回 step
字段时,可以控制默认跳转到第几步,注意数值一定得是数字类型。当返回 submiting
并且当前步骤中存在异步保存接口时,可以让 wizard 初始进入异步提交状态。"}),{label:"采用异步方式?",remark:{trigger:"click",rootClose:!0,title:"什么是异步方式?",content:"异步方式主要用来解决请求超时问题,启用异步方式后,程序会在请求完后,定时轮询请求额外的接口用来咨询操作是否完成。所以接口可以快速的返回,而不需要等待流程真正完成。",placement:"left"},type:"switch",name:"initAsyncApi",visibleOn:"data.initApi",pipeIn:function(e){return null!=e},pipeOut:function(e){return e?"":void 0},mode:"inline"},(0,i.getSchemaTpl)("api",{name:"initAsyncApi",label:"异步检测接口",visibleOn:"data.initAsyncApi != null",description:"设置此属性后,表单请求 initApi 后,还会继续轮训请求该接口,直到返回 finished 属性为 true 才 结束"}),{name:"initFetch",type:"radios",label:"是否初始拉取",inline:!0,onChange:function(){},options:[{label:"是",value:!0},{label:"否",value:!1},{label:"表达式",value:""}]},{name:"initFetch",autoComplete:!1,visibleOn:'typeof this.initFetch !== "boolean"',type:"input-text",placeholder:"",className:"m-t-n-sm"},{type:"divider"},(0,i.getSchemaTpl)("api",{label:"保存接口",description:"用来保存表单数据, 最后一步点击完成触发,如果最后一步中已经设置保存接口,则此处设置无效。
"}),{label:"采用异步方式?",remark:{trigger:"click",rootClose:!0,title:"什么是异步方式?",content:"异步方式主要用来解决请求超时问题,启用异步方式后,程序会在请求完后,定时轮询请求额外的接口用来咨询操作是否完成。所以接口可以快速的返回,而不需要等待流程真正完成。",placement:"left"},type:"switch",name:"asyncApi",visibleOn:"data.api",pipeIn:function(e){return null!=e},pipeOut:function(e){return e?"":void 0},mode:"inline"},(0,i.getSchemaTpl)("api",{name:"asyncApi",label:"异步检测接口",visibleOn:"data.asyncApi != null",description:"设置此属性后,表单提交发送保存接口后,还会继续轮训请求该接口,直到返回 finished 属性为 true 才 结束"})]},{title:"外观",body:[{name:"mode",label:"展示模式",type:"button-group-select",size:"sm",mode:"inline",className:"w-full",value:"horizontal",options:[{label:"水平",value:"horizontal"},{label:"垂直",value:"vertical"}]},{name:"actionPrevLabel",label:"上一步按钮名称",type:"input-text",pipeIn:(0,i.defaultValue)("上一步")},{name:"actionNextLabel",label:"下一步按钮名称",type:"input-text",pipeIn:(0,i.defaultValue)("下一步")},{name:"actionNextSaveLabel",label:"保存并下一步按钮名称",type:"input-text",pipeIn:(0,i.defaultValue)("保存并下一步")},{name:"actionFinishLabel",label:"完成按钮名称",type:"input-text",pipeIn:(0,i.defaultValue)("完成")},(0,i.getSchemaTpl)("className"),(0,i.getSchemaTpl)("className",{name:"actionClassName",label:"按钮 CSS 类名"})]},{title:"其他",body:[(0,i.getSchemaTpl)("ref"),(0,i.getSchemaTpl)("name"),(0,i.getSchemaTpl)("reload"),{label:"跳转",name:"redirect",type:"input-text",description:"当设置此值后,表单提交完后跳转到目标地址。"},(0,i.getSchemaTpl)("visible")]}])],t.patchContainers=["steps.body"],t.vRendererConfig={regions:{body:{key:"body",label:"表单集合",wrapperResolve:function(e){return e}},actions:{label:"按钮组",key:"actions",preferTag:"按钮",wrapperResolve:function(e){return e}}},panelTitle:"步骤",panelBodyCreator:function(e){return(0,i.getSchemaTpl)("tabs",[{title:"常规",body:[{name:"title",type:"input-text",label:"标题",pipeIn:function(e,t){return e||t.label}},(0,i.getSchemaTpl)("api",{label:"保存接口",description:"如果接口返回了 step
变量,且数值是数字类型,比如 3
,提交完后回跳到第 3 步"}),{label:"采用异步方式?",remark:{trigger:"click",rootClose:!0,title:"什么是异步方式?",content:"异步方式主要用来解决请求超时问题,启用异步方式后,程序会在请求完后,定时轮询请求额外的接口用来咨询操作是否完成。所以接口可以快速的返回,而不需要等待流程真正完成。",placement:"left"},type:"switch",name:"asyncApi",visibleOn:"data.api",pipeIn:function(e){return null!=e},pipeOut:function(e){return e?"":void 0},mode:"inline",className:"block"},(0,i.getSchemaTpl)("api",{name:"asyncApi",label:"异步检测接口",visibleOn:"data.asyncApi != null",description:"设置此属性后,表单提交发送保存接口后,还会继续轮训请求该接口,直到返回 finished 属性为 true 才 结束"}),{type:"divider"},(0,i.getSchemaTpl)("api",{name:"initApi",label:"初始化接口",description:"用来初始化表单数据"}),{label:"采用异步方式?",remark:{trigger:"click",rootClose:!0,title:"什么是异步方式?",content:"异步方式主要用来解决请求超时问题,启用异步方式后,程序会在请求完后,定时轮询请求额外的接口用来咨询操作是否完成。所以接口可以快速的返回,而不需要等待流程真正完成。",placement:"left"},type:"switch",name:"initAsyncApi",visibleOn:"data.initApi",pipeIn:function(e){return null!=e},pipeOut:function(e){return e?"":void 0},mode:"inline",className:"block"},(0,i.getSchemaTpl)("api",{name:"initAsyncApi",label:"异步检测接口",visibleOn:"data.initAsyncApi != null",description:"设置此属性后,表单请求 initApi 后,还会继续轮训请求该接口,直到返回 finished 属性为 true 才 结束"}),(0,i.getSchemaTpl)("initFetch")]},{title:"外观",body:[{name:"mode",label:"展示模式",type:"button-group-select",size:"xs",mode:"inline",className:"w-full",value:"normal",options:[{label:"默认",value:"normal"},{label:"左右摆放",value:"horizontal"},{label:"内联",value:"inline"}]},(0,i.getSchemaTpl)("horizontal",{visibleOn:'data.mode == "horizontal"'})]},{title:"其他",body:[{label:"是否可被点开",type:"input-text",name:"jumpableOn",description:"用表达式来决定,当前步骤是否可被点开。额外可用变量:currentStep 表示当前步骤。"}]}])}},t.wizardWrapperResolve=function(e){return[].slice.call(e.querySelectorAll('[role="wizard-body"],[role="wizard-footer"]'))},t.overrides={renderWizard:function(){var e=this,t=this.props.$$editor,n=this.props.steps,r=this.state.currentStep,o=this.super();if(!t||!(null==n?void 0:n[r-1]))return o;var i=r-1,c=n[i],p=c.$$id,f=t.plugin;return(0,u.mapReactElement)(o,(function(n){return/Wizard-step\b/.test(n.props.className)?l.default.createElement(s.VRenderer,{key:p,plugin:t.plugin,renderer:t.renderer,$schema:"/schemas/WizardStepSchema.json",hostId:t.id,memberIndex:i,name:c.title||"步骤".concat(i+1),id:p,draggable:!1,wrapperResolve:f.wizardWrapperResolve,schemaPath:"".concat(t.schemaPath,"/steps/").concat(i),path:"".concat(e.props.$path,"/").concat(i),data:e.props.data},(0,u.mapReactElement)(n,(function(e,n){var r,o,i;if((null===(r=e.props.schema)||void 0===r?void 0:r.body)&&e.props.schema.$$id){var s=null===(i=null===(o=f.vRendererConfig)||void 0===o?void 0:o.regions)||void 0===i?void 0:i.body;if(!s)return e;var u=a.__assign({},e.props.schema);return delete u.$$id,l.default.createElement(d.RegionWrapper,{key:s.key,preferTag:s.preferTag,name:s.key,label:s.label,regionConfig:s,placeholder:s.placeholder,editorStore:f.manager.store,manager:f.manager,children:l.default.cloneElement(e,{schema:u}),wrapperResolve:s.wrapperResolve,rendererName:t.renderer.name})}return e}))):n}))},renderFooter:function(){var e,t,n=this.props.$$editor,a=this.props.steps,r=this.state.currentStep,o=this.super();if(!n||!(null==a?void 0:a[r-1]))return o;var i=n.plugin,s=null===(t=null===(e=i.vRendererConfig)||void 0===e?void 0:e.regions)||void 0===t?void 0:t.actions;return s?l.default.createElement(d.RegionWrapper,{key:s.key,preferTag:s.preferTag,name:s.key,label:s.label,regionConfig:s,placeholder:s.placeholder,editorStore:i.manager.store,manager:i.manager,children:o,wrapperResolve:s.wrapperResolve,rendererName:n.renderer.name}):o}},t}return a.__extends(t,e),t.prototype.buildEditorToolbar=function(e,t){if(e.info.plugin===this&&e.info.renderer.name===this.rendererName&&!e.info.hostId){var n=e.node;t.push({level:"secondary",icon:"fa fa-chevron-left",tooltip:"上个步骤",onClick:function(){var e=n.getComponent();if(null==e?void 0:e.gotoStep){var t=e.state.currentStep;e.gotoStep(t-1)}}}),t.push({level:"secondary",icon:"fa fa-chevron-right",tooltip:"下个步骤",onClick:function(){var e=n.getComponent();if(null==e?void 0:e.gotoStep){var t=e.state.currentStep;e.gotoStep(t+1)}}})}},t.prototype.filterProps=function(e){return e.affixFooter=!1,e},t}(o.BasePlugin);t.WizardPlugin=c,(0,r.registerEditorPlugin)(c)},1800:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.WrapperPlugin=void 0;var a=n(752),r=n(1502),o=a.__importDefault(n(6689)),i=n(9756),l=n(9933),s=n(9547),u=function(e){function t(){var t=null!==e&&e.apply(this,arguments)||this;return t.rendererName="wrapper",t.$schema="/schemas/WrapperSchema.json",t.disabledRendererPlugin=!0,t.name="包裹",t.isBaseComponent=!0,t.description="类似于容器,唯一的区别在于会默认会有一层内边距。",t.docLink="/amis/zh-CN/components/wrapper",t.tags=["容器"],t.icon="fa fa-square-o",t.scaffold={type:"wrapper",body:"内容"},t.previewSchema=a.__assign({},t.scaffold),t.regions=[{key:"body",label:"内容区"}],t.panelTitle="包裹",t.panelBody=[(0,s.getSchemaTpl)("tabs",[{title:"常规",body:[{children:o.default.createElement(r.Button,{size:"sm",className:"m-b-sm",level:"info",block:!0,onClick:function(){t.manager.showRendererPanel("","请从左侧组件面板中点击添加内容元素")}},"新增内容")},(0,s.getSchemaTpl)("size",{label:"内间距大小",options:[{label:"极小",value:"xs"},{label:"小",value:"sm"},{label:"默认",value:""},{label:"中",value:"md"},{label:"大",value:"lg"},{label:"无",value:"none"}],pipeIn:(0,s.defaultValue)("")})]},{title:"样式",body:[(0,s.getSchemaTpl)("className",{description:"设置样式后,大小设置将无效。",pipeIn:(0,s.defaultValue)("bg-white")}),(0,s.getSchemaTpl)("style")]}])],t}return a.__extends(t,e),t}(l.BasePlugin);t.WrapperPlugin=u,(0,i.registerEditorPlugin)(u)},7172:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:!0}),t.EditorStore=void 0;var a=n(752),r=n(3893),o=n(2717),i=n(3570),l=n(3570),s=n(1502),u=a.__importDefault(n(6918)),d=n(1169),c=n(6151),p=a.__importDefault(n(5452)),f=n(2406),m=a.__importDefault(n(8425));t.EditorStore=o.types.model("EditorRoot",{isMobile:!1,isSubEditor:!1,amisDocHost:o.types.optional(o.types.string,"https://baidu.gitee.io"),root:o.types.optional(f.EditorNode,{id:"root",label:"Root"}),theme:"cxd",hoverId:"",hoverRegion:"",activeId:"",activeRegion:"",mouseMoveRegion:"",selections:o.types.optional(o.types.frozen(),[]),contextId:"",dragMode:"move",dragId:"",dragType:"",dragSchema:o.types.frozen(),dropId:"",dropRegion:"",planDropId:"",planDropRegion:"",insertId:"",insertRegion:"",insertRenderers:o.types.optional(o.types.frozen(),[]),insertRenderersKeywords:"",insertTag:"全部",insertSelected:"",insertMode:"insert",insertOrigId:"",insertBeforeId:"",showInsertRenderer:!1,schema:o.types.frozen(),versionId:0,schemaHistory:o.types.optional(o.types.array(o.types.frozen()),[]),toolbars:o.types.optional(o.types.frozen(),[]),panels:o.types.optional(o.types.frozen(),[]),showCustomRenderersPanel:!1,renderersTabsKey:"base-renderers",subRenderers:o.types.optional(o.types.frozen(),[]),subRenderersKeywords:"",subRenderersTag:"",subRendererRegion:"",customRenderersKeywords:"",customRenderersTag:"",panelKey:"",leftPanelKey:"",leftPanelOpenStatus:!0,jsonSchemaUri:"",scaffoldForm:o.types.maybe(o.types.frozen()),scaffoldFormBuzy:!1,scaffoldError:"",popOverForm:o.types.maybe(o.types.frozen()),subEditorContext:o.types.maybe(o.types.frozen()),calculateStarted:!1,targetNames:o.types.optional(o.types.array(o.types.frozen()),[]),ctx:o.types.frozen()}).views((function(e){return{get filteredSchema(){var t,n,a;return(0,i.filterSchemaForEditor)(null!==(a=null===(n=(t=(0,o.getEnv)(e)).schemaFilter)||void 0===n?void 0:n.call(t,e.schema))&&void 0!==a?a:e.schema)},get filteredSchemaForPreview(){var t,n,a,r=(0,l.JSONPipeOut)(e.schema);return null!==(a=null===(n=(t=(0,o.getEnv)(e)).schemaFilter)||void 0===n?void 0:n.call(t,r))&&void 0!==a?a:r},isRootSchema:function(e){var t=this.getSchema();return!(!t||t.$$id!==e)},isHoved:function(t){return t&&e.hoverId===t},isActive:function(t){return t&&!this.dragging&&!e.insertOrigId&&e.insertBeforeId!==t&&e.activeId===t},isContextOn:function(t){return t&&e.contextId===t},get activeContainerId(){var t;if(!e.activeId)return"";for(var n=this.getNodeById(e.activeId);n;){if(n.childRegions.length||(null===(t=n.info)||void 0===t?void 0:t.regions))return n.id;n=n.host}return""},isRegionHighlighted:function(t,n){return!e.insertOrigId&&t===e.hoverId&&n===e.hoverRegion||t===e.activeId&&e.activeRegion===n||t===e.dropId&&e.dropRegion===n||!e.insertOrigId&&t===e.insertId&&e.insertRegion===n},isRegionHighlightHover:function(t,n){return t===e.hoverId&&n===e.mouseMoveRegion},isRegionActive:function(t,n){return this.isActive(t)||t===e.dropId||this.isRegionHighlighted(t,n)||this.isRegionHighlightHover(t,n)},isRegionDragEnter:function(t,n){return this.isRegionActive(t,n)&&n===e.dropRegion},get highlightNodes(){var t=this,n=[];return!e.hoverId||e.dragId||e.contextId||e.activeId===e.hoverId&&!e.hoverRegion||e.selections.includes(e.hoverId)||n.push(e.hoverId),e.contextId&&n.push(e.contextId),!e.activeId&&!e.selections.length||e.dragId||e.insertOrigId||e.insertId||e.hoverId&&e.hoverRegion||(e.activeId?n.push(e.activeId):n.push.apply(n,e.selections)),"insert"===e.insertMode&&e.insertId&&n.push(e.insertId),e.insertOrigId&&n.push(e.insertOrigId),e.dropId&&n.push(e.dropId),e.insertBeforeId&&n.push(e.insertBeforeId),n.filter((function(e,t,n){return e&&t===n.indexOf(e)})).map((function(e){return t.getNodeById(e)})).filter((function(e){return e}))},getNodeById:function(t,n){for(var a=e.root.children.concat();a.length;){var r=a.shift();if(r.id===t&&(!n||r.region===n))return r;r.children.length&&a.push.apply(a,r.children)}},get activeNodeInfo(){var t;return null===(t=this.getNodeById(e.activeId))||void 0===t?void 0:t.info},getSchema:function(t){return t?(0,i.JSONGetById)(e.schema,t):e.schema},getSchemaParentById:function(t){return(0,l.JSONGetParentById)(e.schema,t)},getSchemaPath:function(t){var n=(0,l.JSONGetPathById)(e.schema,t);return Array.isArray(n)?n.join("/"):""},getSimpleSchema:function(t){var n,a,r,i=(0,l.JSONPipeOut)(t);return null!==(r=null===(a=(n=(0,o.getEnv)(e)).schemaFilter)||void 0===a?void 0:a.call(n,i))&&void 0!==r?r:i},getPanelKey:function(){var t,n=e.panelKey;if("none"===n)return n;var a=this.getPanels();return(0,u.default)(a,(function(e){return n&&e.key===n}))?n:(null===(t=a[0])||void 0===t?void 0:t.key)||"none"},getLeftPanelKey:function(){var t=e.leftPanelKey;if(this.dragging)return"outline";if("none"===t)return t;var n=this.getLeftPanels();return(0,u.default)(n,(function(e){return t&&e.key===t}))?t:"renderers"},get leftPanels(){return e.panels.filter((function(e){return"left"===e.position}))},get rightPanels(){return e.panels.filter((function(e){return"left"!==e.position&&"contextmenu"!==e.key}))},get contextMenuPanel(){return e.panels.find((function(e){return"contextmenu"===e.key}))},getPanels:function(){return[].concat(this.rightPanels||[]).sort((function(e,t){return e.order-t.order}))},getLeftPanels:function(){var t=[].concat(this.leftPanels||[]);return e.insertId&&e.insertRegion&&t.push({key:"insert",icon:"fa fa-bolt",position:"left",title:"replace"===e.insertMode?"变更":"插入",component:d.InsertSubRendererPanel,order:9999}),t.push({key:"insertRenderer",icon:"fa fa-bolt",position:"left",title:"插入组件面板",component:c.AvailableRenderersPanel,order:9999}),t.sort((function(e,t){return e.order-t.order}))},get sortedToolbars(){return e.toolbars.filter((function(e){return"secondary"!==e.level&&"special"!==e.level})).sort((function(e,t){return e.order-t.order}))},get sortedSecondaryToolbars(){return e.toolbars.filter((function(e){return"secondary"===e.level})).sort((function(e,t){return e.order-t.order}))},get sortedSpecialToolbars(){return e.toolbars.filter((function(e){return"special"===e.level})).sort((function(e,t){return e.order-t.order}))},get value(){if(e.activeId)return this.getValueOf(e.activeId)},getValueOf:function(t){return(0,l.JSONPipeOut)((0,i.JSONGetById)(e.schema,t))},get valueWithoutHiddenProps(){if(e.activeId)return(0,l.JSONPipeOut)((0,i.JSONGetById)(e.schema,e.activeId),(0,o.getEnv)(e).isHiddenProps||function(e){return"$$"===e.substring(0,2)&&"$$comments"!==e&&"$$commonSchema"!==e||"__"===e.substring(0,2)})},get outline(){return e.root.children},get bcn(){var t=[];return e.activeId&&(0,r.findTree)(e.root.children,(function(n,a,r,o){return n.id===e.activeId&&(t=o.concat(n),!0)})),t},get activePath(){return this.getNodePathById(e.activeId)},getNodePathById:function(t){var n=[];if(!t)return n;var a=function(e,r){return void 0===r&&(r=[]),e.every((function(e){return e.id===t?(n=r.concat(e),!1):!e.children||!e.children.length||a(e.children,r.concat(e))}))};return a(e.root.children),n},get dragging(){return!(!e.dragId&&!e.dropId)},get needPatch(){var t=function(e){return e.some((function(e){return!e.patched&&!e.isRegion||!!e.children.length&&t(e.children)}))};return t(e.root.children)},get schemaRaw(){return(0,l.JSONPipeOut)(e.schema)},get subRenderersByOrder(){return e.subRenderers.filter((function(t){return!(!t.disabledRendererPlugin&&e.showCustomRenderersPanel)||t.isBaseComponent})).sort((function(e,t){return e.order-t.order}))},get customRenderersByOrder(){return e.subRenderers.filter((function(e){return!e.disabledRendererPlugin&&!e.isBaseComponent})).sort((function(e,t){return e.order-t.order}))},groupedRenderersByKeyword:function(e,t){var n=e,a={},r=t?new RegExp(t,"i"):null;return n.forEach((function(e){t&&!["name","description","scaffold.type"].some((function(t){return(0,s.resolveVariable)(t,e)&&r&&r.test((0,s.resolveVariable)(t,e))}))||(Array.isArray(e.tags)?e.tags.concat():e.tags?[e.tags]:["其他"]).forEach((function(t){a[t]=a[t]||[],a[t].push(e)}))})),a},groupedSubRenderersByKeyword:function(e,t){var n=e||this.subRenderersByOrder;return this.groupedRenderersByKeyword(n,t)},get groupedSubRenderers(){if(e.subRenderersTag){var t={},n=this.groupedSubRenderersByKeyword()[e.subRenderersTag];return n&&(t[e.subRenderersTag]=n),t}return this.groupedSubRenderersByKeyword(this.subRenderersByOrder,e.subRenderersKeywords)},groupedCustomRenderersByKeyword:function(e,t){var n=e||this.customRenderersByOrder;return this.groupedRenderersByKeyword(n,t)},get groupedCustomRenderers(){if(e.customRenderersTag){var t={},n=this.groupedCustomRenderersByKeyword()[e.customRenderersTag];return n&&(t[e.customRenderersTag]=n),t}return this.groupedCustomRenderersByKeyword(this.customRenderersByOrder,e.customRenderersKeywords)},getSubRendererById:function(t){return(0,u.default)(e.subRenderers||[],(function(e){return e.id===t}))},get groupedInsertRenderers(){var t={"全部":[]},n=e.insertRenderersKeywords,a=new RegExp(n,"i");return e.insertRenderers.concat().sort((function(e,t){return e.order-t.order})).forEach((function(e){n&&!["name","description","scaffold.type"].some((function(t){return(0,s.resolveVariable)(t,e)&&a.test((0,s.resolveVariable)(t,e))}))||((Array.isArray(e.tags)?e.tags.concat():e.tags?[e.tags]:["其他"]).forEach((function(n){t[n]=t[n]||[],t[n].push(e)})),t["全部"].push(e))})),t},get selectedInsertRendererInfo(){return(0,u.default)(e.insertRenderers,(function(t){return t.id===e.insertSelected}))},get subEditorSlotPath(){var t,n=null===(t=e.subEditorContext)||void 0===t?void 0:t.slot;if(!n)return"";var a=[],r=function(e,t){return void 0===t&&(t=[]),!(!Array.isArray(e)||!e.some((function(e,n){return r(e,t.concat("".concat(n)))})))||((0,p.default)(e)?Object.keys(e).some((function(n){return r(e[n],t.concat(n))})):"$$"===e&&(a=t.concat(),!0))};return r(n),a.length?a.join("/"):""},get subEditorValue(){if(e.subEditorContext)return e.subEditorContext.slot?a.__assign(a.__assign({},(0,r.mapObject)(e.subEditorContext.slot,(function(t){return"$$"===t?e.subEditorContext.value:t}))),{isSlot:!0}):e.subEditorContext.value},get canUndo(){return 0!==e.schemaHistory.findIndex((function(t){return t.versionId===e.versionId}))},get canRedo(){return e.schemaHistory.findIndex((function(t){return t.versionId===e.versionId}))