@farris/ui-vue 1.3.4 → 1.3.6

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 (145) hide show
  1. package/components/accordion/index.esm.js +16 -16
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +65 -65
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.esm.js +13 -13
  6. package/components/button-edit/index.umd.cjs +1 -1
  7. package/components/calendar/index.esm.js +504 -490
  8. package/components/calendar/index.umd.cjs +1 -1
  9. package/components/capsule/index.esm.js +247 -233
  10. package/components/capsule/index.umd.cjs +1 -1
  11. package/components/checkbox/index.esm.js +356 -344
  12. package/components/checkbox/index.umd.cjs +1 -1
  13. package/components/color-picker/index.esm.js +159 -145
  14. package/components/color-picker/index.umd.cjs +2 -2
  15. package/components/combo-list/index.esm.js +127 -128
  16. package/components/combo-list/index.umd.cjs +1 -1
  17. package/components/combo-tree/index.esm.js +15 -15
  18. package/components/combo-tree/index.umd.cjs +1 -1
  19. package/components/component/index.esm.js +101 -87
  20. package/components/component/index.umd.cjs +1 -1
  21. package/components/condition/index.esm.js +9 -7
  22. package/components/condition/index.umd.cjs +1 -1
  23. package/components/content-container/index.esm.js +181 -167
  24. package/components/content-container/index.umd.cjs +1 -1
  25. package/components/data-grid/index.esm.js +746 -730
  26. package/components/data-grid/index.umd.cjs +1 -1
  27. package/components/data-view/index.esm.js +9 -7
  28. package/components/data-view/index.umd.cjs +1 -1
  29. package/components/date-picker/index.esm.js +789 -777
  30. package/components/date-picker/index.umd.cjs +1 -1
  31. package/components/designer-canvas/index.esm.js +3096 -3069
  32. package/components/designer-canvas/index.umd.cjs +1 -1
  33. package/components/dropdown/index.esm.js +257 -243
  34. package/components/dropdown/index.umd.cjs +2 -2
  35. package/components/dynamic-form/index.esm.js +322 -306
  36. package/components/dynamic-form/index.umd.cjs +1 -1
  37. package/components/dynamic-resolver/index.esm.js +177 -163
  38. package/components/dynamic-resolver/index.umd.cjs +1 -1
  39. package/components/event-parameter/index.esm.js +78 -82
  40. package/components/event-parameter/index.umd.cjs +1 -1
  41. package/components/events-editor/index.esm.js +501 -487
  42. package/components/events-editor/index.umd.cjs +1 -1
  43. package/components/expression-editor/index.esm.js +37 -37
  44. package/components/expression-editor/index.umd.cjs +1 -1
  45. package/components/external-container/index.esm.js +487 -472
  46. package/components/external-container/index.umd.cjs +1 -1
  47. package/components/field-selector/index.esm.js +440 -433
  48. package/components/field-selector/index.umd.cjs +1 -1
  49. package/components/filter-bar/index.esm.js +594 -587
  50. package/components/filter-bar/index.umd.cjs +1 -1
  51. package/components/flow-canvas/index.esm.js +2766 -2739
  52. package/components/flow-canvas/index.umd.cjs +1 -1
  53. package/components/image-cropper/index.esm.js +402 -388
  54. package/components/image-cropper/index.umd.cjs +1 -1
  55. package/components/input-group/index.esm.js +201 -202
  56. package/components/input-group/index.umd.cjs +1 -1
  57. package/components/layout/index.esm.js +264 -245
  58. package/components/layout/index.umd.cjs +1 -1
  59. package/components/list-nav/index.esm.js +157 -143
  60. package/components/list-nav/index.umd.cjs +1 -1
  61. package/components/list-view/index.esm.js +314 -298
  62. package/components/list-view/index.umd.cjs +1 -1
  63. package/components/lookup/index.esm.js +862 -843
  64. package/components/lookup/index.umd.cjs +1 -1
  65. package/components/mapping-editor/index.esm.js +1031 -1015
  66. package/components/mapping-editor/index.umd.cjs +1 -1
  67. package/components/nav/index.esm.js +169 -155
  68. package/components/nav/index.umd.cjs +2 -2
  69. package/components/number-range/index.esm.js +150 -137
  70. package/components/number-range/index.umd.cjs +1 -1
  71. package/components/number-spinner/index.esm.js +207 -194
  72. package/components/number-spinner/index.umd.cjs +1 -1
  73. package/components/order/index.esm.js +427 -414
  74. package/components/order/index.umd.cjs +1 -1
  75. package/components/page-footer/index.esm.js +22 -22
  76. package/components/page-footer/index.umd.cjs +1 -1
  77. package/components/page-header/index.esm.js +510 -492
  78. package/components/page-header/index.umd.cjs +1 -1
  79. package/components/pagination/index.esm.js +192 -178
  80. package/components/pagination/index.umd.cjs +1 -1
  81. package/components/progress/index.esm.js +234 -220
  82. package/components/progress/index.umd.cjs +3 -3
  83. package/components/property-editor/index.esm.js +288 -277
  84. package/components/property-editor/index.umd.cjs +2 -2
  85. package/components/property-panel/index.esm.js +62 -61
  86. package/components/property-panel/index.umd.cjs +1 -1
  87. package/components/query-solution/index.esm.js +776 -770
  88. package/components/query-solution/index.umd.cjs +6 -6
  89. package/components/radio-button/index.esm.js +64 -64
  90. package/components/radio-button/index.umd.cjs +1 -1
  91. package/components/radio-group/index.esm.js +296 -283
  92. package/components/radio-group/index.umd.cjs +1 -1
  93. package/components/rate/index.esm.js +222 -208
  94. package/components/rate/index.umd.cjs +1 -1
  95. package/components/response-layout/index.esm.js +187 -173
  96. package/components/response-layout/index.umd.cjs +1 -1
  97. package/components/response-layout-editor/index.esm.js +554 -542
  98. package/components/response-layout-editor/index.umd.cjs +1 -1
  99. package/components/response-toolbar/index.esm.js +483 -469
  100. package/components/response-toolbar/index.umd.cjs +1 -1
  101. package/components/schema-selector/index.esm.js +634 -619
  102. package/components/schema-selector/index.umd.cjs +2 -2
  103. package/components/search-box/index.esm.js +228 -214
  104. package/components/search-box/index.umd.cjs +1 -1
  105. package/components/section/index.esm.js +419 -406
  106. package/components/section/index.umd.cjs +1 -1
  107. package/components/smoke-detector/index.esm.js +162 -148
  108. package/components/smoke-detector/index.umd.cjs +1 -1
  109. package/components/splitter/index.esm.js +308 -284
  110. package/components/splitter/index.umd.cjs +1 -1
  111. package/components/step/index.esm.js +279 -265
  112. package/components/step/index.umd.cjs +1 -1
  113. package/components/switch/index.esm.js +183 -170
  114. package/components/switch/index.umd.cjs +1 -1
  115. package/components/tabs/index.esm.js +307 -294
  116. package/components/tabs/index.umd.cjs +1 -1
  117. package/components/tags/index.esm.js +320 -306
  118. package/components/tags/index.umd.cjs +1 -1
  119. package/components/text/index.esm.js +245 -231
  120. package/components/text/index.umd.cjs +1 -1
  121. package/components/textarea/index.esm.js +260 -247
  122. package/components/textarea/index.umd.cjs +1 -1
  123. package/components/time-picker/index.esm.js +409 -396
  124. package/components/time-picker/index.umd.cjs +1 -1
  125. package/components/transfer/index.esm.js +424 -410
  126. package/components/transfer/index.umd.cjs +1 -1
  127. package/components/tree-grid/index.esm.js +383 -376
  128. package/components/tree-grid/index.umd.cjs +1 -1
  129. package/components/tree-view/index.esm.js +595 -575
  130. package/components/tree-view/index.umd.cjs +1 -1
  131. package/components/uploader/index.esm.js +325 -311
  132. package/components/uploader/index.umd.cjs +2 -2
  133. package/components/verify-detail/index.esm.js +304 -290
  134. package/components/verify-detail/index.umd.cjs +1 -1
  135. package/components/video/index.esm.js +99 -85
  136. package/components/video/index.umd.cjs +1 -1
  137. package/components/weather/index.esm.js +947 -933
  138. package/components/weather/index.umd.cjs +4 -4
  139. package/farris.all.esm.js +5492 -5470
  140. package/farris.all.umd.cjs +13 -13
  141. package/index.css +1 -1
  142. package/package.json +1 -1
  143. package/types/condition/src/composition/condition-value/input-group-value.d.ts +1 -1
  144. package/types/entity-binding-selector/composition/use-entity-tree.d.ts +3 -0
  145. package/types/entity-binding-selector/composition/use-field-tree.d.ts +1 -0
@@ -1 +1 @@
1
- (function(S,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es"],t):(S=typeof globalThis<"u"?globalThis:S||self,t(S.step={},S.Vue,S.LodashES))})(this,function(S,t,E){"use strict";const A={},z={};function L(r){const{properties:e,title:o,ignore:a}=r,l=a&&Array.isArray(a),b=Object.keys(e).reduce((d,O)=>((!l||!a.find(m=>m===O))&&(d[O]=e[O].type==="object"&&e[O].properties?L(e[O]):E.cloneDeep(e[O].default)),d),{});if(o&&(!l||!a.find(d=>d==="id"))){const d=o.toLowerCase().replace(/-/g,"_");b.id=`${d}_${Math.random().toString().slice(2,6)}`}return b}function F(r,e={},o){const a=A[r];if(a){let l=L(a);const b=z[r];return l=b?b({getSchemaByType:F},l,e,o):l,l}return null}function _(r,e){const o=L(e);return Object.keys(o).reduce((a,l)=>(a[l]&&E.isPlainObject(a[l])&&E.isPlainObject(r[l]||!r[l])?Object.assign(a[l],r[l]||{}):a[l]=r[l],a),o),o}function W(r,e){return Object.keys(r).filter(a=>r[a]!=null).reduce((a,l)=>{if(e.has(l)){const b=e.get(l);if(typeof b=="string")a[b]=r[l];else{const d=b(l,r[l],r);Object.assign(a,d)}}else a[l]=r[l];return a},{})}function H(r,e,o=new Map){const a=_(r,e);return W(a,o)}function G(r={}){function e(n,p,f,h){if(typeof f=="number")return h[n].length===f;if(typeof f=="object"){const j=Object.keys(f)[0],N=f[j];if(j==="not")return Number(h[n].length)!==Number(N);if(j==="moreThan")return Number(h[n].length)>=Number(N);if(j==="lessThan")return Number(h[n].length)<=Number(N)}return!1}function o(n,p,f,h){return h[n]&&h[n].propertyValue&&String(h[n].propertyValue.value)===String(f)}const a=new Map([["length",e],["getProperty",o]]);Object.keys(r).reduce((n,p)=>(n.set(p,r[p]),n),a);function l(n,p){const f=n;return typeof p=="number"?[{target:f,operator:"length",param:null,value:Number(p)}]:typeof p=="boolean"?[{target:f,operator:"getProperty",param:n,value:!!p}]:typeof p=="object"?Object.keys(p).map(h=>{if(h==="length")return{target:f,operator:"length",param:null,value:p[h]};const j=h,N=p[h];return{target:f,operator:"getProperty",param:j,value:N}}):[]}function b(n){return Object.keys(n).reduce((f,h)=>{const j=l(h,n[h]);return f.push(...j),f},[])}function d(n,p){if(a.has(n.operator)){const f=a.get(n.operator);return f&&f(n.target,n.param,n.value,p)||!1}return!1}function O(n,p){return b(n).reduce((j,N)=>j&&d(N,p),!0)}function m(n,p){const f=Object.keys(n),h=f.includes("allOf"),j=f.includes("anyOf"),N=h||j,V=(N?n[N?h?"allOf":"anyOf":"allOf"]:[n]).map(k=>O(k,p));return h?!V.includes(!1):V.includes(!0)}return{parseValueSchema:m}}const J={},Q={};G();function U(r,e,o=new Map,a=(d,O,m,n)=>O,l={},b=d=>d){return A[e.title]=e,z[e.title]=a,J[e.title]=l,Q[e.title]=b,(d={})=>{const O=H(d,e,o),m=Object.keys(r).reduce((n,p)=>(n[p]=r[p].default,n),{});return Object.assign(m,O)}}function X(r,e){return{customClass:e.class,customStyle:e.style}}const Y=new Map([["appearance",X]]);function Z(r,e,o){return e}const C={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/step.schema.json",title:"step",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for step",type:"string"},type:{description:"The type string of step",type:"string",default:"step"},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},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},K={title:"step",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:[]}}}}}},R={direction:{type:String,default:"horizontal"},fill:{type:Boolean,default:!1},height:{type:Number,default:0},clickable:{type:Boolean,default:!0},steps:{type:Array,default:[{id:"1",title:"审批中(示例)",description:"正在审批"},{id:"2",title:"复核中(示例)",description:"等待复核"}]},activeIndex:{type:Number,default:0},onClick:{type:Function,default:()=>{}}},B=U(R,C,Y,Z,K),w=t.defineComponent({name:"FStep",props:R,emits:["click"],setup(r,e){const o=t.ref(r.direction),a=t.ref(r.fill),l=t.ref(r.height),b=t.ref(r.steps),d=t.ref(r.clickable),O=t.ref(0),m=t.ref(r.activeIndex),n=t.computed(()=>({"f-progress-step-list":o.value==="horizontal","f-progress-step-list-block":o.value==="vertical","f-progress-step-horizontal-fill":o.value==="horizontal"&&a.value,"f-progress-step-vertical-fill":o.value==="vertical"&&a.value})),p=t.computed(()=>({height:o.value==="vertical"?`${l.value}px`:""}));function f(c,s){const g={step:!0,active:s===m.value,clickable:d.value,current:s===m.value};return s<m.value&&(g.finish=!0),g}function h(c,s){const g={step:c,stepIndex:s};e.emit("click",g)}function j(c,s){const g={"f-progressstep-row":!0,"step-active":s===m.value,"step-current":s===m.value};return s<m.value&&(g["step-finish"]=!0),g}function N(c,s){return{"step-icon":!0,"step-success":s,"f-icon":s,"f-icon-check":s}}function T(c,s){const g=[];return s>=m.value||s===O.value?g.push(t.createVNode("span",{class:"step-icon"},[s+1])):g.push(t.createVNode("span",{class:N(c,!0)},null)),g}function M(c,s){return{"step-name":!0,"step-name-success":s<m.value}}function V(c,s){return t.createVNode("div",{class:"f-progress-step-title"},[t.createVNode("p",{class:M(c,s)},[c.title])])}function P(c,s){return{"f-progress-step-line":!0,"f-progress-step-line-success":s===m.value}}function k(c,s){return s!==b.value.length-1}const $=t.computed(()=>({triangle:!0,"":o.value==="vertical"}));function y(){return b.value.map((c,s)=>t.createVNode("li",{class:f(c,s),onClick:g=>h(c,s)},[t.createVNode("div",{class:j(c,s)},[t.createVNode("div",{class:"f-progress-step-content"},[T(c,s),V(c,s)]),k(c,s)&&t.createVNode("div",{class:P(c,s)},[t.createVNode("span",{class:$.value},null)])])]))}return t.watch(()=>r.activeIndex,()=>{r.activeIndex>-1&&r.activeIndex<=b.value.length&&(m.value=r.activeIndex,y())}),()=>t.createVNode("div",{class:"f-progress-step"},[t.createVNode("ul",{class:n.value,style:p.value},[y()])])}});function I(r,e,o){var $;const a="",l="",b=t.ref();function d(){return(e==null?void 0:e.schema.componentType)!=="frame"}function O(){return!1}function m(){return(e==null?void 0:e.schema.componentType)!=="frame"}function n(){return(e==null?void 0:e.schema.componentType)==="frame"}function p(y){if(!y||!y.value)return null;if(y.value.schema&&y.value.schema.type==="component")return y.value;const c=t.ref(y==null?void 0:y.value.parent),s=p(c);return s||null}function f(y=e){const{componentInstance:c,designerItemElementRef:s}=y;return!c||!c.value?null:c.value.canMove?s:f(y.parent)}function h(y){return!!o}function j(){return(e==null?void 0:e.schema.label)||(e==null?void 0:e.schema.title)||(e==null?void 0:e.schema.name)}function N(){}function T(y,c){}function M(y,c){const{componentType:s}=y;let g=F(s,y,c);const i=s.toLowerCase().replace(/-/g,"_");return g&&!g.id&&g.type===s&&(g.id=`${i}_${Math.random().toString().slice(2,6)}`),g}function V(y){}function P(...y){}function k(){e!=null&&e.schema.contents&&e.schema.contents.map(y=>{var g;let c=y.id;y.type==="component-ref"&&(c=y.component);const s=r.value.querySelector(`#${c}-design-item`);(g=s==null?void 0:s.componentInstance)!=null&&g.value.onRemoveComponent&&s.componentInstance.value.onRemoveComponent()})}return b.value={canMove:d(),canSelectParent:O(),canDelete:m(),canNested:!n(),contents:e==null?void 0:e.schema.contents,elementRef:r,parent:($=e==null?void 0:e.parent)==null?void 0:$.componentInstance,schema:e==null?void 0:e.schema,styles:a,designerClass:l,canAccepts:h,getBelongedComponentInstance:p,getDraggableDesignItemElement:f,getDraggingDisplayText:j,getPropConfig:P,getDragScopeElement:N,onAcceptMovedChildElement:T,onChildElementMovedOut:V,addNewChildComponentSchema:M,triggerBelongedComponentToMoveWhenMoved:t.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:t.ref(!1),onRemoveComponent:k},b}const x=t.defineComponent({name:"FStepDesign",props:R,emits:[],setup(r,e){const o=t.ref(r.direction),a=t.ref(r.fill),l=t.ref(r.height),b=t.ref(r.steps),d=t.ref(0),O=t.ref(r.clickable),m=t.ref(0),n=t.ref(),p=t.inject("design-item-context"),f=I(n,p);t.onMounted(()=>{n.value.componentInstance=f}),e.expose(f.value);const h=t.computed(()=>({"f-progress-step-list":o.value==="horizontal","f-progress-step-list-block":o.value==="vertical","f-progress-step-horizontal-fill":o.value==="horizontal"&&a.value,"f-progress-step-vertical-fill":o.value==="vertical"&&a.value})),j=t.computed(()=>({height:o.value==="vertical"?`${l.value}px`:""}));function N(i,u){const v={step:!0,active:u===d.value,clickable:O.value,"click-disable":i.disable,current:u===d.value};return u<d.value&&(v.finish=!0),i.status&&(v[i.status]=!0),i.hasOwnProperty("class")&&i.class.split(" ").reduce((D,q)=>(D[q]=!0,D),v),v}function T(i,u){}function M(i,u){const v={"f-progressstep-row":!0,"step-active":u===d.value,"step-current":u===d.value};return u<d.value&&(v["step-finish"]=!0),i.status&&(v["step-"+i.status]=!0),v}function V(i,u){const v={"step-icon":!0,"step-success":u,"k-icon":u,"k-i-check":u};return i.hasOwnProperty("icon")&&i.class.split(" ").reduce((D,q)=>(D[q]=!0,D),v),v}function P(i,u){const v=[];return i.icon?v.push(t.createVNode("span",{class:V(i,!1)},null)):u>=d.value||u===m.value?v.push(t.createVNode("span",{class:"step-icon"},[u+1])):v.push(t.createVNode("span",{class:V(i,!0)},null)),v}function k(i,u){return{"step-name":!0,"step-name-success":u<d.value}}function $(i,u){return t.createVNode("div",{class:"f-progress-step-title"},[t.createVNode("p",{class:k(i,u)},[i.title])])}function y(i,u){return{"f-progress-step-line":!0,"f-progress-step-line-success":u===d.value}}function c(i,u){return u!==b.value.length-1}const s=t.computed(()=>({triangle:!0,"":o.value==="vertical"}));function g(){return b.value.map((i,u)=>t.createVNode("li",{class:N(i,u),onClick:v=>void 0},[t.createVNode("div",{class:M(i,u)},[t.createVNode("div",{class:"f-progress-step-content"},[P(i,u),$(i,u)]),c(i,u)&&t.createVNode("div",{class:y(i,u)},[t.createVNode("span",{class:s.value},null)])])]))}return()=>t.createVNode("div",{ref:n,class:"f-progress-step"},[t.createVNode("ul",{class:h.value,style:j.value},[g()])])}}),ee={install(r){r.component(w.name,w)},register(r,e,o,a){r.step=w,e.step=B},registerDesigner(r,e,o){r.step=x,e.step=B}};S.Step=w,S.default=ee,S.propsResolver=B,S.stepProps=R,Object.defineProperties(S,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(S,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue"),require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es"],t):(S=typeof globalThis<"u"?globalThis:S||self,t(S.step={},S.Vue,S.LodashES))})(this,function(S,t,R){"use strict";const B={},_={};function L(r){const{properties:e,title:l,ignore:n}=r,a=n&&Array.isArray(n),f=Object.keys(e).reduce((i,O)=>((!a||!n.find(m=>m===O))&&(i[O]=e[O].type==="object"&&e[O].properties?L(e[O]):R.cloneDeep(e[O].default)),i),{});if(l&&(!a||!n.find(i=>i==="id"))){const i=l.toLowerCase().replace(/-/g,"_");f.id=`${i}_${Math.random().toString().slice(2,6)}`}return f}function F(r){const{properties:e,title:l,required:n}=r;if(n&&Array.isArray(n)){const a=n.reduce((f,i)=>(f[i]=e[i].type==="object"&&e[i].properties?L(e[i]):R.cloneDeep(e[i].default),f),{});if(l&&n.find(f=>f==="id")){const f=l.toLowerCase().replace(/-/g,"_");a.id=`${f}_${Math.random().toString().slice(2,6)}`}return a}return{type:l}}function z(r,e={},l){const n=B[r];if(n){let a=F(n);const f=_[r];return a=f?f({getSchemaByType:z},a,e,l):a,a}return null}function W(r,e){const l=L(e);return Object.keys(l).reduce((n,a)=>(Object.prototype.hasOwnProperty.call(r,a)&&(n[a]&&R.isPlainObject(n[a])&&R.isPlainObject(r[a]||!r[a])?Object.assign(n[a],r[a]||{}):n[a]=r[a]),n),l),l}function H(r,e){return Object.keys(r).filter(n=>r[n]!=null).reduce((n,a)=>{if(e.has(a)){const f=e.get(a);if(typeof f=="string")n[f]=r[a];else{const i=f(a,r[a],r);Object.assign(n,i)}}else n[a]=r[a];return n},{})}function G(r,e,l=new Map){const n=W(r,e);return H(n,l)}function J(r={}){function e(c,d,h,y){if(typeof h=="number")return y[c].length===h;if(typeof h=="object"){const j=Object.keys(h)[0],N=h[j];if(j==="not")return Number(y[c].length)!==Number(N);if(j==="moreThan")return Number(y[c].length)>=Number(N);if(j==="lessThan")return Number(y[c].length)<=Number(N)}return!1}function l(c,d,h,y){return y[c]&&y[c].propertyValue&&String(y[c].propertyValue.value)===String(h)}const n=new Map([["length",e],["getProperty",l]]);Object.keys(r).reduce((c,d)=>(c.set(d,r[d]),c),n);function a(c,d){const h=c;return typeof d=="number"?[{target:h,operator:"length",param:null,value:Number(d)}]:typeof d=="boolean"?[{target:h,operator:"getProperty",param:c,value:!!d}]:typeof d=="object"?Object.keys(d).map(y=>{if(y==="length")return{target:h,operator:"length",param:null,value:d[y]};const j=y,N=d[y];return{target:h,operator:"getProperty",param:j,value:N}}):[]}function f(c){return Object.keys(c).reduce((h,y)=>{const j=a(y,c[y]);return h.push(...j),h},[])}function i(c,d){if(n.has(c.operator)){const h=n.get(c.operator);return h&&h(c.target,c.param,c.value,d)||!1}return!1}function O(c,d){return f(c).reduce((j,N)=>j&&i(N,d),!0)}function m(c,d){const h=Object.keys(c),y=h.includes("allOf"),j=h.includes("anyOf"),N=y||j,V=(N?c[N?y?"allOf":"anyOf":"allOf"]:[c]).map(k=>O(k,d));return y?!V.includes(!1):V.includes(!0)}return{parseValueSchema:m}}const Q={},U={};J();function X(r,e,l=new Map,n=(i,O,m,c)=>O,a={},f=i=>i){return B[e.title]=e,_[e.title]=n,Q[e.title]=a,U[e.title]=f,(i={})=>{const O=G(i,e,l),m=Object.keys(r).reduce((c,d)=>(c[d]=r[d].default,c),{});return Object.assign(m,O)}}function Y(r,e){return{customClass:e.class,customStyle:e.style}}const Z=new Map([["appearance",Y]]);function C(r,e,l){return e}const K={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/step.schema.json",title:"step",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for step",type:"string"},type:{description:"The type string of step",type:"string",default:"step"},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},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},require:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},visible:{description:"",type:"boolean",default:!0}},required:["id","type"]},I={title:"step",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:[]}}}}}},w={direction:{type:String,default:"horizontal"},fill:{type:Boolean,default:!1},height:{type:Number,default:0},clickable:{type:Boolean,default:!0},steps:{type:Array,default:[{id:"1",title:"审批中(示例)",description:"正在审批"},{id:"2",title:"复核中(示例)",description:"等待复核"}]},activeIndex:{type:Number,default:0},onClick:{type:Function,default:()=>{}}},q=X(w,K,Z,C,I),E=t.defineComponent({name:"FStep",props:w,emits:["click"],setup(r,e){const l=t.ref(r.direction),n=t.ref(r.fill),a=t.ref(r.height),f=t.ref(r.steps),i=t.ref(r.clickable),O=t.ref(0),m=t.ref(r.activeIndex),c=t.computed(()=>({"f-progress-step-list":l.value==="horizontal","f-progress-step-list-block":l.value==="vertical","f-progress-step-horizontal-fill":l.value==="horizontal"&&n.value,"f-progress-step-vertical-fill":l.value==="vertical"&&n.value})),d=t.computed(()=>({height:l.value==="vertical"?`${a.value}px`:""}));function h(o,s){const b={step:!0,active:s===m.value,clickable:i.value,current:s===m.value};return s<m.value&&(b.finish=!0),b}function y(o,s){const b={step:o,stepIndex:s};e.emit("click",b)}function j(o,s){const b={"f-progressstep-row":!0,"step-active":s===m.value,"step-current":s===m.value};return s<m.value&&(b["step-finish"]=!0),b}function N(o,s){return{"step-icon":!0,"step-success":s,"f-icon":s,"f-icon-check":s}}function M(o,s){const b=[];return s>=m.value||s===O.value?b.push(t.createVNode("span",{class:"step-icon"},[s+1])):b.push(t.createVNode("span",{class:N(o,!0)},null)),b}function P(o,s){return{"step-name":!0,"step-name-success":s<m.value}}function V(o,s){return t.createVNode("div",{class:"f-progress-step-title"},[t.createVNode("p",{class:P(o,s)},[o.title])])}function T(o,s){return{"f-progress-step-line":!0,"f-progress-step-line-success":s===m.value}}function k(o,s){return s!==f.value.length-1}const $=t.computed(()=>({triangle:!0,"":l.value==="vertical"}));function g(){return f.value.map((o,s)=>t.createVNode("li",{class:h(o,s),onClick:b=>y(o,s)},[t.createVNode("div",{class:j(o,s)},[t.createVNode("div",{class:"f-progress-step-content"},[M(o,s),V(o,s)]),k(o,s)&&t.createVNode("div",{class:T(o,s)},[t.createVNode("span",{class:$.value},null)])])]))}return t.watch(()=>r.activeIndex,()=>{r.activeIndex>-1&&r.activeIndex<=f.value.length&&(m.value=r.activeIndex,g())}),()=>t.createVNode("div",{class:"f-progress-step"},[t.createVNode("ul",{class:c.value,style:d.value},[g()])])}});function x(r,e,l){var $;const n="",a="",f=t.ref();function i(){return(e==null?void 0:e.schema.componentType)!=="frame"}function O(){return!1}function m(){return(e==null?void 0:e.schema.componentType)!=="frame"}function c(){return(e==null?void 0:e.schema.componentType)==="frame"}function d(g){if(!g||!g.value)return null;if(g.value.schema&&g.value.schema.type==="component")return g.value;const o=t.ref(g==null?void 0:g.value.parent),s=d(o);return s||null}function h(g=e){const{componentInstance:o,designerItemElementRef:s}=g;return!o||!o.value?null:o.value.canMove?s:h(g.parent)}function y(g){return!!l}function j(){return(e==null?void 0:e.schema.label)||(e==null?void 0:e.schema.title)||(e==null?void 0:e.schema.name)}function N(){}function M(g,o){}function P(g,o){const{componentType:s}=g;let b=z(s,g,o);const u=s.toLowerCase().replace(/-/g,"_");return b&&!b.id&&b.type===s&&(b.id=`${u}_${Math.random().toString().slice(2,6)}`),b}function V(g){}function T(...g){}function k(){e!=null&&e.schema.contents&&e.schema.contents.map(g=>{var b;let o=g.id;g.type==="component-ref"&&(o=g.component);const s=r.value.querySelector(`#${o}-design-item`);(b=s==null?void 0:s.componentInstance)!=null&&b.value.onRemoveComponent&&s.componentInstance.value.onRemoveComponent()})}return f.value={canMove:i(),canSelectParent:O(),canDelete:m(),canNested:!c(),contents:e==null?void 0:e.schema.contents,elementRef:r,parent:($=e==null?void 0:e.parent)==null?void 0:$.componentInstance,schema:e==null?void 0:e.schema,styles:n,designerClass:a,canAccepts:y,getBelongedComponentInstance:d,getDraggableDesignItemElement:h,getDraggingDisplayText:j,getPropConfig:T,getDragScopeElement:N,onAcceptMovedChildElement:M,onChildElementMovedOut:V,addNewChildComponentSchema:P,triggerBelongedComponentToMoveWhenMoved:t.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:t.ref(!1),onRemoveComponent:k},f}const ee=t.defineComponent({name:"FStepDesign",props:w,emits:[],setup(r,e){const l=t.ref(r.direction),n=t.ref(r.fill),a=t.ref(r.height),f=t.ref(r.steps),i=t.ref(0),O=t.ref(r.clickable),m=t.ref(0),c=t.ref(),d=t.inject("design-item-context"),h=x(c,d);t.onMounted(()=>{c.value.componentInstance=h}),e.expose(h.value);const y=t.computed(()=>({"f-progress-step-list":l.value==="horizontal","f-progress-step-list-block":l.value==="vertical","f-progress-step-horizontal-fill":l.value==="horizontal"&&n.value,"f-progress-step-vertical-fill":l.value==="vertical"&&n.value})),j=t.computed(()=>({height:l.value==="vertical"?`${a.value}px`:""}));function N(u,p){const v={step:!0,active:p===i.value,clickable:O.value,"click-disable":u.disable,current:p===i.value};return p<i.value&&(v.finish=!0),u.status&&(v[u.status]=!0),u.hasOwnProperty("class")&&u.class.split(" ").reduce((D,A)=>(D[A]=!0,D),v),v}function M(u,p){}function P(u,p){const v={"f-progressstep-row":!0,"step-active":p===i.value,"step-current":p===i.value};return p<i.value&&(v["step-finish"]=!0),u.status&&(v["step-"+u.status]=!0),v}function V(u,p){const v={"step-icon":!0,"step-success":p,"k-icon":p,"k-i-check":p};return u.hasOwnProperty("icon")&&u.class.split(" ").reduce((D,A)=>(D[A]=!0,D),v),v}function T(u,p){const v=[];return u.icon?v.push(t.createVNode("span",{class:V(u,!1)},null)):p>=i.value||p===m.value?v.push(t.createVNode("span",{class:"step-icon"},[p+1])):v.push(t.createVNode("span",{class:V(u,!0)},null)),v}function k(u,p){return{"step-name":!0,"step-name-success":p<i.value}}function $(u,p){return t.createVNode("div",{class:"f-progress-step-title"},[t.createVNode("p",{class:k(u,p)},[u.title])])}function g(u,p){return{"f-progress-step-line":!0,"f-progress-step-line-success":p===i.value}}function o(u,p){return p!==f.value.length-1}const s=t.computed(()=>({triangle:!0,"":l.value==="vertical"}));function b(){return f.value.map((u,p)=>t.createVNode("li",{class:N(u,p),onClick:v=>void 0},[t.createVNode("div",{class:P(u,p)},[t.createVNode("div",{class:"f-progress-step-content"},[T(u,p),$(u,p)]),o(u,p)&&t.createVNode("div",{class:g(u,p)},[t.createVNode("span",{class:s.value},null)])])]))}return()=>t.createVNode("div",{ref:c,class:"f-progress-step"},[t.createVNode("ul",{class:y.value,style:j.value},[b()])])}}),te={install(r){r.component(E.name,E)},register(r,e,l,n){r.step=E,e.step=q},registerDesigner(r,e,l){r.step=ee,e.step=q}};S.Step=E,S.default=te,S.propsResolver=q,S.stepProps=w,Object.defineProperties(S,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});