bi-sdk-react 0.0.71 → 0.0.72
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/dist/es/js/bi-sdk.es.js +1 -1
- package/dist/index.html +1 -0
- package/dist/static/css/index.0c6f4f43.css +1 -0
- package/dist/static/js/index.08767759.js +1443 -0
- package/dist/static/js/vendor.7e15421f.js +477 -0
- package/dist/static/js/vendor.7e15421f.js.LICENSE.txt +208 -0
- package/dist/umd/js/bi-sdk.umd.min.js +9 -9
- package/package.json +1 -1
- package/src/components/layout/PageItem.tsx +23 -1
package/dist/es/js/bi-sdk.es.js
CHANGED
|
@@ -51,7 +51,7 @@ import*as e from"react";import t,{css as n}from"styled-components";import{AlignC
|
|
|
51
51
|
&:before {
|
|
52
52
|
content: "组件已隐藏";
|
|
53
53
|
}
|
|
54
|
-
`,nm=e=>{let{item:t,ancestors:n,onAddAt:r,onDelete:i,onCopy:a,onUpdate:o,onSelect:s}=e,[l,d]=(0,tT.useState)(JSON.stringify(t||{},null,2)),[h,p]=(0,tT.useState)(!1),f=(0,tT.useRef)(null),g=(0,tk.jsx)(ev.Text,{children:t.name||t.type+`(${t.id})`});return(0,tk.jsxs)(tk.Fragment,{children:[(0,tk.jsx)(en,{title:`源码编辑(${t.name||t.type+`(${t.id})`})`,open:h,width:700,onCancel:()=>{p(!1),f.current=null},styles:{body:{margin:"0 -24px"}},footer:(0,tk.jsxs)(ec,{children:[(0,tk.jsx)(H,{onClick:()=>{p(!1),f.current=null},children:"取消"}),(0,tk.jsx)(H,{onClick:()=>{d(JSON.stringify(t||{},null,2))},children:"重置"}),(0,tk.jsx)(H,{onClick:()=>{var e,t;let n=null==(e=f.current)?void 0:e.editor;null==n||null==(t=n.getAction("editor.action.formatDocument"))||t.run()},children:"格式化"}),(0,tk.jsx)(H,{type:"primary",onClick:()=>{p(!1),Object.assign(t,JSON.parse(l)),o&&o()},children:"保存"})]}),children:(0,tk.jsx)(ew,{height:"400px",defaultLanguage:"json",value:l,onChange:e=>d(e||""),options:{minimap:{enabled:!1}},onMount:e=>{f.current={editor:e}}})}),(0,tk.jsxs)(nf,{children:[(null==n?void 0:n.length)?(0,tk.jsx)(K,{placement:"topLeft",menu:{style:{borderRadius:0,padding:0,background:"none",boxShadow:"none"},items:n.map(e=>({label:(null==e?void 0:e.name)||(null==e?void 0:e.type)+`(${null==e?void 0:e.id})`,key:null==e?void 0:e.id,onClick:()=>{null==s||s(e)}}))},styles:{item:{borderRadius:2,background:"rgba(24, 144, 255, 0.8)",padding:"2px 8px",color:"#fff",fontSize:12,marginTop:2}},children:g}):g,r&&(0,tk.jsx)(eg,{title:"添加到对话",children:(0,tk.jsx)("a",{onClick:r,children:(0,tk.jsx)(np,{type:"icon-number"})})}),(0,tk.jsx)(eg,{title:"源码编辑",children:(0,tk.jsx)("a",{onClick:e=>{e.stopPropagation(),p(!0)},children:(0,tk.jsx)(np,{type:"icon-json"})})}),(0,tk.jsx)(eg,{title:"复制",children:(0,tk.jsx)("a",{onClick:a,children:(0,tk.jsx)(u,{})})}),(0,tk.jsx)(eg,{title:"删除",children:(0,tk.jsx)("a",{onClick:i,children:(0,tk.jsx)(c,{})})})]})]})},nv=e=>{var t,n,r;let{item:i,onCopy:a,onDelete:o,ancestors:s,parentList:l,onListChange:u,index:c}=e,{designable:d,selectedItem:h,setSelectedItem:p,plugins:f,onAddAtItem:g,onRemoveAtItem:m,forceUpdate:v,fetch:y,globalVars:x,env:_}=(0,tT.useContext)(tM),[b,w]=(0,tT.useState)(!1),[S,C]=(0,tT.useState)(null),j=e=>{e.stopPropagation(),en.confirm({title:"确认删除吗?",okText:"确认",cancelText:"取消",okType:"danger",onOk:()=>{o&&o(),m&&m(i)}})},k=e=>{e.stopPropagation(),a&&a(i)},T=e=>{e.stopPropagation(),g&&g(i)},I=null==(t=f.find(e=>e.key===i.type))?void 0:t.component,M=(0,tT.useMemo)(()=>{let e=i.hideExpression;if(!(null==e?void 0:e.length))return!1;try{return Function("$g","$e",`
|
|
54
|
+
`,nm=e=>{let{item:t,ancestors:n,onAddAt:r,onDelete:i,onCopy:a,onUpdate:o,onSelect:s}=e,[l,d]=(0,tT.useState)(JSON.stringify(t||{},null,2)),[h,p]=(0,tT.useState)(!1),f=(0,tT.useRef)(null),g=(0,tk.jsx)(ev.Text,{children:t.name||t.type+`(${t.id})`});return(0,tk.jsxs)(tk.Fragment,{children:[(0,tk.jsx)(en,{title:`源码编辑(${t.name||t.type+`(${t.id})`})`,open:h,width:700,onCancel:()=>{p(!1),f.current=null},styles:{body:{margin:"0 -24px"}},modalRender:e=>(0,tk.jsx)("div",{onClick:e=>{e.stopPropagation()},onMouseDown:e=>{e.stopPropagation()},onMouseUp:e=>{e.stopPropagation()},onPointerDown:e=>{e.stopPropagation()},children:e}),footer:(0,tk.jsxs)(ec,{children:[(0,tk.jsx)(H,{onClick:()=>{p(!1),f.current=null},children:"取消"}),(0,tk.jsx)(H,{onClick:()=>{d(JSON.stringify(t||{},null,2))},children:"重置"}),(0,tk.jsx)(H,{onClick:()=>{var e,t;let n=null==(e=f.current)?void 0:e.editor;null==n||null==(t=n.getAction("editor.action.formatDocument"))||t.run()},children:"格式化"}),(0,tk.jsx)(H,{type:"primary",onClick:()=>{p(!1),Object.assign(t,JSON.parse(l)),o&&o()},children:"保存"})]}),children:(0,tk.jsx)(ew,{height:"400px",defaultLanguage:"json",value:l,onChange:e=>d(e||""),options:{minimap:{enabled:!1}},onMount:e=>{f.current={editor:e}}})}),(0,tk.jsxs)(nf,{onClick:e=>{e.stopPropagation()},children:[(null==n?void 0:n.length)?(0,tk.jsx)(K,{placement:"topLeft",menu:{style:{borderRadius:0,padding:0,background:"none",boxShadow:"none"},items:n.map(e=>({label:(null==e?void 0:e.name)||(null==e?void 0:e.type)+`(${null==e?void 0:e.id})`,key:null==e?void 0:e.id,onClick:()=>{null==s||s(e)}}))},styles:{item:{borderRadius:2,background:"rgba(24, 144, 255, 0.8)",padding:"2px 8px",color:"#fff",fontSize:12,marginTop:2}},children:g}):g,r&&(0,tk.jsx)(eg,{title:"添加到对话",children:(0,tk.jsx)("a",{onClick:r,children:(0,tk.jsx)(np,{type:"icon-number"})})}),(0,tk.jsx)(eg,{title:"源码编辑",children:(0,tk.jsx)("a",{onClick:e=>{e.stopPropagation(),p(!0)},children:(0,tk.jsx)(np,{type:"icon-json"})})}),(0,tk.jsx)(eg,{title:"复制",children:(0,tk.jsx)("a",{onClick:a,children:(0,tk.jsx)(u,{})})}),(0,tk.jsx)(eg,{title:"删除",children:(0,tk.jsx)("a",{onClick:i,children:(0,tk.jsx)(c,{})})})]})]})},nv=e=>{var t,n,r;let{item:i,onCopy:a,onDelete:o,ancestors:s,parentList:l,onListChange:u,index:c}=e,{designable:d,selectedItem:h,setSelectedItem:p,plugins:f,onAddAtItem:g,onRemoveAtItem:m,forceUpdate:v,fetch:y,globalVars:x,env:_}=(0,tT.useContext)(tM),[b,w]=(0,tT.useState)(!1),[S,C]=(0,tT.useState)(null),j=e=>{e.stopPropagation(),en.confirm({title:"确认删除吗?",okText:"确认",cancelText:"取消",okType:"danger",onOk:()=>{o&&o(),m&&m(i)}})},k=e=>{e.stopPropagation(),a&&a(i)},T=e=>{e.stopPropagation(),g&&g(i)},I=null==(t=f.find(e=>e.key===i.type))?void 0:t.component,M=(0,tT.useMemo)(()=>{let e=i.hideExpression;if(!(null==e?void 0:e.length))return!1;try{return Function("$g","$e",`
|
|
55
55
|
"use strict";
|
|
56
56
|
const window = undefined;
|
|
57
57
|
const document = undefined;
|
package/dist/index.html
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<!doctype html><html><head><title>BI SDK EXAMPLE</title><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0"><script defer src="/static/js/vendor.7e15421f.js"></script><script defer src="/static/js/index.08767759.js"></script><link href="/static/css/index.0c6f4f43.css" rel="stylesheet"></head><body><div id="root"></div></body></html>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.ant-dropdown-menu-vertical{max-height:70vh;overflow:auto}a.toolbar{color:var(--ant-color-text-secondary)}a.toolbar.active{color:var(--ant-color-primary)}.ant-form-compact .ant-form-item{margin-bottom:8px}.ant-form-item-label label{align-items:center;display:inline-flex}.ant-form-item.ant-form-item-label-space .ant-form-item-label label{justify-content:space-between;align-items:center;width:100%;display:flex}.ant-form-item.ant-form-item-label-space .ant-form-item-label label:after{content:none}.ant-btn-link{padding:0}
|