@farris/ui-vue 1.2.8 → 1.2.9

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 (215) hide show
  1. package/components/accordion/index.esm.js +129 -129
  2. package/components/accordion/index.umd.cjs +1 -0
  3. package/components/avatar/index.esm.js +166 -157
  4. package/components/avatar/index.umd.cjs +1 -0
  5. package/components/border-editor/index.umd.cjs +1 -0
  6. package/components/button/index.umd.cjs +1 -0
  7. package/components/button-edit/index.esm.js +343 -325
  8. package/components/button-edit/index.umd.cjs +1 -0
  9. package/components/button-group/index.umd.cjs +1 -0
  10. package/components/calculator/index.umd.cjs +1 -0
  11. package/components/calendar/index.esm.js +338 -338
  12. package/components/calendar/index.umd.cjs +1 -0
  13. package/components/capsule/index.esm.js +182 -182
  14. package/components/capsule/index.umd.cjs +1 -0
  15. package/components/checkbox/index.esm.js +326 -317
  16. package/components/checkbox/index.umd.cjs +1 -0
  17. package/components/color-picker/index.esm.js +118 -118
  18. package/components/color-picker/index.umd.cjs +3 -0
  19. package/components/combo-list/index.esm.js +338 -325
  20. package/components/combo-list/index.umd.cjs +1 -0
  21. package/components/combo-tree/index.esm.js +62 -62
  22. package/components/combo-tree/index.umd.cjs +1 -0
  23. package/components/common/index.umd.cjs +1 -0
  24. package/components/component/index.esm.js +382 -270
  25. package/components/component/index.umd.cjs +1 -0
  26. package/components/condition/index.esm.js +1018 -895
  27. package/components/condition/index.umd.cjs +1 -0
  28. package/components/content-container/index.esm.js +285 -212
  29. package/components/content-container/index.umd.cjs +1 -0
  30. package/components/data-grid/index.css +1 -1
  31. package/components/data-grid/index.esm.js +4761 -4319
  32. package/components/data-grid/index.umd.cjs +1 -0
  33. package/components/data-view/index.esm.js +2901 -2664
  34. package/components/data-view/index.umd.cjs +1 -0
  35. package/components/date-picker/index.esm.js +1502 -1488
  36. package/components/date-picker/index.umd.cjs +1 -0
  37. package/components/designer-canvas/index.css +1 -1
  38. package/components/designer-canvas/index.esm.js +938 -928
  39. package/components/designer-canvas/index.umd.cjs +1 -0
  40. package/components/designer-outline/index.css +1 -1
  41. package/components/designer-outline/index.esm.js +27 -27
  42. package/components/designer-outline/index.umd.cjs +1 -0
  43. package/components/designer-toolbox/index.esm.js +36 -12
  44. package/components/designer-toolbox/index.umd.cjs +1 -0
  45. package/components/discussion-editor/index.umd.cjs +3 -0
  46. package/components/discussion-list/index.umd.cjs +1 -0
  47. package/components/drawer/index.umd.cjs +1 -0
  48. package/components/dropdown/index.esm.js +241 -241
  49. package/components/dropdown/index.umd.cjs +2 -0
  50. package/components/dynamic-form/index.esm.js +1074 -885
  51. package/components/dynamic-form/index.umd.cjs +1 -0
  52. package/components/dynamic-resolver/index.esm.js +99 -94
  53. package/components/dynamic-resolver/index.umd.cjs +1 -0
  54. package/components/dynamic-view/index.umd.cjs +1 -0
  55. package/components/enum-editor/index.umd.cjs +1 -0
  56. package/components/events-editor/index.esm.js +577 -522
  57. package/components/events-editor/index.umd.cjs +1 -0
  58. package/components/expression-editor/index.esm.js +70 -70
  59. package/components/expression-editor/index.umd.cjs +1 -0
  60. package/components/external-container/index.css +1 -1
  61. package/components/external-container/index.esm.js +2938 -2619
  62. package/components/external-container/index.umd.cjs +1 -0
  63. package/components/field-selector/index.css +1 -1
  64. package/components/field-selector/index.esm.js +4766 -4325
  65. package/components/field-selector/index.umd.cjs +1 -0
  66. package/components/filter-bar/index.css +1 -1
  67. package/components/filter-bar/index.esm.js +1231 -1215
  68. package/components/filter-bar/index.umd.cjs +1 -0
  69. package/components/flow-canvas/index.css +1 -1
  70. package/components/flow-canvas/index.esm.js +1062 -1052
  71. package/components/flow-canvas/index.umd.cjs +1 -0
  72. package/components/image-cropper/index.esm.js +373 -373
  73. package/components/image-cropper/index.umd.cjs +1 -0
  74. package/components/input-group/index.esm.js +398 -394
  75. package/components/input-group/index.umd.cjs +1 -0
  76. package/components/layout/index.esm.js +268 -268
  77. package/components/layout/index.umd.cjs +1 -0
  78. package/components/list-nav/index.esm.js +234 -161
  79. package/components/list-nav/index.umd.cjs +1 -0
  80. package/components/list-view/index.css +1 -1
  81. package/components/list-view/index.esm.js +2288 -2048
  82. package/components/list-view/index.umd.cjs +1 -0
  83. package/components/loading/index.umd.cjs +8 -0
  84. package/components/locale/index.umd.cjs +1 -0
  85. package/components/lookup/index.css +1 -1
  86. package/components/lookup/index.esm.js +5776 -5305
  87. package/components/lookup/index.umd.cjs +1 -0
  88. package/components/mapping-editor/index.css +1 -1
  89. package/components/mapping-editor/index.esm.js +5496 -5036
  90. package/components/mapping-editor/index.umd.cjs +1 -0
  91. package/components/message-box/index.umd.cjs +1 -0
  92. package/components/modal/index.umd.cjs +1 -0
  93. package/components/nav/index.esm.js +383 -322
  94. package/components/nav/index.umd.cjs +3 -0
  95. package/components/notify/index.umd.cjs +1 -0
  96. package/components/number-range/index.esm.js +273 -269
  97. package/components/number-range/index.umd.cjs +1 -0
  98. package/components/number-spinner/index.esm.js +292 -283
  99. package/components/number-spinner/index.umd.cjs +1 -0
  100. package/components/order/index.css +1 -1
  101. package/components/order/index.esm.js +1008 -925
  102. package/components/order/index.umd.cjs +1 -0
  103. package/components/page-footer/index.esm.js +98 -98
  104. package/components/page-footer/index.umd.cjs +1 -0
  105. package/components/page-header/index.esm.js +949 -847
  106. package/components/page-header/index.umd.cjs +1 -0
  107. package/components/pagination/index.esm.js +464 -403
  108. package/components/pagination/index.umd.cjs +1 -0
  109. package/components/popover/index.umd.cjs +1 -0
  110. package/components/progress/index.esm.js +226 -226
  111. package/components/progress/index.umd.cjs +3 -0
  112. package/components/property-editor/index.esm.js +1110 -1092
  113. package/components/property-editor/index.umd.cjs +3 -0
  114. package/components/property-panel/index.esm.js +520 -513
  115. package/components/property-panel/index.umd.cjs +1 -0
  116. package/components/query-solution/index.css +1 -1
  117. package/components/query-solution/index.esm.js +1714 -1575
  118. package/components/query-solution/index.umd.cjs +1 -0
  119. package/components/radio-button/index.esm.js +67 -67
  120. package/components/radio-button/index.umd.cjs +1 -0
  121. package/components/radio-group/index.esm.js +298 -289
  122. package/components/radio-group/index.umd.cjs +1 -0
  123. package/components/rate/index.esm.js +195 -190
  124. package/components/rate/index.umd.cjs +1 -0
  125. package/components/response-layout/index.esm.js +112 -112
  126. package/components/response-layout/index.umd.cjs +1 -0
  127. package/components/response-layout-editor/index.esm.js +902 -877
  128. package/components/response-layout-editor/index.umd.cjs +1 -0
  129. package/components/response-toolbar/index.esm.js +874 -778
  130. package/components/response-toolbar/index.umd.cjs +1 -0
  131. package/components/schema-selector/index.css +1 -1
  132. package/components/schema-selector/index.esm.js +4594 -4289
  133. package/components/schema-selector/index.umd.cjs +8 -0
  134. package/components/search-box/index.esm.js +126 -126
  135. package/components/search-box/index.umd.cjs +1 -0
  136. package/components/section/index.esm.js +645 -503
  137. package/components/section/index.umd.cjs +1 -0
  138. package/components/smoke-detector/index.esm.js +120 -120
  139. package/components/smoke-detector/index.umd.cjs +1 -0
  140. package/components/spacing-editor/index.umd.cjs +1 -0
  141. package/components/splitter/index.esm.js +421 -348
  142. package/components/splitter/index.umd.cjs +1 -0
  143. package/components/step/index.esm.js +219 -219
  144. package/components/step/index.umd.cjs +1 -0
  145. package/components/switch/index.esm.js +232 -222
  146. package/components/switch/index.umd.cjs +1 -0
  147. package/components/tabs/index.esm.js +1823 -1744
  148. package/components/tabs/index.umd.cjs +1 -0
  149. package/components/tags/index.esm.js +399 -401
  150. package/components/tags/index.umd.cjs +1 -0
  151. package/components/text/index.esm.js +164 -164
  152. package/components/text/index.umd.cjs +1 -0
  153. package/components/textarea/index.esm.js +220 -215
  154. package/components/textarea/index.umd.cjs +1 -0
  155. package/components/time-picker/index.esm.js +693 -666
  156. package/components/time-picker/index.umd.cjs +1 -0
  157. package/components/tooltip/index.umd.cjs +1 -0
  158. package/components/transfer/index.css +1 -1
  159. package/components/transfer/index.esm.js +422 -413
  160. package/components/transfer/index.umd.cjs +1 -0
  161. package/components/tree-grid/index.css +1 -1
  162. package/components/tree-grid/index.esm.js +4799 -4358
  163. package/components/tree-grid/index.umd.cjs +1 -0
  164. package/components/tree-view/index.esm.js +2448 -2215
  165. package/components/tree-view/index.umd.cjs +1 -0
  166. package/components/uploader/index.esm.js +164 -164
  167. package/components/uploader/index.umd.cjs +2 -0
  168. package/components/verify-detail/index.esm.js +143 -143
  169. package/components/verify-detail/index.umd.cjs +1 -0
  170. package/components/video/index.esm.js +410 -331
  171. package/components/video/index.umd.cjs +1 -0
  172. package/components/weather/index.esm.js +901 -901
  173. package/components/weather/index.umd.cjs +16 -0
  174. package/farris.all.esm.js +12305 -11403
  175. package/farris.all.umd.cjs +8 -8
  176. package/index.css +1 -1
  177. package/package.json +1 -1
  178. package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
  179. package/types/combo-list/src/components/list-container.component.d.ts +3 -0
  180. package/types/combo-list/src/components/list-container.props.d.ts +5 -1
  181. package/types/common/entity/entity-schema.d.ts +258 -0
  182. package/types/component/src/component-ref.props.d.ts +4 -0
  183. package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
  184. package/types/component/src/designer/use-designer-rules.d.ts +2 -2
  185. package/types/data-grid/index.d.ts +5 -2
  186. package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
  187. package/types/data-grid/src/data-grid.component.d.ts +2 -1
  188. package/types/data-grid/src/data-grid.props.d.ts +2 -2
  189. package/types/data-grid/src/designer/use-group-column.d.ts +20 -0
  190. package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
  191. package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
  192. package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
  193. package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
  194. package/types/data-view/components/column-format/date.component.d.ts +4 -0
  195. package/types/data-view/components/column-format/enum.component.d.ts +4 -0
  196. package/types/data-view/components/column-format/number.component.d.ts +4 -0
  197. package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
  198. package/types/data-view/composition/types.d.ts +18 -6
  199. package/types/data-view/composition/use-edit.d.ts +2 -1
  200. package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
  201. package/types/designer-canvas/src/types.d.ts +2 -2
  202. package/types/dynamic-form/index.d.ts +2 -1
  203. package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
  204. package/types/dynamic-form/src/schema/schema-resolver.d.ts +2 -1
  205. package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
  206. package/types/dynamic-resolver/src/types.d.ts +3 -2
  207. package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
  208. package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
  209. package/types/section/src/property-config/section.property-config.d.ts +93 -0
  210. package/types/section/src/schema/schema-resolver.d.ts +2 -1
  211. package/types/tabs/src/composition/types.d.ts +2 -2
  212. package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
  213. package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
  214. package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
  215. package/types/tags/index.d.ts +36 -5
@@ -0,0 +1 @@
1
+ (function(P,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("lodash-es")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es"],e):(P=typeof globalThis<"u"?globalThis:P||self,e(P.calendar={},P.Vue,P.LodashES))})(this,function(P,e,ae){"use strict";const Q={},X={};function z(t){const{properties:a,title:d,ignore:m}=t,f=m&&Array.isArray(m),u=Object.keys(a).reduce((c,s)=>((!f||!m.find(V=>V==s))&&(c[s]=a[s].type==="object"&&a[s].properties?z(a[s]):ae.cloneDeep(a[s].default)),c),{});return(!f||!m.find(c=>c=="id"))&&(u.id=`${d}-${Date.now()}`),u}function x(t,a={},d){const m=Q[t];if(m){let f=z(m);const u=X[t];return f=u?u({getSchemaByType:x},f,a,d):f,f}return null}function re(t,a){const d=z(a);return Object.keys(t).reduce((m,f)=>(m[f]&&typeof m[f]=="object"?Object.assign(m[f],t[f]):m[f]=t[f],m),d),d}function oe(t,a){return Object.keys(t).filter(m=>t[m]!=null).reduce((m,f)=>{if(a.has(f)){const u=a.get(f);if(typeof u=="string")m[u]=t[f];else{const c=u(f,t[f],t);Object.assign(m,c)}}else m[f]=t[f];return m},{})}function ce(t,a,d=new Map){const m=re(t,a);return oe(m,d)}function se(t={}){function a(n,p,g,D){if(typeof g=="number")return D[n].length===g;if(typeof g=="object"){const l=Object.keys(g)[0],y=g[l];if(l==="not")return Number(D[n].length)!==Number(y);if(l==="moreThan")return Number(D[n].length)>=Number(y);if(l==="lessThan")return Number(D[n].length)<=Number(y)}return!1}function d(n,p,g,D){return D[n]&&D[n].propertyValue&&String(D[n].propertyValue.value)===String(g)}const m=new Map([["length",a],["getProperty",d]]);Object.keys(t).reduce((n,p)=>(n.set(p,t[p]),n),m);function f(n,p){const g=n;return typeof p=="number"?[{target:g,operator:"length",param:null,value:Number(p)}]:typeof p=="boolean"?[{target:g,operator:"getProperty",param:n,value:!!p}]:typeof p=="object"?Object.keys(p).map(D=>{if(D==="length")return{target:g,operator:"length",param:null,value:p[D]};const l=D,y=p[D];return{target:g,operator:"getProperty",param:l,value:y}}):[]}function u(n){return Object.keys(n).reduce((g,D)=>{const l=f(D,n[D]);return g.push(...l),g},[])}function c(n,p){if(m.has(n.operator)){const g=m.get(n.operator);return g&&g(n.target,n.param,n.value,p)||!1}return!1}function s(n,p){return u(n).reduce((l,y)=>l&&c(y,p),!0)}function V(n,p){const g=Object.keys(n),D=g.includes("allOf"),l=g.includes("anyOf"),y=D||l,i=(y?n[y?D?"allOf":"anyOf":"allOf"]:[n]).map(o=>s(o,p));return D?!i.includes(!1):i.includes(!0)}return{parseValueSchema:V}}const le={},ie={};se();function ue(t,a,d=new Map,m=(c,s,V)=>s,f={},u=c=>c){return Q[a.title]=a,X[a.title]=m,le[a.title]=f,ie[a.title]=u,(c={})=>{const s=ce(c,a,d),V=Object.keys(t).reduce((n,p)=>(n[p]=t[p].default,n),{});return Object.assign(V,s)}}function de(t,a){return{customClass:a.class,customStyle:a.style}}const fe=new Map([["appearance",de]]);function ye(t,a,d){return a}const he={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/calendar.schema.json",title:"calendar",description:"A Farris Input Component",type:"object",properties:{id:{description:"The unique identifier for calendar",type:"string"},type:{description:"The type string of calendar",type:"string",default:"calendar"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}}},required:["id","type"]},me={title:"calendar",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:[]}}}}}},_={events:{Type:Array,default:[]},firstDayOfTheWeek:{type:String,default:"Sun."}},U=ue(_,he,fe,ye,me),$=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"];var A=(t=>(t[t.previous=1]="previous",t[t.current=2]="current",t[t.next=3]="next",t))(A||{});function G(){function t(){return{year:0,month:0,day:0}}function a(n){return new Date(n.year||0,n.month?n.month-1:0,n.day||0,n.hour?n.hour:0,n.minute?n.minute:0,n.second?n.second:0,0)}function d(n){const p=new Date;return n.year||(n.year=p.getFullYear()),n.month||(n.month=p.getMonth()+1),n.day||(n.day=1),new Date(n.year,n.month-1,n.day,n.hour?n.hour:0,n.minute?n.minute:0,n.second?n.second:0,0)}function m(n){return new Date(n.year||1,(n.month||1)-1,n.day,n.hour?n.hour:0,n.minute?n.minute:0,n.second?n.second:0,0).getDay()}function f(n){return $.indexOf(n)}function u(n){return a(n).getTime()}function c(n){return Math.round(u(n)/1e3)}function s(n,p,g){const D=u(p),l=u(g),y=u(n);return l-y>y-D?p:g}function V(){const n=new Date;return{year:n.getFullYear(),month:n.getMonth()+1,day:n.getDate(),hour:n.getHours(),minute:n.getMinutes(),second:n.getSeconds()}}return{emptyDate:t,getDate:a,getDate2:d,getDayNumber:m,getEpocTime:c,getNearDate:s,getWeekdayIndex:f,getTimeInMilliseconds:u,getToday:V}}function pe(){function t(u,c){return new Date(c,u,0).getDate()}function a(u,c,s){return new Date(u,c-1,s,0,0,0,0)}function d(u,c){const s=a(c,u,1);return s.setMonth(s.getMonth()-1),t(s.getMonth()+1,s.getFullYear())}function m(u,c){const s={year:u===12?c+1:c},V=u===12?1:u+1;return s.month=V,s}function f(u,c){const s={year:u===1?c-1:c},V=u===1?12:u-1;return s.month=V,s}return{daysInMonth:t,daysInPreMonth:d,getNextMonth:m,getPreviousMonth:f}}function Z(){const{getToday:t,getDayNumber:a}=G(),{daysInMonth:d,daysInPreMonth:m,getNextMonth:f,getPreviousMonth:u}=pe();function c(h){const k=$.indexOf(h);return k>0?7-k:0}function s(h){const{day:k,month:i,year:r}=h;if(k===void 0||i===void 0||r===void 0)throw new Error("invalided date.");const o=k===1,v=o?m(i,r):k-1,N=o?i-1:i,w=N<1,M=w?12:N;return{year:w?r-1:r,month:M,day:v}}function V(h){const{day:k,month:i,year:r}=h;if(k===void 0||i===void 0||r===void 0)throw new Error("invalided date.");const o=d(i,r),v=k===o,N=v?1:k+1,w=v?i+1:i,M=w>12,b=M?1:w;return{year:M?r+1:r,month:b,day:N}}function n(h){const k=u(h.month||1,h.year||1),i=d(k.month||1,k.year||1);return{day:(h.day||1)<=i?h.day:i,month:k.month,year:k.year}}function p(h){const k=f(h.month||1,h.year||1),i=d(k.month||1,k.year||1);return{day:(h.day||1)<=i?h.day:i,month:k.month,year:k.year}}function g(h){const i=(h.day||1)-7,r=i<1,o=r?d(h.month||1,h.year||1)+i:i,v=r?u(h.month||1,h.year||1):h;return{day:o,month:v.month,year:v.year}}function D(h){const i=(h.day||1)+7,r=d(h.month||1,h.year||1),o=i>r,v=o?i-r:i,N=o?f(h.month||1,h.year||1):h;return{day:v,month:N.month,year:N.year}}function l(h,k,i,r){const o={day:h,month:k,year:i},N=c(r)===0?1:0,w=a(o)+N,M=t();let b=s(o);const O=[];for(let j=w-1;j>=1;j--){const H=b.month!==o.month?A.previous:A.current,C=b.month===k&&b.day===M.day&&b.month===M.month&&b.year===M.year;O.push({date:b,monthTag:H,isCurrent:C}),j>1&&(b=s(b))}let W=V(o);const S=[];for(let j=w+1;j<=7;j++){const H=b.month!==o.month?A.next:A.current,C=W.day===M.day&&W.month===M.month&&W.year===M.year;S.push({date:W,monthTag:H,isCurrent:C}),j<7&&(W=V(W))}const T=h===M.day&&k===M.month&&i===M.year;return{days:[...O.reverse(),{date:o,monthTag:A.current,isCurrent:T},...S],weekNumber:0,year:i}}function y(h,k,i){const r=[],o=d(h,k);for(let v=1;v<=o;v+=7){const N=l(v,h,k,i);r.push(N)}return r}return{getMonthlyCalendar:y,getWeeklyCalendar:l,getPreviousDay:s,getNextDay:V,getDayInPreviousWeek:g,getDayInNextWeek:D,getDayInPreviousMonth:n,getDayInNextMonth:p}}function F(){const{getTimeInMilliseconds:t}=G();function a(l){return l&&l.year!==0&&l.month!==0&&l.day!==0}function d(l){return l&&l.year!==0&&l.month!==0}function m(l){return l&&l.year!==0}function f(l,y){return t(l)<t(y)}function u(l,y){return t(l)<=t(y)}function c(l,y){return t(l)===t(y)}function s(l,y){const h=t(y);return t(l.from)===h||t(l.to)===h}function V(l,y){return!y||!a(y.to)||!a(y.from)?!1:u(y.from,l)&&u(l,y.to)}function n(l,y){return a(y)&&t(l)>=t(y)}function p(l,y){return a(y)&&t(l)<=t(y)}function g(l,y){return t({year:l.year,month:l.month,day:l.day})===t({year:y.year,month:y.month,day:y.day})}function D(l,y){return t({hour:l.hour,minute:l.minute,second:l.second})===t({hour:y.hour,minute:y.minute,second:y.second})}return{isDateEarlier:f,equal:c,inPeriod:V,isPoint:s,equalOrEarlier:u,isInitializedDate:a,isInitializedMonth:d,isInitializedYear:m,isMonthDisabledByDisableSince:n,isMonthDisabledByDisableUntil:p,sameTime:D,sameDay:g}}const L={1:"Jan",2:"Feb",3:"Mar",4:"Apr",5:"May",6:"Jun",7:"Jul",8:"Aug",9:"Sep",10:"Oct",11:"Nov",12:"Dec"},K={activeView:{Type:Number,default:3},title:{Type:String,default:""},dailyViewTitle:{Type:String,default:"Day"},weeklyViewTitle:{Type:String,default:"Week"},monthlyViewTitle:{Type:String,default:"Month"}},I=e.defineComponent({name:"FCalendarHeader",props:K,emits:["ViewChange","Previous","Next","ResetToToday"],setup(t,a){const d=e.ref(t.title),m=e.ref(t.dailyViewTitle),f=e.ref(t.weeklyViewTitle),u=e.ref(t.monthlyViewTitle),c=2,s=62,V=e.ref(t.activeView),n=e.ref("Today");e.watch(()=>t.title,()=>{d.value=t.title});const p=e.computed(()=>({top:`${c}px`,left:`${V.value*(c+1)+(V.value-1)*(s+1)}px`})),g=e.computed(()=>V.value===1?m.value:V.value===2?f.value:u.value);function D(){V.value=1,a.emit("ViewChange",1)}function l(){V.value=2,a.emit("ViewChange",2)}function y(){V.value=3,a.emit("ViewChange",3)}function h(){a.emit("Previous",V.value)}function k(){a.emit("Next",V.value)}function i(){a.emit("ResetToToday")}return()=>e.createVNode("div",{class:"f-calendar-header"},[e.createVNode("div",{class:"f-calendar-title"},[d.value]),e.createVNode("div",{class:"f-calendar-navigator"},[e.createVNode("div",{class:"f-calendar-navigator-today btn btn-default",onClick:()=>i()},[n.value]),e.createVNode("div",{class:"f-calendar-navigator-button-group"},[e.createVNode("div",{class:"f-calendar-navigator-previous btn btn-default",onClick:()=>h()},[e.createVNode("i",{class:"f-icon f-icon-arrow-chevron-left"},null)]),e.createVNode("div",{class:"f-calendar-navigator-next btn btn-default",onClick:()=>k()},[e.createVNode("i",{class:"f-icon f-icon-arrow-chevron-right"},null)])])]),e.createVNode("div",{class:"f-calendar-view-switch"},[e.createVNode("div",{class:"f-calendar-view-switch-panel"},[e.createVNode("span",{class:"f-calendar-view-switch-daily",onClick:r=>D()},[m.value]),e.createVNode("span",{class:"f-calendar-view-switch-weekly",onClick:r=>l()},[f.value]),e.createVNode("span",{class:"f-calendar-view-switch-monthly",onClick:r=>y()},[u.value])]),e.createVNode("div",{class:"f-calendar-view-switch-active-view",style:p.value},[g.value])])])}}),ee={dates:{Type:Array,default:[]},daysInWeek:{Type:Array,default:$},enableKeyboadNavigate:{Type:Boolean,default:!0},enableMarkCurrent:{Type:Boolean,default:!0},events:{Type:Array,default:[]},activeDay:{Type:Object,default:null}};var Y=(t=>(t[t.enter=13]="enter",t[t.esc=27]="esc",t[t.space=32]="space",t[t.leftArrow=37]="leftArrow",t[t.upArrow=38]="upArrow",t[t.rightArrow=39]="rightArrow",t[t.downArrow=40]="downArrow",t[t.tab=9]="tab",t[t.shift=16]="shift",t))(Y||{});function ve(){function t(a){const d=a.key||a.keyCode;return d==="Enter"||d===13?13:d==="Escape"||d===27?27:d===" "||d===32?32:d==="ArrowLeft"||d===37?37:d==="ArrowUp"||d===38?38:d==="ArrowRight"||d===39?39:d==="ArrowDown"||d===40?40:d==="Tab"||d===9?9:d==="Shift"||d===16?16:-1}return{getKeyCodeFromEvent:t}}const B=e.defineComponent({name:"FCalendarMonthView",props:ee,emits:["click","keyDown"],setup(t,a){const d=e.ref(t.daysInWeek),m=e.ref(t.enableKeyboadNavigate),f=e.ref(t.enableMarkCurrent),u=e.ref(t.activeDay),c=e.ref(t.events),{equal:s,sameDay:V}=F(),{getKeyCodeFromEvent:n}=ve();function p(i,r){return i.forEach(o=>{o.days.forEach(v=>{const N=r.filter(w=>V(w.starts,v.date));N&&N.length&&(v.events=[...N])})}),i}const g=e.ref(p(t.dates,c.value));e.watch(()=>t.dates,()=>{g.value=p(t.dates,c.value)}),e.watch(()=>t.activeDay,()=>{u.value=t.activeDay}),e.watch(()=>t.events,()=>{c.value=t.events});function D(i){return!!u.value&&s({year:u.value.year,month:u.value.month,day:u.value.day},i)}const l=(i,r,o)=>{const N={"f-datepicker-no-currmonth":i.monthTag===A.previous||i.monthTag===A.next},w=`d_${r}_${o}`;return N[w]=!0,N},y=i=>{const r=i.monthTag===A.current&&D(i.date),o=i.isCurrent&&f.value;return{"f-calendar-month-view-date":!0,"f-calendar-month-view-selected":r,"f-calendar-month-view-current":o}};function h(i,r){i.stopPropagation(),a.emit("click",r.date)}function k(i,r){const o=n(i);o!==Y.tab&&(i.preventDefault(),o===Y.enter||o===Y.space?h(i,r):m.value&&a.emit("keyDown",r.date))}return()=>e.createVNode("div",{class:"f-calendar-month-view"},[e.createVNode("table",{class:"f-datepicker-table",cellpadding:"0"},[e.createVNode("thead",null,[e.createVNode("tr",null,[d.value&&d.value.map(i=>e.createVNode("th",{scope:"col",style:"padding: 4px 4px 8px"},[i]))])]),e.createVNode("tbody",null,[g.value&&g.value.map((i,r)=>e.createVNode("tr",null,[i.days&&i.days.map((o,v)=>e.createVNode("td",{id:`d_${r}_${v}`,tabindex:"0",class:l(o,r,v),onClick:N=>h(N,o),onKeydown:N=>k(N,o)},[e.createVNode("div",{class:"f-calendar-month-view-title"},[e.createVNode("div",{class:y(o)},[o.date.day]),e.createVNode("div",{class:"f-calendar-month-view-date-month"},[o.date.day===1?L[o.date.month||1]:""])]),o.events&&o.events.length&&o.events.map(N=>e.createVNode("div",{class:"f-calendar-month-view-event-item"},[N.title]))]))]))])])])}}),te={daysInWeek:{Type:Array,default:$},enableMarkCurrent:{Type:Boolean,default:!0},events:{Type:Array,default:[]},week:{Type:Object,default:{days:[],weekNumber:0,year:0}}},R=e.defineComponent({name:"FCalendarWeekView",props:te,emits:[],setup(t){const a=e.ref(),d=e.ref(),m=e.ref(t.daysInWeek),f=e.ref(t.week),u=e.ref(t.enableMarkCurrent),c=e.ref(t.events),s=e.ref([]),{equal:V}=F();function n(r){return f.value.days.map(v=>{const N={year:v.date.year,month:v.date.month,day:v.date.day,hour:r.hour,minute:r.minute,second:r.second},w=c.value.filter(M=>V(M.starts,N));return{day:N,events:w}})}function p(){const r=[];for(let o=0;o<24;o++){const v={hour:o,minute:0,second:0},N={hour:o,minute:30,second:0},w=n(v),M=n(N);r.push({time:v,events:w,title:o>0?`${o}:00`:"",part:"upper"}),r.push({time:N,events:M,title:`${o}:30`,part:"lower"})}s.value=r}p(),e.watch(()=>t.week,()=>{f.value=t.week,p()}),e.watch(()=>t.events,()=>{c.value=t.events,p()});const g=r=>({"f-calendar-week-view-date":!0,"f-calendar-week-view-current":r.isCurrent&&u.value});function D(){return e.createVNode("div",{class:"f-calendar-week-view-header"},[e.createVNode("div",{class:"f-calendar-week-view-header-corner"},null),e.createVNode("div",{class:"f-calendar-week-view-header-primary"},[e.createVNode("div",{class:"f-calendar-week-view-header-columns"},[m.value.map((r,o)=>e.createVNode("div",{class:"f-calendar-week-view-header-cell"},[e.createVNode("div",{class:g(f.value.days[o])},[f.value.days[o].date.day]),e.createVNode("span",null,[r])]))])])])}function l(){return e.createVNode("div",{class:"f-calendar-week-view-content-side"},[e.createVNode("div",{class:"f-calendar-side"},[s.value.map(r=>e.createVNode("div",{class:"f-calendar-side-row"},[e.createVNode("div",{class:"f-calendar-side-row-number"},[r.part==="upper"?r.title:""])]))])])}function y(r){return{"f-calendar-week-view-item":!0,"f-calendar-week-view-item-upper":r.part==="upper","f-calendar-week-view-item-lower":r.part==="lower"}}function h(r){const b=(r.starts.hour||0)+(r.starts.minute||0)/60;return{height:`${44*((r.ends.hour||0)+(r.ends.minute||0)/60-b)-2-2-1-1}px`}}function k(){return s.value.map(r=>e.createVNode("div",{class:y(r)},[r.events.map(o=>e.createVNode("div",{class:"f-calendar-week-view-item-cell"},[o.events.length>0&&o.events.map(v=>e.createVNode("div",{class:"f-calendar-event",style:h(v)},[v.title]))]))]))}function i(){return e.createVNode("div",{ref:d,class:"f-calendar-content-primary"},[e.createVNode("div",{class:"f-calendar-content-data"},[k()])])}return e.onMounted(()=>{a.value&&a.value.scrollTo(0,250)}),()=>e.createVNode("div",{class:"f-calendar-week-view"},[D(),e.createVNode("div",{class:"f-calendar-week-view-content",ref:a},[l(),i()])])}}),ne={day:{Type:Object,default:{}},dayInWeek:{Type:String,default:""},enableMarkCurrent:{Type:Boolean,default:!0},events:{Type:Array,default:[]}},q=e.defineComponent({name:"FCalendarDayView",props:ne,emits:[],setup(t){const a=e.ref(),d=e.ref(),m=e.ref(t.dayInWeek),f=e.ref(t.day),u=e.ref(t.enableMarkCurrent),c=e.ref(t.events),s=e.ref([]),{equal:V}=F();function n(r){const o={year:f.value.date.year,month:f.value.date.month,day:f.value.date.day,hour:r.hour,minute:r.minute,second:r.second},v=c.value.filter(N=>V(N.starts,o));return[{day:o,events:v}]}function p(){const r=[];for(let o=0;o<24;o++){const v={hour:o,minute:0,second:0},N={hour:o,minute:30,second:0},w=n(v),M=n(N);r.push({time:v,events:w,title:o>0?`${o}:00`:"",part:"upper"}),r.push({time:N,events:M,title:`${o}:30`,part:"lower"})}s.value=r}p(),e.watch(()=>t.day,()=>{f.value=t.day,p()}),e.watch(()=>t.events,()=>{c.value=t.events,p()});const g=r=>({"f-calendar-day-view-date":!0,"f-calendar-day-view-current":r.isCurrent&&u.value});function D(){return e.createVNode("div",{class:"f-calendar-day-view-header"},[e.createVNode("div",{class:"f-calendar-day-view-header-corner"},null),e.createVNode("div",{class:"f-calendar-day-view-header-primary"},[e.createVNode("div",{class:"f-calendar-day-view-header-columns"},[e.createVNode("div",{class:"f-calendar-day-view-header-cell"},[e.createVNode("div",{class:g(f.value)},[f.value.date.day]),e.createVNode("span",null,[m.value])])])])])}function l(){return e.createVNode("div",{class:"f-calendar-day-view-content-side"},[e.createVNode("div",{class:"f-calendar-side"},[s.value.map(r=>e.createVNode("div",{class:"f-calendar-side-row"},[e.createVNode("div",{class:"f-calendar-side-row-number"},[r.part==="upper"?r.title:""])]))])])}function y(r){return{"f-calendar-day-view-item":!0,"f-calendar-day-view-item-upper":r.part==="upper","f-calendar-day-view-item-lower":r.part==="lower"}}function h(r){const b=(r.starts.hour||0)+(r.starts.minute||0)/60;return{height:`${44*((r.ends.hour||0)+(r.ends.minute||0)/60-b)-2-2-1-1}px`}}function k(){return s.value.map(r=>e.createVNode("div",{class:y(r)},[r.events.map(o=>e.createVNode("div",{class:"f-calendar-day-view-item-cell"},[o.events.length>0&&o.events.map(v=>e.createVNode("div",{class:"f-calendar-event",style:h(v)},[v.title]))]))]))}function i(){return e.createVNode("div",{ref:d,class:"f-calendar-content-primary"},[e.createVNode("div",{class:"f-calendar-content-data"},[k()])])}return e.onMounted(()=>{a.value&&a.value.scrollTo(0,250)}),()=>e.createVNode("div",{class:"f-calendar-day-view"},[D(),e.createVNode("div",{class:"f-calendar-day-view-content",ref:a},[l(),i()])])}}),E=e.defineComponent({name:"FCalendar",props:_,emits:[],setup(t){const{sameDay:a}=F(),{getToday:d}=G(),m=e.ref(t.firstDayOfTheWeek),f=e.ref(t.events),u=d(),c=e.ref({year:u.year||1,month:u.month||1,day:u.day||1}),s=e.ref(3),{getMonthlyCalendar:V,getWeeklyCalendar:n,getPreviousDay:p,getNextDay:g,getDayInPreviousWeek:D,getDayInNextWeek:l,getDayInPreviousMonth:y,getDayInNextMonth:h}=Z(),k=e.computed(()=>`${L[c.value.month||1]} ${c.value.year}`),i=e.computed(()=>V(c.value.month||1,c.value.year||1,m.value)),r=e.computed(()=>n(c.value.day||1,c.value.month||1,c.value.year||1,m.value)),o=e.computed(()=>r.value.days.find(T=>a(T.date,c.value))||r.value.days[1]),v=e.computed(()=>{const T=r.value.days.findIndex(j=>a(j.date,c.value)),J=T>-1?T:1;return $[J]}),N=e.computed(()=>s.value===3),w=e.computed(()=>s.value===2),M=e.computed(()=>s.value===1);function b(T){s.value=T}function O(T){T===1&&(c.value=p(c.value)),T===2&&(c.value=D(c.value)),T===3&&(c.value=y(c.value))}function W(T){T===1&&(c.value=g(c.value)),T===2&&(c.value=l(c.value)),T===3&&(c.value=h(c.value))}function S(){c.value={year:u.year||1,month:u.month||1,day:u.day||1}}return()=>e.createVNode("div",{class:"f-calendar"},[e.createVNode(I,{activeView:s.value,title:k.value,onViewChange:T=>b(T),onPrevious:T=>O(T),onNext:T=>W(T),onResetToToday:()=>S()},null),e.createVNode("div",null,[M.value&&e.createVNode(q,{day:o.value,dayInWeek:v.value,events:f.value},null),w.value&&e.createVNode(R,{week:r.value,events:f.value},null),N.value&&e.createVNode(B,{activeDay:c.value,dates:i.value,events:f.value},null)])])}});function we(t,a,d){var N;function m(){}const f="",u="",c=e.ref();function s(){return(a==null?void 0:a.schema.componentType)!=="frame"}function V(){return!1}function n(){return(a==null?void 0:a.schema.componentType)!=="frame"}function p(){return(a==null?void 0:a.schema.componentType)==="frame"}function g(w){if(!w||!w.value)return null;if(w.value.schema&&w.value.schema.type==="component")return w.value;const M=e.ref(w==null?void 0:w.value.parent),b=g(M);return b||null}function D(w=a){const{componentInstance:M,designerItemElementRef:b}=w;return!M||!M.value?null:M.value.canMove?b:D(w.parent)}function l(w){return!!d}function y(){return(a==null?void 0:a.schema.label)||(a==null?void 0:a.schema.title)||(a==null?void 0:a.schema.name)}function h(){}function k(w,M){}function i(w,M){const{componentType:b}=w;let O=x(b,w,M);const W=b.toLowerCase().replace("-","_");return O&&!O.id&&O.type===b&&(O.id=`${W}_${Math.random().toString().slice(2,6)}`),O}function r(w,M){const b=String(w.getAttribute("data-controltype")),O=w.getAttribute("data-feature"),W=O?JSON.parse(O):{};W.parentComponentInstance=c.value;let S=x(b,W);const T=b.toLowerCase().replace("-","_");return S&&!S.id&&S.type===b&&(S.id=`${T}_${Math.random().toString().slice(2,6)}`),S}function o(w){}function v(...w){}return c.value={canMove:s(),canSelectParent:V(),canDelete:n(),canNested:!p(),contents:a==null?void 0:a.schema.contents,elementRef:t,parent:(N=a==null?void 0:a.parent)==null?void 0:N.componentInstance,schema:a==null?void 0:a.schema,styles:f,designerClass:u,canAccepts:l,getBelongedComponentInstance:g,getDraggableDesignItemElement:D,getDraggingDisplayText:y,getPropConfig:v,getDragScopeElement:h,onAcceptMovedChildElement:k,onAcceptNewChildElement:r,onChildElementMovedOut:o,addNewChildComponentSchema:i,updateDragAndDropRules:m,triggerBelongedComponentToMoveWhenMoved:e.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:e.ref(!1)},c}const ge=e.defineComponent({name:"FCalendarDesign",props:_,emits:[],setup(t,a){const{sameDay:d}=F(),{getToday:m}=G(),f=e.ref(t.firstDayOfTheWeek),u=e.ref(t.events),c=m(),s=e.ref({year:c.year||1,month:c.month||1,day:c.day||1}),V=e.ref(3),n=e.ref(),p=e.inject("design-item-context"),g=we(n,p);e.onMounted(()=>{n.value.componentInstance=g}),a.expose(g.value);const{getMonthlyCalendar:D,getWeeklyCalendar:l,getPreviousDay:y,getNextDay:h,getDayInPreviousWeek:k,getDayInNextWeek:i,getDayInPreviousMonth:r,getDayInNextMonth:o}=Z(),v=e.computed(()=>`${L[s.value.month||1]} ${s.value.year}`),N=e.computed(()=>D(s.value.month||1,s.value.year||1,f.value)),w=e.computed(()=>l(s.value.day||1,s.value.month||1,s.value.year||1,f.value)),M=e.computed(()=>w.value.days.find(C=>d(C.date,s.value))||w.value.days[1]),b=e.computed(()=>{const C=w.value.days.findIndex(ke=>d(ke.date,s.value)),Ve=C>-1?C:1;return $[Ve]}),O=e.computed(()=>V.value===3),W=e.computed(()=>V.value===2),S=e.computed(()=>V.value===1);function T(C){V.value=C}function J(C){C===1&&(s.value=y(s.value)),C===2&&(s.value=k(s.value)),C===3&&(s.value=r(s.value))}function j(C){C===1&&(s.value=h(s.value)),C===2&&(s.value=i(s.value)),C===3&&(s.value=o(s.value))}function H(){s.value={year:c.year||1,month:c.month||1,day:c.day||1}}return()=>e.createVNode("div",{ref:n,class:"f-calendar"},[e.createVNode(I,{activeView:V.value,title:v.value,onViewChange:C=>T(C),onPrevious:C=>J(C),onNext:C=>j(C),onResetToToday:()=>H()},null),e.createVNode("div",null,[S.value&&e.createVNode(q,{day:M.value,dayInWeek:b.value,events:u.value},null),W.value&&e.createVNode(R,{week:w.value,events:u.value},null),O.value&&e.createVNode(B,{activeDay:s.value,dates:N.value,events:u.value},null)])])}});E.install=t=>{t.component(E.name,E).component(q.name,q).component(I.name,I).component(B.name,B).component(R.name,R)},E.register=(t,a,d,m)=>{t.calendar=E,a.calendar=U},E.registerDesigner=(t,a,d)=>{t.calendar=ge,a.calendar=U},P.FCalendar=E,P.FCalendarDayView=q,P.FCalendarHeader=I,P.FCalendarMonthView=B,P.FCalendarWeekView=R,P.MonthTag=A,P.calendarProps=_,P.dayViewProps=ne,P.default=E,P.defaultNameOfMonths=L,P.headerProps=K,P.monthViewProps=ee,P.propsResolver=U,P.weekDays=$,P.weekViewProps=te,Object.defineProperties(P,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,4 +1,4 @@
1
- import { defineComponent as F, ref as y, watch as D, computed as M, onMounted as P, createVNode as A, nextTick as T, inject as H } from "vue";
1
+ import { defineComponent as F, ref as y, watch as D, computed as S, onMounted as P, createVNode as w, nextTick as T, inject as H } from "vue";
2
2
  import { cloneDeep as Q } from "lodash-es";
3
3
  import { withInstall as U } from "../common/index.esm.js";
4
4
  const X = "https://json-schema.org/draft/2020-12/schema", Y = "https://farris-design.gitee.io/capsule.schema.json", Z = "capsule", I = "A Farris Component", K = "object", x = {
@@ -76,101 +76,101 @@ const X = "https://json-schema.org/draft/2020-12/schema", Y = "https://farris-de
76
76
  required: ee
77
77
  }, q = {}, _ = {};
78
78
  function W(n) {
79
- const { properties: e, title: r } = n, l = Object.keys(e).reduce((u, o) => (u[o] = e[o].type === "object" && e[o].properties ? W(e[o]) : Q(e[o].default), u), {});
80
- return l.id = `${r}-${Date.now()}`, l;
79
+ const { properties: e, title: u, ignore: l } = n, c = l && Array.isArray(l), o = Object.keys(e).reduce((i, g) => ((!c || !l.find((O) => O == g)) && (i[g] = e[g].type === "object" && e[g].properties ? W(e[g]) : Q(e[g].default)), i), {});
80
+ return (!c || !l.find((i) => i == "id")) && (o.id = `${u}-${Date.now()}`), o;
81
81
  }
82
- function N(n, e = {}) {
83
- const r = q[n];
84
- if (r) {
85
- let l = W(r);
86
- const u = _[n];
87
- return l = u ? u({ getSchemaByType: N }, l, e) : l, l;
82
+ function N(n, e = {}, u) {
83
+ const l = q[n];
84
+ if (l) {
85
+ let c = W(l);
86
+ const o = _[n];
87
+ return c = o ? o({ getSchemaByType: N }, c, e, u) : c, c;
88
88
  }
89
89
  return null;
90
90
  }
91
91
  function ne(n, e) {
92
- const r = W(e);
93
- return Object.keys(n).reduce((l, u) => (l[u] && typeof l[u] == "object" ? Object.assign(l[u], n[u]) : l[u] = n[u], l), r), r;
92
+ const u = W(e);
93
+ return Object.keys(n).reduce((l, c) => (l[c] && typeof l[c] == "object" ? Object.assign(l[c], n[c]) : l[c] = n[c], l), u), u;
94
94
  }
95
95
  function ae(n, e) {
96
- return Object.keys(n).filter((l) => n[l] != null).reduce((l, u) => {
97
- if (e.has(u)) {
98
- const o = e.get(u);
96
+ return Object.keys(n).filter((l) => n[l] != null).reduce((l, c) => {
97
+ if (e.has(c)) {
98
+ const o = e.get(c);
99
99
  if (typeof o == "string")
100
- l[o] = n[u];
100
+ l[o] = n[c];
101
101
  else {
102
- const d = o(u, n[u], n);
103
- Object.assign(l, d);
102
+ const i = o(c, n[c], n);
103
+ Object.assign(l, i);
104
104
  }
105
105
  } else
106
- l[u] = n[u];
106
+ l[c] = n[c];
107
107
  return l;
108
108
  }, {});
109
109
  }
110
- function le(n, e, r = /* @__PURE__ */ new Map()) {
110
+ function le(n, e, u = /* @__PURE__ */ new Map()) {
111
111
  const l = ne(n, e);
112
- return ae(l, r);
112
+ return ae(l, u);
113
113
  }
114
114
  function se(n = {}) {
115
- function e(s, p, i, f) {
116
- if (typeof i == "number")
117
- return f[s].length === i;
118
- if (typeof i == "object") {
119
- const h = Object.keys(i)[0], g = i[h];
115
+ function e(r, f, p, d) {
116
+ if (typeof p == "number")
117
+ return d[r].length === p;
118
+ if (typeof p == "object") {
119
+ const h = Object.keys(p)[0], b = p[h];
120
120
  if (h === "not")
121
- return Number(f[s].length) !== Number(g);
121
+ return Number(d[r].length) !== Number(b);
122
122
  if (h === "moreThan")
123
- return Number(f[s].length) >= Number(g);
123
+ return Number(d[r].length) >= Number(b);
124
124
  if (h === "lessThan")
125
- return Number(f[s].length) <= Number(g);
125
+ return Number(d[r].length) <= Number(b);
126
126
  }
127
127
  return !1;
128
128
  }
129
- function r(s, p, i, f) {
130
- return f[s] && f[s].propertyValue && String(f[s].propertyValue.value) === String(i);
129
+ function u(r, f, p, d) {
130
+ return d[r] && d[r].propertyValue && String(d[r].propertyValue.value) === String(p);
131
131
  }
132
132
  const l = /* @__PURE__ */ new Map([
133
133
  ["length", e],
134
- ["getProperty", r]
134
+ ["getProperty", u]
135
135
  ]);
136
- Object.keys(n).reduce((s, p) => (s.set(p, n[p]), s), l);
137
- function u(s, p) {
138
- const i = s;
139
- return typeof p == "number" ? [{ target: i, operator: "length", param: null, value: Number(p) }] : typeof p == "boolean" ? [{ target: i, operator: "getProperty", param: s, value: !!p }] : typeof p == "object" ? Object.keys(p).map((f) => {
140
- if (f === "length")
141
- return { target: i, operator: "length", param: null, value: p[f] };
142
- const h = f, g = p[f];
143
- return { target: i, operator: "getProperty", param: h, value: g };
136
+ Object.keys(n).reduce((r, f) => (r.set(f, n[f]), r), l);
137
+ function c(r, f) {
138
+ const p = r;
139
+ return typeof f == "number" ? [{ target: p, operator: "length", param: null, value: Number(f) }] : typeof f == "boolean" ? [{ target: p, operator: "getProperty", param: r, value: !!f }] : typeof f == "object" ? Object.keys(f).map((d) => {
140
+ if (d === "length")
141
+ return { target: p, operator: "length", param: null, value: f[d] };
142
+ const h = d, b = f[d];
143
+ return { target: p, operator: "getProperty", param: h, value: b };
144
144
  }) : [];
145
145
  }
146
- function o(s) {
147
- return Object.keys(s).reduce((i, f) => {
148
- const h = u(f, s[f]);
149
- return i.push(...h), i;
146
+ function o(r) {
147
+ return Object.keys(r).reduce((p, d) => {
148
+ const h = c(d, r[d]);
149
+ return p.push(...h), p;
150
150
  }, []);
151
151
  }
152
- function d(s, p) {
153
- if (l.has(s.operator)) {
154
- const i = l.get(s.operator);
155
- return i && i(s.target, s.param, s.value, p) || !1;
152
+ function i(r, f) {
153
+ if (l.has(r.operator)) {
154
+ const p = l.get(r.operator);
155
+ return p && p(r.target, r.param, r.value, f) || !1;
156
156
  }
157
157
  return !1;
158
158
  }
159
- function j(s, p) {
160
- return o(s).reduce((h, g) => h && d(g, p), !0);
159
+ function g(r, f) {
160
+ return o(r).reduce((h, b) => h && i(b, f), !0);
161
161
  }
162
- function S(s, p) {
163
- const i = Object.keys(s), f = i.includes("allOf"), h = i.includes("anyOf"), g = f || h, V = (g ? s[g ? f ? "allOf" : "anyOf" : "allOf"] : [s]).map((C) => j(C, p));
164
- return f ? !V.includes(!1) : V.includes(!0);
162
+ function O(r, f) {
163
+ const p = Object.keys(r), d = p.includes("allOf"), h = p.includes("anyOf"), b = d || h, V = (b ? r[b ? d ? "allOf" : "anyOf" : "allOf"] : [r]).map((C) => g(C, f));
164
+ return d ? !V.includes(!1) : V.includes(!0);
165
165
  }
166
- return { parseValueSchema: S };
166
+ return { parseValueSchema: O };
167
167
  }
168
- const ce = {}, ue = {};
168
+ const ce = {}, re = {};
169
169
  se();
170
- function re(n, e, r = /* @__PURE__ */ new Map(), l = (d, j, S) => j, u = {}, o = (d) => d) {
171
- return q[e.title] = e, _[e.title] = l, ce[e.title] = u, ue[e.title] = o, (d = {}) => {
172
- const j = le(d, e, r), S = Object.keys(n).reduce((s, p) => (s[p] = n[p].default, s), {});
173
- return Object.assign(S, j);
170
+ function ue(n, e, u = /* @__PURE__ */ new Map(), l = (i, g, O) => g, c = {}, o = (i) => i) {
171
+ return q[e.title] = e, _[e.title] = l, ce[e.title] = c, re[e.title] = o, (i = {}) => {
172
+ const g = le(i, e, u), O = Object.keys(n).reduce((r, f) => (r[f] = n[f].default, r), {});
173
+ return Object.assign(O, g);
174
174
  };
175
175
  }
176
176
  function oe(n, e) {
@@ -179,7 +179,7 @@ function oe(n, e) {
179
179
  const ie = /* @__PURE__ */ new Map([
180
180
  ["appearance", oe]
181
181
  ]);
182
- function pe(n, e, r) {
182
+ function pe(n, e, u) {
183
183
  return e;
184
184
  }
185
185
  const fe = "capsule", de = "A Farris Component", ve = "object", me = {
@@ -230,34 +230,34 @@ const fe = "capsule", de = "A Farris Component", ve = "object", me = {
230
230
  index: { type: Number, default: 0 },
231
231
  show: { type: Boolean, default: !0 },
232
232
  disabled: { type: Boolean, default: !1 }
233
- }, J = re(L, te, ie, pe, ye), z = /* @__PURE__ */ F({
233
+ }, J = ue(L, te, ie, pe, ye), z = /* @__PURE__ */ F({
234
234
  name: "FCapsuleItem",
235
235
  props: he,
236
236
  emits: ["mounted", "active"],
237
237
  setup(n, e) {
238
- const r = y(), l = y(n.isActive);
239
- D(() => n.isActive, (d) => {
240
- l.value = d;
238
+ const u = y(), l = y(n.isActive);
239
+ D(() => n.isActive, (i) => {
240
+ l.value = i;
241
241
  });
242
- const u = M(() => ({
242
+ const c = S(() => ({
243
243
  "f-capsule-item": !0,
244
244
  "f-capsule-active-item": l.value,
245
245
  "f-capsule-disabled": n.disabled
246
246
  }));
247
247
  P(() => {
248
- e.emit("mounted", r, n.value);
248
+ e.emit("mounted", u, n.value);
249
249
  });
250
- function o(d) {
251
- n.disabled || e.emit("active", d, {
250
+ function o(i) {
251
+ n.disabled || e.emit("active", i, {
252
252
  name: n.name,
253
253
  value: n.value
254
254
  });
255
255
  }
256
- return () => A("div", {
257
- ref: r,
258
- class: u.value,
259
- onClick: (d) => o(d)
260
- }, [n.icon && A("i", {
256
+ return () => w("div", {
257
+ ref: u,
258
+ class: c.value,
259
+ onClick: (i) => o(i)
260
+ }, [n.icon && w("i", {
261
261
  class: n.icon
262
262
  }, null), n.name]);
263
263
  }
@@ -266,59 +266,59 @@ const fe = "capsule", de = "A Farris Component", ve = "object", me = {
266
266
  props: L,
267
267
  emits: ["change", "update:modelValue"],
268
268
  setup(n, e) {
269
- const r = y(n.items), l = y(), u = 2, o = y(n.modelValue), d = y("none"), j = y(n.type), S = M(() => {
269
+ const u = y(n.items), l = y(), c = 2, o = y(n.modelValue), i = y("none"), g = y(n.type), O = S(() => {
270
270
  const a = {
271
271
  "f-capsule-container": !0
272
272
  };
273
- return j.value && (a[j.value] = !0), a;
274
- }), s = M(() => ({})), p = M(() => ({
273
+ return g.value && (a[g.value] = !0), a;
274
+ }), r = S(() => ({})), f = S(() => ({
275
275
  "f-capsule": !0
276
- })), i = y(u), f = y(0), h = y(0), g = M(() => ({
277
- left: `${i.value}px`,
278
- width: `${f.value}px`,
279
- transition: d.value
280
- })), R = M(() => ({
276
+ })), p = y(c), d = y(0), h = y(0), b = S(() => ({
277
+ left: `${p.value}px`,
278
+ width: `${d.value}px`,
279
+ transition: i.value
280
+ })), R = S(() => ({
281
281
  width: `${h.value}px`
282
- })), O = /* @__PURE__ */ new Map();
282
+ })), A = /* @__PURE__ */ new Map();
283
283
  function V(a) {
284
284
  var t;
285
- if (O.has(a.value)) {
286
- const c = (t = O.get(a.value)) == null ? void 0 : t.value;
287
- if (c) {
288
- const m = c.getBoundingClientRect(), B = l.value.getBoundingClientRect();
289
- i.value = m.left - B.left + u + l.value.scrollLeft, f.value = m.width - 2 * u;
285
+ if (A.has(a.value)) {
286
+ const s = (t = A.get(a.value)) == null ? void 0 : t.value;
287
+ if (s) {
288
+ const m = s.getBoundingClientRect(), B = l.value.getBoundingClientRect();
289
+ p.value = m.left - B.left + c + l.value.scrollLeft, d.value = m.width - 2 * c;
290
290
  }
291
291
  }
292
292
  }
293
- function w(a, t) {
294
- const c = a.value;
295
- o.value = c, e.emit("update:modelValue", c), V(a), t && e.emit("change", c);
293
+ function M(a, t) {
294
+ const s = a.value;
295
+ o.value = s, e.emit("update:modelValue", s), V(a), t && e.emit("change", s);
296
296
  }
297
297
  function C(a) {
298
- const t = r.value.findIndex((c) => c.value === a);
299
- t > -1 && w(r.value[t], !1);
298
+ const t = u.value.findIndex((s) => s.value === a);
299
+ t > -1 && M(u.value[t], !1);
300
300
  }
301
301
  D(() => n.modelValue, (a) => {
302
302
  o.value = a, C(o.value);
303
303
  }), D(() => n.items, async (a) => {
304
- const t = a.filter((c) => c.show);
305
- v(t), r.value = t, await T(), C(o.value), h.value = Array.from(O.values()).reduce((c, m) => (c += m.value.clientWidth, c), 0);
304
+ const t = a.filter((s) => s.show);
305
+ v(t), u.value = t, await T(), C(o.value), h.value = Array.from(A.values()).reduce((s, m) => (s += m.value.clientWidth, s), 0);
306
306
  }), P(async () => {
307
- C(o.value), await T(), d.value = "0.1s ease-out all", h.value = Array.from(O.values()).reduce((a, t) => (a += t.value.clientWidth, a), 0);
307
+ C(o.value), await T(), i.value = "0.1s ease-out all", h.value = Array.from(A.values()).reduce((a, t) => (a += t.value.clientWidth, a), 0);
308
308
  });
309
309
  function $(a, t) {
310
- w(t, !0);
310
+ M(t, !0);
311
311
  }
312
312
  function E(a, t) {
313
- O.set(t, a);
313
+ A.set(t, a);
314
314
  }
315
315
  function v(a) {
316
- Array.from(O.keys()).forEach((t) => {
317
- a.find((m) => m.value === t) || O.delete(t);
316
+ Array.from(A.keys()).forEach((t) => {
317
+ a.find((m) => m.value === t) || A.delete(t);
318
318
  });
319
319
  }
320
- function b(a, t) {
321
- return A(z, {
320
+ function j(a, t) {
321
+ return w(z, {
322
322
  name: a.name,
323
323
  value: a.value,
324
324
  isActive: a.value === o.value,
@@ -329,70 +329,70 @@ const fe = "capsule", de = "A Farris Component", ve = "object", me = {
329
329
  onActive: $
330
330
  }, null);
331
331
  }
332
- return () => A("span", {
332
+ return () => w("span", {
333
333
  ref: l,
334
- class: S.value,
335
- style: s.value
336
- }, [A("span", {
334
+ class: O.value,
335
+ style: r.value
336
+ }, [w("span", {
337
337
  class: "f-capsule-pane"
338
- }, [r.value.map((a, t) => b(a, t))]), A("small", {
339
- class: p.value,
340
- style: g.value
341
- }, null), A("div", {
338
+ }, [u.value.map((a, t) => j(a, t))]), w("small", {
339
+ class: f.value,
340
+ style: b.value
341
+ }, null), w("div", {
342
342
  class: "f-capsule-board",
343
343
  style: R.value
344
344
  }, null)]);
345
345
  }
346
346
  });
347
- function ge(n, e, r) {
347
+ function ge(n, e, u) {
348
348
  var E;
349
349
  function l() {
350
350
  }
351
- const u = "", o = "", d = y();
352
- function j() {
351
+ const c = "", o = "", i = y();
352
+ function g() {
353
353
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
354
354
  }
355
- function S() {
355
+ function O() {
356
356
  return !1;
357
357
  }
358
- function s() {
358
+ function r() {
359
359
  return (e == null ? void 0 : e.schema.componentType) !== "frame";
360
360
  }
361
- function p() {
361
+ function f() {
362
362
  return (e == null ? void 0 : e.schema.componentType) === "frame";
363
363
  }
364
- function i(v) {
364
+ function p(v) {
365
365
  if (!v || !v.value)
366
366
  return null;
367
367
  if (v.value.schema && v.value.schema.type === "component")
368
368
  return v.value;
369
- const b = y(v == null ? void 0 : v.value.parent), a = i(b);
369
+ const j = y(v == null ? void 0 : v.value.parent), a = p(j);
370
370
  return a || null;
371
371
  }
372
- function f(v = e) {
373
- const { componentInstance: b, designerItemElementRef: a } = v;
374
- return !b || !b.value ? null : b.value.canMove ? a : f(v.parent);
372
+ function d(v = e) {
373
+ const { componentInstance: j, designerItemElementRef: a } = v;
374
+ return !j || !j.value ? null : j.value.canMove ? a : d(v.parent);
375
375
  }
376
376
  function h(v) {
377
- return !!r;
377
+ return !!u;
378
378
  }
379
- function g() {
379
+ function b() {
380
380
  return (e == null ? void 0 : e.schema.label) || (e == null ? void 0 : e.schema.title) || (e == null ? void 0 : e.schema.name);
381
381
  }
382
382
  function R() {
383
383
  }
384
- function O(v, b) {
384
+ function A(v, j) {
385
385
  }
386
- function V(v) {
387
- const { componentType: b } = v;
388
- let a = N(b, v);
389
- const t = b.toLowerCase().replace("-", "_");
390
- return a && !a.id && a.type === b && (a.id = `${t}_${Math.random().toString().slice(2, 6)}`), a;
386
+ function V(v, j) {
387
+ const { componentType: a } = v;
388
+ let t = N(a, v, j);
389
+ const s = a.toLowerCase().replace("-", "_");
390
+ return t && !t.id && t.type === a && (t.id = `${s}_${Math.random().toString().slice(2, 6)}`), t;
391
391
  }
392
- function w(v, b) {
393
- const a = String(v.getAttribute("data-controltype")), t = v.getAttribute("data-feature"), c = t ? JSON.parse(t) : {};
394
- c.parentComponentInstance = d.value;
395
- let m = N(a, c);
392
+ function M(v, j) {
393
+ const a = String(v.getAttribute("data-controltype")), t = v.getAttribute("data-feature"), s = t ? JSON.parse(t) : {};
394
+ s.parentComponentInstance = i.value;
395
+ let m = N(a, s);
396
396
  const B = a.toLowerCase().replace("-", "_");
397
397
  return m && !m.id && m.type === a && (m.id = `${B}_${Math.random().toString().slice(2, 6)}`), m;
398
398
  }
@@ -400,115 +400,115 @@ function ge(n, e, r) {
400
400
  }
401
401
  function $(...v) {
402
402
  }
403
- return d.value = {
404
- canMove: j(),
405
- canSelectParent: S(),
406
- canDelete: s(),
407
- canNested: !p(),
403
+ return i.value = {
404
+ canMove: g(),
405
+ canSelectParent: O(),
406
+ canDelete: r(),
407
+ canNested: !f(),
408
408
  contents: e == null ? void 0 : e.schema.contents,
409
409
  elementRef: n,
410
410
  parent: (E = e == null ? void 0 : e.parent) == null ? void 0 : E.componentInstance,
411
411
  schema: e == null ? void 0 : e.schema,
412
- styles: u,
412
+ styles: c,
413
413
  designerClass: o,
414
414
  canAccepts: h,
415
- getBelongedComponentInstance: i,
416
- getDraggableDesignItemElement: f,
417
- getDraggingDisplayText: g,
415
+ getBelongedComponentInstance: p,
416
+ getDraggableDesignItemElement: d,
417
+ getDraggingDisplayText: b,
418
418
  getPropConfig: $,
419
419
  getDragScopeElement: R,
420
- onAcceptMovedChildElement: O,
421
- onAcceptNewChildElement: w,
420
+ onAcceptMovedChildElement: A,
421
+ onAcceptNewChildElement: M,
422
422
  onChildElementMovedOut: C,
423
423
  addNewChildComponentSchema: V,
424
424
  updateDragAndDropRules: l,
425
425
  triggerBelongedComponentToMoveWhenMoved: y(!1),
426
426
  triggerBelongedComponentToDeleteWhenDeleted: y(!1)
427
- }, d;
427
+ }, i;
428
428
  }
429
429
  const be = /* @__PURE__ */ F({
430
430
  name: "FCapsuleDesign",
431
431
  props: L,
432
432
  emits: ["change", "update:modelValue"],
433
433
  setup(n, e) {
434
- const r = y(n.items), l = y(), u = 2, o = y(n.modelValue), d = y("none"), j = y(n.type), S = H("design-item-context"), s = ge(l, S);
434
+ const u = y(n.items), l = y(), c = 2, o = y(n.modelValue), i = y("none"), g = y(n.type), O = H("design-item-context"), r = ge(l, O);
435
435
  P(() => {
436
- l.value.componentInstance = s;
437
- }), e.expose(s.value);
438
- const p = M(() => {
436
+ l.value.componentInstance = r;
437
+ }), e.expose(r.value);
438
+ const f = S(() => {
439
439
  const t = {
440
440
  "f-capsule-container": !0
441
441
  };
442
- return j.value && (t[j.value] = !0), t;
443
- }), i = M(() => ({})), f = M(() => ({
442
+ return g.value && (t[g.value] = !0), t;
443
+ }), p = S(() => ({})), d = S(() => ({
444
444
  "f-capsule": !0
445
- })), h = y(u), g = y(0), R = y(0), O = M(() => ({
445
+ })), h = y(c), b = y(0), R = y(0), A = S(() => ({
446
446
  left: `${h.value}px`,
447
- width: `${g.value}px`,
448
- transition: d.value
449
- })), V = M(() => ({
447
+ width: `${b.value}px`,
448
+ transition: i.value
449
+ })), V = S(() => ({
450
450
  width: `${R.value}px`
451
- })), w = /* @__PURE__ */ new Map();
451
+ })), M = /* @__PURE__ */ new Map();
452
452
  function C(t) {
453
- var c;
454
- if (w.has(t.value)) {
455
- const m = (c = w.get(t.value)) == null ? void 0 : c.value;
453
+ var s;
454
+ if (M.has(t.value)) {
455
+ const m = (s = M.get(t.value)) == null ? void 0 : s.value;
456
456
  if (m) {
457
457
  const B = m.getBoundingClientRect(), G = l.value.getBoundingClientRect();
458
- h.value = B.left - G.left + u + l.value.scrollLeft, g.value = B.width - 2 * u;
458
+ h.value = B.left - G.left + c + l.value.scrollLeft, b.value = B.width - 2 * c;
459
459
  }
460
460
  }
461
461
  }
462
- function $(t, c) {
462
+ function $(t, s) {
463
463
  const m = t.value;
464
- o.value = m, e.emit("update:modelValue", m), C(t), c && e.emit("change", m);
464
+ o.value = m, e.emit("update:modelValue", m), C(t), s && e.emit("change", m);
465
465
  }
466
466
  function E(t) {
467
- const c = r.value.findIndex((m) => m.value === t);
468
- c > -1 && $(r.value[c], !1);
467
+ const s = u.value.findIndex((m) => m.value === t);
468
+ s > -1 && $(u.value[s], !1);
469
469
  }
470
470
  D(() => n.modelValue, (t) => {
471
471
  o.value = t, E(o.value);
472
472
  }), D(() => n.items, async (t) => {
473
- r.value = t, await T(), E(o.value), R.value = Array.from(w.values()).reduce((c, m) => (c += m.value.clientWidth, c), 0);
473
+ u.value = t, await T(), E(o.value), R.value = Array.from(M.values()).reduce((s, m) => (s += m.value.clientWidth, s), 0);
474
474
  }), P(async () => {
475
- E(o.value), await T(), d.value = "0.1s ease-out all", R.value = Array.from(w.values()).reduce((t, c) => (t += c.value.clientWidth, t), 0);
475
+ E(o.value), await T(), i.value = "0.1s ease-out all", R.value = Array.from(M.values()).reduce((t, s) => (t += s.value.clientWidth, t), 0);
476
476
  });
477
- function v(t, c) {
478
- $(c, !0);
477
+ function v(t, s) {
478
+ $(s, !0);
479
479
  }
480
- function b(t, c) {
481
- w.set(c, t);
480
+ function j(t, s) {
481
+ M.set(s, t);
482
482
  }
483
- function a(t, c) {
484
- return A(z, {
483
+ function a(t, s) {
484
+ return w(z, {
485
485
  name: t.name,
486
486
  value: t.value,
487
487
  isActive: t.value === o.value,
488
- index: c,
489
- onMounted: b,
488
+ index: s,
489
+ onMounted: j,
490
490
  onActive: v
491
491
  }, null);
492
492
  }
493
- return () => A("span", {
493
+ return () => w("span", {
494
494
  ref: l,
495
- class: p.value,
496
- style: i.value
497
- }, [A("span", {
498
- class: "f-capsule-pane"
499
- }, [r.value.map((t, c) => a(t, c))]), A("small", {
500
495
  class: f.value,
501
- style: O.value
502
- }, null), A("div", {
496
+ style: p.value
497
+ }, [w("span", {
498
+ class: "f-capsule-pane"
499
+ }, [u.value.map((t, s) => a(t, s))]), w("small", {
500
+ class: d.value,
501
+ style: A.value
502
+ }, null), w("div", {
503
503
  class: "f-capsule-board",
504
504
  style: V.value
505
505
  }, null)]);
506
506
  }
507
507
  });
508
- k.register = (n, e, r) => {
508
+ k.register = (n, e, u) => {
509
509
  n.capsule = k, e.capsule = J;
510
510
  };
511
- k.registerDesigner = (n, e, r) => {
511
+ k.registerDesigner = (n, e, u) => {
512
512
  n.capsule = be, e.capsule = J;
513
513
  };
514
514
  const we = U(k);