ss-component-new 1.2.26 → 1.2.28

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/{MTLLoader-j7rSXeZy.js → MTLLoader-BreJsr54.js} +1 -1
  2. package/dist/{MTLLoader-CSavblQS.cjs → MTLLoader-Cqv49Ps8.cjs} +1 -1
  3. package/dist/{OrbitControls-BYxGl2XB.js → OrbitControls-BCu-cP7k.js} +1 -1
  4. package/dist/{OrbitControls-dRON011u.cjs → OrbitControls-C956u7BP.cjs} +1 -1
  5. package/dist/{animationData-rmZ0EGb8.cjs → animationData-C3-BiUgV.cjs} +1 -1
  6. package/dist/{animationData-Br4BCkiq.js → animationData-CMjNjOqc.js} +4 -4
  7. package/dist/{array-CeASBMWY.cjs → array-0u9Sf3UC.cjs} +1 -1
  8. package/dist/{array-Cx8FbegO.js → array-BGIM4b6g.js} +2 -2
  9. package/dist/{dataUtil-RzgUhlgJ.cjs → dataUtil-BFjWNDM1.cjs} +1 -1
  10. package/dist/{dataUtil-CJxHUail.js → dataUtil-D9l7-XhR.js} +2 -2
  11. package/dist/{fileUtil-BM6WhafY.cjs → fileUtil-BFtJHTM0.cjs} +1 -1
  12. package/dist/{fileUtil-BVzW5lTY.js → fileUtil-D7XVXEhb.js} +1 -1
  13. package/dist/{iconfont-J7S-v_zE.js → iconfont-B9Cj3DQM.js} +2 -2
  14. package/dist/{iconfont-Dsx_JtWY.cjs → iconfont-BDfcbq2v.cjs} +1 -1
  15. package/dist/icons/svg//344/272/272/345/203/217.svg +1 -0
  16. package/dist/{index-ClzEamlP.js → index-3QB55tXZ.js} +7 -7
  17. package/dist/{index-BGm3sgAn.cjs → index-B33wtiif.cjs} +1 -1
  18. package/dist/{index-D7wMQSEM.js → index-B8bpiPXB.js} +1 -1
  19. package/dist/{index-BvgHldVC.cjs → index-B9TlIok8.cjs} +12 -12
  20. package/dist/{index-DbHiWNBM.cjs → index-BWxbWhC9.cjs} +1 -1
  21. package/dist/{index-BoTEVRWS.js → index-BZwQB2HO.js} +5 -5
  22. package/dist/{index-DRSU72SE.js → index-BaE0DPgC.js} +66 -59
  23. package/dist/{index-DN8avrWv.cjs → index-BccOOMaP.cjs} +1 -1
  24. package/dist/index-BgHY8wmn.cjs +1 -0
  25. package/dist/{index-DpxXt1oz.js → index-Boazv8yC.js} +2 -2
  26. package/dist/{index-D5YeHxKp.js → index-BqRVuEsE.js} +6 -6
  27. package/dist/{index-CyNvD7fs.js → index-BwLaQntz.js} +1 -1
  28. package/dist/{index-Dr7mB3zJ.js → index-C-8LROmP.js} +2 -2
  29. package/dist/{index-DcT0aYIX.js → index-C1lZkQG-.js} +423 -423
  30. package/dist/{index-DWBL8V_4.js → index-C5UpEVah.js} +2 -2
  31. package/dist/index-C5fTUrKx.js +573 -0
  32. package/dist/{index-BH-cEIyF.cjs → index-C9_Cxm8G.cjs} +1 -1
  33. package/dist/{index-D5fqqSXr.cjs → index-CBFF2bsB.cjs} +1 -1
  34. package/dist/{index-YhB_cMji.cjs → index-CC9RkSBT.cjs} +1 -1
  35. package/dist/{index-BJkToJcC.cjs → index-CK5VdzmO.cjs} +1 -1
  36. package/dist/{index-CeWLT1YO.js → index-CKY0sj_X.js} +3 -3
  37. package/dist/{index-Cm99VII_.js → index-CMwwUi6o.js} +6 -6
  38. package/dist/{index-DjMSxB8D.cjs → index-CP7b7BrB.cjs} +1 -1
  39. package/dist/{index-BU5WJczo.js → index-CZu3TggJ.js} +1 -1
  40. package/dist/{index-Bp0GMpLC.cjs → index-C_cWjavY.cjs} +1 -1
  41. package/dist/{index-DVv2nM9_.cjs → index-Cd9j5j41.cjs} +1 -1
  42. package/dist/{index-B7l9bX5c.cjs → index-Cwh5m4lg.cjs} +1 -1
  43. package/dist/index-D0XPyuy4.cjs +1 -0
  44. package/dist/{index-lw6M4N-Q.cjs → index-D3TgRd-7.cjs} +1 -1
  45. package/dist/{index-Ie0BUTFu.js → index-D5Dtcn-_.js} +6 -6
  46. package/dist/{index-Bp5zOMHT.cjs → index-DE-uHAMH.cjs} +1 -1
  47. package/dist/{index-T2VihBuZ.js → index-DHOcRi3S.js} +6 -6
  48. package/dist/{index-CMIII30g.cjs → index-DMyPjpxO.cjs} +1 -1
  49. package/dist/{index-BvB9p0W4.js → index-DR7aNxVH.js} +4 -4
  50. package/dist/{index-0dw7iEtO.cjs → index-DVqfroe6.cjs} +1 -1
  51. package/dist/{index-ggXXcZCO.js → index-DiTYB-a4.js} +63 -58
  52. package/dist/index-DnFxL5wb.cjs +1 -0
  53. package/dist/{index-CaGluCnk.js → index-DqR3IwgZ.js} +12 -12
  54. package/dist/{index-zAZNzNG-.js → index-DsCD1neC.js} +2 -2
  55. package/dist/{index-CNxiv6y5.js → index-Dx2X9pR1.js} +43 -43
  56. package/dist/{index-C2B83Ywj.cjs → index-GGokR_Lx.cjs} +1 -1
  57. package/dist/{index-7pDDKkwc.js → index-HduGypr9.js} +34 -34
  58. package/dist/index-LcnC2GQ4.cjs +1 -0
  59. package/dist/{index-DoWGbQss.js → index-OTxJnh9Z.js} +153 -153
  60. package/dist/{index-DodooTli.js → index-Rr9ZBYig.js} +2 -2
  61. package/dist/{index-BEfXSiWp.js → index-Sa2hQZ0h.js} +2 -2
  62. package/dist/{index-BkcjJQlg.cjs → index-TKouySTA.cjs} +1 -1
  63. package/dist/{index-veEr0Ju4.js → index-gPnrvvE9.js} +1324 -1321
  64. package/dist/{index-BPxe8bKe.js → index-gXbhagnF.js} +3 -3
  65. package/dist/{index-CAPstY_B.cjs → index-mpoVA-DC.cjs} +1 -1
  66. package/dist/{index-C9GfFRyr.cjs → index-uIVtG4RY.cjs} +1 -1
  67. package/dist/index-wQJN1jpI.js +2466 -0
  68. package/dist/index-zLkhy4JK.cjs +1 -0
  69. package/dist/{index-DFbvbOsE.js → index-zZ9bfGNx.js} +1 -1
  70. package/dist/{index-DMHh2MZZ.cjs → index-znR89ub7.cjs} +1 -1
  71. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-DGl2lQmW.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-CuWDdCiy.js} +2 -2
  72. package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BWh0GUiI.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-TDoJ17os.cjs} +1 -1
  73. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-BjBzi9R7.js → index.vue_vue_type_style_index_0_scoped_92477073_lang-BQiH2RRX.js} +11 -11
  74. package/dist/{index.vue_vue_type_style_index_0_scoped_92477073_lang-BwjCaKYV.cjs → index.vue_vue_type_style_index_0_scoped_92477073_lang-Dqpyi0E8.cjs} +1 -1
  75. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-D21h7jT_.cjs +37 -0
  76. package/dist/{index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-DZGhek9_.js → index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-PE_6dfIO.js} +12719 -12591
  77. package/dist/{index.vue_vue_type_style_index_1_lang-BHt4rvMd.js → index.vue_vue_type_style_index_1_lang-9ANlnWKt.js} +5 -5
  78. package/dist/index.vue_vue_type_style_index_1_lang-CrmWclPR.cjs +32 -0
  79. package/dist/{index.vue_vue_type_style_index_1_lang-C2PJ2fvM.cjs → index.vue_vue_type_style_index_1_lang-D4RvHwPS.cjs} +1 -1
  80. package/dist/{index.vue_vue_type_style_index_1_lang-WD8HOZyf.js → index.vue_vue_type_style_index_1_lang-DwvuVXW6.js} +2580 -2471
  81. package/dist/{isString-BbPmUYHG.js → isString-BuBBWjRr.js} +1 -1
  82. package/dist/{main-DWa3MZxf.js → main-DpLQlLK2.js} +5 -5
  83. package/dist/{main-DlDkQh0n.cjs → main-Mx9r7ydp.cjs} +1 -1
  84. package/dist/ss-component.cjs +1 -1
  85. package/dist/ss-component.css +2 -2
  86. package/dist/ss-component.js +11 -11
  87. package/dist/ss-component2.cjs +1 -1
  88. package/dist/ss-component2.js +12 -12
  89. package/dist/{threeModel-CBsLcTcX.js → threeModel-CZ-qFwwk.js} +5 -5
  90. package/dist/{threeModel-Dt9Ounip.cjs → threeModel-DTwQnnAO.cjs} +1 -1
  91. package/dist/{threePreview-DSMFTIuC.cjs → threePreview-CUGoEzKf.cjs} +1 -1
  92. package/dist/{threePreview-D99A_IHZ.js → threePreview-DutKTPWH.js} +4 -4
  93. package/dist/{threeSceneView-BD22yXw4.js → threeSceneView-CzgWYHBw.js} +11 -11
  94. package/dist/{threeSceneView-Dv2uGsTN.cjs → threeSceneView-f1V-z4jr.cjs} +1 -1
  95. package/dist/{threeSceneViewForCPMPIP-CpBphI9E.js → threeSceneViewForCPMPIP-2sXIw3I1.js} +61 -61
  96. package/dist/{threeSceneViewForCPMPIP-DfaTaroP.cjs → threeSceneViewForCPMPIP-CojHDVHC.cjs} +1 -1
  97. package/dist/{threeTrackPathView-BGePzJh4.cjs → threeTrackPathView-BGHiOyJo.cjs} +1 -1
  98. package/dist/{threeTrackPathView-bFuXaesk.js → threeTrackPathView-DA4_8jas.js} +6 -6
  99. package/dist/{threeViewerHost-gGHqJpTR.js → threeViewerHost-BNObp9oA.js} +17 -17
  100. package/dist/{threeViewerHost-bQqnJLh9.cjs → threeViewerHost-D3WDKrIQ.cjs} +1 -1
  101. package/dist/{urdfTree-nXEMcLFV.cjs → urdfTree-CWStzmk2.cjs} +1 -1
  102. package/dist/{urdfTree-B2Zs54qS.js → urdfTree-CnkPddyT.js} +1 -1
  103. package/dist/{workpieceTreePanel-CXD_XizT.js → workpieceTreePanel-BvhFt3Xw.js} +5 -5
  104. package/dist/{workpieceTreePanel-Brforhya.cjs → workpieceTreePanel-DXyb_Wnw.cjs} +1 -1
  105. package/package.json +1 -1
  106. package/public/icons/svg//344/272/272/345/203/217.svg +1 -0
  107. package/dist/index-B3l8CoGZ.js +0 -2384
  108. package/dist/index-BRAUJGR3.cjs +0 -1
  109. package/dist/index-BjRAas3a.cjs +0 -1
  110. package/dist/index-Cf9NTS7v.cjs +0 -1
  111. package/dist/index-D3x3jleA.js +0 -654
  112. package/dist/index-DWTsFx-2.cjs +0 -1
  113. package/dist/index-Dc8TgzRR.cjs +0 -1
  114. package/dist/index.vue_vue_type_style_index_0_scoped_bcdf4fb0_lang-BKfBwnMQ.cjs +0 -37
  115. package/dist/index.vue_vue_type_style_index_1_lang-f2wxl9Ai.cjs +0 -32
@@ -1,4 +1,4 @@
1
- import { bR as r, i as t, bS as s } from "./index-7pDDKkwc.js";
1
+ import { bS as r, i as t, bT as s } from "./index-HduGypr9.js";
2
2
  var n = "[object String]";
3
3
  function g(i) {
4
4
  return typeof i == "string" || !t(i) && r(i) && s(i) == n;
@@ -1,9 +1,9 @@
1
1
  import { ref as _, watch as V, createElementBlock as C, createCommentVNode as I, openBlock as f, Fragment as le, renderList as se, createElementVNode as O, createBlock as Z, toDisplayString as v, resolveDynamicComponent as ue, onMounted as ce, onUnmounted as ie, createVNode as A } from "vue";
2
- import { m as me, a as de, b as ye } from "./index-Cm99VII_.js";
3
- import { p as E, s as ee, c as k } from "./index-7pDDKkwc.js";
4
- import { a as te, u as fe } from "./index.vue_vue_type_style_index_1_lang-WD8HOZyf.js";
5
- import { g as ge } from "./index-DcT0aYIX.js";
6
- import { e as he, a as ke } from "./array-Cx8FbegO.js";
2
+ import { m as me, a as de, b as ye } from "./index-CMwwUi6o.js";
3
+ import { p as E, s as ee, c as k } from "./index-HduGypr9.js";
4
+ import { a as te, u as fe } from "./index.vue_vue_type_style_index_1_lang-DwvuVXW6.js";
5
+ import { g as ge } from "./index-C1lZkQG-.js";
6
+ import { e as he, a as ke } from "./array-BGIM4b6g.js";
7
7
  import { _ as ne } from "./_plugin-vue_export-helper-CHgC5LLL.js";
8
8
  const x = [
9
9
  {
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-DMHh2MZZ.cjs"),i=require("./index-Dv1G67_Q.cjs"),T=require("./index.vue_vue_type_style_index_1_lang-f2wxl9Ai.cjs"),Z=require("./index-lw6M4N-Q.cjs"),G=require("./array-CeASBMWY.cjs"),K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"}],s=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"LineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"}],v={key:0,class:"show-content"},ee={class:"item-view-group"},te={__name:"index",props:{content:String,jsonContents:Array},emits:["change"],setup(x,{emit:E}){const t=x,j=E,h=T.useModelComp(i.pinia),{itemData:_}=i.storeToRefs(h),p=e.ref([]),C=e.ref([]),I=c=>{j("change",{wholeValue:p.value,editValue:c})},S=c=>{const g=i.cloneDeep(p.value),B=g==null?void 0:g.map((d,b)=>(b===(c==null?void 0:c.index)&&(d.compData=c==null?void 0:c.contents),d));p.value=B};e.watch(()=>_.value,()=>{var c;!_.value||((c=_.value)==null?void 0:c.length)===0||(C.value=_.value,p.value=_.value)},{deep:!0,immediate:!0}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{var g;if(((g=t==null?void 0:t.jsonContents)==null?void 0:g.length)>0){h.setOriginalData(t==null?void 0:t.jsonContents),h.setItemData(t==null?void 0:t.jsonContents);return}if(!(t!=null&&t.content)||(t==null?void 0:t.content)==="")return;const c=G.expandStringToJson(t==null?void 0:t.content);h.setOriginalData(c),h.setItemData(c)},{deep:!0,immediate:!0});const w=c=>Z.getComponent(c);return(c,g)=>{var B;return((B=C.value)==null?void 0:B.length)>0?(e.openBlock(),e.createElementBlock("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(d,b)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:b},[e.createElementVNode("div",ee,e.toDisplayString(d.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w(d.comp)),{itemData:d==null?void 0:d.compData,childItemData:d==null?void 0:d.itemChildData,key:b,onChange:I,index:b,onContentChange:S},null,40,["itemData","childItemData","index"]))]))),128))])):e.createCommentVNode("",!0)}}},ne=K._export_sfc(te,[["__scopeId","data-v-1c04adc8"]]),oe={class:"add-model-content"},ae={key:0,class:"model-import-data"},re={class:"import-button"},le={key:0},ce={key:1,class:"model-operate"},se={class:"model-select"},ue={class:"model-fill"},ie={key:2,class:"model-view ssComponent"},de={__name:"main",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change"],setup(x,{emit:E}){const t=x,j=E,h=e.ref(""),_=e.ref([]),p=e.ref(0),C=T.useModelComp(i.pinia);T.useMenuState(i.pinia);const{itemData:I,originalData:S}=i.storeToRefs(C),w=e.ref(null),c=e.ref(0),g=e.ref(""),B=()=>{p.value=window.innerWidth},d=async r=>{var u;const a=(u=i.cloneDeep(r==null?void 0:r.wholeValue))==null?void 0:u.map(o=>{var f;return(o==null?void 0:o.comp)==="Form"&&(o.compData=(f=o.compData)==null?void 0:f.map(k=>((k==null?void 0:k.key)==="formContent"&&(k.contents=G.arrayToNumberArray(k==null?void 0:k.contents)),k))),o});j("change",{originalContents:S.value,currentContents:r==null?void 0:r.wholeValue,editContent:r==null?void 0:r.editValue,stringContent:b(i.cloneDeep(r==null?void 0:r.wholeValue)),arrayToContents:a})},b=r=>{var u;let a=[];return(u=i.cloneDeep(r))==null||u.forEach(o=>{var f,k;V!=null&&V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp))&&a.push(((f=V==null?void 0:V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp)))==null?void 0:f.key)+"="+o.name+"/r/n"),(k=o==null?void 0:o.compData)==null||k.forEach(n=>{var F,$,J,A,q,M,L,R,z,W,H,P;if(s!=null&&s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))if(!((F=n==null?void 0:n.contents)!=null&&F.length))a.push((($=s==null?void 0:s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))==null?void 0:$.key)+"="+(n.contents===!0?'""':"Vertical")+"/r/n");else{let m=(J=n==null?void 0:n.contents)==null?void 0:J[0];if(!m)return;if(Object.keys(m).includes("label")&&Object.keys(m).includes("key")&&Object.keys(m).includes("width"))if(((q=(A=n.contents)==null?void 0:A.filter(y=>y.width!==1))==null?void 0:q.length)===0){const y=(M=i.cloneDeep(n==null?void 0:n.contents))==null?void 0:M.map(l=>({[l.label]:l.value}));a.push(((L=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:L.key)+"="+JSON.stringify(y)+"/r/n")}else{let y=[];(R=i.cloneDeep(n==null?void 0:n.contents))==null||R.reduce((l,D)=>{var U;return l[D.label]=D.key,((U=Object.keys(i.cloneDeep(l)))==null?void 0:U.length)>=D.width&&(y.push(i.cloneDeep(l)),l={}),l},{}),a.push(((z=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:z.key)+"="+JSON.stringify(y)+"/r/n")}else if(Object.keys(m).includes("label")){const y=(W=i.cloneDeep(n==null?void 0:n.contents))==null?void 0:W.map(l=>l.label);a.push(((H=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:H.key)+"="+JSON.stringify(y)+"/r/n")}else a.push(((P=s==null?void 0:s.find(y=>(y==null?void 0:y.value)===(n==null?void 0:n.key)))==null?void 0:P.key)+"="+JSON.stringify(n==null?void 0:n.contents)+"/r/n")}})}),JSON.stringify(a)},N=e.ref([]),Q=()=>{w.value.click()},X=r=>{const a=r.target.files[0];if(!a)return;const u=new FileReader;u.onload=o=>{try{h.value=o.target.result,N.value=Y(o.target.result),c.value++}catch(f){console.error("解析失败:",f)}},u.onerror=o=>{console.error("文件读取错误:",o)},u.readAsText(a)};e.onMounted(()=>{window.addEventListener("resize",B)}),e.onUnmounted(()=>{window.removeEventListener("resize",B)}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{h.value=t==null?void 0:t.content,_.value=t==null?void 0:t.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>c.value,()=>{var r;((r=N.value)==null?void 0:r.length)!==0&&(C.setOriginalData(N.value),C.setItemData(N.value))},{deep:!0,immediate:!0});const Y=r=>{let a=r.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");a=a.replace(/(\w+)\s*:/g,"$1:"),a=a.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),a=a.replace(/,\s*([}\]])/g,"$1"),a=a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(a)}catch(u){try{const f=new Function(`return ${a}`)();if(Array.isArray(f)||typeof f=="object")return f;throw new Error(`解析结果不是有效的数组或对象: ${u}`)}catch(o){throw new Error(`无法解析JSON: ${o.message}`)}}};return(r,a)=>{var u;return e.openBlock(),e.createElementBlock("div",oe,[((u=t==null?void 0:t.jsonContents)==null?void 0:u.length)===0?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",re,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:w,accept:".txt",onChange:X,style:{display:"none"}},null,544),e.createElementVNode("button",{onClick:Q,class:"import-button-content"},"导入文件"),g.value?(e.openBlock(),e.createElementBlock("span",le,e.toDisplayString(g.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",se,[e.createVNode(O.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:p.value},[e.createVNode(O.modelShow)])),e.createElementVNode("div",ue,[e.createVNode(O.modelFill)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="view"?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(ne,{content:h.value,onChange:d,jsonContents:_.value,key:p.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},me=K._export_sfc(de,[["__scopeId","data-v-91ce80be"]]);exports.default=me;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("vue"),O=require("./index-znR89ub7.cjs"),i=require("./index-Dv1G67_Q.cjs"),T=require("./index.vue_vue_type_style_index_1_lang-CrmWclPR.cjs"),Z=require("./index-D3TgRd-7.cjs"),G=require("./array-0u9Sf3UC.cjs"),K=require("./_plugin-vue_export-helper-BHFhmbuH.cjs"),V=[{key:"FormName",value:"Form"},{key:"TableName",value:"Table"}],s=[{key:"FormDirect",value:"formFlex"},{key:"Form",value:"formContent"},{key:"FormButton",value:"formButton"},{key:"TableColumns",value:"header"},{key:"TableButton",value:"extraButton"},{key:"LineButton",value:"rowButton"},{key:"Table",value:"tableContents"},{key:"TableIndex",value:"tableIndex"}],v={key:0,class:"show-content"},ee={class:"item-view-group"},te={__name:"index",props:{content:String,jsonContents:Array},emits:["change"],setup(x,{emit:E}){const t=x,j=E,h=T.useModelComp(i.pinia),{itemData:_}=i.storeToRefs(h),p=e.ref([]),C=e.ref([]),I=c=>{j("change",{wholeValue:p.value,editValue:c})},S=c=>{const g=i.cloneDeep(p.value),B=g==null?void 0:g.map((d,b)=>(b===(c==null?void 0:c.index)&&(d.compData=c==null?void 0:c.contents),d));p.value=B};e.watch(()=>_.value,()=>{var c;!_.value||((c=_.value)==null?void 0:c.length)===0||(C.value=_.value,p.value=_.value)},{deep:!0,immediate:!0}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{var g;if(((g=t==null?void 0:t.jsonContents)==null?void 0:g.length)>0){h.setOriginalData(t==null?void 0:t.jsonContents),h.setItemData(t==null?void 0:t.jsonContents);return}if(!(t!=null&&t.content)||(t==null?void 0:t.content)==="")return;const c=G.expandStringToJson(t==null?void 0:t.content);h.setOriginalData(c),h.setItemData(c)},{deep:!0,immediate:!0});const w=c=>Z.getComponent(c);return(c,g)=>{var B;return((B=C.value)==null?void 0:B.length)>0?(e.openBlock(),e.createElementBlock("div",v,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(C.value,(d,b)=>(e.openBlock(),e.createElementBlock("div",{class:"item-content",key:b},[e.createElementVNode("div",ee,e.toDisplayString(d.name),1),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(w(d.comp)),{itemData:d==null?void 0:d.compData,childItemData:d==null?void 0:d.itemChildData,key:b,onChange:I,index:b,onContentChange:S},null,40,["itemData","childItemData","index"]))]))),128))])):e.createCommentVNode("",!0)}}},ne=K._export_sfc(te,[["__scopeId","data-v-1c04adc8"]]),oe={class:"add-model-content"},ae={key:0,class:"model-import-data"},re={class:"import-button"},le={key:0},ce={key:1,class:"model-operate"},se={class:"model-select"},ue={class:"model-fill"},ie={key:2,class:"model-view ssComponent"},de={__name:"main",props:{mode:{type:String,default:"view"},content:{type:String,default:""},jsonContents:{type:Array,default:()=>[]},showButton:{type:Boolean,default:!0}},emits:["change"],setup(x,{emit:E}){const t=x,j=E,h=e.ref(""),_=e.ref([]),p=e.ref(0),C=T.useModelComp(i.pinia);T.useMenuState(i.pinia);const{itemData:I,originalData:S}=i.storeToRefs(C),w=e.ref(null),c=e.ref(0),g=e.ref(""),B=()=>{p.value=window.innerWidth},d=async r=>{var u;const a=(u=i.cloneDeep(r==null?void 0:r.wholeValue))==null?void 0:u.map(o=>{var f;return(o==null?void 0:o.comp)==="Form"&&(o.compData=(f=o.compData)==null?void 0:f.map(k=>((k==null?void 0:k.key)==="formContent"&&(k.contents=G.arrayToNumberArray(k==null?void 0:k.contents)),k))),o});j("change",{originalContents:S.value,currentContents:r==null?void 0:r.wholeValue,editContent:r==null?void 0:r.editValue,stringContent:b(i.cloneDeep(r==null?void 0:r.wholeValue)),arrayToContents:a})},b=r=>{var u;let a=[];return(u=i.cloneDeep(r))==null||u.forEach(o=>{var f,k;V!=null&&V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp))&&a.push(((f=V==null?void 0:V.find(n=>(n==null?void 0:n.value)===(o==null?void 0:o.comp)))==null?void 0:f.key)+"="+o.name+"/r/n"),(k=o==null?void 0:o.compData)==null||k.forEach(n=>{var F,$,J,A,q,M,L,R,z,W,H,P;if(s!=null&&s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))if(!((F=n==null?void 0:n.contents)!=null&&F.length))a.push((($=s==null?void 0:s.find(m=>(m==null?void 0:m.value)===(n==null?void 0:n.key)))==null?void 0:$.key)+"="+(n.contents===!0?'""':"Vertical")+"/r/n");else{let m=(J=n==null?void 0:n.contents)==null?void 0:J[0];if(!m)return;if(Object.keys(m).includes("label")&&Object.keys(m).includes("key")&&Object.keys(m).includes("width"))if(((q=(A=n.contents)==null?void 0:A.filter(y=>y.width!==1))==null?void 0:q.length)===0){const y=(M=i.cloneDeep(n==null?void 0:n.contents))==null?void 0:M.map(l=>({[l.label]:l.value}));a.push(((L=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:L.key)+"="+JSON.stringify(y)+"/r/n")}else{let y=[];(R=i.cloneDeep(n==null?void 0:n.contents))==null||R.reduce((l,D)=>{var U;return l[D.label]=D.key,((U=Object.keys(i.cloneDeep(l)))==null?void 0:U.length)>=D.width&&(y.push(i.cloneDeep(l)),l={}),l},{}),a.push(((z=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:z.key)+"="+JSON.stringify(y)+"/r/n")}else if(Object.keys(m).includes("label")){const y=(W=i.cloneDeep(n==null?void 0:n.contents))==null?void 0:W.map(l=>l.label);a.push(((H=s==null?void 0:s.find(l=>(l==null?void 0:l.value)===(n==null?void 0:n.key)))==null?void 0:H.key)+"="+JSON.stringify(y)+"/r/n")}else a.push(((P=s==null?void 0:s.find(y=>(y==null?void 0:y.value)===(n==null?void 0:n.key)))==null?void 0:P.key)+"="+JSON.stringify(n==null?void 0:n.contents)+"/r/n")}})}),JSON.stringify(a)},N=e.ref([]),Q=()=>{w.value.click()},X=r=>{const a=r.target.files[0];if(!a)return;const u=new FileReader;u.onload=o=>{try{h.value=o.target.result,N.value=Y(o.target.result),c.value++}catch(f){console.error("解析失败:",f)}},u.onerror=o=>{console.error("文件读取错误:",o)},u.readAsText(a)};e.onMounted(()=>{window.addEventListener("resize",B)}),e.onUnmounted(()=>{window.removeEventListener("resize",B)}),e.watch(()=>[t==null?void 0:t.content,t==null?void 0:t.jsonContents],()=>{h.value=t==null?void 0:t.content,_.value=t==null?void 0:t.jsonContents},{deep:!0,immediate:!0}),e.watch(()=>c.value,()=>{var r;((r=N.value)==null?void 0:r.length)!==0&&(C.setOriginalData(N.value),C.setItemData(N.value))},{deep:!0,immediate:!0});const Y=r=>{let a=r.replace(/,/g,",").replace(/;/g,";").replace(/:/g,":");a=a.replace(/(\w+)\s*:/g,"$1:"),a=a.replace(/\r\n/g,"").replace(/\n/g,"").replace(/\t/g,"").replace(/\s+/g," ").trim(),a=a.replace(/,\s*([}\]])/g,"$1"),a=a.replace(/:(\s*)([^"{}\[\],\s]+)(\s*)([,}])/g,": $2$4");try{return JSON.parse(a)}catch(u){try{const f=new Function(`return ${a}`)();if(Array.isArray(f)||typeof f=="object")return f;throw new Error(`解析结果不是有效的数组或对象: ${u}`)}catch(o){throw new Error(`无法解析JSON: ${o.message}`)}}};return(r,a)=>{var u;return e.openBlock(),e.createElementBlock("div",oe,[((u=t==null?void 0:t.jsonContents)==null?void 0:u.length)===0?(e.openBlock(),e.createElementBlock("div",ae,[e.createElementVNode("div",re,[e.createElementVNode("input",{type:"file",ref_key:"fileInput",ref:w,accept:".txt",onChange:X,style:{display:"none"}},null,544),e.createElementVNode("button",{onClick:Q,class:"import-button-content"},"导入文件"),g.value?(e.openBlock(),e.createElementBlock("span",le,e.toDisplayString(g.value),1)):e.createCommentVNode("",!0)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="edit"?(e.openBlock(),e.createElementBlock("div",ce,[e.createElementVNode("div",se,[e.createVNode(O.modelSelect)]),(e.openBlock(),e.createElementBlock("div",{class:"model-show",key:p.value},[e.createVNode(O.modelShow)])),e.createElementVNode("div",ue,[e.createVNode(O.modelFill)])])):e.createCommentVNode("",!0),(t==null?void 0:t.mode)==="view"?(e.openBlock(),e.createElementBlock("div",ie,[(e.openBlock(),e.createBlock(ne,{content:h.value,onChange:d,jsonContents:_.value,key:p.value},null,8,["content","jsonContents"]))])):e.createCommentVNode("",!0)])}}},me=K._export_sfc(de,[["__scopeId","data-v-91ce80be"]]);exports.default=me;
@@ -1 +1 @@
1
- "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),v=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-BWh0GUiI.cjs");const C=require("./index.vue_vue_type_style_index_1_lang-f2wxl9Ai.cjs");require("./index-Dv1G67_Q.cjs");const s=require("./ss-component2.cjs"),t=require("./index-9hspBVrQ.cjs"),r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./main-DlDkQh0n.cjs")));r.install=e=>{e.component("ssComponent",r)};const i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-BvgHldVC.cjs")).then(e=>e.index$1));i.install=e=>{e.component("ssTab",i)};const c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DVv2nM9_.cjs")));c.install=e=>{e.component("ssMenu",c)};const l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DjMSxB8D.cjs")));l.install=e=>{e.component("ssMenuComponent",l)};const m=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-0dw7iEtO.cjs")));m.install=e=>{e.component("ssCanvas",m)};const u=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DEEZPcpU.cjs")));u.install=e=>{e.component("ssFold",u)};const a=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Cf9NTS7v.cjs")).then(e=>e.index));a.install=e=>{e.component("ssAvatar",a)};const h=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeModel-Dt9Ounip.cjs")));h.install=e=>{e.component("ssThree",h)};const f=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeViewerHost-bQqnJLh9.cjs")).then(e=>e.threeViewerHost));f.install=e=>{e.component("threeViewerHost",f)};const p=C.useMenuState(),P=[r,i,c,l,m,u,a,h,f],q=e=>{P.forEach(o=>{e.use(o)}),e.use(s),e.config.globalProperties.$router=s},g=e=>{switch(e){case"browser":return t.browserThemeConfig;case"client":return t.clientThemeConfig;case"three":return t.threeThemeConfig}},y=e=>{const o=document.documentElement;e==null||e.forEach(d=>{o.style.setProperty(d.name,d.value)})},A=e=>{p.setPlatform(e);const o=g(e);y(o)},T={getPlatform:p.getPlatform,setPlatform:p.setPlatform,initPlatform:A};exports.SvgIcon=v.SvgIcon;exports.router=s;exports.default=q;exports.platformApi=T;
1
+ "use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const n=require("vue"),v=require("./index-BpPyaNFa.cjs");require("./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-TDoJ17os.cjs");const C=require("./index.vue_vue_type_style_index_1_lang-CrmWclPR.cjs");require("./index-Dv1G67_Q.cjs");const s=require("./ss-component2.cjs"),t=require("./index-9hspBVrQ.cjs"),r=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./main-Mx9r7ydp.cjs")));r.install=e=>{e.component("ssComponent",r)};const i=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-B9TlIok8.cjs")).then(e=>e.index$1));i.install=e=>{e.component("ssTab",i)};const c=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-Cd9j5j41.cjs")));c.install=e=>{e.component("ssMenu",c)};const l=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-CP7b7BrB.cjs")));l.install=e=>{e.component("ssMenuComponent",l)};const m=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DVqfroe6.cjs")));m.install=e=>{e.component("ssCanvas",m)};const u=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-DEEZPcpU.cjs")));u.install=e=>{e.component("ssFold",u)};const a=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./index-LcnC2GQ4.cjs")).then(e=>e.index));a.install=e=>{e.component("ssAvatar",a)};const h=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeModel-DTwQnnAO.cjs")));h.install=e=>{e.component("ssThree",h)};const f=n.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./threeViewerHost-D3WDKrIQ.cjs")).then(e=>e.threeViewerHost));f.install=e=>{e.component("threeViewerHost",f)};const p=C.useMenuState(),P=[r,i,c,l,m,u,a,h,f],q=e=>{P.forEach(o=>{e.use(o)}),e.use(s),e.config.globalProperties.$router=s},g=e=>{switch(e){case"browser":return t.browserThemeConfig;case"client":return t.clientThemeConfig;case"three":return t.threeThemeConfig}},y=e=>{const o=document.documentElement;e==null||e.forEach(d=>{o.style.setProperty(d.name,d.value)})},A=e=>{p.setPlatform(e);const o=g(e);y(o)},T={getPlatform:p.getPlatform,setPlatform:p.setPlatform,initPlatform:A};exports.SvgIcon=v.SvgIcon;exports.router=s;exports.default=q;exports.platformApi=T;