@farris/ui-vue 1.0.1 → 1.0.2

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 (83) hide show
  1. package/accordion/package.json +1 -1
  2. package/avatar/package.json +1 -1
  3. package/button/package.json +1 -1
  4. package/button-edit/package.json +1 -1
  5. package/calculator/package.json +1 -1
  6. package/calendar/package.json +1 -1
  7. package/capsule/package.json +1 -1
  8. package/checkbox/package.json +1 -1
  9. package/color-picker/package.json +1 -1
  10. package/combo-list/index.esm.js +808 -802
  11. package/combo-list/index.umd.js +1 -1
  12. package/combo-list/package.json +1 -1
  13. package/combo-list/style.css +1 -1
  14. package/component/package.json +1 -1
  15. package/condition/index.esm.js +2656 -2650
  16. package/condition/index.umd.js +1 -1
  17. package/condition/package.json +1 -1
  18. package/condition/style.css +1 -1
  19. package/content-container/package.json +1 -1
  20. package/data-grid/index.esm.js +2298 -2292
  21. package/data-grid/index.umd.js +1 -1
  22. package/data-grid/package.json +1 -1
  23. package/data-grid/style.css +1 -1
  24. package/date-picker/package.json +1 -1
  25. package/designer-canvas/index.esm.js +2632 -2626
  26. package/designer-canvas/index.umd.js +1 -1
  27. package/designer-canvas/package.json +1 -1
  28. package/designer-canvas/style.css +1 -1
  29. package/discussion-editor/package.json +1 -1
  30. package/discussion-list/package.json +1 -1
  31. package/dropdown/package.json +1 -1
  32. package/dynamic-form/index.esm.js +2656 -2650
  33. package/dynamic-form/index.umd.js +1 -1
  34. package/dynamic-form/package.json +1 -1
  35. package/dynamic-form/style.css +1 -1
  36. package/dynamic-resolver/package.json +1 -1
  37. package/dynamic-view/index.esm.js +1735 -1729
  38. package/dynamic-view/index.umd.js +1 -1
  39. package/dynamic-view/package.json +1 -1
  40. package/dynamic-view/style.css +1 -1
  41. package/farris.all.esm.js +3064 -3058
  42. package/farris.all.umd.js +5 -5
  43. package/filter-bar/package.json +1 -1
  44. package/image-cropper/package.json +1 -1
  45. package/input-group/package.json +1 -1
  46. package/list-nav/package.json +1 -1
  47. package/list-view/package.json +1 -1
  48. package/loading/package.json +1 -1
  49. package/locale/package.json +1 -1
  50. package/message-box/package.json +1 -1
  51. package/modal/package.json +1 -1
  52. package/nav/package.json +1 -1
  53. package/notify/package.json +1 -1
  54. package/order/index.esm.js +759 -753
  55. package/order/index.umd.js +1 -1
  56. package/order/package.json +1 -1
  57. package/order/style.css +1 -1
  58. package/package.json +1 -1
  59. package/page-footer/package.json +1 -1
  60. package/page-header/package.json +1 -1
  61. package/pagination/package.json +1 -1
  62. package/popover/package.json +1 -1
  63. package/propress/package.json +1 -1
  64. package/radio-group/package.json +1 -1
  65. package/rate/package.json +1 -1
  66. package/response-toolbar/package.json +1 -1
  67. package/search-box/package.json +1 -1
  68. package/section/package.json +1 -1
  69. package/splitter/package.json +1 -1
  70. package/step/package.json +1 -1
  71. package/style.css +1 -1
  72. package/switch/package.json +1 -1
  73. package/tabs/package.json +1 -1
  74. package/tags/package.json +1 -1
  75. package/text/package.json +1 -1
  76. package/time-picker/package.json +1 -1
  77. package/tooltip/package.json +1 -1
  78. package/transfer/package.json +1 -1
  79. package/tree-view/package.json +1 -1
  80. package/types/combo-list/src/components/list-container.props.d.ts +3 -1
  81. package/types/combo-list/src/composition/types.d.ts +1 -0
  82. package/uploader/package.json +1 -1
  83. package/verify-detail/package.json +1 -1
@@ -1 +1 @@
1
- (function(A,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(A=typeof globalThis<"u"?globalThis:A||self,t(A["combo-list"]={},A.Vue))})(this,function(A,t){"use strict";const te={};function K(e){const{properties:n}=e;return Object.keys(n).reduce((l,o)=>(l[o]=n[o].type==="object"&&n[o].properties?K(n[o]):n[o].default,l),{})}function de(e){const n=te[e];return n?K(n):null}function fe(e,n){const a=K(n);return Object.keys(e).reduce((l,o)=>(l[o]=e[o],l),a),a}function pe(e,n){return Object.keys(e).filter(l=>e[l]!=null).reduce((l,o)=>{if(n.has(o)){const c=n.get(o);if(typeof c=="string")l[c]=e[o];else{const i=c(o,e[o]);Object.assign(l,i)}}else l[o]=e[o];return l},{})}function me(e,n,a=new Map){const l=fe(e,n);return pe(l,a)}function ne(e,n,a=new Map){return te[n.title]=n,l=>{const o=me(l,n,a),c=Object.keys(e).reduce((i,s)=>(i[s]=e[s].default,i),{});return Object.assign(c,o)}}function oe(e,n){return{customClass:n.class}}const ge=new Map([["appearance",oe]]),he={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/combo-list.schema.json",title:"combo-list",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a combo list",type:"string"},type:{description:"The type string of number combo list component",type:"string",default:"combo-list"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""}},required:["id","type"]};var ae=(e=>(e.Text="text",e.Tag="tag",e))(ae||{}),le=(e=>(e.top="top",e.bottom="bottom",e.auto="auto",e))(le||{});const X={id:{type:String},data:{type:Array,default:[]},displayText:{type:String,default:""},disabled:{default:!1,type:Boolean},dropDownIcon:{type:String,default:'<span class="f-icon f-icon-arrow-60-down"></span>'},editable:{default:!1,type:Boolean},enableClear:{default:!0,type:Boolean},enableSearch:{type:Boolean,default:!1},enableTitle:{default:!0,type:Boolean},forcePlaceholder:{default:!1,type:Boolean},hidePanelOnClear:{default:!0,type:Boolean},idField:{default:"id",type:String},mapFields:{type:Object},maxHeight:{default:350,type:Number},maxLength:{type:Number},multiSelect:{default:!1,type:Boolean},modelValue:{type:String,default:""},placeholder:{type:String},placement:{type:String,default:"auto"},readonly:{default:!1,type:Boolean},remote:{default:null,type:Object},remoteSearch:{default:!1,type:Boolean},separator:{default:",",type:String},tabIndex:{type:Number,default:-1},textField:{default:"name",type:String},valueField:{default:"id",type:String},viewType:{default:"text",type:String}},J=ne(X,he,ge),ye={dataSource:{type:Array,default:[]},enableSearch:{type:Boolean,default:!1},idField:{type:String,default:"id"},multiSelect:{default:!1,type:Boolean},selectedValues:{type:String,default:""},separator:{type:String,default:","},textField:{type:String,default:"name"},width:{type:Number,default:300},valueField:{type:String,default:"id"}},ve={data:{type:Array,default:[]},draggable:{type:Boolean,default:!1},multiSelect:{Type:Boolean,default:!1},multiSelectMode:{Type:String,default:"OnCheck"},idField:{Type:String,default:"id"},valueField:{Type:String,default:"id"},textField:{Type:String,default:"name"},view:{Type:String,default:"ContentView"},size:{Type:String,default:"default"},placeholder:{type:String,default:""},header:{Type:String,default:"ContentHeader"},headerClass:{Type:String,default:""},itemClass:{Type:String,default:""},selectionValues:{type:Array,default:[]},keepOrder:{type:Boolean,default:!1},disableField:{type:String,default:"disabled"}};function be(e,n,a,l,o){const c=t.ref(e.idField),i=t.ref(e.disableField),s=t.ref(e.draggable),h=t.ref(e.itemClass),r=t.ref(e.multiSelect),u=t.ref(e.multiSelectMode);t.ref(!0);const{isDragging:d}=a,{activeIndex:f,focusedItemId:b,hoverIndex:g}=l,{clearSelection:y,selectedItems:N,toggleSelectItem:k}=o;function I(C,O){const P={"f-list-view-group-item":!0,"f-list-view-draggable-item":s.value,"f-un-click":!!C.unClick,"f-un-select":!!C[i.value],"f-listview-active":C.__fv_index__===f.value,"f-listview-hover":!d.value&&O===g.value,moving:!!C.moving};return h.value.split(" ").reduce((W,F)=>(W[F]=!0,W),P),P}function p(C,O){return C[c.value]||""}const v=t.computed(()=>!r.value);function S(C,O){C.unClick||C[i.value]||(v.value&&(b.value=C[c.value]),k(C,O))}const B=t.computed(()=>r.value&&u.value==="OnCheckClearByClick"),j=t.computed(()=>!r.value||r.value&&(u.value==="OnCheckAndClick"||u.value==="OnClick"));function M(C,O,P){if(O.unClick||O[i.value]){C.preventDefault(),C.stopPropagation();return}b.value=O[c.value],f.value=P,B.value&&y(),j.value&&k(O,P),n.emit("clickItem",{data:N.value,index:P})}return{getKey:p,listViewItemClass:I,onCheckItem:S,onClickItem:M}}function Ce(e,n,a){const l=t.ref(e.idField),o=t.ref(e.multiSelect);t.ref(e.multiSelectMode);const{getSelectionItems:c}=a,i=t.ref(c(e.selectionValues));t.watch(()=>e.selectionValues,f=>{i.value=t.ref(c(f)).value});const s=t.computed(()=>!o.value);function h(f){return f[l.value]||""}function r(f){return i.value.findIndex(g=>h(g)===h(f))}function u(){i.value.forEach(f=>{f.checked=!1}),i.value=[]}function d(f,b){s.value&&u();const g=r(f);g>-1?(i.value.splice(g,1),f.checked=!1):(i.value.push(f),f.checked=!0),n.emit("selectionChange",i.value)}return{clearSelection:u,findIndexInSelectedItems:r,selectedItems:i,toggleSelectItem:d}}function we(e,n){function a(c){const i=[];let s=c.nextNode();for(;s;)i.push(s),s=c.nextNode();return i}function l(c,i){const s=document.createTreeWalker(c,NodeFilter.SHOW_TEXT);return a(s).map(d=>({textNode:d,text:(d.textContent||"").toLocaleLowerCase()})).map(({textNode:d,text:f})=>{const b=[];let g=0;for(;g<f.length;){const y=f.indexOf(i,g);if(y===-1)break;b.push(y),g=y+i.length}return b.map(y=>{const N=new Range;return N.setStart(d,y),N.setEnd(d,y+i.length),N})}).flat()}function o(c){if(!CSS.highlights||(CSS.highlights.clear(),!c||!n))return;const i=l(n.value,c.toLocaleLowerCase()),s=new Highlight(...i);CSS.highlights.set("search-result",s)}return{search:o}}const Te={checked:{Type:Boolean,default:!1},id:{Type:String,default:""},disabled:{Type:Boolean,default:!1},modelValue:{Type:Boolean,default:!1}},Q=t.defineComponent({name:"FListViewCheckBox",props:Te,emits:["change","update:modelValue"],setup(e,n){const a=t.ref(e.checked),l=t.ref(e.disabled),o=t.ref(e.id);function c(i){i.stopPropagation(),i.preventDefault(),l.value||(a.value=!a.value,n.emit("change",{originalEvent:i,checked:a.value}))}return t.watch(()=>e.checked,i=>{a.value=i}),()=>t.createVNode("div",{class:"custom-control custom-checkbox custom-control-inline listview-checkbox"},[t.withDirectives(t.createVNode("input",{id:o.value,title:o.value,type:"checkbox",class:"custom-control-input","onUpdate:modelValue":i=>a.value=i,onChange:i=>console.log(i)},null),[[t.vModelCheckbox,a.value]]),t.createVNode("label",{for:o.value,class:"custom-control-label",onClick:i=>c(i)},null)])}});function ie(e,n,a,l,o,c,i,s){const h=t.ref(e.size),r=t.ref(e.textField),u=t.ref(e.multiSelect),d=t.ref(e.disableField),{onMouseenterItem:f,onMouseoverItem:b,onMouseoutItem:g}=o,{getKey:y,listViewItemClass:N,onCheckItem:k,onClickItem:I}=c,p=t.computed(()=>({margin:h.value==="small"?"0.25rem 0":"10px 0"}));function v(S,B,j){return S.checked=i.findIndexInSelectedItems(S)>-1,t.createVNode("li",{class:N(S,B),id:y(S,B),key:y(S,B),onClick:M=>I(M,S,B),onMouseenter:M=>f(M,S,B),onMouseover:M=>b(M,S,B),onMouseout:M=>g(M,S,B)},[u.value&&t.createVNode("div",{class:"f-list-select",onClick:M=>M.stopPropagation()},[t.createVNode(Q,{id:"list-"+y(S,B),disabled:S[d.value]||S.unClick,checked:S.checked,onChange:M=>k(S,B)},null)]),t.createVNode("div",{class:"f-list-content"},[t.createVNode("div",{style:p.value},[S[r.value]])])])}return{renderItem:v}}function Se(e,n,a,l,o,c,i,s){const h=t.ref(e.multiSelect),r=t.ref(e.disableField),{onMouseenterItem:u,onMouseoverItem:d,onMouseoutItem:f}=o,{getKey:b,listViewItemClass:g,onCheckItem:y,onClickItem:N}=c;function k(p,v,S){return n.slots.content?t.createVNode(t.Fragment,null,[n.slots.content&&n.slots.content({item:p,index:v,selectedItem:S})]):t.createVNode("div",{style:"margin: 10px 0;"},[p.name])}function I(p,v,S){return t.createVNode("li",{class:g(p,v),id:b(p,v),key:b(p,v),onClick:B=>N(B,p,v),onMouseenter:B=>u(B,p,v),onMouseover:B=>d(B,p,v),onMouseout:B=>f(B,p,v)},[h.value&&t.createVNode("div",{class:"f-list-select",onClick:B=>B.stopPropagation()},[t.createVNode(Q,{id:"list-"+b(p,v),disabled:p[r.value]||p.unClick,checked:p.checked,onChange:B=>y(p,v)},null)]),t.createVNode("div",{class:"f-list-content"},[k(p,v,S)])])}return{renderItem:I}}function Be(e,n,a,l,o,c,i,s){const h=t.ref(e.multiSelect),r=t.ref(e.disableField),{onMouseenterItem:u,onMouseoverItem:d,onMouseoutItem:f}=o,{getKey:b,listViewItemClass:g,onCheckItem:y,onClickItem:N}=c,{dragstart:k,dragenter:I,dragover:p,dragend:v}=l,{removeItem:S}=s,B=t.computed(()=>({margin:h.value?"10px 0":"10px 0px 10px 14px"}));function j(P){return t.createVNode("div",{style:B.value},[P.name])}function M(){return n.slots.itemContent?n.slots.itemContent:j}const C=M();function O(P,L,W){return t.createVNode("li",{class:g(P,L),id:b(P,L),key:b(P,L),onClick:F=>N(F,P,L),onMouseenter:F=>u(F,P,L),onMouseover:F=>d(F,P,L),onMouseout:F=>f(F,P,L),draggable:"true",onDragstart:F=>k(F,P,L),onDragenter:F=>I(F,L),onDragend:F=>v(F,P),onDragover:F=>p(F,L)},[h.value&&t.createVNode("div",{class:"f-list-select",onClick:F=>F.stopPropagation()},[t.createVNode(Q,{id:"list-"+b(P,L),disabled:P[r.value]||P.unClick,checked:P.checked,onChange:F=>y(P,L)},null)]),t.createVNode("div",{class:"f-list-content"},[C(P)]),t.createVNode("div",{class:"f-list-remove",onClick:F=>S(L)},[t.createVNode("div",{class:"f-list-remove-icon"},[t.createVNode("i",{class:"f-icon f-icon-remove_face"},null)])]),t.createVNode("div",{class:"f-list-handle"},[t.createVNode("div",null,[t.createVNode("i",{class:"f-icon f-icon-drag-vertical"},null)])])])}return{renderItem:O}}function Ie(e,n,a){function l(){return n.slots.header&&t.createVNode("div",{class:"f-list-view-header"},[n.slots.header()])}return{renderHeader:l}}function ce(e,n,a){const l=t.ref(e.headerClass),o=t.ref(e.placeholder),c=t.ref(""),i=t.computed(()=>!c.value),s=t.computed(()=>!!c.value);function h(f){c.value=""}t.watch(c,f=>{a.search(f)});const r=t.computed(()=>{const f={"form-group":!0,"farris-form-group":!0};return l.value&&l.value.split(" ").reduce((g,y)=>(g[y]=!0,g),f),f});function u(f){}function d(){return t.createVNode("div",{class:"f-list-view-header",onClick:t.withModifiers(u,["prevent","stop"])},[t.createVNode("div",{class:r.value},[t.createVNode("div",{class:"farris-input-wrap"},[t.createVNode("div",{class:"f-cmp-inputgroup"},[t.createVNode("div",{class:"input-group f-state-editable"},[t.withDirectives(t.createVNode("input",{class:"form-control f-utils-fill text-left","onUpdate:modelValue":f=>c.value=f,name:"input-group-value",type:"text",placeholder:o.value,autocomplete:"off"},null),[[t.vModelText,c.value]]),t.createVNode("div",{class:"input-group-append"},[s.value&&t.createVNode("span",{class:"input-group-text input-group-clear",onClick:f=>h()},[t.createVNode("i",{class:"f-icon f-icon-close-circle"},null)]),i.value&&t.createVNode("span",{class:"input-group-text"},[t.createVNode("span",{class:"f-icon f-icon-search"},null)])])])])])])])}return{renderHeader:d}}const St="";function ke(e,n){const a=t.ref(e.idField),l=t.ref(e.data),o=t.ref(e.data),c=t.ref(e.keepOrder);function i(){const r=l.value.map((u,d)=>typeof u!="object"?{__fv_index__:d,name:u}:(u.__fv_index__=d,u));return o.value=r,r}const s=t.ref(i());t.watch(()=>e.data,r=>{if(c.value){const u=r.reduce((g,y)=>(g.set(y.id,!0),g),new Map),d=l.value.reduce((g,y)=>(g.set(y.id,!0),g),new Map),f=s.value.filter(g=>u.has(g.id)),b=r.filter(g=>!d.has(g.id));l.value=[...f,...b]}else l.value=r;s.value=i()});function h(r){return r.map(d=>{const f=o.value.findIndex(b=>b[a.value]===d);return f>-1?o.value[f]:null}).filter(d=>d!=null)}return{dataView:s,getSelectionItems:h}}function Ve(e,n,a,l){const o=t.ref(e.idField),{dataView:c}=a,i=t.ref(-1),s=t.ref(!1),{activeIndex:h,focusedItemId:r,hoverIndex:u,resumeHover:d,suspendHover:f}=l;function b(k,I,p){k.stopPropagation(),f(),I&&setTimeout(()=>{i.value=p,s.value=!0,I.moving=!0})}function g(k,I){if(k.preventDefault(),i.value!==I){const p=c.value[i.value],v=c.value;v.splice(i.value,1),v.splice(I,0,p),i.value=I}}function y(k,I){k.preventDefault(),k.dataTransfer&&(k.dataTransfer.dropEffect="move")}function N(k,I){I&&(I.moving=!1),c.value.forEach((p,v)=>{p.__fv_index__=v}),s.value=!1,d(),u.value=I.__fv_index__,h.value=I.__fv_index__,r.value=I[o.value],n.emit("change",c.value)}return{dragstart:b,dragenter:g,dragover:y,dragend:N,isDragging:s}}function xe(e,n,a){const{dataView:l}=a;function o(c){if(c>-1&&c<l.value.length){const i=l.value.splice(c,1);n.emit("removeItem",i[0])}}return{removeItem:o}}function Ne(){const e=t.ref(-1),n=t.ref(""),a=t.ref(-1),l=t.ref(!1);function o(r,u,d){a.value=d}function c(r,u,d){l.value||(a.value=d)}function i(r,u,d){a.value=-1}function s(){l.value=!0}function h(){l.value=!1}return{activeIndex:e,focusedItemId:n,hoverIndex:a,onMouseenterItem:o,onMouseoverItem:c,onMouseoutItem:i,resumeHover:h,suspendHover:s}}const Pe=t.defineComponent({name:"FListView",props:ve,emits:["checkValuesChange","clickItem","selectionChange","removeItem","change"],setup(e,n){const a=t.ref(),l=t.ref(e.view),o=t.ref(e.header),c=t.ref(e.multiSelect),i=t.ref(e.view==="CardView"),s=t.ref(!0),h=t.ref({}),r=t.ref("暂无数据");t.ref(!0),t.ref(!1),t.ref("id");const u=ke(e),{dataView:d}=u,f=t.computed(()=>{const V={"f-list-view":!0,"f-list-view-multiple":c.value};return e.size!=="default"&&(V[`${e.size}-item`]=!0),V}),b=t.computed(()=>({"f-list-view-group":!0,"d-flex":i.value,"flex-wrap":i.value})),g=t.computed(()=>!!d.value&&d.value.length>0),y=Ne(),N=Ce(e,n,u),k=Ve(e,n,u,y),I=xe(e,n,u),p=be(e,n,k,y,N),v=we(e,a),S=t.computed(()=>d.value.length===0),B=t.computed(()=>S.value&&!n.slots.empty),j=t.computed(()=>!!n.slots.footer||s.value);function M(){return l.value==="SingleView"?ie:l.value==="DraggableView"?Be:l.value==="ContentView"&&n.slots.content?Se:ie}const C=M(),{renderItem:O}=C(e,n,u,k,y,p,N,I);function P(){return o.value==="SearchBar"?ce:o.value==="ContentHeader"?Ie:ce}const L=P(),{renderHeader:W}=L(e,n,v);function F(V){v.search(V)}n.expose({search:F});function x(V){c.value&&(V.preventDefault(),V.stopPropagation())}return()=>t.createVNode("div",{class:f.value,onClick:x},[W(),t.createVNode("div",{ref:a,class:"f-list-view-content"},[t.createVNode("ul",{class:b.value,style:"list-style: none;"},[g.value&&d.value.map((V,D)=>O(V,D,h)),B.value&&t.createVNode("div",{class:"f-list-view-emptydata"},[t.createVNode("p",{class:"f-empty-title"},[r.value])]),n.slots.empty&&n.slots.empty()])]),j.value&&t.createVNode("div",{class:"f-list-view-footer"},[n.slots.footer&&n.slots.footer()])])}}),Me=t.defineComponent({name:"FComboListContainer",props:ye,emits:["selectionChange"],setup(e,n){const a=t.ref(e.dataSource),l=t.ref([]),o=t.ref(e.separator),c=t.ref(e.selectedValues.split(o.value));t.watch(e.dataSource,()=>{a.value=e.dataSource});const i=t.computed(()=>e.enableSearch?"SearchBar":"ContentHeader");function s(h){l.value=h.map(r=>Object.assign({},r)),c.value=h.map(r=>r[e.idField]),n.emit("selectionChange",l.value)}return()=>t.createVNode("div",{class:"f-combo-list-container"},[t.createVNode(Pe,{size:"small",itemClass:"f-combo-list-item",header:i.value,headerClass:"f-combo-list-search-box",data:a.value,idField:e.idField,textField:e.textField,multiSelect:e.multiSelect,multiSelectMode:"OnCheckAndClick","selection-values":c.value,onSelectionChange:s},null)])}}),Fe=new Map([["appearance",oe]]),Oe={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/button-edit.schema.json",title:"button-edit",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a Input Group",type:"string"},type:{description:"The type string of Input Group component",type:"string",default:"button-edit"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""},autoComplete:{description:"",type:"boolean",default:!1},buttonContent:{description:"",type:"string",default:""},enableClear:{description:"",type:"boolean",default:!0},inputType:{description:"",type:"string",enum:["text","tag"],default:"text"},multiSelect:{description:"",type:"boolean",default:!1},popup:{description:"",type:"object",properties:{footerButtons:{type:"array",default:[]},height:{type:"number",default:600},dataMapping:{type:"object"},contents:{type:"array",default:[]},showMaxButton:{type:"boolean",default:!0},showCloseButton:{type:"boolean",default:!0},showFooter:{type:"boolean",default:!0},title:{type:"string",default:""},width:{type:"number",default:800}}},separator:{type:"string",default:","},showButtonWhenDisabled:{description:"",type:"boolean",default:!1},wrapText:{type:"boolean",default:!1},onClear:{description:"",type:"string",default:""}},required:["id","type"]},re={id:String,buttonContent:{type:String,default:'<i class="f-icon f-icon-lookup"></i>'},buttonBehavior:{type:String,default:"Popup"},autoComplete:{type:Boolean,default:!1},customClass:{type:String,default:""},disable:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},enableClear:{type:Boolean,default:!1},modelValue:{type:String,default:""},readonly:{type:Boolean,default:!1},textAlign:{type:String,default:"left"},showButtonWhenDisabled:{type:Boolean,default:!1},enableTitle:{type:Boolean,default:!1},inputType:{type:String,default:"text"},forcePlaceholder:{type:Boolean,default:!1},placeholder:{type:String,default:""},minLength:Number,maxLength:Number,tabIndex:Number,popupHost:{type:Object},popupRightBoundary:{type:Object},popupOffsetX:{type:Object},popupOnInput:{type:Boolean,default:!1},popupOnFocus:{type:Boolean,default:!1},popupMinWidth:{type:Number,default:320},wrapText:{type:Boolean,default:!1},multiSelect:{type:Boolean,default:!1},separator:{type:String,default:","}};ne(re,Oe,Fe);const Le={popupContentPosition:{type:Object,default:{left:0,top:0}},host:{type:Object}},De=t.defineComponent({name:"FOverlay",props:Le,emits:["click"],setup(e,n){const a=t.ref(e.popupContentPosition),l=t.ref(e.host);function o(s){n.emit("click"),s.preventDefault(),s.stopPropagation()}const c=t.computed(()=>{const s=l.value;if(s){const h=s.getBoundingClientRect(),{left:r,top:u,height:d}=h;return{left:r,top:u+d}}return a.value}),i=t.computed(()=>({position:"relative",left:`${c.value.left}px`,top:`${c.value.top}px`}));return()=>t.createVNode(t.Teleport,{to:"body"},{default:()=>{var s,h;return[t.createVNode("div",{class:"overlay-container",style:"pointer-events: auto;",onClick:r=>o(r)},[t.createVNode("div",{style:i.value},[(h=(s=n.slots).default)==null?void 0:h.call(s)])])]}})}});function je(e){if(e.content&&e.content.render)return e.content.render;if(e.render&&typeof e.render=="function")return e.render}function Re(e){const n=document.createElement("div");n.style.display="contents";let a;const l=e.onClickCallback||(()=>{}),o=()=>{l(),a&&a.unmount()};return a=t.createApp({setup(){t.onUnmounted(()=>{document.body.removeChild(n)});const c=je(e);return()=>t.createVNode(De,{"popup-content-position":e.popupPosition,host:e.host,onClick:o},{default:()=>[c&&c()]})}}),document.body.appendChild(n),a.mount(n),a}class Ae{static show(n){return Re(n)}}function Ee(e,n,a,l){const o=t.ref(e.buttonBehavior),c=t.ref(e.popupOnInput),i=t.computed(()=>({"input-group-append":!0,"append-force-show":e.showButtonWhenDisabled&&(e.readonly||e.disable)})),s=t.computed(()=>e.showButtonWhenDisabled||(!e.editable||!e.readonly)&&!e.disable);async function h(f){if(s.value){const b=!!n.slots.default;o.value==="Overlay"&&Ae.show({host:a.value,render:()=>{if(n.slots.default)return n.slots.default()}}),b&&o.value==="Popup"&&l.togglePopup(),b&&c.value&&l.hidePopup(),n.emit("clickButton",{origin:f,value:e.modelValue})}f.stopPropagation()}function r(f){n.emit("mouseEnterIcon",f)}function u(f){n.emit("mouseLeaveIcon",f)}function d(){n.emit("mouseOverButton")}return{buttonClass:i,onClickButton:h,onMouseEnterButton:r,onMouseLeaveButton:u,onMouseOverButton:d}}function $e(e,n,a,l,o,c){const i=t.ref(!1),s=t.computed(()=>e.enableClear&&!e.readonly&&!e.disable),{changeTextBoxValue:h}=c;function r(b){i.value=b}t.watch(o,()=>{l.value?r(!!o.value):r(!1)});function u(b){const g=!e.readonly&&!e.disable&&e.editable,y=!e.editable;b.stopPropagation(),(g||y)&&(h("",!1),r(!i.value),n.emit("clear"))}function d(b){if(s.value){if(!a.value){r(!1);return}(!e.editable||!e.readonly)&&!e.disable&&r(!0)}}function f(b){s.value&&r(!1)}return{enableClearButton:s,showClearButton:i,onClearValue:u,onMouseEnterTextBox:d,onMouseLeaveTextBox:f}}function He(e,n,a,l,o){const c=t.ref(e.popupOnInput),i=t.ref(e.popupOnFocus),{shouldPopupContent:s}=o,h=t.computed(()=>e.enableTitle?a.value:""),r=t.computed(()=>(e.disable||e.readonly)&&!e.forcePlaceholder?"":e.placeholder),u=t.computed(()=>e.readonly||!e.editable);let d=!1;const f=t.computed(()=>!e.disable&&d),b=t.computed(()=>({"text-left":e.textAlign==="left","text-center":e.textAlign==="center","text-right":e.textAlign==="right","form-control":!0,"f-utils-fill":!0})),g=t.computed(()=>({"input-group":!0,"f-state-disable":e.disable,"f-state-editable":e.editable&&!e.disable&&!e.readonly,"f-state-readonly":e.readonly&&!e.disable,"f-state-focus":f.value}));function y(C,O=!0){a.value!==C&&(a.value=C,O&&n.emit("change",C),n.emit("update:modelValue",C))}function N(C){s.value=!1,y(C,!0)}t.watch(()=>e.modelValue,C=>{a.value=C,n.emit("change",C)});function k(C){d=!1,n.emit("blur",C),C.stopPropagation()}function I(C){n.emit("click",C)}function p(C){if(e.disable){d=!0;return}d=!0,u.value||(n.emit("focus",C),i.value&&!s.value&&o.popup())}function v(C){n.emit("input",C.target.value);const O=C.target.value;l.value=O,a.value!==O&&y(O,!1),c.value&&!s.value&&o.popup()}function S(C){C.target.tagName!=="INPUT"&&C.preventDefault(),C.stopPropagation()}function B(C){n.emit("keydown",C)}function j(C){C.key==="Enter"&&(c.value||i.value)&&o.hidePopup(),n.emit("keyup",C)}function M(C){const O=C.target.value;C.stopPropagation(),y(O)}return{hasFocusedTextBox:f,isTextBoxReadonly:u,textBoxClass:b,textBoxPlaceholder:r,textBoxTitle:h,inputGroupClass:g,changeTextBoxValue:y,commitValue:N,onBlurTextBox:k,onClickTextBox:I,onFocusTextBox:p,onInput:v,onKeyDownTextBox:B,onKeyUpTextBox:j,onMouseDownTextBox:S,onTextBoxValueChange:M}}function We(e,n,a){const l=t.ref(),o=t.ref(!1);function c(){const r=l.value;r&&r.show(a.value)}async function i(){!!n.slots.default&&(o.value=!o.value,await t.nextTick(),c())}async function s(){!!n.slots.default&&(o.value=!0,await t.nextTick(),c())}function h(){o.value=!1}return{hidePopup:h,popup:s,shouldPopupContent:o,togglePopup:i,popoverRef:l}}function _e(e,n,a){const{isTextBoxReadonly:l,textBoxClass:o,textBoxPlaceholder:c,textBoxTitle:i,onBlurTextBox:s,onClickTextBox:h,onFocusTextBox:r,onInput:u,onKeyDownTextBox:d,onKeyUpTextBox:f,onMouseDownTextBox:b,onTextBoxValueChange:g}=a;return()=>t.createVNode("input",{name:"input-group-value",autocomplete:e.autoComplete?"on":"off",class:o.value,disabled:e.disable,maxlength:e.maxLength,minlength:e.minLength,placeholder:c.value,readonly:l.value,tabindex:e.tabIndex,title:i.value,type:e.inputType,value:n.value,onBlur:s,onChange:g,onClick:h,onFocus:r,onInput:u,onKeydown:d,onKeyup:f,onMousedown:b},null)}const ze={activeTag:{Type:String,default:""},addButtonText:{Type:String,default:""},customClass:{Type:String,default:""},customStyle:{Type:String,default:""},data:{type:Array,default:[]},enableAddButton:{Type:Boolean,default:!1},placeholder:{Type:String,default:""},selectable:{Type:Boolean,default:!1},showAddButton:{Type:Boolean,default:!1},showClose:{Type:Boolean,default:!1},showColor:{Type:Boolean,default:!1},showInput:{Type:Boolean,default:!1},tagType:{Type:String,default:""},tagStyle:{Type:String,default:""},wrapText:{Type:Boolean,default:!1},draggable:{Type:Boolean,default:!1}},Mt="";function qe(e,n,a,l){const o=t.ref(-1),c=t.ref(!1);function i(u,d,f){u.stopPropagation(),d&&setTimeout(()=>{o.value=f,c.value=!0,d.moving=!0})}function s(u,d){if(u.preventDefault(),o.value!==d){const f=l.value[o.value],b=l.value;b.splice(o.value,1),b.splice(d,0,f),o.value=d}}function h(u,d){u.preventDefault(),u.dataTransfer&&(u.dataTransfer.dropEffect="move")}function r(u,d){d&&(d.moving=!1),a.value=l.value.filter(f=>f.type==="Tag").map(f=>f.payload),c.value=!1,n.emit("change",a.value)}return{dragstart:i,dragenter:s,dragover:h,dragend:r,isDragging:c}}const Xe=t.defineComponent({name:"FTags",props:ze,emits:["remove","selectionChange","change"],setup(e,n){const a=t.ref(e.selectable),l=t.ref(e.customClass),o=t.ref(e.data),c=t.ref(e.tagType),i=t.ref(e.tagStyle),s=t.ref(e.showColor),h=t.ref(e.activeTag),r=t.ref(e.customStyle),u=t.ref(e.showClose),d=t.ref(e.showAddButton),f=t.ref(e.showInput),b=t.ref(e.addButtonText),g=t.ref(e.enableAddButton);t.ref(e.placeholder),t.ref(""),t.ref();const y=t.ref(),N=t.ref(e.wrapText),k=t.ref();function I(){const m=o.value.map(w=>({type:"Tag",payload:w}));return d.value&&m.push({type:"AddButton"}),m}const p=t.ref(I());function v(m){o.value=m,p.value=I()}const S=t.computed(()=>p.value.findIndex(m=>m.type==="Input")),B=qe(e,n,o,p),{dragstart:j,dragenter:M,dragover:C,dragend:O}=B;t.watch(()=>e.data,m=>v(m));const P=t.computed(()=>{const m={"farris-tags":!0,"farris-tags-checkable":a.value,"farris-tags-nowrap":!N.value};return l.value.split(" ").reduce((w,T)=>(w[T]=!0,w),m),m});function L(m){const w={"farris-tag-item":!0,"farris-tag-item-checked":a.value&&m.checked,"farris-tag-item-checkable":a.value,"farris-tag-item-has-color":s.value,"farris-tag-item-actived":h.value===m.name};if(c.value){const T=`farris-tag-item-${c.value}`;w[T]=!0}return w}const W=t.computed(()=>{const m={};return r.value&&r.value.split(";").reduce((w,T)=>{const R=T.split(":");return w[R[0]]=R[1],w},m),m});function F(m,w){a.value&&w.selectable&&(w.checked=!w.checked,h.value=w.checked?w.name:"",w.checked&&o.value.filter(T=>T.name!==w.name).forEach(T=>{T.checked=!w.checked}),n.emit("change",o.value),n.emit("selectionChange",w))}function x(m,w){let T;switch(m.key){case"Backspace":o.value=o.value.filter(R=>R.name!==w.name),n.emit("change",o.value);break;case"ArrowLeft":T=Math.max(y.value.scrollLeft+20,0),y.value.scrollLeft=T;break;case"ArrowRight":T=Math.max(y.value.scrollLeft-20,0),y.value.scrollLeft=T}}function V(m,w){const T=o.value.findIndex(R=>R.name===w.name);if(T>-1){const[R]=o.value.splice(T,1);p.value=I(),n.emit("change",o.value),n.emit("remove",o.value,R,T)}m.stopPropagation()}const D=t.computed(()=>({"farris-tag-item":!0,"farris-tag-add-button":!0,"farris-tag-add-button-disabled":!g.value}));function $(m){}function E(){return t.createVNode("li",{class:D.value,onClick:m=>void 0},[t.createVNode("span",{class:"f-icon f-icon-amplification"},null),t.createVNode("span",{class:"farris-tag-add-text"},[b.value])])}function H(m){if(m&&!m.innerText){const w=S.value;if(w>0){const[T]=o.value.splice(w-1,1);p.value.splice(w-1,1),n.emit("remove",o.value,T,w-1)}}}function q(m,w,T){m>-1&&(o.value.splice(m,0,{name:w,value:T,selectable:a.value}),p.value=I(),n.emit("change",o.value))}function U(m){if(m&&m.innerText){const w=m.innerText,T=S.value;q(T,w,w),m.innerText=""}}function Y(m){const w=m.target;w&&(w.innerText?U(w):n.emit("change",o.value))}function it(m){m.key==="Enter"&&U(m.target),m.key==="Backspace"&&(H(m.target),t.nextTick(()=>{k.value&&k.value.focus()}))}function ct(){return t.createVNode("li",{class:"farris-tag-input-box"},[t.createVNode("div",{ref:k,class:"form-control",contenteditable:"true",onKeyup:it,onBlur:Y},null)])}function rt(m,w){return t.createVNode("li",{class:L(m),style:W.value,tabindex:0,id:m.name,key:m.name,onClick:T=>F(T,m),onKeydown:T=>x(T,m),draggable:"true",onDragstart:T=>j(T,m,w),onDragenter:T=>M(T,w),onDragend:T=>O(T,m),onDragover:T=>C(T,w)},[t.createVNode("div",{title:m.name,class:"tag-box"},[m.name]),u.value&&t.createVNode("span",{class:"tag-delete"},[t.createVNode("i",{class:"f-icon f-icon-close",onClick:T=>V(T,m)},null)])])}function st(){return p.value.map((m,w)=>{switch(m.type){case"Tag":return rt(m.payload,w);case"AddButton":return E();case"Input":return ct()}})}const ut=t.computed(()=>({"farris-tags-item-container":!0,"farris-tag-item-capsule":i.value==="capsule"}));function dt(m){const w=Math.max(y.value.scrollLeft-m.deltaX,0);y.value.scrollLeft=w}function ft(m){const w=y.value,T=o.value.length-1;if(w){const R=Array.from(w.children).filter(_=>_.className.indexOf("farris-tag-item")>-1).findIndex(_=>{const z=_.getBoundingClientRect(),Z=window.getComputedStyle(_),ue=parseInt(Z["margin-left"],10)+z.width+parseInt(Z["margin-right"],10);return z.left+ue>m});if(R>-1)return R}return T}function pt(m){if(f.value){const T=ft(m.clientX)+1,_=p.value.filter(z=>z.type!=="Input");_.splice(T,0,{type:"Input"}),p.value=_,t.nextTick(()=>{k.value&&k.value.focus()})}}function mt(m){var T;m.preventDefault(),m.stopPropagation();const w=(T=m.dataTransfer)==null?void 0:T.getData("Text");if(w){const R=w.split(":"),_=R[0],z=R[1];[...o.value].findIndex(ee=>(console.log(`${ee.value} === ${z} is ${ee.value===z}`),ee.value===z))>-1||q(o.value.length,_,z)}}function gt(m){m.preventDefault()}return()=>t.createVNode("div",{class:P.value,onClick:pt,onDrop:mt,onDragover:gt},[t.createVNode("ul",{ref:y,class:ut.value,onWheel:m=>dt(m)},[st()])])}});function Ge(e,n,a){const l=t.ref(e.separator),{changeTextBoxValue:o}=a,c=t.computed(()=>n.value?n.value.split(l.value).map(s=>({name:s,selectable:!0})):[]);function i(s){o(s.map(h=>h.name).join(l.value),!0)}return()=>t.createVNode(Xe,{class:"form-control",data:c.value,showClose:!0,showInput:!0,onChange:i},null)}function Ue(e,n,a){const{buttonClass:l,onClickButton:o,onMouseEnterButton:c,onMouseLeaveButton:i}=n,{enableClearButton:s,showClearButton:h,onClearValue:r}=a;return()=>t.createVNode("div",{class:l.value},[s.value&&t.withDirectives(t.createVNode("span",{class:"input-group-text input-group-clear",onClick:r},[t.createVNode("i",{class:"f-icon modal_close"},null)]),[[t.vShow,h.value]]),e.buttonContent&&t.createVNode("span",{class:"input-group-text input-group-append-button",innerHTML:e.buttonContent,onClick:o,onMouseenter:c,onMouseleave:i},null)])}const Ke={title:{type:String},placement:{type:String,default:"bottom"},reference:{type:Object},host:{type:Object},leftBoundary:{type:Object},rightBoundary:{type:Object},visible:{type:Boolean,default:!1},class:{type:String},offsetX:{type:Object,default:t.ref(0)},zIndex:{type:Number,default:-1},keepWidthWithReference:{type:Boolean,default:!1},fitContent:{type:Boolean,default:!1},minWidth:{type:Number,default:-1}},Ft="";function Je(e){const n=e.host?e.host:"body",a=t.computed(()=>n==="body"?0:n?n.getBoundingClientRect().top:0),l=t.computed(()=>n==="body"?0:n?n.getBoundingClientRect().left:0),o=t.computed(()=>n==="body"?document.body.getBoundingClientRect().width:n?n.getBoundingClientRect().width-(e.rightBoundary?e.rightBoundary.getBoundingClientRect().width:0):document.body.getBoundingClientRect().width);return{host:n,hostLeft:l,hostTop:a,hostWidth:o}}function Qe(e,n,a,l){var F;const o=t.ref(0),c=t.ref(((F=e.offsetX)==null?void 0:F.value)||0),i=t.ref(-1),s=t.ref(-1),h=t.ref(-1),r=t.ref(e.placement),u=t.ref(0),d=t.ref(0),f=t.ref(0),b=t.ref(document.documentElement.scrollLeft),g=t.ref(document.documentElement.scrollTop),{hostLeft:y,hostTop:N,hostWidth:k}=l;t.watch(e.offsetX,x=>{o.value=x-c.value});const I=t.computed(()=>{const x={left:`${d.value}px`,top:`${f.value}px`,transform:`translateX(${o.value}px)`};return e.zIndex!==-1&&(x["z-index"]=e.zIndex),i.value!==-1&&(x.width=`${i.value}px`),x}),p=t.computed(()=>({left:`${u.value}px`}));function v(x){if(x&&e.keepWidthWithReference){const V=x.getBoundingClientRect();i.value=Math.max(e.minWidth,V.width)}}function S(x,V){const D=k.value-x.width-4;return D>0?D:V}function B(x,V,D){const $=u.value,E=V.left-y.value+V.width/2+b.value,H=V.top-N.value-(x.height+D.height)+g.value;return{popoverLeft:E,popoverTop:H,arrowLeft:$}}function j(x,V,D){return V.top-N.value+(V.height+D.height)+g.value}function M(x,V){const D=S(V,x),$=x<=D?u.value:x-D;return{popoverLeft:Math.min(x,D),arrowLeft:$}}function C(x,V,D){const $=V.left-y.value+V.width/2-(D.width/2-(x.left-y.value))+b.value,{arrowLeft:E,popoverLeft:H}=M($,x),q=j(x,V,D);return{popoverLeft:H,popoverTop:q,arrowLeft:E}}function O(x,V,D){const $=V.left-y.value+b.value,{arrowLeft:E,popoverLeft:H}=M($,x),q=j(x,V,D);return{popoverLeft:H,popoverTop:q,arrowLeft:E}}const P=new Map([["top",B],["bottom",C],["bottom-left",O]]);function L(x){var H;const V=x.getBoundingClientRect();s.value=V.top,h.value=V.left;const D=n.value.getBoundingClientRect(),$=(H=a.value)==null?void 0:H.getBoundingClientRect(),E=P.get(r.value);if(E){const{arrowLeft:q,popoverLeft:U,popoverTop:Y}=E($,V,D);u.value=q,d.value=U,f.value=Y}e.keepWidthWithReference&&v(x)}function W(x){if(x){const V=x.getBoundingClientRect();(V.left!==h.value||V.top!==s.value)&&L(x)}}return{arrowStyle:p,popoverStyle:I,position:r,popoverWidth:i,fitToReference:v,followToReferencePosition:W,locateToReference:L}}function Ye(e,n,a,l,o,c,i){const s=t.ref(e.visible),h=t.computed(()=>s.value),{fitToReference:r,locateToReference:u}=i;let d;function f(){s.value=!1,document.body.removeEventListener("click",d),n.emit("hidden")}d=g=>{if(!o.value.contains(g.target)){const y=o.value.closest(".popover");y&&y.removeEventListener("click",d),f()}};async function b(g){if(l.value&&a.value&&g){s.value=!0,o.value=g,await t.nextTick(),u(g),c.value&&r(g),document.body.addEventListener("click",d);const y=g.closest(".popover");y&&y.addEventListener("click",d),n.emit("shown")}}return n.expose({hide:f,show:b,shown:h}),{showPopover:s,hidePopverOnClickBodyHandler:d}}function Ze(e,n,a,l,o){const{popoverWidth:c,fitToReference:i,followToReferencePosition:s}=o;function h(){if(a.value){s(a.value);const r=a.value.getBoundingClientRect();l.value&&r.width!==c.value&&i(a.value)}}return{onResize:h}}const et=t.defineComponent({name:"FPopover",props:Ke,emits:["shown","hidden"],setup(e,n){const a=t.ref(),l=t.ref(),o=t.ref(e.reference),c=t.ref(e.keepWidthWithReference),i=t.computed(()=>!!e.title),s=Je(e),{host:h}=s,r=Qe(e,a,l,s),{position:u,arrowStyle:d,popoverStyle:f,fitToReference:b,locateToReference:g}=r,{showPopover:y,hidePopverOnClickBodyHandler:N}=Ye(e,n,a,l,o,c,r),{onResize:k}=Ze(e,n,o,c,r),I=t.computed(()=>{const v=`popover in popover-${u.value}`,S=`bs-popover-${u.value}`,B={"popover-fitcontent":e.fitContent};return B[v]=!0,B[S]=!0,(e.class||"").split(" ").reduce((M,C)=>(M[C]=!0,M),B),B}),p=t.computed(()=>({"popover-content":!0,"popover-body":!0}));return t.onMounted(()=>{e.reference&&g(o.value),c.value&&b(o.value),window.addEventListener("resize",k)}),t.onUnmounted(()=>{document.body.removeEventListener("click",N),window.removeEventListener("resize",k)}),()=>t.createVNode(t.Teleport,{to:h},{default:()=>{var v;return[t.withDirectives(t.createVNode("div",{ref:l,class:I.value,style:f.value,onClick:S=>{S.stopPropagation()}},[t.createVNode("div",{ref:a,class:"popover-arrow arrow",style:d.value},null),i.value&&t.createVNode("h3",{class:"popover-title popover-header"},[e.title]),t.createVNode("div",{class:p.value},[n.slots.default&&((v=n.slots)==null?void 0:v.default())])]),[[t.vShow,y.value]])]}})}});function tt(e,n,a){const l=t.ref(e.popupMinWidth),{hidePopup:o,popoverRef:c}=a;return()=>t.createVNode(et,{ref:c,visible:!0,placement:"bottom-left",host:e.popupHost,"keep-width-with-reference":!0,fitContent:!0,"right-boundary":e.popupRightBoundary,minWidth:l.value,offsetX:e.popupOffsetX,onHidden:o},{default:()=>{var i,s;return[(s=(i=n.slots).default)==null?void 0:s.call(i)]}})}const Ot="",se=t.defineComponent({name:"FButtonEdit",props:re,emits:["updateExtendInfo","clear","change","click","clickButton","blur","focus","mouseEnterIcon","mouseLeaveIcon","keyup","keydown","inputClick","input","update:modelValue"],setup(e,n){const a=t.ref(),l=t.ref(e.customClass),o=t.ref(e.modelValue),c=We(e,n,a),{shouldPopupContent:i,hidePopup:s}=c,h=Ee(e,n,a,c),r=t.ref(""),u=He(e,n,o,r,c),{hasFocusedTextBox:d,commitValue:f,inputGroupClass:b}=u,g=$e(e,n,o,d,r,u),{onMouseEnterTextBox:y,onMouseLeaveTextBox:N}=g,k=t.computed(()=>{const j={"f-button-edit":!0,"f-cmp-inputgroup":!0,"f-button-edit-nowrap":!e.wrapText};return l.value&&l.value.split(" ").reduce((M,C)=>(M[C]=!0,M),j),j});function I(){return e.multiSelect&&e.inputType==="tag"?Ge(e,o,u):_e(e,o,u)}let p=I();t.watch([()=>e.multiSelect,()=>e.inputType],()=>{p=I()});const v=Ue(e,h,g),S=tt(e,n,c),B={commitValue:f,elementRef:a,hidePopup:s};return t.onMounted(()=>{a.value.componentInstance=B}),n.expose(B),()=>t.createVNode(t.Fragment,null,[t.createVNode("div",t.mergeProps(n.attrs,{ref:a,class:k.value,id:e.id}),[t.createVNode("div",{class:b.value,onMouseenter:y,onMouseleave:N},[p(),v()])]),i.value&&S()])}}),Lt="";function nt(e){const n=t.ref(""),a=t.ref(e.modelValue),l=t.ref(e.data||[]),o=t.ref(e.editable);function c(r){const u=r.split(e.separator).map(f=>[f,!0]),d=new Map(u);return l.value.filter(f=>d.has(f[e.valueField]))}function i(r){const u=c(r).map(d=>d[e.textField]).join(e.separator);n.value=o.value?u||r:u}function s(r){const u=r.split(e.separator).map(f=>[f,!0]),d=new Map(u);return l.value.filter(f=>d.has(f[e.textField]))}function h(){const{url:r,method:u="GET",headers:d={},body:f=null}=e.remote;fetch(r,{method:u,headers:d,body:f}).then(g=>{if(g.status===200)return g.json();throw new Error(g.statusText)}).then(g=>{l.value=g}).catch(g=>{console.error(g)})}return e.remote&&h(),t.watch(()=>e.data,()=>{l.value=e.data}),t.watch([l],([r])=>{if(e.modelValue){const u=r.find(d=>d[e.valueField]===e.modelValue);u&&(n.value=u[e.textField])}}),t.watch(()=>e.modelValue,r=>{a.value=r,i(r)}),i(e.modelValue),{dataSource:l,displayText:n,editable:o,modelValue:a,getItemsByDisplayText:s,getItemsByValue:c}}const G=t.defineComponent({name:"FComboList",props:X,emits:["clear","update:modelValue","change"],setup(e,n){const a=t.ref(),l=t.ref(e.disabled),o=t.ref(e.enableClear),c=t.ref(e.enableSearch),i=t.ref(e.readonly),{dataSource:s,displayText:h,editable:r,modelValue:u,getItemsByDisplayText:d}=nt(e),f=t.computed(()=>e.multiSelect);function b(){!f.value&&a.value&&a.value.hidePopup()}function g(p){h.value=p.map(v=>v[e.textField]).join(e.separator),u.value=p.map(v=>v[e.valueField]).join(e.separator),n.emit("update:modelValue",u.value),n.emit("change",p),b()}function y(p){u.value="",n.emit("update:modelValue",""),n.emit("clear")}function N(p){u.value=p,n.emit("update:modelValue",u.value);const v={};v[e.idField]=p,v[e.textField]=p,n.emit("change",[v])}function k(p){if(r.value){N(p);return}const v=d(p);g(v)}function I(){return h.value}return n.expose({getDisplayText:I}),t.watch([()=>e.disabled,()=>e.editable,()=>e.enableClear,()=>e.enableSearch,()=>e.readonly],([p,v,S,B,j])=>{l.value=p,r.value=v,o.value=S,c.value=B,i.value=j}),()=>t.createVNode(se,{ref:a,id:e.id,disable:l.value,readonly:i.value,forcePlaceholder:e.forcePlaceholder,editable:r.value,buttonContent:e.dropDownIcon,placeholder:e.placeholder,enableClear:o.value,maxLength:e.maxLength,tabIndex:e.tabIndex,enableTitle:e.enableTitle,multiSelect:e.multiSelect,inputType:e.multiSelect?"tag":"text",modelValue:h.value,"onUpdate:modelValue":p=>h.value=p,onClear:y,onChange:k},{default:()=>[t.createVNode(Me,{idField:e.idField,valueField:e.valueField,textField:e.textField,dataSource:s.value,selectedValues:u.value,multiSelect:e.multiSelect,enableSearch:c.value,onSelectionChange:g},null)]})}});function ot(e,n,a){var I;const l=a==null?void 0:a.checkIsInFixedContextRules(),o=a&&a.getStyles&&a.getStyles()||"";function c(){return!(n.schema.componentType||l)}function i(){return!1}function s(){return!(n.schema.componentType||l)}function h(){return!!l}function r(p){if(!p)return null;if(p.schema.type==="Component")return p;const v=r(p.parent);return v||null}function u(p,v,S){return!!a&&a.canAccepts()}function d(){return n.schema.label||n.schema.title||n.schema.name}function f(){}function b(p,v){v&&(a==null||a.onAcceptMovedChildElement(v))}function g(p,v){const S=String(p.getAttribute("data-controltype"));return de(S)}function y(p){return p.contents?p.contents.length:-1}function N(p){}const k={canMove:c(),canSelectParent:i(),canDelete:s(),canNested:!h(),contents:n.schema.contents,elementRef:e,parent:(I=n.parent)==null?void 0:I.componentInstance.value,schema:n.schema,styles:o,canAccepts:u,getBelongedComponentInstance:r,getDraggingDisplayText:d,getDragScopeElement:f,onAcceptMovedChildElement:b,onAcceptNewChildElement:g,onAddNewChildElement:y,onChildElementMovedOut:N,triggerBelongedComponentToMoveWhenMoved:!!a&&a.triggerBelongedComponentToMoveWhenMoved};return t.ref(k)}const at=t.defineComponent({name:"FComboListDesign",props:X,emits:["clear","update:modelValue","change"],setup(e,n){const a=t.ref(),l=t.inject("design-item-context"),o=ot(a,l);return t.onMounted(()=>{a.value.componentInstance=o}),n.expose(o.value),()=>t.createVNode(se,{ref:a,id:e.id,disable:e.disabled,readonly:e.readonly,forcePlaceholder:e.forcePlaceholder,editable:e.editable,buttonContent:e.dropDownIcon,placeholder:e.placeholder,enableClear:e.enableClear,maxLength:e.maxLength,tabIndex:e.tabIndex,enableTitle:e.enableTitle,multiSelect:e.multiSelect,inputType:e.multiSelect?"tag":"text"},null)}}),lt={install(e){e.component(G.name,G)},register(e,n){e["combo-list"]=G,n["combo-list"]=J},registerDesigner(e,n){e["combo-list"]=at,n["combo-list"]=J}};A.FComboList=G,A.Placement=le,A.ViewType=ae,A.comboListProps=X,A.default=lt,A.propsResolver=J,Object.defineProperties(A,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(A,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(A=typeof globalThis<"u"?globalThis:A||self,t(A["combo-list"]={},A.Vue))})(this,function(A,t){"use strict";const te={};function K(e){const{properties:n}=e;return Object.keys(n).reduce((l,o)=>(l[o]=n[o].type==="object"&&n[o].properties?K(n[o]):n[o].default,l),{})}function de(e){const n=te[e];return n?K(n):null}function fe(e,n){const a=K(n);return Object.keys(e).reduce((l,o)=>(l[o]=e[o],l),a),a}function pe(e,n){return Object.keys(e).filter(l=>e[l]!=null).reduce((l,o)=>{if(n.has(o)){const r=n.get(o);if(typeof r=="string")l[r]=e[o];else{const i=r(o,e[o]);Object.assign(l,i)}}else l[o]=e[o];return l},{})}function me(e,n,a=new Map){const l=fe(e,n);return pe(l,a)}function ne(e,n,a=new Map){return te[n.title]=n,l=>{const o=me(l,n,a),r=Object.keys(e).reduce((i,u)=>(i[u]=e[u].default,i),{});return Object.assign(r,o)}}function oe(e,n){return{customClass:n.class}}const he=new Map([["appearance",oe]]),ge={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/combo-list.schema.json",title:"combo-list",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a combo list",type:"string"},type:{description:"The type string of number combo list component",type:"string",default:"combo-list"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""}},required:["id","type"]};var ae=(e=>(e.Text="text",e.Tag="tag",e))(ae||{}),le=(e=>(e.top="top",e.bottom="bottom",e.auto="auto",e))(le||{});const X={id:{type:String},data:{type:Array,default:[]},displayText:{type:String,default:""},disabled:{default:!1,type:Boolean},dropDownIcon:{type:String,default:'<span class="f-icon f-icon-arrow-60-down"></span>'},editable:{default:!1,type:Boolean},enableClear:{default:!0,type:Boolean},enableSearch:{type:Boolean,default:!1},enableTitle:{default:!0,type:Boolean},forcePlaceholder:{default:!1,type:Boolean},hidePanelOnClear:{default:!0,type:Boolean},idField:{default:"id",type:String},mapFields:{type:Object},maxHeight:{default:350,type:Number},maxLength:{type:Number},multiSelect:{default:!1,type:Boolean},modelValue:{type:String,default:""},placeholder:{type:String},placement:{type:String,default:"auto"},readonly:{default:!1,type:Boolean},remote:{default:null,type:Object},remoteSearch:{default:!1,type:Boolean},separator:{default:",",type:String},tabIndex:{type:Number,default:-1},textField:{default:"name",type:String},valueField:{default:"id",type:String},viewType:{default:"text",type:String}},J=ne(X,ge,he),ye={dataSource:{type:Array,default:[]},enableSearch:{type:Boolean,default:!1},idField:{type:String,default:"id"},multiSelect:{default:!1,type:Boolean},selectedValues:{type:String,default:""},separator:{type:String,default:","},textField:{type:String,default:"name"},width:{type:Number},height:{type:Number},valueField:{type:String,default:"id"}},ve={data:{type:Array,default:[]},draggable:{type:Boolean,default:!1},multiSelect:{Type:Boolean,default:!1},multiSelectMode:{Type:String,default:"OnCheck"},idField:{Type:String,default:"id"},valueField:{Type:String,default:"id"},textField:{Type:String,default:"name"},view:{Type:String,default:"ContentView"},size:{Type:String,default:"default"},placeholder:{type:String,default:""},header:{Type:String,default:"ContentHeader"},headerClass:{Type:String,default:""},itemClass:{Type:String,default:""},selectionValues:{type:Array,default:[]},keepOrder:{type:Boolean,default:!1},disableField:{type:String,default:"disabled"}};function be(e,n,a,l,o){const r=t.ref(e.idField),i=t.ref(e.disableField),u=t.ref(e.draggable),y=t.ref(e.itemClass),d=t.ref(e.multiSelect),f=t.ref(e.multiSelectMode);t.ref(!0);const{isDragging:c}=a,{activeIndex:s,focusedItemId:h,hoverIndex:p}=l,{clearSelection:v,selectedItems:V,toggleSelectItem:k}=o;function w(b,O){const P={"f-list-view-group-item":!0,"f-list-view-draggable-item":u.value,"f-un-click":!!b.unClick,"f-un-select":!!b[i.value],"f-listview-active":b.__fv_index__===s.value,"f-listview-hover":!c.value&&O===p.value,moving:!!b.moving};return y.value.split(" ").reduce((W,F)=>(W[F]=!0,W),P),P}function g(b,O){return b[r.value]||""}const S=t.computed(()=>!d.value);function I(b,O){b.unClick||b[i.value]||(S.value&&(h.value=b[r.value]),k(b,O))}const B=t.computed(()=>d.value&&f.value==="OnCheckClearByClick"),j=t.computed(()=>!d.value||d.value&&(f.value==="OnCheckAndClick"||f.value==="OnClick"));function M(b,O,P){if(O.unClick||O[i.value]){b.preventDefault(),b.stopPropagation();return}h.value=O[r.value],s.value=P,B.value&&v(),j.value&&k(O,P),n.emit("clickItem",{data:V.value,index:P})}return{getKey:g,listViewItemClass:w,onCheckItem:I,onClickItem:M}}function Ce(e,n,a){const l=t.ref(e.idField),o=t.ref(e.multiSelect);t.ref(e.multiSelectMode);const{getSelectionItems:r}=a,i=t.ref(r(e.selectionValues));t.watch(()=>e.selectionValues,s=>{i.value=t.ref(r(s)).value});const u=t.computed(()=>!o.value);function y(s){return s[l.value]||""}function d(s){return i.value.findIndex(p=>y(p)===y(s))}function f(){i.value.forEach(s=>{s.checked=!1}),i.value=[]}function c(s,h){u.value&&f();const p=d(s);p>-1?(i.value.splice(p,1),s.checked=!1):(i.value.push(s),s.checked=!0),n.emit("selectionChange",i.value)}return{clearSelection:f,findIndexInSelectedItems:d,selectedItems:i,toggleSelectItem:c}}function we(e,n){function a(r){const i=[];let u=r.nextNode();for(;u;)i.push(u),u=r.nextNode();return i}function l(r,i){const u=document.createTreeWalker(r,NodeFilter.SHOW_TEXT);return a(u).map(c=>({textNode:c,text:(c.textContent||"").toLocaleLowerCase()})).map(({textNode:c,text:s})=>{const h=[];let p=0;for(;p<s.length;){const v=s.indexOf(i,p);if(v===-1)break;h.push(v),p=v+i.length}return h.map(v=>{const V=new Range;return V.setStart(c,v),V.setEnd(c,v+i.length),V})}).flat()}function o(r){if(!CSS.highlights||(CSS.highlights.clear(),!r||!n))return;const i=l(n.value,r.toLocaleLowerCase()),u=new Highlight(...i);CSS.highlights.set("search-result",u)}return{search:o}}const Se={checked:{Type:Boolean,default:!1},id:{Type:String,default:""},disabled:{Type:Boolean,default:!1},modelValue:{Type:Boolean,default:!1}},Q=t.defineComponent({name:"FListViewCheckBox",props:Se,emits:["change","update:modelValue"],setup(e,n){const a=t.ref(e.checked),l=t.ref(e.disabled),o=t.ref(e.id);function r(i){i.stopPropagation(),i.preventDefault(),l.value||(a.value=!a.value,n.emit("change",{originalEvent:i,checked:a.value}))}return t.watch(()=>e.checked,i=>{a.value=i}),()=>t.createVNode("div",{class:"custom-control custom-checkbox custom-control-inline listview-checkbox"},[t.withDirectives(t.createVNode("input",{id:o.value,title:o.value,type:"checkbox",class:"custom-control-input","onUpdate:modelValue":i=>a.value=i,onChange:i=>console.log(i)},null),[[t.vModelCheckbox,a.value]]),t.createVNode("label",{for:o.value,class:"custom-control-label",onClick:i=>r(i)},null)])}});function ie(e,n,a,l,o,r,i,u){const y=t.ref(e.size),d=t.ref(e.textField),f=t.ref(e.multiSelect),c=t.ref(e.disableField),{onMouseenterItem:s,onMouseoverItem:h,onMouseoutItem:p}=o,{getKey:v,listViewItemClass:V,onCheckItem:k,onClickItem:w}=r,g=t.computed(()=>({margin:y.value==="small"?"0.25rem 0":"10px 0"}));function S(I,B,j){return I.checked=i.findIndexInSelectedItems(I)>-1,t.createVNode("li",{class:V(I,B),id:v(I,B),key:v(I,B),onClick:M=>w(M,I,B),onMouseenter:M=>s(M,I,B),onMouseover:M=>h(M,I,B),onMouseout:M=>p(M,I,B)},[f.value&&t.createVNode("div",{class:"f-list-select",onClick:M=>M.stopPropagation()},[t.createVNode(Q,{id:"list-"+v(I,B),disabled:I[c.value]||I.unClick,checked:I.checked,onChange:M=>k(I,B)},null)]),t.createVNode("div",{class:"f-list-content"},[t.createVNode("div",{style:g.value},[I[d.value]])])])}return{renderItem:S}}function Te(e,n,a,l,o,r,i,u){const y=t.ref(e.multiSelect),d=t.ref(e.disableField),{onMouseenterItem:f,onMouseoverItem:c,onMouseoutItem:s}=o,{getKey:h,listViewItemClass:p,onCheckItem:v,onClickItem:V}=r;function k(g,S,I){return n.slots.content?t.createVNode(t.Fragment,null,[n.slots.content&&n.slots.content({item:g,index:S,selectedItem:I})]):t.createVNode("div",{style:"margin: 10px 0;"},[g.name])}function w(g,S,I){return t.createVNode("li",{class:p(g,S),id:h(g,S),key:h(g,S),onClick:B=>V(B,g,S),onMouseenter:B=>f(B,g,S),onMouseover:B=>c(B,g,S),onMouseout:B=>s(B,g,S)},[y.value&&t.createVNode("div",{class:"f-list-select",onClick:B=>B.stopPropagation()},[t.createVNode(Q,{id:"list-"+h(g,S),disabled:g[d.value]||g.unClick,checked:g.checked,onChange:B=>v(g,S)},null)]),t.createVNode("div",{class:"f-list-content"},[k(g,S,I)])])}return{renderItem:w}}function Ie(e,n,a,l,o,r,i,u){const y=t.ref(e.multiSelect),d=t.ref(e.disableField),{onMouseenterItem:f,onMouseoverItem:c,onMouseoutItem:s}=o,{getKey:h,listViewItemClass:p,onCheckItem:v,onClickItem:V}=r,{dragstart:k,dragenter:w,dragover:g,dragend:S}=l,{removeItem:I}=u,B=t.computed(()=>({margin:y.value?"10px 0":"10px 0px 10px 14px"}));function j(P){return t.createVNode("div",{style:B.value},[P.name])}function M(){return n.slots.itemContent?n.slots.itemContent:j}const b=M();function O(P,L,W){return t.createVNode("li",{class:p(P,L),id:h(P,L),key:h(P,L),onClick:F=>V(F,P,L),onMouseenter:F=>f(F,P,L),onMouseover:F=>c(F,P,L),onMouseout:F=>s(F,P,L),draggable:"true",onDragstart:F=>k(F,P,L),onDragenter:F=>w(F,L),onDragend:F=>S(F,P),onDragover:F=>g(F,L)},[y.value&&t.createVNode("div",{class:"f-list-select",onClick:F=>F.stopPropagation()},[t.createVNode(Q,{id:"list-"+h(P,L),disabled:P[d.value]||P.unClick,checked:P.checked,onChange:F=>v(P,L)},null)]),t.createVNode("div",{class:"f-list-content"},[b(P)]),t.createVNode("div",{class:"f-list-remove",onClick:F=>I(L)},[t.createVNode("div",{class:"f-list-remove-icon"},[t.createVNode("i",{class:"f-icon f-icon-remove_face"},null)])]),t.createVNode("div",{class:"f-list-handle"},[t.createVNode("div",null,[t.createVNode("i",{class:"f-icon f-icon-drag-vertical"},null)])])])}return{renderItem:O}}function Be(e,n,a){function l(){return n.slots.header&&t.createVNode("div",{class:"f-list-view-header"},[n.slots.header()])}return{renderHeader:l}}function ce(e,n,a){const l=t.ref(e.headerClass),o=t.ref(e.placeholder),r=t.ref(""),i=t.computed(()=>!r.value),u=t.computed(()=>!!r.value);function y(s){r.value=""}t.watch(r,s=>{a.search(s)});const d=t.computed(()=>{const s={"form-group":!0,"farris-form-group":!0};return l.value&&l.value.split(" ").reduce((p,v)=>(p[v]=!0,p),s),s});function f(s){}function c(){return t.createVNode("div",{class:"f-list-view-header",onClick:t.withModifiers(f,["prevent","stop"])},[t.createVNode("div",{class:d.value},[t.createVNode("div",{class:"farris-input-wrap"},[t.createVNode("div",{class:"f-cmp-inputgroup"},[t.createVNode("div",{class:"input-group f-state-editable"},[t.withDirectives(t.createVNode("input",{class:"form-control f-utils-fill text-left","onUpdate:modelValue":s=>r.value=s,name:"input-group-value",type:"text",placeholder:o.value,autocomplete:"off"},null),[[t.vModelText,r.value]]),t.createVNode("div",{class:"input-group-append"},[u.value&&t.createVNode("span",{class:"input-group-text input-group-clear",onClick:s=>y()},[t.createVNode("i",{class:"f-icon f-icon-close-circle"},null)]),i.value&&t.createVNode("span",{class:"input-group-text"},[t.createVNode("span",{class:"f-icon f-icon-search"},null)])])])])])])])}return{renderHeader:c}}const Tt="";function ke(e,n){const a=t.ref(e.idField),l=t.ref(e.data),o=t.ref(e.data),r=t.ref(e.keepOrder);function i(){const d=l.value.map((f,c)=>typeof f!="object"?{__fv_index__:c,name:f}:(f.__fv_index__=c,f));return o.value=d,d}const u=t.ref(i());t.watch(()=>e.data,d=>{if(r.value){const f=d.reduce((p,v)=>(p.set(v.id,!0),p),new Map),c=l.value.reduce((p,v)=>(p.set(v.id,!0),p),new Map),s=u.value.filter(p=>f.has(p.id)),h=d.filter(p=>!c.has(p.id));l.value=[...s,...h]}else l.value=d;u.value=i()});function y(d){return d.map(c=>{const s=o.value.findIndex(h=>h[a.value]===c);return s>-1?o.value[s]:null}).filter(c=>c!=null)}return{dataView:u,getSelectionItems:y}}function Ve(e,n,a,l){const o=t.ref(e.idField),{dataView:r}=a,i=t.ref(-1),u=t.ref(!1),{activeIndex:y,focusedItemId:d,hoverIndex:f,resumeHover:c,suspendHover:s}=l;function h(k,w,g){k.stopPropagation(),s(),w&&setTimeout(()=>{i.value=g,u.value=!0,w.moving=!0})}function p(k,w){if(k.preventDefault(),i.value!==w){const g=r.value[i.value],S=r.value;S.splice(i.value,1),S.splice(w,0,g),i.value=w}}function v(k,w){k.preventDefault(),k.dataTransfer&&(k.dataTransfer.dropEffect="move")}function V(k,w){w&&(w.moving=!1),r.value.forEach((g,S)=>{g.__fv_index__=S}),u.value=!1,c(),f.value=w.__fv_index__,y.value=w.__fv_index__,d.value=w[o.value],n.emit("change",r.value)}return{dragstart:h,dragenter:p,dragover:v,dragend:V,isDragging:u}}function xe(e,n,a){const{dataView:l}=a;function o(r){if(r>-1&&r<l.value.length){const i=l.value.splice(r,1);n.emit("removeItem",i[0])}}return{removeItem:o}}function Ne(){const e=t.ref(-1),n=t.ref(""),a=t.ref(-1),l=t.ref(!1);function o(d,f,c){a.value=c}function r(d,f,c){l.value||(a.value=c)}function i(d,f,c){a.value=-1}function u(){l.value=!0}function y(){l.value=!1}return{activeIndex:e,focusedItemId:n,hoverIndex:a,onMouseenterItem:o,onMouseoverItem:r,onMouseoutItem:i,resumeHover:y,suspendHover:u}}const Pe=t.defineComponent({name:"FListView",props:ve,emits:["checkValuesChange","clickItem","selectionChange","removeItem","change"],setup(e,n){const a=t.ref(),l=t.ref(e.view),o=t.ref(e.header),r=t.ref(e.multiSelect),i=t.ref(e.view==="CardView"),u=t.ref(!0),y=t.ref({}),d=t.ref("暂无数据");t.ref(!0),t.ref(!1),t.ref("id");const f=ke(e),{dataView:c}=f,s=t.computed(()=>{const x={"f-list-view":!0,"f-list-view-multiple":r.value};return e.size!=="default"&&(x[`${e.size}-item`]=!0),x}),h=t.computed(()=>({"f-list-view-group":!0,"d-flex":i.value,"flex-wrap":i.value})),p=t.computed(()=>!!c.value&&c.value.length>0),v=Ne(),V=Ce(e,n,f),k=Ve(e,n,f,v),w=xe(e,n,f),g=be(e,n,k,v,V),S=we(e,a),I=t.computed(()=>c.value.length===0),B=t.computed(()=>I.value&&!n.slots.empty),j=t.computed(()=>!!n.slots.footer||u.value);function M(){return l.value==="SingleView"?ie:l.value==="DraggableView"?Ie:l.value==="ContentView"&&n.slots.content?Te:ie}const b=M(),{renderItem:O}=b(e,n,f,k,v,g,V,w);function P(){return o.value==="SearchBar"?ce:o.value==="ContentHeader"?Be:ce}const L=P(),{renderHeader:W}=L(e,n,S);function F(x){S.search(x)}n.expose({search:F});function N(x){r.value&&(x.preventDefault(),x.stopPropagation())}return()=>t.createVNode("div",{class:s.value,onClick:N},[W(),t.createVNode("div",{ref:a,class:"f-list-view-content"},[t.createVNode("ul",{class:h.value,style:"list-style: none;"},[p.value&&c.value.map((x,D)=>O(x,D,y)),B.value&&t.createVNode("div",{class:"f-list-view-emptydata"},[t.createVNode("p",{class:"f-empty-title"},[d.value])]),n.slots.empty&&n.slots.empty()])]),j.value&&t.createVNode("div",{class:"f-list-view-footer"},[n.slots.footer&&n.slots.footer()])])}}),Me=t.defineComponent({name:"FComboListContainer",props:ye,emits:["selectionChange"],setup(e,n){const a=t.ref(e.dataSource),l=t.ref([]),o=t.ref(e.separator),r=t.ref(e.width),i=t.ref(e.height),u=t.ref(e.selectedValues.split(o.value));t.watch(e.dataSource,()=>{a.value=e.dataSource});const y=t.computed(()=>e.enableSearch?"SearchBar":"ContentHeader"),d=t.computed(()=>{const c={};return r.value!==void 0&&(c.width=`${r.value}px`),i.value!==void 0&&(c.height=`${i.value}px`),c});function f(c){l.value=c.map(s=>Object.assign({},s)),u.value=c.map(s=>s[e.idField]),n.emit("selectionChange",l.value)}return()=>t.createVNode("div",{class:"f-combo-list-container",style:d.value},[t.createVNode(Pe,{size:"small",itemClass:"f-combo-list-item",header:y.value,headerClass:"f-combo-list-search-box",data:a.value,idField:e.idField,textField:e.textField,multiSelect:e.multiSelect,multiSelectMode:"OnCheckAndClick","selection-values":u.value,onSelectionChange:f},null)])}}),Fe=new Map([["appearance",oe]]),Oe={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/button-edit.schema.json",title:"button-edit",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a Input Group",type:"string"},type:{description:"The type string of Input Group component",type:"string",default:"button-edit"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disable:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeHolder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""},autoComplete:{description:"",type:"boolean",default:!1},buttonContent:{description:"",type:"string",default:""},enableClear:{description:"",type:"boolean",default:!0},inputType:{description:"",type:"string",enum:["text","tag"],default:"text"},multiSelect:{description:"",type:"boolean",default:!1},popup:{description:"",type:"object",properties:{footerButtons:{type:"array",default:[]},height:{type:"number",default:600},dataMapping:{type:"object"},contents:{type:"array",default:[]},showMaxButton:{type:"boolean",default:!0},showCloseButton:{type:"boolean",default:!0},showFooter:{type:"boolean",default:!0},title:{type:"string",default:""},width:{type:"number",default:800}}},separator:{type:"string",default:","},showButtonWhenDisabled:{description:"",type:"boolean",default:!1},wrapText:{type:"boolean",default:!1},onClear:{description:"",type:"string",default:""}},required:["id","type"]},re={id:String,buttonContent:{type:String,default:'<i class="f-icon f-icon-lookup"></i>'},buttonBehavior:{type:String,default:"Popup"},autoComplete:{type:Boolean,default:!1},customClass:{type:String,default:""},disable:{type:Boolean,default:!1},editable:{type:Boolean,default:!0},enableClear:{type:Boolean,default:!1},modelValue:{type:String,default:""},readonly:{type:Boolean,default:!1},textAlign:{type:String,default:"left"},showButtonWhenDisabled:{type:Boolean,default:!1},enableTitle:{type:Boolean,default:!1},inputType:{type:String,default:"text"},forcePlaceholder:{type:Boolean,default:!1},placeholder:{type:String,default:""},minLength:Number,maxLength:Number,tabIndex:Number,popupHost:{type:Object},popupRightBoundary:{type:Object},popupOffsetX:{type:Object},popupOnInput:{type:Boolean,default:!1},popupOnFocus:{type:Boolean,default:!1},popupMinWidth:{type:Number,default:320},wrapText:{type:Boolean,default:!1},multiSelect:{type:Boolean,default:!1},separator:{type:String,default:","}};ne(re,Oe,Fe);const Le={popupContentPosition:{type:Object,default:{left:0,top:0}},host:{type:Object}},De=t.defineComponent({name:"FOverlay",props:Le,emits:["click"],setup(e,n){const a=t.ref(e.popupContentPosition),l=t.ref(e.host);function o(u){n.emit("click"),u.preventDefault(),u.stopPropagation()}const r=t.computed(()=>{const u=l.value;if(u){const y=u.getBoundingClientRect(),{left:d,top:f,height:c}=y;return{left:d,top:f+c}}return a.value}),i=t.computed(()=>({position:"relative",left:`${r.value.left}px`,top:`${r.value.top}px`}));return()=>t.createVNode(t.Teleport,{to:"body"},{default:()=>{var u,y;return[t.createVNode("div",{class:"overlay-container",style:"pointer-events: auto;",onClick:d=>o(d)},[t.createVNode("div",{style:i.value},[(y=(u=n.slots).default)==null?void 0:y.call(u)])])]}})}});function je(e){if(e.content&&e.content.render)return e.content.render;if(e.render&&typeof e.render=="function")return e.render}function Re(e){const n=document.createElement("div");n.style.display="contents";let a;const l=e.onClickCallback||(()=>{}),o=()=>{l(),a&&a.unmount()};return a=t.createApp({setup(){t.onUnmounted(()=>{document.body.removeChild(n)});const r=je(e);return()=>t.createVNode(De,{"popup-content-position":e.popupPosition,host:e.host,onClick:o},{default:()=>[r&&r()]})}}),document.body.appendChild(n),a.mount(n),a}class Ae{static show(n){return Re(n)}}function Ee(e,n,a,l){const o=t.ref(e.buttonBehavior),r=t.ref(e.popupOnInput),i=t.computed(()=>({"input-group-append":!0,"append-force-show":e.showButtonWhenDisabled&&(e.readonly||e.disable)})),u=t.computed(()=>e.showButtonWhenDisabled||(!e.editable||!e.readonly)&&!e.disable);async function y(s){if(u.value){const h=!!n.slots.default;o.value==="Overlay"&&Ae.show({host:a.value,render:()=>{if(n.slots.default)return n.slots.default()}}),h&&o.value==="Popup"&&l.togglePopup(),h&&r.value&&l.hidePopup(),n.emit("clickButton",{origin:s,value:e.modelValue})}s.stopPropagation()}function d(s){n.emit("mouseEnterIcon",s)}function f(s){n.emit("mouseLeaveIcon",s)}function c(){n.emit("mouseOverButton")}return{buttonClass:i,onClickButton:y,onMouseEnterButton:d,onMouseLeaveButton:f,onMouseOverButton:c}}function $e(e,n,a,l,o,r){const i=t.ref(!1),u=t.computed(()=>e.enableClear&&!e.readonly&&!e.disable),{changeTextBoxValue:y}=r;function d(h){i.value=h}t.watch(o,()=>{l.value?d(!!o.value):d(!1)});function f(h){const p=!e.readonly&&!e.disable&&e.editable,v=!e.editable;h.stopPropagation(),(p||v)&&(y("",!1),d(!i.value),n.emit("clear"))}function c(h){if(u.value){if(!a.value){d(!1);return}(!e.editable||!e.readonly)&&!e.disable&&d(!0)}}function s(h){u.value&&d(!1)}return{enableClearButton:u,showClearButton:i,onClearValue:f,onMouseEnterTextBox:c,onMouseLeaveTextBox:s}}function He(e,n,a,l,o){const r=t.ref(e.popupOnInput),i=t.ref(e.popupOnFocus),{shouldPopupContent:u}=o,y=t.computed(()=>e.enableTitle?a.value:""),d=t.computed(()=>(e.disable||e.readonly)&&!e.forcePlaceholder?"":e.placeholder),f=t.computed(()=>e.readonly||!e.editable);let c=!1;const s=t.computed(()=>!e.disable&&c),h=t.computed(()=>({"text-left":e.textAlign==="left","text-center":e.textAlign==="center","text-right":e.textAlign==="right","form-control":!0,"f-utils-fill":!0})),p=t.computed(()=>({"input-group":!0,"f-state-disable":e.disable,"f-state-editable":e.editable&&!e.disable&&!e.readonly,"f-state-readonly":e.readonly&&!e.disable,"f-state-focus":s.value}));function v(b,O=!0){a.value!==b&&(a.value=b,O&&n.emit("change",b),n.emit("update:modelValue",b))}function V(b){u.value=!1,v(b,!0)}t.watch(()=>e.modelValue,b=>{a.value=b,n.emit("change",b)});function k(b){c=!1,n.emit("blur",b),b.stopPropagation()}function w(b){n.emit("click",b)}function g(b){if(e.disable){c=!0;return}c=!0,f.value||(n.emit("focus",b),i.value&&!u.value&&o.popup())}function S(b){n.emit("input",b.target.value);const O=b.target.value;l.value=O,a.value!==O&&v(O,!1),r.value&&!u.value&&o.popup()}function I(b){b.target.tagName!=="INPUT"&&b.preventDefault(),b.stopPropagation()}function B(b){n.emit("keydown",b)}function j(b){b.key==="Enter"&&(r.value||i.value)&&o.hidePopup(),n.emit("keyup",b)}function M(b){const O=b.target.value;b.stopPropagation(),v(O)}return{hasFocusedTextBox:s,isTextBoxReadonly:f,textBoxClass:h,textBoxPlaceholder:d,textBoxTitle:y,inputGroupClass:p,changeTextBoxValue:v,commitValue:V,onBlurTextBox:k,onClickTextBox:w,onFocusTextBox:g,onInput:S,onKeyDownTextBox:B,onKeyUpTextBox:j,onMouseDownTextBox:I,onTextBoxValueChange:M}}function We(e,n,a){const l=t.ref(),o=t.ref(!1);function r(){const d=l.value;d&&d.show(a.value)}async function i(){!!n.slots.default&&(o.value=!o.value,await t.nextTick(),r())}async function u(){!!n.slots.default&&(o.value=!0,await t.nextTick(),r())}function y(){o.value=!1}return{hidePopup:y,popup:u,shouldPopupContent:o,togglePopup:i,popoverRef:l}}function _e(e,n,a){const{isTextBoxReadonly:l,textBoxClass:o,textBoxPlaceholder:r,textBoxTitle:i,onBlurTextBox:u,onClickTextBox:y,onFocusTextBox:d,onInput:f,onKeyDownTextBox:c,onKeyUpTextBox:s,onMouseDownTextBox:h,onTextBoxValueChange:p}=a;return()=>t.createVNode("input",{name:"input-group-value",autocomplete:e.autoComplete?"on":"off",class:o.value,disabled:e.disable,maxlength:e.maxLength,minlength:e.minLength,placeholder:r.value,readonly:l.value,tabindex:e.tabIndex,title:i.value,type:e.inputType,value:n.value,onBlur:u,onChange:p,onClick:y,onFocus:d,onInput:f,onKeydown:c,onKeyup:s,onMousedown:h},null)}const ze={activeTag:{Type:String,default:""},addButtonText:{Type:String,default:""},customClass:{Type:String,default:""},customStyle:{Type:String,default:""},data:{type:Array,default:[]},enableAddButton:{Type:Boolean,default:!1},placeholder:{Type:String,default:""},selectable:{Type:Boolean,default:!1},showAddButton:{Type:Boolean,default:!1},showClose:{Type:Boolean,default:!1},showColor:{Type:Boolean,default:!1},showInput:{Type:Boolean,default:!1},tagType:{Type:String,default:""},tagStyle:{Type:String,default:""},wrapText:{Type:Boolean,default:!1},draggable:{Type:Boolean,default:!1}},Mt="";function qe(e,n,a,l){const o=t.ref(-1),r=t.ref(!1);function i(f,c,s){f.stopPropagation(),c&&setTimeout(()=>{o.value=s,r.value=!0,c.moving=!0})}function u(f,c){if(f.preventDefault(),o.value!==c){const s=l.value[o.value],h=l.value;h.splice(o.value,1),h.splice(c,0,s),o.value=c}}function y(f,c){f.preventDefault(),f.dataTransfer&&(f.dataTransfer.dropEffect="move")}function d(f,c){c&&(c.moving=!1),a.value=l.value.filter(s=>s.type==="Tag").map(s=>s.payload),r.value=!1,n.emit("change",a.value)}return{dragstart:i,dragenter:u,dragover:y,dragend:d,isDragging:r}}const Xe=t.defineComponent({name:"FTags",props:ze,emits:["remove","selectionChange","change"],setup(e,n){const a=t.ref(e.selectable),l=t.ref(e.customClass),o=t.ref(e.data),r=t.ref(e.tagType),i=t.ref(e.tagStyle),u=t.ref(e.showColor),y=t.ref(e.activeTag),d=t.ref(e.customStyle),f=t.ref(e.showClose),c=t.ref(e.showAddButton),s=t.ref(e.showInput),h=t.ref(e.addButtonText),p=t.ref(e.enableAddButton);t.ref(e.placeholder),t.ref(""),t.ref();const v=t.ref(),V=t.ref(e.wrapText),k=t.ref();function w(){const m=o.value.map(C=>({type:"Tag",payload:C}));return c.value&&m.push({type:"AddButton"}),m}const g=t.ref(w());function S(m){o.value=m,g.value=w()}const I=t.computed(()=>g.value.findIndex(m=>m.type==="Input")),B=qe(e,n,o,g),{dragstart:j,dragenter:M,dragover:b,dragend:O}=B;t.watch(()=>e.data,m=>S(m));const P=t.computed(()=>{const m={"farris-tags":!0,"farris-tags-checkable":a.value,"farris-tags-nowrap":!V.value};return l.value.split(" ").reduce((C,T)=>(C[T]=!0,C),m),m});function L(m){const C={"farris-tag-item":!0,"farris-tag-item-checked":a.value&&m.checked,"farris-tag-item-checkable":a.value,"farris-tag-item-has-color":u.value,"farris-tag-item-actived":y.value===m.name};if(r.value){const T=`farris-tag-item-${r.value}`;C[T]=!0}return C}const W=t.computed(()=>{const m={};return d.value&&d.value.split(";").reduce((C,T)=>{const R=T.split(":");return C[R[0]]=R[1],C},m),m});function F(m,C){a.value&&C.selectable&&(C.checked=!C.checked,y.value=C.checked?C.name:"",C.checked&&o.value.filter(T=>T.name!==C.name).forEach(T=>{T.checked=!C.checked}),n.emit("change",o.value),n.emit("selectionChange",C))}function N(m,C){let T;switch(m.key){case"Backspace":o.value=o.value.filter(R=>R.name!==C.name),n.emit("change",o.value);break;case"ArrowLeft":T=Math.max(v.value.scrollLeft+20,0),v.value.scrollLeft=T;break;case"ArrowRight":T=Math.max(v.value.scrollLeft-20,0),v.value.scrollLeft=T}}function x(m,C){const T=o.value.findIndex(R=>R.name===C.name);if(T>-1){const[R]=o.value.splice(T,1);g.value=w(),n.emit("change",o.value),n.emit("remove",o.value,R,T)}m.stopPropagation()}const D=t.computed(()=>({"farris-tag-item":!0,"farris-tag-add-button":!0,"farris-tag-add-button-disabled":!p.value}));function $(m){}function E(){return t.createVNode("li",{class:D.value,onClick:m=>void 0},[t.createVNode("span",{class:"f-icon f-icon-amplification"},null),t.createVNode("span",{class:"farris-tag-add-text"},[h.value])])}function H(m){if(m&&!m.innerText){const C=I.value;if(C>0){const[T]=o.value.splice(C-1,1);g.value.splice(C-1,1),n.emit("remove",o.value,T,C-1)}}}function q(m,C,T){m>-1&&(o.value.splice(m,0,{name:C,value:T,selectable:a.value}),g.value=w(),n.emit("change",o.value))}function U(m){if(m&&m.innerText){const C=m.innerText,T=I.value;q(T,C,C),m.innerText=""}}function Y(m){const C=m.target;C&&(C.innerText?U(C):n.emit("change",o.value))}function it(m){m.key==="Enter"&&U(m.target),m.key==="Backspace"&&(H(m.target),t.nextTick(()=>{k.value&&k.value.focus()}))}function ct(){return t.createVNode("li",{class:"farris-tag-input-box"},[t.createVNode("div",{ref:k,class:"form-control",contenteditable:"true",onKeyup:it,onBlur:Y},null)])}function rt(m,C){return t.createVNode("li",{class:L(m),style:W.value,tabindex:0,id:m.name,key:m.name,onClick:T=>F(T,m),onKeydown:T=>N(T,m),draggable:"true",onDragstart:T=>j(T,m,C),onDragenter:T=>M(T,C),onDragend:T=>O(T,m),onDragover:T=>b(T,C)},[t.createVNode("div",{title:m.name,class:"tag-box"},[m.name]),f.value&&t.createVNode("span",{class:"tag-delete"},[t.createVNode("i",{class:"f-icon f-icon-close",onClick:T=>x(T,m)},null)])])}function st(){return g.value.map((m,C)=>{switch(m.type){case"Tag":return rt(m.payload,C);case"AddButton":return E();case"Input":return ct()}})}const ut=t.computed(()=>({"farris-tags-item-container":!0,"farris-tag-item-capsule":i.value==="capsule"}));function dt(m){const C=Math.max(v.value.scrollLeft-m.deltaX,0);v.value.scrollLeft=C}function ft(m){const C=v.value,T=o.value.length-1;if(C){const R=Array.from(C.children).filter(_=>_.className.indexOf("farris-tag-item")>-1).findIndex(_=>{const z=_.getBoundingClientRect(),Z=window.getComputedStyle(_),ue=parseInt(Z["margin-left"],10)+z.width+parseInt(Z["margin-right"],10);return z.left+ue>m});if(R>-1)return R}return T}function pt(m){if(s.value){const T=ft(m.clientX)+1,_=g.value.filter(z=>z.type!=="Input");_.splice(T,0,{type:"Input"}),g.value=_,t.nextTick(()=>{k.value&&k.value.focus()})}}function mt(m){var T;m.preventDefault(),m.stopPropagation();const C=(T=m.dataTransfer)==null?void 0:T.getData("Text");if(C){const R=C.split(":"),_=R[0],z=R[1];[...o.value].findIndex(ee=>(console.log(`${ee.value} === ${z} is ${ee.value===z}`),ee.value===z))>-1||q(o.value.length,_,z)}}function ht(m){m.preventDefault()}return()=>t.createVNode("div",{class:P.value,onClick:pt,onDrop:mt,onDragover:ht},[t.createVNode("ul",{ref:v,class:ut.value,onWheel:m=>dt(m)},[st()])])}});function Ge(e,n,a){const l=t.ref(e.separator),{changeTextBoxValue:o}=a,r=t.computed(()=>n.value?n.value.split(l.value).map(u=>({name:u,selectable:!0})):[]);function i(u){o(u.map(y=>y.name).join(l.value),!0)}return()=>t.createVNode(Xe,{class:"form-control",data:r.value,showClose:!0,showInput:!0,onChange:i},null)}function Ue(e,n,a){const{buttonClass:l,onClickButton:o,onMouseEnterButton:r,onMouseLeaveButton:i}=n,{enableClearButton:u,showClearButton:y,onClearValue:d}=a;return()=>t.createVNode("div",{class:l.value},[u.value&&t.withDirectives(t.createVNode("span",{class:"input-group-text input-group-clear",onClick:d},[t.createVNode("i",{class:"f-icon modal_close"},null)]),[[t.vShow,y.value]]),e.buttonContent&&t.createVNode("span",{class:"input-group-text input-group-append-button",innerHTML:e.buttonContent,onClick:o,onMouseenter:r,onMouseleave:i},null)])}const Ke={title:{type:String},placement:{type:String,default:"bottom"},reference:{type:Object},host:{type:Object},leftBoundary:{type:Object},rightBoundary:{type:Object},visible:{type:Boolean,default:!1},class:{type:String},offsetX:{type:Object,default:t.ref(0)},zIndex:{type:Number,default:-1},keepWidthWithReference:{type:Boolean,default:!1},fitContent:{type:Boolean,default:!1},minWidth:{type:Number,default:-1}},Ft="";function Je(e){const n=e.host?e.host:"body",a=t.computed(()=>n==="body"?0:n?n.getBoundingClientRect().top:0),l=t.computed(()=>n==="body"?0:n?n.getBoundingClientRect().left:0),o=t.computed(()=>n==="body"?document.body.getBoundingClientRect().width:n?n.getBoundingClientRect().width-(e.rightBoundary?e.rightBoundary.getBoundingClientRect().width:0):document.body.getBoundingClientRect().width);return{host:n,hostLeft:l,hostTop:a,hostWidth:o}}function Qe(e,n,a,l){var F;const o=t.ref(0),r=t.ref(((F=e.offsetX)==null?void 0:F.value)||0),i=t.ref(-1),u=t.ref(-1),y=t.ref(-1),d=t.ref(e.placement),f=t.ref(0),c=t.ref(0),s=t.ref(0),h=t.ref(document.documentElement.scrollLeft),p=t.ref(document.documentElement.scrollTop),{hostLeft:v,hostTop:V,hostWidth:k}=l;t.watch(e.offsetX,N=>{o.value=N-r.value});const w=t.computed(()=>{const N={left:`${c.value}px`,top:`${s.value}px`,transform:`translateX(${o.value}px)`};return e.zIndex!==-1&&(N["z-index"]=e.zIndex),i.value!==-1&&(N.width=`${i.value}px`),N}),g=t.computed(()=>({left:`${f.value}px`}));function S(N){if(N&&e.keepWidthWithReference){const x=N.getBoundingClientRect();i.value=Math.max(e.minWidth,x.width)}}function I(N,x){const D=k.value-N.width-4;return D>0?D:x}function B(N,x,D){const $=f.value,E=x.left-v.value+x.width/2+h.value,H=x.top-V.value-(N.height+D.height)+p.value;return{popoverLeft:E,popoverTop:H,arrowLeft:$}}function j(N,x,D){return x.top-V.value+(x.height+D.height)+p.value}function M(N,x){const D=I(x,N),$=N<=D?f.value:N-D;return{popoverLeft:Math.min(N,D),arrowLeft:$}}function b(N,x,D){const $=x.left-v.value+x.width/2-(D.width/2-(N.left-v.value))+h.value,{arrowLeft:E,popoverLeft:H}=M($,N),q=j(N,x,D);return{popoverLeft:H,popoverTop:q,arrowLeft:E}}function O(N,x,D){const $=x.left-v.value+h.value,{arrowLeft:E,popoverLeft:H}=M($,N),q=j(N,x,D);return{popoverLeft:H,popoverTop:q,arrowLeft:E}}const P=new Map([["top",B],["bottom",b],["bottom-left",O]]);function L(N){var H;const x=N.getBoundingClientRect();u.value=x.top,y.value=x.left;const D=n.value.getBoundingClientRect(),$=(H=a.value)==null?void 0:H.getBoundingClientRect(),E=P.get(d.value);if(E){const{arrowLeft:q,popoverLeft:U,popoverTop:Y}=E($,x,D);f.value=q,c.value=U,s.value=Y}e.keepWidthWithReference&&S(N)}function W(N){if(N){const x=N.getBoundingClientRect();(x.left!==y.value||x.top!==u.value)&&L(N)}}return{arrowStyle:g,popoverStyle:w,position:d,popoverWidth:i,fitToReference:S,followToReferencePosition:W,locateToReference:L}}function Ye(e,n,a,l,o,r,i){const u=t.ref(e.visible),y=t.computed(()=>u.value),{fitToReference:d,locateToReference:f}=i;let c;function s(){u.value=!1,document.body.removeEventListener("click",c),n.emit("hidden")}c=p=>{if(!o.value.contains(p.target)){const v=o.value.closest(".popover");v&&v.removeEventListener("click",c),s()}};async function h(p){if(l.value&&a.value&&p){u.value=!0,o.value=p,await t.nextTick(),f(p),r.value&&d(p),document.body.addEventListener("click",c);const v=p.closest(".popover");v&&v.addEventListener("click",c),n.emit("shown")}}return n.expose({hide:s,show:h,shown:y}),{showPopover:u,hidePopverOnClickBodyHandler:c}}function Ze(e,n,a,l,o){const{popoverWidth:r,fitToReference:i,followToReferencePosition:u}=o;function y(){if(a.value){u(a.value);const d=a.value.getBoundingClientRect();l.value&&d.width!==r.value&&i(a.value)}}return{onResize:y}}const et=t.defineComponent({name:"FPopover",props:Ke,emits:["shown","hidden"],setup(e,n){const a=t.ref(),l=t.ref(),o=t.ref(e.reference),r=t.ref(e.keepWidthWithReference),i=t.computed(()=>!!e.title),u=Je(e),{host:y}=u,d=Qe(e,a,l,u),{position:f,arrowStyle:c,popoverStyle:s,fitToReference:h,locateToReference:p}=d,{showPopover:v,hidePopverOnClickBodyHandler:V}=Ye(e,n,a,l,o,r,d),{onResize:k}=Ze(e,n,o,r,d),w=t.computed(()=>{const S=`popover in popover-${f.value}`,I=`bs-popover-${f.value}`,B={"popover-fitcontent":e.fitContent};return B[S]=!0,B[I]=!0,(e.class||"").split(" ").reduce((M,b)=>(M[b]=!0,M),B),B}),g=t.computed(()=>({"popover-content":!0,"popover-body":!0}));return t.onMounted(()=>{e.reference&&p(o.value),r.value&&h(o.value),window.addEventListener("resize",k)}),t.onUnmounted(()=>{document.body.removeEventListener("click",V),window.removeEventListener("resize",k)}),()=>t.createVNode(t.Teleport,{to:y},{default:()=>{var S;return[t.withDirectives(t.createVNode("div",{ref:l,class:w.value,style:s.value,onClick:I=>{I.stopPropagation()}},[t.createVNode("div",{ref:a,class:"popover-arrow arrow",style:c.value},null),i.value&&t.createVNode("h3",{class:"popover-title popover-header"},[e.title]),t.createVNode("div",{class:g.value},[n.slots.default&&((S=n.slots)==null?void 0:S.default())])]),[[t.vShow,v.value]])]}})}});function tt(e,n,a){const l=t.ref(e.popupMinWidth),{hidePopup:o,popoverRef:r}=a;return()=>t.createVNode(et,{ref:r,visible:!0,placement:"bottom-left",host:e.popupHost,"keep-width-with-reference":!0,fitContent:!0,"right-boundary":e.popupRightBoundary,minWidth:l.value,offsetX:e.popupOffsetX,onHidden:o},{default:()=>{var i,u;return[(u=(i=n.slots).default)==null?void 0:u.call(i)]}})}const Ot="",se=t.defineComponent({name:"FButtonEdit",props:re,emits:["updateExtendInfo","clear","change","click","clickButton","blur","focus","mouseEnterIcon","mouseLeaveIcon","keyup","keydown","inputClick","input","update:modelValue"],setup(e,n){const a=t.ref(),l=t.ref(e.customClass),o=t.ref(e.modelValue),r=We(e,n,a),{shouldPopupContent:i,hidePopup:u}=r,y=Ee(e,n,a,r),d=t.ref(""),f=He(e,n,o,d,r),{hasFocusedTextBox:c,commitValue:s,inputGroupClass:h}=f,p=$e(e,n,o,c,d,f),{onMouseEnterTextBox:v,onMouseLeaveTextBox:V}=p,k=t.computed(()=>{const j={"f-button-edit":!0,"f-cmp-inputgroup":!0,"f-button-edit-nowrap":!e.wrapText};return l.value&&l.value.split(" ").reduce((M,b)=>(M[b]=!0,M),j),j});function w(){return e.multiSelect&&e.inputType==="tag"?Ge(e,o,f):_e(e,o,f)}let g=w();t.watch([()=>e.multiSelect,()=>e.inputType],()=>{g=w()});const S=Ue(e,y,p),I=tt(e,n,r),B={commitValue:s,elementRef:a,hidePopup:u};return t.onMounted(()=>{a.value.componentInstance=B}),n.expose(B),()=>t.createVNode(t.Fragment,null,[t.createVNode("div",t.mergeProps(n.attrs,{ref:a,class:k.value,id:e.id}),[t.createVNode("div",{class:h.value,onMouseenter:v,onMouseleave:V},[g(),S()])]),i.value&&I()])}}),Lt="";function nt(e){const n=t.ref(""),a=t.ref(e.modelValue),l=t.ref(e.data||[]),o=t.ref(e.editable);function r(c){const s=c.split(e.separator).map(p=>[p,!0]),h=new Map(s);return l.value.filter(p=>h.has(p[e.valueField]))}function i(c){const s=r(c).map(h=>h[e.textField]).join(e.separator);n.value=o.value?s||c:s}function u(c){const s=c.split(e.separator).map(p=>[p,!0]),h=new Map(s);return l.value.filter(p=>h.has(p[e.textField]))}function y(c){const s={};return s[e.idField]=c,s[e.textField]=c,[s]}function d(c){let s=u(c);const h=s&&s.length>0;return o.value&&!h&&(s=y(c)),s}function f(){const{url:c,method:s="GET",headers:h={},body:p=null}=e.remote;fetch(c,{method:s,headers:h,body:p}).then(V=>{if(V.status===200)return V.json();throw new Error(V.statusText)}).then(V=>{l.value=V}).catch(V=>{console.error(V)})}return e.remote&&f(),t.watch(()=>e.data,()=>{l.value=e.data}),t.watch([l],([c])=>{if(e.modelValue){const s=c.find(h=>h[e.valueField]===e.modelValue);s&&(n.value=s[e.textField])}}),t.watch(()=>e.modelValue,c=>{a.value=c,i(c)}),i(e.modelValue),{dataSource:l,displayText:n,editable:o,modelValue:a,getItemsByDisplayText:u,getItemsByValue:r,getSelectedItemsByDisplayText:d}}const G=t.defineComponent({name:"FComboList",props:X,emits:["clear","update:modelValue","change"],setup(e,n){const a=t.ref(),l=t.ref(e.disabled),o=t.ref(e.enableClear),r=t.ref(e.enableSearch),i=t.ref(e.readonly),{dataSource:u,displayText:y,editable:d,modelValue:f,getSelectedItemsByDisplayText:c}=nt(e),s=t.computed(()=>e.multiSelect);function h(){!s.value&&a.value&&a.value.hidePopup()}function p(w){y.value=w.map(g=>g[e.textField]).join(e.separator),f.value=w.map(g=>g[e.valueField]).join(e.separator),n.emit("update:modelValue",f.value),n.emit("change",w),h()}function v(w){f.value="",n.emit("update:modelValue",""),n.emit("clear")}function V(w){const g=c(w);p(g)}function k(){return y.value}return n.expose({getDisplayText:k}),t.watch([()=>e.disabled,()=>e.editable,()=>e.enableClear,()=>e.enableSearch,()=>e.readonly],([w,g,S,I,B])=>{l.value=w,d.value=g,o.value=S,r.value=I,i.value=B}),()=>t.createVNode(se,{ref:a,id:e.id,disable:l.value,readonly:i.value,forcePlaceholder:e.forcePlaceholder,editable:d.value,buttonContent:e.dropDownIcon,placeholder:e.placeholder,enableClear:o.value,maxLength:e.maxLength,tabIndex:e.tabIndex,enableTitle:e.enableTitle,multiSelect:e.multiSelect,inputType:e.multiSelect?"tag":"text",modelValue:y.value,"onUpdate:modelValue":w=>y.value=w,onClear:v,onChange:V},{default:()=>[t.createVNode(Me,{idField:e.idField,valueField:e.valueField,textField:e.textField,dataSource:u.value,selectedValues:f.value,multiSelect:e.multiSelect,enableSearch:r.value,height:e.maxHeight,onSelectionChange:p},null)]})}});function ot(e,n,a){var w;const l=a==null?void 0:a.checkIsInFixedContextRules(),o=a&&a.getStyles&&a.getStyles()||"";function r(){return!(n.schema.componentType||l)}function i(){return!1}function u(){return!(n.schema.componentType||l)}function y(){return!!l}function d(g){if(!g)return null;if(g.schema.type==="Component")return g;const S=d(g.parent);return S||null}function f(g,S,I){return!!a&&a.canAccepts()}function c(){return n.schema.label||n.schema.title||n.schema.name}function s(){}function h(g,S){S&&(a==null||a.onAcceptMovedChildElement(S))}function p(g,S){const I=String(g.getAttribute("data-controltype"));return de(I)}function v(g){return g.contents?g.contents.length:-1}function V(g){}const k={canMove:r(),canSelectParent:i(),canDelete:u(),canNested:!y(),contents:n.schema.contents,elementRef:e,parent:(w=n.parent)==null?void 0:w.componentInstance.value,schema:n.schema,styles:o,canAccepts:f,getBelongedComponentInstance:d,getDraggingDisplayText:c,getDragScopeElement:s,onAcceptMovedChildElement:h,onAcceptNewChildElement:p,onAddNewChildElement:v,onChildElementMovedOut:V,triggerBelongedComponentToMoveWhenMoved:!!a&&a.triggerBelongedComponentToMoveWhenMoved};return t.ref(k)}const at=t.defineComponent({name:"FComboListDesign",props:X,emits:["clear","update:modelValue","change"],setup(e,n){const a=t.ref(),l=t.inject("design-item-context"),o=ot(a,l);return t.onMounted(()=>{a.value.componentInstance=o}),n.expose(o.value),()=>t.createVNode(se,{ref:a,id:e.id,disable:e.disabled,readonly:e.readonly,forcePlaceholder:e.forcePlaceholder,editable:e.editable,buttonContent:e.dropDownIcon,placeholder:e.placeholder,enableClear:e.enableClear,maxLength:e.maxLength,tabIndex:e.tabIndex,enableTitle:e.enableTitle,multiSelect:e.multiSelect,inputType:e.multiSelect?"tag":"text"},null)}}),lt={install(e){e.component(G.name,G)},register(e,n){e["combo-list"]=G,n["combo-list"]=J},registerDesigner(e,n){e["combo-list"]=at,n["combo-list"]=J}};A.FComboList=G,A.Placement=le,A.ViewType=ae,A.comboListProps=X,A.default=lt,A.propsResolver=J,Object.defineProperties(A,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "combo-list",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "main": "index.umd.js",
5
5
  "module": "index.esm.js",
6
6
  "style": "style.css",
@@ -1 +1 @@
1
- .f-listview-fill{flex-grow:1;flex-shrink:1;flex-basis:0;overflow:hidden}.f-listview-fill .f-list-view{height:100%}.f-listview-fill .f-list-view .f-list-view-header,.f-listview-fill .f-list-view .f-list-view-footer{flex-shrink:0}.f-listview-fill .f-list-view .f-list-view-content{overflow-y:auto;flex-grow:1;flex-shrink:1;flex-basis:0}.f-list-view{display:flex;flex-direction:column;overflow:hidden}.f-list-view .f-list-view-content{flex:1;overflow:auto}.f-list-view .f-list-view-group{padding:0}.f-list-view .f-paging-wrapper{padding:14px 0}.f-list-view-group-item{display:flex;align-items:center;float:none;text-align:initial}.f-list-view-group-item.f-none-border{border-bottom:0}.f-list-view-group-item.f-listview-hover,.f-list-view-group-item.f-listview-active{cursor:pointer;color:#424347;background:#edf5ff!important}.f-list-view-group-item.f-listview-active{border-color:#529dff}.f-list-view-group-item.f-un-select{color:#848c9a}.f-list-view-group-item .f-list-content{flex:1 1 auto;width:100%}.f-list-view-draggable-item{border:1px solid;border-color:#e2e3e5;background-color:#fafbfd;border-radius:10px;margin:4px 2px}.f-list-view-draggable-item.f-listview-hover{cursor:pointer;color:#424347;background:#edf5ff!important}.f-list-view-draggable-item.f-listview-hover .f-list-remove-icon{display:initial}.f-list-view-draggable-item.f-listview-active{border-color:#529dff}.f-list-view-draggable-item.moving{opacity:0}.f-list-select{padding:0 0 0 14px}.f-list-select .listview-checkbox{margin:.25rem 0}.f-list-pin{color:#2986ff;padding:0 14px 0 0}.f-list-remove{width:30px;color:#f4625f;padding:0 14px 0 0}.f-list-remove-icon{display:none}.f-list-handle{padding:0 14px 0 0}.f-list-view-emptydata .f-empty-title{font-size:14px;line-height:22px;color:#999;padding:20px 0;text-align:center}.f-list-view.small-item .f-list-select{padding:initial}::highlight(search-result){background-color:#f06;color:#fff}.farris-tags .farris-tags-item-container{margin:0;padding:0}.farris-tags .farris-tags-item-container .farris-tag-item{display:inline-flex!important;padding:0 8px;margin:3px 6px 3px 0;line-height:24px;font-size:13px;color:#2d314e;background:#f6faff;border:1px solid #e6e6e6!important;white-space:nowrap;border-radius:3px;cursor:default;opacity:1;transition:all .3s cubic-bezier(.78,.14,.15,.86);max-width:9rem}.farris-tags .farris-tags-item-container .farris-tag-item a,.farris-tags .farris-tags-item-container .farris-tag-item a:hover{color:#000000d9}.farris-tags .farris-tags-item-container .farris-tag-item>a:first-child:last-child{display:inline-flex;margin:0 -8px;padding:0 8px}.farris-tags .farris-tags-item-container .farris-tag-item .tag-box{text-overflow:ellipsis;overflow:hidden;word-break:break-all;white-space:nowrap;display:inline-flex;max-width:7rem;vertical-align:middle}.farris-tags .farris-tags-item-container .farris-tag-item .tag-delete{display:inline-block;margin-left:6px;color:#0003;cursor:pointer;transition:all .3s cubic-bezier(.78,.14,.15,.86)}.farris-tags .farris-tags-item-container .farris-tag-item .tag-delete:hover{color:#000000d9}.farris-tags .farris-tags-item-container .farris-tag-item>.f-icon{font-size:12px}.farris-tags .farris-tags-item-container .farris-tag-item>.f-icon+span,.farris-tags .farris-tags-item-container .farris-tag-item>span+.f-icon{margin-left:7px}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-success{color:#52c41a;background:#f6ffed;border-color:#b7eb8f}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-info{color:#1890ff;background:#e6f7ff;border-color:#91d5ff}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-error{color:#f5222d;background:#fff1f0;border-color:#ffa39e}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-warning{color:#fa8c16;background:#fff7e6;border-color:#ffd591}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-default{color:#2d314e;background:#f6faff;border:1px solid #e6e6e6}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-checkable:not(.farris-tag-item-checked){cursor:pointer}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-checkable:not(.farris-tag-item-checked):active{color:#59a1ff}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-checkable:not(.farris-tag-item-checked):hover{color:#59a1ff}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-checkdisabled{background-color:transparent;border-color:transparent;cursor:not-allowed;color:#00000073}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-checked{background-color:#fff;border-color:#2a87ff;color:#2a87ff}.farris-tags .farris-tags-item-container .farris-tag-item:last-child{margin-right:0}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-actived,.farris-tags .farris-tags-item-container .farris-tag-item:active{background-color:#2a87ff;color:#fff}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-actived .tag-delete,.farris-tags .farris-tags-item-container .farris-tag-item:active .tag-delete{color:#fff}.farris-tags .farris-tags-item-container .farris-tag-add-button{cursor:pointer;background:#f9f9f9;border:1px dashed #babdc9}.farris-tags .farris-tags-item-container .farris-tag-add-button .farris-tag-add-text{color:#00000073;line-height:24px}.farris-tags .farris-tags-item-container .farris-tag-add-button .f-icon{color:#0003;line-height:24px}.farris-tags .farris-tags-item-container .farris-tag-add-button:hover{background-color:#f9f9f9;border-color:#59a1ff}.farris-tags .farris-tags-item-container .farris-tag-add-button:hover .farris-tag-add-text,.farris-tags .farris-tags-item-container .farris-tag-add-button:hover .f-icon{color:#59a1ff}.farris-tags .farris-tags-item-container .farris-tag-add-button.farris-tag-add-button-disabled{background-color:#f7f7f7;border-color:#dcdcdc;border-style:solid;cursor:not-allowed}.farris-tags .farris-tags-item-container .farris-tag-add-button.farris-tag-add-button-disabled .farris-tag-add-text{color:#00000040}.farris-tags .farris-tags-item-container .farris-tag-add-button.farris-tag-add-button-disabled:hover{background-color:#f7f7f7;border-color:#dcdcdc}.farris-tags .farris-tags-item-container .farris-tag-add-button.farris-tag-add-button-disabled:hover .farris-tag-add-text,.farris-tags .farris-tags-item-container .farris-tag-add-button.farris-tag-add-button-disabled:hover .f-icon{color:#00000040}.farris-tags .farris-tags-item-container .farris-tag-input-box{display:inline-flex!important;padding:0;margin:2px 3px 2px -3px;line-height:22px;font-size:13px}.farris-tags .farris-tags-item-container .farris-tag-input-box .form-control{padding:2px 0;min-width:2px;border:none;background:none;line-height:inherit;text-wrap:nowrap;width:100%!important;height:22px!important}.farris-tags .farris-tags-item-container .farris-tag-input-box .form-control:focus{box-shadow:none}.farris-tags .farris-tags-item-container .farris-tag-input-box .form-control:focus-visible{outline:none}.farris-tags .farris-tags-item-container.farris-tag-item-capsule .farris-tag-item{border-radius:24px}.farris-tags .farris-tags-item-container.farris-tag-item-capsule .farris-tag-item.farris-tag-item-checkable:not(.farris-tag-item-checked){background:#ffffff;border:1px solid #e6e6e6;cursor:pointer}.farris-tags .farris-tags-item-container.farris-tag-item-capsule .farris-tag-item.farris-tag-item-checkable:not(.farris-tag-item-checked):active{color:#59a1ff}.farris-tags .farris-tags-item-container.farris-tag-item-capsule .farris-tag-item.farris-tag-item-checkable:not(.farris-tag-item-checked):hover{color:#59a1ff}.farris-tags .farris-tags-item-container.farris-tag-item-capsule .farris-tag-item.farris-tag-item-checked{background-color:#2a87ff0f;border-color:#2a87ff29;color:#2a87ff}.farris-tags.farris-tags-checkable .farris-tag-item{line-height:22px}.farris-tags.farris-tags-nowrap{overflow:hidden}.farris-tags.farris-tags-nowrap .farris-tags-item-container{display:flex;flex-wrap:nowrap;overflow:hidden}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-warning{color:#f5a144;border-color:#fad0a1;background:#fef5ec}.bs3.popover-top{margin-bottom:10px}.bs3.popover.top>.arrow{margin-left:-2px}.bs3.popover.top{margin-bottom:10px}.popover.bottom>.arrow{margin-left:-4px}.bs3.bs-popover-left{margin-right:.5rem}.bs3.bs-popover-right .arrow,.bs3.bs-popover-left .arrow{margin:.3rem 0}.arrow-left .arrow{left:calc(50% - 10px)}.bs-popover-bottom-left .arrow{top:calc((.5rem + 1px)*-1)}.bs-popover-bottom-left .arrow:before{top:0;border-bottom-color:#fff6!important}.bs-popover-bottom-left .arrow:before,.bs-popover-bottom-left .arrow:after{border-width:0 .5rem .5rem}.bs-popover-bottom-left .arrow:after{top:1px;border-bottom-color:#fff!important}.popover.popover-fitcontent .popover-body{max-width:initial;padding:initial}.f-button-edit .farris-tags.form-control{padding:0}.f-button-edit .farris-tag-item,.f-button-edit .farris-tag-input-box{line-height:17px!important;margin:2px 6px 2px 0!important}.f-button-edit .farris-tag-input-box .form-control{height:inherit!important;padding:1px 0!important}.f-button-edit-nowrap .input-group{flex-wrap:nowrap!important}.f-button-edit-nowrap .farris-tags{overflow:hidden}.f-button-edit-nowrap .farris-tags-item-container{display:flex;flex-wrap:nowrap;overflow:hidden}.f-combo-list-container{overflow:auto;z-index:9;margin-top:.25rem}.f-combo-list-search-box{margin:.25rem .5rem}.f-combo-list-item{padding:.125rem .5rem}
1
+ .f-listview-fill{flex-grow:1;flex-shrink:1;flex-basis:0;overflow:hidden}.f-listview-fill .f-list-view{height:100%}.f-listview-fill .f-list-view .f-list-view-header,.f-listview-fill .f-list-view .f-list-view-footer{flex-shrink:0}.f-listview-fill .f-list-view .f-list-view-content{overflow-y:auto;flex-grow:1;flex-shrink:1;flex-basis:0}.f-list-view{display:flex;flex-direction:column;overflow:hidden}.f-list-view .f-list-view-content{flex:1;overflow:auto}.f-list-view .f-list-view-group{padding:0}.f-list-view .f-paging-wrapper{padding:14px 0}.f-list-view-group-item{display:flex;align-items:center;float:none;text-align:initial}.f-list-view-group-item.f-none-border{border-bottom:0}.f-list-view-group-item.f-listview-hover,.f-list-view-group-item.f-listview-active{cursor:pointer;color:#424347;background:#edf5ff!important}.f-list-view-group-item.f-listview-active{border-color:#529dff}.f-list-view-group-item.f-un-select{color:#848c9a}.f-list-view-group-item .f-list-content{flex:1 1 auto;width:100%}.f-list-view-draggable-item{border:1px solid;border-color:#e2e3e5;background-color:#fafbfd;border-radius:10px;margin:4px 2px}.f-list-view-draggable-item.f-listview-hover{cursor:pointer;color:#424347;background:#edf5ff!important}.f-list-view-draggable-item.f-listview-hover .f-list-remove-icon{display:initial}.f-list-view-draggable-item.f-listview-active{border-color:#529dff}.f-list-view-draggable-item.moving{opacity:0}.f-list-select{padding:0 0 0 14px}.f-list-select .listview-checkbox{margin:.25rem 0}.f-list-pin{color:#2986ff;padding:0 14px 0 0}.f-list-remove{width:30px;color:#f4625f;padding:0 14px 0 0}.f-list-remove-icon{display:none}.f-list-handle{padding:0 14px 0 0}.f-list-view-emptydata .f-empty-title{font-size:14px;line-height:22px;color:#999;padding:20px 0;text-align:center}.f-list-view.small-item .f-list-select{padding:initial}::highlight(search-result){background-color:#f06;color:#fff}.farris-tags .farris-tags-item-container{margin:0;padding:0}.farris-tags .farris-tags-item-container .farris-tag-item{display:inline-flex!important;padding:0 8px;margin:3px 6px 3px 0;line-height:24px;font-size:13px;color:#2d314e;background:#f6faff;border:1px solid #e6e6e6!important;white-space:nowrap;border-radius:3px;cursor:default;opacity:1;transition:all .3s cubic-bezier(.78,.14,.15,.86);max-width:9rem}.farris-tags .farris-tags-item-container .farris-tag-item a,.farris-tags .farris-tags-item-container .farris-tag-item a:hover{color:#000000d9}.farris-tags .farris-tags-item-container .farris-tag-item>a:first-child:last-child{display:inline-flex;margin:0 -8px;padding:0 8px}.farris-tags .farris-tags-item-container .farris-tag-item .tag-box{text-overflow:ellipsis;overflow:hidden;word-break:break-all;white-space:nowrap;display:inline-flex;max-width:7rem;vertical-align:middle}.farris-tags .farris-tags-item-container .farris-tag-item .tag-delete{display:inline-block;margin-left:6px;color:#0003;cursor:pointer;transition:all .3s cubic-bezier(.78,.14,.15,.86)}.farris-tags .farris-tags-item-container .farris-tag-item .tag-delete:hover{color:#000000d9}.farris-tags .farris-tags-item-container .farris-tag-item>.f-icon{font-size:12px}.farris-tags .farris-tags-item-container .farris-tag-item>.f-icon+span,.farris-tags .farris-tags-item-container .farris-tag-item>span+.f-icon{margin-left:7px}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-success{color:#52c41a;background:#f6ffed;border-color:#b7eb8f}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-info{color:#1890ff;background:#e6f7ff;border-color:#91d5ff}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-error{color:#f5222d;background:#fff1f0;border-color:#ffa39e}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-warning{color:#fa8c16;background:#fff7e6;border-color:#ffd591}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-default{color:#2d314e;background:#f6faff;border:1px solid #e6e6e6}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-checkable:not(.farris-tag-item-checked){cursor:pointer}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-checkable:not(.farris-tag-item-checked):active{color:#59a1ff}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-checkable:not(.farris-tag-item-checked):hover{color:#59a1ff}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-checkdisabled{background-color:transparent;border-color:transparent;cursor:not-allowed;color:#00000073}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-checked{background-color:#fff;border-color:#2a87ff;color:#2a87ff}.farris-tags .farris-tags-item-container .farris-tag-item:last-child{margin-right:0}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-actived,.farris-tags .farris-tags-item-container .farris-tag-item:active{background-color:#2a87ff;color:#fff}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-actived .tag-delete,.farris-tags .farris-tags-item-container .farris-tag-item:active .tag-delete{color:#fff}.farris-tags .farris-tags-item-container .farris-tag-add-button{cursor:pointer;background:#f9f9f9;border:1px dashed #babdc9}.farris-tags .farris-tags-item-container .farris-tag-add-button .farris-tag-add-text{color:#00000073;line-height:24px}.farris-tags .farris-tags-item-container .farris-tag-add-button .f-icon{color:#0003;line-height:24px}.farris-tags .farris-tags-item-container .farris-tag-add-button:hover{background-color:#f9f9f9;border-color:#59a1ff}.farris-tags .farris-tags-item-container .farris-tag-add-button:hover .farris-tag-add-text,.farris-tags .farris-tags-item-container .farris-tag-add-button:hover .f-icon{color:#59a1ff}.farris-tags .farris-tags-item-container .farris-tag-add-button.farris-tag-add-button-disabled{background-color:#f7f7f7;border-color:#dcdcdc;border-style:solid;cursor:not-allowed}.farris-tags .farris-tags-item-container .farris-tag-add-button.farris-tag-add-button-disabled .farris-tag-add-text{color:#00000040}.farris-tags .farris-tags-item-container .farris-tag-add-button.farris-tag-add-button-disabled:hover{background-color:#f7f7f7;border-color:#dcdcdc}.farris-tags .farris-tags-item-container .farris-tag-add-button.farris-tag-add-button-disabled:hover .farris-tag-add-text,.farris-tags .farris-tags-item-container .farris-tag-add-button.farris-tag-add-button-disabled:hover .f-icon{color:#00000040}.farris-tags .farris-tags-item-container .farris-tag-input-box{display:inline-flex!important;padding:0;margin:2px 3px 2px -3px;line-height:22px;font-size:13px}.farris-tags .farris-tags-item-container .farris-tag-input-box .form-control{padding:2px 0;min-width:2px;border:none;background:none;line-height:inherit;text-wrap:nowrap;width:100%!important;height:22px!important}.farris-tags .farris-tags-item-container .farris-tag-input-box .form-control:focus{box-shadow:none}.farris-tags .farris-tags-item-container .farris-tag-input-box .form-control:focus-visible{outline:none}.farris-tags .farris-tags-item-container.farris-tag-item-capsule .farris-tag-item{border-radius:24px}.farris-tags .farris-tags-item-container.farris-tag-item-capsule .farris-tag-item.farris-tag-item-checkable:not(.farris-tag-item-checked){background:#ffffff;border:1px solid #e6e6e6;cursor:pointer}.farris-tags .farris-tags-item-container.farris-tag-item-capsule .farris-tag-item.farris-tag-item-checkable:not(.farris-tag-item-checked):active{color:#59a1ff}.farris-tags .farris-tags-item-container.farris-tag-item-capsule .farris-tag-item.farris-tag-item-checkable:not(.farris-tag-item-checked):hover{color:#59a1ff}.farris-tags .farris-tags-item-container.farris-tag-item-capsule .farris-tag-item.farris-tag-item-checked{background-color:#2a87ff0f;border-color:#2a87ff29;color:#2a87ff}.farris-tags.farris-tags-checkable .farris-tag-item{line-height:22px}.farris-tags.farris-tags-nowrap{overflow:hidden}.farris-tags.farris-tags-nowrap .farris-tags-item-container{display:flex;flex-wrap:nowrap;overflow:hidden}.farris-tags .farris-tags-item-container .farris-tag-item.farris-tag-item-warning{color:#f5a144;border-color:#fad0a1;background:#fef5ec}.bs3.popover-top{margin-bottom:10px}.bs3.popover.top>.arrow{margin-left:-2px}.bs3.popover.top{margin-bottom:10px}.popover.bottom>.arrow{margin-left:-4px}.bs3.bs-popover-left{margin-right:.5rem}.bs3.bs-popover-right .arrow,.bs3.bs-popover-left .arrow{margin:.3rem 0}.arrow-left .arrow{left:calc(50% - 10px)}.bs-popover-bottom-left .arrow{top:calc((.5rem + 1px)*-1)}.bs-popover-bottom-left .arrow:before{top:0;border-bottom-color:#fff6!important}.bs-popover-bottom-left .arrow:before,.bs-popover-bottom-left .arrow:after{border-width:0 .5rem .5rem}.bs-popover-bottom-left .arrow:after{top:1px;border-bottom-color:#fff!important}.popover.popover-fitcontent .popover-body{max-width:initial;padding:initial}.f-button-edit .farris-tags.form-control{padding:0}.f-button-edit .farris-tag-item,.f-button-edit .farris-tag-input-box{line-height:17px!important;margin:2px 6px 2px 0!important}.f-button-edit .farris-tag-input-box .form-control{height:inherit!important;padding:1px 0!important}.f-button-edit-nowrap .input-group{flex-wrap:nowrap!important}.f-button-edit-nowrap .farris-tags{overflow:hidden}.f-button-edit-nowrap .farris-tags-item-container{display:flex;flex-wrap:nowrap;overflow:hidden}.f-combo-list-container{overflow:auto;z-index:9;margin-top:.25rem;display:flex;flex-direction:column}.f-combo-list-search-box{margin:.25rem .5rem}.f-combo-list-item{padding:.125rem .5rem}
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "component",
3
- "version": "1.0.2",
3
+ "version": "1.0.3",
4
4
  "main": "index.umd.js",
5
5
  "module": "index.esm.js",
6
6
  "style": "style.css",