@farris/ui-vue 1.3.0 → 1.3.1
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 +1 -1
- package/components/accordion/index.umd.cjs +1 -1
- package/components/avatar/index.esm.js +472 -366
- package/components/avatar/index.umd.cjs +1 -1
- package/components/button-edit/index.esm.js +1 -1
- package/components/button-edit/index.umd.cjs +1 -1
- package/components/calendar/index.esm.js +472 -480
- package/components/calendar/index.umd.cjs +1 -1
- package/components/capsule/index.esm.js +225 -233
- package/components/capsule/index.umd.cjs +1 -1
- package/components/checkbox/index.esm.js +615 -517
- package/components/checkbox/index.umd.cjs +1 -1
- package/components/color-picker/index.esm.js +325 -333
- package/components/color-picker/index.umd.cjs +2 -2
- package/components/combo-list/index.esm.js +578 -472
- package/components/combo-list/index.umd.cjs +1 -1
- package/components/combo-tree/index.esm.js +49 -49
- package/components/combo-tree/index.umd.cjs +1 -1
- package/components/common/index.esm.js +832 -722
- package/components/common/index.umd.cjs +1 -1
- package/components/component/index.esm.js +303 -981
- package/components/component/index.umd.cjs +1 -1
- package/components/condition/index.esm.js +8 -8
- package/components/condition/index.umd.cjs +1 -1
- package/components/content-container/index.esm.js +335 -1002
- package/components/content-container/index.umd.cjs +1 -1
- package/components/data-grid/index.esm.js +4429 -4312
- package/components/data-grid/index.umd.cjs +1 -1
- package/components/data-view/index.esm.js +3037 -3020
- package/components/data-view/index.umd.cjs +1 -1
- package/components/date-picker/index.esm.js +2216 -2119
- package/components/date-picker/index.umd.cjs +1 -1
- package/components/designer-canvas/index.css +1 -1
- package/components/designer-canvas/index.esm.js +914 -883
- package/components/designer-canvas/index.umd.cjs +1 -1
- package/components/dropdown/index.esm.js +223 -231
- package/components/dropdown/index.umd.cjs +2 -2
- package/components/dynamic-form/index.esm.js +1691 -2187
- package/components/dynamic-form/index.umd.cjs +1 -1
- package/components/dynamic-resolver/index.esm.js +143 -136
- package/components/dynamic-resolver/index.umd.cjs +1 -1
- package/components/events-editor/index.esm.js +250 -258
- package/components/events-editor/index.umd.cjs +1 -1
- package/components/expression-editor/index.esm.js +1 -1
- package/components/expression-editor/index.umd.cjs +1 -1
- package/components/external-container/index.esm.js +2672 -3438
- package/components/external-container/index.umd.cjs +1 -1
- package/components/field-selector/index.esm.js +2965 -2970
- package/components/field-selector/index.umd.cjs +1 -1
- package/components/filter-bar/index.esm.js +1650 -1602
- package/components/filter-bar/index.umd.cjs +1 -1
- package/components/flow-canvas/index.css +1 -1
- package/components/flow-canvas/index.esm.js +684 -675
- package/components/flow-canvas/index.umd.cjs +1 -1
- package/components/image-cropper/index.esm.js +453 -461
- package/components/image-cropper/index.umd.cjs +1 -1
- package/components/input-group/index.esm.js +604 -507
- package/components/input-group/index.umd.cjs +1 -1
- package/components/layout/index.esm.js +402 -378
- package/components/layout/index.umd.cjs +1 -1
- package/components/list-nav/index.esm.js +348 -1019
- package/components/list-nav/index.umd.cjs +1 -1
- package/components/list-view/index.esm.js +1658 -1666
- package/components/list-view/index.umd.cjs +1 -1
- package/components/lookup/index.esm.js +5209 -5088
- package/components/lookup/index.umd.cjs +1 -1
- package/components/mapping-editor/index.esm.js +4329 -4213
- package/components/mapping-editor/index.umd.cjs +1 -1
- package/components/nav/index.esm.js +905 -1357
- package/components/nav/index.umd.cjs +3 -3
- package/components/number-range/index.esm.js +517 -420
- package/components/number-range/index.umd.cjs +1 -1
- package/components/number-spinner/index.esm.js +588 -491
- package/components/number-spinner/index.umd.cjs +1 -1
- package/components/order/index.esm.js +1376 -1965
- package/components/order/index.umd.cjs +1 -1
- package/components/page-footer/index.esm.js +1 -1
- package/components/page-footer/index.umd.cjs +1 -1
- package/components/page-header/index.esm.js +1073 -1905
- package/components/page-header/index.umd.cjs +1 -1
- package/components/pagination/index.esm.js +809 -1237
- package/components/pagination/index.umd.cjs +1 -1
- package/components/progress/index.esm.js +198 -206
- package/components/progress/index.umd.cjs +3 -3
- package/components/property-editor/index.esm.js +1297 -1200
- package/components/property-editor/index.umd.cjs +2 -2
- package/components/property-panel/index.esm.js +609 -507
- package/components/property-panel/index.umd.cjs +1 -1
- package/components/query-solution/index.esm.js +3391 -3758
- package/components/query-solution/index.umd.cjs +1 -1
- package/components/radio-button/index.esm.js +1 -1
- package/components/radio-button/index.umd.cjs +1 -1
- package/components/radio-group/index.esm.js +544 -447
- package/components/radio-group/index.umd.cjs +1 -1
- package/components/rate/index.esm.js +247 -255
- package/components/rate/index.umd.cjs +1 -1
- package/components/response-layout/index.esm.js +146 -154
- package/components/response-layout/index.umd.cjs +1 -1
- package/components/response-layout-editor/index.esm.js +700 -675
- package/components/response-layout-editor/index.umd.cjs +1 -1
- package/components/response-toolbar/index.esm.js +956 -1786
- package/components/response-toolbar/index.umd.cjs +1 -1
- package/components/schema-selector/index.esm.js +4963 -5617
- package/components/schema-selector/index.umd.cjs +2 -2
- package/components/search-box/index.esm.js +158 -161
- package/components/search-box/index.umd.cjs +1 -1
- package/components/section/index.esm.js +436 -1124
- package/components/section/index.umd.cjs +1 -1
- package/components/smoke-detector/index.esm.js +92 -100
- package/components/smoke-detector/index.umd.cjs +1 -1
- package/components/splitter/index.esm.js +571 -1210
- package/components/splitter/index.umd.cjs +1 -1
- package/components/splitter/style.js +2 -0
- package/components/step/index.esm.js +239 -247
- package/components/step/index.umd.cjs +1 -1
- package/components/switch/index.esm.js +445 -348
- package/components/switch/index.umd.cjs +1 -1
- package/components/tabs/index.esm.js +2278 -3031
- package/components/tabs/index.umd.cjs +1 -1
- package/components/tags/index.esm.js +311 -319
- package/components/tags/index.umd.cjs +1 -1
- package/components/text/index.esm.js +215 -223
- package/components/text/index.umd.cjs +1 -1
- package/components/textarea/index.esm.js +468 -371
- package/components/textarea/index.umd.cjs +1 -1
- package/components/time-picker/index.esm.js +1271 -1174
- package/components/time-picker/index.umd.cjs +1 -1
- package/components/transfer/index.esm.js +469 -477
- package/components/transfer/index.umd.cjs +1 -1
- package/components/tree-grid/index.esm.js +3060 -3065
- package/components/tree-grid/index.umd.cjs +1 -1
- package/components/tree-view/index.esm.js +2476 -2481
- package/components/tree-view/index.umd.cjs +1 -1
- package/components/uploader/index.esm.js +374 -382
- package/components/uploader/index.umd.cjs +2 -2
- package/components/verify-detail/index.esm.js +248 -256
- package/components/verify-detail/index.umd.cjs +1 -1
- package/components/video/index.esm.js +414 -1093
- package/components/video/index.umd.cjs +1 -1
- package/components/weather/index.esm.js +498 -506
- package/components/weather/index.umd.cjs +5 -5
- package/farris.all.esm.js +20216 -21844
- package/farris.all.umd.cjs +9 -9
- package/index.css +1 -1
- package/package.json +1 -1
- package/types/common/directive/area-response.d.ts +10 -0
- package/types/common/index.d.ts +8 -0
- package/types/common/radio-checkbox/radio-checkbox.props.d.ts +1 -0
- package/types/common/utils/resolve-field.d.ts +2 -0
- package/types/common/utils/use-class.d.ts +7 -0
- package/types/component/src/designer/use-designer-rules.d.ts +2 -2
- package/types/condition/src/types.d.ts +2 -1
- package/types/content-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/data-grid/index.d.ts +8 -5
- package/types/data-grid/src/data-grid.component.d.ts +3 -2
- package/types/data-grid/src/designer/data-grid.design.component.d.ts +2 -2
- package/types/data-grid/src/designer/use-designer-rules.d.ts +2 -2
- package/types/data-view/components/row/hierarchy-row.component.d.ts +2 -2
- package/types/data-view/composition/data/use-tree-data.d.ts +1 -1
- package/types/data-view/composition/types.d.ts +7 -9
- package/types/designer-canvas/index.d.ts +2 -1
- package/types/designer-canvas/src/composition/rule/use-dragula-common-rule.d.ts +4 -0
- package/types/designer-canvas/src/composition/rule/use-template-rule.d.ts +30 -0
- package/types/designer-canvas/src/composition/types.d.ts +1 -2
- package/types/designer-canvas/src/types.d.ts +2 -1
- package/types/dynamic-form/src/designer/response-form.design.component.d.ts +7 -1
- 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 +1 -1
- package/types/dynamic-resolver/src/common/toolbar-resolver.d.ts +1 -1
- package/types/external-container/src/designer/use-designer-rules.d.ts +3 -3
- package/types/layout/src/designer/layout-pane-use-designer-rules.d.ts +3 -3
- package/types/list-nav/src/designer/use-designer-rules.d.ts +3 -0
- package/types/pagination/src/components/buttons/goto-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/next-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/buttons/previous-buttons.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-list.component.d.ts +2 -2
- package/types/pagination/src/components/pages/page-number.component.d.ts +2 -2
- package/types/property-panel/index.d.ts +2 -1
- package/types/property-panel/src/composition/entity/input-base-property.d.ts +1 -1
- package/types/query-solution/src/designer/query-solution-config/composition/types.d.ts +34 -27
- package/types/query-solution/src/designer/query-solution-config/composition/use-panel.d.ts +2 -16
- package/types/query-solution/src/designer/query-solution-config/composition/use-property.d.ts +19 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-querysolution-rules.d.ts +3 -0
- package/types/query-solution/src/designer/query-solution-config/composition/use-transfer.d.ts +1 -1
- package/types/query-solution/src/property-config/query-solution.property-config.d.ts +60 -0
- package/types/query-solution/src/solutions.d.ts +108 -509
- package/types/response-layout-editor/index.d.ts +3 -1
- package/types/response-toolbar/src/designer/use-designer-rules.d.ts +3 -3
- package/types/response-toolbar/src/property-config/response-toolbar-item.property-config.d.ts +1 -0
- package/types/section/src/designer/use-designer-rules.d.ts +3 -3
- package/types/splitter/src/components/splitter-pane.component.d.ts +1 -1
- package/types/splitter/src/designer/splitter-pane-use-designer-rules.d.ts +3 -3
- package/types/splitter/src/designer/splitter-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-page-use-designer-rules.d.ts +3 -3
- package/types/tabs/src/designer/tab-use-designer-rules.d.ts +3 -3
- package/types/tree-grid/index.d.ts +3 -3
- package/types/tree-grid/src/tree-grid.component.d.ts +1 -1
- package/types/designer-canvas/src/composition/rule/use-drag-drop-rules.d.ts +0 -19
- package/types/designer-canvas/src/composition/use-dragula-common-rule.d.ts +0 -4
- package/types/list-nav/src/composition/use-designer-rules.d.ts +0 -3
- package/types/query-solution/src/designer/query-solution-config/composition/mock-data.d.ts +0 -6
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(v,c){typeof exports=="object"&&typeof module<"u"?c(exports,require("vue"),require("lodash-es"),require("../accordion/index.umd.js"),require("../avatar/index.umd.js"),require("../button-edit/index.umd.js"),require("../button-group/index.umd.js"),require("../calendar/index.umd.js"),require("../capsule/index.umd.js"),require("../checkbox/index.umd.js"),require("../color-picker/index.umd.js"),require("../combo-list/index.umd.js"),require("../content-container/index.umd.js"),require("../data-grid/index.umd.js"),require("../date-picker/index.umd.js"),require("../dropdown/index.umd.js"),require("../dynamic-form/index.umd.js"),require("../external-container/index.umd.js"),require("../events-editor/index.umd.js"),require("../filter-bar/index.umd.js"),require("../image-cropper/index.umd.js"),require("../input-group/index.umd.js"),require("../layout/index.umd.js"),require("../list-nav/index.umd.js"),require("../list-view/index.umd.js"),require("../lookup/index.umd.js"),require("../nav/index.umd.js"),require("../number-spinner/index.umd.js"),require("../number-range/index.umd.js"),require("../order/index.umd.js"),require("../page-header/index.umd.js"),require("../page-footer/index.umd.js"),require("../pagination/index.umd.js"),require("../progress/index.umd.js"),require("../query-solution/index.umd.js"),require("../radio-group/index.umd.js"),require("../rate/index.umd.js"),require("../response-toolbar/index.umd.js"),require("../response-layout/index.umd.js"),require("../response-layout-editor/index.umd.js"),require("../search-box/index.umd.js"),require("../section/index.umd.js"),require("../smoke-detector/index.umd.js"),require("../splitter/index.umd.js"),require("../step/index.umd.js"),require("../switch/index.umd.js"),require("../tabs/index.umd.js"),require("../tags/index.umd.js"),require("../text/index.umd.js"),require("../time-picker/index.umd.js"),require("../transfer/index.umd.js"),require("../tree-view/index.umd.js"),require("../uploader/index.umd.js"),require("../verify-detail/index.umd.js"),require("../weather/index.umd.js"),require("../component/index.umd.js"),require("../video/index.umd.js"),require("../textarea/index.umd.js"),require("../tree-grid/index.umd.js"),require("../common/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../accordion/index.umd.js","../avatar/index.umd.js","../button-edit/index.umd.js","../button-group/index.umd.js","../calendar/index.umd.js","../capsule/index.umd.js","../checkbox/index.umd.js","../color-picker/index.umd.js","../combo-list/index.umd.js","../content-container/index.umd.js","../data-grid/index.umd.js","../date-picker/index.umd.js","../dropdown/index.umd.js","../dynamic-form/index.umd.js","../external-container/index.umd.js","../events-editor/index.umd.js","../filter-bar/index.umd.js","../image-cropper/index.umd.js","../input-group/index.umd.js","../layout/index.umd.js","../list-nav/index.umd.js","../list-view/index.umd.js","../lookup/index.umd.js","../nav/index.umd.js","../number-spinner/index.umd.js","../number-range/index.umd.js","../order/index.umd.js","../page-header/index.umd.js","../page-footer/index.umd.js","../pagination/index.umd.js","../progress/index.umd.js","../query-solution/index.umd.js","../radio-group/index.umd.js","../rate/index.umd.js","../response-toolbar/index.umd.js","../response-layout/index.umd.js","../response-layout-editor/index.umd.js","../search-box/index.umd.js","../section/index.umd.js","../smoke-detector/index.umd.js","../splitter/index.umd.js","../step/index.umd.js","../switch/index.umd.js","../tabs/index.umd.js","../tags/index.umd.js","../text/index.umd.js","../time-picker/index.umd.js","../transfer/index.umd.js","../tree-view/index.umd.js","../uploader/index.umd.js","../verify-detail/index.umd.js","../weather/index.umd.js","../component/index.umd.js","../video/index.umd.js","../textarea/index.umd.js","../tree-grid/index.umd.js","../common/index.umd.js"],c):(v=typeof globalThis<"u"?globalThis:v||self,c(v["designer-canvas"]={},v.Vue,v.LodashES,v.FAccordion,v.FAvatar,v.FButtonEdit,v.FButtonGroup,v.FCalendar,v.FCapsule,v.FCheckbox,v.FColorPicker,v.FComboList,v.FContentContainer,v.FDataGrid,v.FDatePicker,v.FDropdown,v.FDynamicForm,v.FExteranlContainer,v.FEventsEditor,v.FFilterBar,v.FImageCropper,v.FInputGroup,v.FLayout,v.FListNav,v.FListView,v.FLookup,v.FNav,v.FNumberSpinner,v.FNumberRange,v.FOrder,v.FPageHeader,v.FPageFooter,v.FPagination,v.FProgress,v.FQuerySolution,v.FRadioGroup,v.FRate,v.FResponseToolbar,v.FResponseLayout,v.FResponseLayoutEditorSetting,v.FSearchBox,v.FSection,v.FSmokeDetector,v.FSplitter,v.FStep,v.FSwitch,v.FTab,v.FTags,v.FText,v.FTimePicker,v.FTransfer,v.FTreeview,v.FUploader,v.FVerifyDetail,v.FWeather,v.FComponent,v.FVideo,v.FTextArea,v.FTreeGrid,v.common))})(this,function(v,c,ve,Ge,ze,Je,Qe,Ke,Ze,Re,en,nn,tn,rn,on,an,cn,sn,un,ln,dn,fn,pn,mn,vn,gn,hn,yn,Cn,xn,Dn,wn,jn,Sn,Tn,bn,En,Nn,Fn,Pn,In,qn,An,Mn,Bn,kn,Vn,On,_n,Ln,$n,Un,Hn,Xn,Wn,Yn,Gn,zn,Jn,ye){"use strict";const pe=c.ref(0);function Qn(I,s){const n=s.getBoundingClientRect(),j=I.getBoundingClientRect(),P=j.top>=n.top,l=j.top<=n.bottom;return P&&l}function Fe(I){if(!I)return;let s;if(I.className.includes("dgComponentSelected")?s=I:s=I.querySelector(".dgComponentSelected"),!s)return;const n=s.getBoundingClientRect();if(n.width===0&&n.height===0)return;const j=s.querySelector(".component-btn-group");if(j){if(!Qn(s,I)){j.style.display="none";return}j.style.display="";const l=j.getBoundingClientRect(),m=j.querySelector("div");if(m){const D=m.getBoundingClientRect();m.style.top=l.top+"px",m.style.left=l.left-D.width+"px"}}}const Pe={modelValue:{type:Object,default:{}},componentId:{type:String,default:""}};var ce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Kn(I){return I&&I.__esModule&&Object.prototype.hasOwnProperty.call(I,"default")?I.default:I}function ge(I){throw new Error('Could not dynamically require "'+I+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ie={exports:{}};(function(I,s){(function(n){I.exports=n()})(function(){return function(){function n(j,P,l){function m(B,k){if(!P[B]){if(!j[B]){var d=typeof ge=="function"&≥if(!k&&d)return d(B,!0);if(D)return D(B,!0);var x=new Error("Cannot find module '"+B+"'");throw x.code="MODULE_NOT_FOUND",x}var u=P[B]={exports:{}};j[B][0].call(u.exports,function(t){var r=j[B][1][t];return m(r||t)},u,u.exports,n,j,P,l)}return P[B].exports}for(var D=typeof ge=="function"&&ge,p=0;p<l.length;p++)m(l[p]);return m}return n}()({1:[function(n,j,P){var l={},m="(?:^|\\s)",D="(?:\\s|$)";function p(d){var x=l[d];return x?x.lastIndex=0:l[d]=x=new RegExp(m+d+D,"g"),x}function B(d,x){var u=d.className;u.length?p(x).test(u)||(d.className+=" "+x):d.className=x}function k(d,x){d.className=d.className.replace(p(x)," ").trim()}j.exports={add:B,rm:k}},{}],2:[function(n,j,P){(function(l){var m=n("contra/emitter"),D=n("crossvent"),p=n("./classes"),B=document,k=B.documentElement;function d(o,H){var Y=arguments.length;Y===1&&Array.isArray(o)===!1&&(H=o,o=[]);var a,b,F,G,J,Q,ee,_,te,re=null,le,$,de=!1,fe=0,K,q=H||{};q.moves===void 0&&(q.moves=M),q.accepts===void 0&&(q.accepts=M),q.invalid===void 0&&(q.invalid=vt),q.containers===void 0&&(q.containers=o||[]),q.isContainer===void 0&&(q.isContainer=g),q.copy===void 0&&(q.copy=!1),q.copySortSource===void 0&&(q.copySortSource=!1),q.revertOnSpill===void 0&&(q.revertOnSpill=!1),q.removeOnSpill===void 0&&(q.removeOnSpill=!1),q.direction===void 0&&(q.direction="vertical"),q.ignoreInputTextSelection===void 0&&(q.ignoreInputTextSelection=!0),q.mirrorContainer===void 0&&(q.mirrorContainer=B.body);var z=m({containers:q.containers,start:mt,end:_e,cancel:He,remove:Ue,destroy:lt,canMove:pt,dragging:!1});return q.removeOnSpill===!0&&z.on("over",ht).on("out",yt),Be(),z;function Ce(e){return z.containers.indexOf(e)!==-1||q.isContainer(e)}function Be(e){var f=e?"remove":"add";t(k,f,"mousedown",dt),t(k,f,"mouseup",we)}function xe(e){var f=e?"remove":"add";t(k,f,"mousemove",ft)}function ke(e){var f=e?"remove":"add";D[f](k,"selectstart",Ve),D[f](k,"click",Ve)}function lt(){Be(!0),we({})}function Ve(e){le&&e.preventDefault()}function dt(e){G=e.clientX,J=e.clientY;var f=r(e)!==1||e.metaKey||e.ctrlKey;if(!f){var h=e.target,A=De(h);A&&(le=A,xe(),e.type==="mousedown"&&(i(h)?h.focus():e.preventDefault()))}}function ft(e){if(le){if(r(e)===0){we({});return}if(!(e.clientX!==void 0&&Math.abs(e.clientX-G)<=(q.slideFactorX||0)&&e.clientY!==void 0&&Math.abs(e.clientY-J)<=(q.slideFactorY||0))){if(q.ignoreInputTextSelection){var f=L("clientX",e)||0,h=L("clientY",e)||0,A=B.elementFromPoint(f,h);if(i(A))return}var X=le;xe(!0),ke(),_e(),Oe(X),p.add(_||F,"gu-transit"),xt(),Ct(),fe=0,Te(e)}}}function De(e){if(!(z.dragging&&a)&&!Ce(e)){for(var f=e;w(e)&&Ce(w(e))===!1;)if(q.invalid(e,f)||(e=w(e),!e))return;var h=w(e);if(h&&!q.invalid(e,f)){var A=q.moves(e,h,f,C(e));if(A)return{item:e,source:h}}}}function pt(e){return!!De(e)}function mt(e){var f=De(e);f&&Oe(f)}function Oe(e){Nt(e.item,e.source)&&(_=e.item.cloneNode(!0),z.emit("cloned",_,e.item,"copy")),b=e.source,F=e.item,Q=ee=C(e.item),z.dragging=!0,z.emit("drag",F,b)}function vt(){return!1}function _e(){if(z.dragging){var e=_||F;$e(e,w(e))}}function Le(){le=!1,xe(!0),ke(!0)}function we(e){if(Le(),!!z.dragging){var f=_||F,h=L("clientX",e)||0,A=L("clientY",e)||0,X=y(a,h,A),W=Xe(X,h,A);W&&(_&&q.copySortSource||!_||W!==b)?$e(f,W):q.removeOnSpill?Ue():He()}}function $e(e,f){var h=w(e);_&&q.copySortSource&&f===b&&h.removeChild(F),Se(f)?z.emit("cancel",e,b):z.emit("drop",e,f,b,ee),je()}function Ue(){if(z.dragging){var e=_||F,f=w(e);f&&f.removeChild(e),z.emit(_?"cancel":"remove",e,f,b),je()}}function He(e){if(z.dragging){var f=arguments.length>0?e:q.revertOnSpill,h=_||F,A=w(h),X=Se(A);X===!1&&f&&(_?A&&A.removeChild(_):b.insertBefore(h,Q)),X||f?z.emit("cancel",h,b,b):z.emit("drop",h,A,b,ee),je()}}function je(){var e=_||F;Le(),Dt(),wt(),e&&p.rm(e,"gu-transit"),te&&clearTimeout(te),z.dragging=!1,re&&z.emit("out",e,re,b),z.emit("dragend",e,fe),b=F=_=Q=ee=te=re=null}function Se(e,f){var h;return f!==void 0?h=f:a?h=ee:h=C(_||F),e===b&&h===Q}function Xe(e,f,h){for(var A=e;A&&!X();)A=w(A);return A;function X(){var W=Ce(A);if(W===!1)return!1;var ae=We(A,e),ne=Ye(A,ae,f,h),ie=Se(A,ne);return ie?!0:q.accepts(F,A,b,ne)}}function Te(e){if(!a)return;e.preventDefault();var f=L("clientX",e)||0,h=L("clientY",e)||0;a.style.left=f-2+"px",a.style.top=h-2+"px";var A=_||F,X=y(a,f,h),W=Xe(X,f,h),ae=W!==null&&W!==re;(ae||W===null)&&(oe(),re=W,ue()),Et(X,h);var ne=w(A);if(W===b&&_&&!q.copySortSource){ne&&ne.removeChild(A);return}var ie,se=We(W,X);if(de=jt(se,W),se!==null)ie=Ye(W,se,f,h);else if(q.revertOnSpill===!0&&!_)ie=Q,W=b;else{_&&ne&&ne.removeChild(A),_&&$&&($.style.display="none");return}$.style.display="block",gt(ie,A,ae),ie?Tt(se,ie):bt(W);function Z(R){z.emit(R,A,re,b)}function ue(){ae&&Z("over")}function oe(){re&&Z("out")}}function gt(e,f,h){(e===f||e===C(f))&&(ee=C(f)),(e===null&&h||e!==f&&e!==C(f))&&(ee=e)}function ht(e){p.rm(e,"gu-hide")}function yt(e){z.dragging&&p.add(e,"gu-hide")}function Ct(){a||(a=document.createElement("div"),a.style="background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;",a.innerHTML=q.getMirrorText&&q.getMirrorText(F)||"控件",p.add(a,"gu-mirror"),q.mirrorContainer.appendChild(a),t(k,"add","mousemove",Te),p.add(q.mirrorContainer,"gu-unselectable"),z.emit("cloned",a,F,"mirror"))}function xt(){if($=document.createElement("div"),p.add($,"gu-insertion"),F){var e=F.getBoundingClientRect();$.style.left=e.left+"px",$.style.top=e.top+"px"}de=!1,q.mirrorContainer.appendChild($)}function Dt(){a&&(p.rm(q.mirrorContainer,"gu-unselectable"),t(k,"remove","mousemove",Te),w(a).removeChild(a),a=null)}function wt(){$&&(w($).removeChild($),$=null)}function We(e,f){for(var h=f;h!==e&&w(h)!==e;)h=w(h);return h===k?null:h}function jt(e,f){if(!f)return de;var h=e||f&&f.lastElementChild;if(!h)return!0;var A=getComputedStyle(e),X=/^inline/.test(A.getPropertyValue("display"))||/^(left|right)$/.test(A.getPropertyValue("float"));if(X)return!0;if(f){var W=getComputedStyle(f),ae=W.getPropertyValue("display");if(/flex$/.test(ae)){var ne=W.getPropertyValue("flex-direction")||"row";if(ne==="row"||ne==="row-reverse")return!St(f)}return!1}return!0}function St(e){if(!e.children||!e.children.length)return!1;for(const f of Array.from(e.children)){const A=(f.className&&f.className.split(" ")||[]).filter(X=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test(X));if(!A.length)return!1;for(const X of A){const W=X.slice(X.lastIndexOf("-")+1);if(parseInt(W,10)!==12)return!1}}return!0}function Tt(e,f){const h=f.getBoundingClientRect();if($.style.left=h.left+"px",$.style.top=h.top+"px",de){if($.style.height=h.height+"px",$.style.width="4px",e){const A=e.getBoundingClientRect();A.top!==h.top&&($.style.left=A.right+"px",$.style.top=A.top+"px",$.style.height=A.height+"px")}}else if($.style.height="4px",$.style.width=h.width+"px",K){const A=K.getBoundingClientRect();h.top<A.top&&($.style.display="none")}f===F&&F&&($.style.display="none")}function bt(e){ee=null;var f=e.lastElementChild;if(f){var h=f.getBoundingClientRect();de?($.style.left=h.right+"px",$.style.top=h.top+"px",$.style.height=h.height+"px",$.style.width="4px"):($.style.left=h.left+"px",$.style.top=h.bottom+"px",$.style.height="4px",$.style.width=h.width+"px"),f===F&&F&&($.style.display="none")}else $.style.display="none"}function Et(e,f){if(!q.mirrorContainer.contains(e)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(K=x(e),!K||!K.contains(e)))return;const h=document.querySelector(".dgComponentSelected"),A=K.getBoundingClientRect();if(f-30<A.top&&K.scrollTop>0){let X=K.scrollTop<10?K.scrollTop:10;K.scrollBy(0,-1*X),h&&K.contains(h)&&(fe=fe+-1*X)}if(f+30>A.bottom&&K.scrollTop<K.scrollHeight-K.clientHeight){const X=K.scrollHeight-K.clientHeight-K.scrollTop;let W=X<10?X:10;K.scrollBy(0,W),h&&K.contains(h)&&(fe=fe+W)}}function Ye(e,f,h,A){var X=q.direction==="horizontal",W=q.direction==="mixed",ae=f!==e?ie():ne();return ae;function ne(){var Z=e.children.length,ue,oe,R;for(ue=0;ue<Z;ue++)if(oe=e.children[ue],R=oe.getBoundingClientRect(),X&&R.left+R.width/2>h||!W&&!X&&R.top+R.height/2>A||W&&R.left+R.width>h&&R.top+R.height>A)return oe;return null}function ie(){var Z=f.getBoundingClientRect();if(W){var ue=A-Z.top,oe=h-Z.left,R=Z.bottom-A,be=Z.right-h,Ee=Math.min(oe,be,ue,R),Ne;return de?Ne=be<oe:Ne=R===Ee||be===Ee||oe===Ee,se(Ne)}return se(X?h>Z.left+O(Z)/2:A>Z.top+V(Z)/2)}function se(Z){return Z?C(f):f}}function Nt(e,f){return typeof q.copy=="boolean"?q.copy:q.copy(e,f)}}function x(o){const H=Array.from(window.scrollContainerList);if(H.length===1){const a=Array.from(window.scrollContainerList)[0];return document.getElementById(a)}const Y=u(H);for(const a of Y)if(a.contains(o))return a;return null}function u(o){const H=[];return o.forEach(Y=>{const a=document.getElementById(Y);a&&H.push(a)}),H.sort((Y,a)=>Y.contains(a)?1:a.contains(Y)?-1:0),H}function t(o,H,Y,a){var b={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},F={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},G={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};l.navigator.pointerEnabled?D[H](o,F[Y],a):l.navigator.msPointerEnabled?D[H](o,G[Y],a):(D[H](o,b[Y],a),D[H](o,Y,a))}function r(o){if(o.touches!==void 0)return o.touches.length;if(o.which!==void 0&&o.which!==0)return o.which;if(o.buttons!==void 0)return o.buttons;var H=o.button;if(H!==void 0)return H&1?1:H&2?3:H&4?2:0}function y(o,H,Y){o=o||{};var a=o.className||"",b;return o.className+=" gu-hide",b=B.elementFromPoint(H,Y),o.className=a,b}function g(){return!1}function M(){return!0}function O(o){return o.width||o.right-o.left}function V(o){return o.height||o.bottom-o.top}function w(o){return o.parentNode===B?null:o.parentNode}function i(o){return o.tagName==="INPUT"||o.tagName==="TEXTAREA"||o.tagName==="SELECT"||E(o)}function E(o){return!o||o.contentEditable==="false"?!1:o.contentEditable==="true"?!0:E(w(o))}function C(o){return o.nextElementSibling||H();function H(){var Y=o;do Y=Y.nextSibling;while(Y&&Y.nodeType!==1);return Y}}function U(o){return o.targetTouches&&o.targetTouches.length?o.targetTouches[0]:o.changedTouches&&o.changedTouches.length?o.changedTouches[0]:o}function L(o,H){var Y=U(H),a={pageX:"clientX",pageY:"clientY"};return o in a&&!(o in Y)&&a[o]in Y&&(o=a[o]),Y[o]}j.exports=d}).call(this,typeof ce<"u"?ce:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(n,j,P){j.exports=function(m,D){return Array.prototype.slice.call(m,D)}},{}],4:[function(n,j,P){var l=n("ticky");j.exports=function(D,p,B){D&&l(function(){D.apply(B||null,p||[])})}},{ticky:10}],5:[function(n,j,P){var l=n("atoa"),m=n("./debounce");j.exports=function(p,B){var k=B||{},d={};return p===void 0&&(p={}),p.on=function(x,u){return d[x]?d[x].push(u):d[x]=[u],p},p.once=function(x,u){return u._once=!0,p.on(x,u),p},p.off=function(x,u){var t=arguments.length;if(t===1)delete d[x];else if(t===0)d={};else{var r=d[x];if(!r)return p;r.splice(r.indexOf(u),1)}return p},p.emit=function(){var x=l(arguments);return p.emitterSnapshot(x.shift()).apply(this,x)},p.emitterSnapshot=function(x){var u=(d[x]||[]).slice(0);return function(){var t=l(arguments),r=this||p;if(x==="error"&&k.throws!==!1&&!u.length)throw t.length===1?t[0]:t;return u.forEach(function(g){k.async?m(g,t,r):g.apply(r,t),g._once&&p.off(x,g)}),p}},p}},{"./debounce":4,atoa:3}],6:[function(n,j,P){(function(l){var m=n("custom-event"),D=n("./eventmap"),p=l.document,B=x,k=t,d=[];l.addEventListener||(B=u,k=r),j.exports={add:B,remove:k,fabricate:y};function x(w,i,E,C){return w.addEventListener(i,E,C)}function u(w,i,E){return w.attachEvent("on"+i,M(w,i,E))}function t(w,i,E,C){return w.removeEventListener(i,E,C)}function r(w,i,E){var C=O(w,i,E);if(C)return w.detachEvent("on"+i,C)}function y(w,i,E){var C=D.indexOf(i)===-1?L():U();w.dispatchEvent?w.dispatchEvent(C):w.fireEvent("on"+i,C);function U(){var o;return p.createEvent?(o=p.createEvent("Event"),o.initEvent(i,!0,!0)):p.createEventObject&&(o=p.createEventObject()),o}function L(){return new m(i,{detail:E})}}function g(w,i,E){return function(U){var L=U||l.event;L.target=L.target||L.srcElement,L.preventDefault=L.preventDefault||function(){L.returnValue=!1},L.stopPropagation=L.stopPropagation||function(){L.cancelBubble=!0},L.which=L.which||L.keyCode,E.call(w,L)}}function M(w,i,E){var C=O(w,i,E)||g(w,i,E);return d.push({wrapper:C,element:w,type:i,fn:E}),C}function O(w,i,E){var C=V(w,i,E);if(C){var U=d[C].wrapper;return d.splice(C,1),U}}function V(w,i,E){var C,U;for(C=0;C<d.length;C++)if(U=d[C],U.element===w&&U.type===i&&U.fn===E)return C}}).call(this,typeof ce<"u"?ce:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(n,j,P){(function(l){var m=[],D="",p=/^on/;for(D in l)p.test(D)&&m.push(D.slice(2));j.exports=m}).call(this,typeof ce<"u"?ce:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(n,j,P){(function(l){var m=l.CustomEvent;function D(){try{var p=new m("cat",{detail:{foo:"bar"}});return p.type==="cat"&&p.detail.foo==="bar"}catch{}return!1}j.exports=D()?m:typeof document<"u"&&typeof document.createEvent=="function"?function(B,k){var d=document.createEvent("CustomEvent");return k?d.initCustomEvent(B,k.bubbles,k.cancelable,k.detail):d.initCustomEvent(B,!1,!1,void 0),d}:function(B,k){var d=document.createEventObject();return d.type=B,k?(d.bubbles=!!k.bubbles,d.cancelable=!!k.cancelable,d.detail=k.detail):(d.bubbles=!1,d.cancelable=!1,d.detail=void 0),d}}).call(this,typeof ce<"u"?ce:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(n,j,P){var l=j.exports={},m,D;function p(){throw new Error("setTimeout has not been defined")}function B(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?m=setTimeout:m=p}catch{m=p}try{typeof clearTimeout=="function"?D=clearTimeout:D=B}catch{D=B}})();function k(V){if(m===setTimeout)return setTimeout(V,0);if((m===p||!m)&&setTimeout)return m=setTimeout,setTimeout(V,0);try{return m(V,0)}catch{try{return m.call(null,V,0)}catch{return m.call(this,V,0)}}}function d(V){if(D===clearTimeout)return clearTimeout(V);if((D===B||!D)&&clearTimeout)return D=clearTimeout,clearTimeout(V);try{return D(V)}catch{try{return D.call(null,V)}catch{return D.call(this,V)}}}var x=[],u=!1,t,r=-1;function y(){!u||!t||(u=!1,t.length?x=t.concat(x):r=-1,x.length&&g())}function g(){if(!u){var V=k(y);u=!0;for(var w=x.length;w;){for(t=x,x=[];++r<w;)t&&t[r].run();r=-1,w=x.length}t=null,u=!1,d(V)}}l.nextTick=function(V){var w=new Array(arguments.length-1);if(arguments.length>1)for(var i=1;i<arguments.length;i++)w[i-1]=arguments[i];x.push(new M(V,w)),x.length===1&&!u&&k(g)};function M(V,w){this.fun=V,this.array=w}M.prototype.run=function(){this.fun.apply(null,this.array)},l.title="browser",l.browser=!0,l.env={},l.argv=[],l.version="",l.versions={};function O(){}l.on=O,l.addListener=O,l.once=O,l.off=O,l.removeListener=O,l.removeAllListeners=O,l.emit=O,l.prependListener=O,l.prependOnceListener=O,l.listeners=function(V){return[]},l.binding=function(V){throw new Error("process.binding is not supported")},l.cwd=function(){return"/"},l.chdir=function(V){throw new Error("process.chdir is not supported")},l.umask=function(){return 0}},{}],10:[function(n,j,P){(function(l){var m=typeof l=="function",D;m?D=function(p){l(p)}:D=function(p){setTimeout(p,0)},j.exports=D}).call(this,n("timers").setImmediate)},{timers:11}],11:[function(n,j,P){(function(l,m){var D=n("process/browser.js").nextTick,p=Function.prototype.apply,B=Array.prototype.slice,k={},d=0;P.setTimeout=function(){return new x(p.call(setTimeout,window,arguments),clearTimeout)},P.setInterval=function(){return new x(p.call(setInterval,window,arguments),clearInterval)},P.clearTimeout=P.clearInterval=function(u){u.close()};function x(u,t){this._id=u,this._clearFn=t}x.prototype.unref=x.prototype.ref=function(){},x.prototype.close=function(){this._clearFn.call(window,this._id)},P.enroll=function(u,t){clearTimeout(u._idleTimeoutId),u._idleTimeout=t},P.unenroll=function(u){clearTimeout(u._idleTimeoutId),u._idleTimeout=-1},P._unrefActive=P.active=function(u){clearTimeout(u._idleTimeoutId);var t=u._idleTimeout;t>=0&&(u._idleTimeoutId=setTimeout(function(){u._onTimeout&&u._onTimeout()},t))},P.setImmediate=typeof l=="function"?l:function(u){var t=d++,r=arguments.length<2?!1:B.call(arguments,1);return k[t]=!0,D(function(){k[t]&&(r?u.apply(null,r):u.call(null),P.clearImmediate(t))}),t},P.clearImmediate=typeof m=="function"?m:function(u){delete k[u]}}).call(this,n("timers").setImmediate,n("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(Ie);var Zn=Ie.exports;const qe=Kn(Zn);function Rn(I){let s;function n(t,r,y){const g={};return g.sourceElement=t,g.sourceContainer=y,g.targetContainer=r,g.sourceType=t.getAttribute("data-sourceType")||"move",g.controlType=t.getAttribute("data-controlType"),g.controlTypeName=t.getAttribute("data-controlTypeName"),g.controlCategory=t.getAttribute("data-category"),g.controlFeature=t.getAttribute("data-feature"),g.parentComponentInstance=r.componentInstance,g.controlCategory==="input"?g.bindingType="field":g.controlCategory==="dataCollection"&&(g.bindingType="entity"),t.componentInstance&&(g.controlType=t.componentInstance.value.schema.type,g.controlCategory=t.componentInstance.value.schema.category),g}function j(t,r,y){if(t.contains(r)||r.classList.contains("no-drop"))return!1;const g=!0;if(t.componentInstance&&t.componentInstance.value.getDragScopeElement){const M=t.componentInstance.value.getDragScopeElement();if(M&&!M.contains(r))return!1}if(r.componentInstance&&r.componentInstance.value.canAccepts){const M=n(t,r,y);return r.componentInstance.value.canAccepts(M)}return g}function P(t,r){const y=r.getBoundingClientRect(),g=t.getBoundingClientRect(),M=g.top>=y.top,O=g.top<y.bottom;return M&&O}function l(t,r){const y=t.querySelector(".dgComponentSelected");if(!(!y||r===0)&&P(y,t)){const g=y.querySelector(".component-btn-group");if(g){const M=g.querySelector("div");if(M&&M.style.top){const O=Number.parseFloat(M.style.top);M.style.top=O-r+"px"}}}}function m(t,r,y){t.componentInstance;let g=-1;if(!r)return-1;if(t.componentInstance.value.contents){if(y&&y.componentInstance){if(y.getAttribute("data-noattach"))g=Number(y.getAttribute("data-position"));else{const M=y.componentInstance.value.schema;let O={id:M.id};M.type==="Component"&&(O={component:M.id}),g=ve.findIndex(t.componentInstance.value.contents,O),g=g===-1?0:g}g!==-1&&t.componentInstance.value.contents.splice(g,0,r)}else t.componentInstance.value.contents.push(r);t.componentInstance.value.updateDragAndDropRules()}return g}function D(t,r){if(!t.componentInstance.value.contents)return-1;if(t.componentInstance.value.contents.length===0)return 0;if(!r||!r.componentInstance)return t.componentInstance.value.contents.length;if(r.getAttribute("data-noattach"))return Number(r.getAttribute("data-position"));const y=r.componentInstance.value.schema;let g;y.type==="Component"?g={component:y.id}:g={id:y.id};let M=ve.findIndex(t.componentInstance.value.contents,g);return M=M===-1?0:M,M}function p(t,r,y,g){if(r.componentInstance.value.addNewChildComponentSchema){const M=D(r,g),O=String(t.getAttribute("data-controltype")),V=t.getAttribute("data-feature"),w=String(t.innerText),i=r.componentInstance.value,E={componentType:O,label:w,parentComponentInstance:i,targetPosition:M},C=V?JSON.parse(V):{},U=Object.assign(E,C),L=r.componentInstance.value.addNewChildComponentSchema(U,I);m(r,L,g)}r.contains(t)&&r.removeChild(t)}function B(t,r,y,g){let M,O=-1;if(t.componentInstance&&t.componentInstance.value.triggerBelongedComponentToMoveWhenMoved){const i=t.componentInstance.value.getBelongedComponentInstance(t.componentInstance);i&&(t=c.ref(i.elementRef).value.parentElement,y=t.parentElement)}const V=t.componentInstance&&t.componentInstance.value.schema;let w={id:V&&V.id};V.type==="component"&&(w={component:V&&V.id}),O=ve.findIndex(y.componentInstance.value.contents,w),O!==-1&&y.componentInstance.value.contents&&(M=y.componentInstance.value.contents.splice(O,1),M=M[0]),m(r,M,g),y.componentInstance&&y.componentInstance.value.onChildElementMovedOut&&y.componentInstance.value.onChildElementMovedOut(t),r.componentInstance&&r.componentInstance.value.onAcceptMovedChildElement&&r.componentInstance.value.onAcceptMovedChildElement(t,y)}function k(t,r,y,g){if(!r||t.contains(r))return;switch(t.getAttribute("data-sourceType")){case"control":case"field":case"entity":{p(t,r,y,g);break}default:y.componentInstance.value.contents?B(t,r,y,g):r.contains(t)&&r.removeChild(t)}pe.value++}function d(t){s&&s.destroy(),qe&&(s=qe([],{mirrorContainer:t,direction:"mixed",revertOnSpill:!0,moves(r,y,g){let M=!0;return r.classList.contains("no-drag")&&(M=!1),r.componentInstance&&(M=!!g.getAttribute("data-dragging-icon")),M},copy(r){return r.classList.contains("drag-copy")},getMirrorText(r){return r.componentInstance&&r.componentInstance.value.getDraggingDisplayText?r.componentInstance.value.getDraggingDisplayText():r.innerText||"控件"},accepts(r,y,g){const M=j(r,y,g),O=t.lastElementChild;return M?O.className=O.className.replace("undroppable",""):O.className.includes("undroppable")||(O.className+=" undroppable"),M}}).on("over",(r,y)=>{y.className+=" drag-over"}).on("out",(r,y)=>{y.className=y.className.replace("drag-over","").replace(" ","")}).on("drop",(r,y,g,M)=>{k(r,y,g,M)}).on("dragend",(r,y)=>{l(r,y)}))}function x(t,r){if(!t)return;if(r.noDragDrop)return t;const y=t.querySelector(`[data-dragref='${r.id}-container']`)||t;s&&y&&s.containers.push(y)}function u(){if(!s)return;const t=document.getElementsByClassName("controlCategory");t&&(s.containers=s.containers.filter(r=>!r.className.includes("controlCategory")),Array.from(t).forEach(r=>{s.containers.push(r)}))}return{attachComponents:x,attachToolbox:u,initializeDragula:d}}const et={id:{type:String,default:""},componentId:{type:String,default:""},type:{type:String,default:""},canDelete:{type:Boolean,default:!0},canMove:{type:Boolean,default:!0},canSelectParent:{type:Boolean,default:!0},customButtons:{type:Array,default:[]},customClass:{type:String,default:""},customStyle:{type:String,default:""},modelValue:{type:Object},ignore:{type:Boolean,default:!1}},S={},T={},N={};let Ae=!1;function nt(){Ae||(Ae=!0,ze.registerDesigner(S,T,N),Ge.registerDesigner(S,T,N),Je.registerDesigner(S,T,N),Qe.registerDesigner(S,T,N),Ke.registerDesigner(S,T,N),Ze.registerDesigner(S,T,N),Re.registerDesigner(S,T,N),en.registerDesigner(S,T,N),nn.registerDesigner(S,T,N),tn.registerDesigner(S,T,N),rn.registerDesigner(S,T,N),on.registerDesigner(S,T,N),an.registerDesigner(S,T,N),cn.registerDesigner(S,T,N),un.registerDesigner(S,T,N),sn.registerDesigner(S,T),ln.registerDesigner(S,T,N),dn.registerDesigner(S,T,N),fn.registerDesigner(S,T,N),pn.registerDesigner(S,T,N),vn.registerDesigner(S,T,N),mn.registerDesigner(S,T,N),hn.registerDesigner(S,T,N),gn.registerDesigner(S,T,N),Cn.registerDesigner(S,T,N),yn.registerDesigner(S,T,N),xn.registerDesigner(S,T,N),Dn.registerDesigner(S,T,N),wn.registerDesigner(S,T,N),jn.registerDesigner(S,T,N),Sn.registerDesigner(S,T,N),Tn.registerDesigner(S,T,N),bn.registerDesigner(S,T,N),Fn.registerDesigner(S,T,N),Pn.registerDesigner(S,T,N),Nn.registerDesigner(S,T,N),En.registerDesigner(S,T,N),In.registerDesigner(S,T,N),qn.registerDesigner(S,T,N),An.registerDesigner(S,T,N),Mn.registerDesigner(S,T,N),Bn.registerDesigner(S,T,N),kn.registerDesigner(S,T,N),Vn.registerDesigner(S,T,N),On.registerDesigner(S,T,N),_n.registerDesigner(S,T,N),Wn.registerDesigner(S,T,N),Ln.registerDesigner(S,T,N),$n.registerDesigner(S,T,N),Un.registerDesigner(S,T,N),Hn.registerDesigner(S,T,N),Xn.registerDesigner(S,T,N),Yn.registerDesigner(S,T),Gn.registerDesigner(S,T,N),zn.registerDesigner(S,T,N),Jn.registerDesigner(S,T,N))}const tt={id:{type:String}},rt=c.defineComponent({name:"FDesignerPlaceholder",props:tt,emits:[],setup(I){const s=c.computed(()=>({"drag-and-drop-alert":!0,"no-drag":!0,"w-100":!0})),n=c.computed(()=>({height:"60px",display:"flex","justify-content":"center","align-items":"center",margin:0,padding:".75rem 1.25rem",border:"1px solid transparent","border-radius":"3px",color:"#315585","background-color":"#dfedff","border-color":"#d2e6ff"}));return()=>c.createVNode("div",{class:s.value,style:n.value,role:"alert","data-noattach":"true","data-position":"0"},[c.createTextVNode("拖拽组件到这里")])}});function ot(I){return typeof I=="function"||Object.prototype.toString.call(I)==="[object Object]"&&!c.isVNode(I)}const he=c.defineComponent({name:"FDesignerItem",props:et,emits:["selectionChange"],setup(I,s){const n=c.ref(`${I.modelValue.id}-component`),j=c.ref(I.canMove),P=c.ref(I.canDelete),l=c.ref(!1),m=c.ref(I.modelValue),D=c.ref(I.componentId||""),p=c.ref(""),B=c.ref(""),k=c.ref(I.customClass),d=c.ref(),x=c.inject("canvas-dragula"),u=c.ref(),t=c.inject("design-item-context"),r={designerItemElementRef:d,componentInstance:u,schema:m.value,parent:t,setupContext:s};c.provide("design-item-context",r);const y=c.inject("useFormSchema"),g=c.computed(()=>{const a=I.modelValue.appearance&&I.modelValue.appearance.class||"";let b={"farris-component":!0,"flex-fill":m.value.id=="root-component","position-relative":j.value&&P.value,"farris-nested":l.value,"can-move":j.value,"d-none":d.value&&d.value.classList.contains("d-none"),dgComponentSelected:d.value&&d.value.classList.contains("dgComponentSelected"),dgComponentFocused:d.value&&d.value.classList.contains("dgComponentFocused")};return b[`farris-component-${m.value.type}`]=!0,b=ye.getCustomClass(b,a),b=ye.getCustomClass(b,B.value),b=ye.getCustomClass(b,k.value),b}),M=c.computed(()=>{const a={},b=I.modelValue.appearance&&I.modelValue.appearance.style||"";return b&&b.split(";").reduce((F,G)=>{const[J,Q]=G.split(":");return F[J]=Q,F},a),p.value&&p.value.split(";").reduce((F,G)=>{const[J,Q]=G.split(":");return J&&(F[J]=Q),F},a),a});function O(a,b){var J,Q,ee;if(a&&(a.preventDefault(),a.stopPropagation()),u.value.triggerBelongedComponentToDeleteWhenDeleted){const _=u.value.getBelongedComponentInstance(u);if(_&&_.parent){const te=c.ref(_==null?void 0:_.parent),re=te.value.contents.findIndex(le=>le.id===_.schema.id);(Q=(J=te.value)==null?void 0:J.contents)==null||Q.splice(re,1),(ee=te.value)==null||ee.updateDragAndDropRules(),pe.value++}return}let F=t,G=_=>_.id===b.id;if(b.type==="component"&&(F=t==null?void 0:t.parent,G=_=>_.component===b.id),F&&F.schema.contents){const _=F.schema.contents.findIndex(G);F.schema.contents.splice(_,1),F.componentInstance.value.updateDragAndDropRules(),pe.value++,s.emit("selectionChange")}}function V(a){return P.value&&c.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeComponent",onClick:b=>{O(b,a)}},[c.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)])}function w(){return j.value&&c.createVNode("div",{role:"button",class:"btn component-settings-button",title:"移动",ref:"moveComponent"},[c.createVNode("i",{"data-dragging-icon":"true",class:"cmp_move f-icon f-icon-yxs_move"},null)])}function i(){return I.customButtons&&!!I.customButtons.length&&I.customButtons.map(a=>c.createVNode("div",{role:"button",class:`btn component-settings-button ${a.class||""}`,title:a.title,ref:a.id},[c.createVNode("i",{class:a.icon},null)]))}function E(a){return c.createVNode("div",{class:"component-btn-group","data-noattach":"true"},[c.createVNode("div",null,[V(a),w(),i()])])}function C(a,b,F,G){s.emit("selectionChange",a,b,F,G)}function U(a){let b;const F=a.type,G=S[F],J=T[F],Q=J?J(a):{};Q.customClass=I.ignore?Q.customClass:"",Q.componentId=D.value;const ee=a.contents&&a.contents.length===0;return a.contents&&!!a.contents.length&&G?c.createVNode(G,c.mergeProps({ref:u},Q),ot(b=a.contents.map(te=>c.createVNode(he,{key:te.id,modelValue:te,"onUpdate:modelValue":re=>te=re,componentId:D.value,onSelectionChange:C},null)))?b:{default:()=>[b]}):G?ee?c.createVNode(G,c.mergeProps({ref:u},Q),{default:()=>[c.createVNode(rt,null,null)]}):c.createVNode(G,c.mergeProps({ref:u},Q),null):c.createVNode("div",null,null)}function L(a){if(a.type==="component-ref"){let F=y==null?void 0:y.getFormSchema().module.components.find(G=>G.id===a.component);if(F)return c.createVNode(he,{key:F.id,modelValue:F,"onUpdate:modelValue":G=>F=G,componentId:F.id,onSelectionChange:C},null)}}c.watch(()=>I.modelValue,a=>{m.value=a,n.value=`${a.id}-component`});function o(a){const b=a.target;Fe(b)}function H(){var a,b;(b=(a=m.value)==null?void 0:a.contents)!=null&&b.length&&d.value&&d.value.addEventListener("scroll",o)}c.onMounted(()=>{if(d.value&&u.value&&u.value.schema){const a=d.value.querySelector(`[data-dragref='${u.value.schema.id}-container']`);x&&a&&x.attachComponents(a,m.value),l.value=u.value.canNested!==void 0?u.value.canNested:l.value,P.value=u.value.canDelete!==void 0?u.value.canDelete:P.value,j.value=u.value.canMove!==void 0?u.value.canMove:j.value,p.value=u.value.styles||"",B.value=u.value.designerClass||"",d.value&&(d.value.componentInstance=u,d.value.designItemContext=r)}H(),pe.value++}),c.onBeforeUnmount(()=>{d.value&&d.value.removeEventListener("scroll",o)});function Y(a){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(F=>F.classList.remove("dgComponentFocused")),a&&(a.preventDefault(),a.stopPropagation());const b=d.value;if(b){const F=document.getElementsByClassName("dgComponentSelected");if(!(F&&F.length===1&&F[0]===d.value)&&(Array.from(F).forEach(J=>J.classList.remove("dgComponentSelected")),b.classList.add("dgComponentFocused"),s.emit("selectionChange",m.value.type,m.value,D.value,u.value),u.value.getDraggableDesignItemElement)){const J=u.value.getDraggableDesignItemElement(r);J&&J.value&&J.value.classList.add("dgComponentSelected")}}o(a)}return()=>m.value.type==="component-ref"?L(m.value):c.createVNode("div",{id:`${m.value.id}-design-item`,ref:d,class:g.value,style:M.value,onClick:Y},[E(m.value),U(m.value)])}}),it=c.defineComponent({name:"FDesignerCanvas",props:Pe,emits:["init","selectionChange","canvasChanged"],setup(I,s){const n=c.ref(),j=c.ref(),P=c.ref(),l=c.ref(),m=c.ref(),D=c.ref(I.componentId),p={eventsEditorUtils:c.inject("eventsEditorUtils"),formSchemaUtils:c.inject("useFormSchema"),formMetadataConverter:c.inject("formMetadataConverter"),designViewModelUtils:c.inject("designViewModelUtils"),controlCreatorUtils:c.inject("controlCreatorUtils"),metadataService:c.inject("Meatdata_Http_Service_Token"),schemaService:c.inject("schemaService")};c.provide("designer-host-service",p);const B=Rn(p);nt(),c.provide("canvas-dragula",B),c.provide("design-item-context",{designerItemElementRef:l,componentInstance:m,schema:j.value,parent:void 0});const k=c.computed(()=>({"d-flex":!0,"flex-fill":!0,"flex-column":!0}));c.onMounted(()=>{P.value&&B.initializeDragula(P.value),n.value=I.modelValue,s.emit("init",B)}),c.watch(pe,()=>{Fe(P.value),s.emit("canvasChanged")},{flush:"post"});function d(x,u,t,r){s.emit("selectionChange",x,u,t,r)}return()=>c.createVNode("div",{class:"editorDiv flex-fill h-100"},[c.createVNode("div",{class:"editorPanel d-flex flex-fill flex-column PC"},[c.createVNode("div",{ref:P,class:k.value},[n.value&&c.createVNode(he,{modelValue:n.value,"onUpdate:modelValue":x=>n.value=x,onSelectionChange:d,componentId:D.value},null)])])])}}),at={},ct={};function Me(I){const{properties:s,title:n,ignore:j}=I,P=j&&Array.isArray(j),l=Object.keys(s).reduce((m,D)=>((!P||!j.find(p=>p==D))&&(m[D]=s[D].type==="object"&&s[D].properties?Me(s[D]):ve.cloneDeep(s[D].default)),m),{});return(!P||!j.find(m=>m=="id"))&&(l.id=`${n}-${Date.now()}`),l}function me(I,s={},n){const j=at[I];if(j){let P=Me(j);const l=ct[I];return P=l?l({getSchemaByType:me},P,s,n):P,P}return null}function st(I,s,n){var w;function j(){n!=null&&n.resolveComponentContext&&n.resolveComponentContext()}j();const P=n&&n.getStyles&&n.getStyles()||"",l=n&&n.getDesignerClass&&n.getDesignerClass()||"",m=c.ref();function D(){return(s==null?void 0:s.schema.componentType)==="frame"?!1:n&&n.checkCanMoveComponent?n.checkCanMoveComponent():!0}function p(){return!1}function B(){return(s==null?void 0:s.schema.componentType)==="frame"?!1:n&&n.checkCanDeleteComponent?n.checkCanDeleteComponent():!0}function k(){return(s==null?void 0:s.schema.componentType)==="frame"?!0:n&&n.hideNestedPaddingInDesginerView?n.hideNestedPaddingInDesginerView():!1}function d(i){if(!i||!i.value)return null;if(i.value.schema&&i.value.schema.type==="component")return i.value;const E=c.ref(i==null?void 0:i.value.parent),C=d(E);return C||null}function x(i=s){const{componentInstance:E,designerItemElementRef:C}=i;return!E||!E.value?null:E.value.canMove?C:x(i.parent)}function u(i){return!!n&&n.canAccepts(i)}function t(){return(s==null?void 0:s.schema.label)||(s==null?void 0:s.schema.title)||(s==null?void 0:s.schema.name)}function r(){}function y(i,E){E&&n!=null&&n.onAcceptMovedChildElement&&n.onAcceptMovedChildElement(E)}function g(i,E){const{componentType:C}=i;let U=me(C,i,E);n&&n.onResolveNewComponentSchema&&(U=n.onResolveNewComponentSchema(i,U));const L=C.toLowerCase().replace("-","_");return U&&!U.id&&U.type===C&&(U.id=`${L}_${Math.random().toString().slice(2,6)}`),U}function M(i,E){const C=String(i.getAttribute("data-controltype")),U=i.getAttribute("data-feature"),L=U?JSON.parse(U):{};L.parentComponentInstance=m.value;let o=me(C,L);n&&n.onAcceptNewChildElement&&(o=n.onAcceptNewChildElement(i,E,o));const H=C.toLowerCase().replace("-","_");return o&&!o.id&&o.type===C&&(o.id=`${H}_${Math.random().toString().slice(2,6)}`),o}function O(i){}function V(...i){if(n&&n.getPropsConfig)return n.getPropsConfig(...i)}return m.value={canMove:D(),canSelectParent:p(),canDelete:B(),canNested:!k(),contents:s==null?void 0:s.schema.contents,elementRef:I,parent:(w=s==null?void 0:s.parent)==null?void 0:w.componentInstance,schema:s==null?void 0:s.schema,styles:P,designerClass:l,canAccepts:u,getBelongedComponentInstance:d,getDraggableDesignItemElement:x,getDraggingDisplayText:t,getPropConfig:V,getDragScopeElement:r,onAcceptMovedChildElement:y,onAcceptNewChildElement:M,onChildElementMovedOut:O,addNewChildComponentSchema:g,updateDragAndDropRules:j,triggerBelongedComponentToMoveWhenMoved:!!n&&n.triggerBelongedComponentToMoveWhenMoved||c.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:!!n&&n.triggerBelongedComponentToDeleteWhenDeleted||c.ref(!1)},m}function ut(I,s,n){var w;function j(){n!=null&&n.resolveComponentContext&&n.resolveComponentContext()}j();const P=n&&n.getStyles&&n.getStyles()||"",l=c.ref();function m(){return n&&n.checkCanMoveComponent?n.checkCanMoveComponent():!0}function D(){return!1}function p(){return n&&n.checkCanDeleteComponent?n.checkCanDeleteComponent():!0}function B(){return n&&n.checkCanAddComponent?n.checkCanAddComponent():!0}function k(){return!0}function d(i){if(!i||!i.value)return null;const E=c.ref(i==null?void 0:i.value.parent),C=d(E);return C||null}function x(i=s){const{componentInstance:E,designerItemElementRef:C}=i;return!E||!E.value?null:E.value.canMove||E.value.canAdd||E.value.canDelete?C:x(i.parent)}function u(i){return!!n&&n.canAccepts(i)}function t(){return(s==null?void 0:s.schema.label)||(s==null?void 0:s.schema.title)||(s==null?void 0:s.schema.name)}function r(){}function y(i,E){E&&n!=null&&n.onAcceptMovedChildElement&&n.onAcceptMovedChildElement(E)}function g(i){const{componentType:E}=i;let C=me(E,i);n&&n.onResolveNewComponentSchema&&(C=n.onResolveNewComponentSchema(i,C));const U=E.toLowerCase().replace("-","_");return C&&!C.id&&C.type===E&&(C.id=`${U}_${Math.random().toString().slice(2,6)}`),C}function M(i,E){const C=String(i.getAttribute("data-controltype")),U=i.getAttribute("data-feature"),L=U?JSON.parse(U):{};L.parentComponentInstance=l.value;let o=me(C,L);n&&n.onAcceptNewChildElement&&(o=n.onAcceptNewChildElement(i,E,o));const H=C.toLowerCase().replace("-","_");return o&&!o.id&&o.type===C&&(o.id=`${H}_${Math.random().toString().slice(2,6)}`),o}function O(i){}function V(...i){return n&&n.getPropsConfig?n.getPropsConfig(...i):[]}return l.value={canMove:m(),canSelectParent:D(),canAdd:B(),canDelete:p(),canNested:!k(),contents:[],elementRef:I,parent:(w=s.parent)==null?void 0:w.componentInstance,schema:s.schema,styles:P,canAccepts:u,getBelongedComponentInstance:d,getDraggableDesignItemElement:x,getDraggingDisplayText:t,getPropConfig:V,getDragScopeElement:r,onAcceptMovedChildElement:y,onAcceptNewChildElement:M,onChildElementMovedOut:O,addNewChildComponentSchema:g,updateDragAndDropRules:j,triggerBelongedComponentToMoveWhenMoved:!!n&&n.triggerBelongedComponentToMoveWhenMoved||c.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:!!n&&n.triggerBelongedComponentToDeleteWhenDeleted||c.ref(!1)},l}v.FDesignerCanvas=it,v.FDesignerItem=he,v.designerCanvasProps=Pe,v.useDesignerComponent=st,v.useDesignerInnerComponent=ut,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(v,a){typeof exports=="object"&&typeof module<"u"?a(exports,require("vue"),require("lodash-es"),require("../accordion/index.umd.js"),require("../avatar/index.umd.js"),require("../button-edit/index.umd.js"),require("../button-group/index.umd.js"),require("../calendar/index.umd.js"),require("../capsule/index.umd.js"),require("../checkbox/index.umd.js"),require("../color-picker/index.umd.js"),require("../combo-list/index.umd.js"),require("../content-container/index.umd.js"),require("../data-grid/index.umd.js"),require("../date-picker/index.umd.js"),require("../dropdown/index.umd.js"),require("../dynamic-form/index.umd.js"),require("../external-container/index.umd.js"),require("../events-editor/index.umd.js"),require("../filter-bar/index.umd.js"),require("../image-cropper/index.umd.js"),require("../input-group/index.umd.js"),require("../layout/index.umd.js"),require("../list-nav/index.umd.js"),require("../list-view/index.umd.js"),require("../lookup/index.umd.js"),require("../nav/index.umd.js"),require("../number-spinner/index.umd.js"),require("../number-range/index.umd.js"),require("../order/index.umd.js"),require("../page-header/index.umd.js"),require("../page-footer/index.umd.js"),require("../pagination/index.umd.js"),require("../progress/index.umd.js"),require("../query-solution/index.umd.js"),require("../radio-group/index.umd.js"),require("../rate/index.umd.js"),require("../response-toolbar/index.umd.js"),require("../response-layout/index.umd.js"),require("../response-layout-editor/index.umd.js"),require("../search-box/index.umd.js"),require("../section/index.umd.js"),require("../smoke-detector/index.umd.js"),require("../splitter/index.umd.js"),require("../step/index.umd.js"),require("../switch/index.umd.js"),require("../tabs/index.umd.js"),require("../tags/index.umd.js"),require("../text/index.umd.js"),require("../time-picker/index.umd.js"),require("../transfer/index.umd.js"),require("../tree-view/index.umd.js"),require("../uploader/index.umd.js"),require("../verify-detail/index.umd.js"),require("../weather/index.umd.js"),require("../component/index.umd.js"),require("../video/index.umd.js"),require("../textarea/index.umd.js"),require("../tree-grid/index.umd.js"),require("../common/index.umd.js")):typeof define=="function"&&define.amd?define(["exports","vue","lodash-es","../accordion/index.umd.js","../avatar/index.umd.js","../button-edit/index.umd.js","../button-group/index.umd.js","../calendar/index.umd.js","../capsule/index.umd.js","../checkbox/index.umd.js","../color-picker/index.umd.js","../combo-list/index.umd.js","../content-container/index.umd.js","../data-grid/index.umd.js","../date-picker/index.umd.js","../dropdown/index.umd.js","../dynamic-form/index.umd.js","../external-container/index.umd.js","../events-editor/index.umd.js","../filter-bar/index.umd.js","../image-cropper/index.umd.js","../input-group/index.umd.js","../layout/index.umd.js","../list-nav/index.umd.js","../list-view/index.umd.js","../lookup/index.umd.js","../nav/index.umd.js","../number-spinner/index.umd.js","../number-range/index.umd.js","../order/index.umd.js","../page-header/index.umd.js","../page-footer/index.umd.js","../pagination/index.umd.js","../progress/index.umd.js","../query-solution/index.umd.js","../radio-group/index.umd.js","../rate/index.umd.js","../response-toolbar/index.umd.js","../response-layout/index.umd.js","../response-layout-editor/index.umd.js","../search-box/index.umd.js","../section/index.umd.js","../smoke-detector/index.umd.js","../splitter/index.umd.js","../step/index.umd.js","../switch/index.umd.js","../tabs/index.umd.js","../tags/index.umd.js","../text/index.umd.js","../time-picker/index.umd.js","../transfer/index.umd.js","../tree-view/index.umd.js","../uploader/index.umd.js","../verify-detail/index.umd.js","../weather/index.umd.js","../component/index.umd.js","../video/index.umd.js","../textarea/index.umd.js","../tree-grid/index.umd.js","../common/index.umd.js"],a):(v=typeof globalThis<"u"?globalThis:v||self,a(v["designer-canvas"]={},v.Vue,v.LodashES,v.FAccordion,v.FAvatar,v.FButtonEdit,v.FButtonGroup,v.FCalendar,v.FCapsule,v.FCheckbox,v.FColorPicker,v.FComboList,v.FContentContainer,v.FDataGrid,v.FDatePicker,v.FDropdown,v.FDynamicForm,v.FExteranlContainer,v.FEventsEditor,v.FFilterBar,v.FImageCropper,v.FInputGroup,v.FLayout,v.FListNav,v.FListView,v.FLookup,v.FNav,v.FNumberSpinner,v.FNumberRange,v.FOrder,v.FPageHeader,v.FPageFooter,v.FPagination,v.FProgress,v.FQuerySolution,v.FRadioGroup,v.FRate,v.FResponseToolbar,v.FResponseLayout,v.FResponseLayoutEditorSetting,v.FSearchBox,v.FSection,v.FSmokeDetector,v.FSplitter,v.FStep,v.FSwitch,v.FTab,v.FTags,v.FText,v.FTimePicker,v.FTransfer,v.FTreeview,v.FUploader,v.FVerifyDetail,v.FWeather,v.FComponent,v.FVideo,v.FTextArea,v.FTreeGrid,v.common))})(this,function(v,a,me,Ye,ze,Qe,Ke,Je,Ze,Re,en,nn,tn,rn,on,an,cn,sn,un,ln,dn,fn,pn,mn,vn,gn,hn,yn,Cn,xn,Dn,jn,wn,bn,Tn,Sn,En,Fn,Nn,Pn,In,Mn,kn,Bn,qn,An,Vn,On,Ln,_n,Un,$n,Hn,Gn,Xn,Wn,Yn,zn,Qn,he){"use strict";const pe=a.ref(0);function Kn(N,s){const t=s.getBoundingClientRect(),w=N.getBoundingClientRect(),S=w.top>=t.top,f=w.top<=t.bottom;return S&&f}function ye(N){if(!N)return;let s;if(N.className.includes("dgComponentSelected")?s=N:s=N.querySelector(".dgComponentSelected"),!s)return;const t=s.getBoundingClientRect();if(t.width===0&&t.height===0)return;const w=s.querySelector(".component-btn-group");if(w){if(!Kn(s,N)){w.style.display="none";return}w.style.display="";const f=w.getBoundingClientRect(),g=w.querySelector("div");if(g){const x=g.getBoundingClientRect();g.style.top=f.top+"px",g.style.left=f.left-x.width+"px"}}}const Pe={modelValue:{type:Object,default:{}},componentId:{type:String,default:""}};var ce=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function Jn(N){return N&&N.__esModule&&Object.prototype.hasOwnProperty.call(N,"default")?N.default:N}function ve(N){throw new Error('Could not dynamically require "'+N+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Ie={exports:{}};(function(N,s){(function(t){N.exports=t()})(function(){return function(){function t(w,S,f){function g(k,q){if(!S[k]){if(!w[k]){var u=typeof ve=="function"&&ve;if(!q&&u)return u(k,!0);if(x)return x(k,!0);var D=new Error("Cannot find module '"+k+"'");throw D.code="MODULE_NOT_FOUND",D}var c=S[k]={exports:{}};w[k][0].call(c.exports,function(n){var r=w[k][1][n];return g(r||n)},c,c.exports,t,w,S,f)}return S[k].exports}for(var x=typeof ve=="function"&&ve,p=0;p<f.length;p++)g(f[p]);return g}return t}()({1:[function(t,w,S){var f={},g="(?:^|\\s)",x="(?:\\s|$)";function p(u){var D=f[u];return D?D.lastIndex=0:f[u]=D=new RegExp(g+u+x,"g"),D}function k(u,D){var c=u.className;c.length?p(D).test(c)||(u.className+=" "+D):u.className=D}function q(u,D){u.className=u.className.replace(p(D)," ").trim()}w.exports={add:k,rm:q}},{}],2:[function(t,w,S){(function(f){var g=t("contra/emitter"),x=t("crossvent"),p=t("./classes"),k=document,q=k.documentElement;function u(l,G){var X=arguments.length;X===1&&Array.isArray(l)===!1&&(G=l,l=[]);var i,j,M,U,Z,z,ee,L,te,re=null,le,_,de=!1,fe=0,Q,P=G||{};P.moves===void 0&&(P.moves=F),P.accepts===void 0&&(P.accepts=F),P.invalid===void 0&&(P.invalid=gt),P.containers===void 0&&(P.containers=l||[]),P.isContainer===void 0&&(P.isContainer=m),P.copy===void 0&&(P.copy=!1),P.copySortSource===void 0&&(P.copySortSource=!1),P.revertOnSpill===void 0&&(P.revertOnSpill=!1),P.removeOnSpill===void 0&&(P.removeOnSpill=!1),P.direction===void 0&&(P.direction="vertical"),P.ignoreInputTextSelection===void 0&&(P.ignoreInputTextSelection=!0),P.mirrorContainer===void 0&&(P.mirrorContainer=k.body);var Y=g({containers:P.containers,start:vt,end:Le,cancel:He,remove:$e,destroy:dt,canMove:mt,dragging:!1});return P.removeOnSpill===!0&&Y.on("over",yt).on("out",Ct),qe(),Y;function xe(e){return Y.containers.indexOf(e)!==-1||P.isContainer(e)}function qe(e){var d=e?"remove":"add";n(q,d,"mousedown",ft),n(q,d,"mouseup",we)}function De(e){var d=e?"remove":"add";n(q,d,"mousemove",pt)}function Ae(e){var d=e?"remove":"add";x[d](q,"selectstart",Ve),x[d](q,"click",Ve)}function dt(){qe(!0),we({})}function Ve(e){le&&e.preventDefault()}function ft(e){U=e.clientX,Z=e.clientY;var d=r(e)!==1||e.metaKey||e.ctrlKey;if(!d){var h=e.target,I=je(h);I&&(le=I,De(),e.type==="mousedown"&&(C(h)?h.focus():e.preventDefault()))}}function pt(e){if(le){if(r(e)===0){we({});return}if(!(e.clientX!==void 0&&Math.abs(e.clientX-U)<=(P.slideFactorX||0)&&e.clientY!==void 0&&Math.abs(e.clientY-Z)<=(P.slideFactorY||0))){if(P.ignoreInputTextSelection){var d=W("clientX",e)||0,h=W("clientY",e)||0,I=k.elementFromPoint(d,h);if(C(I))return}var $=le;De(!0),Ae(),Le(),Oe($),p.add(L||M,"gu-transit"),Dt(),xt(),fe=0,Se(e)}}}function je(e){if(!(Y.dragging&&i)&&!xe(e)){for(var d=e;o(e)&&xe(o(e))===!1;)if(P.invalid(e,d)||(e=o(e),!e))return;var h=o(e);if(h&&!P.invalid(e,d)){var I=P.moves(e,h,d,A(e));if(I)return{item:e,source:h}}}}function mt(e){return!!je(e)}function vt(e){var d=je(e);d&&Oe(d)}function Oe(e){Nt(e.item,e.source)&&(L=e.item.cloneNode(!0),Y.emit("cloned",L,e.item,"copy")),j=e.source,M=e.item,z=ee=A(e.item),Y.dragging=!0,Y.emit("drag",M,j)}function gt(){return!1}function Le(){if(Y.dragging){var e=L||M;Ue(e,o(e))}}function _e(){le=!1,De(!0),Ae(!0)}function we(e){if(_e(),!!Y.dragging){var d=L||M,h=W("clientX",e)||0,I=W("clientY",e)||0,$=y(i,h,I),H=Ge($,h,I);H&&(L&&P.copySortSource||!L||H!==j)?Ue(d,H):P.removeOnSpill?$e():He()}}function Ue(e,d){var h=o(e);L&&P.copySortSource&&d===j&&h.removeChild(M),Te(d)?Y.emit("cancel",e,j):Y.emit("drop",e,d,j,ee),be()}function $e(){if(Y.dragging){var e=L||M,d=o(e);d&&d.removeChild(e),Y.emit(L?"cancel":"remove",e,d,j),be()}}function He(e){if(Y.dragging){var d=arguments.length>0?e:P.revertOnSpill,h=L||M,I=o(h),$=Te(I);$===!1&&d&&(L?I&&I.removeChild(L):j.insertBefore(h,z)),$||d?Y.emit("cancel",h,j,j):Y.emit("drop",h,I,j,ee),be()}}function be(){var e=L||M;_e(),jt(),wt(),e&&p.rm(e,"gu-transit"),te&&clearTimeout(te),Y.dragging=!1,re&&Y.emit("out",e,re,j),Y.emit("dragend",e,fe),j=M=L=z=ee=te=re=null}function Te(e,d){var h;return d!==void 0?h=d:i?h=ee:h=A(L||M),e===j&&h===z}function Ge(e,d,h){for(var I=e;I&&!$();)I=o(I);return I;function $(){var H=xe(I);if(H===!1)return!1;var ae=Xe(I,e),ne=We(I,ae,d,h),ie=Te(I,ne);return ie?!0:P.accepts(M,I,j,ne)}}function Se(e){if(!i)return;e.preventDefault();var d=W("clientX",e)||0,h=W("clientY",e)||0;i.style.left=d-2+"px",i.style.top=h-2+"px";var I=L||M,$=y(i,d,h),H=Ge($,d,h),ae=H!==null&&H!==re;(ae||H===null)&&(oe(),re=H,ue()),Ft($,h);var ne=o(I);if(H===j&&L&&!P.copySortSource){ne&&ne.removeChild(I);return}var ie,se=Xe(H,$);if(de=bt(se,H),se!==null)ie=We(H,se,d,h);else if(P.revertOnSpill===!0&&!L)ie=z,H=j;else{L&&ne&&ne.removeChild(I),L&&_&&(_.style.display="none");return}_.style.display="block",ht(ie,I,ae),ie?St(se,ie):Et(H);function J(R){Y.emit(R,I,re,j)}function ue(){ae&&J("over")}function oe(){re&&J("out")}}function ht(e,d,h){(e===d||e===A(d))&&(ee=A(d)),(e===null&&h||e!==d&&e!==A(d))&&(ee=e)}function yt(e){p.rm(e,"gu-hide")}function Ct(e){Y.dragging&&p.add(e,"gu-hide")}function xt(){i||(i=document.createElement("div"),i.style="background: grey; color: white; height: 24px; text-align: center; padding: 3px 10px; min-width: 100px;border-radius: 4px; box-shadow: 0 0 6px grey;",i.innerHTML=P.getMirrorText&&P.getMirrorText(M)||"控件",p.add(i,"gu-mirror"),P.mirrorContainer.appendChild(i),n(q,"add","mousemove",Se),p.add(P.mirrorContainer,"gu-unselectable"),Y.emit("cloned",i,M,"mirror"))}function Dt(){if(_=document.createElement("div"),p.add(_,"gu-insertion"),M){var e=M.getBoundingClientRect();_.style.left=e.left+"px",_.style.top=e.top+"px"}de=!1,P.mirrorContainer.appendChild(_)}function jt(){i&&(p.rm(P.mirrorContainer,"gu-unselectable"),n(q,"remove","mousemove",Se),o(i).removeChild(i),i=null)}function wt(){_&&(o(_).removeChild(_),_=null)}function Xe(e,d){for(var h=d;h!==e&&o(h)!==e;)h=o(h);return h===q?null:h}function bt(e,d){if(!d)return de;var h=e||d&&d.lastElementChild;if(!h)return!0;var I=getComputedStyle(e),$=/^inline/.test(I.getPropertyValue("display"))||/^(left|right)$/.test(I.getPropertyValue("float"));if($)return!0;if(d){var H=getComputedStyle(d),ae=H.getPropertyValue("display");if(/flex$/.test(ae)){var ne=H.getPropertyValue("flex-direction")||"row";if(ne==="row"||ne==="row-reverse")return!Tt(d)}return!1}return!0}function Tt(e){if(!e.children||!e.children.length)return!1;for(const d of Array.from(e.children)){const I=(d.className&&d.className.split(" ")||[]).filter($=>/^col(-md|-xl|-el){0,1}-([1-9]|10|11|12)$/.test($));if(!I.length)return!1;for(const $ of I){const H=$.slice($.lastIndexOf("-")+1);if(parseInt(H,10)!==12)return!1}}return!0}function St(e,d){const h=d.getBoundingClientRect();if(_.style.left=h.left+"px",_.style.top=h.top+"px",de){if(_.style.height=h.height+"px",_.style.width="4px",e){const I=e.getBoundingClientRect();I.top!==h.top&&(_.style.left=I.right+"px",_.style.top=I.top+"px",_.style.height=I.height+"px")}}else if(_.style.height="4px",_.style.width=h.width+"px",Q){const I=Q.getBoundingClientRect();h.top<I.top&&(_.style.display="none")}d===M&&M&&(_.style.display="none")}function Et(e){ee=null;var d=e.lastElementChild;if(d){var h=d.getBoundingClientRect();de?(_.style.left=h.right+"px",_.style.top=h.top+"px",_.style.height=h.height+"px",_.style.width="4px"):(_.style.left=h.left+"px",_.style.top=h.bottom+"px",_.style.height="4px",_.style.width=h.width+"px"),d===M&&M&&(_.style.display="none")}else _.style.display="none"}function Ft(e,d){if(!P.mirrorContainer.contains(e)||!window.scrollContainerList||!Array.from(window.scrollContainerList).length||(Q=D(e),!Q||!Q.contains(e)))return;const h=document.querySelector(".dgComponentSelected"),I=Q.getBoundingClientRect();if(d-30<I.top&&Q.scrollTop>0){let $=Q.scrollTop<10?Q.scrollTop:10;Q.scrollBy(0,-1*$),h&&Q.contains(h)&&(fe=fe+-1*$)}if(d+30>I.bottom&&Q.scrollTop<Q.scrollHeight-Q.clientHeight){const $=Q.scrollHeight-Q.clientHeight-Q.scrollTop;let H=$<10?$:10;Q.scrollBy(0,H),h&&Q.contains(h)&&(fe=fe+H)}}function We(e,d,h,I){var $=P.direction==="horizontal",H=P.direction==="mixed",ae=d!==e?ie():ne();return ae;function ne(){var J=e.children.length,ue,oe,R;for(ue=0;ue<J;ue++)if(oe=e.children[ue],R=oe.getBoundingClientRect(),$&&R.left+R.width/2>h||!H&&!$&&R.top+R.height/2>I||H&&R.left+R.width>h&&R.top+R.height>I)return oe;return null}function ie(){var J=d.getBoundingClientRect();if(H){var ue=I-J.top,oe=h-J.left,R=J.bottom-I,Ee=J.right-h,Fe=Math.min(oe,Ee,ue,R),Ne;return de?Ne=Ee<oe:Ne=R===Fe||Ee===Fe||oe===Fe,se(Ne)}return se($?h>J.left+O(J)/2:I>J.top+V(J)/2)}function se(J){return J?A(d):d}}function Nt(e,d){return typeof P.copy=="boolean"?P.copy:P.copy(e,d)}}function D(l){const G=Array.from(window.scrollContainerList);if(G.length===1){const i=Array.from(window.scrollContainerList)[0];return document.getElementById(i)}const X=c(G);for(const i of X)if(i.contains(l))return i;return null}function c(l){const G=[];return l.forEach(X=>{const i=document.getElementById(X);i&&G.push(i)}),G.sort((X,i)=>X.contains(i)?1:i.contains(X)?-1:0),G}function n(l,G,X,i){var j={mouseup:"touchend",mousedown:"touchstart",mousemove:"touchmove"},M={mouseup:"pointerup",mousedown:"pointerdown",mousemove:"pointermove"},U={mouseup:"MSPointerUp",mousedown:"MSPointerDown",mousemove:"MSPointerMove"};f.navigator.pointerEnabled?x[G](l,M[X],i):f.navigator.msPointerEnabled?x[G](l,U[X],i):(x[G](l,j[X],i),x[G](l,X,i))}function r(l){if(l.touches!==void 0)return l.touches.length;if(l.which!==void 0&&l.which!==0)return l.which;if(l.buttons!==void 0)return l.buttons;var G=l.button;if(G!==void 0)return G&1?1:G&2?3:G&4?2:0}function y(l,G,X){l=l||{};var i=l.className||"",j;return l.className+=" gu-hide",j=k.elementFromPoint(G,X),l.className=i,j}function m(){return!1}function F(){return!0}function O(l){return l.width||l.right-l.left}function V(l){return l.height||l.bottom-l.top}function o(l){return l.parentNode===k?null:l.parentNode}function C(l){return l.tagName==="INPUT"||l.tagName==="TEXTAREA"||l.tagName==="SELECT"||B(l)}function B(l){return!l||l.contentEditable==="false"?!1:l.contentEditable==="true"?!0:B(o(l))}function A(l){return l.nextElementSibling||G();function G(){var X=l;do X=X.nextSibling;while(X&&X.nodeType!==1);return X}}function K(l){return l.targetTouches&&l.targetTouches.length?l.targetTouches[0]:l.changedTouches&&l.changedTouches.length?l.changedTouches[0]:l}function W(l,G){var X=K(G),i={pageX:"clientX",pageY:"clientY"};return l in i&&!(l in X)&&i[l]in X&&(l=i[l]),X[l]}w.exports=u}).call(this,typeof ce<"u"?ce:typeof self<"u"?self:typeof window<"u"?window:{})},{"./classes":1,"contra/emitter":5,crossvent:6}],3:[function(t,w,S){w.exports=function(g,x){return Array.prototype.slice.call(g,x)}},{}],4:[function(t,w,S){var f=t("ticky");w.exports=function(x,p,k){x&&f(function(){x.apply(k||null,p||[])})}},{ticky:10}],5:[function(t,w,S){var f=t("atoa"),g=t("./debounce");w.exports=function(p,k){var q=k||{},u={};return p===void 0&&(p={}),p.on=function(D,c){return u[D]?u[D].push(c):u[D]=[c],p},p.once=function(D,c){return c._once=!0,p.on(D,c),p},p.off=function(D,c){var n=arguments.length;if(n===1)delete u[D];else if(n===0)u={};else{var r=u[D];if(!r)return p;r.splice(r.indexOf(c),1)}return p},p.emit=function(){var D=f(arguments);return p.emitterSnapshot(D.shift()).apply(this,D)},p.emitterSnapshot=function(D){var c=(u[D]||[]).slice(0);return function(){var n=f(arguments),r=this||p;if(D==="error"&&q.throws!==!1&&!c.length)throw n.length===1?n[0]:n;return c.forEach(function(m){q.async?g(m,n,r):m.apply(r,n),m._once&&p.off(D,m)}),p}},p}},{"./debounce":4,atoa:3}],6:[function(t,w,S){(function(f){var g=t("custom-event"),x=t("./eventmap"),p=f.document,k=D,q=n,u=[];f.addEventListener||(k=c,q=r),w.exports={add:k,remove:q,fabricate:y};function D(o,C,B,A){return o.addEventListener(C,B,A)}function c(o,C,B){return o.attachEvent("on"+C,F(o,C,B))}function n(o,C,B,A){return o.removeEventListener(C,B,A)}function r(o,C,B){var A=O(o,C,B);if(A)return o.detachEvent("on"+C,A)}function y(o,C,B){var A=x.indexOf(C)===-1?W():K();o.dispatchEvent?o.dispatchEvent(A):o.fireEvent("on"+C,A);function K(){var l;return p.createEvent?(l=p.createEvent("Event"),l.initEvent(C,!0,!0)):p.createEventObject&&(l=p.createEventObject()),l}function W(){return new g(C,{detail:B})}}function m(o,C,B){return function(K){var W=K||f.event;W.target=W.target||W.srcElement,W.preventDefault=W.preventDefault||function(){W.returnValue=!1},W.stopPropagation=W.stopPropagation||function(){W.cancelBubble=!0},W.which=W.which||W.keyCode,B.call(o,W)}}function F(o,C,B){var A=O(o,C,B)||m(o,C,B);return u.push({wrapper:A,element:o,type:C,fn:B}),A}function O(o,C,B){var A=V(o,C,B);if(A){var K=u[A].wrapper;return u.splice(A,1),K}}function V(o,C,B){var A,K;for(A=0;A<u.length;A++)if(K=u[A],K.element===o&&K.type===C&&K.fn===B)return A}}).call(this,typeof ce<"u"?ce:typeof self<"u"?self:typeof window<"u"?window:{})},{"./eventmap":7,"custom-event":8}],7:[function(t,w,S){(function(f){var g=[],x="",p=/^on/;for(x in f)p.test(x)&&g.push(x.slice(2));w.exports=g}).call(this,typeof ce<"u"?ce:typeof self<"u"?self:typeof window<"u"?window:{})},{}],8:[function(t,w,S){(function(f){var g=f.CustomEvent;function x(){try{var p=new g("cat",{detail:{foo:"bar"}});return p.type==="cat"&&p.detail.foo==="bar"}catch{}return!1}w.exports=x()?g:typeof document<"u"&&typeof document.createEvent=="function"?function(k,q){var u=document.createEvent("CustomEvent");return q?u.initCustomEvent(k,q.bubbles,q.cancelable,q.detail):u.initCustomEvent(k,!1,!1,void 0),u}:function(k,q){var u=document.createEventObject();return u.type=k,q?(u.bubbles=!!q.bubbles,u.cancelable=!!q.cancelable,u.detail=q.detail):(u.bubbles=!1,u.cancelable=!1,u.detail=void 0),u}}).call(this,typeof ce<"u"?ce:typeof self<"u"?self:typeof window<"u"?window:{})},{}],9:[function(t,w,S){var f=w.exports={},g,x;function p(){throw new Error("setTimeout has not been defined")}function k(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?g=setTimeout:g=p}catch{g=p}try{typeof clearTimeout=="function"?x=clearTimeout:x=k}catch{x=k}})();function q(V){if(g===setTimeout)return setTimeout(V,0);if((g===p||!g)&&setTimeout)return g=setTimeout,setTimeout(V,0);try{return g(V,0)}catch{try{return g.call(null,V,0)}catch{return g.call(this,V,0)}}}function u(V){if(x===clearTimeout)return clearTimeout(V);if((x===k||!x)&&clearTimeout)return x=clearTimeout,clearTimeout(V);try{return x(V)}catch{try{return x.call(null,V)}catch{return x.call(this,V)}}}var D=[],c=!1,n,r=-1;function y(){!c||!n||(c=!1,n.length?D=n.concat(D):r=-1,D.length&&m())}function m(){if(!c){var V=q(y);c=!0;for(var o=D.length;o;){for(n=D,D=[];++r<o;)n&&n[r].run();r=-1,o=D.length}n=null,c=!1,u(V)}}f.nextTick=function(V){var o=new Array(arguments.length-1);if(arguments.length>1)for(var C=1;C<arguments.length;C++)o[C-1]=arguments[C];D.push(new F(V,o)),D.length===1&&!c&&q(m)};function F(V,o){this.fun=V,this.array=o}F.prototype.run=function(){this.fun.apply(null,this.array)},f.title="browser",f.browser=!0,f.env={},f.argv=[],f.version="",f.versions={};function O(){}f.on=O,f.addListener=O,f.once=O,f.off=O,f.removeListener=O,f.removeAllListeners=O,f.emit=O,f.prependListener=O,f.prependOnceListener=O,f.listeners=function(V){return[]},f.binding=function(V){throw new Error("process.binding is not supported")},f.cwd=function(){return"/"},f.chdir=function(V){throw new Error("process.chdir is not supported")},f.umask=function(){return 0}},{}],10:[function(t,w,S){(function(f){var g=typeof f=="function",x;g?x=function(p){f(p)}:x=function(p){setTimeout(p,0)},w.exports=x}).call(this,t("timers").setImmediate)},{timers:11}],11:[function(t,w,S){(function(f,g){var x=t("process/browser.js").nextTick,p=Function.prototype.apply,k=Array.prototype.slice,q={},u=0;S.setTimeout=function(){return new D(p.call(setTimeout,window,arguments),clearTimeout)},S.setInterval=function(){return new D(p.call(setInterval,window,arguments),clearInterval)},S.clearTimeout=S.clearInterval=function(c){c.close()};function D(c,n){this._id=c,this._clearFn=n}D.prototype.unref=D.prototype.ref=function(){},D.prototype.close=function(){this._clearFn.call(window,this._id)},S.enroll=function(c,n){clearTimeout(c._idleTimeoutId),c._idleTimeout=n},S.unenroll=function(c){clearTimeout(c._idleTimeoutId),c._idleTimeout=-1},S._unrefActive=S.active=function(c){clearTimeout(c._idleTimeoutId);var n=c._idleTimeout;n>=0&&(c._idleTimeoutId=setTimeout(function(){c._onTimeout&&c._onTimeout()},n))},S.setImmediate=typeof f=="function"?f:function(c){var n=u++,r=arguments.length<2?!1:k.call(arguments,1);return q[n]=!0,x(function(){q[n]&&(r?c.apply(null,r):c.call(null),S.clearImmediate(n))}),n},S.clearImmediate=typeof g=="function"?g:function(c){delete q[c]}}).call(this,t("timers").setImmediate,t("timers").clearImmediate)},{"process/browser.js":9,timers:11}]},{},[2])(2)})})(Ie);var Zn=Ie.exports;const Me=Jn(Zn);function Rn(N){let s;function t(n,r,y){const m={};return m.sourceElement=n,m.sourceContainer=y,m.targetContainer=r,m.sourceType=n.getAttribute("data-sourceType")||"move",m.controlType=n.getAttribute("data-controlType"),m.controlTypeName=n.getAttribute("data-controlTypeName"),m.controlCategory=n.getAttribute("data-category"),m.controlFeature=n.getAttribute("data-feature"),m.parentComponentInstance=r.componentInstance,m.controlCategory==="input"?m.bindingType="field":m.controlCategory==="dataCollection"&&(m.bindingType="entity"),n.componentInstance&&(m.controlType=n.componentInstance.value.schema.type,m.controlCategory=n.componentInstance.value.schema.category),m}function w(n,r,y){if(n.contains(r)||r.classList.contains("no-drop"))return!1;const m=!0;if(n.componentInstance&&n.componentInstance.value.getDragScopeElement){const F=n.componentInstance.value.getDragScopeElement();if(F&&!F.contains(r))return!1}if(r.componentInstance&&r.componentInstance.value.canAccepts){const F=t(n,r,y);return r.componentInstance.value.canAccepts(F)}return m}function S(n,r){const y=r.getBoundingClientRect(),m=n.getBoundingClientRect(),F=m.top>=y.top,O=m.top<y.bottom;return F&&O}function f(n,r){const y=n.querySelector(".dgComponentSelected");if(!(!y||r===0)&&S(y,n)){const m=y.querySelector(".component-btn-group");if(m){const F=m.querySelector("div");if(F&&F.style.top){const O=Number.parseFloat(F.style.top);F.style.top=O-r+"px"}}}}function g(n,r,y){n.componentInstance;let m=-1;if(!r)return-1;if(n.componentInstance.value.contents){if(y&&y.componentInstance){if(y.getAttribute("data-noattach"))m=Number(y.getAttribute("data-position"));else{const F=y.componentInstance.value.schema;let O={id:F.id};F.type==="Component"&&(O={component:F.id}),m=me.findIndex(n.componentInstance.value.contents,O),m=m===-1?0:m}m!==-1&&n.componentInstance.value.contents.splice(m,0,r)}else n.componentInstance.value.contents.push(r);n.componentInstance.value.updateDragAndDropRules()}return m}function x(n,r){if(!n.componentInstance.value.contents)return-1;if(n.componentInstance.value.contents.length===0)return 0;if(!r||!r.componentInstance)return n.componentInstance.value.contents.length;if(r.getAttribute("data-noattach"))return Number(r.getAttribute("data-position"));const y=r.componentInstance.value.schema;let m;y.type==="Component"?m={component:y.id}:m={id:y.id};let F=me.findIndex(n.componentInstance.value.contents,m);return F=F===-1?0:F,F}function p(n,r,y,m){if(r.componentInstance.value.addNewChildComponentSchema){const F=x(r,m),O=String(n.getAttribute("data-controltype")),V=n.getAttribute("data-feature"),o=String(n.innerText),C=r.componentInstance.value,B={componentType:O,label:o,parentComponentInstance:C,targetPosition:F},A=V?JSON.parse(V):{},K=Object.assign(B,A),W=r.componentInstance.value.addNewChildComponentSchema(K,N);g(r,W,m)}r.contains(n)&&r.removeChild(n)}function k(n,r,y,m){let F,O=-1;if(n.componentInstance&&n.componentInstance.value.triggerBelongedComponentToMoveWhenMoved){const C=n.componentInstance.value.getBelongedComponentInstance(n.componentInstance);C&&(n=a.ref(C.elementRef).value.parentElement,y=n.parentElement)}const V=n.componentInstance&&n.componentInstance.value.schema;let o={id:V&&V.id};V.type==="component"&&(o={component:V&&V.id}),O=me.findIndex(y.componentInstance.value.contents,o),O!==-1&&y.componentInstance.value.contents&&(F=y.componentInstance.value.contents.splice(O,1),F=F[0]),g(r,F,m),y.componentInstance&&y.componentInstance.value.onChildElementMovedOut&&y.componentInstance.value.onChildElementMovedOut(n),r.componentInstance&&r.componentInstance.value.onAcceptMovedChildElement&&r.componentInstance.value.onAcceptMovedChildElement(n,y)}function q(n,r,y,m){if(!r||n.contains(r))return;switch(n.getAttribute("data-sourceType")){case"control":case"field":case"entity":{p(n,r,y,m);break}default:y.componentInstance.value.contents?k(n,r,y,m):r.contains(n)&&r.removeChild(n)}pe.value++}function u(n){s&&s.destroy(),Me&&(s=Me([],{mirrorContainer:n,direction:"mixed",revertOnSpill:!0,moves(r,y,m){let F=!0;return r.classList.contains("no-drag")&&(F=!1),r.componentInstance&&(F=!!m.getAttribute("data-dragging-icon")),F},copy(r){return r.classList.contains("drag-copy")},getMirrorText(r){return r.componentInstance&&r.componentInstance.value.getDraggingDisplayText?r.componentInstance.value.getDraggingDisplayText():r.innerText||"控件"},accepts(r,y,m){const F=w(r,y,m),O=n.lastElementChild;return F?O.className=O.className.replace("undroppable",""):O.className.includes("undroppable")||(O.className+=" undroppable"),F}}).on("over",(r,y)=>{y.className+=" drag-over"}).on("out",(r,y)=>{y.className=y.className.replace("drag-over","").replace(" ","")}).on("drop",(r,y,m,F)=>{q(r,y,m,F)}).on("dragend",(r,y)=>{f(r,y)}))}function D(n,r){if(!n)return;if(r.noDragDrop)return n;const y=n.querySelector(`[data-dragref='${r.id}-container']`)||n;s&&y&&s.containers.push(y)}function c(){if(!s)return;const n=document.getElementsByClassName("controlCategory");n&&(s.containers=s.containers.filter(r=>!r.className.includes("controlCategory")),Array.from(n).forEach(r=>{s.containers.push(r)}))}return{attachComponents:D,attachToolbox:c,initializeDragula:u}}const et={id:{type:String,default:""},componentId:{type:String,default:""},type:{type:String,default:""},canDelete:{type:Boolean,default:!0},canMove:{type:Boolean,default:!0},canSelectParent:{type:Boolean,default:!0},customButtons:{type:Array,default:[]},customClass:{type:String,default:""},customStyle:{type:String,default:""},modelValue:{type:Object},ignore:{type:Boolean,default:!1}},b={},T={},E={};let ke=!1;function nt(){ke||(ke=!0,ze.registerDesigner(b,T,E),Ye.registerDesigner(b,T,E),Qe.registerDesigner(b,T,E),Ke.registerDesigner(b,T,E),Je.registerDesigner(b,T,E),Ze.registerDesigner(b,T,E),Re.registerDesigner(b,T,E),en.registerDesigner(b,T,E),nn.registerDesigner(b,T,E),tn.registerDesigner(b,T,E),rn.registerDesigner(b,T,E),on.registerDesigner(b,T,E),an.registerDesigner(b,T,E),cn.registerDesigner(b,T,E),un.registerDesigner(b,T,E),sn.registerDesigner(b,T),ln.registerDesigner(b,T,E),dn.registerDesigner(b,T,E),fn.registerDesigner(b,T,E),pn.registerDesigner(b,T,E),vn.registerDesigner(b,T,E),mn.registerDesigner(b,T,E),hn.registerDesigner(b,T,E),gn.registerDesigner(b,T,E),Cn.registerDesigner(b,T,E),yn.registerDesigner(b,T,E),xn.registerDesigner(b,T,E),Dn.registerDesigner(b,T,E),jn.registerDesigner(b,T,E),wn.registerDesigner(b,T,E),bn.registerDesigner(b,T,E),Tn.registerDesigner(b,T,E),Sn.registerDesigner(b,T,E),Nn.registerDesigner(b,T,E),Pn.registerDesigner(b,T,E),Fn.registerDesigner(b,T,E),En.registerDesigner(b,T,E),In.registerDesigner(b,T,E),Mn.registerDesigner(b,T,E),kn.registerDesigner(b,T,E),Bn.registerDesigner(b,T,E),qn.registerDesigner(b,T,E),An.registerDesigner(b,T,E),Vn.registerDesigner(b,T,E),On.registerDesigner(b,T,E),Ln.registerDesigner(b,T,E),Xn.registerDesigner(b,T,E),_n.registerDesigner(b,T,E),Un.registerDesigner(b,T,E),$n.registerDesigner(b,T,E),Hn.registerDesigner(b,T,E),Gn.registerDesigner(b,T,E),Wn.registerDesigner(b,T),Yn.registerDesigner(b,T,E),zn.registerDesigner(b,T,E),Qn.registerDesigner(b,T,E))}const tt={id:{type:String}},rt=a.defineComponent({name:"FDesignerPlaceholder",props:tt,emits:[],setup(N){const s=a.computed(()=>({"drag-and-drop-alert":!0,"no-drag":!0,"w-100":!0})),t=a.computed(()=>({height:"60px",display:"flex","justify-content":"center","align-items":"center",margin:0,padding:".75rem 1.25rem",border:"1px solid transparent","border-radius":"3px",color:"#315585","background-color":"#dfedff","border-color":"#d2e6ff"}));return()=>a.createVNode("div",{class:s.value,style:t.value,role:"alert","data-noattach":"true","data-position":"0"},[a.createTextVNode("拖拽组件到这里")])}});function ot(N){return typeof N=="function"||Object.prototype.toString.call(N)==="[object Object]"&&!a.isVNode(N)}const ge=a.defineComponent({name:"FDesignerItem",props:et,emits:["selectionChange"],setup(N,s){const t=a.ref(`${N.modelValue.id}-component`),w=a.ref(N.canMove),S=a.ref(N.canDelete),f=a.ref(!1),g=a.ref(N.modelValue),x=a.ref(N.componentId||""),p=a.ref(""),k=a.ref(""),q=a.ref(N.customClass),u=a.ref(),D=a.inject("canvas-dragula"),c=a.ref(),n=a.inject("design-item-context"),r={designerItemElementRef:u,componentInstance:c,schema:g.value,parent:n,setupContext:s};a.provide("design-item-context",r);const y=a.inject("useFormSchema"),m=a.computed(()=>{const i=N.modelValue.appearance&&N.modelValue.appearance.class||"";let j={"farris-component":!0,"flex-fill":g.value.id=="root-component","position-relative":w.value&&S.value,"farris-nested":f.value,"can-move":w.value,"d-none":u.value&&u.value.classList.contains("d-none"),dgComponentSelected:u.value&&u.value.classList.contains("dgComponentSelected"),dgComponentFocused:u.value&&u.value.classList.contains("dgComponentFocused")};return j[`farris-component-${g.value.type}`]=!0,j=he.getCustomClass(j,i),j=he.getCustomClass(j,k.value),j=he.getCustomClass(j,q.value),j}),F=a.computed(()=>{const i={},j=N.modelValue.appearance&&N.modelValue.appearance.style||"";return j&&j.split(";").reduce((M,U)=>{const[Z,z]=U.split(":");return M[Z]=z,M},i),p.value&&p.value.split(";").reduce((M,U)=>{const[Z,z]=U.split(":");return Z&&(M[Z]=z),M},i),i});function O(i,j){var Z,z,ee;if(i&&(i.preventDefault(),i.stopPropagation()),c.value.triggerBelongedComponentToDeleteWhenDeleted){const L=c.value.getBelongedComponentInstance(c);if(L&&L.parent){const te=a.ref(L==null?void 0:L.parent),re=te.value.contents.findIndex(le=>le.id===L.schema.id);(z=(Z=te.value)==null?void 0:Z.contents)==null||z.splice(re,1),(ee=te.value)==null||ee.updateDragAndDropRules(),pe.value++}return}let M=n,U=L=>L.id===j.id;if(j.type==="component"&&(M=n==null?void 0:n.parent,U=L=>L.component===j.id),M&&M.schema.contents){const L=M.schema.contents.findIndex(U);M.schema.contents.splice(L,1),M.componentInstance.value.updateDragAndDropRules(),pe.value++,s.emit("selectionChange")}}function V(i){return S.value&&a.createVNode("div",{role:"button",class:"btn component-settings-button",title:"删除",ref:"removeComponent",onClick:j=>{O(j,i)}},[a.createVNode("i",{class:"f-icon f-icon-yxs_delete"},null)])}function o(){return w.value&&a.createVNode("div",{role:"button",class:"btn component-settings-button",title:"移动",ref:"moveComponent"},[a.createVNode("i",{"data-dragging-icon":"true",class:"cmp_move f-icon f-icon-yxs_move"},null)])}function C(){return N.customButtons&&!!N.customButtons.length&&N.customButtons.map(i=>a.createVNode("div",{role:"button",class:`btn component-settings-button ${i.class||""}`,title:i.title,ref:i.id},[a.createVNode("i",{class:i.icon},null)]))}function B(i){return a.createVNode("div",{class:"component-btn-group","data-noattach":"true"},[a.createVNode("div",null,[V(i),o(),C()])])}function A(i,j,M,U){s.emit("selectionChange",i,j,M,U)}function K(i){let j;const M=i.type,U=b[M],Z=T[M],z=Z?Z(i):{};z.customClass=N.ignore?z.customClass:"",z.componentId=x.value;const ee=i.contents&&i.contents.length===0;return i.contents&&!!i.contents.length&&U?a.createVNode(U,a.mergeProps({ref:c},z),ot(j=i.contents.map(te=>a.createVNode(ge,{key:te.id,modelValue:te,"onUpdate:modelValue":re=>te=re,componentId:x.value,onSelectionChange:A},null)))?j:{default:()=>[j]}):U?ee?a.createVNode(U,a.mergeProps({ref:c},z),{default:()=>[a.createVNode(rt,null,null)]}):a.createVNode(U,a.mergeProps({ref:c},z),null):a.createVNode("div",null,null)}function W(i){if(i.type==="component-ref"){let M=y==null?void 0:y.getFormSchema().module.components.find(U=>U.id===i.component);if(M)return a.createVNode(ge,{key:M.id,modelValue:M,"onUpdate:modelValue":U=>M=U,componentId:M.id,onSelectionChange:A},null)}}a.watch(()=>N.modelValue,i=>{g.value=i,t.value=`${i.id}-component`});function l(i){const j=i==null?void 0:i.target;ye(j)}function G(){var i,j;(j=(i=g.value)==null?void 0:i.contents)!=null&&j.length&&u.value&&u.value.addEventListener("scroll",l)}a.onMounted(()=>{if(u.value&&c.value&&c.value.schema){const i=u.value.querySelector(`[data-dragref='${c.value.schema.id}-container']`);D&&i&&D.attachComponents(i,g.value),f.value=c.value.canNested!==void 0?c.value.canNested:f.value,S.value=c.value.canDelete!==void 0?c.value.canDelete:S.value,w.value=c.value.canMove!==void 0?c.value.canMove:w.value,p.value=c.value.styles||"",k.value=c.value.designerClass||"",u.value&&(u.value.componentInstance=c,u.value.designItemContext=r),c.value.belongedComponentId=x.value}G(),pe.value++}),a.onBeforeUnmount(()=>{u.value&&u.value.removeEventListener("scroll",l)});function X(i){Array.from(document.getElementsByClassName("dgComponentFocused")).forEach(U=>U.classList.remove("dgComponentFocused")),i&&(i.preventDefault(),i.stopPropagation());let j=r.designerItemElementRef;const M=u.value;if(M){const U=document.getElementsByClassName("dgComponentSelected");U&&U.length===1&&U[0]===u.value||(Array.from(U).forEach(z=>z.classList.remove("dgComponentSelected")),M.classList.add("dgComponentFocused"),s.emit("selectionChange",g.value.type,g.value,x.value,c.value),c.value.getDraggableDesignItemElement&&(j=c.value.getDraggableDesignItemElement(r),j&&j.value&&j.value.classList.add("dgComponentSelected")))}l({target:j==null?void 0:j.value})}return()=>g.value.type==="component-ref"?W(g.value):a.createVNode("div",{id:`${g.value.id}-design-item`,ref:u,class:m.value,style:F.value,onClick:X},[B(g.value),K(g.value)])}}),it=a.defineComponent({name:"FDesignerCanvas",props:Pe,emits:["init","selectionChange","canvasChanged"],setup(N,s){const t=a.ref(),w=a.ref(),S=a.ref(),f=a.ref(),g=a.ref(),x=a.ref(N.componentId);let p,k;const q={eventsEditorUtils:a.inject("eventsEditorUtils"),formSchemaUtils:a.inject("useFormSchema"),formMetadataConverter:a.inject("formMetadataConverter"),designViewModelUtils:a.inject("designViewModelUtils"),controlCreatorUtils:a.inject("controlCreatorUtils"),metadataService:a.inject("Meatdata_Http_Service_Token"),schemaService:a.inject("schemaService")};a.provide("designer-host-service",q);const u=Rn(q);nt(),a.provide("canvas-dragula",u),a.provide("design-item-context",{designerItemElementRef:f,componentInstance:g,schema:w.value,parent:void 0});const D=a.computed(()=>({"d-flex":!0,"flex-fill":!0,"flex-column":!0}));a.onMounted(()=>{S.value&&u.initializeDragula(S.value),t.value=N.modelValue,s.emit("init",u),c()}),a.watch(pe,()=>{ye(S.value),s.emit("canvasChanged")},{flush:"post"});function c(){p=new ResizeObserver(()=>{k&&clearTimeout(k),k=setTimeout(()=>{ye(S.value)})}),p.observe(S.value)}function n(r,y,m,F){s.emit("selectionChange",r,y,m,F)}return()=>a.createVNode("div",{class:"editorDiv flex-fill h-100"},[a.createVNode("div",{class:"editorPanel d-flex flex-fill flex-column PC"},[a.createVNode("div",{ref:S,class:D.value},[t.value&&a.createVNode(ge,{modelValue:t.value,"onUpdate:modelValue":r=>t.value=r,onSelectionChange:n,componentId:x.value},null)])])])}}),at={button:{type:"button",name:"按钮",icon:"Button"},"response-toolbar":{type:"response-toolbar",name:"工具栏",icon:"ButtonGroup"},"response-toolbar-item":{type:"response-toolbar-item",name:"按钮",icon:"Button"},"content-container":{type:"content-container",name:"容器",icon:"ContentContainer"},"input-group":{type:"input-group",name:"文本",icon:"TextBox"},textarea:{type:"textarea",name:"多行文本",icon:"MultiTextBox"},lookup:{type:"lookup",name:"帮助",icon:"LookupEdit"},"number-spinner":{type:"number-spinner",name:"数值",icon:"NumericBox"},"date-picker":{type:"date-picker",name:"日期",icon:"DateBox"},switch:{type:"switch",name:"开关",icon:"SwitchField"},"radio-group":{type:"radio-group",name:"单选组",icon:"RadioGroup"},"check-box":{type:"check-box",name:"复选框",icon:"CheckBox"},"check-group":{type:"check-group",name:"复选框组",icon:"CheckGroup"},"combo-list":{type:"combo-list",name:"下拉列表",icon:"EnumField"},"response-form":{type:"response-form",name:"卡片面板",icon:"Form"},"response-layout":{type:"response-layout",name:"布局容器",icon:"ResponseLayout3"},"response-layout-item":{type:"response-layout-item",name:"布局",icon:"ResponseLayout1"},"tree-grid":{type:"tree-grid",name:"树表格",icon:"TreeGrid"},"tree-grid-column":{type:"tree-grid-column",name:"树表格列"},"data-grid":{type:"data-grid",name:"表格",icon:"DataGrid"},"data-grid-column":{type:"data-grid-column",name:"表格列"},module:{type:"Module",name:"模块",icon:"Module"},component:{type:"component",name:"组件",icon:"Component"},tabs:{type:"tabs",name:"标签页",icon:"Tab"},"tab-page":{type:"tab-page",name:"标签页项",dependentParentControl:"Tab"},"tab-toolbar-item":{type:"tab-toolbar-item",name:"标签页工具栏按钮",icon:"Button"},"time-picker":{type:"time-picker",name:"时间选择",icon:"TimePicker"},section:{type:"section",name:"分组面板",icon:"Section"},"section-toolbar":{type:"section-toolbar",name:"分组面板工具栏"},"section-toolbar-item":{type:"section-toolbar-item",name:"分组面板按钮"},splitter:{type:"splitter",name:"分栏面板",icon:"Splitter"},"splitter-pane":{type:"splitter-pane",name:"分栏面板项",dependentParentControl:"Splitter"},"component-ref":{type:"component-ref",name:"组件引用节点"},uploader:{type:"uploader",name:"附件上传",icon:"FileUpload"},"page-header":{type:"page-header",name:"页头",icon:"Header"},"page-footer":{type:"page-footer",name:"页脚",icon:"ModalFooter"},"tab-toolbar":{type:"tab-toolbar",name:"标签页工具栏",icon:"TabToolbar"},fieldset:{type:"fieldset",name:"分组",icon:"fieldset"}},ct={},st={};function Be(N){const{properties:s,title:t,ignore:w}=N,S=w&&Array.isArray(w),f=Object.keys(s).reduce((g,x)=>((!S||!w.find(p=>p==x))&&(g[x]=s[x].type==="object"&&s[x].properties?Be(s[x]):me.cloneDeep(s[x].default)),g),{});return t&&(!S||!w.find(g=>g=="id"))&&(f.id=`${t}-${Date.now()}`),f}function Ce(N,s={},t){const w=ct[N];if(w){let S=Be(w);const f=st[N];return S=f?f({getSchemaByType:Ce},S,s,t):S,S}return null}function ut(N,s,t){var V;function w(){t!=null&&t.resolveComponentContext&&t.resolveComponentContext()}w();const S=t&&t.getStyles&&t.getStyles()||"",f=t&&t.getDesignerClass&&t.getDesignerClass()||"",g=a.ref();function x(){return(s==null?void 0:s.schema.componentType)==="frame"?!1:t&&t.checkCanMoveComponent?t.checkCanMoveComponent():!0}function p(){return!1}function k(){return(s==null?void 0:s.schema.componentType)==="frame"?!1:t&&t.checkCanDeleteComponent?t.checkCanDeleteComponent():!0}function q(){return(s==null?void 0:s.schema.componentType)==="frame"?!0:t&&t.hideNestedPaddingInDesginerView?t.hideNestedPaddingInDesginerView():!1}function u(o){if(!o||!o.value)return null;if(o.value.schema&&o.value.schema.type==="component")return o.value;const C=a.ref(o==null?void 0:o.value.parent),B=u(C);return B||null}function D(o=s){const{componentInstance:C,designerItemElementRef:B}=o;return!C||!C.value?null:C.value.canMove?B:D(o.parent)}function c(o){return!!t&&t.canAccepts(o)}function n(){return(s==null?void 0:s.schema.label)||(s==null?void 0:s.schema.title)||(s==null?void 0:s.schema.name)}function r(){}function y(o,C){C&&t!=null&&t.onAcceptMovedChildElement&&t.onAcceptMovedChildElement(C)}function m(o,C){const{componentType:B}=o;let A=Ce(B,o,C);t&&t.onResolveNewComponentSchema&&(A=t.onResolveNewComponentSchema(o,A));const K=B.toLowerCase().replace("-","_");return A&&!A.id&&A.type===B&&(A.id=`${K}_${Math.random().toString().slice(2,6)}`),A}function F(o){}function O(...o){if(t&&t.getPropsConfig)return t.getPropsConfig(...o)}return g.value={canMove:x(),canSelectParent:p(),canDelete:k(),canNested:!q(),contents:s==null?void 0:s.schema.contents,elementRef:N,parent:(V=s==null?void 0:s.parent)==null?void 0:V.componentInstance,schema:s==null?void 0:s.schema,styles:S,designerClass:f,canAccepts:c,getBelongedComponentInstance:u,getDraggableDesignItemElement:D,getDraggingDisplayText:n,getPropConfig:O,getDragScopeElement:r,onAcceptMovedChildElement:y,onChildElementMovedOut:F,addNewChildComponentSchema:m,updateDragAndDropRules:w,triggerBelongedComponentToMoveWhenMoved:!!t&&t.triggerBelongedComponentToMoveWhenMoved||a.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:!!t&&t.triggerBelongedComponentToDeleteWhenDeleted||a.ref(!1)},g}function lt(N,s,t){var V;function w(){t!=null&&t.resolveComponentContext&&t.resolveComponentContext()}w();const S=t&&t.getStyles&&t.getStyles()||"",f=a.ref();function g(){return t&&t.checkCanMoveComponent?t.checkCanMoveComponent():!0}function x(){return!1}function p(){return t&&t.checkCanDeleteComponent?t.checkCanDeleteComponent():!0}function k(){return t&&t.checkCanAddComponent?t.checkCanAddComponent():!0}function q(){return!0}function u(o){if(!o||!o.value)return null;const C=a.ref(o==null?void 0:o.value.parent),B=u(C);return B||null}function D(o=s){const{componentInstance:C,designerItemElementRef:B}=o;return!C||!C.value?null:C.value.canMove||C.value.canAdd||C.value.canDelete?B:D(o.parent)}function c(o){return!!t&&t.canAccepts(o)}function n(){return(s==null?void 0:s.schema.label)||(s==null?void 0:s.schema.title)||(s==null?void 0:s.schema.name)}function r(){}function y(o,C){C&&t!=null&&t.onAcceptMovedChildElement&&t.onAcceptMovedChildElement(C)}function m(o){const{componentType:C}=o;let B=Ce(C,o);t&&t.onResolveNewComponentSchema&&(B=t.onResolveNewComponentSchema(o,B));const A=C.toLowerCase().replace("-","_");return B&&!B.id&&B.type===C&&(B.id=`${A}_${Math.random().toString().slice(2,6)}`),B}function F(o){}function O(...o){return t&&t.getPropsConfig?t.getPropsConfig(...o):[]}return f.value={canMove:g(),canSelectParent:x(),canAdd:k(),canDelete:p(),canNested:!q(),contents:[],elementRef:N,parent:(V=s.parent)==null?void 0:V.componentInstance,schema:s.schema,styles:S,canAccepts:c,getBelongedComponentInstance:u,getDraggableDesignItemElement:D,getDraggingDisplayText:n,getPropConfig:O,getDragScopeElement:r,onAcceptMovedChildElement:y,onChildElementMovedOut:F,addNewChildComponentSchema:m,updateDragAndDropRules:w,triggerBelongedComponentToMoveWhenMoved:!!t&&t.triggerBelongedComponentToMoveWhenMoved||a.ref(!1),triggerBelongedComponentToDeleteWhenDeleted:!!t&&t.triggerBelongedComponentToDeleteWhenDeleted||a.ref(!1)},f}v.DgControl=at,v.FDesignerCanvas=it,v.FDesignerItem=ge,v.designerCanvasProps=Pe,v.useDesignerComponent=ut,v.useDesignerInnerComponent=lt,Object.defineProperty(v,Symbol.toStringTag,{value:"Module"})});
|