go-xcel-interpret 1.3.1 → 1.3.3
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.
|
@@ -211,7 +211,7 @@ See https://s-c.sh/2BAXzed for more info.`),window[Kf]+=1);let Kc;function kj(t,
|
|
|
211
211
|
`,JI=je.div`
|
|
212
212
|
margin-bottom: 24px;
|
|
213
213
|
`,QI=je.label`
|
|
214
|
-
|
|
214
|
+
font-size: ${t=>t.size==="small"?"14px":t.size==="large"?"16px":"14px"};
|
|
215
215
|
display: block;
|
|
216
216
|
margin-bottom: 8px;
|
|
217
217
|
color: rgba(0, 0, 0, 0.85);
|
|
@@ -830,4 +830,4 @@ the last node, the show column modification can be applied.`);const{crossHiddenC
|
|
|
830
830
|
height: 100%;
|
|
831
831
|
display: flex;
|
|
832
832
|
flex-direction: column;
|
|
833
|
-
`,kge=({clientId:t,templateId:e,onData:r,options:n})=>{const{lastMessage:i}=PB(Vj(qI.applyActions,n),{queryParams:{Authorization:`Bearer ${t}`,"X-ws-identifier":e}});return ne.useEffect(()=>{r==null||r(i==null?void 0:i.data)},[i==null?void 0:i.data]),ae.jsx(ae.Fragment,{})};function Lge({token:t,identity:e,apiBaseUrl:r,protocol:n,waitKeyboard:i=1500,config:o,activeOptions:s,textLoading:a,updateMode:l="single",saveAuto:u=!0,overlay:c=!1,onTabs:h}){var re;Xc.API_GO_XCEL_HOST=`${r}`;const[d,f]=ne.useState(!0),[g,w]=ne.useState(!1),v=ne.useRef([]),[b,p]=ne.useState(),{tabs:_,activeKey:O,setActiveKey:T,addTab:M,removeTab:I,updateTab:X,setTabs:z}=$j(),H=K=>{let Q=K;if(l==="single"){const oe=v.current;if(oe.length===0)return[];const ue=new Set(oe.map(m=>m.item)),j=[];K.forEach(m=>{const C=[];m.items.forEach(y=>{if(y.type!=="form"&&y.type!=="table")return;const P=y.items.filter(x=>ue.has(x));P.length>0&&C.push({...y,items:P})}),C.length>0&&j.push({...m,items:C})}),Q=j}return Q},Y=async K=>{const Q=H(K);if(l==="single")if(Q.length>0)v.current=[];else return;Q.length>0&&he(Q)},[ee]=kj(Y,i),he=async K=>{w(!0),Xc.applyAction(t,{template__uuid:`${b==null?void 0:b.uuid}`,actions:K}).catch(Q=>{console.error(Q)}).finally(()=>{w(!1)})},J=(K,Q)=>{z(K==null?void 0:K.map((oe,ue)=>({...oe,items:oe.items.map((j,m)=>({...j,items:j.items.map((C,y)=>{var P,x,N,B;return{...C,value:(C==null?void 0:C.value)??((B=(N=(x=(P=Q==null?void 0:Q[ue])==null?void 0:P.items)==null?void 0:x[m])==null?void 0:N.items[y])==null?void 0:B.value)??void 0}})}))})))},Z=async()=>{f(!0),Xc.readTemplateIdentity(t,e).then(K=>{p(K);const{configuration:Q}=(K==null?void 0:K.template_configuration)??{},oe=K.values;Q&&J(Q,oe)}).catch(K=>{console.error(K)}).finally(()=>{f(!1)})};return ne.useEffect(()=>{Z()},[]),ae.jsxs(Dge,{children:[ae.jsx(Wj,{primary:(re=o==null?void 0:o.theme)==null?void 0:re.primaryColor}),b&&ae.jsx(kge,{options:{apiBaseUrl:`${r}`,protocol:n},onData:K=>{if(K){const Q=JSON.parse(K);J(Q.notification)}},clientId:t,templateId:b.uuid}),d?ae.jsx(Hge,{children:ae.jsx(Yj,{text:a,theme:o==null?void 0:o.theme})}):ae.jsxs("div",{style:{position:"relative"},children:[g&&c&&ae.jsx(Nge,{}),ae.jsx(Age,{activeOptions:s,config:o,activeKey:O,setActiveKey:K=>T(K),addTab:M,removeTab:I,updateTab:(K,Q,oe)=>{const ue=X(K,Q);oe&&v.current.push({sheetIndex:K,item:oe})
|
|
833
|
+
`,kge=({clientId:t,templateId:e,onData:r,options:n})=>{const{lastMessage:i}=PB(Vj(qI.applyActions,n),{queryParams:{Authorization:`Bearer ${t}`,"X-ws-identifier":e}});return ne.useEffect(()=>{r==null||r(i==null?void 0:i.data)},[i==null?void 0:i.data]),ae.jsx(ae.Fragment,{})};function Lge({token:t,identity:e,apiBaseUrl:r,protocol:n,waitKeyboard:i=1500,config:o,activeOptions:s,textLoading:a,updateMode:l="single",saveAuto:u=!0,overlay:c=!1,onTabs:h}){var re;Xc.API_GO_XCEL_HOST=`${r}`;const[d,f]=ne.useState(!0),[g,w]=ne.useState(!1),v=ne.useRef([]),[b,p]=ne.useState(),{tabs:_,activeKey:O,setActiveKey:T,addTab:M,removeTab:I,updateTab:X,setTabs:z}=$j(),H=K=>{let Q=K;if(l==="single"){const oe=v.current;if(oe.length===0)return[];const ue=new Set(oe.map(m=>m.item)),j=[];K.forEach(m=>{const C=[];m.items.forEach(y=>{if(y.type!=="form"&&y.type!=="table")return;const P=y.items.filter(x=>ue.has(x));P.length>0&&C.push({...y,items:P})}),C.length>0&&j.push({...m,items:C})}),Q=j}return Q},Y=async K=>{const Q=H(K);if(l==="single")if(Q.length>0)v.current=[];else return;Q.length>0&&he(Q)},[ee]=kj(Y,i),he=async K=>{w(!0),Xc.applyAction(t,{template__uuid:`${b==null?void 0:b.uuid}`,actions:K}).catch(Q=>{console.error(Q)}).finally(()=>{w(!1)})},J=(K,Q)=>{z(K==null?void 0:K.map((oe,ue)=>({...oe,items:oe.items.map((j,m)=>({...j,items:j.items.map((C,y)=>{var P,x,N,B;return{...C,value:(C==null?void 0:C.value)??((B=(N=(x=(P=Q==null?void 0:Q[ue])==null?void 0:P.items)==null?void 0:x[m])==null?void 0:N.items[y])==null?void 0:B.value)??void 0}})}))})))},Z=async()=>{f(!0),Xc.readTemplateIdentity(t,e).then(K=>{p(K);const{configuration:Q}=(K==null?void 0:K.template_configuration)??{},oe=K.values;Q&&J(Q,oe)}).catch(K=>{console.error(K)}).finally(()=>{f(!1)})};return ne.useEffect(()=>{Z()},[]),ne.useEffect(()=>{!d&&!u&&(()=>{h&&h(_,Y)})()},[d,u]),ae.jsxs(Dge,{children:[ae.jsx(Wj,{primary:(re=o==null?void 0:o.theme)==null?void 0:re.primaryColor}),b&&ae.jsx(kge,{options:{apiBaseUrl:`${r}`,protocol:n},onData:K=>{if(K){const Q=JSON.parse(K);J(Q.notification)}},clientId:t,templateId:b.uuid}),d?ae.jsx(Hge,{children:ae.jsx(Yj,{text:a,theme:o==null?void 0:o.theme})}):ae.jsxs("div",{style:{position:"relative"},children:[g&&c&&ae.jsx(Nge,{}),ae.jsx(Age,{activeOptions:s,config:o,activeKey:O,setActiveKey:K=>T(K),addTab:M,removeTab:I,updateTab:(K,Q,oe)=>{const ue=X(K,Q);if(oe&&v.current.push({sheetIndex:K,item:oe}),h){const j=H(ue);h(j,Y)}u&&ee(ue)},tabs:_},_.length)]})]})}function $ge(t){return ae.jsx(Lge,{...t})}Yr.GoXcelInterpret=$ge,Object.defineProperty(Yr,Symbol.toStringTag,{value:"Module"})}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "go-xcel-interpret",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "dist/go-xcel-interpret.cjs",
|
|
6
6
|
"module": "dist/go-xcel-interpret.esm.mjs",
|
|
@@ -64,4 +64,4 @@
|
|
|
64
64
|
"require": "./dist/go-xcel-interpret.cjs"
|
|
65
65
|
}
|
|
66
66
|
}
|
|
67
|
-
}
|
|
67
|
+
}
|