@farris/ui-vue 1.5.7 → 1.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (113) hide show
  1. package/components/avatar/index.esm.js +4 -4
  2. package/components/avatar/index.umd.cjs +1 -1
  3. package/components/component/index.esm.js +4 -4
  4. package/components/component/index.umd.cjs +1 -1
  5. package/components/condition/index.esm.js +4 -4
  6. package/components/condition/index.umd.cjs +1 -1
  7. package/components/content-container/index.esm.js +4 -4
  8. package/components/content-container/index.umd.cjs +1 -1
  9. package/components/date-picker/index.esm.js +1082 -1421
  10. package/components/date-picker/index.umd.cjs +1 -1
  11. package/components/designer-canvas/index.esm.js +4 -4
  12. package/components/designer-canvas/index.umd.cjs +1 -1
  13. package/components/dynamic-form/index.esm.js +4 -4
  14. package/components/dynamic-form/index.umd.cjs +1 -1
  15. package/components/dynamic-view/index.esm.js +4 -4
  16. package/components/dynamic-view/index.umd.cjs +1 -1
  17. package/components/events-editor/index.esm.js +4 -4
  18. package/components/events-editor/index.umd.cjs +1 -1
  19. package/components/filter-bar/index.esm.js +12 -11
  20. package/components/filter-bar/index.umd.cjs +1 -1
  21. package/components/flow-canvas/index.esm.js +4 -4
  22. package/components/flow-canvas/index.umd.cjs +1 -1
  23. package/components/number-range/index.esm.js +4 -4
  24. package/components/number-range/index.umd.cjs +1 -1
  25. package/components/number-spinner/index.esm.js +4 -4
  26. package/components/number-spinner/index.umd.cjs +1 -1
  27. package/components/page-header/index.esm.js +1584 -2320
  28. package/components/page-header/index.umd.cjs +1 -1
  29. package/components/property-panel/index.esm.js +4 -4
  30. package/components/property-panel/index.umd.cjs +1 -1
  31. package/components/query-solution/index.esm.js +77 -76
  32. package/components/query-solution/index.umd.cjs +6 -6
  33. package/components/response-layout/index.esm.js +4 -4
  34. package/components/response-layout/index.umd.cjs +1 -1
  35. package/components/response-toolbar/index.esm.js +500 -3662
  36. package/components/response-toolbar/index.umd.cjs +1 -1
  37. package/components/schema-selector/index.esm.js +3008 -7347
  38. package/components/schema-selector/index.umd.cjs +6 -6
  39. package/components/section/index.esm.js +1564 -1635
  40. package/components/section/index.umd.cjs +1 -1
  41. package/components/tabs/index.esm.js +545 -4943
  42. package/components/tabs/index.umd.cjs +1 -1
  43. package/components/textarea/index.esm.js +100 -5841
  44. package/components/textarea/index.umd.cjs +2 -2
  45. package/components/time-picker/index.esm.js +4 -4
  46. package/components/time-picker/index.umd.cjs +1 -1
  47. package/components/video/index.esm.js +4 -4
  48. package/components/video/index.umd.cjs +1 -1
  49. package/designer/button-edit/index.css +1 -0
  50. package/designer/button-edit/index.esm.js +1556 -0
  51. package/designer/button-edit/index.umd.cjs +1 -0
  52. package/designer/checkbox/index.esm.js +207 -0
  53. package/designer/checkbox/index.umd.cjs +1 -0
  54. package/designer/checkbox-group/index.esm.js +377 -0
  55. package/designer/checkbox-group/index.umd.cjs +1 -0
  56. package/designer/data-grid/index.css +1 -0
  57. package/designer/data-grid/index.esm.js +14332 -0
  58. package/designer/data-grid/index.umd.cjs +20 -0
  59. package/designer/data-view/index.esm.js +271 -0
  60. package/designer/data-view/index.umd.cjs +1 -0
  61. package/designer/date-picker/index.esm.js +1879 -0
  62. package/designer/date-picker/index.umd.cjs +1 -0
  63. package/designer/drawer/index.css +1 -0
  64. package/designer/drawer/index.esm.js +463 -0
  65. package/designer/drawer/index.umd.cjs +1 -0
  66. package/designer/farris-designer.all.esm.js +16815 -0
  67. package/designer/farris-designer.all.umd.cjs +32 -0
  68. package/designer/index.css +1 -0
  69. package/designer/input-group/index.esm.js +647 -0
  70. package/designer/input-group/index.umd.cjs +1 -0
  71. package/designer/radio-group/index.esm.js +6959 -0
  72. package/designer/radio-group/index.umd.cjs +1 -0
  73. package/designer/response-toolbar/index.esm.js +3015 -0
  74. package/designer/response-toolbar/index.umd.cjs +1 -0
  75. package/designer/tabs/index.esm.js +2200 -0
  76. package/designer/tabs/index.umd.cjs +1 -0
  77. package/designer/textarea/index.esm.js +249 -0
  78. package/designer/textarea/index.umd.cjs +1 -0
  79. package/designer/tree-grid/index.css +1 -0
  80. package/designer/tree-grid/index.esm.js +1673 -0
  81. package/designer/tree-grid/index.umd.cjs +1 -0
  82. package/farris.all.esm.js +57107 -57105
  83. package/farris.all.umd.cjs +16 -16
  84. package/package.json +1 -1
  85. package/types/date-picker/designer.d.ts +29 -0
  86. package/types/date-picker/index.d.ts +2 -1
  87. package/types/date-picker/src/date-picker.props.d.ts +0 -5
  88. package/types/date-picker/src/designer/date-picker.design.props.d.ts +22 -0
  89. package/types/response-toolbar/designer.d.ts +37 -0
  90. package/types/response-toolbar/index.d.ts +6 -5
  91. package/types/response-toolbar/src/composition/toolbar-item-dragula.d.ts +1 -2
  92. package/types/response-toolbar/src/composition/types.d.ts +1 -1
  93. package/types/response-toolbar/src/designer/response-toolbar.design.props.d.ts +13 -0
  94. package/types/response-toolbar/src/designer/use-designer-item-rules.d.ts +1 -2
  95. package/types/response-toolbar/src/designer/use-designer-rules.d.ts +1 -2
  96. package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -1
  97. package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -1
  98. package/types/response-toolbar/src/response-toolbar.props.d.ts +0 -12
  99. package/types/response-toolbar/src/schema/schema-resolver.d.ts +1 -1
  100. package/types/tabs/designer.d.ts +28 -0
  101. package/types/tabs/index.d.ts +1 -0
  102. package/types/tabs/src/components/tab-page.props.d.ts +0 -1
  103. package/types/tabs/src/designer/tab-page.design.props.d.ts +1 -0
  104. package/types/tabs/src/designer/tabs.design.props.d.ts +12 -0
  105. package/types/tabs/src/tabs.props.d.ts +0 -11
  106. package/types/textarea/designer.d.ts +28 -0
  107. package/types/textarea/index.d.ts +0 -15
  108. package/types/textarea/src/designer/textarea.design.props.d.ts +6 -0
  109. package/types/textarea/src/designer/use-design-rules.d.ts +1 -2
  110. package/types/textarea/src/property-config/textarea.property-config.d.ts +1 -1
  111. package/types/textarea/src/schema/schema-resolver.d.ts +1 -1
  112. package/types/textarea/src/textarea.props.d.ts +0 -5
  113. /package/{components/textarea → designer/radio-group}/index.css +0 -0
@@ -0,0 +1 @@
1
+ (function(G,Te){typeof exports=="object"&&typeof module<"u"?Te(exports,require("../../components/common/index.umd.js"),require("../../components/tabs/index.umd.js"),require("../response-toolbar/index.umd.js"),require("vue"),require("../../components/designer-canvas/index.umd.js"),require("../../components/dynamic-resolver/index.umd.js"),require("../../components/response-toolbar/index.umd.js"),require("../../components/capsule/index.umd.js"),require("../../components/property-panel/index.umd.js"),require("../../components/section/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","../../components/common/index.umd.js","../../components/tabs/index.umd.js","../response-toolbar/index.umd.js","vue","../../components/designer-canvas/index.umd.js","../../components/dynamic-resolver/index.umd.js","../../components/response-toolbar/index.umd.js","../../components/capsule/index.umd.js","../../components/property-panel/index.umd.js","../../components/section/index.umd.js"],Te):(G=typeof globalThis<"u"?globalThis:G||self,Te(G.tabs={},G.common,G.FTabs,G.FResponseToolbarDesign$1,G.Vue,G.designerCanvas,G.dynamicResolver,G.FResponseToolbarDesign,G.FCapsule,G.propertyPanel,G.FSection))})(this,function(G,Te,he,Re,a,ne,re,Oe,Qe,Ne,Je){"use strict";const Ie=new Map([["appearance",re.resolveAppearance]]);function Ze(s,t){const c=Math.random().toString().slice(2,6),f=t.parentComponentInstance,v=s.getSchemaByType("tab-page");v.id=`tab-page-${c}`,v.title="标题",v.toolbar={id:`tab-page-toolbar-${c}`,buttons:[]};const l=s.getSchemaByType("tabs");Object.assign(l,{id:`tabs-${c}`,appearance:{class:"f-component-tabs f-tabs-has-grid"},contents:[v],activeId:v.id});const u=s.getSchemaByType("section");Object.assign(u,{id:`section-${c}`,appearance:{class:"f-section-tabs f-section-in-mainsubcard"},fill:!1,showHeader:!1,contents:[l]});const n=s.getSchemaByType("content-container");Object.assign(n,{id:`container-${c}`,appearance:{class:"f-struct-wrapper"},contents:[u]});const r=f.schema;switch(r&&r.type){case ne.DgControl["splitter-pane"].type:{u.appearance.class="f-section-tabs f-section-in-main",l.appearance.class="f-component-tabs";break}}const m=f.elementRef,p=window.getComputedStyle(m);return p&&p.display==="flex"&&(n.appearance.class+=" d-block"),n}function ke(s,t,c){if(c.parentComponentInstance)return Ze(s,c);{const v=s.getSchemaByType("tab-page");return t.contents=[v],t}}function et(s,t,c){return t}const Le={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tabs.schema.json",title:"tabs",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a Tabs",type:"string"},type:{description:"The type string of Tabs component",type:"string",default:"tabs"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},contents:{description:"",type:"array",default:[]},autoTitleWidth:{description:"",type:"boolean",default:!1},titleWidth:{description:"",type:"number"},titleLength:{description:"",type:"number",default:7},fill:{description:"",type:"boolean",default:!1},visible:{description:"",type:"boolean",default:!0},activeId:{description:"",type:"string",default:""}},required:["id","type","contents"],events:{onTabChange:"切换标签页事件",onTabRemove:"移除标签页事件"}},tt={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tab-toolbar.schema.json",title:"tab-toolbar",description:"A Farris Toolbar Component",type:"object",properties:{id:{description:"The unique identifier for a Tab Toolbar",type:"string"},type:{description:"The type string of Tab Toolbar",type:"string",default:"tab-toolbar"},appearance:{description:"",type:"object",properties:{class:{type:"string",default:""}}},alignment:{description:"The alignment of Tab Toolbar Button.",type:"string",default:"right"},buttons:{description:"The items of Tab Toolbar.",type:"array",default:[]},buttonSize:{type:"string",default:""},visible:{description:"",type:"boolean",default:!0}},required:["id","type","buttons"],events:{onClick:"点击事件"}},nt=re.createPropsResolver(he.tabsProps,Le,Ie,ke),Ve=Object.assign({},he.tabsProps,{componentId:{type:String,default:""}}),ot=re.createPropsResolver(Ve,Le,Ie,ke),rt=re.createTabsEventHandlerResolver(),it=re.createPropsResolver(Oe.responseToolbarProps,tt,Ie,Re.schemaResolver);function at(s,t,c,f,v,l){const{activeId:u,selectTab:n,removeDesignTab:r,selectDesignTab:m,addTabPageToolbar:p,resetPositionForSelectedElement:d}=v,b=a.computed(()=>({"st-tab-text":!0,"farris-title-auto":s.autoTitleWidth})),g=a.computed(()=>{const x={"farris-component":!0,"nav-item":!0,"f-state-active":t.id===u.value};return x[`${t.id}-design-item`]=!0,x}),w=a.computed(()=>{const x={};return t.tabWidth&&t.tabWidth>0&&(x.width=`${t.tabWidth}px`),x}),C=a.computed(()=>({"nav-link":!0,"tabs-text-truncate":!0,active:t.id===u.value}));function L(x){return a.createVNode("span",{class:b.value,title:x.title},[x.title])}function k(x){return x.slots.title?x.slots.title:L}const j=k(c),O=a.ref(t.removeable);function E(){return a.createVNode("span",{class:"st-drop-close",style:{opacity:.6}},[a.createVNode("i",{class:"f-icon f-icon-close"},null)])}function S(x){n(t.id),s.tabType==="one-page"&&f.scrollToByPaggId(t.id)}function D(x){x&&(x.stopPropagation(),x.preventDefault()),m(x,t.id,l.value)}function N(x){r(x,t.id)}function A(x){p(x,t.id)}a.watch(()=>t.toolbarPosition,()=>{a.nextTick(()=>{d()})}),a.watch(()=>t.tabWidth,()=>{a.nextTick(()=>{d()})});function U(){return a.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeComponent",onClick:x=>N(x)},[a.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)])}function V(){return a.createVNode("div",{role:"button",class:"btn component-settings-button",title:"新增按钮",ref:"addComponent",onClick:x=>A(x)},[a.createVNode("i",{class:"f-icon f-icon-plus-circle"},null)])}function h(){return a.createVNode("div",{class:"component-btn-group","data-noattach":"true"},[a.createVNode("div",null,[U(),!t.toolbar||!t.toolbar.buttons||!t.toolbar.buttons.length?V():""])])}return a.createVNode("li",{onClick:x=>D(x),class:g.value,style:w.value,pageId:`${t.id}-design-item`},[h(),a.createVNode("a",{class:C.value,onClick:S,id:`${t.id}-design-item`},[j(t),O.value&&E()])])}function st(s,t,c,f,v,l,u){const{tabPages:n,selectTab:r,emitSelectionChange:m}=v,p=a.computed(()=>({spacer:!0,"f-utils-fill":!0})),d=a.computed(()=>({width:"100%","justify-content":s.justifyContent})),b=a.computed(()=>({nav:!0,"farris-nav-tabs":!0,"flex-nowrap":!0,"nav-fill":s.tabType==="fill","nav-pills":s.tabType==="pills","flex-row":s.position==="top"||s.position==="bottom","flex-column":s.position==="left"||s.position==="right"})),g=a.computed(()=>({overflow:"auto"})),w=function(C){var k;C&&(C.stopPropagation(),C.preventDefault());const L=re.getSchemaByType("tab-page");L.id=`tab_page_${Math.random().toString().slice(2,6)}`,L.title="标题",L.toolbar={id:`${L.id}_toolbar`,buttons:[]},(k=l.value.schema.contents)==null||k.push(L),r(L.id),a.nextTick(()=>{m(L.id,l.value)})};return()=>a.createVNode("div",{class:p.value,style:d.value},[a.createVNode("ul",{class:b.value,style:g.value,ref:t},[n.value.map(C=>at(s,C.props,C,f,v,l)),a.createVNode("li",{class:"nav-item no-drag add-nav-item"},[a.createVNode("a",{class:"nav-link tabs-text-truncate",title:"添加页签",onClick:C=>w(C)},[a.createVNode("i",{class:"f-icon f-icon-plus",style:"font-size: 20px;margin: 0 auto;line-height: 24px;"},null)])])])])}function ct(s,t,c,f,v){const l=a.ref(),{shouldShowNavigationButtons:u}=c,{activeId:n,tabPages:r,selectTab:m}=v,p=a.ref(n.value),d=a.computed(()=>r.value.map(C=>({name:C.props.title,value:C.props.id,show:C.props.show,disabled:C.props.disabled}))),b=a.computed(()=>({spacer:!0,"f-utils-fill":!0,"spacer-sides-dropdown":u.value})),g=a.computed(()=>({width:"100%",display:"flex","justify-content":s.justifyContent}));a.onMounted(()=>{l.value&&(t.value=l.value.$el)});function w(C){m(C)}return a.watch(()=>n.value,C=>{C!==p.value&&(p.value=C)},{immediate:!0}),()=>a.createVNode("div",{class:b.value,style:g.value},[a.createVNode(Qe,{items:d.value,modelValue:p.value,"onUpdate:modelValue":C=>p.value=C,onChange:w,ref:l},null)])}function lt(s,t,c,f){const v=a.ref(!1),{selectTab:l,tabPages:u,needUpdateNavigationLayout:n,activeId:r}=f,m=4,p=a.computed(()=>({btn:!0,"sc-nav-btn":!0,"px-1":!0,"sc-nav-lr":!0,"d-none":!v.value})),d=a.computed(()=>({"btn-group":!0,"sc-nav-btn":!0,dropdown:!0,"d-none":!v.value})),b=a.computed(()=>({btn:!0,"sc-nav-rg":!0,"d-none":!v.value}));function g(j,O){if(!t.value)return;const E=t.value.scrollLeft,S=t.value.scrollWidth-t.value.offsetWidth;if(O>0){if(t.value.scrollLeft>=S)return;t.value.scrollLeft=E+s.scrollStep+j}else if(O<0){if(t.value.scrollLeft<=0)return;t.value.scrollLeft=E-s.scrollStep-j}}function w(j=-1){if(!v.value||!t.value)return;j<0&&(j=u.value.findIndex(N=>N.props.id===r.value));const O=s.tabType==="pills"?".f-capsule-item":".nav-item",E=t.value.querySelectorAll(O),{parentElement:S}=t.value,D=E[j];if(D&&S){const N=S.getBoundingClientRect().left,A=S.getBoundingClientRect().right,U=D.getBoundingClientRect().left,V=D.getBoundingClientRect().right;U<N?g(N-U,-1):A<V&&g(V-A,1),s.tabType==="one-page"&&c.scrollTo(j)}}function C(){var E;if(!t.value)return;const j=t.value,O=(E=t.value)==null?void 0:E.parentElement;v.value=O&&j&&O.offsetWidth<j.scrollWidth-m,v.value&&a.nextTick(()=>{w()})}function L(j){j.disabled||l(j.id)}function k(){["default","one-page"].indexOf(s.tabType)>-1&&a.nextTick(()=>{w()})}return a.watch(n,()=>{C()}),{previousButtonClass:p,nextButtonGroupClass:d,nextButtonClass:b,scrollTab:g,selectAndScrollToTab:L,shouldShowNavigationButtons:v,updateNavigationLayout:C,scrollToSelectedTab:k}}function ut(s,t){const{tabPages:c}=t,f=a.ref(""),v=a.ref(!0),l=a.computed(()=>s.searchBoxVisible),u=a.computed(()=>l.value?c.value.filter(r=>r.props.title.includes(f.value)):c.value.slice());return a.watch(v,n=>{n||(f.value="")}),{searchTabText:f,hideDropDown:v,shouldShowSearchBox:l,tabsInDropdownMenu:u}}function dt(s,t,c){const f=".farris-tab-page",{tabPages:v}=c;function l(n){const r=t.value;if(r){const m=t.value.querySelectorAll(f);if(m.length>0){const p=m[n],{offsetTop:d}=p,b=d-32>0?d-32:0;r.scrollTop=b}}}function u(n){const r=v.value.findIndex(m=>m.props.id===n);r>-1&&l(r)}return{scrollTo:l,scrollToByPaggId:u}}class ft extends Ne.BaseControlProperty{constructor(t,c){super(t,c)}getPropertyConfig(t){return this.getBasicPropConfig(t),this.getAppearanceProperties(t),this.getBehaviorProperties(t),this.getToolbarProperties(t),this.propertyConfig}getBehaviorProperties(t){this.propertyConfig.categories.behavior={description:"",title:"行为",properties:{removeable:{description:"是否可移除",type:"boolean",title:"是否可移除"},disabled:{description:"是否禁用",type:"boolean",title:"是否禁用"},show:{description:"是否可见",type:"boolean",title:"是否可见"}}}}getBasicPropConfig(t){this.propertyConfig.categories.basic={description:"Basic Infomation",title:"基本信息",properties:{id:{description:"标签页项的标识",title:"标识",type:"string",readonly:!0},title:{description:"标签页项的标题",title:"标题",type:"string"}},setPropertyRelates(c,f){if(c)switch(c&&c.propertyID){case"title":{c.needRefreshControlTree=!0;break}}}}}getAppearanceProperties(t){this.propertyConfig.categories.appearance={title:"外观",description:"",properties:{customTitleClass:{title:"标题样式",type:"string",description:"为标签页的标题指定样式"},tabWidth:{description:"为标签页的标题指定宽度",type:"number",title:"标签页的标题宽度(px)",editor:{nullable:!0,min:0,decimals:0}}}}}getToolbarProperties(t){this.propertyConfig.categories.toolbar={title:"工具栏",description:"",properties:{toolbarPosition:{title:"工具栏位置",type:"string",description:"为工具栏指定位置",editor:{type:"combo-list",data:[{id:"inHead",name:"标题区域"},{id:"inContent",name:"内容区域"}]}}}}}}class pt extends Ne.BaseControlProperty{constructor(t,c){super(t,c)}getPropertyConfig(t){return this.propertyConfig.categories.basic=this.getBasicPropConfig(t),this.propertyConfig.categories.appearance=this.getAppearanceProperties(t),this.propertyConfig.categories.behavior=this.getBehaviorProperties(t),this.getEventPropConfig(t),this.propertyConfig}getAppearanceProperties(t){return{title:"外观",description:"Appearance",properties:{class:{title:"class样式",type:"string",description:""},titleWidth:{description:"标题区域宽度占标签头部区域的横向比例",type:"number",title:"标题区域宽度(%)",editor:{min:0,decimals:0,max:100,nullable:!0}},autoTitleWidth:{description:"是,则标题显示全部字符;否,则标题最多显示20个字符",type:"boolean",title:"标题自适应宽度"},fill:{description:"flex布局下,是否填充满剩余部分",type:"boolean",title:"填充"}}}}getBehaviorProperties(t){const c=this.getCurrentTabPages(t);t.activeId&&typeof t.activeId=="string"&&(c.find(u=>u.id===t.activeId)||(t.activeId=""));const f=this.getPropertyEditorParams(t,["Const","Variable"],"activeId",{constType:"enum",constEnums:c},{newVariableType:"String"}),v=this;return{description:"",title:"行为",properties:{activeId:{title:"默认选中标签页",type:"string",description:"默认选中标签页",defaultValue:c.length>0?c[0].id:"",editor:f}},setPropertyRelates(l,u){if(l)switch(l.propertyID){case"activeId":v.addNewVariableToViewModel(l,v.viewModelId);break}}}}getCurrentTabPages(t){const c=t.contents||[],f=[];return c.forEach(v=>{f.push({name:v.title,id:v.id})}),f}getEventPropConfig(t){const c=[{label:"onTabChange",name:"切换标签页事件"},{label:"onTabRemove",name:"移除标签页事件"}],f=this,v=f.eventsEditorUtils.formProperties(t,f.viewModelId,c),l={};l[f.viewModelId]={type:"events-editor",editor:{initialData:v}},this.propertyConfig.categories.eventsEditor={title:"事件",hideTitle:!0,properties:l,refreshPanelAfterChanged:!0,tabId:"commands",tabName:"交互",setPropertyRelates(u,n){const r=u.propertyValue;delete t[f.viewModelId],r&&(r.setPropertyRelates=this.setPropertyRelates,f.eventsEditorUtils.saveRelatedParameters(t,f.viewModelId,r.events,r))}}}}function mt(s,t){const c=s.schema,f=new ne.UseTemplateDragAndDropRules,{canMove:v,canAccept:l,canDelete:u}=f.getTemplateRule(s,t);function n(w){return l}function r(){return u}function m(){return v}function p(){return!v&&!u}function d(w){var k;return(((k=document.querySelector(".dgComponentFocused"))==null?void 0:k.id)===`${c.id}-design-item`?new pt(w,t):new ft(w,t)).getPropertyConfig(c)}function b(){s.designerItemElementRef.value&&a.nextTick(()=>{const w=s.designerItemElementRef.value.querySelector(".dgComponentSelected");w!=null&&w.className.includes("dgComponentSelected")&&w.click()})}function g(w){if(!w)return;const{changeObject:C}=w;C&&C.propertyID==="title"&&b()}return{canAccepts:n,checkCanDeleteComponent:r,checkCanMoveComponent:m,getPropsConfig:d,hideNestedPaddingInDesginerView:p,onPropertyChanged:g}}function vt(s,t,c,f,v,l){const u=a.ref([]),n=a.ref(s.activeId||""),r=a.ref(!0),m=a.ref(),p=a.ref([]),d=a.ref(0),b=a.computed(()=>{const e=u.value.find(y=>y.props.id===n.value);return(e==null?void 0:e.props.toolbarPosition)==="inHead"});let g;function w(e){g=e}function C(e,i=!0){const y=e.value&&e.value.length>0?0:-1;if(p.value=[],y!==-1&&(!n.value||typeof n.value=="object")){if(n.value=e.value[y].props.id,!i)return;const P=e.value[y];P&&P.props.toolbar&&P.props.toolbar.buttons&&P.props.toolbar.buttons.length&&(p.value=[...P.props.toolbar.buttons])}}function L(){const e=u.value.find(P=>P.props.id===n.value);if(p.value=[],e&&e.props.toolbar){const P=Object.prototype.hasOwnProperty.call(e.props.toolbar,"contents")?"contents":"buttons";e.props.toolbar[P]&&e.props.toolbar[P].length&&(p.value=[...e.props.toolbar[P]])}const i=f.schema.contents,y=i==null?void 0:i.find(P=>P.id===n.value);m.value=y==null?void 0:y.toolbar}function k(e){const i=n.value;n.value=e,v.changeSelectedId(""),L(),t.emit("tabChange",{prevId:i,nextId:n.value})}function j(e){let i=-1;!n.value&&(i=e.value.findIndex(y=>n.value===y.props.id),i>-1)||(C(e,!1),k(n.value))}function O(e){let i=!1;i=!u.value.find(P=>P.props.id===e),i?(n.value="",j(u)):(n.value=e,k(n.value))}function E(e,i){e.classList.contains(i)||e.classList.add(i)}function S(e,i){e.classList.remove(i)}function D(e){const{parentElement:i}=e;i&&(e.scrollWidth>i.offsetWidth?E(e,"farris-title-text-custom"):S(e,"farris-title-text-custom"))}a.watch(()=>s.activeId,(e,i)=>{e!==i&&O(e)});function N(e){var y;if(s.autoTitleWidth)return;const i=(y=e.value)==null?void 0:y.querySelectorAll(".st-tab-text");i&&i.forEach(P=>D(P))}const A=e=>{e.preventDefault(),e.stopPropagation()};function U(e){u.value=u.value.filter(i=>i.props.id!==e),n.value===e&&(n.value="",C(u))}function V(e,i,y=!1){const P=u.value.findIndex(Y=>Y.props.id===i);U(i),A(e),a.nextTick(()=>{d.value++,N(c),y&&(r.value=!0),t.emit("tabRemove",{removeIndex:P,removeId:i,activeId:n.value})})}function h(e,i=!0){n.value===e&&(n.value="",C(u)),a.nextTick(()=>{d.value++,i&&(r.value=!0)})}function x(e){k(e)}function q(e){u.value.findIndex(y=>y.props.id===e.props.id)===-1&&u.value.push(e),d.value++}function B(e){u.value.findIndex(y=>y.props.id===e.props.id)!==-1&&(u.value.forEach(y=>{y.props.id===e.props.id&&(y=e)}),e.props.id===n.value&&b.value,a.nextTick(()=>{d.value++,N(c)}))}function H(e){e&&(e.stopPropagation(),e.preventDefault())}function _(e){var P;const i=f.designerItemElementRef.value.querySelector(".farris-tabs-content"),y=i==null?void 0:i.querySelector(`#${e}-design-item`);(P=y==null?void 0:y.componentInstance)!=null&&P.value.onRemoveComponent&&y.componentInstance.value.onRemoveComponent(l)}function me(e){var z,ue;const i=l.formSchemaUtils.getExpressions();if(!i||!i.length)return;const y=f.schema.contents,P=y==null?void 0:y.find(de=>de.id===e);if(!P||!((ue=(z=P.toolbar)==null?void 0:z.buttons)!=null&&ue.length))return;const Y=de=>{de.forEach(Z=>{const xe=i.findIndex(we=>we.target===Z.id);xe>-1&&i.splice(xe,1),Z.children&&Z.children.length&&Y(Z.children)})};Y(P.toolbar.buttons)}function ye(e,i){var Y;H(e),me(i),_(i);const y=f.schema.contents,P=y==null?void 0:y.findIndex(z=>z.id===i);P===-1||P===void 0||(y==null||y.splice(P,1),U(i),L(),(Y=f==null?void 0:f.setupContext)==null||Y.emit("selectionChange"),ne.canvasChanged.value++)}function ie(){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(i=>i.classList.remove("dgComponentFocused"));const e=document.getElementsByClassName("dgComponentSelected");Array.from(e).forEach(i=>i.classList.remove("dgComponentSelected"))}function ee(e){e.currentTarget.classList.add("dgComponentFocused","dgComponentSelected")}function W(e,i){var z;const{contents:y=[]}=f.schema,P=y==null?void 0:y.findIndex(ue=>ue.id===e),Y=y[P];(z=f==null?void 0:f.setupContext)==null||z.emit("selectionChange",Y.type,Y,s.componentId,i)}function be(e,i){const y=i.getBoundingClientRect(),P=e.getBoundingClientRect(),Y=P.left+P.width<=y.left+y.width,z=P.left+P.width>=y.left;return Y&&z}function Q(e,i){if(e||(e=g.value.querySelector(".farris-tabs-header").querySelector(".dgComponentSelected")),i||(i=g.value.querySelector(".farris-nav-tabs")),e&&i){const y=e.querySelector(".component-btn-group");be(e,i)?ne.setPositionForSelectedElement(e):y&&(y.style.display="none")}}function le(){c&&c.value&&c.value.addEventListener("scroll",e=>{const i=e.target.querySelector(".dgComponentSelected");Q(i,e.target)})}function R(e){if(e&&e.parentElement){let i=e.getBoundingClientRect(),y=e.parentElement.getBoundingClientRect();(i.left<y.left||i.right>y.right)&&(c.value.scrollLeft=0,i=e.getBoundingClientRect(),y=e.parentElement.getBoundingClientRect(),c.value.scrollLeft=i.left-y.left),ne.setPositionOfButtonGroup(e)}}function ae(e,i,y){var z,ue,de;ie(),H(e),ee(e),W(i,y);const P=e.currentTarget;R(P);const Y=(ue=(z=y.schema)==null?void 0:z.contents)==null?void 0:ue.find(Z=>Z.id===i);if(Y&&(!Y.toolbar||((de=Y.toolbar.buttons)==null?void 0:de.length)===0)){const Z=e.currentTarget;a.nextTick(()=>{ie(),Z==null||Z.classList.add("dgComponentFocused","dgComponentSelected"),R(Z)})}}function se(e,i){H(e);const y=f.schema.contents,P=y==null?void 0:y.find(z=>z.id===i);if(!P)return;(!P.toolbar||!P.toolbar.buttons)&&(P.toolbar={id:`${P.id}_toolbar`,buttons:[]}),P.toolbar.id||(P.toolbar.id=`${P.id}_toolbar`);const Y=re.getSchemaByType("tab-toolbar-item");Y.id=`tab_toolbar_item_${Math.random().toString().slice(2,6)}`,P.toolbar.buttons.push(Y),p.value=[...P.toolbar.buttons],m.value=P.toolbar,a.nextTick(()=>{if(c&&c.value){const z=c.value.querySelector(".f-state-active");z&&R(z)}})}function X(e){}return{activeId:n,addTab:q,changeTitleStyle:N,removeTab:V,selectTab:x,tabPages:u,updateTab:B,toolbarItems:p,removeDesignTab:ye,selectDesignTab:ae,toolbarSchema:m,changeToolbarItems:L,addTabPageToolbar:se,listenTabNavElementScroll:le,setHorizontalScrollbarPosition:R,needUpdateNavigationLayout:d,checkActiveIdAndSelect:O,toggleShowTab:h,hasInHeadClass:b,emitSelectionChange:W,resetPositionForSelectedElement:Q,setTabsRef:w,setScrollToSelectedTabFunction:X}}function gt(s,t,c,f,v){var b;const{toolbarItems:l,toolbarSchema:u,changeToolbarItems:n,hasInHeadClass:r}=s,m=`${((b=f==null?void 0:f.schema)==null?void 0:b.id)||""}-toolbar`;function p(g,w,C,L){var k;(k=f.setupContext)==null||k.emit("selectionChange",g,w,C,L)}function d(){n()}return a.createVNode("div",{class:"farris-tabs-toolbar",style:"overflow:unset;"},[a.createVNode("div",{class:"farris-tabs-inline-flex w-100",style:"flex:1"},[a.createVNode(ne.FDesignerInnerItem,{modelValue:u.value,"onUpdate:modelValue":g=>u.value=g,class:"w-100 position-relative",canAdd:!1,childType:"tab-toolbar-item",childLabel:"按钮",contentKey:"buttons",id:m,onSelectionChange:p,componentId:v,onAddComponent:d},{default:()=>[a.createVNode(Oe,{alignment:r.value?"right":"left",items:l.value,componentId:v},null)]})])])}var pe=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function bt(s){return s&&s.__esModule&&Object.prototype.hasOwnProperty.call(s,"default")?s.default:s}function Se(s){throw new Error('Could not dynamically require "'+s+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var qe={exports:{}};(function(s,t){(function(c){s.exports=c()})(function(){return function(){function c(f,v,l){function u(m,p){if(!v[m]){if(!f[m]){var d=typeof Se=="function"&&Se;if(!p&&d)return d(m,!0);if(n)return n(m,!0);var b=new Error("Cannot find module '"+m+"'");throw b.code="MODULE_NOT_FOUND",b}var g=v[m]={exports:{}};f[m][0].call(g.exports,function(w){var C=f[m][1][w];return u(C||w)},g,g.exports,c,f,v,l)}return v[m].exports}for(var n=typeof Se=="function"&&Se,r=0;r<l.length;r++)u(l[r]);return u}return c}()({1:[function(c,f,v){var l={},u="(?:^|\\s)",n="(?:\\s|$)";function r(d){var b=l[d];return b?b.lastIndex=0:l[d]=b=new RegExp(u+d+n,"g"),b}function m(d,b){var g=d.className;g.length?r(b).test(g)||(d.className+=" "+b):d.className=b}function p(d,b){d.className=d.className.replace(r(b)," ").trim()}f.exports={add:m,rm:p}},{}],2:[function(c,f,v){(function(l){var u=c("contra/emitter"),n=c("crossvent"),r=c("./classes"),m=document,p=m.documentElement;function d(h,x){var q=arguments.length;q===1&&Array.isArray(h)===!1&&(x=h,h=[]);var B,H,_,me,ye,ie,ee,W,be,Q=null,le,R,ae=!1,se=0,X,e=x||{};e.moves===void 0&&(e.moves=j),e.accepts===void 0&&(e.accepts=j),e.invalid===void 0&&(e.invalid=At),e.containers===void 0&&(e.containers=h||[]),e.isContainer===void 0&&(e.isContainer=k),e.copy===void 0&&(e.copy=!1),e.copySortSource===void 0&&(e.copySortSource=!1),e.revertOnSpill===void 0&&(e.revertOnSpill=!1),e.removeOnSpill===void 0&&(e.removeOnSpill=!1),e.direction===void 0&&(e.direction="vertical"),e.ignoreInputTextSelection===void 0&&(e.ignoreInputTextSelection=!0),e.mirrorContainer===void 0&&(e.mirrorContainer=m.body);var i=u({containers:e.containers,start:Dt,end:Fe,cancel:Ye,remove:Xe,destroy:ue,canMove:Bt,dragging:!1});return e.removeOnSpill===!0&&i.on("over",Ot).on("out",Nt),P(),i;function y(o){return i.containers.indexOf(o)!==-1||e.isContainer(o)}function P(o){var T=o?"remove":"add";w(p,T,"mousedown",Z),w(p,T,"mouseup",Pe)}function Y(o){var T=o?"remove":"add";w(p,T,"mousemove",xe)}function z(o){var T=o?"remove":"add";n[T](p,"selectstart",de),n[T](p,"click",de)}function ue(){P(!0),Pe({})}function de(o){le&&o.preventDefault()}function Z(o){me=o.clientX,ye=o.clientY;var T=C(o)!==1||o.metaKey||o.ctrlKey;if(!T){var I=o.target,$=we(I);$&&(le=$,Y(),o.type==="mousedown"&&(D(I)?I.focus():o.preventDefault()))}}function xe(o){if(le){if(C(o)===0){Pe({});return}if(!(o.clientX!==void 0&&Math.abs(o.clientX-me)<=(e.slideFactorX||0)&&o.clientY!==void 0&&Math.abs(o.clientY-ye)<=(e.slideFactorY||0))){if(e.ignoreInputTextSelection){var T=V("clientX",o)||0,I=V("clientY",o)||0,$=m.elementFromPoint(T,I);if(D($))return}var M=le;Y(!0),z(),Fe(),_e(M),r.add(W||_,"gu-transit"),Lt(),kt(),se=0,je(o)}}}function we(o){if(!(i.dragging&&B)&&!y(o)){for(var T=o;S(o)&&y(S(o))===!1;)if(e.invalid(o,T)||(o=S(o),!o))return;var I=S(o);if(I&&!e.invalid(o,T)){var $=e.moves(o,I,T,A(o));if($)return{item:o,source:I}}}}function Bt(o){return!!we(o)}function Dt(o){var T=we(o);T&&_e(T)}function _e(o){Ut(o.item,o.source)&&(W=o.item.cloneNode(!0),i.emit("cloned",W,o.item,"copy")),H=o.source,_=o.item,ie=ee=A(o.item),i.dragging=!0,i.emit("drag",_,H)}function At(){return!1}function Fe(){if(i.dragging){var o=W||_;Ue(o,S(o))}}function We(){le=!1,Y(!0),z(!0)}function Pe(o){if(We(),!!i.dragging){var T=W||_,I=V("clientX",o)||0,$=V("clientY",o)||0,M=L(B,I,$),F=ze(M,I,$);F&&(W&&e.copySortSource||!W||F!==H)?Ue(T,F):e.removeOnSpill?Xe():Ye()}}function Ue(o,T){var I=S(o);W&&e.copySortSource&&T===H&&I.removeChild(_),Ee(T)?i.emit("cancel",o,H):i.emit("drop",o,T,H,ee),$e()}function Xe(){if(i.dragging){var o=W||_,T=S(o);T&&T.removeChild(o),i.emit(W?"cancel":"remove",o,T,H),$e()}}function Ye(o){if(i.dragging){var T=arguments.length>0?o:e.revertOnSpill,I=W||_,$=S(I),M=Ee($);M===!1&&T&&(W?$&&$.removeChild(W):H.insertBefore(I,ie)),M||T?i.emit("cancel",I,H,H):i.emit("drop",I,$,H,ee),$e()}}function $e(){var o=W||_;We(),Vt(),qt(),o&&r.rm(o,"gu-transit"),be&&clearTimeout(be),i.dragging=!1,Q&&i.emit("out",o,Q,H),i.emit("dragend",o,se),H=_=W=ie=ee=be=Q=null}function Ee(o,T){var I;return T!==void 0?I=T:B?I=ee:I=A(W||_),o===H&&I===ie}function ze(o,T,I){for(var $=o;$&&!M();)$=S($);return $;function M(){var F=y($);if(F===!1)return!1;var fe=Ge($,o),te=Ke($,fe,T,I),ce=Ee($,te);return ce?!0:e.accepts(_,$,H,te)}}function je(o){if(!B)return;o.preventDefault();var T=V("clientX",o)||0,I=V("clientY",o)||0;B.style.left=T-2+"px",B.style.top=I-2+"px";var $=W||_,M=L(B,T,I),F=ze(M,T,I),fe=F!==null&&F!==Q;(fe||F===null)&&(oe(),Q=F,ge()),Wt(M,I);var te=S($);if(F===H&&W&&!e.copySortSource){te&&te.removeChild($);return}var ce,ve=Ge(F,M);if(ae=Ht(ve,F),ve!==null)ce=Ke(F,ve,T,I);else if(e.revertOnSpill===!0&&!W)ce=ie,F=H;else{W&&te&&te.removeChild($),W&&R&&(R.style.display="none");return}R.style.display="block",Rt(ce,$,fe),ce?_t(ve,ce):Ft(F);function K(J){i.emit(J,$,Q,H)}function ge(){fe&&K("over")}function oe(){Q&&K("out")}}function Rt(o,T,I){(o===T||o===A(T))&&(ee=A(T)),(o===null&&I||o!==T&&o!==A(T))&&(ee=o)}function Ot(o){r.rm(o,"gu-hide")}function Nt(o){i.dragging&&r.add(o,"gu-hide")}function kt(){B||(B=document.createElement("div"),B.style="background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;",B.innerHTML=e.getMirrorText&&e.getMirrorText(_)||"控件",r.add(B,"gu-mirror"),e.mirrorContainer.appendChild(B),w(p,"add","mousemove",je),r.add(e.mirrorContainer,"gu-unselectable"),i.emit("cloned",B,_,"mirror"))}function Lt(){if(R=document.createElement("div"),r.add(R,"gu-insertion"),_){var o=_.getBoundingClientRect();R.style.left=o.left+"px",R.style.top=o.top+"px"}ae=!1,e.mirrorContainer.appendChild(R)}function Vt(){B&&(r.rm(e.mirrorContainer,"gu-unselectable"),w(p,"remove","mousemove",je),S(B).removeChild(B),B=null)}function qt(){R&&(S(R).removeChild(R),R=null)}function Ge(o,T){for(var I=T;I!==o&&S(I)!==o;)I=S(I);return I===p?null:I}function Ht(o,T){if(!T)return ae;var I=o||T&&T.lastElementChild;if(!I)return!0;var $=getComputedStyle(o),M=/^inline/.test($.getPropertyValue("display"))||/^(left|right)$/.test($.getPropertyValue("float"));if(M)return!0;if(T){var F=getComputedStyle(T),fe=F.getPropertyValue("display");if(/flex$/.test(fe)){var te=F.getPropertyValue("flex-direction")||"row";if(te==="row"||te==="row-reverse")return!Mt(T)}return!1}return!0}function Mt(o){if(!o.children||!o.children.length)return!1;for(const T of Array.from(o.children)){const $=(T.className&&T.className.split(" ")||[]).filter(M=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(M));if(!$.length)return!1;for(const M of $){const F=M.slice(M.lastIndexOf("-")+1);if(parseInt(F,10)!==12)return!1}}return!0}function _t(o,T){const I=T.getBoundingClientRect();if(R.style.left=I.left+"px",R.style.top=I.top+"px",ae){if(R.style.height=I.height+"px",R.style.width="4px",o){const $=o.getBoundingClientRect();$.top!==I.top&&(R.style.left=$.right+"px",R.style.top=$.top+"px",R.style.height=$.height+"px")}}else if(R.style.height="4px",R.style.width=I.width+"px",X){const $=X.getBoundingClientRect();I.top<$.top&&(R.style.display="none")}T===_&&_&&(R.style.display="none")}function Ft(o){ee=null;var T=o.lastElementChild;if(T){var I=T.getBoundingClientRect();ae?(R.style.left=I.right+"px",R.style.top=I.top+"px",R.style.height=I.height+"px",R.style.width="4px"):(R.style.left=I.left+"px",R.style.top=I.bottom+"px",R.style.height="4px",R.style.width=I.width+"px"),T===_&&_&&(R.style.display="none")}else R.style.display="none"}function Wt(o,T){if(!e.mirrorContainer.contains(o)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(X=b(o),!X||!X.contains(o)))return;const I=document.querySelector(".dgComponentSelected"),$=X.getBoundingClientRect();if(T-30<$.top&&X.scrollTop>0){let M=X.scrollTop<10?X.scrollTop:10;X.scrollBy(0,-1*M),I&&X.contains(I)&&(se=se+-1*M)}if(T+30>$.bottom&&X.scrollTop<X.scrollHeight-X.clientHeight){const M=X.scrollHeight-X.clientHeight-X.scrollTop;let F=M<10?M:10;X.scrollBy(0,F),I&&X.contains(I)&&(se=se+F)}}function Ke(o,T,I,$){var M=e.direction==="horizontal",F=e.direction==="mixed",fe=T!==o?ce():te();return fe;function te(){var K=o.children.length,ge,oe,J;for(ge=0;ge<K;ge++)if(oe=o.children[ge],J=oe.getBoundingClientRect(),M&&J.left+J.width/2>I||!F&&!M&&J.top+J.height/2>$||F&&J.left+J.width>I&&J.top+J.height>$)return oe;return null}function ce(){var K=T.getBoundingClientRect();if(F){var ge=$-K.top,oe=I-K.left,J=K.bottom-$,Be=K.right-I,De=Math.min(oe,Be,ge,J),Ae;return ae?Ae=Be<oe:Ae=J===De||Be===De||oe===De,ve(Ae)}return ve(M?I>K.left+O(K)/2:$>K.top+E(K)/2)}function ve(K){return K?A(T):T}}function Ut(o,T){return typeof e.copy=="boolean"?e.copy:e.copy(o,T)}}function b(h){const x=Array.from(window.scrollContainerList);if(x.length===1){const B=Array.from(window.scrollContainerList)[0];return document.getElementById(B)}const q=g(x);for(const B of q)if(B.contains(h))return B;return null}function g(h){const x=[];return h.forEach(q=>{const B=document.getElementById(q);B&&x.push(B)}),x.sort((q,B)=>q.contains(B)?1:B.contains(q)?-1:0),x}function w(h,x,q,B){var H={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},_={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},me={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};l.navigator.pointerEnabled?n[x](h,_[q],B):l.navigator.msPointerEnabled?n[x](h,me[q],B):(n[x](h,H[q],B),n[x](h,q,B))}function C(h){if(h.touches!==void 0)return h.touches.length;if(h.which!==void 0&&h.which!==0)return h.which;if(h.buttons!==void 0)return h.buttons;var x=h.button;if(x!==void 0)return x&1?1:x&2?3:x&4?2:0}function L(h,x,q){h=h||{};var B=h.className||"",H;return h.className+=" gu-hide",H=m.elementFromPoint(x,q),h.className=B,H}function k(){return!1}function j(){return!0}function O(h){return h.width||h.right-h.left}function E(h){return h.height||h.bottom-h.top}function S(h){return h.parentNode===m?null:h.parentNode}function D(h){return h.tagName==="INPUT"||h.tagName==="TEXTAREA"||h.tagName==="SELECT"||N(h)}function N(h){return!h||h.contentEditable==="false"?!1:h.contentEditable==="true"?!0:N(S(h))}function A(h){return h.nextElementSibling||x();function x(){var q=h;do q=q.nextSibling;while(q&&q.nodeType!==1);return q}}function U(h){return h.targetTouches&&h.targetTouches.length?h.targetTouches[0]:h.changedTouches&&h.changedTouches.length?h.changedTouches[0]:h}function V(h,x){var q=U(x),B={pageX:"clientX",pageY:"clientY"};return h in B&&!(h in q)&&B[h]in q&&(h=B[h]),q[h]}f.exports=d}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(c,f,v){f.exports=function(u,n){return Array.prototype.slice.call(u,n)}},{}],4:[function(c,f,v){var l=c("ticky");f.exports=function(n,r,m){n&&l(function(){n.apply(m||null,r||[])})}},{ticky:10}],5:[function(c,f,v){var l=c("atoa"),u=c("./debounce");f.exports=function(r,m){var p=m||{},d={};return r===void 0&&(r={}),r.on=function(b,g){return d[b]?d[b].push(g):d[b]=[g],r},r.once=function(b,g){return g._once=!0,r.on(b,g),r},r.off=function(b,g){var w=arguments.length;if(w===1)delete d[b];else if(w===0)d={};else{var C=d[b];if(!C)return r;C.splice(C.indexOf(g),1)}return r},r.emit=function(){var b=l(arguments);return r.emitterSnapshot(b.shift()).apply(this,b)},r.emitterSnapshot=function(b){var g=(d[b]||[]).slice(0);return function(){var w=l(arguments),C=this||r;if(b==="error"&&p.throws!==!1&&!g.length)throw w.length===1?w[0]:w;return g.forEach(function(k){p.async?u(k,w,C):k.apply(C,w),k._once&&r.off(b,k)}),r}},r}},{"./debounce":4,atoa:3}],6:[function(c,f,v){(function(l){var u=c("custom-event"),n=c("./eventmap"),r=l.document,m=b,p=w,d=[];l.addEventListener||(m=g,p=C),f.exports={add:m,remove:p,fabricate:L};function b(S,D,N,A){return S.addEventListener(D,N,A)}function g(S,D,N){return S.attachEvent("on"+D,j(S,D,N))}function w(S,D,N,A){return S.removeEventListener(D,N,A)}function C(S,D,N){var A=O(S,D,N);if(A)return S.detachEvent("on"+D,A)}function L(S,D,N){var A=n.indexOf(D)===-1?V():U();S.dispatchEvent?S.dispatchEvent(A):S.fireEvent("on"+D,A);function U(){var h;return r.createEvent?(h=r.createEvent("Event"),h.initEvent(D,!0,!0)):r.createEventObject&&(h=r.createEventObject()),h}function V(){return new u(D,{detail:N})}}function k(S,D,N){return function(U){var V=U||l.event;V.target=V.target||V.srcElement,V.preventDefault=V.preventDefault||function(){V.returnValue=!1},V.stopPropagation=V.stopPropagation||function(){V.cancelBubble=!0},V.which=V.which||V.keyCode,N.call(S,V)}}function j(S,D,N){var A=O(S,D,N)||k(S,D,N);return d.push({wrapper:A,element:S,type:D,fn:N}),A}function O(S,D,N){var A=E(S,D,N);if(A){var U=d[A].wrapper;return d.splice(A,1),U}}function E(S,D,N){var A,U;for(A=0;A<d.length;A++)if(U=d[A],U.element===S&&U.type===D&&U.fn===N)return A}}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(c,f,v){(function(l){var u=[],n="",r=/^on/;for(n in l)r.test(n)&&u.push(n.slice(2));f.exports=u}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(c,f,v){(function(l){var u=l.CustomEvent;function n(){try{var r=new u("cat",{detail:{foo:"bar"}});return r.type==="cat"&&r.detail.foo==="bar"}catch{}return!1}f.exports=n()?u:typeof document<"u"&&typeof document.createEvent=="function"?function(m,p){var d=document.createEvent("CustomEvent");return p?d.initCustomEvent(m,p.bubbles,p.cancelable,p.detail):d.initCustomEvent(m,!1,!1,void 0),d}:function(m,p){var d=document.createEventObject();return d.type=m,p?(d.bubbles=!!p.bubbles,d.cancelable=!!p.cancelable,d.detail=p.detail):(d.bubbles=!1,d.cancelable=!1,d.detail=void 0),d}}).call(this,typeof pe<"u"?pe:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(c,f,v){var l=f.exports={},u,n;function r(){throw new Error("setTimeout has not been defined")}function m(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?u=setTimeout:u=r}catch{u=r}try{typeof clearTimeout=="function"?n=clearTimeout:n=m}catch{n=m}})();function p(E){if(u===setTimeout)return setTimeout(E,0);if((u===r||!u)&&setTimeout)return u=setTimeout,setTimeout(E,0);try{return u(E,0)}catch{try{return u.call(null,E,0)}catch{return u.call(this,E,0)}}}function d(E){if(n===clearTimeout)return clearTimeout(E);if((n===m||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(E);try{return n(E)}catch{try{return n.call(null,E)}catch{return n.call(this,E)}}}var b=[],g=!1,w,C=-1;function L(){!g||!w||(g=!1,w.length?b=w.concat(b):C=-1,b.length&&k())}function k(){if(!g){var E=p(L);g=!0;for(var S=b.length;S;){for(w=b,b=[];++C<S;)w&&w[C].run();C=-1,S=b.length}w=null,g=!1,d(E)}}l.nextTick=function(E){var S=new Array(arguments.length-1);if(arguments.length>1)for(var D=1;D<arguments.length;D++)S[D-1]=arguments[D];b.push(new j(E,S)),b.length===1&&!g&&p(k)};function j(E,S){this.fun=E,this.array=S}j.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={};function O(){}l.on=O,l.addListener=O,l.once=O,l.off=O,l.removeListener=O,l.removeAllListeners=O,l.emit=O,l.prependListener=O,l.prependOnceListener=O,l.listeners=function(E){return[]},l.binding=function(E){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(E){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},{}],10:[function(c,f,v){(function(l){var u=typeof l=="function",n;u?n=function(r){l(r)}:n=function(r){setTimeout(r,0)},f.exports=n}).call(this,c("timers").setImmediate)},{timers:11}],11:[function(c,f,v){(function(l,u){var n=c("process/browser.js").nextTick,r=Function.prototype.apply,m=Array.prototype.slice,p={},d=0;v.setTimeout=function(){return new b(r.call(setTimeout,window,arguments),clearTimeout)},v.setInterval=function(){return new b(r.call(setInterval,window,arguments),clearInterval)},v.clearTimeout=v.clearInterval=function(g){g.close()};function b(g,w){this._id=g,this._clearFn=w}b.prototype.unref=b.prototype.ref=function(){},b.prototype.close=function(){this._clearFn.call(window,this._id)},v.enroll=function(g,w){clearTimeout(g._idleTimeoutId),g._idleTimeout=w},v.unenroll=function(g){clearTimeout(g._idleTimeoutId),g._idleTimeout=-1},v._unrefActive=v.active=function(g){clearTimeout(g._idleTimeoutId);var w=g._idleTimeout;w>=0&&(g._idleTimeoutId=setTimeout(function(){g._onTimeout&&g._onTimeout()},w))},v.setImmediate=typeof l=="function"?l:function(g){var w=d++,C=arguments.length<2?!1:m.call(arguments,1);return p[w]=!0,n(function(){p[w]&&(C?g.apply(null,C):g.call(null),v.clearImmediate(w))}),w},v.clearImmediate=typeof u=="function"?u:function(g){delete p[g]}}).call(this,c("timers").setImmediate,c("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(qe);var ht=qe.exports;const He=bt(ht);function yt(s,t){let c;function f(n){var p;const m=Array.from(n.children).find(d=>d.className.includes("add-nav-item"));m&&!((p=m.className)!=null&&p.includes("d-none"))&&(m.className+=" d-none")}function v(n){var p;const m=Array.from(n.children).find(d=>d.className.includes("add-nav-item"));m&&((p=m.className)!=null&&p.includes(" d-none"))&&(m.className=m.className.replace(" d-none",""))}function l(n,r,m){v(r);const p=s.schema;if(!(p!=null&&p.contents))return;let d;if(m){const C=m.getAttribute("pageId");d=Array.from(r.children).findIndex(L=>L.getAttribute("pageId")===C)}else d=Array.from(r.children).length;const b=n.getAttribute("pageId"),g=Array.from(r.children).findIndex(C=>C.getAttribute("pageId")===b),w=p.contents[g];if(g!==d&&g>-1&&d>-1){if(g<d&&(d=d-1),p.contents.splice(g,1),p.contents.splice(d,0,w),t.value){const C=t.value[g];t.value.splice(g,1),t.value.splice(d,0,C)}a.nextTick(()=>{n.className.includes("dgComponentSelected")&&(n.classList.remove("dgComponentSelected"),n.classList.remove("dgComponentFocused"),n.click()),ne.canvasChanged.value++})}}function u(n,r){c&&c.destroy(),!(!He||!n||!r)&&(c=He([n],{mirrorContainer:r,direction:"horizontal",moves(m){return!m.classList.contains("no-drag")},getMirrorText(m){return m.innerText},accepts(m,p,d,b){return f(p),b&&b.className.includes("nav-item")}}).on("drop",(m,p,d,b)=>l(m,p,b)))}return{dragulaInstance:c,initHeaderDragula:u}}const Ce=a.defineComponent({name:"FTabsDesign",props:Ve,emits:["tabChange","tabRemove"],setup(s,t){const c=a.ref(),f=a.inject("designer-host-service"),v=a.inject("design-item-context"),l=mt(v,f),u=ne.useDesignerComponent(c,v,l),n=a.ref(s.tabType),r=a.shallowRef(),m=a.shallowRef(),p={updateToolbarItems:function(){},changeSelectedId:e=>{}},d=vt(s,t,r,v,p,f),{activeId:b,changeTitleStyle:g,tabPages:w,addTab:C,updateTab:L,toolbarItems:k,setTabsRef:j,checkActiveIdAndSelect:O,listenTabNavElementScroll:E,toolbarSchema:S,toggleShowTab:D,hasInHeadClass:N}=d;j(c);const A=dt(s,m,d),U=lt(s,r,A,d),{updateNavigationLayout:V}=U,h=ut(s,d),{hideDropDown:x}=h,q=st(s,r,U,A,d,u),B=q,H=ct(s,r,U,A,d),_=new Map([["default",q],["one-page",B],["pills",H]]);a.computed(()=>{const e=w.value.find(i=>i.props.id===b.value);return e==null?void 0:e.slots});function me(){const e=u.value.schema.contents||[];return e.length<1?null:e.find(y=>y.id===b.value)}p.updateToolbarItems=function(){var i,y;const e=me();(i=e==null?void 0:e.toolbar)!=null&&i.buttons?k.value=[...(y=e==null?void 0:e.toolbar)==null?void 0:y.buttons]:k.value=[],S.value=e==null?void 0:e.toolbar},a.provide("tabs",{activeId:b,addTab:C,updateTab:L,tabPages:w,tabType:n,toggleShowTab:D}),a.provide("toolbar-item-handler",p);const ye=a.computed(()=>s.fill),ie=a.computed(()=>({"farris-tabs-header":!0,"farris-tabs-inHead":N.value,"farris-tabs-inContent":!N.value,"farris-tabs-nav-fill":s.tabType==="fill","farris-tabs-nav-pills":s.tabType==="pills"})),ee=a.computed(()=>{const e={width:N.value&&s.titleWidth?`${s.titleWidth}%`:""};return e.width&&(e.flex="unset"),e}),W=a.computed(()=>({"farris-tabs":!0,"flex-column":s.position==="top","flex-column-reverse":s.position==="bottom","flex-row":s.position==="left","flex-row-reverse":s.position==="right","one-page":s.tabType==="one-page"})),{initHeaderDragula:be,dragulaInstance:Q}=yt(v,w);a.onMounted(()=>{w.value.length&&O(s.activeId||w.value[0].props.id),a.nextTick(()=>{V()}),g(r),window.addEventListener("click",e=>{var i;x.value||(i=c.value)!=null&&i.contains(e.target)||(x.value=!0)}),window.addEventListener("resize",()=>{V()}),E(),c.value.componentInstance=u,s.tabType==="default"&&be(r.value,r.value)}),a.onUnmounted(()=>{Q&&Q.destroy&&Q.destroy()});function le(){return!!k.value.length&&gt(d,u,l,v,s.componentId)}const R=_.get(s.tabType)||_.get("default");function ae(){var e,i,y,P;return a.createVNode("div",{class:ie.value},[a.createVNode("div",{class:"farris-tabs-header-pre"},[(i=(e=t.slots).headerPrefix)==null?void 0:i.call(e)]),a.createVNode("div",{class:"farris-tabs-title scroll-tabs",style:ee.value},[R&&R()]),le(),a.createVNode("div",{class:"farris-tabs-header-post"},[(P=(y=t.slots).headerSuffix)==null?void 0:P.call(y)])])}const se=a.computed(()=>({"farris-tabs-content":!0,"f-utils-fill-flex-column":ye.value}));function X(){var e,i,y,P;return a.createVNode("div",{class:se.value,ref:m},[(i=(e=v==null?void 0:v.schema)==null?void 0:e.contents)!=null&&i.length?(P=(y=t.slots).default)==null?void 0:P.call(y):""])}return t.expose(u.value),u.value.updateToolbarItems=p.updateToolbarItems,()=>a.createVNode("div",{class:W.value,ref:c},[ae(),X()])}});function Tt(s,t){const c=new ne.UseTemplateDragAndDropRules,{canAccept:f}=c.getTemplateRule(s,t);function v(n){if(!ne.useDragulaCommonRule().basalDragulaRuleForContainer(n,t))return!1;const{schema:m}=s;return m.contents&&m.contents.length>0?!1:f}function l(n){return null}function u(){const{schema:n,parent:r}=s;r!=null&&r.schema.activeId&&n.id===r.schema.activeId&&(r.schema.activeId="")}return{canAccepts:v,getDraggableDesignItemElement:l,onRemoveComponent:u}}function Ct(s){return typeof s=="function"||Object.prototype.toString.call(s)==="[object Object]"&&!a.isVNode(s)}const wt=a.defineComponent({name:"FTabPageDesign",props:he.tabPageProps,emits:[],setup(s,t){const c=a.ref(),f=a.inject("design-item-context"),v=a.inject("designer-host-service"),l=Tt(f,v),u=ne.useDesignerComponent(c,f,l);u.value.canNested=!1,u.value.canDelete=!1,u.value.canMove=!1,t.expose(u.value);const n=a.inject("tabs"),r=a.ref(!0),m={slots:t.slots,props:s},p=a.ref((n==null?void 0:n.tabType.value)||"default");a.onMounted(()=>{c.value.componentInstance=u;const j=n.tabPages.value.findIndex(O=>O.props.id===s.id);!j||j===-1?n==null||n.addTab(m):j>-1&&(r.value=!1,console.warn(`已经存在id为${s.id}的页签啦`))}),a.onUnmounted(()=>{});const d=a.computed(()=>(s==null?void 0:s.id)===(n==null?void 0:n.activeId.value)),b=a.computed(()=>({display:d.value?"":"none"}));a.watch(()=>s,j=>{n==null||n.updateTab({props:j,slots:t.slots})},{immediate:!0,deep:!0});function g(){var O,E;const j=(E=(O=t.slots).default)==null?void 0:E.call(O);return a.createVNode(Je,{"main-title":s.title,class:"farris-tab-page"},Ct(j)?j:{default:()=>[j]})}const w=a.computed(()=>({"farris-tab-page":!0,"drag-container":!0,"farris-tab-page-active":d.value}));function C(){var O,E;const j=(E=(O=t.slots).default)==null?void 0:E.call(O);return a.createVNode("div",{ref:c,class:w.value,"data-dragref":`${f.schema.id}-container`,style:b.value},[j])}const k=new Map([["default",C],["one-page",g]]).get(p.value)||C;return()=>r.value?k():null}});function It(s,t,c){return t&&t.contents&&t.contents.length&&(t.contents.forEach(f=>{f.title&&(f.text=f.title)}),t.buttons=t.contents,delete t.contents),{toolbar:t}}const St=new Map([["appearance",re.resolveAppearance],["toolbar",It]]),xt={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tab-page.schema.json",title:"tab-page",description:"A Farris Container Component",type:"object",properties:{id:{description:"The unique identifier for a tab-page Item",type:"string"},type:{description:"The type string of tab-page Item component",type:"string",default:"tab-page"},contents:{description:"",type:"array",default:[]},title:{description:"",type:"string",default:"标题"},disabled:{description:"",type:"boolean",default:!1},removeable:{description:"",type:"boolean",default:!1},show:{description:"",type:"boolean",default:!0},toolbar:{description:"",type:"object"},tabWidth:{description:"",type:"number"},toolbarPosition:{description:"",type:"string",default:"inHead"},customTitleClass:{description:"",type:"string",default:""},onTabChange:{description:"",type:"切换标签页事件",default:""},onTabRemove:{description:"",type:"string",default:"移除标签页事件"}},required:["id","type","contents"]},Me=re.createPropsResolver(he.tabPageProps,xt,St),Pt={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/tab-toolbar-item.schema.json",title:"tab-toolbar-item",description:"A Farris Toolbar Item Component",type:"object",properties:{id:{description:"The unique identifier for a Response Toolbar",type:"string"},type:{description:"The type string of Response Toolbar",type:"string",default:"tab-toolbar-item"},appearance:{description:"",type:"object",properties:{class:{type:"string"}},default:{}},text:{description:"按钮",type:"string",default:"按钮"},icon:{description:"图标",type:"string",default:""},disabled:{description:"禁用",type:"boolean",default:!1},visible:{description:"是否可见",type:"boolean",default:!0},onClick:{description:"点击事件",type:"string",default:""},tipsEnable:{description:"",type:"boolean",default:!1},tipsText:{description:"",type:"string",default:""},dropdownClass:{description:"处于下拉菜单时的样式",type:"string",default:""},split:{description:"",type:"boolean",default:!1}},required:["id","type","text"],events:{onClick:"点击事件"}},$t={id:{type:String,default:""},items:{type:Object,default:{}},class:{type:String,default:""},text:{type:String,default:""},disabled:{type:Boolean,default:!1},icon:{type:String,default:""},componentId:{type:String,default:""},expanded:{type:Boolean,default:!1},alignment:{Type:String,default:"right"},split:{type:Boolean,default:!1},isDP:{type:Boolean,default:!1},isDPItem:{type:Boolean,default:!1}},Et=re.createPropsResolver($t,Pt,Ie,et);Ce.register=(s,t,c,f)=>{s.tabs=he,s["tab-page"]=he.FTabPage,t.tabs=nt,t["tab-page"]=Me,f.tabs={eventHandlerResolver:rt}},Ce.registerDesigner=(s,t,c)=>{s.tabs=Ce,s["tab-page"]=wt,t.tabs=ot,t["tab-page"]=Me,t["tab-toolbar-item"]=Et,s["tab-toolbar"]=Re,t["tab-toolbar"]=it};const jt=Te.withInstall(Ce);G.FTabsDesign=Ce,G.default=jt,Object.defineProperties(G,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1,249 @@
1
+ import { withInstall as b } from "../../components/common/index.esm.js";
2
+ import x, { textAreaProps as c } from "../../components/textarea/index.esm.js";
3
+ import { defineComponent as h, ref as v, inject as d, computed as p, onMounted as C, createVNode as l } from "vue";
4
+ import { useDesignerComponent as w } from "../../components/designer-canvas/index.esm.js";
5
+ import { resolveAppearance as P, createPropsResolver as R } from "../../components/dynamic-resolver/index.esm.js";
6
+ import { InputBaseProperty as j } from "../../components/property-panel/index.esm.js";
7
+ const T = /* @__PURE__ */ new Map([
8
+ ["appearance", P]
9
+ ]), D = "https://json-schema.org/draft/2020-12/schema", I = "https://farris-design.gitee.io/switch.schema.json", M = "textarea", $ = "A Farris Component", F = "object", S = {
10
+ id: {
11
+ description: "The unique identifier for a textarea",
12
+ type: "string"
13
+ },
14
+ type: {
15
+ description: "The type string of textarea component",
16
+ type: "string",
17
+ default: "textarea"
18
+ },
19
+ appearance: {
20
+ description: "",
21
+ type: "object",
22
+ properties: {
23
+ class: {
24
+ type: "string"
25
+ },
26
+ style: {
27
+ type: "string"
28
+ }
29
+ },
30
+ default: {}
31
+ },
32
+ binding: {
33
+ description: "",
34
+ type: "object",
35
+ default: {}
36
+ },
37
+ disabled: {
38
+ type: "boolean",
39
+ default: !1
40
+ },
41
+ editable: {
42
+ description: "",
43
+ type: "boolean",
44
+ default: !0
45
+ },
46
+ placeholder: {
47
+ description: "",
48
+ type: "string",
49
+ default: ""
50
+ },
51
+ readonly: {
52
+ description: "",
53
+ type: "boolean",
54
+ default: !1
55
+ },
56
+ required: {
57
+ description: "",
58
+ type: "boolean",
59
+ default: !1
60
+ },
61
+ tabindex: {
62
+ description: "",
63
+ type: "number",
64
+ default: -1
65
+ },
66
+ visible: {
67
+ description: "",
68
+ type: "boolean",
69
+ default: !0
70
+ },
71
+ rows: {
72
+ description: "",
73
+ type: "number"
74
+ },
75
+ showCount: {
76
+ description: "",
77
+ type: "boolean",
78
+ default: !1
79
+ },
80
+ maxLength: {
81
+ description: "",
82
+ type: "number",
83
+ default: 0
84
+ },
85
+ updateOn: {
86
+ description: "",
87
+ type: "string",
88
+ default: "blur"
89
+ },
90
+ allowUnlimtedWhenEmpty: {
91
+ description: "",
92
+ type: "boolean",
93
+ default: !0
94
+ },
95
+ autoHeight: {
96
+ description: "",
97
+ type: "boolean",
98
+ default: !1
99
+ },
100
+ resizable: {
101
+ description: "",
102
+ type: "boolean",
103
+ default: !1
104
+ },
105
+ lineBreak: {
106
+ description: "",
107
+ type: "boolean",
108
+ default: "enter"
109
+ }
110
+ }, q = [
111
+ "type"
112
+ ], A = [
113
+ "id",
114
+ "appearance",
115
+ "binding",
116
+ "visible"
117
+ ], H = {
118
+ $schema: D,
119
+ $id: I,
120
+ title: M,
121
+ description: $,
122
+ type: F,
123
+ properties: S,
124
+ required: q,
125
+ ignore: A
126
+ };
127
+ function E(e, t, o) {
128
+ return t;
129
+ }
130
+ const G = Object.assign({}, c, {
131
+ readonly: {}
132
+ }), u = R(c, H, T, E);
133
+ class L extends j {
134
+ constructor(t, o) {
135
+ super(t, o);
136
+ }
137
+ /**
138
+ * 多行文本应用在卡片
139
+ * @param propertyData
140
+ * @returns
141
+ */
142
+ getEditorProperties(t) {
143
+ return this.getComponentConfig(t, { type: "textarea" }, {
144
+ // rows: {
145
+ // description: "指定的可见行数的最小值为2",
146
+ // title: "文本区域可见的行数",
147
+ // type: "number",
148
+ // editor: {
149
+ // min: 2,
150
+ // nullable:true
151
+ // }
152
+ // },
153
+ // maxLength: {
154
+ // description: "文本字数最大长度",
155
+ // title: "最大长度",
156
+ // type: "number",
157
+ // editor: {
158
+ // nullable: true,
159
+ // min: 0,
160
+ // useThousands: false
161
+ // }
162
+ // },
163
+ // showCount: {
164
+ // description: "",
165
+ // title: "展示输入文本数量",
166
+ // type: "boolean"
167
+ // },
168
+ resizable: {
169
+ description: "",
170
+ title: "拖拽调整大小",
171
+ type: "boolean"
172
+ },
173
+ autoHeight: {
174
+ description: "",
175
+ title: "自动高度",
176
+ visible: !1,
177
+ type: "boolean"
178
+ }
179
+ });
180
+ }
181
+ /**
182
+ * 多行文本应用在表格
183
+ * @param propertyData
184
+ * @returns
185
+ */
186
+ getGridFieldEdtiorProperties(t) {
187
+ return this.getComponentConfig(t, { type: "textarea" }, {
188
+ autoHeight: {
189
+ description: "",
190
+ title: "自动高度",
191
+ visible: !1,
192
+ type: "boolean"
193
+ }
194
+ });
195
+ }
196
+ }
197
+ function V(e, t) {
198
+ const o = e.schema;
199
+ function n(r, s) {
200
+ return new L(r, t).getPropertyConfig(o, s);
201
+ }
202
+ return { getPropsConfig: n };
203
+ }
204
+ const i = /* @__PURE__ */ h({
205
+ name: "FTextareaDesign",
206
+ props: G,
207
+ emits: [""],
208
+ setup(e, t) {
209
+ const o = v(), n = d("designer-host-service"), r = d("design-item-context"), s = V(r, n), a = w(o, r, s), f = p(() => e.maxLength ? e.maxLength : e.modelValue.length), g = p(() => ({
210
+ position: "relative"
211
+ })), m = p(() => ({
212
+ "box-shadow": "0 0 0 1px #dcdfe6 inset",
213
+ border: "none",
214
+ padding: "5px 10px",
215
+ width: "100%"
216
+ })), y = {
217
+ position: "absolute",
218
+ bottom: "5px",
219
+ right: "10px"
220
+ };
221
+ return C(() => {
222
+ o.value.componentInstance = a;
223
+ }), t.expose(a.value), () => l("div", {
224
+ style: g.value,
225
+ ref: o
226
+ }, [l("textarea", {
227
+ id: e.id,
228
+ tabindex: e.tabIndex,
229
+ disabled: !1,
230
+ readonly: !0,
231
+ style: m.value,
232
+ placeholder: e.placeholder,
233
+ rows: e.rows
234
+ }, null), e.showCount && l("span", {
235
+ style: y
236
+ }, [`${e.modelValue.length}/${f.value}`])]);
237
+ }
238
+ });
239
+ i.register = (e, t, o, n) => {
240
+ e.textarea = x, t.textarea = u;
241
+ };
242
+ i.registerDesigner = (e, t, o) => {
243
+ e.textarea = i, t.textarea = u;
244
+ };
245
+ const W = b(i);
246
+ export {
247
+ i as FTextareaDesign,
248
+ W as default
249
+ };
@@ -0,0 +1 @@
1
+ (function(n,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("../../components/common/index.umd.js"),require("../../components/textarea/index.umd.js"),require("vue"),require("../../components/designer-canvas/index.umd.js"),require("../../components/dynamic-resolver/index.umd.js"),require("../../components/property-panel/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","../../components/common/index.umd.js","../../components/textarea/index.umd.js","vue","../../components/designer-canvas/index.umd.js","../../components/dynamic-resolver/index.umd.js","../../components/property-panel/index.umd.js"],i):(n=typeof globalThis<"u"?globalThis:n||self,i(n.textarea={},n.common,n.FTextarea,n.Vue,n.designerCanvas,n.dynamicResolver,n.propertyPanel))})(this,function(n,i,p,o,f,u,y){"use strict";const g=new Map([["appearance",u.resolveAppearance]]),x={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/switch.schema.json",title:"textarea",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a textarea",type:"string"},type:{description:"The type string of textarea component",type:"string",default:"textarea"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disabled:{type:"boolean",default:!1},editable:{description:"",type:"boolean",default:!0},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0},rows:{description:"",type:"number"},showCount:{description:"",type:"boolean",default:!1},maxLength:{description:"",type:"number",default:0},updateOn:{description:"",type:"string",default:"blur"},allowUnlimtedWhenEmpty:{description:"",type:"boolean",default:!0},autoHeight:{description:"",type:"boolean",default:!1},resizable:{description:"",type:"boolean",default:!1},lineBreak:{description:"",type:"boolean",default:"enter"}},required:["type"],ignore:["id","appearance","binding","visible"]};function h(e,t,r){return t}const b=Object.assign({},p.textAreaProps,{readonly:{}}),m=u.createPropsResolver(p.textAreaProps,x,g,h);class j extends y.InputBaseProperty{constructor(t,r){super(t,r)}getEditorProperties(t){return this.getComponentConfig(t,{type:"textarea"},{resizable:{description:"",title:"拖拽调整大小",type:"boolean"},autoHeight:{description:"",title:"自动高度",visible:!1,type:"boolean"}})}getGridFieldEdtiorProperties(t){return this.getComponentConfig(t,{type:"textarea"},{autoHeight:{description:"",title:"自动高度",visible:!1,type:"boolean"}})}}function v(e,t){const r=e.schema;function a(d,c){return new j(d,t).getPropertyConfig(r,c)}return{getPropsConfig:a}}const s=o.defineComponent({name:"FTextareaDesign",props:b,emits:[""],setup(e,t){const r=o.ref(),a=o.inject("designer-host-service"),d=o.inject("design-item-context"),c=v(d,a),l=f.useDesignerComponent(r,d,c),P=o.computed(()=>e.maxLength?e.maxLength:e.modelValue.length),w=o.computed(()=>({position:"relative"})),q=o.computed(()=>({"box-shadow":"0 0 0 1px #dcdfe6 inset",border:"none",padding:"5px 10px",width:"100%"})),T={position:"absolute",bottom:"5px",right:"10px"};return o.onMounted(()=>{r.value.componentInstance=l}),t.expose(l.value),()=>o.createVNode("div",{style:w.value,ref:r},[o.createVNode("textarea",{id:e.id,tabindex:e.tabIndex,disabled:!1,readonly:!0,style:q.value,placeholder:e.placeholder,rows:e.rows},null),e.showCount&&o.createVNode("span",{style:T},[`${e.modelValue.length}/${P.value}`])])}});s.register=(e,t,r,a)=>{e.textarea=p,t.textarea=m},s.registerDesigner=(e,t,r)=>{e.textarea=s,t.textarea=m};const C=i.withInstall(s);n.FTextareaDesign=s,n.default=C,Object.defineProperties(n,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -0,0 +1 @@
1
+ .fv-grid-disabled{color:#0000004d}.fv-grid-header-cell.fv-grid-header-cell-border:after{background-color:transparent}