open-grid 1.1.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +20 -0
- package/README.md +30 -1
- package/dist/{OpenGrid-yg4mw6Ge.js → OpenGrid-B0Spm0rU.js} +2777 -1878
- package/dist/OpenGrid-CuXj0isp.cjs +97 -0
- package/dist/open-grid-react.cjs +1 -1
- package/dist/open-grid-react.js +1 -1
- package/dist/open-grid-vue.cjs +1 -1
- package/dist/open-grid-vue.js +1 -1
- package/dist/open-grid.cjs +5 -5
- package/dist/open-grid.js +155 -152
- package/dist/types/core/CellEditManager.d.ts +2 -0
- package/dist/types/core/ChartManager.d.ts +2 -0
- package/dist/types/core/ContextMenu.d.ts +5 -1
- package/dist/types/core/DetailManager.d.ts +2 -0
- package/dist/types/core/ExportManager.d.ts +7 -0
- package/dist/types/core/FilterPanel.d.ts +4 -1
- package/dist/types/core/FilterSelect.d.ts +4 -1
- package/dist/types/core/FindBarManager.d.ts +6 -0
- package/dist/types/core/FormulaController.d.ts +2 -0
- package/dist/types/core/GridComposer.d.ts +5 -0
- package/dist/types/core/GridRenderer.d.ts +3 -0
- package/dist/types/core/KeyboardManager.d.ts +2 -0
- package/dist/types/core/MutationService.d.ts +2 -0
- package/dist/types/core/OpenGrid.d.ts +393 -34
- package/dist/types/core/Pagination.d.ts +6 -1
- package/dist/types/core/RangeSelectionManager.d.ts +2 -0
- package/dist/types/core/SortFilterManager.d.ts +2 -0
- package/dist/types/core/WorksheetManager.d.ts +4 -1
- package/dist/types/core/detail/DetailGlyph.d.ts +3 -1
- package/dist/types/core/i18n/LocaleRegistry.d.ts +0 -0
- package/dist/types/core/i18n/interpolate.d.ts +5 -0
- package/dist/types/core/i18n/locales/en.d.ts +166 -0
- package/dist/types/core/i18n/locales/ko.d.ts +166 -0
- package/dist/types/core/i18n/types.d.ts +249 -0
- package/dist/types/core/renderers/CellRenderer.d.ts +5 -0
- package/dist/types/core/types.d.ts +352 -96
- package/dist/types/index.d.ts +22 -0
- package/package.json +3 -1
- package/dist/OpenGrid-LcZ5iixx.cjs +0 -97
package/dist/open-grid-react.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),r=require("react"),D=require("./OpenGrid-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const g=require("react/jsx-runtime"),r=require("react"),D=require("./OpenGrid-CuXj0isp.cjs");function M({data:e,columns:t,height:u=400,width:s="100%",editable:l=!1,sortable:O=!0,filterable:o=!0,rowNumber:x=!1,checkColumn:y=!1,stateColumn:R=!1,draggable:G=!1,frozenColumns:j=0,theme:f="default",options:P,style:W,className:z,onReady:c,onDataChange:b,onCellClick:q,onRowClick:S,onEditEnd:d,onSortChange:v,onFilterChange:E,onRowDrop:T}){const i=r.useRef(null),n=r.useRef(null),A={height:typeof u=="number"?`${u}px`:u,width:typeof s=="number"?`${s}px`:s,display:"block",boxSizing:"border-box",...W};return r.useEffect(()=>{if(!i.current)return;const B={columns:t,height:"100%",width:"100%",editable:l,sortable:O,filterable:o,rowNumber:x,checkColumn:y,stateColumn:R,draggable:G,frozenColumns:j,theme:f,...P,onReady:p=>{n.current=p,e!=null&&e.length&&p.setData(e),c==null||c(p)},...b&&{onDataChange:b},...q&&{onCellClick:q},...S&&{onRowClick:S},...d&&{onEditEnd:d},...v&&{onSortChange:v},...E&&{onFilterChange:E},...T&&{onRowDrop:T}},$=new D.OpenGrid(i.current,B);return n.current=$,()=>{$.destroy(),n.current=null}},[t,l,O,o,x,y,R,G,j]),r.useEffect(()=>{n.current&&e&&n.current.setData(e)},[e]),r.useEffect(()=>{n.current&&n.current.setTheme(f)},[f]),g.jsx("div",{ref:i,style:A,className:z})}const H=r.forwardRef((e,t)=>{r.useRef(null);const u=r.useRef(null);return r.useEffect(()=>{u.current&&t&&(typeof t=="function"?t(u.current):t.current=u.current)}),g.jsx(M,{...e})});H.displayName="OpenGrid";exports.OpenGrid=M;
|
|
2
2
|
//# sourceMappingURL=open-grid-react.cjs.map
|
package/dist/open-grid-react.js
CHANGED
package/dist/open-grid-vue.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),p=require("./OpenGrid-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("vue"),p=require("./OpenGrid-CuXj0isp.cjs"),h=a.defineComponent({__name:"OpenGrid",props:{data:{default:()=>[]},columns:{},height:{default:400},width:{default:"100%"},editable:{type:Boolean,default:!1},sortable:{type:Boolean,default:!0},filterable:{type:Boolean,default:!0},rowNumber:{type:Boolean,default:!1},checkColumn:{type:Boolean,default:!1},stateColumn:{type:Boolean,default:!1},draggable:{type:Boolean,default:!1},frozenColumns:{default:0},theme:{default:"default"},options:{}},emits:["update:data","ready","cell-click","row-click","edit-end","sort-change","filter-change","row-check"],setup(r,{expose:c,emit:u}){const e=r,n=u,d=a.ref(),o=a.shallowRef(null);let i=null;const f=a.computed(()=>({height:typeof e.height=="number"?`${e.height}px`:e.height,width:typeof e.width=="number"?`${e.width}px`:e.width}));return a.onMounted(()=>{if(!d.value)return;const l={columns:e.columns,height:"100%",width:"100%",editable:e.editable,sortable:e.sortable,filterable:e.filterable,rowNumber:e.rowNumber,checkColumn:e.checkColumn,stateColumn:e.stateColumn,draggable:e.draggable,frozenColumns:e.frozenColumns,theme:e.theme,...e.options,onReady:t=>{var s;(s=e.data)!=null&&s.length&&t.setData(e.data),n("ready",t)},onCellClick:t=>n("cell-click",t),onRowClick:t=>n("row-click",t),onEditEnd:t=>n("edit-end",t),onSortChange:t=>n("sort-change",t),onFilterChange:t=>n("filter-change",t),onDataChange:t=>{i=t,n("update:data",t)}};o.value=new p.OpenGrid(d.value,l)}),a.watch(()=>e.data,l=>{!o.value||!l||l!==i&&o.value.setData(l)},{deep:!1}),a.watch(()=>e.theme,l=>{o.value&&l&&o.value.setTheme(l)}),a.watch(()=>e.columns,l=>{o.value&&o.value.applyColumns(l)},{deep:!1}),a.onUnmounted(()=>{var l;(l=o.value)==null||l.destroy(),o.value=null}),c({grid:o}),(l,t)=>(a.openBlock(),a.createElementBlock("div",{ref_key:"containerRef",ref:d,class:"og-vue-wrapper",style:a.normalizeStyle(f.value)},null,4))}}),m=(r,c)=>{const u=r.__vccOpts||r;for(const[e,n]of c)u[e]=n;return u},g=m(h,[["__scopeId","data-v-0a49d4fc"]]);exports.OpenGrid=g;
|
|
2
2
|
//# sourceMappingURL=open-grid-vue.cjs.map
|
package/dist/open-grid-vue.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { defineComponent as p, ref as m, shallowRef as h, computed as g, onMounted as y, watch as d, onUnmounted as b, openBlock as v, createElementBlock as C, normalizeStyle as k } from "vue";
|
|
2
|
-
import { O as w } from "./OpenGrid-
|
|
2
|
+
import { O as w } from "./OpenGrid-B0Spm0rU.js";
|
|
3
3
|
const _ = /* @__PURE__ */ p({
|
|
4
4
|
__name: "OpenGrid",
|
|
5
5
|
props: {
|
package/dist/open-grid.cjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
2
|
-
`)}static parseSap(t){var m,f,u
|
|
3
|
-
`)}static stringifySapBatch(t){const e=['<?xml version="1.0" encoding="UTF-8"?>',`<BAPI_BATCH total="${t.documents.length}">`];return t.documents.forEach((
|
|
4
|
-
`).filter(
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("./OpenGrid-CuXj0isp.cjs");class C{constructor(t,e,i,c={}){this._left=t,this._right=e;const r=document.createElement("div");r.className="og-shuttle",r.style.cssText=`display:flex;gap:6px;align-items:center;justify-content:center;flex-direction:${c.layout==="horizontal"?"row":"column"};`;const a=(p,f,u)=>{const o=document.createElement("button");return o.type="button",o.className="og-shuttle-btn",o.textContent=p,o.title=f,o.style.cssText="min-width:34px;height:30px;padding:0 8px;border:1px solid #bbb;border-radius:7px;background:#fff;cursor:pointer;font-size:14px;color:#444;line-height:1;box-shadow:0 1px 2px rgba(0,0,0,0.06);",o.addEventListener("mouseover",()=>{o.style.background="#f0f6ff",o.style.borderColor="#1976d2"}),o.addEventListener("mouseout",()=>{o.style.background="#fff",o.style.borderColor="#bbb"}),o.addEventListener("click",u),o},_=c.labels??{},m=p=>this._left.t(p);r.appendChild(a(_.toRight??"▶",m("shuttle.toRight"),()=>{this._left.moveCheckedTo(this._right)})),r.appendChild(a(_.toLeft??"◀",m("shuttle.toLeft"),()=>{this._right.moveCheckedTo(this._left)})),c.includeAll&&(r.appendChild(a(_.allRight??"⏩",m("shuttle.allRight"),()=>{this._moveAll(this._left,this._right)})),r.appendChild(a(_.allLeft??"⏪",m("shuttle.allLeft"),()=>{this._moveAll(this._right,this._left)}))),i.appendChild(r),this._el=r}_moveAll(t,e){const i=t.getData().length;i>0&&t.moveRowsTo(e,Array.from({length:i},(c,r)=>r))}destroy(){this._el.remove()}}function T(A,t,e,i){return new C(A,t,e,i)}class v{constructor(t,e){this._data=[],this._roots=[],this._expandedKeys=new Set,this._selectedId=null,this._container=typeof t=="string"?document.querySelector(t):t,this._opts={nodeWidth:160,nodeHeight:72,levelGap:52,siblingGap:20,expandOnLoad:!0,onNodeClick:()=>{},...e},this._container.classList.add("og-orgchart")}setData(t){this._data=t;const{idField:e,parentIdField:i,expandOnLoad:c}=this._opts;c&&this._expandedKeys.size===0&&t.forEach(r=>this._expandedKeys.add(r[e])),this._roots=y.buildTree(t,{idField:e,parentIdField:i},this._expandedKeys),this._render()}setTheme(t){this._container.setAttribute("data-og-theme",t)}setSkin(t){this._container.setAttribute("data-og-skin",t)}expandAll(){const t=e=>{for(const i of e)this._expandedKeys.add(i._treeId),i.children.length&&t(i.children)};t(this._roots),this._rebuild()}collapseAll(){this._expandedKeys.clear(),this._rebuild()}_toggle(t){this._expandedKeys.has(t)?this._expandedKeys.delete(t):this._expandedKeys.add(t),this._rebuild()}_rebuild(){const{idField:t,parentIdField:e}=this._opts;this._roots=y.buildTree(this._data,{idField:t,parentIdField:e},this._expandedKeys),this._render()}_calcLayout(){const{nodeWidth:t,nodeHeight:e,levelGap:i,siblingGap:c}=this._opts,r=new Map;let a=0;const _=f=>{const u=f._depth*(e+i),o=f._expanded?f.children:[];if(!o.length){const g=a;return a+=t+c,r.set(f._treeId,{x:g,y:u}),{minX:g,maxX:g}}let n=1/0,l=-1/0;for(const g of o){const{minX:s,maxX:h}=_(g);s<n&&(n=s),h>l&&(l=h)}const d=n+(l-n+t)/2-t/2;return r.set(f._treeId,{x:d,y:u}),{minX:n,maxX:l}};for(const f of this._roots)_(f);let m=0,p=0;for(const{x:f,y:u}of r.values())f+t>m&&(m=f+t),u+e>p&&(p=u+e);return{layout:r,totalW:m+c,totalH:p+i+16}}_line(t,e,i,c,r){const a=document.createElementNS("http://www.w3.org/2000/svg","line");a.setAttribute("x1",String(e)),a.setAttribute("y1",String(i)),a.setAttribute("x2",String(c)),a.setAttribute("y2",String(r)),a.setAttribute("class","og-orgchart-line"),t.appendChild(a)}_render(){const{nodeWidth:t,nodeHeight:e,levelGap:i,columns:c}=this._opts,{layout:r,totalW:a,totalH:_}=this._calcLayout();this._container.innerHTML="";const m=document.createElement("div");m.className="og-orgchart-wrap",m.style.cssText=`width:${a}px;height:${_}px;`;const p=document.createElementNS("http://www.w3.org/2000/svg","svg");p.setAttribute("width",String(a)),p.setAttribute("height",String(_)),p.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:visible;";const f=o=>{for(const n of o){if(!n._expanded||!n.children.length)continue;const l=r.get(n._treeId),d=l.x+t/2,g=l.y+e,s=g+i/2,h=n.children;if(this._line(p,d,g,d,s),h.length>1){const x=r.get(h[0]._treeId),b=r.get(h[h.length-1]._treeId);this._line(p,x.x+t/2,s,b.x+t/2,s)}for(const x of h){const b=r.get(x._treeId),E=b.x+t/2;this._line(p,E,s,E,b.y)}f(h)}};f(this._roots),m.appendChild(p);const u=o=>{for(const n of o){const l=r.get(n._treeId);if(!l)continue;const d=document.createElement("div");d.className="og-orgchart-node",n._hasChildren&&d.classList.add("og-orgchart-node--branch"),n._expanded&&d.classList.add("og-orgchart-node--expanded"),this._selectedId===n._treeId&&d.classList.add("og-orgchart-node--selected"),d.style.cssText=`left:${l.x}px;top:${l.y}px;width:${t}px;height:${e}px;`;const g=document.createElement("div");g.className="og-orgchart-node-content";for(const s of c){const h=n.data[s.field],x=document.createElement("div");if(x.className="og-orgchart-col"+(s.className?" "+s.className:""),s.style){const b=typeof s.style=="function"?s.style(h,n.data):s.style;x.setAttribute("style",b)}if(s.renderer){const b=s.renderer(h,n.data);typeof b=="string"?x.innerHTML=b:x.appendChild(b)}else x.textContent=h??"";g.appendChild(x)}if(d.appendChild(g),n._hasChildren){const s=document.createElement("button");s.type="button",s.className="og-orgchart-toggle",s.setAttribute("aria-expanded",n._expanded?"true":"false"),s.setAttribute("aria-label",y.t(n._expanded?"tree.collapse":"tree.expand"));const h=document.createElement("i");h.setAttribute("aria-hidden","true"),h.className=n._expanded?"bi bi-dash-circle":"bi bi-plus-circle",s.appendChild(h),s.addEventListener("click",x=>{x.stopPropagation(),this._toggle(n._treeId)}),d.appendChild(s)}d.addEventListener("click",()=>{this._selectedId=n._treeId,this._opts.onNodeClick(n._treeId,n.data),this._container.querySelectorAll(".og-orgchart-node--selected").forEach(s=>s.classList.remove("og-orgchart-node--selected")),d.classList.add("og-orgchart-node--selected")}),m.appendChild(d),n._expanded&&n.children.length&&u(n.children)}};u(this._roots),this._container.appendChild(m)}}class N{static parse(t,e={}){var o,n;const{fieldMap:i={},trim:c=!0}=e,a=new DOMParser().parseFromString(t.trim(),"text/xml"),_=a.querySelector("parsererror");if(_)throw new Error(`XML 파싱 오류: ${(o=_.textContent)==null?void 0:o.trim()}`);const m=a.documentElement;let p=e.rowTag;if(!p){const l=e.rootTag?a.querySelector(e.rootTag):m;p=((n=l==null?void 0:l.children[0])==null?void 0:n.tagName)??"row"}const f=a.getElementsByTagName(p),u=[];for(let l=0;l<f.length;l++){const d=f[l],g={};for(const s of Array.from(d.attributes)){const h=i[s.name]??s.name;g[h]=c?s.value.trim():s.value}for(const s of Array.from(d.children)){const h=i[s.tagName]??s.tagName,x=s.textContent??"";g[h]=c?x.trim():x}u.push(g)}return u}static stringify(t,e={}){const{rootTag:i="rows",rowTag:c="row",mode:r="element",fieldMap:a={},declaration:_=!0,indent:m=2,nullAs:p="",excludeFields:f=[]}=e,u=" ".repeat(m),o=[];_&&o.push('<?xml version="1.0" encoding="UTF-8"?>'),o.push(`<${i}>`);for(const n of t){const l=Object.entries(n).filter(([d])=>!f.includes(d));if(r==="attribute"){const d=l.map(([g,s])=>{const h=a[g]??g,x=s==null?p:String(s);return`${h}="${this._escAttr(x)}"`}).join(" ");o.push(`${u}<${c}${d?" "+d:""} />`)}else{o.push(`${u}<${c}>`);for(const[d,g]of l){const s=a[d]??d,h=g==null?p:String(g);o.push(`${u}${u}<${s}>${this._escText(h)}</${s}>`)}o.push(`${u}</${c}>`)}}return o.push(`</${i}>`),o.join(`
|
|
2
|
+
`)}static parseSap(t){var m,p,f,u;const i=new DOMParser().parseFromString(t.trim(),"text/xml"),c={header:{},items:[],returns:[],raw:i},r=i.getElementsByTagName("DOCUMENTHEADER")[0];if(r)for(const o of Array.from(r.children))c.header[o.tagName]=((m=o.textContent)==null?void 0:m.trim())??"";const a=i.getElementsByTagName("RETURN");for(const o of Array.from(a)){const n={};for(const l of Array.from(o.children))n[l.tagName]=((p=l.textContent)==null?void 0:p.trim())??"";c.returns.push(n)}const _=["ACCOUNTGL","ACCOUNTRECEIVABLE","ACCOUNTPAYABLE","ITEMS"];for(const o of _){const n=i.getElementsByTagName(o)[0];if(!n)continue;const l=n.getElementsByTagName("ITEM"),d=l.length>0?Array.from(l):[n];for(const g of d){const s={};for(const h of Array.from(g.children))s[h.tagName]=((f=h.textContent)==null?void 0:f.trim())??"";c.items.push(s)}break}if(c.items.length===0){const o=i.documentElement,n=Array.from(o.children).filter(l=>l.hasAttribute("SEGMENT"));for(const l of n){if(l.tagName==="EDI_DC40")continue;const d={};for(const g of Array.from(l.children))d[g.tagName]=((u=g.textContent)==null?void 0:u.trim())??"";Object.keys(d).length>0&&c.items.push(d)}}return c}static stringifySap(t){const e=['<?xml version="1.0" encoding="UTF-8"?>',"<BAPI_CALL>"];if(t.BAPI_FUNCTION&&e.push(` <FUNCTION>${this._escText(t.BAPI_FUNCTION)}</FUNCTION>`),t.DOCUMENTHEADER&&typeof t.DOCUMENTHEADER=="object"){e.push(" <DOCUMENTHEADER>");for(const[c,r]of Object.entries(t.DOCUMENTHEADER))r!=null&&r!==""&&e.push(` <${c}>${this._escText(String(r))}</${c}>`);e.push(" </DOCUMENTHEADER>")}const i=Object.keys(t).find(c=>Array.isArray(t[c])&&!c.startsWith("_"));if(i){e.push(` <${i}>`);for(const c of t[i]){e.push(" <ITEM>");for(const[r,a]of Object.entries(c))a!=null&&a!==""&&!r.startsWith("_")&&e.push(` <${r}>${this._escText(String(a))}</${r}>`);e.push(" </ITEM>")}e.push(` </${i}>`)}return e.push("</BAPI_CALL>"),e.join(`
|
|
3
|
+
`)}static stringifySapBatch(t){const e=['<?xml version="1.0" encoding="UTF-8"?>',`<BAPI_BATCH total="${t.documents.length}">`];return t.documents.forEach((i,c)=>{e.push(` <BAPI_CALL seq="${c+1}">`);const r=this.stringifySap(i).split(`
|
|
4
|
+
`).filter(a=>!a.startsWith("<?xml")).map(a=>" "+a).join(`
|
|
5
5
|
`);e.push(r),e.push(" </BAPI_CALL>")}),e.push("</BAPI_BATCH>"),e.join(`
|
|
6
|
-
`)}static _escText(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}static _escAttr(t){return this._escText(t).replace(/"/g,""").replace(/'/g,"'")}}exports.DEFAULT_ICON_ROLES=
|
|
6
|
+
`)}static _escText(t){return t.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">")}static _escAttr(t){return this._escText(t).replace(/"/g,""").replace(/'/g,"'")}}exports.DEFAULT_ICON_ROLES=y.DEFAULT_ICON_ROLES;exports.IconRegistry=y.IconRegistry;exports.LocaleRegistry=y.LocaleRegistry;exports.OpenGrid=y.OpenGrid;exports.SkinRegistry=y.SkinRegistry;exports.iconRegistry=y.iconRegistry;exports.localeRegistry=y.localeRegistry;exports.renderIcon=y.renderIcon;exports.skinRegistry=y.skinRegistry;exports.t=y.t;exports.GridShuttle=C;exports.OrgChart=v;exports.XmlConverter=N;exports.createGridShuttle=T;
|
|
7
7
|
//# sourceMappingURL=open-grid.cjs.map
|
package/dist/open-grid.js
CHANGED
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { b as E } from "./OpenGrid-
|
|
2
|
-
import { D as
|
|
3
|
-
class
|
|
4
|
-
constructor(t, e,
|
|
1
|
+
import { b as E, t as C } from "./OpenGrid-B0Spm0rU.js";
|
|
2
|
+
import { D as S, I as O, L as R, O as D, S as k, i as M, l as B, r as U, s as F } from "./OpenGrid-B0Spm0rU.js";
|
|
3
|
+
class T {
|
|
4
|
+
constructor(t, e, i, a = {}) {
|
|
5
5
|
this._left = t, this._right = e;
|
|
6
6
|
const r = document.createElement("div");
|
|
7
|
-
r.className = "og-shuttle", r.style.cssText = `display:flex;gap:6px;align-items:center;justify-content:center;flex-direction:${
|
|
8
|
-
const
|
|
9
|
-
const
|
|
10
|
-
return
|
|
11
|
-
|
|
12
|
-
}),
|
|
13
|
-
|
|
14
|
-
}),
|
|
15
|
-
}, _ =
|
|
16
|
-
r.appendChild(
|
|
7
|
+
r.className = "og-shuttle", r.style.cssText = `display:flex;gap:6px;align-items:center;justify-content:center;flex-direction:${a.layout === "horizontal" ? "row" : "column"};`;
|
|
8
|
+
const c = (g, f, u) => {
|
|
9
|
+
const o = document.createElement("button");
|
|
10
|
+
return o.type = "button", o.className = "og-shuttle-btn", o.textContent = g, o.title = f, o.style.cssText = "min-width:34px;height:30px;padding:0 8px;border:1px solid #bbb;border-radius:7px;background:#fff;cursor:pointer;font-size:14px;color:#444;line-height:1;box-shadow:0 1px 2px rgba(0,0,0,0.06);", o.addEventListener("mouseover", () => {
|
|
11
|
+
o.style.background = "#f0f6ff", o.style.borderColor = "#1976d2";
|
|
12
|
+
}), o.addEventListener("mouseout", () => {
|
|
13
|
+
o.style.background = "#fff", o.style.borderColor = "#bbb";
|
|
14
|
+
}), o.addEventListener("click", u), o;
|
|
15
|
+
}, _ = a.labels ?? {}, m = (g) => this._left.t(g);
|
|
16
|
+
r.appendChild(c(
|
|
17
17
|
_.toRight ?? "▶",
|
|
18
|
-
"
|
|
18
|
+
m("shuttle.toRight"),
|
|
19
19
|
() => {
|
|
20
20
|
this._left.moveCheckedTo(this._right);
|
|
21
21
|
}
|
|
22
|
-
)), r.appendChild(
|
|
22
|
+
)), r.appendChild(c(
|
|
23
23
|
_.toLeft ?? "◀",
|
|
24
|
-
"
|
|
24
|
+
m("shuttle.toLeft"),
|
|
25
25
|
() => {
|
|
26
26
|
this._right.moveCheckedTo(this._left);
|
|
27
27
|
}
|
|
28
|
-
)),
|
|
28
|
+
)), a.includeAll && (r.appendChild(c(
|
|
29
29
|
_.allRight ?? "⏩",
|
|
30
|
-
"
|
|
30
|
+
m("shuttle.allRight"),
|
|
31
31
|
() => {
|
|
32
32
|
this._moveAll(this._left, this._right);
|
|
33
33
|
}
|
|
34
|
-
)), r.appendChild(
|
|
34
|
+
)), r.appendChild(c(
|
|
35
35
|
_.allLeft ?? "⏪",
|
|
36
|
-
"
|
|
36
|
+
m("shuttle.allLeft"),
|
|
37
37
|
() => {
|
|
38
38
|
this._moveAll(this._right, this._left);
|
|
39
39
|
}
|
|
40
|
-
))),
|
|
40
|
+
))), i.appendChild(r), this._el = r;
|
|
41
41
|
}
|
|
42
42
|
_moveAll(t, e) {
|
|
43
|
-
const
|
|
44
|
-
|
|
43
|
+
const i = t.getData().length;
|
|
44
|
+
i > 0 && t.moveRowsTo(e, Array.from({ length: i }, (a, r) => r));
|
|
45
45
|
}
|
|
46
46
|
destroy() {
|
|
47
47
|
this._el.remove();
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
function
|
|
51
|
-
return new
|
|
50
|
+
function N(A, t, e, i) {
|
|
51
|
+
return new T(A, t, e, i);
|
|
52
52
|
}
|
|
53
|
-
class
|
|
53
|
+
class I {
|
|
54
54
|
constructor(t, e) {
|
|
55
55
|
this._data = [], this._roots = [], this._expandedKeys = /* @__PURE__ */ new Set(), this._selectedId = null, this._container = typeof t == "string" ? document.querySelector(t) : t, this._opts = {
|
|
56
56
|
nodeWidth: 160,
|
|
@@ -65,8 +65,8 @@ class N {
|
|
|
65
65
|
}
|
|
66
66
|
setData(t) {
|
|
67
67
|
this._data = t;
|
|
68
|
-
const { idField: e, parentIdField:
|
|
69
|
-
|
|
68
|
+
const { idField: e, parentIdField: i, expandOnLoad: a } = this._opts;
|
|
69
|
+
a && this._expandedKeys.size === 0 && t.forEach((r) => this._expandedKeys.add(r[e])), this._roots = E(t, { idField: e, parentIdField: i }, this._expandedKeys), this._render();
|
|
70
70
|
}
|
|
71
71
|
setTheme(t) {
|
|
72
72
|
this._container.setAttribute("data-og-theme", t);
|
|
@@ -77,8 +77,8 @@ class N {
|
|
|
77
77
|
}
|
|
78
78
|
expandAll() {
|
|
79
79
|
const t = (e) => {
|
|
80
|
-
for (const
|
|
81
|
-
this._expandedKeys.add(
|
|
80
|
+
for (const i of e)
|
|
81
|
+
this._expandedKeys.add(i._treeId), i.children.length && t(i.children);
|
|
82
82
|
};
|
|
83
83
|
t(this._roots), this._rebuild();
|
|
84
84
|
}
|
|
@@ -94,66 +94,66 @@ class N {
|
|
|
94
94
|
}
|
|
95
95
|
// ── 레이아웃 계산 (post-order: 리프부터 배치, 부모는 자식 중앙) ──
|
|
96
96
|
_calcLayout() {
|
|
97
|
-
const { nodeWidth: t, nodeHeight: e, levelGap:
|
|
98
|
-
let
|
|
99
|
-
const _ = (
|
|
100
|
-
const
|
|
101
|
-
if (!
|
|
102
|
-
const
|
|
103
|
-
return
|
|
97
|
+
const { nodeWidth: t, nodeHeight: e, levelGap: i, siblingGap: a } = this._opts, r = /* @__PURE__ */ new Map();
|
|
98
|
+
let c = 0;
|
|
99
|
+
const _ = (f) => {
|
|
100
|
+
const u = f._depth * (e + i), o = f._expanded ? f.children : [];
|
|
101
|
+
if (!o.length) {
|
|
102
|
+
const p = c;
|
|
103
|
+
return c += t + a, r.set(f._treeId, { x: p, y: u }), { minX: p, maxX: p };
|
|
104
104
|
}
|
|
105
105
|
let n = 1 / 0, l = -1 / 0;
|
|
106
|
-
for (const
|
|
107
|
-
const { minX: s, maxX: h } = _(
|
|
106
|
+
for (const p of o) {
|
|
107
|
+
const { minX: s, maxX: h } = _(p);
|
|
108
108
|
s < n && (n = s), h > l && (l = h);
|
|
109
109
|
}
|
|
110
110
|
const d = n + (l - n + t) / 2 - t / 2;
|
|
111
|
-
return r.set(
|
|
111
|
+
return r.set(f._treeId, { x: d, y: u }), { minX: n, maxX: l };
|
|
112
112
|
};
|
|
113
|
-
for (const
|
|
114
|
-
let m = 0,
|
|
115
|
-
for (const { x:
|
|
116
|
-
|
|
117
|
-
return { layout: r, totalW: m +
|
|
113
|
+
for (const f of this._roots) _(f);
|
|
114
|
+
let m = 0, g = 0;
|
|
115
|
+
for (const { x: f, y: u } of r.values())
|
|
116
|
+
f + t > m && (m = f + t), u + e > g && (g = u + e);
|
|
117
|
+
return { layout: r, totalW: m + a, totalH: g + i + 16 };
|
|
118
118
|
}
|
|
119
119
|
// ── SVG 직선 헬퍼 ──
|
|
120
|
-
_line(t, e,
|
|
121
|
-
const
|
|
122
|
-
|
|
120
|
+
_line(t, e, i, a, r) {
|
|
121
|
+
const c = document.createElementNS("http://www.w3.org/2000/svg", "line");
|
|
122
|
+
c.setAttribute("x1", String(e)), c.setAttribute("y1", String(i)), c.setAttribute("x2", String(a)), c.setAttribute("y2", String(r)), c.setAttribute("class", "og-orgchart-line"), t.appendChild(c);
|
|
123
123
|
}
|
|
124
124
|
// ── 렌더 ──
|
|
125
125
|
_render() {
|
|
126
|
-
const { nodeWidth: t, nodeHeight: e, levelGap:
|
|
126
|
+
const { nodeWidth: t, nodeHeight: e, levelGap: i, columns: a } = this._opts, { layout: r, totalW: c, totalH: _ } = this._calcLayout();
|
|
127
127
|
this._container.innerHTML = "";
|
|
128
128
|
const m = document.createElement("div");
|
|
129
|
-
m.className = "og-orgchart-wrap", m.style.cssText = `width:${
|
|
130
|
-
const
|
|
131
|
-
|
|
132
|
-
const
|
|
133
|
-
for (const n of
|
|
129
|
+
m.className = "og-orgchart-wrap", m.style.cssText = `width:${c}px;height:${_}px;`;
|
|
130
|
+
const g = document.createElementNS("http://www.w3.org/2000/svg", "svg");
|
|
131
|
+
g.setAttribute("width", String(c)), g.setAttribute("height", String(_)), g.style.cssText = "position:absolute;top:0;left:0;pointer-events:none;overflow:visible;";
|
|
132
|
+
const f = (o) => {
|
|
133
|
+
for (const n of o) {
|
|
134
134
|
if (!n._expanded || !n.children.length) continue;
|
|
135
|
-
const l = r.get(n._treeId), d = l.x + t / 2,
|
|
136
|
-
if (this._line(
|
|
135
|
+
const l = r.get(n._treeId), d = l.x + t / 2, p = l.y + e, s = p + i / 2, h = n.children;
|
|
136
|
+
if (this._line(g, d, p, d, s), h.length > 1) {
|
|
137
137
|
const x = r.get(h[0]._treeId), y = r.get(h[h.length - 1]._treeId);
|
|
138
|
-
this._line(
|
|
138
|
+
this._line(g, x.x + t / 2, s, y.x + t / 2, s);
|
|
139
139
|
}
|
|
140
140
|
for (const x of h) {
|
|
141
141
|
const y = r.get(x._treeId), b = y.x + t / 2;
|
|
142
|
-
this._line(
|
|
142
|
+
this._line(g, b, s, b, y.y);
|
|
143
143
|
}
|
|
144
|
-
|
|
144
|
+
f(h);
|
|
145
145
|
}
|
|
146
146
|
};
|
|
147
|
-
|
|
148
|
-
const
|
|
149
|
-
for (const n of
|
|
147
|
+
f(this._roots), m.appendChild(g);
|
|
148
|
+
const u = (o) => {
|
|
149
|
+
for (const n of o) {
|
|
150
150
|
const l = r.get(n._treeId);
|
|
151
151
|
if (!l) continue;
|
|
152
152
|
const d = document.createElement("div");
|
|
153
153
|
d.className = "og-orgchart-node", n._hasChildren && d.classList.add("og-orgchart-node--branch"), n._expanded && d.classList.add("og-orgchart-node--expanded"), this._selectedId === n._treeId && d.classList.add("og-orgchart-node--selected"), d.style.cssText = `left:${l.x}px;top:${l.y}px;width:${t}px;height:${e}px;`;
|
|
154
|
-
const
|
|
155
|
-
|
|
156
|
-
for (const s of
|
|
154
|
+
const p = document.createElement("div");
|
|
155
|
+
p.className = "og-orgchart-node-content";
|
|
156
|
+
for (const s of a) {
|
|
157
157
|
const h = n.data[s.field], x = document.createElement("div");
|
|
158
158
|
if (x.className = "og-orgchart-col" + (s.className ? " " + s.className : ""), s.style) {
|
|
159
159
|
const y = typeof s.style == "function" ? s.style(h, n.data) : s.style;
|
|
@@ -164,11 +164,11 @@ class N {
|
|
|
164
164
|
typeof y == "string" ? x.innerHTML = y : x.appendChild(y);
|
|
165
165
|
} else
|
|
166
166
|
x.textContent = h ?? "";
|
|
167
|
-
|
|
167
|
+
p.appendChild(x);
|
|
168
168
|
}
|
|
169
|
-
if (d.appendChild(
|
|
169
|
+
if (d.appendChild(p), n._hasChildren) {
|
|
170
170
|
const s = document.createElement("button");
|
|
171
|
-
s.type = "button", s.className = "og-orgchart-toggle", s.setAttribute("aria-expanded", n._expanded ? "true" : "false"), s.setAttribute("aria-label", n._expanded ? "
|
|
171
|
+
s.type = "button", s.className = "og-orgchart-toggle", s.setAttribute("aria-expanded", n._expanded ? "true" : "false"), s.setAttribute("aria-label", C(n._expanded ? "tree.collapse" : "tree.expand"));
|
|
172
172
|
const h = document.createElement("i");
|
|
173
173
|
h.setAttribute("aria-hidden", "true"), h.className = n._expanded ? "bi bi-dash-circle" : "bi bi-plus-circle", s.appendChild(h), s.addEventListener("click", (x) => {
|
|
174
174
|
x.stopPropagation(), this._toggle(n._treeId);
|
|
@@ -176,13 +176,13 @@ class N {
|
|
|
176
176
|
}
|
|
177
177
|
d.addEventListener("click", () => {
|
|
178
178
|
this._selectedId = n._treeId, this._opts.onNodeClick(n._treeId, n.data), this._container.querySelectorAll(".og-orgchart-node--selected").forEach((s) => s.classList.remove("og-orgchart-node--selected")), d.classList.add("og-orgchart-node--selected");
|
|
179
|
-
}), m.appendChild(d), n._expanded && n.children.length &&
|
|
179
|
+
}), m.appendChild(d), n._expanded && n.children.length && u(n.children);
|
|
180
180
|
}
|
|
181
181
|
};
|
|
182
|
-
|
|
182
|
+
u(this._roots), this._container.appendChild(m);
|
|
183
183
|
}
|
|
184
184
|
}
|
|
185
|
-
class
|
|
185
|
+
class w {
|
|
186
186
|
// ── 1. XML → 데이터 배열 ────────────────────────────────────
|
|
187
187
|
/**
|
|
188
188
|
* XML 문자열을 파싱하여 그리드 데이터 배열로 변환.
|
|
@@ -191,29 +191,29 @@ class I {
|
|
|
191
191
|
* @throws XML 파싱 오류 시 Error 발생
|
|
192
192
|
*/
|
|
193
193
|
static parse(t, e = {}) {
|
|
194
|
-
var
|
|
195
|
-
const { fieldMap:
|
|
196
|
-
if (_) throw new Error(`XML 파싱 오류: ${(
|
|
197
|
-
const m =
|
|
198
|
-
let
|
|
199
|
-
if (!
|
|
200
|
-
const l = e.rootTag ?
|
|
201
|
-
|
|
194
|
+
var o, n;
|
|
195
|
+
const { fieldMap: i = {}, trim: a = !0 } = e, c = new DOMParser().parseFromString(t.trim(), "text/xml"), _ = c.querySelector("parsererror");
|
|
196
|
+
if (_) throw new Error(`XML 파싱 오류: ${(o = _.textContent) == null ? void 0 : o.trim()}`);
|
|
197
|
+
const m = c.documentElement;
|
|
198
|
+
let g = e.rowTag;
|
|
199
|
+
if (!g) {
|
|
200
|
+
const l = e.rootTag ? c.querySelector(e.rootTag) : m;
|
|
201
|
+
g = ((n = l == null ? void 0 : l.children[0]) == null ? void 0 : n.tagName) ?? "row";
|
|
202
202
|
}
|
|
203
|
-
const
|
|
204
|
-
for (let l = 0; l <
|
|
205
|
-
const d =
|
|
203
|
+
const f = c.getElementsByTagName(g), u = [];
|
|
204
|
+
for (let l = 0; l < f.length; l++) {
|
|
205
|
+
const d = f[l], p = {};
|
|
206
206
|
for (const s of Array.from(d.attributes)) {
|
|
207
|
-
const h =
|
|
208
|
-
|
|
207
|
+
const h = i[s.name] ?? s.name;
|
|
208
|
+
p[h] = a ? s.value.trim() : s.value;
|
|
209
209
|
}
|
|
210
210
|
for (const s of Array.from(d.children)) {
|
|
211
|
-
const h =
|
|
212
|
-
|
|
211
|
+
const h = i[s.tagName] ?? s.tagName, x = s.textContent ?? "";
|
|
212
|
+
p[h] = a ? x.trim() : x;
|
|
213
213
|
}
|
|
214
|
-
|
|
214
|
+
u.push(p);
|
|
215
215
|
}
|
|
216
|
-
return
|
|
216
|
+
return u;
|
|
217
217
|
}
|
|
218
218
|
// ── 2. 데이터 배열 → XML ─────────────────────────────────────
|
|
219
219
|
/**
|
|
@@ -221,34 +221,34 @@ class I {
|
|
|
221
221
|
*/
|
|
222
222
|
static stringify(t, e = {}) {
|
|
223
223
|
const {
|
|
224
|
-
rootTag:
|
|
225
|
-
rowTag:
|
|
224
|
+
rootTag: i = "rows",
|
|
225
|
+
rowTag: a = "row",
|
|
226
226
|
mode: r = "element",
|
|
227
|
-
fieldMap:
|
|
227
|
+
fieldMap: c = {},
|
|
228
228
|
declaration: _ = !0,
|
|
229
229
|
indent: m = 2,
|
|
230
|
-
nullAs:
|
|
231
|
-
excludeFields:
|
|
232
|
-
} = e,
|
|
233
|
-
_ &&
|
|
230
|
+
nullAs: g = "",
|
|
231
|
+
excludeFields: f = []
|
|
232
|
+
} = e, u = " ".repeat(m), o = [];
|
|
233
|
+
_ && o.push('<?xml version="1.0" encoding="UTF-8"?>'), o.push(`<${i}>`);
|
|
234
234
|
for (const n of t) {
|
|
235
|
-
const l = Object.entries(n).filter(([d]) => !
|
|
235
|
+
const l = Object.entries(n).filter(([d]) => !f.includes(d));
|
|
236
236
|
if (r === "attribute") {
|
|
237
|
-
const d = l.map(([
|
|
238
|
-
const h =
|
|
237
|
+
const d = l.map(([p, s]) => {
|
|
238
|
+
const h = c[p] ?? p, x = s == null ? g : String(s);
|
|
239
239
|
return `${h}="${this._escAttr(x)}"`;
|
|
240
240
|
}).join(" ");
|
|
241
|
-
|
|
241
|
+
o.push(`${u}<${a}${d ? " " + d : ""} />`);
|
|
242
242
|
} else {
|
|
243
|
-
|
|
244
|
-
for (const [d,
|
|
245
|
-
const s =
|
|
246
|
-
|
|
243
|
+
o.push(`${u}<${a}>`);
|
|
244
|
+
for (const [d, p] of l) {
|
|
245
|
+
const s = c[d] ?? d, h = p == null ? g : String(p);
|
|
246
|
+
o.push(`${u}${u}<${s}>${this._escText(h)}</${s}>`);
|
|
247
247
|
}
|
|
248
|
-
|
|
248
|
+
o.push(`${u}</${a}>`);
|
|
249
249
|
}
|
|
250
250
|
}
|
|
251
|
-
return
|
|
251
|
+
return o.push(`</${i}>`), o.join(`
|
|
252
252
|
`);
|
|
253
253
|
}
|
|
254
254
|
// ── 3. SAP BAPI XML 응답 파싱 ────────────────────────────────
|
|
@@ -261,42 +261,42 @@ class I {
|
|
|
261
261
|
* <RETURN><TYPE>S</TYPE><MESSAGE>...</MESSAGE></RETURN>
|
|
262
262
|
*/
|
|
263
263
|
static parseSap(t) {
|
|
264
|
-
var m, f, u
|
|
265
|
-
const
|
|
264
|
+
var m, g, f, u;
|
|
265
|
+
const i = new DOMParser().parseFromString(t.trim(), "text/xml"), a = { header: {}, items: [], returns: [], raw: i }, r = i.getElementsByTagName("DOCUMENTHEADER")[0];
|
|
266
266
|
if (r)
|
|
267
|
-
for (const
|
|
268
|
-
|
|
269
|
-
const
|
|
270
|
-
for (const
|
|
267
|
+
for (const o of Array.from(r.children))
|
|
268
|
+
a.header[o.tagName] = ((m = o.textContent) == null ? void 0 : m.trim()) ?? "";
|
|
269
|
+
const c = i.getElementsByTagName("RETURN");
|
|
270
|
+
for (const o of Array.from(c)) {
|
|
271
271
|
const n = {};
|
|
272
|
-
for (const l of Array.from(
|
|
273
|
-
n[l.tagName] = ((
|
|
274
|
-
|
|
272
|
+
for (const l of Array.from(o.children))
|
|
273
|
+
n[l.tagName] = ((g = l.textContent) == null ? void 0 : g.trim()) ?? "";
|
|
274
|
+
a.returns.push(n);
|
|
275
275
|
}
|
|
276
276
|
const _ = ["ACCOUNTGL", "ACCOUNTRECEIVABLE", "ACCOUNTPAYABLE", "ITEMS"];
|
|
277
|
-
for (const
|
|
278
|
-
const n =
|
|
277
|
+
for (const o of _) {
|
|
278
|
+
const n = i.getElementsByTagName(o)[0];
|
|
279
279
|
if (!n) continue;
|
|
280
280
|
const l = n.getElementsByTagName("ITEM"), d = l.length > 0 ? Array.from(l) : [n];
|
|
281
|
-
for (const
|
|
281
|
+
for (const p of d) {
|
|
282
282
|
const s = {};
|
|
283
|
-
for (const h of Array.from(
|
|
284
|
-
s[h.tagName] = ((
|
|
285
|
-
|
|
283
|
+
for (const h of Array.from(p.children))
|
|
284
|
+
s[h.tagName] = ((f = h.textContent) == null ? void 0 : f.trim()) ?? "";
|
|
285
|
+
a.items.push(s);
|
|
286
286
|
}
|
|
287
287
|
break;
|
|
288
288
|
}
|
|
289
|
-
if (
|
|
290
|
-
const
|
|
289
|
+
if (a.items.length === 0) {
|
|
290
|
+
const o = i.documentElement, n = Array.from(o.children).filter((l) => l.hasAttribute("SEGMENT"));
|
|
291
291
|
for (const l of n) {
|
|
292
292
|
if (l.tagName === "EDI_DC40") continue;
|
|
293
293
|
const d = {};
|
|
294
|
-
for (const
|
|
295
|
-
d[
|
|
296
|
-
Object.keys(d).length > 0 &&
|
|
294
|
+
for (const p of Array.from(l.children))
|
|
295
|
+
d[p.tagName] = ((u = p.textContent) == null ? void 0 : u.trim()) ?? "";
|
|
296
|
+
Object.keys(d).length > 0 && a.items.push(d);
|
|
297
297
|
}
|
|
298
298
|
}
|
|
299
|
-
return
|
|
299
|
+
return a;
|
|
300
300
|
}
|
|
301
301
|
// ── 4. SAP BAPI 페이로드 → XML 직렬화 ───────────────────────
|
|
302
302
|
/**
|
|
@@ -310,22 +310,22 @@ class I {
|
|
|
310
310
|
];
|
|
311
311
|
if (t.BAPI_FUNCTION && e.push(` <FUNCTION>${this._escText(t.BAPI_FUNCTION)}</FUNCTION>`), t.DOCUMENTHEADER && typeof t.DOCUMENTHEADER == "object") {
|
|
312
312
|
e.push(" <DOCUMENTHEADER>");
|
|
313
|
-
for (const [
|
|
314
|
-
r != null && r !== "" && e.push(` <${
|
|
313
|
+
for (const [a, r] of Object.entries(t.DOCUMENTHEADER))
|
|
314
|
+
r != null && r !== "" && e.push(` <${a}>${this._escText(String(r))}</${a}>`);
|
|
315
315
|
e.push(" </DOCUMENTHEADER>");
|
|
316
316
|
}
|
|
317
|
-
const
|
|
318
|
-
(
|
|
317
|
+
const i = Object.keys(t).find(
|
|
318
|
+
(a) => Array.isArray(t[a]) && !a.startsWith("_")
|
|
319
319
|
);
|
|
320
|
-
if (
|
|
321
|
-
e.push(` <${
|
|
322
|
-
for (const
|
|
320
|
+
if (i) {
|
|
321
|
+
e.push(` <${i}>`);
|
|
322
|
+
for (const a of t[i]) {
|
|
323
323
|
e.push(" <ITEM>");
|
|
324
|
-
for (const [r,
|
|
325
|
-
|
|
324
|
+
for (const [r, c] of Object.entries(a))
|
|
325
|
+
c != null && c !== "" && !r.startsWith("_") && e.push(` <${r}>${this._escText(String(c))}</${r}>`);
|
|
326
326
|
e.push(" </ITEM>");
|
|
327
327
|
}
|
|
328
|
-
e.push(` </${
|
|
328
|
+
e.push(` </${i}>`);
|
|
329
329
|
}
|
|
330
330
|
return e.push("</BAPI_CALL>"), e.join(`
|
|
331
331
|
`);
|
|
@@ -340,10 +340,10 @@ class I {
|
|
|
340
340
|
'<?xml version="1.0" encoding="UTF-8"?>',
|
|
341
341
|
`<BAPI_BATCH total="${t.documents.length}">`
|
|
342
342
|
];
|
|
343
|
-
return t.documents.forEach((
|
|
344
|
-
e.push(` <BAPI_CALL seq="${
|
|
345
|
-
const r = this.stringifySap(
|
|
346
|
-
`).filter((
|
|
343
|
+
return t.documents.forEach((i, a) => {
|
|
344
|
+
e.push(` <BAPI_CALL seq="${a + 1}">`);
|
|
345
|
+
const r = this.stringifySap(i).split(`
|
|
346
|
+
`).filter((c) => !c.startsWith("<?xml")).map((c) => " " + c).join(`
|
|
347
347
|
`);
|
|
348
348
|
e.push(r), e.push(" </BAPI_CALL>");
|
|
349
349
|
}), e.push("</BAPI_BATCH>"), e.join(`
|
|
@@ -358,16 +358,19 @@ class I {
|
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
export {
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
M as
|
|
371
|
-
B as
|
|
361
|
+
S as DEFAULT_ICON_ROLES,
|
|
362
|
+
T as GridShuttle,
|
|
363
|
+
O as IconRegistry,
|
|
364
|
+
R as LocaleRegistry,
|
|
365
|
+
D as OpenGrid,
|
|
366
|
+
I as OrgChart,
|
|
367
|
+
k as SkinRegistry,
|
|
368
|
+
w as XmlConverter,
|
|
369
|
+
N as createGridShuttle,
|
|
370
|
+
M as iconRegistry,
|
|
371
|
+
B as localeRegistry,
|
|
372
|
+
U as renderIcon,
|
|
373
|
+
F as skinRegistry,
|
|
374
|
+
C as t
|
|
372
375
|
};
|
|
373
376
|
//# sourceMappingURL=open-grid.js.map
|
|
@@ -12,6 +12,8 @@ export interface CellEditDeps<T extends Record<string, any>> {
|
|
|
12
12
|
emit: (event: string, ...args: any[]) => void;
|
|
13
13
|
doRender: () => void;
|
|
14
14
|
announce: (msg: string) => void;
|
|
15
|
+
/** i18n: 편집 셀 위치 announce 해석 + 에디터 ctx 로케일 주입. / i18n: resolve edit-cell announce + inject locale into editor ctx. */
|
|
16
|
+
t: (key: string, params?: Record<string, string | number>) => string;
|
|
15
17
|
writeCell: (ri: number, field: string, value: any) => void;
|
|
16
18
|
scrollToRow: (ri: number) => void;
|
|
17
19
|
getVisibleLeaves: () => ColumnDef<T>[];
|
|
@@ -19,6 +19,8 @@ export interface ChartManagerDeps {
|
|
|
19
19
|
off(ev: string, cb: (...a: any[]) => void): void;
|
|
20
20
|
emit(ev: string, ...args: any[]): void;
|
|
21
21
|
announce(msg: string): void;
|
|
22
|
+
/** i18n: 차트 배지·패널 aria·announce 해석. / i18n: resolve chart badges/panel-aria/announce. */
|
|
23
|
+
t(key: string, params?: Record<string, string | number>): string;
|
|
22
24
|
}
|
|
23
25
|
export type { ChartInstance } from './chart/types.js';
|
|
24
26
|
export declare class ChartManager {
|