@farris/ui-vue 1.2.8 → 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.
- package/components/accordion/index.esm.js +180 -180
- package/components/accordion/index.umd.cjs +1 -0
- package/components/avatar/index.esm.js +419 -331
- package/components/avatar/index.umd.cjs +1 -0
- package/components/border-editor/index.umd.cjs +1 -0
- package/components/button/index.umd.cjs +1 -0
- package/components/button-edit/index.css +1 -1
- package/components/button-edit/index.esm.js +346 -326
- package/components/button-edit/index.umd.cjs +1 -0
- package/components/button-group/index.umd.cjs +1 -0
- package/components/calculator/index.umd.cjs +1 -0
- package/components/calendar/index.esm.js +384 -384
- package/components/calendar/index.umd.cjs +1 -0
- package/components/capsule/index.esm.js +205 -205
- package/components/capsule/index.umd.cjs +1 -0
- package/components/checkbox/index.esm.js +555 -467
- package/components/checkbox/index.umd.cjs +1 -0
- package/components/color-picker/index.esm.js +239 -239
- package/components/color-picker/index.umd.cjs +3 -0
- package/components/combo-list/index.css +1 -0
- package/components/combo-list/index.esm.js +1072 -364
- package/components/combo-list/index.umd.cjs +1 -0
- package/components/combo-tree/index.esm.js +129 -129
- package/components/combo-tree/index.umd.cjs +1 -0
- package/components/common/index.esm.js +778 -700
- package/components/common/index.umd.cjs +1 -0
- package/components/component/index.esm.js +582 -327
- package/components/component/index.umd.cjs +1 -0
- package/components/condition/index.css +1 -0
- package/components/condition/index.esm.js +2433 -1134
- package/components/condition/index.umd.cjs +1 -0
- package/components/content-container/index.esm.js +307 -234
- package/components/content-container/index.umd.cjs +1 -0
- package/components/data-grid/index.css +1 -1
- package/components/data-grid/index.esm.js +6762 -4946
- package/components/data-grid/index.umd.cjs +1 -0
- package/components/data-view/index.css +1 -0
- package/components/data-view/index.esm.js +4977 -3489
- package/components/data-view/index.umd.cjs +1 -0
- package/components/date-picker/index.css +1 -1
- package/components/date-picker/index.esm.js +3525 -2811
- package/components/date-picker/index.umd.cjs +1 -0
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +938 -928
- package/components/designer-canvas/index.umd.cjs +1 -0
- package/components/designer-outline/index.css +1 -1
- package/components/designer-outline/index.esm.js +38 -37
- package/components/designer-outline/index.umd.cjs +1 -0
- package/components/designer-toolbox/index.esm.js +36 -12
- package/components/designer-toolbox/index.umd.cjs +1 -0
- package/components/discussion-editor/index.umd.cjs +3 -0
- package/components/discussion-list/index.umd.cjs +1 -0
- package/components/drawer/index.umd.cjs +1 -0
- package/components/dropdown/index.esm.js +282 -282
- package/components/dropdown/index.umd.cjs +2 -0
- package/components/dynamic-form/index.css +1 -0
- package/components/dynamic-form/index.esm.js +2684 -1039
- package/components/dynamic-form/index.umd.cjs +1 -0
- package/components/dynamic-resolver/index.esm.js +149 -101
- package/components/dynamic-resolver/index.umd.cjs +1 -0
- package/components/dynamic-view/index.esm.js +303 -290
- package/components/dynamic-view/index.umd.cjs +1 -0
- package/components/enum-editor/index.umd.cjs +1 -0
- package/components/events-editor/index.esm.js +573 -518
- package/components/events-editor/index.umd.cjs +1 -0
- package/components/expression-editor/index.esm.js +99 -99
- package/components/expression-editor/index.umd.cjs +1 -0
- package/components/external-container/index.css +1 -1
- package/components/external-container/index.esm.js +3607 -2799
- package/components/external-container/index.umd.cjs +1 -0
- package/components/field-selector/index.css +1 -1
- package/components/field-selector/index.esm.js +5438 -8236
- package/components/field-selector/index.umd.cjs +1 -0
- package/components/filter-bar/index.css +1 -1
- package/components/filter-bar/index.esm.js +1679 -1759
- package/components/filter-bar/index.umd.cjs +1 -0
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +1062 -1052
- package/components/flow-canvas/index.umd.cjs +1 -0
- package/components/image-cropper/index.esm.js +421 -421
- package/components/image-cropper/index.umd.cjs +1 -0
- package/components/input-group/index.esm.js +677 -593
- package/components/input-group/index.umd.cjs +1 -0
- package/components/layout/index.esm.js +326 -326
- package/components/layout/index.umd.cjs +1 -0
- package/components/list-nav/index.esm.js +272 -199
- package/components/list-nav/index.umd.cjs +1 -0
- package/components/list-view/index.css +1 -1
- package/components/list-view/index.esm.js +3739 -2273
- package/components/list-view/index.umd.cjs +1 -0
- package/components/loading/index.umd.cjs +8 -0
- package/components/locale/index.umd.cjs +1 -0
- package/components/lookup/index.css +1 -1
- package/components/lookup/index.esm.js +11255 -9004
- package/components/lookup/index.umd.cjs +1 -0
- package/components/mapping-editor/index.css +1 -1
- package/components/mapping-editor/index.esm.js +6046 -5314
- package/components/mapping-editor/index.umd.cjs +1 -0
- package/components/message-box/index.css +1 -1
- package/components/message-box/index.esm.js +511 -471
- package/components/message-box/index.umd.cjs +1 -0
- package/components/modal/index.css +1 -1
- package/components/modal/index.esm.js +438 -398
- package/components/modal/index.umd.cjs +1 -0
- package/components/nav/index.esm.js +588 -444
- package/components/nav/index.umd.cjs +3 -0
- package/components/notify/index.esm.js +59 -53
- package/components/notify/index.umd.cjs +1 -0
- package/components/number-range/index.esm.js +568 -485
- package/components/number-range/index.umd.cjs +1 -0
- package/components/number-spinner/index.esm.js +542 -454
- package/components/number-spinner/index.umd.cjs +1 -0
- package/components/order/index.css +1 -1
- package/components/order/index.esm.js +1967 -1105
- package/components/order/index.umd.cjs +1 -0
- package/components/page-footer/index.esm.js +160 -160
- package/components/page-footer/index.umd.cjs +1 -0
- package/components/page-header/index.esm.js +1282 -1151
- package/components/page-header/index.umd.cjs +1 -0
- package/components/pagination/index.esm.js +705 -555
- package/components/pagination/index.umd.cjs +1 -0
- package/components/popover/index.esm.js +71 -70
- package/components/popover/index.umd.cjs +1 -0
- package/components/progress/index.esm.js +270 -270
- package/components/progress/index.umd.cjs +3 -0
- package/components/property-editor/index.css +1 -1
- package/components/property-editor/index.esm.js +2231 -1517
- package/components/property-editor/index.umd.cjs +3 -0
- package/components/property-panel/index.esm.js +813 -909
- package/components/property-panel/index.umd.cjs +1 -0
- package/components/query-solution/index.css +1 -1
- package/components/query-solution/index.esm.js +3781 -2566
- package/components/query-solution/index.umd.cjs +1 -0
- package/components/radio-button/index.esm.js +101 -101
- package/components/radio-button/index.umd.cjs +1 -0
- package/components/radio-group/index.esm.js +538 -450
- package/components/radio-group/index.umd.cjs +1 -0
- package/components/rate/index.esm.js +238 -233
- package/components/rate/index.umd.cjs +1 -0
- package/components/response-layout/index.esm.js +155 -155
- package/components/response-layout/index.umd.cjs +1 -0
- package/components/response-layout-editor/index.css +1 -1
- package/components/response-layout-editor/index.esm.js +1243 -1180
- package/components/response-layout-editor/index.umd.cjs +1 -0
- package/components/response-toolbar/index.esm.js +988 -877
- package/components/response-toolbar/index.umd.cjs +1 -0
- package/components/schema-selector/index.css +1 -1
- package/components/schema-selector/index.esm.js +5413 -4867
- package/components/schema-selector/index.umd.cjs +8 -0
- package/components/search-box/index.esm.js +199 -199
- package/components/search-box/index.umd.cjs +1 -0
- package/components/section/index.esm.js +646 -503
- package/components/section/index.umd.cjs +1 -0
- package/components/smoke-detector/index.esm.js +144 -144
- package/components/smoke-detector/index.umd.cjs +1 -0
- package/components/spacing-editor/index.umd.cjs +1 -0
- package/components/splitter/index.esm.js +464 -391
- package/components/splitter/index.umd.cjs +1 -0
- package/components/step/index.esm.js +249 -249
- package/components/step/index.umd.cjs +1 -0
- package/components/switch/index.esm.js +483 -394
- package/components/switch/index.umd.cjs +1 -0
- package/components/tabs/index.css +1 -1
- package/components/tabs/index.esm.js +2366 -2208
- package/components/tabs/index.umd.cjs +1 -0
- package/components/tags/index.esm.js +397 -399
- package/components/tags/index.umd.cjs +1 -0
- package/components/text/index.esm.js +394 -394
- package/components/text/index.umd.cjs +1 -0
- package/components/textarea/index.esm.js +451 -367
- package/components/textarea/index.umd.cjs +1 -0
- package/components/time-picker/index.css +1 -1
- package/components/time-picker/index.esm.js +1252 -1144
- package/components/time-picker/index.umd.cjs +1 -0
- package/components/tooltip/index.umd.cjs +1 -0
- package/components/transfer/index.css +1 -1
- package/components/transfer/index.esm.js +510 -499
- package/components/transfer/index.umd.cjs +1 -0
- package/components/tree-grid/index.css +1 -1
- package/components/tree-grid/index.esm.js +5463 -9330
- package/components/tree-grid/index.umd.cjs +1 -0
- package/components/tree-view/index.css +1 -0
- package/components/tree-view/index.esm.js +4058 -2597
- package/components/tree-view/index.umd.cjs +1 -0
- package/components/uploader/index.esm.js +510 -504
- package/components/uploader/index.umd.cjs +2 -0
- package/components/verify-detail/index.esm.js +220 -220
- package/components/verify-detail/index.umd.cjs +1 -0
- package/components/video/index.esm.js +653 -394
- package/components/video/index.umd.cjs +1 -0
- package/components/weather/index.esm.js +1028 -1028
- package/components/weather/index.umd.cjs +16 -0
- package/farris.all.esm.js +20407 -18556
- package/farris.all.umd.cjs +8 -8
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/button-edit/src/designer/button-group.design.component.d.ts +7 -0
- package/types/capsule/src/capsule.props.d.ts +2 -2
- package/types/combo-list/src/components/list-container.props.d.ts +1 -1
- package/types/common/entity/entity-schema.d.ts +258 -0
- package/types/common/index.d.ts +1 -0
- package/types/common/types.d.ts +1 -1
- package/types/common/utils/encrypt.d.ts +2 -0
- package/types/component/src/component-ref.props.d.ts +4 -0
- package/types/component/src/component.props.d.ts +7 -0
- package/types/component/src/composition/inner-component-build-info.d.ts +27 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/component/src/property-config/component.property-config.d.ts +9 -0
- package/types/components.d.ts +1 -0
- package/types/data-grid/index.d.ts +8 -2
- package/types/data-grid/src/composition/data-grid-component-creator.service.d.ts +33 -0
- package/types/data-grid/src/data-grid.component.d.ts +3 -1
- package/types/data-grid/src/data-grid.props.d.ts +3 -2
- package/types/data-grid/src/property-config/data-grid.property-config.d.ts +4 -0
- package/types/data-grid/src/schema/schema-resolver.d.ts +2 -1
- package/types/data-view/components/column-format/boolean.component.d.ts +4 -0
- package/types/data-view/components/column-format/column-format.component.d.ts +4 -0
- package/types/data-view/components/column-format/date.component.d.ts +4 -0
- package/types/data-view/components/column-format/enum.component.d.ts +4 -0
- package/types/data-view/components/column-format/number.component.d.ts +4 -0
- package/types/data-view/composition/pagination/use-pagination.d.ts +1 -0
- package/types/data-view/composition/types.d.ts +36 -7
- package/types/data-view/composition/use-edit.d.ts +2 -1
- package/types/data-view/composition/visualization/use-virtual-scroll.d.ts +0 -15
- package/types/designer-canvas/src/composition/dg-control.d.ts +5 -0
- package/types/designer-canvas/src/composition/function/use-dragula.d.ts +2 -2
- package/types/designer-canvas/src/composition/types.d.ts +1 -1
- package/types/designer-canvas/src/types.d.ts +2 -2
- package/types/dynamic-form/index.d.ts +2 -1
- package/types/dynamic-form/src/composition/response-form-component-creator.service.d.ts +31 -0
- package/types/dynamic-form/src/composition/use-response-form-layout-setting.d.ts +2 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.component.d.ts +8 -0
- package/types/dynamic-form/src/designer/response-form-layout-setting.props.d.ts +4 -0
- package/types/dynamic-form/src/designer/use-designer-rules.d.ts +2 -2
- package/types/dynamic-form/src/property-config/form.property-config.d.ts +9 -0
- package/types/dynamic-form/src/schema/schema-mapper.d.ts +1 -0
- package/types/dynamic-form/src/schema/schema-resolver.d.ts +3 -1
- package/types/dynamic-form/src/types.d.ts +12 -1
- package/types/dynamic-resolver/index.d.ts +1 -0
- package/types/dynamic-resolver/src/event-handler-resolver.d.ts +4 -0
- package/types/dynamic-resolver/src/schema-resolver.d.ts +2 -1
- package/types/dynamic-resolver/src/types.d.ts +12 -2
- package/types/dynamic-view/index.d.ts +1 -0
- package/types/dynamic-view/src/event-dispatcher.d.ts +1 -1
- package/types/index.d.ts +2 -0
- package/types/lookup/src/components/favorite/lookup-favorite.component.d.ts +29 -0
- package/types/lookup/src/components/favorite/lookup-favorite.props.d.ts +15 -0
- package/types/lookup/src/components/modal-container.component.d.ts +25 -0
- package/types/lookup/src/components/modal-container.props.d.ts +29 -0
- package/types/lookup/src/composition/types.d.ts +8 -0
- package/types/lookup/src/composition/use-check-props.d.ts +9 -2
- package/types/lookup/src/composition/use-dialog.d.ts +5 -1
- package/types/lookup/src/composition/use-favorite.d.ts +12 -0
- package/types/lookup/src/composition/use-http.d.ts +9 -5
- package/types/lookup/src/composition/use-input-change.d.ts +3 -0
- package/types/lookup/src/composition/use-user-data.d.ts +24 -0
- package/types/lookup/src/property-config/lookup.property-config.d.ts +6 -4
- package/types/mapping-editor/src/mapping-editor.component.d.ts +3 -0
- package/types/mapping-editor/src/mapping-editor.props.d.ts +0 -1
- package/types/modal/src/composition/use-draggable.d.ts +2 -1
- package/types/modal/src/composition/use-shortcut.d.ts +6 -0
- package/types/modal/src/modal.component.d.ts +3 -0
- package/types/modal/src/modal.props.d.ts +4 -0
- package/types/page-header/src/page-header.props.d.ts +1 -0
- package/types/property-panel/src/composition/entity/base-property.d.ts +8 -0
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +20 -1
- package/types/response-layout-editor/src/composition/converter/use-response-layout-editor-setting.d.ts +2 -0
- package/types/response-layout-editor/src/type.d.ts +21 -0
- package/types/response-toolbar/src/response-toolbar.props.d.ts +2 -2
- package/types/response-toolbar/src/schema/schema-mapper.d.ts +4 -0
- package/types/section/src/property-config/section.property-config.d.ts +93 -0
- package/types/section/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/composition/types.d.ts +2 -2
- package/types/tabs/src/designer/tab-header-item.design.component.d.ts +3 -1
- package/types/tabs/src/property-config/tab-page.property-config.d.ts +60 -0
- package/types/tabs/src/schema/schema-resolver.d.ts +2 -1
- package/types/tabs/src/tabs.props.d.ts +1 -0
- package/types/tags/index.d.ts +36 -5
- package/types/tree-grid/index.d.ts +8 -2
- package/types/tree-grid/src/tree-grid.component.d.ts +3 -1
- package/types/modal/src/composition/use-esc.d.ts +0 -1
- package/types/response-layout-editor/src/composition/converter/response-layout-editor.converter.d.ts +0 -3
- package/types/response-layout-editor/src/composition/converter/use-convert-property-value.d.ts +0 -20
|
@@ -0,0 +1 @@
|
|
|
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
|
|
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),
|
|
28
|
-
return { host: t, hostLeft: i, hostTop: c, hostWidth: u, hostHeight:
|
|
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),
|
|
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 -
|
|
34
|
+
u.value = o - f.value;
|
|
35
35
|
});
|
|
36
|
-
const
|
|
36
|
+
const E = y(() => {
|
|
37
37
|
const o = {
|
|
38
|
-
left: `${
|
|
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
|
|
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
|
|
62
|
-
return { popoverLeft: h, popoverTop: L, arrowLeft:
|
|
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
|
|
66
|
-
return Math.min(
|
|
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
|
|
69
|
-
const s =
|
|
70
|
-
return { popoverLeft: Math.min(o, s), arrowLeft:
|
|
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
|
|
74
|
-
return { popoverLeft: L, popoverTop:
|
|
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
|
|
78
|
-
return { popoverLeft: L, popoverTop:
|
|
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,
|
|
86
|
+
var L, k;
|
|
87
87
|
const n = o.getBoundingClientRect();
|
|
88
|
-
|
|
89
|
-
const s = (L = t.value) == null ? void 0 : L.getBoundingClientRect(),
|
|
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(
|
|
92
|
-
w.value = V,
|
|
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 !==
|
|
99
|
+
(n.left !== P.value || n.top !== v.value) && H(o);
|
|
100
100
|
}
|
|
101
101
|
}
|
|
102
102
|
return {
|
|
103
103
|
arrowStyle: T,
|
|
104
|
-
popoverStyle:
|
|
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,
|
|
113
|
-
const
|
|
114
|
-
let
|
|
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
|
-
|
|
116
|
+
v.value = !1, document.body.removeEventListener("click", r), document.body.removeEventListener("wheel", r), t.emit("hidden");
|
|
117
117
|
}
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
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
|
|
125
|
-
if (i.value && c.value &&
|
|
126
|
-
|
|
127
|
-
const
|
|
128
|
-
|
|
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:
|
|
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:
|
|
135
|
+
const { popoverWidth: f, fitToReference: g, followToReferencePosition: v } = u;
|
|
135
136
|
function P() {
|
|
136
137
|
if (c.value) {
|
|
137
|
-
|
|
138
|
+
v(c.value);
|
|
138
139
|
const m = c.value.getBoundingClientRect();
|
|
139
|
-
i.value && m.width !==
|
|
140
|
+
i.value && m.width !== f.value && g(c.value);
|
|
140
141
|
}
|
|
141
142
|
}
|
|
142
143
|
return { onResize: P };
|
|
143
144
|
}
|
|
144
|
-
const
|
|
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),
|
|
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
|
-
} =
|
|
152
|
+
} = v, m = ie(e, c, i, v), {
|
|
152
153
|
position: w,
|
|
153
|
-
arrowStyle:
|
|
154
|
+
arrowStyle: r,
|
|
154
155
|
popoverStyle: R,
|
|
155
|
-
fitToReference:
|
|
156
|
-
locateToReference:
|
|
156
|
+
fitToReference: b,
|
|
157
|
+
locateToReference: a
|
|
157
158
|
} = m, {
|
|
158
|
-
showPopover:
|
|
159
|
-
hidePopverOnClickBodyHandler:
|
|
160
|
-
} = se(e, t, c, i, u,
|
|
159
|
+
showPopover: p,
|
|
160
|
+
hidePopverOnClickBodyHandler: C
|
|
161
|
+
} = se(e, t, c, i, u, f, m), {
|
|
161
162
|
onResize: S
|
|
162
|
-
} = ce(e, t, u,
|
|
163
|
-
const T = `popover in popover-${w.value}`, B = `bs-popover-${w.value}`,
|
|
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
|
|
167
|
-
}),
|
|
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 &&
|
|
173
|
+
e.reference && a(u.value), f.value && b(u.value), window.addEventListener("resize", S);
|
|
173
174
|
}), Z(() => {
|
|
174
|
-
document.body.removeEventListener("click",
|
|
175
|
-
}), () =>
|
|
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(
|
|
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
|
-
}, [
|
|
188
|
+
}, [O("div", {
|
|
188
189
|
ref: c,
|
|
189
190
|
class: "popover-arrow arrow",
|
|
190
|
-
style:
|
|
191
|
-
}, null), g.value &&
|
|
191
|
+
style: r.value
|
|
192
|
+
}, null), g.value && O("h3", {
|
|
192
193
|
class: "popover-title popover-header"
|
|
193
|
-
}, [e.title]),
|
|
194
|
-
class:
|
|
195
|
-
}, [t.slots.default && ((T = t.slots) == null ? void 0 : T.default())])]), [[te,
|
|
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
|
-
|
|
216
|
-
e.component(
|
|
216
|
+
M.install = (e) => {
|
|
217
|
+
e.component(M.name, M), e.directive("popover", ue);
|
|
217
218
|
};
|
|
218
219
|
export {
|
|
219
|
-
|
|
220
|
+
M as Popover,
|
|
220
221
|
ue as PopoverDirective,
|
|
221
|
-
|
|
222
|
+
M as default,
|
|
222
223
|
oe as popoverProps
|
|
223
224
|
};
|
|
@@ -0,0 +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 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"}})});
|