@farris/ui-vue 1.2.9 → 1.3.0

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 (236) hide show
  1. package/components/accordion/index.esm.js +63 -63
  2. package/components/accordion/index.umd.cjs +1 -1
  3. package/components/avatar/index.esm.js +402 -323
  4. package/components/avatar/index.umd.cjs +1 -1
  5. package/components/button-edit/index.css +1 -1
  6. package/components/button-edit/index.esm.js +98 -96
  7. package/components/button-edit/index.umd.cjs +1 -1
  8. package/components/calendar/index.esm.js +66 -66
  9. package/components/calendar/index.umd.cjs +1 -1
  10. package/components/capsule/index.esm.js +118 -118
  11. package/components/capsule/index.umd.cjs +1 -1
  12. package/components/checkbox/index.esm.js +539 -460
  13. package/components/checkbox/index.umd.cjs +1 -1
  14. package/components/color-picker/index.esm.js +135 -135
  15. package/components/color-picker/index.umd.cjs +2 -2
  16. package/components/combo-list/index.css +1 -0
  17. package/components/combo-list/index.esm.js +1007 -312
  18. package/components/combo-list/index.umd.cjs +1 -1
  19. package/components/combo-tree/index.esm.js +97 -97
  20. package/components/combo-tree/index.umd.cjs +1 -1
  21. package/components/common/index.esm.js +778 -700
  22. package/components/common/index.umd.cjs +1 -1
  23. package/components/component/index.esm.js +472 -329
  24. package/components/component/index.umd.cjs +1 -1
  25. package/components/condition/index.css +1 -0
  26. package/components/condition/index.esm.js +2231 -1055
  27. package/components/condition/index.umd.cjs +1 -1
  28. package/components/content-container/index.esm.js +79 -79
  29. package/components/content-container/index.umd.cjs +1 -1
  30. package/components/data-grid/index.css +1 -1
  31. package/components/data-grid/index.esm.js +6408 -5034
  32. package/components/data-grid/index.umd.cjs +1 -1
  33. package/components/data-view/index.css +1 -0
  34. package/components/data-view/index.esm.js +4762 -3511
  35. package/components/data-view/index.umd.cjs +1 -1
  36. package/components/date-picker/index.css +1 -1
  37. package/components/date-picker/index.esm.js +3442 -2742
  38. package/components/date-picker/index.umd.cjs +1 -1
  39. package/components/designer-outline/index.esm.js +14 -13
  40. package/components/designer-outline/index.umd.cjs +1 -1
  41. package/components/dropdown/index.esm.js +73 -73
  42. package/components/dropdown/index.umd.cjs +2 -2
  43. package/components/dynamic-form/index.css +1 -0
  44. package/components/dynamic-form/index.esm.js +2597 -1141
  45. package/components/dynamic-form/index.umd.cjs +1 -1
  46. package/components/dynamic-resolver/index.esm.js +114 -71
  47. package/components/dynamic-resolver/index.umd.cjs +1 -1
  48. package/components/dynamic-view/index.esm.js +303 -290
  49. package/components/dynamic-view/index.umd.cjs +1 -1
  50. package/components/events-editor/index.esm.js +171 -171
  51. package/components/events-editor/index.umd.cjs +1 -1
  52. package/components/expression-editor/index.esm.js +65 -65
  53. package/components/expression-editor/index.umd.cjs +1 -1
  54. package/components/external-container/index.css +1 -1
  55. package/components/external-container/index.esm.js +3075 -2586
  56. package/components/external-container/index.umd.cjs +1 -1
  57. package/components/field-selector/index.css +1 -1
  58. package/components/field-selector/index.esm.js +5272 -8511
  59. package/components/field-selector/index.umd.cjs +1 -1
  60. package/components/filter-bar/index.css +1 -1
  61. package/components/filter-bar/index.esm.js +1726 -1822
  62. package/components/filter-bar/index.umd.cjs +1 -1
  63. package/components/image-cropper/index.esm.js +126 -126
  64. package/components/image-cropper/index.umd.cjs +1 -1
  65. package/components/input-group/index.esm.js +620 -540
  66. package/components/input-group/index.umd.cjs +1 -1
  67. package/components/layout/index.esm.js +88 -88
  68. package/components/layout/index.umd.cjs +1 -1
  69. package/components/list-nav/index.esm.js +71 -71
  70. package/components/list-nav/index.umd.cjs +1 -1
  71. package/components/list-view/index.css +1 -1
  72. package/components/list-view/index.esm.js +3582 -2356
  73. package/components/list-view/index.umd.cjs +1 -1
  74. package/components/lookup/index.css +1 -1
  75. package/components/lookup/index.esm.js +10752 -8972
  76. package/components/lookup/index.umd.cjs +1 -1
  77. package/components/mapping-editor/index.css +1 -1
  78. package/components/mapping-editor/index.esm.js +5601 -5329
  79. package/components/mapping-editor/index.umd.cjs +1 -1
  80. package/components/message-box/index.css +1 -1
  81. package/components/message-box/index.esm.js +511 -471
  82. package/components/message-box/index.umd.cjs +1 -1
  83. package/components/modal/index.css +1 -1
  84. package/components/modal/index.esm.js +438 -398
  85. package/components/modal/index.umd.cjs +1 -1
  86. package/components/nav/index.esm.js +535 -452
  87. package/components/nav/index.umd.cjs +2 -2
  88. package/components/notify/index.esm.js +59 -53
  89. package/components/notify/index.umd.cjs +1 -1
  90. package/components/number-range/index.esm.js +556 -477
  91. package/components/number-range/index.umd.cjs +1 -1
  92. package/components/number-spinner/index.esm.js +504 -425
  93. package/components/number-spinner/index.umd.cjs +1 -1
  94. package/components/order/index.css +1 -1
  95. package/components/order/index.esm.js +1833 -1054
  96. package/components/order/index.umd.cjs +1 -1
  97. package/components/page-footer/index.esm.js +100 -100
  98. package/components/page-footer/index.umd.cjs +1 -1
  99. package/components/page-header/index.esm.js +899 -870
  100. package/components/page-header/index.umd.cjs +1 -1
  101. package/components/pagination/index.esm.js +576 -487
  102. package/components/pagination/index.umd.cjs +1 -1
  103. package/components/popover/index.esm.js +71 -70
  104. package/components/popover/index.umd.cjs +1 -1
  105. package/components/progress/index.esm.js +73 -73
  106. package/components/progress/index.umd.cjs +2 -2
  107. package/components/property-editor/index.css +1 -1
  108. package/components/property-editor/index.esm.js +1916 -1220
  109. package/components/property-editor/index.umd.cjs +3 -3
  110. package/components/property-panel/index.esm.js +783 -886
  111. package/components/property-panel/index.umd.cjs +1 -1
  112. package/components/query-solution/index.css +1 -1
  113. package/components/query-solution/index.esm.js +3632 -2556
  114. package/components/query-solution/index.umd.cjs +1 -1
  115. package/components/radio-button/index.esm.js +72 -72
  116. package/components/radio-button/index.umd.cjs +1 -1
  117. package/components/radio-group/index.esm.js +484 -405
  118. package/components/radio-group/index.umd.cjs +1 -1
  119. package/components/rate/index.esm.js +152 -152
  120. package/components/rate/index.umd.cjs +1 -1
  121. package/components/response-layout/index.esm.js +73 -73
  122. package/components/response-layout/index.umd.cjs +1 -1
  123. package/components/response-layout-editor/index.css +1 -1
  124. package/components/response-layout-editor/index.esm.js +1081 -1043
  125. package/components/response-layout-editor/index.umd.cjs +1 -1
  126. package/components/response-toolbar/index.esm.js +753 -738
  127. package/components/response-toolbar/index.umd.cjs +1 -1
  128. package/components/schema-selector/index.css +1 -1
  129. package/components/schema-selector/index.esm.js +4418 -4177
  130. package/components/schema-selector/index.umd.cjs +2 -2
  131. package/components/search-box/index.esm.js +119 -119
  132. package/components/search-box/index.umd.cjs +1 -1
  133. package/components/section/index.esm.js +92 -91
  134. package/components/section/index.umd.cjs +1 -1
  135. package/components/smoke-detector/index.esm.js +59 -59
  136. package/components/smoke-detector/index.umd.cjs +1 -1
  137. package/components/splitter/index.esm.js +103 -103
  138. package/components/splitter/index.umd.cjs +1 -1
  139. package/components/step/index.esm.js +85 -85
  140. package/components/step/index.umd.cjs +1 -1
  141. package/components/switch/index.esm.js +457 -378
  142. package/components/switch/index.umd.cjs +1 -1
  143. package/components/tabs/index.css +1 -1
  144. package/components/tabs/index.esm.js +1696 -1617
  145. package/components/tabs/index.umd.cjs +1 -1
  146. package/components/tags/index.esm.js +53 -53
  147. package/components/tags/index.umd.cjs +1 -1
  148. package/components/text/index.esm.js +268 -268
  149. package/components/text/index.umd.cjs +1 -1
  150. package/components/textarea/index.esm.js +420 -341
  151. package/components/textarea/index.umd.cjs +1 -1
  152. package/components/time-picker/index.css +1 -1
  153. package/components/time-picker/index.esm.js +1062 -981
  154. package/components/time-picker/index.umd.cjs +1 -1
  155. package/components/transfer/index.css +1 -1
  156. package/components/transfer/index.esm.js +381 -379
  157. package/components/transfer/index.umd.cjs +1 -1
  158. package/components/tree-grid/index.css +1 -1
  159. package/components/tree-grid/index.esm.js +5252 -9560
  160. package/components/tree-grid/index.umd.cjs +1 -1
  161. package/components/tree-view/index.css +1 -0
  162. package/components/tree-view/index.esm.js +3920 -2692
  163. package/components/tree-view/index.umd.cjs +1 -1
  164. package/components/uploader/index.esm.js +373 -367
  165. package/components/uploader/index.umd.cjs +2 -2
  166. package/components/verify-detail/index.esm.js +92 -92
  167. package/components/verify-detail/index.umd.cjs +1 -1
  168. package/components/video/index.esm.js +597 -417
  169. package/components/video/index.umd.cjs +1 -1
  170. package/components/weather/index.esm.js +251 -251
  171. package/components/weather/index.umd.cjs +4 -4
  172. package/farris.all.esm.js +17125 -16176
  173. package/farris.all.umd.cjs +8 -8
  174. package/index.css +1 -1
  175. package/package.json +1 -1
  176. package/types/capsule/src/capsule.props.d.ts +2 -2
  177. package/types/combo-list/src/components/list-container.component.d.ts +0 -3
  178. package/types/combo-list/src/components/list-container.props.d.ts +0 -4
  179. package/types/common/index.d.ts +1 -0
  180. package/types/common/types.d.ts +1 -1
  181. package/types/common/utils/encrypt.d.ts +2 -0
  182. package/types/component/src/component.props.d.ts +7 -0
  183. package/types/component/src/designer/use-designer-rules.d.ts +1 -1
  184. package/types/component/src/property-config/component.property-config.d.ts +9 -0
  185. package/types/components.d.ts +1 -0
  186. package/types/data-grid/index.d.ts +5 -2
  187. package/types/data-grid/src/data-grid.component.d.ts +2 -1
  188. package/types/data-grid/src/data-grid.props.d.ts +1 -0
  189. package/types/data-view/composition/types.d.ts +18 -1
  190. package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
  191. package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
  192. package/types/designer-canvas/src/composition/types.d.ts +1 -1
  193. package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
  194. package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
  195. package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
  196. package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
  197. package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
  198. package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
  199. package/types/dynamic-form/src/schema/schema-resolver.d.ts +1 -0
  200. package/types/dynamic-form/src/types.d.ts +12 -1
  201. package/types/dynamic-resolver/index.d.ts +1 -0
  202. package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
  203. package/types/dynamic-resolver/src/types.d.ts +9 -0
  204. package/types/dynamic-view/index.d.ts +1 -0
  205. package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
  206. package/types/index.d.ts +2 -0
  207. package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
  208. package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
  209. package/types/lookup/src/components/modal-container.component.d.ts +25 -0
  210. package/types/lookup/src/components/modal-container.props.d.ts +29 -0
  211. package/types/lookup/src/composition/types.d.ts +8 -0
  212. package/types/lookup/src/composition/use-check-props.d.ts +9 -2
  213. package/types/lookup/src/composition/use-dialog.d.ts +5 -1
  214. package/types/lookup/src/composition/use-favorite.d.ts +12 -0
  215. package/types/lookup/src/composition/use-http.d.ts +9 -5
  216. package/types/lookup/src/composition/use-input-change.d.ts +3 -0
  217. package/types/lookup/src/composition/use-user-data.d.ts +24 -0
  218. package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
  219. package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
  220. package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
  221. package/types/modal/src/composition/use-draggable.d.ts +2 -1
  222. package/types/modal/src/composition/use-shortcut.d.ts +6 -0
  223. package/types/modal/src/modal.component.d.ts +3 -0
  224. package/types/modal/src/modal.props.d.ts +4 -0
  225. package/types/page-header/src/page-header.props.d.ts +1 -0
  226. package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
  227. package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
  228. package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
  229. package/types/response-layout-editor/src/type.d.ts +21 -0
  230. package/types/tabs/src/tabs.props.d.ts +1 -0
  231. package/types/tree-grid/index.d.ts +8 -2
  232. package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
  233. package/types/data-grid/src/designer/use-group-column.d.ts +0 -20
  234. package/types/modal/src/composition/use-esc.d.ts +0 -1
  235. package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
  236. package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
@@ -1 +1 @@
1
- (function(M,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("lodash-es"),require("../common/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../common/index.umd.js"],e):(M=typeof globalThis<"u"?globalThis:M||self,e(M.pagination={},M.Vue,M.LodashES,M.common))})(this,function(M,e,ae,re){"use strict";const X={},Y={};function _(o){const{properties:t,title:n,ignore:p}=o,r=p&&Array.isArray(p),d=Object.keys(t).reduce((a,s)=>((!r||!p.find(c=>c==s))&&(a[s]=t[s].type==="object"&&t[s].properties?_(t[s]):ae.cloneDeep(t[s].default)),a),{});return(!r||!p.find(a=>a=="id"))&&(d.id=`${n}-${Date.now()}`),d}function B(o,t={},n){const p=X[o];if(p){let r=_(p);const d=Y[o];return r=d?d({getSchemaByType:B},r,t,n):r,r}return null}function se(o,t){const n=_(t);return Object.keys(o).reduce((p,r)=>(p[r]&&typeof p[r]=="object"?Object.assign(p[r],o[r]):p[r]=o[r],p),n),n}function ce(o,t){return Object.keys(o).filter(p=>o[p]!=null).reduce((p,r)=>{if(t.has(r)){const d=t.get(r);if(typeof d=="string")p[d]=o[r];else{const a=d(r,o[r],o);Object.assign(p,a)}}else p[r]=o[r];return p},{})}function le(o,t,n=new Map){const p=se(o,t);return ce(p,n)}function ie(o={}){function t(f,g,j,h){if(typeof j=="number")return h[f].length===j;if(typeof j=="object"){const P=Object.keys(j)[0],i=j[P];if(P==="not")return Number(h[f].length)!==Number(i);if(P==="moreThan")return Number(h[f].length)>=Number(i);if(P==="lessThan")return Number(h[f].length)<=Number(i)}return!1}function n(f,g,j,h){return h[f]&&h[f].propertyValue&&String(h[f].propertyValue.value)===String(j)}const p=new Map([["length",t],["getProperty",n]]);Object.keys(o).reduce((f,g)=>(f.set(g,o[g]),f),p);function r(f,g){const j=f;return typeof g=="number"?[{target:j,operator:"length",param:null,value:Number(g)}]:typeof g=="boolean"?[{target:j,operator:"getProperty",param:f,value:!!g}]:typeof g=="object"?Object.keys(g).map(h=>{if(h==="length")return{target:j,operator:"length",param:null,value:g[h]};const P=h,i=g[h];return{target:j,operator:"getProperty",param:P,value:i}}):[]}function d(f){return Object.keys(f).reduce((j,h)=>{const P=r(h,f[h]);return j.push(...P),j},[])}function a(f,g){if(p.has(f.operator)){const j=p.get(f.operator);return j&&j(f.target,f.param,f.value,g)||!1}return!1}function s(f,g){return d(f).reduce((P,i)=>P&&a(i,g),!0)}function c(f,g){const j=Object.keys(f),h=j.includes("allOf"),P=j.includes("anyOf"),i=h||P,m=(i?f[i?h?"allOf":"anyOf":"allOf"]:[f]).map(v=>s(v,g));return h?!m.includes(!1):m.includes(!0)}return{parseValueSchema:c}}const pe={},ue={};ie();function fe(o,t,n=new Map,p=(a,s,c)=>s,r={},d=a=>a){return X[t.title]=t,Y[t.title]=p,pe[t.title]=r,ue[t.title]=d,(a={})=>{const s=le(a,t,n),c=Object.keys(o).reduce((f,g)=>(f[g]=o[g].default,f),{});return Object.assign(c,s)}}function de(o,t){return{customClass:t.class,customStyle:t.style}}const ge=new Map([["appearance",de]]),me={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/pagination.schema.json",title:"pagination",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a pagination",type:"string"},type:{description:"The type string of pagination component",type:"string",default:"pagination"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""}},required:["id","type"]},ye={title:"pagination",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:"右对齐"}]}}}}}};function be(o,t,n){return t}const G={currentPage:{type:Number,default:1},mode:{type:String,default:"default"},pageSize:{type:Number,default:20},totalItems:{type:Number,default:0},showPageList:{type:Boolean,default:!0},showPageNumbers:{type:Boolean,default:!0},showRedirection:{type:Boolean,default:!0},pageList:{type:Array,default:[20,50,100]}},H=fe(G,me,ge,be,ye);function Z(o,t){const n=e.ref("跳转至"),p=e.ref(""),r=e.ref(o.value);e.watch(r,(c,f)=>{c>=1&&c<=t.value?o.value=c:r.value=f}),e.watch(o,c=>{r.value!==c&&(r.value=c)});function d(c){r.value=c.target.valueAsNumber}function a(c){c.key==="Enter"&&(r.value=c.target.valueAsNumber)}function s(){return e.createVNode("li",{class:"page-goto-input d-flex flex-row",style:"padding-left: 10px; white-space: nowrap;"},[e.createVNode("span",{class:"pg-message-text"},[n.value]),e.createVNode("input",{type:"number",class:"form-control farris-gotopagenumber",value:r.value,min:"1",max:t.value,style:"display: inline-block;margin-left:3px;",onBlur:c=>d(c),onKeyup:c=>a(c)},null),p.value])}return{renderGotoButton:s}}function I(o,t,n){const p=e.computed(()=>({"page-item":!0,disabled:t.value}));function r(c){o.value=o.value<n.value?o.value+1:n.value}function d(c){o.value=n.value}function a(){return e.createVNode("li",{class:p.value},[!t.value&&e.createVNode("a",{class:"page-link",tabindex:"0",onClick:c=>r()},[e.createVNode("span",{class:"f-icon f-page-next"},null)]),t.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-next"},null)])])}function s(){return e.createVNode("li",{class:p.value},[!t.value&&e.createVNode("a",{class:"page-link",tabindex:"0",onClick:c=>d()},[e.createVNode("span",{class:"f-icon f-page-last"},null)]),t.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-last"},null)])])}return{renderLastPage:s,renderNextPage:a}}function R(o,t){const n=e.ref("共"),p=e.ref("条"),r=e.computed(()=>({"pagination-message":!0,"text-truncate":!0,"d-flex":!0,"ml-auto":o.value==="right","flex-fill":o.value==="right"}));function d(){return e.createVNode("li",{class:r.value},[e.createVNode("div",{class:"text-truncate",style:"line-height: 26px"},[e.createVNode("span",{class:"pg-message-text"},[n.value]),e.createVNode("b",{class:"pg-message-total"},[t.value]),e.createVNode("span",{class:"pg-message-text"},[p.value])])])}return{renderPageInfo:d}}function K(o,t,n,p){const r=e.ref(!1),d=e.ref("显示"),a=e.ref("条"),s=e.computed(()=>({dropup:!0,"dropdown-right":!0,"pg-pagelist":!0,"pagelist-disabled":p.value===0,show:r.value})),c=e.computed(()=>({"dropdown-menu":!0,show:r.value})),f=l=>({"w-100":!0,"dropdown-item":!0,active:t.value===l});function g(l){r.value=!0}function j(l){r.value=!1}function h(l,u,m){const v=l*u-u+1;return Math.ceil(v/m)}function P(l,u){o.value=h(o.value,t.value,u),t.value=u,r.value=!1}function i(){return e.createVNode("li",{class:"pagination-pagelist"},[e.createVNode("div",{class:s.value,onMouseenter:l=>g(),onMouseleave:l=>j()},[e.createVNode("div",{class:"pg-pagelist-info"},[e.createVNode("span",{class:"pagelist-text"},[d.value]),e.createVNode("b",{class:"cur-pagesize"},[t.value]),e.createVNode("span",{class:"pagelist-text"},[a.value]),e.createVNode("i",{class:"f-icon f-icon-dropdown"},null)]),e.createVNode("div",{class:c.value,style:"margin-bottom: -1px;"},[n.value.map(l=>e.createVNode("li",{class:f(l),onClick:u=>P(u,l)},[e.createVNode("span",null,[l])]))])])])}return{renderPageList:i}}function ee(o,t){const n=a=>({"page-item":!0,current:o.value===a.value,ellipsis:a.label==="..."}),p=a=>({"f-icon":!0,"f-icon-arrow-seek-left":a.value<o.value,"f-icon-arrow-seek-right":a.value>o.value});function r(a,s){o.value=s}function d(){return t.value.map(a=>e.createVNode("li",{class:n(a)},[o.value!==a.value&&e.createVNode("a",{class:"page-link",tabindex:"0",onClick:s=>r(s,a.value)},[e.createVNode("span",{class:"page-link-label"},[a.label]),a.label==="..."&&e.createVNode("i",{class:p(a)},null)]),o.value===a.value&&e.createVNode("span",{class:"page-link"},[a.label])]))}return{renderPageNumbers:d}}function te(o,t,n){const p=e.computed(()=>({"page-item":!0,disabled:t.value}));function r(c){o.value=1}function d(c){o.value=o.value>2?o.value-1:1}function a(){return e.createVNode("li",{class:p.value},[n.value&&e.createVNode("a",{tabindex:"0",class:"page-link",onClick:c=>r()},[e.createVNode("span",{class:"f-icon f-page-first"},null)]),t.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-first"},null)])])}function s(){return e.createVNode("li",{class:p.value},[n.value&&e.createVNode("a",{tabindex:"0",class:"page-link",onClick:c=>d()},[e.createVNode("span",{class:"f-icon f-page-pre"},null)]),t.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-pre"},null)])])}return{renderFirstPage:a,renderPreviousPage:s}}function ne(o){const t=e.ref([]);function n(r,d,a,s){const c=Math.ceil(a/2);return r===a?s:r===1?r:a<s?s-c<d?s-a+r:c<d?d-c+r:r:r}function p(r,d,a,s){const c=[],f=Math.ceil(a/d),g=Math.ceil(s/2),j=r<=g,h=f-g<r,P=!j&&!h,i=s<f;let l=1;for(;l<=f&&l<=s;){const u=n(l,r,s,f),m=l===2&&(P||h),C=l===s-1&&(P||j),v=i&&(m||C)?"...":""+u;c.push({label:v,value:u}),l++}t.value=c}return{pages:t,updatePages:p}}const F=e.defineComponent({name:"FPagination",props:G,emits:["pageIndexChanged","pageSizeChanged","update:currentPage","update:pageSize"],setup(o,t){const n=e.ref(!1),p=e.ref(o.mode),r=e.ref(""),d=e.ref(!1),a=e.ref(o.pageSize),s=e.ref(o.currentPage),c=e.ref(o.totalItems),{pages:f,updatePages:g}=ne(),j=e.computed(()=>s.value===1),h=e.computed(()=>o.pageList),P=e.computed(()=>Math.ceil(c.value/a.value)),i=e.computed(()=>s.value===P.value),l=e.computed(()=>o.showGoButton),u=e.computed(()=>s.value>1),m=e.computed(()=>!(d.value&&f.value.length<=1)),C=e.computed(()=>!0),v=e.computed(()=>o.showPageList),O=e.computed(()=>o.showPageNumbers),k=e.computed(()=>!0),{renderFirstPage:N,renderPreviousPage:V}=te(s,j,u),{renderLastPage:y,renderNextPage:b}=I(s,i,P),{renderPageInfo:T}=R(r,c),{renderPageList:w}=K(s,a,h,c),{renderPageNumbers:A}=ee(s,f),{renderGotoButton:L}=Z(s,P);g(s.value,a.value,c.value,7),e.watch(()=>o.totalItems,$=>{c.value=$}),e.watch([s,a,c],()=>{g(s.value,a.value,c.value,7)}),e.watch(s,()=>{t.emit("update:currentPage",s.value),t.emit("pageIndexChanged",s.value)}),e.watch(a,()=>{t.emit("update:pageSize",a.value),t.emit("pageSizeChanged",a.value)}),e.watch(()=>o.totalItems,$=>{c.value=$,g(s.value,a.value,c.value,7)}),e.watchEffect(()=>{const $=h.value.includes(a.value);a.value=$?a.value:h.value[0]})();const x=e.computed(()=>({"ngx-pagination":!0,pagination:!0,responsive:n.value,"pager-viewmode-default":p.value==="default","pager-viewmode-simple":p.value==="simple"})),D=e.computed(()=>({position:"relative","justify-content":r.value==="center"?"center":"start"}));function E(){return e.createVNode(e.Fragment,null,[C.value&&T(),v.value&&w(),k.value&&N(),k.value&&V(),O.value&&A(),k.value&&b(),k.value&&y(),l.value&&L()])}function z(){return e.createVNode(e.Fragment,null,[e.createVNode("li",{class:"page-item d-flex flex-fill"},null),k.value&&N(),k.value&&V(),L(),e.createVNode("li",{class:"page-item page-separator",style:"margin-left: 10px"},[e.createVNode("span",{style:"font-size: 15px; font-weight: 200;"},[e.createTextVNode(" /")])]),e.createVNode("li",{class:"page-item page-total",style:"margin-left: 5px"},[e.createVNode("span",{style:"font-size: 16px; font-weight: 600;"},[e.createTextVNode(" "),P.value])]),k.value&&b(),k.value&&y()])}return()=>e.createVNode("div",{class:"pagination-container"},[m.value&&e.createVNode("ul",{role:"navigation",class:x.value,style:D.value},[p.value==="default"?E():z()])])}});function he(o,t,n){var k;function p(){n!=null&&n.resolveComponentContext&&n.resolveComponentContext()}p();const r=n&&n.getStyles&&n.getStyles()||"",d=n&&n.getDesignerClass&&n.getDesignerClass()||"",a=e.ref();function s(){return(t==null?void 0:t.schema.componentType)==="frame"?!1:n&&n.checkCanMoveComponent?n.checkCanMoveComponent():!0}function c(){return!1}function f(){return(t==null?void 0:t.schema.componentType)==="frame"?!1:n&&n.checkCanDeleteComponent?n.checkCanDeleteComponent():!0}function g(){return(t==null?void 0:t.schema.componentType)==="frame"?!0:n&&n.hideNestedPaddingInDesginerView?n.hideNestedPaddingInDesginerView():!1}function j(N){if(!N||!N.value)return null;if(N.value.schema&&N.value.schema.type==="component")return N.value;const V=e.ref(N==null?void 0:N.value.parent),y=j(V);return y||null}function h(N=t){const{componentInstance:V,designerItemElementRef:y}=N;return!V||!V.value?null:V.value.canMove?y:h(N.parent)}function P(N){return!!n&&n.canAccepts(N)}function i(){return(t==null?void 0:t.schema.label)||(t==null?void 0:t.schema.title)||(t==null?void 0:t.schema.name)}function l(){}function u(N,V){V&&n!=null&&n.onAcceptMovedChildElement&&n.onAcceptMovedChildElement(V)}function m(N,V){const{componentType:y}=N;let b=B(y,N,V);n&&n.onResolveNewComponentSchema&&(b=n.onResolveNewComponentSchema(N,b));const T=y.toLowerCase().replace("-","_");return b&&!b.id&&b.type===y&&(b.id=`${T}_${Math.random().toString().slice(2,6)}`),b}function C(N,V){const y=String(N.getAttribute("data-controltype")),b=N.getAttribute("data-feature"),T=b?JSON.parse(b):{};T.parentComponentInstance=a.value;let w=B(y,T);n&&n.onAcceptNewChildElement&&(w=n.onAcceptNewChildElement(N,V,w));const A=y.toLowerCase().replace("-","_");return w&&!w.id&&w.type===y&&(w.id=`${A}_${Math.random().toString().slice(2,6)}`),w}function v(N){}function O(...N){if(n&&n.getPropsConfig)return n.getPropsConfig(...N)}return a.value={canMove:s(),canSelectParent:c(),canDelete:f(),canNested:!g(),contents:t==null?void 0:t.schema.contents,elementRef:o,parent:(k=t==null?void 0:t.parent)==null?void 0:k.componentInstance,schema:t==null?void 0:t.schema,styles:r,designerClass:d,canAccepts:P,getBelongedComponentInstance:j,getDraggableDesignItemElement:h,getDraggingDisplayText:i,getPropConfig:O,getDragScopeElement:l,onAcceptMovedChildElement:u,onAcceptNewChildElement:C,onChildElementMovedOut:v,addNewChildComponentSchema:m,updateDragAndDropRules:p,triggerBelongedComponentToMoveWhenMoved:!!n&&n.triggerBelongedComponentToMoveWhenMoved||e.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:!!n&&n.triggerBelongedComponentToDeleteWhenDeleted||e.ref(!1)},a}function je(){function o(t){var r,d;if(!t)return!1;const n=((r=t.targetContainer)==null?void 0:r.componentInstance)&&t.targetContainer.componentInstance.value;if(!n)return!1;const p=(d=n.schema.appearance)==null?void 0:d.class;if(t.controlCategory==="input"||t.controlType==="form-group"){const a=n.schema.type,s=(a==="response-form"||a==="content-container")&&p&&p.includes("farris-form");if(n.schema.type!=="response-layout-item"&&!s)return!1}return t.controlType!=="field-set"}return{basalDragulaRuleForContainer:o}}const Ne={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/dragging-rules.schema.json",title:"Dragging Rules",description:"The rules of designer canvas",type:"object",properties:{"f-page":{description:"The root class of page designed by farris.",type:"object",properties:{contents:{type:"object",properties:{"f-page-header":{description:"The class of page header designed by farris.",type:"string"},"f-page-main":{description:"The class of page body designed by farris.",type:"object",properties:{contents:{type:"object",properties:{"f-struct-like-card":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-struct-form":{description:"The class of form component which has a hierarchical structure of component -> section -> respnse-form.",type:"object",properties:{contents:{type:"object",properties:{"f-section-form":{description:"The class of section which has wrapped a reponse-form component.",type:"object",properties:{contents:{type:"object",properties:{"f-form-layout":{description:"The class of reponse form",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}},"f-struct-wrapper":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-section-tabs":{description:"The class of section which has wrapped sub-grid tabs.",type:"object",properties:{contents:{type:"object",properties:{"f-tabs-in-card":{description:"The class of tabs which contains sub-grid.",type:"object",properties:{contents:{type:"object",properties:{"f-struct-data-grid-in-card":{description:"The class of sub-grid component",type:"object",properties:{contents:{type:"object",properties:{"f-grid-is-sub":{description:"The class of sub-grid",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-section-in-main":{description:"The class of section which has wrapped a reponse-form component.",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"object",const:{allOf:[{sibling:0,parent:{"f-page-main":!0}}]}}}}}},"f-struct-data-grid":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"object",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-main-content":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-struct-data-grid-in-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav-extend":{description:"",type:"object"},"f-section-in-nav":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}}}},"f-page-content-main":{description:"",type:"object",properties:{}}}}}},"f-page-content":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-list-nav":{description:"",type:"object"},"f-list-nav-left":{description:"",type:"object"},"f-struct-data-grid-in-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-section-form":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-section-grid":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}},"f-page-content-main":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"object",const:{anyOf:[{children:0},{children:{length:{not:1},"f-struct-like-card":!0}},{children:{"scroll-spy":!1,"f-page-content":!1,"f-struct-like-card":!1}}]}},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-footer":{description:"The class of page footer designed by farris.",type:"string"}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-is-managelist":{description:"The root class of mangement list page.",type:"string"},"f-page-card":{description:"",type:"object"},"f-page-is-mainsubcard":{description:"",type:"object"}}},J=new Map;function ve(){function o(i,l,u,m){var C;if(typeof u=="number")return((C=m[i])==null?void 0:C.length)===u;if(typeof u=="object"){const v=Object.keys(u)[0],O=u[v];if(v==="not")return Number(m[i].length)!==Number(O);if(v==="moreThan")return Number(m[i].length)>=Number(O);if(v==="lessThan")return Number(m[i].length)<=Number(O)}return!1}function t(i,l,u,m){return typeof u=="boolean"?m.childrenClassList.includes(l)===!!u:!1}function n(i,l,u,m){return typeof u=="boolean"?m.parentClassList.includes(l)===!!u:!1}function p(i,l,u,m){return typeof u=="boolean"?m.parentClassList.includes(l)===!!u:!1}const r=new Map([["length",o],["hasChildren",t],["hasSibling",p],["hasParent",n]]);function d(i,l){const u=i;return typeof l=="number"?[{target:u,operator:"length",param:null,value:Number(l)}]:typeof l=="object"?Object.keys(l).map(m=>{if(m==="length")return{target:u,operator:"length",param:null,value:l[m]};const C=m,v=l[m];return{target:u,operator:i==="children"?"hasChildren":i==="parent"?"hasParent":"hasSibling",param:C,value:v}}):[]}function a(i,l){if(r.has(i.operator)){const u=r.get(i.operator);return u&&u(i.target,i.param,i.value,l)||!1}return!1}function s(i,l){return Object.keys(i).reduce((v,O)=>{const k=d(O,i[O]);return v.push(...k),v},[]).reduce((v,O)=>v&&a(O,l),!0)}function c(i,l){const u=Object.keys(i),m=u.includes("allOf"),C=u.includes("anyOf"),v=m||C,N=(v?i[v?m?"allOf":"anyOf":"allOf"]:[i]).map(y=>s(y,l));return m?!N.includes(!1):N.includes(!0)}function f(i,l){const u=i.const;return u?typeof u=="boolean"?u:typeof u=="object"?c(u,l):!1:!1}function g(i){return l=>{const u={canAccept:!0,fixed:!1,hidePadding:!1};return i&&i.properties&&Object.keys(i.properties).reduce((m,C)=>{const v=i.properties[C];return m[C]=f(v,l),m},u),u}}function j(i,l,u){if(l.type==="object"&&l.properties){const{rules:m,contents:C}=l.properties;u.set(i,g(m)),C&&Object.keys(C.properties).forEach(v=>j(v,C.properties[v],u))}}function h(){const{properties:i}=Ne;Object.keys(i).forEach(l=>{j(l,i[l],J)})}function P(i,l){const u={canAccept:!0,fixed:!1,hidePadding:!0};return J.has(i)?J.get(i)(l):u}return h(),{getRuleValue:P}}function Pe(o,t){var V;const n=o.schema,p=(V=o.parent)==null?void 0:V.schema,r=ve(),d=e.ref(!1),a=e.ref(!1);let s=!0,c=!1,f,g=!1;function j(y){return f&&f.componentClassList&&f.componentClassList.includes("f-form-layout")&&f.componentClassList.includes("farris-form")?y.sourceType==="control"&&y.controlCategory==="input"||y.sourceType==="move"&&y.controlType==="form-group":!0}function h(y){return!(!je().basalDragulaRuleForContainer(y)||!s||!j(y))}function P(){d.value=!1,a.value=!1;const y=n,b=y.appearance&&y.appearance.class||"",T=b.split(" "),w=y.contents||[],A=w.length?w[0]:null,L=A&&A.appearance?A.appearance.class:"",S=L?L.split(" "):[],x=w.length?w.reduce((q,W)=>{const oe=W&&W.appearance?W.appearance.class:"",Ve=oe?oe.split(" "):[];return q.push(...Ve),q},[]):[],D=p,E=D&&D.appearance&&D.appearance.class||"",z=E?E.split(" "):[];f={componentClass:b,componentClassList:T,childContents:w,firstChildContent:A,firstChildClass:L,firstChildClassList:S,parent:D,parentClass:E,parentClassList:z,children:w,childrenClassList:x};const{canAccept:$,fixed:Q,hidePadding:U}=r.getRuleValue(T[0],f);return s=$,c=U,g=Q,!0}function i(y){e.nextTick()}function l(){return n.componentType?"display:inherit;flex-direction:inherit;margin-bottom:10px":""}function u(y,b){const T=n;if((T.appearance&&T.appearance.class||"").split(" ").includes("f-form-layout")){const{label:L}=y,S=B("form-group");return S.editor=b,S.label=L,m(S),delete S.editor.id,delete S.editor.binding,delete S.editor.appearance,delete S.editor.visible,S}return b}function m(y){const b=o.componentInstance.value.getBelongedComponentInstance(o.componentInstance);if(b&&b.schema&&b.schema.componentType){const T=b.schema.formColumns,w=C(T);y.appearance||(y.appearance={}),y.appearance.class=w}}function C(y){let b="";switch(y){case 1:{b="col-12 col-md-12 col-xl-12 col-el-12";break}case 2:{b="col-12 col-md-6 col-xl-6 col-el-6";break}case 3:{b="col-12 col-md-6 col-xl-4 col-el-4";break}case 4:{b="col-12 col-md-6 col-xl-3 col-el-2";break}}return b}function v(y,b,T){const w=n;if((w.appearance&&w.appearance.class||"").split(" ").includes("f-form-layout")){const S=String(y.innerText),x=B("form-group");return x.editor=T,x.label=S,x}return T}function O(){return!g}function k(){return!g}function N(){return c}return{canAccepts:h,checkCanDeleteComponent:k,checkCanMoveComponent:O,getStyles:l,hideNestedPaddingInDesginerView:N,onAcceptNewChildElement:v,onAcceptMovedChildElement:i,resolveComponentContext:P,onResolveNewComponentSchema:u,triggerBelongedComponentToMoveWhenMoved:d,triggerBelongedComponentToDeleteWhenDeleted:a}}const Ce=e.defineComponent({name:"FPagination",props:G,emits:["pageIndexChanged","pageSizeChanged"],setup(o,t){var q;const n=e.ref(!1),p=e.ref(o.mode),r=e.ref(""),d=e.ref(!1),a=e.ref(o.pageSize),s=e.ref(o.currentPage),c=e.ref(o.totalItems),f=e.ref(),g=e.inject("design-item-context"),j=Pe(g.schema,(q=g.parent)==null?void 0:q.schema),h=he(f,g,j);e.onMounted(()=>{f.value.componentInstance=h}),t.expose(h.value);const{pages:P,updatePages:i}=ne(),l=e.computed(()=>s.value===1),u=e.computed(()=>[20,50,100]),m=e.computed(()=>Math.ceil(c.value/a.value)),C=e.computed(()=>s.value===m.value),v=e.computed(()=>!0),O=e.computed(()=>s.value>1),k=e.computed(()=>!(d.value&&P.value.length<=1)),N=e.computed(()=>!0),V=e.computed(()=>!0),y=e.computed(()=>!0),b=e.computed(()=>!0),{renderFirstPage:T,renderPreviousPage:w}=te(s,l,O),{renderLastPage:A,renderNextPage:L}=I(s,C,m),{renderPageInfo:S}=R(r,c),{renderPageList:x}=K(s,a,u,c),{renderPageNumbers:D}=ee(s,P),{renderGotoButton:E}=Z(s,m);i(s.value,a.value,c.value,7),e.watch([s,a],()=>{i(s.value,a.value,c.value,7)}),e.watch(s,()=>{t.emit("pageIndexChanged",s.value)}),e.watch(a,()=>{t.emit("pageSizeChanged",a.value)});const z=e.computed(()=>({"ngx-pagination":!0,pagination:!0,responsive:n.value,"pager-viewmode-default":p.value==="default","pager-viewmode-simple":p.value==="simple"})),$=e.computed(()=>({position:"relative","justify-content":r.value==="center"?"center":"start"}));function Q(){return e.createVNode(e.Fragment,null,[N.value&&S(),V.value&&x(),b.value&&T(),b.value&&w(),y.value&&D(),b.value&&L(),b.value&&A(),v.value&&E()])}function U(){return e.createVNode(e.Fragment,null,[e.createVNode("li",{class:"page-item d-flex flex-fill"},null),b.value&&T(),b.value&&w(),E(),e.createVNode("li",{class:"page-item page-separator",style:"margin-left: 10px"},[e.createVNode("span",{style:"font-size: 15px; font-weight: 200;"},[e.createTextVNode(" /")])]),e.createVNode("li",{class:"page-item page-total",style:"margin-left: 5px"},[e.createVNode("span",{style:"font-size: 16px; font-weight: 600;"},[e.createTextVNode(" "),m.value])]),b.value&&L(),b.value&&A()])}return()=>e.createVNode("div",{ref:f,class:"pagination-container"},[k.value&&e.createVNode("ul",{role:"navigation",class:z.value,style:$.value},[p.value==="default"?Q():U()])])}});F.register=(o,t,n)=>{o.pagination=F,t.pagination=H},F.registerDesigner=(o,t,n)=>{o.pagination=Ce,t.pagination=H};const we=re.withInstall(F);M.FPagination=F,M.default=we,M.paginationProps=G,M.propsResolver=H,Object.defineProperties(M,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(M,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("lodash-es"),require("../property-panel/index.umd.js/src/composition/entity/base-property"),require("../response-layout-editor/index.umd.js/src/composition/converter/use-response-layout-editor-setting"),require("../designer-canvas/index.umd.js/src/composition/dg-control"),require("../common/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../property-panel/index.umd.js/src/composition/entity/base-property","../response-layout-editor/index.umd.js/src/composition/converter/use-response-layout-editor-setting","../designer-canvas/index.umd.js/src/composition/dg-control","../common/index.umd.js"],e):(M=typeof globalThis<"u"?globalThis:M||self,e(M.pagination={},M.Vue,M.LodashES,M.baseProperty,M.useResponseLayoutEditorSetting,M.dgControl,M.common))})(this,function(M,e,W,re,ce,le,ie){"use strict";const Y={},Z={};function U(o){const{properties:t,title:n,ignore:u}=o,l=u&&Array.isArray(u),g=Object.keys(t).reduce((a,r)=>((!l||!u.find(s=>s==r))&&(a[r]=t[r].type==="object"&&t[r].properties?U(t[r]):W.cloneDeep(t[r].default)),a),{});return(!l||!u.find(a=>a=="id"))&&(g.id=`${n}-${Date.now()}`),g}function F(o,t={},n){const u=Y[o];if(u){let l=U(u);const g=Z[o];return l=g?g({getSchemaByType:F},l,t,n):l,l}return null}function pe(o,t){const n=U(t);return Object.keys(o).reduce((u,l)=>(u[l]&&W.isPlainObject(u[l])&&W.isPlainObject(o[l])?Object.assign(u[l],o[l]):u[l]=o[l],u),n),n}function ue(o,t){return Object.keys(o).filter(u=>o[u]!=null).reduce((u,l)=>{if(t.has(l)){const g=t.get(l);if(typeof g=="string")u[g]=o[l];else{const a=g(l,o[l],o);Object.assign(u,a)}}else u[l]=o[l];return u},{})}function fe(o,t,n=new Map){const u=pe(o,t);return ue(u,n)}function de(o={}){function t(c,m,d,y){if(typeof d=="number")return y[c].length===d;if(typeof d=="object"){const j=Object.keys(d)[0],i=d[j];if(j==="not")return Number(y[c].length)!==Number(i);if(j==="moreThan")return Number(y[c].length)>=Number(i);if(j==="lessThan")return Number(y[c].length)<=Number(i)}return!1}function n(c,m,d,y){return y[c]&&y[c].propertyValue&&String(y[c].propertyValue.value)===String(d)}const u=new Map([["length",t],["getProperty",n]]);Object.keys(o).reduce((c,m)=>(c.set(m,o[m]),c),u);function l(c,m){const d=c;return typeof m=="number"?[{target:d,operator:"length",param:null,value:Number(m)}]:typeof m=="boolean"?[{target:d,operator:"getProperty",param:c,value:!!m}]:typeof m=="object"?Object.keys(m).map(y=>{if(y==="length")return{target:d,operator:"length",param:null,value:m[y]};const j=y,i=m[y];return{target:d,operator:"getProperty",param:j,value:i}}):[]}function g(c){return Object.keys(c).reduce((d,y)=>{const j=l(y,c[y]);return d.push(...j),d},[])}function a(c,m){if(u.has(c.operator)){const d=u.get(c.operator);return d&&d(c.target,c.param,c.value,m)||!1}return!1}function r(c,m){return g(c).reduce((j,i)=>j&&a(i,m),!0)}function s(c,m){const d=Object.keys(c),y=d.includes("allOf"),j=d.includes("anyOf"),i=y||j,h=(i?c[i?y?"allOf":"anyOf":"allOf"]:[c]).map(v=>r(v,m));return y?!h.includes(!1):h.includes(!0)}return{parseValueSchema:s}}const me={},ge={};de();function ye(o,t,n=new Map,u=(a,r,s)=>r,l={},g=a=>a){return Y[t.title]=t,Z[t.title]=u,me[t.title]=l,ge[t.title]=g,(a={})=>{const r=fe(a,t,n),s=Object.keys(o).reduce((c,m)=>(c[m]=o[m].default,c),{});return Object.assign(s,r)}}function he(o,t){return{customClass:t.class,customStyle:t.style}}const be=new Map([["appearance",he]]),Ce={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/pagination.schema.json",title:"pagination",description:"A Farris Component",type:"object",properties:{id:{description:"The unique identifier for a pagination",type:"string"},type:{description:"The type string of pagination component",type:"string",default:"pagination"},appearance:{description:"",type:"object",properties:{class:{type:"string"},style:{type:"string"}},default:{}},binding:{description:"",type:"object",default:{}},editable:{description:"",type:"boolean",default:!0},enableLinkLabel:{description:"",type:"boolean",default:!1},label:{description:"",type:"string",default:""},lableWidth:{description:"",type:"number"},placeholder:{description:"",type:"string",default:""},readonly:{description:"",type:"boolean",default:!1},required:{description:"",type:"boolean",default:!1},tabindex:{description:"",type:"number",default:-1},textAlign:{description:"",type:"string",enum:["left","middle","right"],default:"left"},visible:{description:"",type:"boolean",default:!0},onBlur:{description:"",type:"string",default:""},onClickLinkLabel:{description:"",type:"sting",default:""}},required:["id","type"]},je={title:"pagination",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:"右对齐"}]}}}}}};function ve(o,t,n){return t}const q={currentPage:{type:Number,default:1},mode:{type:String,default:"default"},pageSize:{type:Number,default:20},totalItems:{type:Number,default:0},showPageList:{type:Boolean,default:!0},showPageNumbers:{type:Boolean,default:!0},showRedirection:{type:Boolean,default:!0},pageList:{type:Array,default:[20,50,100]}},_=ye(q,Ce,be,ve,je);function R(o,t){const n=e.ref("跳转至"),u=e.ref(""),l=e.ref(o.value);e.watch(l,(s,c)=>{s>=1&&s<=t.value?o.value=s:l.value=c}),e.watch(o,s=>{l.value!==s&&(l.value=s)});function g(s){l.value=s.target.valueAsNumber}function a(s){s.key==="Enter"&&(l.value=s.target.valueAsNumber)}function r(){return e.createVNode("li",{class:"page-goto-input d-flex flex-row",style:"padding-left: 10px; white-space: nowrap;"},[e.createVNode("span",{class:"pg-message-text"},[n.value]),e.createVNode("input",{type:"number",class:"form-control farris-gotopagenumber",value:l.value,min:"1",max:t.value,style:"display: inline-block;margin-left:3px;",onBlur:s=>g(s),onKeyup:s=>a(s)},null),u.value])}return{renderGotoButton:r}}function K(o,t,n){const u=e.computed(()=>({"page-item":!0,disabled:t.value}));function l(s){o.value=o.value<n.value?o.value+1:n.value}function g(s){o.value=n.value}function a(){return e.createVNode("li",{class:u.value},[!t.value&&e.createVNode("a",{class:"page-link",tabindex:"0",onClick:s=>l()},[e.createVNode("span",{class:"f-icon f-page-next"},null)]),t.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-next"},null)])])}function r(){return e.createVNode("li",{class:u.value},[!t.value&&e.createVNode("a",{class:"page-link",tabindex:"0",onClick:s=>g()},[e.createVNode("span",{class:"f-icon f-page-last"},null)]),t.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-last"},null)])])}return{renderLastPage:r,renderNextPage:a}}function ee(o,t){const n=e.ref("共"),u=e.ref("条"),l=e.computed(()=>({"pagination-message":!0,"text-truncate":!0,"d-flex":!0,"ml-auto":o.value==="right","flex-fill":o.value==="right"}));function g(){return e.createVNode("li",{class:l.value},[e.createVNode("div",{class:"text-truncate",style:"line-height: 26px"},[e.createVNode("span",{class:"pg-message-text"},[n.value]),e.createVNode("b",{class:"pg-message-total"},[t.value]),e.createVNode("span",{class:"pg-message-text"},[u.value])])])}return{renderPageInfo:g}}function te(o,t,n,u){const l=e.ref(!1),g=e.ref("显示"),a=e.ref("条"),r=e.computed(()=>({dropup:!0,"dropdown-right":!0,"pg-pagelist":!0,"pagelist-disabled":u.value===0,show:l.value})),s=e.computed(()=>({"dropdown-menu":!0,show:l.value})),c=p=>({"w-100":!0,"dropdown-item":!0,active:t.value===p});function m(p){l.value=!0}function d(p){l.value=!1}function y(p,f,h){const v=p*f-f+1;return Math.ceil(v/h)}function j(p,f){o.value=y(o.value,t.value,f),t.value=f,l.value=!1}function i(){return e.createVNode("li",{class:"pagination-pagelist"},[e.createVNode("div",{class:r.value,onMouseenter:p=>m(),onMouseleave:p=>d()},[e.createVNode("div",{class:"pg-pagelist-info"},[e.createVNode("span",{class:"pagelist-text"},[g.value]),e.createVNode("b",{class:"cur-pagesize"},[t.value]),e.createVNode("span",{class:"pagelist-text"},[a.value]),e.createVNode("i",{class:"f-icon f-icon-dropdown"},null)]),e.createVNode("div",{class:s.value,style:"margin-bottom: -1px;"},[n.value.map(p=>e.createVNode("li",{class:c(p),onClick:f=>j(f,p)},[e.createVNode("span",null,[p])]))])])])}return{renderPageList:i}}function ne(o,t){const n=a=>({"page-item":!0,current:o.value===a.value,ellipsis:a.label==="..."}),u=a=>({"f-icon":!0,"f-icon-arrow-seek-left":a.value<o.value,"f-icon-arrow-seek-right":a.value>o.value});function l(a,r){o.value=r}function g(){return t.value.map(a=>e.createVNode("li",{class:n(a)},[o.value!==a.value&&e.createVNode("a",{class:"page-link",tabindex:"0",onClick:r=>l(r,a.value)},[e.createVNode("span",{class:"page-link-label"},[a.label]),a.label==="..."&&e.createVNode("i",{class:u(a)},null)]),o.value===a.value&&e.createVNode("span",{class:"page-link"},[a.label])]))}return{renderPageNumbers:g}}function oe(o,t,n){const u=e.computed(()=>({"page-item":!0,disabled:t.value}));function l(s){o.value=1}function g(s){o.value=o.value>2?o.value-1:1}function a(){return e.createVNode("li",{class:u.value},[n.value&&e.createVNode("a",{tabindex:"0",class:"page-link",onClick:s=>l()},[e.createVNode("span",{class:"f-icon f-page-first"},null)]),t.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-first"},null)])])}function r(){return e.createVNode("li",{class:u.value},[n.value&&e.createVNode("a",{tabindex:"0",class:"page-link",onClick:s=>g()},[e.createVNode("span",{class:"f-icon f-page-pre"},null)]),t.value&&e.createVNode("span",{class:"page-link"},[e.createVNode("span",{class:"f-icon f-page-pre"},null)])])}return{renderFirstPage:a,renderPreviousPage:r}}function ae(o){const t=e.ref([]);function n(l,g,a,r){const s=Math.ceil(a/2);return l===a?r:l===1?l:a<r?r-s<g?r-a+l:s<g?g-s+l:l:l}function u(l,g,a,r){const s=[],c=Math.ceil(a/g),m=Math.ceil(r/2),d=l<=m,y=c-m<l,j=!d&&!y,i=r<c;let p=1;for(;p<=c&&p<=r;){const f=n(p,l,r,c),h=p===2&&(j||y),N=p===r-1&&(j||d),v=i&&(h||N)?"...":""+f;s.push({label:v,value:f}),p++}t.value=s}return{pages:t,updatePages:u}}const I=e.defineComponent({name:"FPagination",props:q,emits:["pageIndexChanged","pageSizeChanged","update:currentPage","update:pageSize"],setup(o,t){const n=e.ref(!1),u=e.ref(o.mode),l=e.ref(""),g=e.ref(!1),a=e.ref(o.pageSize),r=e.ref(o.currentPage),s=e.ref(o.totalItems),{pages:c,updatePages:m}=ae(),d=e.computed(()=>r.value===1),y=e.computed(()=>o.pageList),j=e.computed(()=>Math.ceil(s.value/a.value)),i=e.computed(()=>r.value===j.value),p=e.computed(()=>o.showGoButton),f=e.computed(()=>r.value>1),h=e.computed(()=>!(g.value&&c.value.length<=1)),N=e.computed(()=>!0),v=e.computed(()=>o.showPageList),P=e.computed(()=>o.showPageNumbers),V=e.computed(()=>!0),{renderFirstPage:C,renderPreviousPage:k}=oe(r,d,f),{renderLastPage:L,renderNextPage:b}=K(r,i,j),{renderPageInfo:w}=ee(l,s),{renderPageList:T}=te(r,a,y,s),{renderPageNumbers:S}=ne(r,c),{renderGotoButton:O}=R(r,j);m(r.value,a.value,s.value,7),e.watch(()=>o.totalItems,x=>{s.value=x}),e.watch([r,a,s],()=>{m(r.value,a.value,s.value,7)}),e.watch(r,()=>{t.emit("update:currentPage",r.value),t.emit("pageIndexChanged",{pageIndex:r.value,pageSize:a.value})}),e.watch(a,()=>{t.emit("update:pageSize",a.value),t.emit("pageSizeChanged",{pageIndex:r.value,pageSize:a.value})}),e.watch(()=>o.totalItems,x=>{s.value=x,m(r.value,a.value,s.value,7)}),e.watchEffect(()=>{const x=y.value.includes(a.value);a.value=x?a.value:y.value[0]})();const A=e.computed(()=>({"ngx-pagination":!0,pagination:!0,responsive:n.value,"pager-viewmode-default":u.value==="default","pager-viewmode-simple":u.value==="simple"})),D=e.computed(()=>({position:"relative","justify-content":l.value==="center"?"center":"start"}));function E(){return e.createVNode(e.Fragment,null,[N.value&&w(),v.value&&T(),V.value&&C(),V.value&&k(),P.value&&S(),V.value&&b(),V.value&&L(),p.value&&O()])}function B(){return e.createVNode(e.Fragment,null,[e.createVNode("li",{class:"page-item d-flex flex-fill"},null),V.value&&C(),V.value&&k(),O(),e.createVNode("li",{class:"page-item page-separator",style:"margin-left: 10px"},[e.createVNode("span",{style:"font-size: 15px; font-weight: 200;"},[e.createTextVNode(" /")])]),e.createVNode("li",{class:"page-item page-total",style:"margin-left: 5px"},[e.createVNode("span",{style:"font-size: 16px; font-weight: 600;"},[e.createTextVNode(" "),j.value])]),V.value&&b(),V.value&&L()])}return()=>e.createVNode("div",{class:"pagination-container"},[h.value&&e.createVNode("ul",{role:"navigation",class:A.value,style:D.value},[u.value==="default"?E():B()])])}});function Ne(o,t,n){var V;function u(){n!=null&&n.resolveComponentContext&&n.resolveComponentContext()}u();const l=n&&n.getStyles&&n.getStyles()||"",g=n&&n.getDesignerClass&&n.getDesignerClass()||"",a=e.ref();function r(){return(t==null?void 0:t.schema.componentType)==="frame"?!1:n&&n.checkCanMoveComponent?n.checkCanMoveComponent():!0}function s(){return!1}function c(){return(t==null?void 0:t.schema.componentType)==="frame"?!1:n&&n.checkCanDeleteComponent?n.checkCanDeleteComponent():!0}function m(){return(t==null?void 0:t.schema.componentType)==="frame"?!0:n&&n.hideNestedPaddingInDesginerView?n.hideNestedPaddingInDesginerView():!1}function d(C){if(!C||!C.value)return null;if(C.value.schema&&C.value.schema.type==="component")return C.value;const k=e.ref(C==null?void 0:C.value.parent),L=d(k);return L||null}function y(C=t){const{componentInstance:k,designerItemElementRef:L}=C;return!k||!k.value?null:k.value.canMove?L:y(C.parent)}function j(C){return!!n&&n.canAccepts(C)}function i(){return(t==null?void 0:t.schema.label)||(t==null?void 0:t.schema.title)||(t==null?void 0:t.schema.name)}function p(){}function f(C,k){k&&n!=null&&n.onAcceptMovedChildElement&&n.onAcceptMovedChildElement(k)}function h(C,k){const{componentType:L}=C;let b=F(L,C,k);n&&n.onResolveNewComponentSchema&&(b=n.onResolveNewComponentSchema(C,b));const w=L.toLowerCase().replace("-","_");return b&&!b.id&&b.type===L&&(b.id=`${w}_${Math.random().toString().slice(2,6)}`),b}function N(C,k){const L=String(C.getAttribute("data-controltype")),b=C.getAttribute("data-feature"),w=b?JSON.parse(b):{};w.parentComponentInstance=a.value;let T=F(L,w);n&&n.onAcceptNewChildElement&&(T=n.onAcceptNewChildElement(C,k,T));const S=L.toLowerCase().replace("-","_");return T&&!T.id&&T.type===L&&(T.id=`${S}_${Math.random().toString().slice(2,6)}`),T}function v(C){}function P(...C){if(n&&n.getPropsConfig)return n.getPropsConfig(...C)}return a.value={canMove:r(),canSelectParent:s(),canDelete:c(),canNested:!m(),contents:t==null?void 0:t.schema.contents,elementRef:o,parent:(V=t==null?void 0:t.parent)==null?void 0:V.componentInstance,schema:t==null?void 0:t.schema,styles:l,designerClass:g,canAccepts:j,getBelongedComponentInstance:d,getDraggableDesignItemElement:y,getDraggingDisplayText:i,getPropConfig:P,getDragScopeElement:p,onAcceptMovedChildElement:f,onAcceptNewChildElement:N,onChildElementMovedOut:v,addNewChildComponentSchema:h,updateDragAndDropRules:u,triggerBelongedComponentToMoveWhenMoved:!!n&&n.triggerBelongedComponentToMoveWhenMoved||e.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:!!n&&n.triggerBelongedComponentToDeleteWhenDeleted||e.ref(!1)},a}function Pe(){function o(t){var l,g;if(!t)return!1;const n=((l=t.targetContainer)==null?void 0:l.componentInstance)&&t.targetContainer.componentInstance.value;if(!n)return!1;const u=(g=n.schema.appearance)==null?void 0:g.class;if(t.controlCategory==="input"||t.controlType==="form-group"){const a=n.schema.type,r=(a==="response-form"||a==="content-container")&&u&&u.includes("farris-form");if(n.schema.type!=="response-layout-item"&&!r)return!1}return t.controlType!=="field-set"}return{basalDragulaRuleForContainer:o}}const we={$schema:"https://json-schema.org/draft/2020-12/schema",$id:"https://farris-design.gitee.io/dragging-rules.schema.json",title:"Dragging Rules",description:"The rules of designer canvas",type:"object",properties:{"f-page":{description:"The root class of page designed by farris.",type:"object",properties:{contents:{type:"object",properties:{"f-page-header":{description:"The class of page header designed by farris.",type:"string"},"f-page-main":{description:"The class of page body designed by farris.",type:"object",properties:{contents:{type:"object",properties:{"f-struct-like-card":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-struct-form":{description:"The class of form component which has a hierarchical structure of component -> section -> respnse-form.",type:"object",properties:{contents:{type:"object",properties:{"f-section-form":{description:"The class of section which has wrapped a reponse-form component.",type:"object",properties:{contents:{type:"object",properties:{"f-form-layout":{description:"The class of reponse form",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}},"f-struct-wrapper":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-section-tabs":{description:"The class of section which has wrapped sub-grid tabs.",type:"object",properties:{contents:{type:"object",properties:{"f-tabs-in-card":{description:"The class of tabs which contains sub-grid.",type:"object",properties:{contents:{type:"object",properties:{"f-struct-data-grid-in-card":{description:"The class of sub-grid component",type:"object",properties:{contents:{type:"object",properties:{"f-grid-is-sub":{description:"The class of sub-grid",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-section-in-main":{description:"The class of section which has wrapped a reponse-form component.",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"object",const:{allOf:[{sibling:0,parent:{"f-page-main":!0}}]}}}}}},"f-struct-data-grid":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"object",const:!0},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-main-content":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-struct-data-grid-in-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav-extend":{description:"",type:"object"},"f-section-in-nav":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!1}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!0},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}}}},"f-page-content-main":{description:"",type:"object",properties:{}}}}}},"f-page-content":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-page-content-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-list-nav":{description:"",type:"object"},"f-list-nav-left":{description:"",type:"object"},"f-struct-data-grid-in-nav":{description:"",type:"object",properties:{contents:{type:"object",properties:{"f-section-form":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-section-grid":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}},"f-page-content-main":{description:"",type:"object",properties:{rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!1},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}}}},rules:{type:"object",properties:{canAccept:{type:"object",const:{anyOf:[{children:0},{children:{length:{not:1},"f-struct-like-card":!0}},{children:{"scroll-spy":!1,"f-page-content":!1,"f-struct-like-card":!1}}]}},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-footer":{description:"The class of page footer designed by farris.",type:"string"}}},rules:{type:"object",properties:{canAccept:{type:"boolean",const:!1},fixed:{type:"boolean",const:!0},hidePadding:{type:"boolean",const:!0}}}}},"f-page-is-managelist":{description:"The root class of mangement list page.",type:"string"},"f-page-card":{description:"",type:"object"},"f-page-is-mainsubcard":{description:"",type:"object"}}},X=new Map;function Ve(){function o(i,p,f,h){var N;if(typeof f=="number")return((N=h[i])==null?void 0:N.length)===f;if(typeof f=="object"){const v=Object.keys(f)[0],P=f[v];if(v==="not")return Number(h[i].length)!==Number(P);if(v==="moreThan")return Number(h[i].length)>=Number(P);if(v==="lessThan")return Number(h[i].length)<=Number(P)}return!1}function t(i,p,f,h){return typeof f=="boolean"?h.childrenClassList.includes(p)===!!f:!1}function n(i,p,f,h){return typeof f=="boolean"?h.parentClassList.includes(p)===!!f:!1}function u(i,p,f,h){return typeof f=="boolean"?h.parentClassList.includes(p)===!!f:!1}const l=new Map([["length",o],["hasChildren",t],["hasSibling",u],["hasParent",n]]);function g(i,p){const f=i;return typeof p=="number"?[{target:f,operator:"length",param:null,value:Number(p)}]:typeof p=="object"?Object.keys(p).map(h=>{if(h==="length")return{target:f,operator:"length",param:null,value:p[h]};const N=h,v=p[h];return{target:f,operator:i==="children"?"hasChildren":i==="parent"?"hasParent":"hasSibling",param:N,value:v}}):[]}function a(i,p){if(l.has(i.operator)){const f=l.get(i.operator);return f&&f(i.target,i.param,i.value,p)||!1}return!1}function r(i,p){return Object.keys(i).reduce((v,P)=>{const V=g(P,i[P]);return v.push(...V),v},[]).reduce((v,P)=>v&&a(P,p),!0)}function s(i,p){const f=Object.keys(i),h=f.includes("allOf"),N=f.includes("anyOf"),v=h||N,C=(v?i[v?h?"allOf":"anyOf":"allOf"]:[i]).map(L=>r(L,p));return h?!C.includes(!1):C.includes(!0)}function c(i,p){const f=i.const;return f?typeof f=="boolean"?f:typeof f=="object"?s(f,p):!1:!1}function m(i){return p=>{const f={canAccept:!0,fixed:!1,hidePadding:!1};return i&&i.properties&&Object.keys(i.properties).reduce((h,N)=>{const v=i.properties[N];return h[N]=c(v,p),h},f),f}}function d(i,p,f){if(p.type==="object"&&p.properties){const{rules:h,contents:N}=p.properties;f.set(i,m(h)),N&&Object.keys(N.properties).forEach(v=>d(v,N.properties[v],f))}}function y(){const{properties:i}=we;Object.keys(i).forEach(p=>{d(p,i[p],X)})}function j(i,p){const f={canAccept:!0,fixed:!1,hidePadding:!0};return X.has(i)?X.get(i)(p):f}return y(),{getRuleValue:j}}function Te(o,t){function n(s,c=null){if(c)return c;const m=o.getComponentById(t);return o.selectNode(m,d=>d.id===s)}function u(s){const c=o.getComponentById(s);return!(!c||!c.componentType||!c.componentType.startsWith("form"))}function l(s){const c=n(s.id),m=ce.useResponseLayoutEditorSetting(o),d=[];m.getResonseFormLayoutConfig(c,d,1);const y=d.map(P=>P.columnInSM),j=d.map(P=>P.columnInMD),i=d.map(P=>P.columnInLG),p=d.map(P=>P.columnInEL),f=g(y)?y[0]:0,h=g(j)?j[0]:0,N=g(i)?i[0]:0,v=g(p)?p[0]:0;return{uniqueColClassInSM:f,uniqueColClassInMD:h,uniqueColClassInLG:N,uniqueColClassInEL:v}}function g(s){const c=new Set(s);return Array.from(c).length===1}function a(s,c,m){s=n(m,s),s.contents.forEach(d=>{if(d.type===le.DgControl.fieldset.type){a(d,c,d.id);return}d.appearance||(d.appearance={});const y=d.appearance.class;d.appearance.class=r(y,c)})}function r(s,c){let m,d,y,j,i=[];if(s){const P=s.split(" "),V=P.filter(C=>C.startsWith("col-"));m=V.find(C=>/^col-([1-9]|10|11|12)$/.test(C)),d=V.find(C=>/^col-md-([1-9]|10|11|12)$/.test(C)),y=V.find(C=>/^col-xl-([1-9]|10|11|12)$/.test(C)),j=V.find(C=>/^col-el-([1-9]|10|11|12)$/.test(C)),i=P.filter(C=>!C.startsWith("col-"))}const p=c.uniqueColClassInSM?"col-"+c.uniqueColClassInSM:m,f=c.uniqueColClassInMD?"col-md-"+c.uniqueColClassInMD:d,h=c.uniqueColClassInLG?"col-xl-"+c.uniqueColClassInLG:y,N=c.uniqueColClassInEL?"col-el-"+c.uniqueColClassInEL:j;return[p,f,h,N].concat(i).join(" ")}return{checkIsInFormComponent:u,assembleUnifiedLayoutContext:l,changeFormControlsByUnifiedLayoutConfig:a}}class Le extends re.BaseControlProperty{constructor(t,n){super(t,n)}getPropertyConfig(t,n){var u=this;this.propertyConfig.categories.basic=this.getBasicPropConfig(t);const{checkIsInFormComponent:l,assembleUnifiedLayoutContext:g,changeFormControlsByUnifiedLayoutConfig:a}=Te(this.formSchemaUtils,this.componentId),r=this.getAppearanceConfig(t);return r.properties.unifiedLayout={title:"统一布局配置",description:"统一配置卡片区域内所有控件的宽度,只支持标准模式",visible:l(this.componentId),refreshPanelAfterChanged:!0,editor:{type:"response-form-layout-setting",initialState:g(t)}},r.setPropertyRelates=function(s,c){if(s)switch(s&&s.propertyID){case"unifiedLayout":{a(null,s.propertyValue,t.id),u.updateElementByParentContainer(t.id,n);break}}},this.propertyConfig.categories.appearance=r,this.propertyConfig}}function Se(o,t){var L;const n=o.schema,u=(L=o.parent)==null?void 0:L.schema,l=Ve(),g=e.ref(!1),a=e.ref(!1);let r=!0,s=!1,c,m=!1;function d(b){return c&&c.componentClassList&&c.componentClassList.includes("f-form-layout")&&c.componentClassList.includes("farris-form")?b.sourceType==="control"&&b.controlCategory==="input"||b.sourceType==="move"&&b.controlType==="form-group":!0}function y(b){return!(!Pe().basalDragulaRuleForContainer(b)||!r||!d(b))}function j(){g.value=!1,a.value=!1;const b=n,w=b.appearance&&b.appearance.class||"",T=w.split(" "),S=b.contents||[],O=S.length?S[0]:null,$=O&&O.appearance?O.appearance.class:"",A=$?$.split(" "):[],D=S.length?S.reduce((G,Q)=>{const se=Q&&Q.appearance?Q.appearance.class:"",Me=se?se.split(" "):[];return G.push(...Me),G},[]):[],E=u,B=E&&E.appearance&&E.appearance.class||"",x=B?B.split(" "):[];c={componentClass:w,componentClassList:T,childContents:S,firstChildContent:O,firstChildClass:$,firstChildClassList:A,parent:E,parentClass:B,parentClassList:x,children:S,childrenClassList:D};const{canAccept:H,fixed:J,hidePadding:z}=l.getRuleValue(T[0],c);return r=H,s=z,m=J,!0}function i(b){e.nextTick()}function p(){return n.componentType?"display:inherit;flex-direction:inherit;margin-bottom:10px":""}function f(b,w){const T=n;if((T.appearance&&T.appearance.class||"").split(" ").includes("f-form-layout")){const{label:$}=b,A=F("form-group");return A.editor=w,A.label=$,h(A),delete A.editor.id,delete A.editor.binding,delete A.editor.appearance,delete A.editor.visible,A}return w}function h(b){const w=o.componentInstance.value.getBelongedComponentInstance(o.componentInstance);if(w&&w.schema&&w.schema.componentType){const T=w.schema.formColumns;let S=N(T);S=t.formSchemaUtils.getControlClassByFormUnifiedLayout(S,"",o.schema),b.appearance||(b.appearance={}),b.appearance.class=S}}function N(b){let w="";switch(b){case 1:{w="col-12 col-md-12 col-xl-12 col-el-12";break}case 2:{w="col-12 col-md-6 col-xl-6 col-el-6";break}case 3:{w="col-12 col-md-6 col-xl-4 col-el-4";break}case 4:{w="col-12 col-md-6 col-xl-3 col-el-2";break}}return w}function v(b,w,T){const S=n;if((S.appearance&&S.appearance.class||"").split(" ").includes("f-form-layout")){const A=String(b.innerText),D=F("form-group");return D.editor=T,D.label=A,D}return T}function P(){return!m}function V(){return!m}function C(){return s}function k(b){return new Le(b,t).getPropertyConfig(n,o.componentInstance.value)}return{canAccepts:y,checkCanDeleteComponent:V,checkCanMoveComponent:P,getStyles:p,getPropsConfig:k,hideNestedPaddingInDesginerView:C,onAcceptNewChildElement:v,onAcceptMovedChildElement:i,resolveComponentContext:j,onResolveNewComponentSchema:f,triggerBelongedComponentToMoveWhenMoved:g,triggerBelongedComponentToDeleteWhenDeleted:a}}const ke=e.defineComponent({name:"FPagination",props:q,emits:["pageIndexChanged","pageSizeChanged"],setup(o,t){var z;const n=e.ref(!1),u=e.ref(o.mode),l=e.ref(""),g=e.ref(!1),a=e.ref(o.pageSize),r=e.ref(o.currentPage),s=e.ref(o.totalItems),c=e.ref(),m=e.inject("design-item-context"),d=Se(m.schema,(z=m.parent)==null?void 0:z.schema),y=Ne(c,m,d);e.onMounted(()=>{c.value.componentInstance=y}),t.expose(y.value);const{pages:j,updatePages:i}=ae(),p=e.computed(()=>r.value===1),f=e.computed(()=>[20,50,100]),h=e.computed(()=>Math.ceil(s.value/a.value)),N=e.computed(()=>r.value===h.value),v=e.computed(()=>!0),P=e.computed(()=>r.value>1),V=e.computed(()=>!(g.value&&j.value.length<=1)),C=e.computed(()=>!0),k=e.computed(()=>!0),L=e.computed(()=>!0),b=e.computed(()=>!0),{renderFirstPage:w,renderPreviousPage:T}=oe(r,p,P),{renderLastPage:S,renderNextPage:O}=K(r,N,h),{renderPageInfo:$}=ee(l,s),{renderPageList:A}=te(r,a,f,s),{renderPageNumbers:D}=ne(r,j),{renderGotoButton:E}=R(r,h);i(r.value,a.value,s.value,7),e.watch([r,a],()=>{i(r.value,a.value,s.value,7)}),e.watch(r,()=>{t.emit("pageIndexChanged",r.value)}),e.watch(a,()=>{t.emit("pageSizeChanged",a.value)});const B=e.computed(()=>({"ngx-pagination":!0,pagination:!0,responsive:n.value,"pager-viewmode-default":u.value==="default","pager-viewmode-simple":u.value==="simple"})),x=e.computed(()=>({position:"relative","justify-content":l.value==="center"?"center":"start"}));function H(){return e.createVNode(e.Fragment,null,[C.value&&$(),k.value&&A(),b.value&&w(),b.value&&T(),L.value&&D(),b.value&&O(),b.value&&S(),v.value&&E()])}function J(){return e.createVNode(e.Fragment,null,[e.createVNode("li",{class:"page-item d-flex flex-fill"},null),b.value&&w(),b.value&&T(),E(),e.createVNode("li",{class:"page-item page-separator",style:"margin-left: 10px"},[e.createVNode("span",{style:"font-size: 15px; font-weight: 200;"},[e.createTextVNode(" /")])]),e.createVNode("li",{class:"page-item page-total",style:"margin-left: 5px"},[e.createVNode("span",{style:"font-size: 16px; font-weight: 600;"},[e.createTextVNode(" "),h.value])]),b.value&&O(),b.value&&S()])}return()=>e.createVNode("div",{ref:c,class:"pagination-container"},[V.value&&e.createVNode("ul",{role:"navigation",class:B.value,style:x.value},[u.value==="default"?H():J()])])}});I.register=(o,t,n)=>{o.pagination=I,t.pagination=_},I.registerDesigner=(o,t,n)=>{o.pagination=ke,t.pagination=_};const Ae=ie.withInstall(I);M.FPagination=I,M.default=Ae,M.paginationProps=q,M.propsResolver=_,Object.defineProperties(M,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
@@ -1,4 +1,4 @@
1
- import { ref as l, computed as y, watch as J, nextTick as K, defineComponent as Q, onMounted as Y, onUnmounted as Z, createVNode as k, Teleport as _, withDirectives as ee, vShow as te } from "vue";
1
+ import { ref as l, computed as y, watch as J, nextTick as K, defineComponent as Q, onMounted as Y, onUnmounted as Z, createVNode as O, Teleport as _, withDirectives as ee, vShow as te } from "vue";
2
2
  const oe = {
3
3
  id: { type: String },
4
4
  title: { type: String },
@@ -24,18 +24,18 @@ const oe = {
24
24
  minWidth: { type: Number, default: -1 }
25
25
  };
26
26
  function ne(e) {
27
- const t = e.host ? e.host : "body", c = y(() => t === "body" ? 0 : t ? t.getBoundingClientRect().top : 0), i = y(() => t === "body" ? 0 : t ? t.getBoundingClientRect().left : 0), u = y(() => t === "body" ? document.body.getBoundingClientRect().width : t ? t.getBoundingClientRect().width - (e.rightBoundary ? e.rightBoundary.getBoundingClientRect().width : 0) : document.body.getBoundingClientRect().width), d = y(() => t === "body" ? document.body.getBoundingClientRect().height : t ? t.getBoundingClientRect().height : document.body.getBoundingClientRect().height);
28
- return { host: t, hostLeft: i, hostTop: c, hostWidth: u, hostHeight: d };
27
+ const t = e.host ? e.host : "body", c = y(() => t === "body" ? 0 : t ? t.getBoundingClientRect().top : 0), i = y(() => t === "body" ? 0 : t ? t.getBoundingClientRect().left : 0), u = y(() => t === "body" ? document.body.getBoundingClientRect().width : t ? t.getBoundingClientRect().width - (e.rightBoundary ? e.rightBoundary.getBoundingClientRect().width : 0) : document.body.getBoundingClientRect().width), f = y(() => t === "body" ? document.body.getBoundingClientRect().height : t ? t.getBoundingClientRect().height : document.body.getBoundingClientRect().height);
28
+ return { host: t, hostLeft: i, hostTop: c, hostWidth: u, hostHeight: f };
29
29
  }
30
30
  function ie(e, t, c, i) {
31
31
  var D;
32
- const u = l(0), d = l(((D = e.offsetX) == null ? void 0 : D.value) || 0), g = l(e.minWidth), a = l(-1), P = l(-1), m = l(e.placement), w = l(0), f = l(0), R = l(0), C = l(document.documentElement.scrollLeft), r = l(document.documentElement.scrollTop), { hostLeft: v, hostTop: O, hostWidth: S, hostHeight: j } = i;
32
+ const u = l(0), f = l(((D = e.offsetX) == null ? void 0 : D.value) || 0), g = l(e.minWidth), v = l(-1), P = l(-1), m = l(e.placement), w = l(0), r = l(0), R = l(0), b = l(document.documentElement.scrollLeft), a = l(document.documentElement.scrollTop), { hostLeft: p, hostTop: C, hostWidth: S, hostHeight: j } = i;
33
33
  J(e.offsetX, (o) => {
34
- u.value = o - d.value;
34
+ u.value = o - f.value;
35
35
  });
36
- const M = y(() => {
36
+ const E = y(() => {
37
37
  const o = {
38
- left: `${f.value}px`,
38
+ left: `${r.value}px`,
39
39
  top: `${R.value}px`,
40
40
  transform: `translateX(${u.value}px)`
41
41
  };
@@ -49,7 +49,7 @@ function ie(e, t, c, i) {
49
49
  g.value = Math.max(e.minWidth, n.width);
50
50
  }
51
51
  }
52
- function b(o, n) {
52
+ function W(o, n) {
53
53
  const s = S.value - o.width - 4;
54
54
  return s > 0 ? s : n;
55
55
  }
@@ -58,24 +58,24 @@ function ie(e, t, c, i) {
58
58
  return s > 0 ? s : n;
59
59
  }
60
60
  function x(o, n, s) {
61
- const p = w.value, h = n.left - v.value + n.width / 2 + C.value, L = n.top - O.value - (o.height + s.height) + r.value;
62
- return { popoverLeft: h, popoverTop: L, arrowLeft: p };
61
+ const d = w.value, h = n.left - p.value + n.width / 2 + b.value, L = n.top - C.value - (o.height + s.height) + a.value;
62
+ return { popoverLeft: h, popoverTop: L, arrowLeft: d };
63
63
  }
64
64
  function z(o, n, s) {
65
- const p = n.top - O.value + (n.height + s.height) + r.value, h = X(o, p);
66
- return Math.min(p, h);
65
+ const d = n.top - C.value + (n.height + s.height) + a.value, h = X(o, d);
66
+ return Math.min(d, h);
67
67
  }
68
- function E(o, n) {
69
- const s = b(n, o), p = o <= s ? w.value : o - s;
70
- return { popoverLeft: Math.min(o, s), arrowLeft: p };
68
+ function $(o, n) {
69
+ const s = W(n, o), d = o <= s ? w.value : o - s;
70
+ return { popoverLeft: Math.min(o, s), arrowLeft: d };
71
71
  }
72
72
  function N(o, n, s) {
73
- const p = n.left - v.value + n.width / 2 - (s.width / 2 - (o.left - v.value)) + C.value, { arrowLeft: h, popoverLeft: L } = E(p, o), W = z(o, n, s);
74
- return { popoverLeft: L, popoverTop: W, arrowLeft: h };
73
+ const d = n.left - p.value + n.width / 2 - (s.width / 2 - (o.left - p.value)) + b.value, { arrowLeft: h, popoverLeft: L } = $(d, o), k = z(o, n, s);
74
+ return { popoverLeft: L, popoverTop: k, arrowLeft: h };
75
75
  }
76
76
  function A(o, n, s) {
77
- const p = n.left - v.value + C.value, { arrowLeft: h, popoverLeft: L } = E(p, o), W = z(o, n, s);
78
- return { popoverLeft: L, popoverTop: W, arrowLeft: h };
77
+ const d = n.left - p.value + b.value, { arrowLeft: h, popoverLeft: L } = $(d, o), k = z(o, n, s);
78
+ return { popoverLeft: L, popoverTop: k, arrowLeft: h };
79
79
  }
80
80
  const F = /* @__PURE__ */ new Map([
81
81
  ["top", x],
@@ -83,25 +83,25 @@ function ie(e, t, c, i) {
83
83
  ["bottom-left", A]
84
84
  ]);
85
85
  function H(o) {
86
- var L, W;
86
+ var L, k;
87
87
  const n = o.getBoundingClientRect();
88
- a.value = n.top, P.value = n.left;
89
- const s = (L = t.value) == null ? void 0 : L.getBoundingClientRect(), p = (W = c.value) == null ? void 0 : W.getBoundingClientRect(), h = F.get(m.value);
88
+ v.value = n.top, P.value = n.left;
89
+ const s = (L = t.value) == null ? void 0 : L.getBoundingClientRect(), d = (k = c.value) == null ? void 0 : k.getBoundingClientRect(), h = F.get(m.value);
90
90
  if (h) {
91
- const { arrowLeft: V, popoverLeft: q, popoverTop: G } = h(p, n, s);
92
- w.value = V, f.value = q, R.value = G;
91
+ const { arrowLeft: V, popoverLeft: q, popoverTop: G } = h(d, n, s);
92
+ w.value = V, r.value = q, R.value = G;
93
93
  }
94
94
  e.keepWidthWithReference && B(o);
95
95
  }
96
96
  function U(o) {
97
97
  if (o) {
98
98
  const n = o.getBoundingClientRect();
99
- (n.left !== P.value || n.top !== a.value) && H(o);
99
+ (n.left !== P.value || n.top !== v.value) && H(o);
100
100
  }
101
101
  }
102
102
  return {
103
103
  arrowStyle: T,
104
- popoverStyle: M,
104
+ popoverStyle: E,
105
105
  position: m,
106
106
  popoverWidth: g,
107
107
  fitToReference: B,
@@ -109,90 +109,91 @@ function ie(e, t, c, i) {
109
109
  locateToReference: H
110
110
  };
111
111
  }
112
- function se(e, t, c, i, u, d, g) {
113
- const a = l(e.visible), P = y(() => a.value), { fitToReference: m, locateToReference: w } = g;
114
- let f;
112
+ function se(e, t, c, i, u, f, g) {
113
+ const v = l(e.visible), P = y(() => v.value), { fitToReference: m, locateToReference: w } = g;
114
+ let r;
115
115
  function R() {
116
- a.value = !1, document.body.removeEventListener("click", f), t.emit("hidden");
116
+ v.value = !1, document.body.removeEventListener("click", r), document.body.removeEventListener("wheel", r), t.emit("hidden");
117
117
  }
118
- f = (r) => {
119
- if (!u.value.contains(r.target)) {
120
- const v = u.value.closest(".popover");
121
- v && v.removeEventListener("click", f), R();
118
+ r = (a) => {
119
+ var p;
120
+ if (!((p = a.target) != null && p.closest(".popover-body")) && !u.value.contains(a.target)) {
121
+ const C = u.value.closest(".popover");
122
+ C && C.removeEventListener("click", r), R();
122
123
  }
123
124
  };
124
- async function C(r) {
125
- if (i.value && c.value && r) {
126
- a.value = !0, u.value = r, d.value && m(r), await K(), w(r), document.body.addEventListener("click", f);
127
- const v = r.closest(".popover");
128
- v && v.addEventListener("click", f), t.emit("shown");
125
+ async function b(a) {
126
+ if (i.value && c.value && a) {
127
+ v.value = !0, u.value = a, f.value && m(a), await K(), w(a), document.body.addEventListener("click", r, !0), document.body.addEventListener("wheel", r, !0);
128
+ const p = a.closest(".popover");
129
+ p && p.addEventListener("click", r), t.emit("shown");
129
130
  }
130
131
  }
131
- return t.expose({ hide: R, show: C, shown: P }), { showPopover: a, hidePopverOnClickBodyHandler: f };
132
+ return t.expose({ hide: R, show: b, shown: P }), { showPopover: v, hidePopverOnClickBodyHandler: r };
132
133
  }
133
134
  function ce(e, t, c, i, u) {
134
- const { popoverWidth: d, fitToReference: g, followToReferencePosition: a } = u;
135
+ const { popoverWidth: f, fitToReference: g, followToReferencePosition: v } = u;
135
136
  function P() {
136
137
  if (c.value) {
137
- a(c.value);
138
+ v(c.value);
138
139
  const m = c.value.getBoundingClientRect();
139
- i.value && m.width !== d.value && g(c.value);
140
+ i.value && m.width !== f.value && g(c.value);
140
141
  }
141
142
  }
142
143
  return { onResize: P };
143
144
  }
144
- const $ = /* @__PURE__ */ Q({
145
+ const M = /* @__PURE__ */ Q({
145
146
  name: "FPopover",
146
147
  props: oe,
147
148
  emits: ["shown", "hidden"],
148
149
  setup(e, t) {
149
- const c = l(), i = l(), u = l(e.reference), d = l(e.keepWidthWithReference), g = y(() => !!e.title), a = ne(e), {
150
+ const c = l(), i = l(), u = l(e.reference), f = l(e.keepWidthWithReference), g = y(() => !!e.title), v = ne(e), {
150
151
  host: P
151
- } = a, m = ie(e, c, i, a), {
152
+ } = v, m = ie(e, c, i, v), {
152
153
  position: w,
153
- arrowStyle: f,
154
+ arrowStyle: r,
154
155
  popoverStyle: R,
155
- fitToReference: C,
156
- locateToReference: r
156
+ fitToReference: b,
157
+ locateToReference: a
157
158
  } = m, {
158
- showPopover: v,
159
- hidePopverOnClickBodyHandler: O
160
- } = se(e, t, c, i, u, d, m), {
159
+ showPopover: p,
160
+ hidePopverOnClickBodyHandler: C
161
+ } = se(e, t, c, i, u, f, m), {
161
162
  onResize: S
162
- } = ce(e, t, u, d, m), j = y(() => {
163
- const T = `popover in popover-${w.value}`, B = `bs-popover-${w.value}`, b = {
163
+ } = ce(e, t, u, f, m), j = y(() => {
164
+ const T = `popover in popover-${w.value}`, B = `bs-popover-${w.value}`, W = {
164
165
  "popover-fitcontent": e.fitContent
165
166
  };
166
- return b[T] = !0, b[B] = !0, (e.class || "").split(" ").reduce((x, z) => (x[z] = !0, x), b), b;
167
- }), M = y(() => ({
167
+ return W[T] = !0, W[B] = !0, (e.class || "").split(" ").reduce((x, z) => (x[z] = !0, x), W), W;
168
+ }), E = y(() => ({
168
169
  "popover-content": !0,
169
170
  "popover-body": !0
170
171
  }));
171
172
  return Y(() => {
172
- e.reference && r(u.value), d.value && C(u.value), window.addEventListener("resize", S);
173
+ e.reference && a(u.value), f.value && b(u.value), window.addEventListener("resize", S);
173
174
  }), Z(() => {
174
- document.body.removeEventListener("click", O), window.removeEventListener("resize", S);
175
- }), () => k(_, {
175
+ document.body.removeEventListener("click", C), window.removeEventListener("resize", S);
176
+ }), () => O(_, {
176
177
  to: P
177
178
  }, {
178
179
  default: () => {
179
180
  var T;
180
- return [ee(k("div", {
181
+ return [ee(O("div", {
181
182
  ref: i,
182
183
  class: j.value,
183
184
  style: R.value,
184
185
  onClick: (B) => {
185
186
  B.stopPropagation();
186
187
  }
187
- }, [k("div", {
188
+ }, [O("div", {
188
189
  ref: c,
189
190
  class: "popover-arrow arrow",
190
- style: f.value
191
- }, null), g.value && k("h3", {
191
+ style: r.value
192
+ }, null), g.value && O("h3", {
192
193
  class: "popover-title popover-header"
193
- }, [e.title]), k("div", {
194
- class: M.value
195
- }, [t.slots.default && ((T = t.slots) == null ? void 0 : T.default())])]), [[te, v.value]])];
194
+ }, [e.title]), O("div", {
195
+ class: E.value
196
+ }, [t.slots.default && ((T = t.slots) == null ? void 0 : T.default())])]), [[te, p.value]])];
196
197
  }
197
198
  });
198
199
  }
@@ -212,12 +213,12 @@ const ue = {
212
213
  unMounted: (e, t, c) => {
213
214
  }
214
215
  };
215
- $.install = (e) => {
216
- e.component($.name, $), e.directive("popover", ue);
216
+ M.install = (e) => {
217
+ e.component(M.name, M), e.directive("popover", ue);
217
218
  };
218
219
  export {
219
- $ as Popover,
220
+ M as Popover,
220
221
  ue as PopoverDirective,
221
- $ as default,
222
+ M as default,
222
223
  oe as popoverProps
223
224
  };
@@ -1 +1 @@
1
- (function(m,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(m=typeof globalThis<"u"?globalThis:m||self,t(m.popover={},m.Vue))})(this,function(m,t){"use strict";const $={id:{type:String},title:{type:String},placement:{type:String,default:"bottom"},reference:{type:Object},host:{type:Object},leftBoundary:{type:Object},rightBoundary:{type:Object},visible:{type:Boolean,default:!1},class:{type:String},offsetX:{type:Object,default:t.ref(0)},zIndex:{type:Number,default:-1},keepWidthWithReference:{type:Boolean,default:!1},fitContent:{type:Boolean,default:!1},minWidth:{type:Number,default:-1}};function D(e){const o=e.host?e.host:"body",l=t.computed(()=>o==="body"?0:o?o.getBoundingClientRect().top:0),c=t.computed(()=>o==="body"?0:o?o.getBoundingClientRect().left:0),r=t.computed(()=>o==="body"?document.body.getBoundingClientRect().width:o?o.getBoundingClientRect().width-(e.rightBoundary?e.rightBoundary.getBoundingClientRect().width:0):document.body.getBoundingClientRect().width),f=t.computed(()=>o==="body"?document.body.getBoundingClientRect().height:o?o.getBoundingClientRect().height:document.body.getBoundingClientRect().height);return{host:o,hostLeft:c,hostTop:l,hostWidth:r,hostHeight:f}}function A(e,o,l,c){var H;const r=t.ref(0),f=t.ref(((H=e.offsetX)==null?void 0:H.value)||0),g=t.ref(e.minWidth),a=t.ref(-1),L=t.ref(-1),y=t.ref(e.placement),w=t.ref(0),v=t.ref(0),R=t.ref(0),T=t.ref(document.documentElement.scrollLeft),u=t.ref(document.documentElement.scrollTop),{hostLeft:p,hostTop:k,hostWidth:S,hostHeight:x}=c;t.watch(e.offsetX,n=>{r.value=n-f.value});const N=t.computed(()=>{const n={left:`${v.value}px`,top:`${R.value}px`,transform:`translateX(${r.value}px)`};return e.zIndex!==-1&&(n["z-index"]=e.zIndex),g.value!==-1&&(n.width=`${g.value}px`),n}),C=t.computed(()=>({left:`${w.value}px`}));function b(n){if(n&&e.keepWidthWithReference){const i=n.getBoundingClientRect();g.value=Math.max(e.minWidth,i.width)}}function B(n,i){const s=S.value-n.width-4;return s>0?s:i}function V(n,i){const s=x.value-n.height-4;return s>0?s:i}function j(n,i,s){const d=w.value,h=i.left-p.value+i.width/2+T.value,P=i.top-k.value-(n.height+s.height)+u.value;return{popoverLeft:h,popoverTop:P,arrowLeft:d}}function z(n,i,s){const d=i.top-k.value+(i.height+s.height)+u.value,h=V(n,d);return Math.min(d,h)}function X(n,i){const s=B(i,n),d=n<=s?w.value:n-s;return{popoverLeft:Math.min(n,s),arrowLeft:d}}function U(n,i,s){const d=i.left-p.value+i.width/2-(s.width/2-(n.left-p.value))+T.value,{arrowLeft:h,popoverLeft:P}=X(d,n),W=z(n,i,s);return{popoverLeft:P,popoverTop:W,arrowLeft:h}}function G(n,i,s){const d=i.left-p.value+T.value,{arrowLeft:h,popoverLeft:P}=X(d,n),W=z(n,i,s);return{popoverLeft:P,popoverTop:W,arrowLeft:h}}const J=new Map([["top",j],["bottom",U],["bottom-left",G]]);function E(n){var P,W;const i=n.getBoundingClientRect();a.value=i.top,L.value=i.left;const s=(P=o.value)==null?void 0:P.getBoundingClientRect(),d=(W=l.value)==null?void 0:W.getBoundingClientRect(),h=J.get(y.value);if(h){const{arrowLeft:Q,popoverLeft:Y,popoverTop:Z}=h(d,i,s);w.value=Q,v.value=Y,R.value=Z}e.keepWidthWithReference&&b(n)}function K(n){if(n){const i=n.getBoundingClientRect();(i.left!==L.value||i.top!==a.value)&&E(n)}}return{arrowStyle:C,popoverStyle:N,position:y,popoverWidth:g,fitToReference:b,followToReferencePosition:K,locateToReference:E}}function F(e,o,l,c,r,f,g){const a=t.ref(e.visible),L=t.computed(()=>a.value),{fitToReference:y,locateToReference:w}=g;let v;function R(){a.value=!1,document.body.removeEventListener("click",v),o.emit("hidden")}v=u=>{if(!r.value.contains(u.target)){const p=r.value.closest(".popover");p&&p.removeEventListener("click",v),R()}};async function T(u){if(c.value&&l.value&&u){a.value=!0,r.value=u,f.value&&y(u),await t.nextTick(),w(u),document.body.addEventListener("click",v);const p=u.closest(".popover");p&&p.addEventListener("click",v),o.emit("shown")}}return o.expose({hide:R,show:T,shown:L}),{showPopover:a,hidePopverOnClickBodyHandler:v}}function _(e,o,l,c,r){const{popoverWidth:f,fitToReference:g,followToReferencePosition:a}=r;function L(){if(l.value){a(l.value);const y=l.value.getBoundingClientRect();c.value&&y.width!==f.value&&g(l.value)}}return{onResize:L}}const O=t.defineComponent({name:"FPopover",props:$,emits:["shown","hidden"],setup(e,o){const l=t.ref(),c=t.ref(),r=t.ref(e.reference),f=t.ref(e.keepWidthWithReference),g=t.computed(()=>!!e.title),a=D(e),{host:L}=a,y=A(e,l,c,a),{position:w,arrowStyle:v,popoverStyle:R,fitToReference:T,locateToReference:u}=y,{showPopover:p,hidePopverOnClickBodyHandler:k}=F(e,o,l,c,r,f,y),{onResize:S}=_(e,o,r,f,y),x=t.computed(()=>{const C=`popover in popover-${w.value}`,b=`bs-popover-${w.value}`,B={"popover-fitcontent":e.fitContent};return B[C]=!0,B[b]=!0,(e.class||"").split(" ").reduce((j,z)=>(j[z]=!0,j),B),B}),N=t.computed(()=>({"popover-content":!0,"popover-body":!0}));return t.onMounted(()=>{e.reference&&u(r.value),f.value&&T(r.value),window.addEventListener("resize",S)}),t.onUnmounted(()=>{document.body.removeEventListener("click",k),window.removeEventListener("resize",S)}),()=>t.createVNode(t.Teleport,{to:L},{default:()=>{var C;return[t.withDirectives(t.createVNode("div",{ref:c,class:x.value,style:R.value,onClick:b=>{b.stopPropagation()}},[t.createVNode("div",{ref:l,class:"popover-arrow arrow",style:v.value},null),g.value&&t.createVNode("h3",{class:"popover-title popover-header"},[e.title]),t.createVNode("div",{class:N.value},[o.slots.default&&((C=o.slots)==null?void 0:C.default())])]),[[t.vShow,p.value]])]}})}});function M(e,o,l){e.stopPropagation();const c=o.value;c&&c.value&&c.value.show(l)}function q(e,o){e.stopPropagation(),o.value.value.hide()}const I={mounted:(e,o,l)=>{o.modifiers.hover?(e.addEventListener("mouseenter",c=>M(c,o,e)),e.addEventListener("mouseleave",c=>q(c,o))):o.modifiers.click?e.addEventListener("click",c=>M(c,o,e)):e.addEventListener("click",c=>M(c,o,e))},unMounted:(e,o,l)=>{}};O.install=e=>{e.component(O.name,O),e.directive("popover",I)},m.Popover=O,m.PopoverDirective=I,m.default=O,m.popoverProps=$,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
1
+ (function(m,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(m=typeof globalThis<"u"?globalThis:m||self,t(m.popover={},m.Vue))})(this,function(m,t){"use strict";const N={id:{type:String},title:{type:String},placement:{type:String,default:"bottom"},reference:{type:Object},host:{type:Object},leftBoundary:{type:Object},rightBoundary:{type:Object},visible:{type:Boolean,default:!1},class:{type:String},offsetX:{type:Object,default:t.ref(0)},zIndex:{type:Number,default:-1},keepWidthWithReference:{type:Boolean,default:!1},fitContent:{type:Boolean,default:!1},minWidth:{type:Number,default:-1}};function D(e){const o=e.host?e.host:"body",r=t.computed(()=>o==="body"?0:o?o.getBoundingClientRect().top:0),c=t.computed(()=>o==="body"?0:o?o.getBoundingClientRect().left:0),l=t.computed(()=>o==="body"?document.body.getBoundingClientRect().width:o?o.getBoundingClientRect().width-(e.rightBoundary?e.rightBoundary.getBoundingClientRect().width:0):document.body.getBoundingClientRect().width),v=t.computed(()=>o==="body"?document.body.getBoundingClientRect().height:o?o.getBoundingClientRect().height:document.body.getBoundingClientRect().height);return{host:o,hostLeft:c,hostTop:r,hostWidth:l,hostHeight:v}}function A(e,o,r,c){var H;const l=t.ref(0),v=t.ref(((H=e.offsetX)==null?void 0:H.value)||0),g=t.ref(e.minWidth),d=t.ref(-1),L=t.ref(-1),y=t.ref(e.placement),w=t.ref(0),a=t.ref(0),R=t.ref(0),T=t.ref(document.documentElement.scrollLeft),u=t.ref(document.documentElement.scrollTop),{hostLeft:p,hostTop:b,hostWidth:S,hostHeight:x}=c;t.watch(e.offsetX,n=>{l.value=n-v.value});const E=t.computed(()=>{const n={left:`${a.value}px`,top:`${R.value}px`,transform:`translateX(${l.value}px)`};return e.zIndex!==-1&&(n["z-index"]=e.zIndex),g.value!==-1&&(n.width=`${g.value}px`),n}),C=t.computed(()=>({left:`${w.value}px`}));function B(n){if(n&&e.keepWidthWithReference){const i=n.getBoundingClientRect();g.value=Math.max(e.minWidth,i.width)}}function W(n,i){const s=S.value-n.width-4;return s>0?s:i}function V(n,i){const s=x.value-n.height-4;return s>0?s:i}function j(n,i,s){const f=w.value,h=i.left-p.value+i.width/2+T.value,P=i.top-b.value-(n.height+s.height)+u.value;return{popoverLeft:h,popoverTop:P,arrowLeft:f}}function z(n,i,s){const f=i.top-b.value+(i.height+s.height)+u.value,h=V(n,f);return Math.min(f,h)}function X(n,i){const s=W(i,n),f=n<=s?w.value:n-s;return{popoverLeft:Math.min(n,s),arrowLeft:f}}function U(n,i,s){const f=i.left-p.value+i.width/2-(s.width/2-(n.left-p.value))+T.value,{arrowLeft:h,popoverLeft:P}=X(f,n),O=z(n,i,s);return{popoverLeft:P,popoverTop:O,arrowLeft:h}}function G(n,i,s){const f=i.left-p.value+T.value,{arrowLeft:h,popoverLeft:P}=X(f,n),O=z(n,i,s);return{popoverLeft:P,popoverTop:O,arrowLeft:h}}const J=new Map([["top",j],["bottom",U],["bottom-left",G]]);function $(n){var P,O;const i=n.getBoundingClientRect();d.value=i.top,L.value=i.left;const s=(P=o.value)==null?void 0:P.getBoundingClientRect(),f=(O=r.value)==null?void 0:O.getBoundingClientRect(),h=J.get(y.value);if(h){const{arrowLeft:Q,popoverLeft:Y,popoverTop:Z}=h(f,i,s);w.value=Q,a.value=Y,R.value=Z}e.keepWidthWithReference&&B(n)}function K(n){if(n){const i=n.getBoundingClientRect();(i.left!==L.value||i.top!==d.value)&&$(n)}}return{arrowStyle:C,popoverStyle:E,position:y,popoverWidth:g,fitToReference:B,followToReferencePosition:K,locateToReference:$}}function F(e,o,r,c,l,v,g){const d=t.ref(e.visible),L=t.computed(()=>d.value),{fitToReference:y,locateToReference:w}=g;let a;function R(){d.value=!1,document.body.removeEventListener("click",a),document.body.removeEventListener("wheel",a),o.emit("hidden")}a=u=>{var p;if(!((p=u.target)!=null&&p.closest(".popover-body"))&&!l.value.contains(u.target)){const b=l.value.closest(".popover");b&&b.removeEventListener("click",a),R()}};async function T(u){if(c.value&&r.value&&u){d.value=!0,l.value=u,v.value&&y(u),await t.nextTick(),w(u),document.body.addEventListener("click",a,!0),document.body.addEventListener("wheel",a,!0);const p=u.closest(".popover");p&&p.addEventListener("click",a),o.emit("shown")}}return o.expose({hide:R,show:T,shown:L}),{showPopover:d,hidePopverOnClickBodyHandler:a}}function _(e,o,r,c,l){const{popoverWidth:v,fitToReference:g,followToReferencePosition:d}=l;function L(){if(r.value){d(r.value);const y=r.value.getBoundingClientRect();c.value&&y.width!==v.value&&g(r.value)}}return{onResize:L}}const k=t.defineComponent({name:"FPopover",props:N,emits:["shown","hidden"],setup(e,o){const r=t.ref(),c=t.ref(),l=t.ref(e.reference),v=t.ref(e.keepWidthWithReference),g=t.computed(()=>!!e.title),d=D(e),{host:L}=d,y=A(e,r,c,d),{position:w,arrowStyle:a,popoverStyle:R,fitToReference:T,locateToReference:u}=y,{showPopover:p,hidePopverOnClickBodyHandler:b}=F(e,o,r,c,l,v,y),{onResize:S}=_(e,o,l,v,y),x=t.computed(()=>{const C=`popover in popover-${w.value}`,B=`bs-popover-${w.value}`,W={"popover-fitcontent":e.fitContent};return W[C]=!0,W[B]=!0,(e.class||"").split(" ").reduce((j,z)=>(j[z]=!0,j),W),W}),E=t.computed(()=>({"popover-content":!0,"popover-body":!0}));return t.onMounted(()=>{e.reference&&u(l.value),v.value&&T(l.value),window.addEventListener("resize",S)}),t.onUnmounted(()=>{document.body.removeEventListener("click",b),window.removeEventListener("resize",S)}),()=>t.createVNode(t.Teleport,{to:L},{default:()=>{var C;return[t.withDirectives(t.createVNode("div",{ref:c,class:x.value,style:R.value,onClick:B=>{B.stopPropagation()}},[t.createVNode("div",{ref:r,class:"popover-arrow arrow",style:a.value},null),g.value&&t.createVNode("h3",{class:"popover-title popover-header"},[e.title]),t.createVNode("div",{class:E.value},[o.slots.default&&((C=o.slots)==null?void 0:C.default())])]),[[t.vShow,p.value]])]}})}});function M(e,o,r){e.stopPropagation();const c=o.value;c&&c.value&&c.value.show(r)}function q(e,o){e.stopPropagation(),o.value.value.hide()}const I={mounted:(e,o,r)=>{o.modifiers.hover?(e.addEventListener("mouseenter",c=>M(c,o,e)),e.addEventListener("mouseleave",c=>q(c,o))):o.modifiers.click?e.addEventListener("click",c=>M(c,o,e)):e.addEventListener("click",c=>M(c,o,e))},unMounted:(e,o,r)=>{}};k.install=e=>{e.component(k.name,k),e.directive("popover",I)},m.Popover=k,m.PopoverDirective=I,m.default=k,m.popoverProps=N,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});