@farris/ui-vue 1.5.7 → 1.5.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/avatar/index.esm.js +4 -4
- package/components/avatar/index.umd.cjs +1 -1
- package/components/component/index.esm.js +4 -4
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +4 -4
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +4 -4
- package/components/content-container/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +1082 -1421
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.esm.js +4 -4
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dynamic-form/index.esm.js +4 -4
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-view/index.esm.js +4 -4
- package/components/dynamic-view/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +4 -4
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +12 -11
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.esm.js +4 -4
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/number-range/index.esm.js +4 -4
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +4 -4
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1584 -2320
- package/components/page-header/index.umd.cjs +1 -1
- package/components/property-panel/index.esm.js +4 -4
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +77 -76
- package/components/query-solution/index.umd.cjs +6 -6
- package/components/response-layout/index.esm.js +4 -4
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +500 -3662
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +3008 -7347
- package/components/schema-selector/index.umd.cjs +6 -6
- package/components/section/index.esm.js +1564 -1635
- package/components/section/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +545 -4943
- package/components/tabs/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +100 -5841
- package/components/textarea/index.umd.cjs +2 -2
- package/components/time-picker/index.esm.js +4 -4
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/video/index.esm.js +4 -4
- package/components/video/index.umd.cjs +1 -1
- package/designer/button-edit/index.css +1 -0
- package/designer/button-edit/index.esm.js +1556 -0
- package/designer/button-edit/index.umd.cjs +1 -0
- package/designer/checkbox/index.esm.js +207 -0
- package/designer/checkbox/index.umd.cjs +1 -0
- package/designer/checkbox-group/index.esm.js +377 -0
- package/designer/checkbox-group/index.umd.cjs +1 -0
- package/designer/data-grid/index.css +1 -0
- package/designer/data-grid/index.esm.js +14332 -0
- package/designer/data-grid/index.umd.cjs +20 -0
- package/designer/data-view/index.esm.js +271 -0
- package/designer/data-view/index.umd.cjs +1 -0
- package/designer/date-picker/index.esm.js +1879 -0
- package/designer/date-picker/index.umd.cjs +1 -0
- package/designer/drawer/index.css +1 -0
- package/designer/drawer/index.esm.js +463 -0
- package/designer/drawer/index.umd.cjs +1 -0
- package/designer/farris-designer.all.esm.js +16815 -0
- package/designer/farris-designer.all.umd.cjs +32 -0
- package/designer/index.css +1 -0
- package/designer/input-group/index.esm.js +647 -0
- package/designer/input-group/index.umd.cjs +1 -0
- package/designer/radio-group/index.esm.js +6959 -0
- package/designer/radio-group/index.umd.cjs +1 -0
- package/designer/response-toolbar/index.esm.js +3015 -0
- package/designer/response-toolbar/index.umd.cjs +1 -0
- package/designer/tabs/index.esm.js +2200 -0
- package/designer/tabs/index.umd.cjs +1 -0
- package/designer/textarea/index.esm.js +249 -0
- package/designer/textarea/index.umd.cjs +1 -0
- package/designer/tree-grid/index.css +1 -0
- package/designer/tree-grid/index.esm.js +1673 -0
- package/designer/tree-grid/index.umd.cjs +1 -0
- package/farris.all.esm.js +57107 -57105
- package/farris.all.umd.cjs +16 -16
- package/package.json +1 -1
- package/types/date-picker/designer.d.ts +29 -0
- package/types/date-picker/index.d.ts +2 -1
- package/types/date-picker/src/date-picker.props.d.ts +0 -5
- package/types/date-picker/src/designer/date-picker.design.props.d.ts +22 -0
- package/types/response-toolbar/designer.d.ts +37 -0
- package/types/response-toolbar/index.d.ts +6 -5
- package/types/response-toolbar/src/composition/toolbar-item-dragula.d.ts +1 -2
- package/types/response-toolbar/src/composition/types.d.ts +1 -1
- package/types/response-toolbar/src/designer/response-toolbar.design.props.d.ts +13 -0
- package/types/response-toolbar/src/designer/use-designer-item-rules.d.ts +1 -2
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +1 -2
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -1
- package/types/response-toolbar/src/property-config/response-toolbar.property-config.d.ts +1 -1
- package/types/response-toolbar/src/response-toolbar.props.d.ts +0 -12
- package/types/response-toolbar/src/schema/schema-resolver.d.ts +1 -1
- package/types/tabs/designer.d.ts +28 -0
- package/types/tabs/index.d.ts +1 -0
- package/types/tabs/src/components/tab-page.props.d.ts +0 -1
- package/types/tabs/src/designer/tab-page.design.props.d.ts +1 -0
- package/types/tabs/src/designer/tabs.design.props.d.ts +12 -0
- package/types/tabs/src/tabs.props.d.ts +0 -11
- package/types/textarea/designer.d.ts +28 -0
- package/types/textarea/index.d.ts +0 -15
- package/types/textarea/src/designer/textarea.design.props.d.ts +6 -0
- package/types/textarea/src/designer/use-design-rules.d.ts +1 -2
- package/types/textarea/src/property-config/textarea.property-config.d.ts +1 -1
- package/types/textarea/src/schema/schema-resolver.d.ts +1 -1
- package/types/textarea/src/textarea.props.d.ts +0 -5
- /package/{components/textarea → designer/radio-group}/index.css +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(O,P){typeof exports=="object"&&typeof module<"u"?P(exports,require("../../components/common/index.umd.js"),require("../../components/dynamic-resolver/index.umd.js"),require("../../components/button-edit/index.umd.js"),require("vue"),require("../../components/designer-canvas/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","../../components/common/index.umd.js","../../components/dynamic-resolver/index.umd.js","../../components/button-edit/index.umd.js","vue","../../components/designer-canvas/index.umd.js"],P):(O=typeof globalThis<"u"?globalThis:O||self,P(O["button-edit"]={},O.common,O.dynamicResolver,O.FButtonEdit,O.Vue,O.designerCanvas))})(this,function(O,P,D,le,e,ce){"use strict";var Je=Object.defineProperty;var Qe=(O,P,D)=>P in O?Je(O,P,{enumerable:!0,configurable:!0,writable:!0,value:D}):O[P]=D;var q=(O,P,D)=>Qe(O,typeof P!="symbol"?P+"":P,D);const de={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},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},popupOnClick:{type:Boolean,default:!1},popupClass:{type:String,default:""},popupMinWidth:{type:Number,default:160},modalOptions:{type:Object,default:{}},wrapText:{type:Boolean,default:!1},multiSelect:{type:Boolean,default:!1},separator:{type:String,default:","},textAlign:{type:String,default:"left"},beforeClickButton:{type:Function,default:null},focusOnCreated:{type:Boolean,default:!1},selectOnCreated:{type:Boolean,default:!1},beforeOpen:{type:Function,default:null},updateOn:{type:String,default:"change"},keepWidthWithReference:{type:Boolean,default:!0},placement:{type:String,default:"bottom-left"},limitContentBySpace:{type:Boolean,default:!1}},fe={popupContentPosition:{type:Object,default:{left:0,top:0}},host:{type:Object},backgroundColor:{type:String,default:""}},pe=e.defineComponent({name:"FOverlay",props:fe,emits:["click"],setup(t,n){const a=e.ref(t.popupContentPosition),o=e.ref(t.host),c=e.computed(()=>({backgroundColor:t.backgroundColor||"",pointerEvents:"auto"}));function r(s){n.emit("click"),s.preventDefault(),s.stopPropagation()}e.computed(()=>{const s=o.value;if(s){const f=s.getBoundingClientRect(),{left:m,top:v,height:b}=f;return{left:m,top:v+b}}return a.value});const p=e.computed(()=>({}));return()=>e.createVNode(e.Teleport,{to:"body"},{default:()=>{var s,f;return[e.createVNode("div",{class:"overlay-container",onClick:m=>r(m),style:c.value},[e.createVNode("div",{style:p.value},[(f=(s=n.slots).default)==null?void 0:f.call(s)])])]}})}});function me(t){if(t.content&&t.content.render)return t.content.render;if(t.render&&typeof t.render=="function")return t.render}function he(t){const n=document.createElement("div");n.style.display="contents";let a;const o=t.onClickCallback||(()=>{}),c=()=>{o(),a&&a.unmount()};return a=e.createApp({setup(){e.onUnmounted(()=>{document.body.removeChild(n)});const r=me(t);return()=>e.createVNode(pe,{"popup-content-position":t.popupPosition,host:t.host,onClick:c,backgroundColor:t.backgroundColor},{default:()=>[r&&r()]})}}),document.body.appendChild(n),a.mount(n),a}class ve{static show(n){return he(n)}}const ye={allowClickMaskToClose:{type:Boolean,default:!1},beforeClose:{type:Function,default:()=>!0},class:{type:String,default:""},maskClass:{type:String,default:""},title:{type:String,default:""},width:{type:Number,default:500},height:{type:Number,default:320},buttons:{type:Array,default:[]},modelValue:{type:Boolean,default:!1},mask:{type:Boolean,default:!0},showHeader:{type:Boolean,default:!0},showButtons:{type:Boolean,default:!0},fitContent:{type:Boolean,default:!0},showCloseButton:{type:Boolean,default:!0},showMaxButton:{type:Boolean,default:!1},minHeight:{type:Number},maxHeight:{type:Number},minWidth:{type:Number},maxWidth:{type:Number},containment:{type:Object,default:null},resizeable:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},dragHandle:{type:Object,default:null},closedCallback:{type:Function,default:null},resizeHandle:{type:Function,default:null},render:{type:Function,default:null},acceptCallback:{type:Function,default:null},rejectCallback:{type:Function,default:null},enableEsc:{type:Boolean,default:!0},enableEnter:{type:Boolean,default:!1},dialogType:{type:String,default:""},src:{type:String,default:""},footerHeight:{type:Number,default:60},host:{type:Object,default:"body"}};class z{constructor(n,a){this.x=n,this.y=a}static getTransformInfo(n){const o=window.getComputedStyle(n).getPropertyValue("transform").replace(/[^-\d,]/g,"").split(",");if(o.length>=6){const c=parseInt(o[4],10),r=parseInt(o[5],10);return{x:c,y:r}}return{x:0,y:0}}static fromEvent(n,a=null){if(this.isMouseEvent(n))return new z(n.clientX,n.clientY);if(a===null||n.changedTouches.length===1)return new z(n.changedTouches[0].clientX,n.changedTouches[0].clientY);for(let o=0;o<n.changedTouches.length;o++)if(n.changedTouches[o].target===a)return new z(n.changedTouches[o].clientX,n.changedTouches[o].clientY)}static isMouseEvent(n){return Object.prototype.toString.apply(n).indexOf("MouseEvent")===8}static isIPosition(n){return!!n&&"x"in n&&"y"in n}static getCurrent(n){const a=new z(0,0);if(window){const o=window.getComputedStyle(n);if(o){const c=parseInt(o.getPropertyValue("left"),10),r=parseInt(o.getPropertyValue("top"),10);a.x=isNaN(c)?0:c,a.y=isNaN(r)?0:r}return a}return null}static copy(n){return new z(0,0).set(n)}get value(){return{x:this.x,y:this.y}}add(n){return this.x+=n.x,this.y+=n.y,this}subtract(n){return this.x-=n.x,this.y-=n.y,this}multiply(n){this.x*=n,this.y*=n}divide(n){this.x/=n,this.y/=n}reset(){return this.x=0,this.y=0,this}set(n){return this.x=n.x,this.y=n.y,this}}class ${constructor(n,a){this.width=n,this.height=a}static getCurrent(n){const a=new $(0,0);if(window){const o=window.getComputedStyle(n);return o&&(a.width=parseInt(o.getPropertyValue("width"),10),a.height=parseInt(o.getPropertyValue("height"),10)),a}return null}static copy(n){return new $(0,0).set(n)}set(n){return this.width=n.width,this.height=n.height,this}}function ge(t,n){const a=e.ref(),o=e.ref(),c=e.ref(),r=e.ref(),p=e.ref(),s=e.ref(),f=e.ref(),m=e.ref(),v=e.ref(),b=e.ref(),V=e.ref(),y=e.ref(t.resizeable),M=e.ref(),B=e.ref(t.draggable),I=e.ref(!1);function H(){const i=o.value||document.body,u=window.getComputedStyle(i);if(!u||!a.value)return;const x=z.getTransformInfo(a.value),h={};f.value&&(h.deltaL=a.value.offsetLeft-f.value.x,h.deltaT=a.value.offsetTop-f.value.y);const T=u.getPropertyValue("position");h.width=i.clientWidth,h.height=i.clientHeight,h.pr=parseInt(u.getPropertyValue("padding-right"),10),h.pb=parseInt(u.getPropertyValue("padding-bottom"),10),h.position=u.getPropertyValue("position"),T==="static"&&(i.style.position="relative"),h.translateX=x.x,h.translateY=x.y,b.value=h}function E(i){if(a.value){r.value=$.getCurrent(a.value),p.value=z.getCurrent(a.value),s.value=r.value?$.copy(r.value):null,f.value=p.value?z.copy(p.value):null,H();const u=i.target.getAttribute("type")||"";m.value={n:!!u.match(/n/),s:!!u.match(/s/),w:!!u.match(/w/),e:!!u.match(/e/)}}}function j(){var i,u,x,h;if(a.value){const T=a.value;m.value&&((m.value.n||m.value.s)&&((i=s.value)!=null&&i.height)&&(T.style.height=s.value.height+"px"),(m.value.w||m.value.e)&&((u=s.value)!=null&&u.width)&&(T.style.width=s.value.width+"px"),f.value&&((x=f.value)!=null&&x.x&&(T.style.left=f.value.x+"px"),(h=f.value)!=null&&h.y&&(T.style.top=f.value.y+"px")))}}function F(){const i=t.minHeight?t.minHeight:1,u=t.minWidth?t.minWidth:1;s.value&&f.value&&m.value&&r.value&&(s.value.height<i&&(s.value.height=i,m.value.n&&p.value&&(f.value.y=p.value.y+(r.value.height-i))),s.value.width<u&&(s.value.width=u,m.value.w&&p.value&&(f.value.x=p.value.x+(r.value.width-u))),t.maxHeight&&s.value.height>t.maxHeight&&(s.value.height=t.maxHeight,p.value&&m.value.n&&(f.value.y=p.value.y+(r.value.height-t.maxHeight))),t.maxWidth&&s.value.width>t.maxWidth&&(s.value.width=t.maxWidth,m.value.w&&p.value&&(f.value.x=p.value.x+(r.value.width-t.maxWidth))))}function C(){if(o.value){const i=b.value;if(f.value&&s.value&&m.value&&r.value){const u=i.width-i.pr-i.deltaL-i.translateX-f.value.x,x=i.height-i.pb-i.deltaT-i.translateY-f.value.y;m.value.n&&f.value.y+i.translateY<0&&p.value&&(f.value.y=-i.translateY,s.value.height=r.value.height+p.value.y+i.translateY),m.value.w&&f.value.x+i.translateX<0&&p.value&&(f.value.x=-i.translateX,s.value.width=r.value.width+p.value.x+i.translateX),s.value.width>u&&(s.value.width=u),s.value.height>x&&(s.value.height=x)}}}function N(i){if(!c.value||!r.value||!p.value||!m.value)return;i.subtract(c.value);const u=i.x,x=i.y;m.value.n?(f.value.y=p.value.y+x,s.value.height=r.value.height-x):m.value.s&&(s.value.height=r.value.height+x),m.value.e?s.value.width=r.value.width+u:m.value.w&&(s.value.width=r.value.width-u,f.value.x=p.value.x+u),C(),F(),j()}function d(i){if(!v.value)return;const u=z.fromEvent(i);u&&N(u)}function w(){if(a.value){const{width:i,height:u,x,y:h}=a.value.getBoundingClientRect(),T=z.getTransformInfo(a.value);return{size:{width:i,height:u},position:{x:x-T.x,y:h-T.y}}}return null}function S(i){if(a.value){const u=w();V.value=u}c.value=void 0,r.value=null,p.value=null,s.value=null,f.value=null,m.value=null,v.value=null,document.removeEventListener("mousemove",d),document.removeEventListener("mouseup",S)}function L(){document.addEventListener("mousemove",d),document.addEventListener("mouseup",S)}function k(i){i instanceof MouseEvent&&i.button===2||B.value&&(document.body.click(),i.stopPropagation(),i.preventDefault(),c.value=z.fromEvent(i),v.value=i.target,E(i),L())}function W(i){return a.value=i,y.value&&e.createVNode(e.Fragment,null,[e.createVNode("div",{class:"fv-resizable-handle fv-resizable-n",type:"n",onMousedown:u=>k(u)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-e",type:"e",onMousedown:u=>k(u)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-s",type:"s",onMousedown:u=>k(u)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-w",type:"w",onMousedown:u=>k(u)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-ne",type:"ne",onMousedown:u=>k(u)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-se fv-resizable-diagonal",type:"se",onMousedown:u=>k(u)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-sw",type:"sw",onMousedown:u=>k(u)},null),e.createVNode("div",{class:"fv-resizable-handle fv-resizable-nw",type:"nw",onMousedown:u=>k(u)},null)])}function K(i=!0){document.body.click();const u=o.value||document.body,x=$.getCurrent(u),h=a.value;i&&h&&(M.value=w(),M.value.transform=h.style.transform),x&&h&&(s.value=x,s.value.height-=14,s.value.width-=14,h.style.height=s.value.height+"px",h.style.width=s.value.width+"px",h.style.left="7px",h.style.top="7px",h.style.transform="",V.value={size:s.value,position:{x:0,y:0}},B.value=!1,I.value=!0)}function J(){var i,u;if(document.body.click(),M.value){const x={width:M.value.size.width||0,height:M.value.size.height||0},h={x:(window.innerWidth-x.width)/2,y:(window.innerHeight-x.height)/2};(i=s.value)==null||i.set(x),(u=f.value)==null||u.set(h);const T=a.value;T.style.height=x.height+"px",T.style.width=x.width+"px",T.style.left=`${h.x}px`,T.style.top=`${h.y}px`,T.style.transform="",V.value={size:x,position:h},B.value=t.draggable,I.value=!1}}function Q(){if(a.value){const i=$.getCurrent(a.value);if(i){const{width:u,height:x}=i;a.value.style.left=`${(window.innerWidth-u)/2}px`,a.value.style.top=`${(window.innerHeight-x)/2}px`,a.value.style.transform=""}}}function Y(){const i=()=>{I.value?K(!1):Q(),document.body.click()};return window.addEventListener("resize",i),()=>{window.removeEventListener("resize",i)}}const Z=Y();return{renderResizeBar:W,boundingElement:o,resizedEventParam:V,maximize:K,restore:J,allowDrag:B,isMaximized:I,unWindowResizeHandle:Z}}function be(t,n,a){const o=e.ref(),c=e.ref(t.draggable),r=e.ref(t.lockAxis),p=e.ref(),s=e.ref(),f=e.ref(!1),m=e.ref(new z(0,0)),v=e.ref(new z(0,0)),b=e.ref(new z(0,0)),V=e.ref(new z(0,0));e.watch(()=>a.value,d=>{p.value.style.cursor=d?"move":"default"});function y(d,w){if(w.tagName==="BUTTON")return!1;if(w===d)return!0;for(const S in w.children)if(Object.prototype.hasOwnProperty.call(w.children,S)&&y(d,w.children[S]))return!0;return!1}function M(){var L,k;let d=b.value.x+v.value.x,w=b.value.y+v.value.y;r.value==="x"?(d=((L=m.value)==null?void 0:L.x)||0,b.value.x=0):r.value==="y"&&(w=((k=m.value)==null?void 0:k.y)||0,b.value.y=0);const S=`translate3d(${Math.round(d)}px, ${Math.round(w)}px, 0px)`;o.value&&(o.value.style.transform=S),V.value.x=d,V.value.y=w}function B(){if(!s.value||!o.value)return null;const d=s.value.getBoundingClientRect(),w=o.value.getBoundingClientRect(),S={top:d.top<w.top,right:d.right>w.right,bottom:d.bottom>w.bottom,left:d.left<w.left};return S.top||(b.value.y-=w.top-d.top),S.bottom||(b.value.y-=w.bottom-d.bottom),S.right||(b.value.x-=w.right-d.right),S.left||(b.value.x-=w.left-d.left),M(),S}function I(d){d&&(m.value&&d.subtract(m.value),b.value.set(d),M(),B())}function H(d){f.value&&c.value&&(d.stopPropagation(),d.preventDefault(),I(z.fromEvent(d,p.value)))}function E(){var d;f.value&&(f.value=!1,v.value.add(b.value),b.value.reset(),(d=o.value)==null||d.classList.remove("ng-dragging"),n.emit("stopMove"),document.removeEventListener("mousemove",H),document.removeEventListener("mouseup",E))}function j(){!f.value&&p.value&&(f.value=!0,p.value.classList.add("ng-dragging"),document.addEventListener("mousemove",H),document.addEventListener("mouseup",E))}function F(){if(o.value){const d=z.getTransformInfo(o.value);v.value.set(d);return}v.value.reset()}function C(d){if(!a.value||d instanceof MouseEvent&&d.button===2)return;const w=d.target||d.srcElement;p.value!==void 0&&w&&!y(w,p.value)||c.value!==!1&&(document.body.click(),d.stopPropagation(),d.preventDefault(),m.value=z.fromEvent(d,o.value),F(),j())}function N(d,w,S){if(c.value&&w){if(d)p.value=d;else if(t.dragHandle){if(t.dragHandle instanceof HTMLElement)p.value=t.dragHandle;else if(typeof t.dragHandle=="string"){const L=w.querySelector(t.dragHandle);L&&(p.value=L)}}o.value=w,s.value=S,p.value?(p.value.classList.add("ng-draggable"),p.value.addEventListener("mousedown",C)):c.value=!1}}return{registerDraggle:N,resetTranslate:F}}function oe(t,n){if(t){const a=o=>{o.key.toLowerCase()===t.toLowerCase()&&n({event:o,key:t})};return document.addEventListener("keydown",a),()=>{document.removeEventListener("keydown",a)}}}function we(t,n){const a=e.ref(t.enableEsc);let o=null;return a.value?(o=oe("Escape",c=>{n.emit("esc",{event:c.event,type:"esc"})}),{remove:o}):null}function Ce(t,n){const a=e.ref(t.enableEnter);let o=null;return a.value?(o=oe("Enter",c=>{n.emit("enter",{event:c.event,type:"enter"})}),{remove:o}):null}const U=e.defineComponent({name:"FModal",props:ye,emits:["update:modelValue","accept","cancel","closed","resize","esc","enter","stopMove"],setup(t,n){const a=e.ref(t.width||300),o=e.ref(t.height||200),c=e.ref(t.modelValue),r=e.ref(""),p=e.ref(t.class),s=e.ref(t.fitContent),f=e.ref(t.showHeader),m=e.ref(""),v=e.ref(t.showCloseButton),b=e.ref(t.showMaxButton),V=e.ref(!1),y=e.ref(t.dialogType),M=e.ref(t.src),B=e.ref(""),I=e.ref(t.showButtons),H=e.ref(t.title),E=e.ref(t.containment||null),j=e.ref(),F=e.ref(!1);function C(l,g){Promise.resolve().then(()=>{var R;return(R=t.beforeClose)==null?void 0:R.call(t)}).then(R=>{R&&(c.value=!1,n.emit("update:modelValue",!1),g!=null&&n.emit(g?"accept":"cancel"),n.emit("closed",l))})}const N=[{name:"cancel",text:"取消",class:"btn btn-secondary",handle:l=>{C(l,!1)}},{name:"accept",text:"确定",class:"btn btn-primary",handle:l=>{C(l,!0)}}],d=e.ref(t.buttons&&t.buttons.length?t.buttons:N),w=e.computed(()=>!!m.value),S=e.computed(()=>!!I.value&&!!d.value),L=e.ref(),k=e.ref(),W=e.ref(!1),{renderResizeBar:K,maximize:J,restore:Q,boundingElement:Y,resizedEventParam:Z,allowDrag:i,unWindowResizeHandle:u}=ge(t),{registerDraggle:x}=be(t,n,i);function h(){return!!document.querySelectorAll(".farris-modal").length&&document.body.classList.contains("modal-open")}function T(){const l=document.querySelectorAll(".farris-modal").length;(!l||l-1<=0)&&document.body.classList.remove("modal-open"),j.value&&j.value.classList.remove("show")}e.watch(()=>t.title,(l,g)=>{l!==g&&(H.value=l)}),e.watch(()=>t.modelValue,(l,g)=>{l!==g&&(c.value=l,c.value&&t.draggable&&e.nextTick(()=>{k.value&&!E.value&&(E.value=k.value.parentElement,Y.value=E.value,x(L.value,k.value,Y.value))}),l||(E.value&&(E.value=null),T())),c.value&&(F.value=h())}),e.watch(()=>t.showHeader,(l,g)=>{l!==g&&(f.value=l)}),e.watch(()=>t.showButtons,(l,g)=>{l!==g&&(I.value=l)}),e.watch(()=>Z.value,(l,g)=>{const R=l||{},A=g||{};JSON.stringify(R)!==JSON.stringify(A)&&n.emit("resize",{newSize:l,oldSize:g,isMaximized:W.value})});const ee=e.computed(()=>(c.value&&document.body.classList.add("modal-open"),c.value)),Te=e.computed(()=>{var R;const l={modal:!0,"farris-modal":!0,fade:!0};l["f-modal-fitContent"]=!!s.value,l.show=!!ee.value;const g=(R=t.maskClass)==null?void 0:R.split(" ");return g==null||g.reduce((A,ae)=>(A[ae]=!0,A),l),l}),Ie=e.computed(()=>{var R;const l={"modal-dialog":!0},g=(R=p.value)==null?void 0:R.split(" ");return g==null||g.reduce((A,ae)=>(A[ae]=!0,A),l),l}),je=e.computed(()=>{const l={position:"absolute",top:`${(window.innerHeight-o.value)/2}px`,left:`${(window.innerWidth-a.value)/2}px`,width:`${a.value}px`,height:s.value?"auto":`${o.value}px`};return t.mask||(l.pointerEvents="auto"),l}),He=e.computed(()=>{const l={display:"block"};return t.mask||(l.pointerEvents="none",l.backgroundColor="transparent"),F.value&&(l.backgroundColor="transparent"),l}),Re=e.computed(()=>({"modal-content":!0,"modal-content-has-header":f.value})),Pe=e.computed(()=>{const l={display:f.value?"":"none"};return l["pointer-events"]=i.value?"auto":"none",l}),Le=e.computed(()=>({"f-icon":!0,modal_maximize:!0,modalrevert:W.value})),Fe=e.computed(()=>({"modal-body":!0,"f-utils-flex-column":y.value==="iframe","f-utils-fill":!0}));function We(){return{height:`${t.footerHeight||60}px`}}const De=e.computed(()=>{const l={textAlgin:B.value},g=We();return Object.assign(l,g)});function ue(l){if(l.stopPropagation(),W.value){W.value=!1,Q();return}J(),W.value=!0}async function $e(l,g){l.handle&&await l.handle(g,l)&&n.emit("closed",g)}function Ae(l){l.width&&(a.value=l.width),l.height&&(o.value=l.height),l.buttons&&(d.value=l.buttons),l.title&&(H.value=l.title)}let te=null,ne=null;e.onBeforeMount(()=>{F.value=h()}),e.onMounted(()=>{k.value&&!E.value&&(E.value=k.value.parentElement,Y.value=E.value,x(L.value,k.value,Y.value)),ee.value&&document.body.classList.add("modal-open"),te=we(t,n),ne=Ce(t,n)}),e.onUnmounted(()=>{u&&u(),te&&te.remove(),ne&&ne.remove()}),n.expose({modalElementRef:k,updateModalOptions:Ae,close:C,maxDialog:ue,isMaximized:W});function qe(){return e.createVNode("ul",null,[V.value&&e.createVNode("li",{class:"f-btn-icon f-bare"},[e.createVNode("span",{class:"f-icon modal_minimize"},null)]),b.value&&e.createVNode("li",{onClick:ue,class:"f-btn-icon f-bare",style:"pointer-events: auto;"},[e.createVNode("span",{class:Le.value},null)]),v.value&&e.createVNode("li",{class:"f-btn-icon f-bare",onClick:l=>C(l,!1),style:"pointer-events: auto;"},[e.createVNode("span",{class:"f-icon modal_close"},null)])])}function Xe(){return e.createVNode("div",{class:"modal-footer",style:De.value},[d.value&&d.value.map(l=>{const g=e.ref(l.disabled);return e.createVNode("button",{name:l.name,type:"button",disabled:g.value,class:l.class+(l.iconClass?" btn-icontext":""),onClick:R=>{$e(l,R)}},[!!l.iconClass&&e.createVNode("i",{class:l.iconClass},null),l.text])})])}function Ye(){return e.createVNode("div",{ref:L,class:"modal-header",style:Pe.value},[n.slots.headerTemplate?n.slots.headerTemplate():e.createVNode("div",{class:"modal-title"},[w.value&&e.createVNode("span",{class:m.value,style:"margin-right: 8px"},null),e.createVNode("span",{class:"modal-title-label"},[H.value])]),e.createVNode("div",{class:"actions"},[qe()])])}function Ue(){return n.slots.footerTemplate?n.slots.footerTemplate():S.value&&Xe()}function Ge(l){if(l.stopPropagation(),t.allowClickMaskToClose){if(l.target!==j.value)return;C(l,!1)}}function Ke(){var l,g;return e.createVNode("div",{id:r.value,class:Ie.value,style:je.value,ref:k},[e.createVNode("div",{class:Re.value},[f.value&&Ye(),e.createVNode("div",{class:Fe.value},[(g=(l=n.slots).default)==null?void 0:g.call(l),y.value==="iframe"&&e.createVNode("iframe",{title:r.value,class:"f-utils-fill",width:"100%",frameborder:"0",src:M.value},null)]),Ue()]),!s.value&&k.value&&!W.value&&K(k.value)])}function _e(l){return l||"body"}return()=>e.createVNode(e.Teleport,{to:_e(t.host)},{default:()=>[ee.value&&e.createVNode(e.Transition,{name:"fade",appear:!0},{default:()=>[e.createVNode("div",{ref:j,class:Te.value,style:He.value,onClick:Ge},[Ke()])]})]})}});function se(t){if(t.content&&t.content.render)return t.content.render;if(t.render&&typeof t.render=="function")return t.render}function xe(t){const n=document.createElement("div");n.style.display="contents";const a=e.createApp({setup(o,c){e.onUnmounted(()=>{document.body.removeChild(n)});const r=e.ref(),p=e.ref(t.class||""),s=e.ref(!!t.showButtons),f=e.ref(!!t.showHeader),m=e.ref(t.showCloseButton==null?!0:t.showCloseButton),v=e.ref(!0),b=e.ref(t.title||""),V=t.acceptCallback||(()=>{}),y=t.rejectCallback||(()=>{}),M=t.closedCallback||(j=>{}),B=t.resizeHandle||(j=>{}),I=t.stopMoveHandle||(j=>{}),H=se(t),E=j=>{v.value=!1,a.unmount(),M(j)};return e.onMounted(()=>{}),c.expose({modalRef:r}),()=>e.createVNode(U,{ref:r,class:p.value,modelValue:v.value,"onUpdate:modelValue":j=>v.value=j,title:b.value,width:t.width,height:t.height,buttons:t.buttons,"show-header":f.value,"show-buttons":s.value,"show-close-button":m.value,"show-max-button":!1,onAccept:V,onCancel:y,fitContent:t.fitContent==null?!0:t.fitContent,onClosed:E,onResize:B,onStopMove:I},{default:()=>[H&&H(a)]})}});return document.body.appendChild(n),a.mount(n),a}class Me{constructor(n){q(this,"appContext",null);q(this,"modalRef",e.ref());q(this,"activeModalIndex",e.ref(0));q(this,"modalRefs",{});q(this,"isUseEscCloseModal",e.ref(!1));q(this,"activeModalInstance",e.computed(()=>this.modalRefs[this.activeModalIndex.value]));this.app=n,this.appContext=n?n._context:null}getCurrentModal(){return this.activeModalInstance.value}adaptToWindow(n,a){const{width:o,height:c}={width:window.innerWidth,height:window.innerHeight};return o<n&&(n=o-14),c<a&&(a=c-14),{width:n,height:a}}static show(n){const a=Object.assign({title:"",showButtons:!0,showHeader:!0},n);return xe(a)}close(n){var a,o;n?(o=n.value)==null||o.close():(a=this.getCurrentModal())==null||a.close()}open(n){const a=document.createDocumentFragment();n.showMaxButton&&n.fitContent&&(n.showMaxButton=!1);const o=e.shallowRef(Object.assign({title:"",showButtons:!0,showHeader:!0},n)),c=e.ref(!0),r=o.value.acceptCallback||(()=>{}),p=o.value.rejectCallback||(()=>{}),s=o.value.closedCallback||((C,N)=>{}),f=o.value.resizeHandle||(C=>{}),m=n.stopMoveHandle||(C=>{});let v;const b=se(o.value),V=C=>{var d;c.value=!1;const N=(d=C==null?void 0:C.target)==null?void 0:d.classList.contains("modal_close");s(C,this.isUseEscCloseModal.value?"esc":N?"icon":"button")},y=C=>{V(C),v&&e.nextTick(()=>{if(this.modalRefs[this.activeModalIndex.value]&&delete this.modalRefs[this.activeModalIndex.value],e.render(null,a),v=null,this.modalRef.value=null,this.modalRefs){const N=Object.keys(this.modalRefs).map(d=>Number(d));N.length>0?this.activeModalIndex.value=Math.max(...N):this.activeModalIndex.value=0}this.isUseEscCloseModal.value=!1})},M=C=>{var N;this.isUseEscCloseModal.value=!0,this.activeModalInstance&&((N=this.activeModalInstance.value)==null||N.close(C==null?void 0:C.event))},{width:B,height:I}=o.value,H=this.adaptToWindow(B||500,I||320);Object.assign(o.value,H);const E=()=>e.createVNode(U,e.mergeProps({ref:this.modalRef,modelValue:c.value,"onUpdate:modelValue":C=>c.value=C},o.value,{onAccept:r,onCancel:p,onClosed:y,onResize:f,onEsc:M,onStopMove:m}),{default:()=>[b&&b(this.app)]});return v=(C=>{const N=e.h(E,C);return N.appContext=this.appContext,e.render(N,a),N})({...o.value}),this.activeModalIndex.value++,this.modalRefs[this.activeModalIndex.value]=this.modalRef.value,{update:C=>{o.value={...o.value,...C},v&&e.render(e.cloneVNode(v,{...o}),a)},destroy:y,modalRef:this.activeModalInstance,close:()=>this.close()}}}const ie=Symbol("FModalService");U.install=t=>{t.component(U.name,U);const n=new Me(t);t.provide(ie,n),t.provide("FModalService",n)};function re(t,n){function a(){const o=t.beforeOpen||t.beforeClickButton||null;let c=Promise.resolve(!0);if(o){const r=o(n.value);if(typeof r>"u")return c;typeof r=="boolean"?c=Promise.resolve(r):c=r}return c}return{judgeCanOpen:a}}function Be(t,n,a,o,c){const r=e.ref(t.buttonBehavior),p=e.ref(t.popupOnInput),s=e.computed(()=>({"input-group-append":!0,"append-force-show":t.showButtonWhenDisabled&&(t.readonly||t.disable)})),{judgeCanOpen:f}=re(t,c),m=e.computed(()=>t.showButtonWhenDisabled||(!t.editable||!t.readonly)&&!t.disable),v=e.inject(ie,null),b=e.ref();async function V(B){if(await f()&&m.value){const I=!!n.slots.default;if(r.value==="Modal"){const H=t.modalOptions,E=v==null?void 0:v.open({...H,render:()=>n.slots.default&&n.slots.default()});b.value=E==null?void 0:E.modalRef}r.value==="Overlay"&&ve.show({host:document.body,backgroundColor:"rgba(0,0,0,.15)",render:()=>n.slots.default&&n.slots.default()}),I&&r.value==="Popup"&&o.togglePopup(!0),I&&p.value&&o.hidePopup(),n.emit("clickButton",{origin:B,value:t.modelValue})}}function y(B){n.emit("mouseEnterIcon",B)}function M(B){n.emit("mouseLeaveIcon",B)}return{buttonGroupClass:s,onClickButton:V,onMouseEnterButton:y,onMouseLeaveButton:M,modalRef:b}}const X="FarrisVue_PopoverInstancesKey";function ke(t,n,a,o){const c=e.ref(),r=e.ref(!1),{judgeCanOpen:p}=re(t,o);e.watch(()=>c.value,(y,M)=>{window[X]=window[X]||new WeakMap,y?window[X].set(a.value,y):window[X].delete(a.value)});function s(){if(window[X]){const y=window[X];document.querySelectorAll(".f-button-edit,.v-popover").forEach(M=>{y.get(M)&&M!==a.value&&y.get(M).hide()})}}function f(){const y=c.value;y&&y.show(a.value)}async function m(y=!1){if(!!n.slots.default){if(!y&&!r.value&&!await p())return;r.value=!r.value,await e.nextTick(),f()}}async function v(y=!1){if(!!n.slots.default){if(!y&&!await p())return;r.value=!0,await e.nextTick(),f()}}function b(){r.value=!1}function V(){r.value=!0,e.nextTick(()=>{f()})}return{hidePopup:b,showPopup:V,popup:v,shouldPopupContent:r,togglePopup:m,popoverRef:c,closeAllPopover:s}}function Ee(t,n,a){const{buttonGroupClass:o}=a,c=e.ref();return{renderButtonGroup:()=>e.createVNode("div",{id:`${t.id}-button-group`,class:o.value},[n.slots.buttonContent?e.createVNode("span",{class:"input-group-text input-group-append-button"},[n.slots.buttonContent()]):t.buttonContent?e.createVNode("span",{class:"input-group-text input-group-append-button",innerHTML:t.buttonContent,ref:c},null):null]),buttonHandleElement:c}}const G=e.defineComponent({name:"FButtonEdit",props:de,emits:["updateExtendInfo","clear","change","click","clickButton","blur","focus","mouseEnterIcon","mouseLeaveIcon","keyup","keydown","inputClick","input","update:modelValue"],setup(t,n){const a=e.ref(),o=e.inject("design-item-context"),c=ce.useDesignerComponent(a,o),r=e.ref(t.customClass),p=e.ref(t.modelValue),s=ke(t,n,a,p),f=Be(t,n,a,s,p),m=e.ref(),v=e.computed(()=>({"f-cmp-inputgroup":!0,"input-group":!0,"f-state-disabled":!0,"f-state-editable":!1,"f-state-readonly":!0}));e.onMounted(()=>{a.value.componentInstance=c}),n.expose(c.value);const b=e.computed(()=>{const y={"f-button-edit":!0,"f-cmp-inputgroup":!0,"f-button-edit-nowrap":!t.wrapText};return r.value&&r.value.split(" ").reduce((M,B)=>(M[B]=!0,M),y),y}),{renderButtonGroup:V}=Ee(t,n,f);return()=>e.createVNode("div",e.mergeProps(n.attrs,{ref:a,class:b.value,id:t.id}),[e.createVNode("div",{class:v.value},[e.createVNode("input",{ref:m,class:"form-control",readonly:!0,placeholder:t.placeholder},null),V()])])}}),Oe=new Map([["appearance",D.resolveAppearance]]);function ze(t,n,a){return n}const Ve={$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:""},forcePlaceholder:{description:"",type:"boolean",default:!1},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}}},popupClass:{description:"",type:"sting",default:""},separator:{type:"string",default:","},showButtonWhenDisabled:{description:"",type:"boolean",default:!1},wrapText:{type:"boolean",default:!1},onClear:{description:"",type:"string",default:""}},required:["id","type"]},Ne={title:"buttonEdit",description:"A Farris Component",type:"object",categories:{basic:{description:"Basic Infomation",title:"基本信息",properties:{id:{description:"组件标识",title:"标识",type:"string",readonly:!0},type:{description:"组件类型",title:"控件类型",type:"select",editor:{type:"waiting for modification",enum:[]}}}},behavior:{description:"Basic Infomation",title:"行为",properties:{editable:{description:"",title:"允许编辑",type:"boolean"},readonly:{description:"",title:"只读",type:"string"},required:{description:"",title:"必填",type:"boolean"},visible:{description:"",title:"可见",type:"boolean"},placeholder:{description:"",title:"提示文本",type:"string"},tabindex:{description:"",title:"tab索引",type:"number"},textAlign:{description:"",title:"对齐方式",type:"enum",editor:{type:"combo-list",textField:"name",valueField:"value",data:[{value:"left",name:"左对齐"},{value:"center",name:"居中"},{value:"right",name:"右对齐"}]}}}}}},_=D.createPropsResolver(le.buttonEditProps,Ve,Oe,ze,Ne);G.register=(t,n,a,o)=>{t["button-edit"]=le,n["button-edit"]=_},G.registerDesigner=(t,n,a)=>{t["button-edit"]=G,n["button-edit"]=_};const Se=P.withInstall(G);O.FButtonEditDesign=G,O.default=Se,O.propsResolver=_,Object.defineProperties(O,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { resolveAppearance as g, createPropsResolver as h } from "../../components/dynamic-resolver/index.esm.js";
|
|
2
|
+
import { withInstall as b } from "../../components/common/index.esm.js";
|
|
3
|
+
import y, { checkboxProps as x } from "../../components/checkbox/index.esm.js";
|
|
4
|
+
import { defineComponent as k, ref as a, inject as d, onMounted as v, watch as C, createVNode as l } from "vue";
|
|
5
|
+
import { useDesignerComponent as P } from "../../components/designer-canvas/index.esm.js";
|
|
6
|
+
import { InputBaseProperty as B } from "../../components/property-panel/index.esm.js";
|
|
7
|
+
class R extends B {
|
|
8
|
+
constructor(t, o) {
|
|
9
|
+
super(t, o);
|
|
10
|
+
}
|
|
11
|
+
getEditorProperties(t) {
|
|
12
|
+
return this.getComponentConfig(t, { type: "check-box" }, {
|
|
13
|
+
placeholder: {
|
|
14
|
+
visible: !1
|
|
15
|
+
},
|
|
16
|
+
disabled: {
|
|
17
|
+
visible: !1
|
|
18
|
+
},
|
|
19
|
+
label: {
|
|
20
|
+
description: "",
|
|
21
|
+
title: "名称",
|
|
22
|
+
type: "string"
|
|
23
|
+
}
|
|
24
|
+
// name: {
|
|
25
|
+
// description: "控件名称,提交时的唯一标识,可以为空但不能与其他控件重复",
|
|
26
|
+
// title: "控件名称",
|
|
27
|
+
// type: "string"
|
|
28
|
+
// }
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
function S(e, t) {
|
|
33
|
+
const o = e.schema;
|
|
34
|
+
function n(i, c) {
|
|
35
|
+
return new R(i, t).getPropertyConfig(o, c);
|
|
36
|
+
}
|
|
37
|
+
return { getPropsConfig: n };
|
|
38
|
+
}
|
|
39
|
+
const T = {
|
|
40
|
+
/** 组件唯一标识 */
|
|
41
|
+
id: { Type: String, default: "" },
|
|
42
|
+
/** 自定义样式 */
|
|
43
|
+
customClass: { Type: String, default: "" },
|
|
44
|
+
/** 禁用状态 */
|
|
45
|
+
disabled: { Type: Boolean, default: !1 },
|
|
46
|
+
/**
|
|
47
|
+
* 功能同disabled
|
|
48
|
+
*/
|
|
49
|
+
readonly: { type: Boolean, default: !1 },
|
|
50
|
+
/** 中间状态 */
|
|
51
|
+
indeterminate: { Type: Boolean, default: !1 },
|
|
52
|
+
/** 选择状态 */
|
|
53
|
+
modelValue: { Type: Boolean, default: !1 },
|
|
54
|
+
/**
|
|
55
|
+
* 作为内嵌编辑器被创建后默认获得焦点
|
|
56
|
+
*/
|
|
57
|
+
focusOnCreated: { type: Boolean, default: !1 },
|
|
58
|
+
/** 选中的值 value与modelValue重合 TODO*/
|
|
59
|
+
value: { type: String, default: "" },
|
|
60
|
+
/** name值 */
|
|
61
|
+
name: { type: String, default: "" },
|
|
62
|
+
/** 标识是否被选中 */
|
|
63
|
+
checked: { type: Boolean, default: !1 },
|
|
64
|
+
/** 显示文本标签 */
|
|
65
|
+
label: { type: String, default: "" }
|
|
66
|
+
}, r = /* @__PURE__ */ k({
|
|
67
|
+
name: "FCheckBoxDesign",
|
|
68
|
+
props: T,
|
|
69
|
+
emits: [],
|
|
70
|
+
setup(e, t) {
|
|
71
|
+
const o = a(), n = a(e.id), i = a(e.indeterminate), c = d("designer-host-service"), s = d("design-item-context"), f = S(s, c), p = P(o, s, f);
|
|
72
|
+
return v(() => {
|
|
73
|
+
o.value.componentInstance = p;
|
|
74
|
+
}), C(() => e.indeterminate, (m) => {
|
|
75
|
+
i.value = m;
|
|
76
|
+
}), t.expose(p.value), () => l("div", {
|
|
77
|
+
ref: o,
|
|
78
|
+
dragref: `${s.schema.id}-container`,
|
|
79
|
+
class: "drag-container custom-control custom-checkbox"
|
|
80
|
+
}, [l("input", {
|
|
81
|
+
type: "checkbox",
|
|
82
|
+
class: "custom-control-input",
|
|
83
|
+
id: n,
|
|
84
|
+
value: e.value,
|
|
85
|
+
checked: !1,
|
|
86
|
+
readonly: !0
|
|
87
|
+
}, null), l("div", {
|
|
88
|
+
class: "custom-control-label"
|
|
89
|
+
}, [e.label])]);
|
|
90
|
+
}
|
|
91
|
+
}), j = "https://json-schema.org/draft/2020-12/schema", I = "https://farris-design.gitee.io/check-box.schema.json", M = "check-box", $ = "A Farris Input Component", D = "object", q = {
|
|
92
|
+
id: {
|
|
93
|
+
description: "The unique identifier for a check box",
|
|
94
|
+
type: "string"
|
|
95
|
+
},
|
|
96
|
+
type: {
|
|
97
|
+
description: "The type string of check box component",
|
|
98
|
+
type: "string",
|
|
99
|
+
default: "check-box"
|
|
100
|
+
},
|
|
101
|
+
appearance: {
|
|
102
|
+
description: "",
|
|
103
|
+
type: "object",
|
|
104
|
+
properties: {
|
|
105
|
+
class: {
|
|
106
|
+
type: "string"
|
|
107
|
+
},
|
|
108
|
+
style: {
|
|
109
|
+
type: "string"
|
|
110
|
+
}
|
|
111
|
+
},
|
|
112
|
+
default: {}
|
|
113
|
+
},
|
|
114
|
+
binding: {
|
|
115
|
+
description: "",
|
|
116
|
+
type: "object",
|
|
117
|
+
default: {}
|
|
118
|
+
},
|
|
119
|
+
disabled: {
|
|
120
|
+
type: "string",
|
|
121
|
+
default: !1
|
|
122
|
+
},
|
|
123
|
+
editable: {
|
|
124
|
+
description: "",
|
|
125
|
+
type: "boolean",
|
|
126
|
+
default: !0
|
|
127
|
+
},
|
|
128
|
+
placeholder: {
|
|
129
|
+
description: "",
|
|
130
|
+
type: "string",
|
|
131
|
+
default: ""
|
|
132
|
+
},
|
|
133
|
+
text: {
|
|
134
|
+
description: "",
|
|
135
|
+
type: "string",
|
|
136
|
+
default: ""
|
|
137
|
+
},
|
|
138
|
+
value: {
|
|
139
|
+
description: "",
|
|
140
|
+
type: "string",
|
|
141
|
+
default: ""
|
|
142
|
+
},
|
|
143
|
+
readonly: {
|
|
144
|
+
description: "",
|
|
145
|
+
type: "boolean",
|
|
146
|
+
default: !1
|
|
147
|
+
},
|
|
148
|
+
tabindex: {
|
|
149
|
+
description: "",
|
|
150
|
+
type: "number",
|
|
151
|
+
default: -1
|
|
152
|
+
},
|
|
153
|
+
visible: {
|
|
154
|
+
description: "",
|
|
155
|
+
type: "boolean",
|
|
156
|
+
default: !0
|
|
157
|
+
},
|
|
158
|
+
required: {
|
|
159
|
+
description: "",
|
|
160
|
+
type: "boolean",
|
|
161
|
+
default: !1
|
|
162
|
+
},
|
|
163
|
+
label: {
|
|
164
|
+
description: "",
|
|
165
|
+
type: "string",
|
|
166
|
+
default: ""
|
|
167
|
+
}
|
|
168
|
+
}, w = [
|
|
169
|
+
"type"
|
|
170
|
+
], F = [
|
|
171
|
+
"id",
|
|
172
|
+
"appearance",
|
|
173
|
+
"binding",
|
|
174
|
+
"visible"
|
|
175
|
+
], A = {
|
|
176
|
+
$schema: j,
|
|
177
|
+
$id: I,
|
|
178
|
+
title: M,
|
|
179
|
+
description: $,
|
|
180
|
+
type: D,
|
|
181
|
+
properties: q,
|
|
182
|
+
required: w,
|
|
183
|
+
ignore: F
|
|
184
|
+
}, G = /* @__PURE__ */ new Map([
|
|
185
|
+
["appearance", g]
|
|
186
|
+
]);
|
|
187
|
+
function V(e, t, o) {
|
|
188
|
+
return t;
|
|
189
|
+
}
|
|
190
|
+
const u = h(
|
|
191
|
+
x,
|
|
192
|
+
A,
|
|
193
|
+
G,
|
|
194
|
+
V
|
|
195
|
+
);
|
|
196
|
+
r.register = (e, t, o, n) => {
|
|
197
|
+
e["check-box"] = y, t["check-box"] = u;
|
|
198
|
+
};
|
|
199
|
+
r.registerDesigner = (e, t, o) => {
|
|
200
|
+
e["check-box"] = r, t["check-box"] = u;
|
|
201
|
+
};
|
|
202
|
+
const K = b(r);
|
|
203
|
+
export {
|
|
204
|
+
r as FCheckboxDesigner,
|
|
205
|
+
u as checkBoxPropsResolver,
|
|
206
|
+
K as default
|
|
207
|
+
};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(function(e,i){typeof exports=="object"&&typeof module<"u"?i(exports,require("../../components/dynamic-resolver/index.umd.js"),require("../../components/common/index.umd.js"),require("../../components/checkbox/index.umd.js"),require("vue"),require("../../components/designer-canvas/index.umd.js"),require("../../components/property-panel/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","../../components/dynamic-resolver/index.umd.js","../../components/common/index.umd.js","../../components/checkbox/index.umd.js","vue","../../components/designer-canvas/index.umd.js","../../components/property-panel/index.umd.js"],i):(e=typeof globalThis<"u"?globalThis:e||self,i(e.checkbox={},e.dynamicResolver,e.common,e.FCheckbox,e.Vue,e.designerCanvas,e.propertyPanel))})(this,function(e,i,m,u,o,h,y){"use strict";class g extends y.InputBaseProperty{constructor(n,s){super(n,s)}getEditorProperties(n){return this.getComponentConfig(n,{type:"check-box"},{placeholder:{visible:!1},disabled:{visible:!1},label:{description:"",title:"名称",type:"string"}})}}function x(t,n){const s=t.schema;function c(p,l){return new g(p,n).getPropertyConfig(s,l)}return{getPropsConfig:c}}const b={id:{Type:String,default:""},customClass:{Type:String,default:""},disabled:{Type:Boolean,default:!1},readonly:{type:Boolean,default:!1},indeterminate:{Type:Boolean,default:!1},modelValue:{Type:Boolean,default:!1},focusOnCreated:{type:Boolean,default:!1},value:{type:String,default:""},name:{type:String,default:""},checked:{type:Boolean,default:!1},label:{type:String,default:""}},r=o.defineComponent({name:"FCheckBoxDesign",props:b,emits:[],setup(t,n){const s=o.ref(),c=o.ref(t.id),p=o.ref(t.indeterminate),l=o.inject("designer-host-service"),d=o.inject("design-item-context"),P=x(d,l),f=h.useDesignerComponent(s,d,P);return o.onMounted(()=>{s.value.componentInstance=f}),o.watch(()=>t.indeterminate,B=>{p.value=B}),n.expose(f.value),()=>o.createVNode("div",{ref:s,dragref:`${d.schema.id}-container`,class:"drag-container custom-control custom-checkbox"},[o.createVNode("input",{type:"checkbox",class:"custom-control-input",id:c,value:t.value,checked:!1,readonly:!0},null),o.createVNode("div",{class:"custom-control-label"},[t.label])])}}),k={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/check-box.schema.json",title:"check-box",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for a check box",type:"string"},type:{description:"The type string of check box component",type:"string",default:"check-box"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},disabled:{type:"string",default:!1},editable:{description:"",type:"boolean",default:!0},placeholder:{description:"",type:"string",default:""},text:{description:"",type:"string",default:""},value:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0},required:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""}},required:["type"],ignore:["id","appearance","binding","visible"]},v=new Map([["appearance",i.resolveAppearance]]);function j(t,n,s){return n}const a=i.createPropsResolver(u.checkboxProps,k,v,j);r.register=(t,n,s,c)=>{t["check-box"]=u,n["check-box"]=a},r.registerDesigner=(t,n,s)=>{t["check-box"]=r,n["check-box"]=a};const C=m.withInstall(r);e.FCheckboxDesigner=r,e.checkBoxPropsResolver=a,e.default=C,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
@@ -0,0 +1,377 @@
|
|
|
1
|
+
import { radioCheckboxCommonProps as F, withInstall as P } from "../../components/common/index.esm.js";
|
|
2
|
+
import { resolveAppearance as V, createPropsResolver as T } from "../../components/dynamic-resolver/index.esm.js";
|
|
3
|
+
import G, { checkboxGroupProps as I } from "../../components/checkbox-group/index.esm.js";
|
|
4
|
+
import { computed as k, ref as y, watch as x, defineComponent as R, inject as S, onMounted as A, createVNode as h } from "vue";
|
|
5
|
+
import { useDesignerComponent as w } from "../../components/designer-canvas/index.esm.js";
|
|
6
|
+
import { InputBaseProperty as B } from "../../components/property-panel/index.esm.js";
|
|
7
|
+
const M = {
|
|
8
|
+
...F,
|
|
9
|
+
/**
|
|
10
|
+
* 组件标识
|
|
11
|
+
*/
|
|
12
|
+
id: String,
|
|
13
|
+
/**
|
|
14
|
+
* 禁用组件,不允许切换单选值
|
|
15
|
+
*/
|
|
16
|
+
disabled: { type: Boolean, default: !1 },
|
|
17
|
+
/**
|
|
18
|
+
* 同disabled
|
|
19
|
+
*/
|
|
20
|
+
readonly: { type: Boolean, default: !1 },
|
|
21
|
+
/**
|
|
22
|
+
* 单选组枚举数组---废弃
|
|
23
|
+
*/
|
|
24
|
+
enumData: {
|
|
25
|
+
type: Array,
|
|
26
|
+
default: []
|
|
27
|
+
},
|
|
28
|
+
/**
|
|
29
|
+
* 单选组枚举数组
|
|
30
|
+
*/
|
|
31
|
+
data: {
|
|
32
|
+
type: Array,
|
|
33
|
+
default: []
|
|
34
|
+
},
|
|
35
|
+
/**
|
|
36
|
+
* 值类型是否为字符串
|
|
37
|
+
*/
|
|
38
|
+
isStringValue: { type: Boolean, default: !0 },
|
|
39
|
+
/**
|
|
40
|
+
* 异步获取枚举数组方法
|
|
41
|
+
*/
|
|
42
|
+
// loadData: () => Observable < { data: Array<Checkbox> } >
|
|
43
|
+
loadData: { type: Function },
|
|
44
|
+
/**
|
|
45
|
+
* 组件值,字符串或者数组
|
|
46
|
+
*/
|
|
47
|
+
modelValue: [String, Array],
|
|
48
|
+
/**
|
|
49
|
+
* 组件名称
|
|
50
|
+
*/
|
|
51
|
+
name: { type: String, default: "" },
|
|
52
|
+
/**
|
|
53
|
+
* 分隔符,默认逗号
|
|
54
|
+
*/
|
|
55
|
+
separator: { type: String, default: "," },
|
|
56
|
+
/**
|
|
57
|
+
* 输入框Tab键索引
|
|
58
|
+
*/
|
|
59
|
+
tabIndex: { type: Number, default: 0 },
|
|
60
|
+
/**
|
|
61
|
+
* 枚举数组中展示文本的key值。
|
|
62
|
+
*/
|
|
63
|
+
textField: { type: String, default: "name" },
|
|
64
|
+
/**
|
|
65
|
+
* 枚举数组中枚举值的key值。
|
|
66
|
+
*/
|
|
67
|
+
valueField: { type: String, default: "value" }
|
|
68
|
+
};
|
|
69
|
+
function D(e, t, n) {
|
|
70
|
+
const l = k(() => !(e.readonly && e.disabled)), o = y(e.data || e.enumData || e.options);
|
|
71
|
+
function s(a) {
|
|
72
|
+
return a[e.valueField];
|
|
73
|
+
}
|
|
74
|
+
function f(a) {
|
|
75
|
+
return a[e.textField];
|
|
76
|
+
}
|
|
77
|
+
function p(a) {
|
|
78
|
+
return a ? e.isStringValue ? a.split(e.separator) : a : [];
|
|
79
|
+
}
|
|
80
|
+
function m(a) {
|
|
81
|
+
const i = o.value.map((r) => s(r)).filter((r) => a.some((c) => c === String(r)));
|
|
82
|
+
return e.isStringValue ? i.join(e.separator) : i;
|
|
83
|
+
}
|
|
84
|
+
function b(a) {
|
|
85
|
+
const u = String(s(a));
|
|
86
|
+
return p(n.value).some((r) => r === u);
|
|
87
|
+
}
|
|
88
|
+
function g(a, u) {
|
|
89
|
+
if (l.value) {
|
|
90
|
+
let i = p(n.value) || [];
|
|
91
|
+
const r = String(s(a));
|
|
92
|
+
!i || !i.length ? i.push(r) : i.some((c) => c === r) ? i = i.filter((c) => c !== r) : i.push(r), n.value = m(i), t.emit("changeValue", n.value), t.emit("update:modelValue", n.value);
|
|
93
|
+
}
|
|
94
|
+
u.stopPropagation();
|
|
95
|
+
}
|
|
96
|
+
return x(() => e.data, () => {
|
|
97
|
+
o.value = e.data;
|
|
98
|
+
}), x(() => e.enumData, () => {
|
|
99
|
+
o.value = e.enumData;
|
|
100
|
+
}), {
|
|
101
|
+
enumData: o,
|
|
102
|
+
getValue: s,
|
|
103
|
+
getText: f,
|
|
104
|
+
checked: b,
|
|
105
|
+
onClickCheckbox: g
|
|
106
|
+
};
|
|
107
|
+
}
|
|
108
|
+
class E extends B {
|
|
109
|
+
constructor(t, n) {
|
|
110
|
+
super(t, n);
|
|
111
|
+
}
|
|
112
|
+
getEditorProperties(t) {
|
|
113
|
+
const n = this;
|
|
114
|
+
return n.getComponentConfig(t, { type: "check-group" }, {
|
|
115
|
+
placeholder: {
|
|
116
|
+
visible: !1
|
|
117
|
+
},
|
|
118
|
+
disabled: {
|
|
119
|
+
visible: !1
|
|
120
|
+
},
|
|
121
|
+
direction: {
|
|
122
|
+
description: "",
|
|
123
|
+
title: "排列方向",
|
|
124
|
+
type: "enum",
|
|
125
|
+
editor: {
|
|
126
|
+
data: [
|
|
127
|
+
{ id: "horizontal", name: "横向" },
|
|
128
|
+
{ id: "vertical", name: "纵向" }
|
|
129
|
+
]
|
|
130
|
+
}
|
|
131
|
+
},
|
|
132
|
+
dataSourceType: {
|
|
133
|
+
description: "",
|
|
134
|
+
title: "数据源类型",
|
|
135
|
+
type: "enum",
|
|
136
|
+
visible: !1,
|
|
137
|
+
editor: {
|
|
138
|
+
default: "static",
|
|
139
|
+
data: [
|
|
140
|
+
{ id: "static", name: "静态" },
|
|
141
|
+
{ id: "dynamic", name: "动态" }
|
|
142
|
+
]
|
|
143
|
+
},
|
|
144
|
+
refreshPanelAfterChanged: !0
|
|
145
|
+
},
|
|
146
|
+
data: {
|
|
147
|
+
description: "",
|
|
148
|
+
title: "数据",
|
|
149
|
+
type: "array",
|
|
150
|
+
visible: !t.editor.dataSourceType || t.editor.dataSourceType === "static",
|
|
151
|
+
...n.getItemCollectionEditor(t, t.editor.valueField, t.editor.textField),
|
|
152
|
+
// 这个属性,标记当属性变更得时候触发重新更新属性
|
|
153
|
+
refreshPanelAfterChanged: !0
|
|
154
|
+
},
|
|
155
|
+
bindDataSource: {
|
|
156
|
+
description: "",
|
|
157
|
+
title: "绑定数据源",
|
|
158
|
+
type: "string",
|
|
159
|
+
visible: t.editor.dataSourceType === "dynamic"
|
|
160
|
+
},
|
|
161
|
+
textField: {
|
|
162
|
+
description: "",
|
|
163
|
+
title: "文本字段",
|
|
164
|
+
type: "string",
|
|
165
|
+
readonly: t.editor.dataSourceType !== "dynamic"
|
|
166
|
+
},
|
|
167
|
+
valueField: {
|
|
168
|
+
description: "",
|
|
169
|
+
title: "值字段",
|
|
170
|
+
type: "string",
|
|
171
|
+
readonly: t.editor.dataSourceType !== "dynamic"
|
|
172
|
+
}
|
|
173
|
+
}, (o, s) => {
|
|
174
|
+
if (o)
|
|
175
|
+
switch (o.propertyID) {
|
|
176
|
+
case "dataSourceType": {
|
|
177
|
+
o.propertyValue === "static" && (t.editor.valueField = "value", t.editor.textField = "name");
|
|
178
|
+
break;
|
|
179
|
+
}
|
|
180
|
+
case "data": {
|
|
181
|
+
t.formatter && (t.formatter.data = [...o.propertyValue]);
|
|
182
|
+
break;
|
|
183
|
+
}
|
|
184
|
+
}
|
|
185
|
+
});
|
|
186
|
+
}
|
|
187
|
+
}
|
|
188
|
+
function $(e, t) {
|
|
189
|
+
const n = e.schema;
|
|
190
|
+
function l(o, s) {
|
|
191
|
+
return new E(o, t).getPropertyConfig(n, s);
|
|
192
|
+
}
|
|
193
|
+
return { getPropsConfig: l };
|
|
194
|
+
}
|
|
195
|
+
const v = /* @__PURE__ */ R({
|
|
196
|
+
name: "FCheckboxGroupDesign",
|
|
197
|
+
props: M,
|
|
198
|
+
emits: ["changeValue", "update:modelValue"],
|
|
199
|
+
setup(e, t) {
|
|
200
|
+
const n = y(e.modelValue), l = y(e.name), o = k(() => ({
|
|
201
|
+
"farris-checkradio-hor": e.direction === "horizontal"
|
|
202
|
+
})), {
|
|
203
|
+
enumData: s,
|
|
204
|
+
getValue: f,
|
|
205
|
+
getText: p
|
|
206
|
+
} = D(e, t, n), m = y(), b = S("designer-host-service"), g = S("design-item-context"), a = $(g, b), u = w(m, g, a);
|
|
207
|
+
A(() => {
|
|
208
|
+
m.value.componentInstance = u;
|
|
209
|
+
});
|
|
210
|
+
const i = k(() => {
|
|
211
|
+
if (!s.value || s.value.length === 0) {
|
|
212
|
+
const r = [];
|
|
213
|
+
return [{
|
|
214
|
+
value: "example1",
|
|
215
|
+
name: "示例一"
|
|
216
|
+
}, {
|
|
217
|
+
value: "example2",
|
|
218
|
+
name: "示例二"
|
|
219
|
+
}].map((c) => {
|
|
220
|
+
const d = {};
|
|
221
|
+
d[e.valueField] = c.value, d[e.textField] = c.name, r.push(d);
|
|
222
|
+
}), r;
|
|
223
|
+
}
|
|
224
|
+
return s.value;
|
|
225
|
+
});
|
|
226
|
+
return t.expose(u.value), x(() => e.modelValue, (r) => {
|
|
227
|
+
n.value = r, t.emit("changeValue", n.value);
|
|
228
|
+
}), () => h("div", {
|
|
229
|
+
ref: m,
|
|
230
|
+
class: ["farris-input-wrap", o.value]
|
|
231
|
+
}, [i.value.map((r, c) => {
|
|
232
|
+
const d = "checkbox_" + l.value + c;
|
|
233
|
+
return h("div", {
|
|
234
|
+
class: "custom-control custom-checkbox"
|
|
235
|
+
}, [h("input", {
|
|
236
|
+
type: "checkbox",
|
|
237
|
+
class: "custom-control-input",
|
|
238
|
+
name: l.value,
|
|
239
|
+
id: d,
|
|
240
|
+
value: f(r),
|
|
241
|
+
checked: !1,
|
|
242
|
+
readonly: !0,
|
|
243
|
+
disabled: !0
|
|
244
|
+
}, null), h("label", {
|
|
245
|
+
class: "custom-control-label",
|
|
246
|
+
for: d,
|
|
247
|
+
title: p(r)
|
|
248
|
+
}, [p(r)])]);
|
|
249
|
+
})]);
|
|
250
|
+
}
|
|
251
|
+
}), j = /* @__PURE__ */ new Map([
|
|
252
|
+
["appearance", V]
|
|
253
|
+
]);
|
|
254
|
+
function q(e, t, n) {
|
|
255
|
+
return t;
|
|
256
|
+
}
|
|
257
|
+
const z = "https://json-schema.org/draft/2020-12/schema", N = "https://farris-design.gitee.io/check-box.schema.json", H = "check-group", _ = "A Farris Input Component", J = "object", K = {
|
|
258
|
+
id: {
|
|
259
|
+
description: "The unique identifier for a check box",
|
|
260
|
+
type: "string"
|
|
261
|
+
},
|
|
262
|
+
type: {
|
|
263
|
+
description: "The type string of check box component",
|
|
264
|
+
type: "string",
|
|
265
|
+
default: "check-group"
|
|
266
|
+
},
|
|
267
|
+
appearance: {
|
|
268
|
+
description: "",
|
|
269
|
+
type: "object",
|
|
270
|
+
properties: {
|
|
271
|
+
class: {
|
|
272
|
+
type: "string"
|
|
273
|
+
},
|
|
274
|
+
style: {
|
|
275
|
+
type: "string"
|
|
276
|
+
}
|
|
277
|
+
},
|
|
278
|
+
default: {}
|
|
279
|
+
},
|
|
280
|
+
binding: {
|
|
281
|
+
description: "",
|
|
282
|
+
type: "object",
|
|
283
|
+
default: {}
|
|
284
|
+
},
|
|
285
|
+
disabled: {
|
|
286
|
+
description: "",
|
|
287
|
+
type: "boolean",
|
|
288
|
+
default: !1
|
|
289
|
+
},
|
|
290
|
+
textField: {
|
|
291
|
+
description: "",
|
|
292
|
+
type: "string",
|
|
293
|
+
default: "name"
|
|
294
|
+
},
|
|
295
|
+
valueField: {
|
|
296
|
+
description: "",
|
|
297
|
+
type: "string",
|
|
298
|
+
default: "value"
|
|
299
|
+
},
|
|
300
|
+
dataSourceType: {
|
|
301
|
+
description: "",
|
|
302
|
+
type: "string",
|
|
303
|
+
default: "static"
|
|
304
|
+
},
|
|
305
|
+
data: {
|
|
306
|
+
description: "",
|
|
307
|
+
type: "array"
|
|
308
|
+
},
|
|
309
|
+
bindDataSource: {
|
|
310
|
+
description: "",
|
|
311
|
+
type: "string",
|
|
312
|
+
default: ""
|
|
313
|
+
},
|
|
314
|
+
readonly: {
|
|
315
|
+
description: "",
|
|
316
|
+
type: "boolean",
|
|
317
|
+
default: !1
|
|
318
|
+
},
|
|
319
|
+
tabindex: {
|
|
320
|
+
description: "",
|
|
321
|
+
type: "number",
|
|
322
|
+
default: -1
|
|
323
|
+
},
|
|
324
|
+
separator: {
|
|
325
|
+
description: "",
|
|
326
|
+
type: "string",
|
|
327
|
+
default: ","
|
|
328
|
+
},
|
|
329
|
+
name: {
|
|
330
|
+
description: "",
|
|
331
|
+
type: "string",
|
|
332
|
+
default: ""
|
|
333
|
+
},
|
|
334
|
+
required: {
|
|
335
|
+
description: "",
|
|
336
|
+
type: "boolean",
|
|
337
|
+
default: !1
|
|
338
|
+
},
|
|
339
|
+
direction: {
|
|
340
|
+
description: "",
|
|
341
|
+
type: "string",
|
|
342
|
+
default: "horizontal"
|
|
343
|
+
}
|
|
344
|
+
}, L = [
|
|
345
|
+
"type"
|
|
346
|
+
], Q = [
|
|
347
|
+
"id",
|
|
348
|
+
"appearance",
|
|
349
|
+
"binding",
|
|
350
|
+
"visible"
|
|
351
|
+
], U = {
|
|
352
|
+
$schema: z,
|
|
353
|
+
$id: N,
|
|
354
|
+
title: H,
|
|
355
|
+
description: _,
|
|
356
|
+
type: J,
|
|
357
|
+
properties: K,
|
|
358
|
+
required: L,
|
|
359
|
+
ignore: Q
|
|
360
|
+
}, C = T(
|
|
361
|
+
I,
|
|
362
|
+
U,
|
|
363
|
+
j,
|
|
364
|
+
q
|
|
365
|
+
);
|
|
366
|
+
v.register = (e, t, n, l) => {
|
|
367
|
+
e["check-group"] = G, t["check-group"] = C;
|
|
368
|
+
};
|
|
369
|
+
v.registerDesigner = (e, t, n) => {
|
|
370
|
+
e["check-group"] = v, t["check-group"] = C;
|
|
371
|
+
};
|
|
372
|
+
const te = P(v);
|
|
373
|
+
export {
|
|
374
|
+
v as FCheckboxGroupDesigner,
|
|
375
|
+
C as checkBoxGroupPropsResolver,
|
|
376
|
+
te as default
|
|
377
|
+
};
|