@guiexpert/solid-table 1.1.82 → 1.1.84
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/ComponentRendererWrapper.d.ts +2 -1
- package/GuiexpertTable.d.ts +2 -1
- package/GuiexpertTableProps.d.ts +4 -1
- package/RendererPropsIf.d.ts +1 -0
- package/index.cjs +17 -250
- package/index.d.ts +3 -2
- package/index.js +1006 -1256
- package/package.json +8 -5
package/index.cjs
CHANGED
|
@@ -1,273 +1,40 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Ie=(l,e)=>l===e,oe=Symbol("solid-proxy"),ke=typeof Proxy=="function",fe={equals:Ie};let we=ve;const B=1,z=2,xe={owned:null,cleanups:null,context:null,owner:null};var M=null;let te=null,Oe=null,x=null,R=null,O=null,Z=0;function Le(l,e){const t=x,s=M,o=l.length===0,i=e===void 0?s:e,r=o?xe:{owned:null,cleanups:null,context:i?i.context:null,owner:i},a=o?l:()=>l(()=>Q(()=>H(r)));M=r,x=null;try{return _(a,!0)}finally{x=t,M=s}}function ie(l,e,t){const s=ae(l,e,!1,B);$(s)}function Be(l,e,t){we=Ne;const s=ae(l,e,!1,B);s.user=!0,O?O.push(s):$(s)}function Pe(l,e,t){t=t?Object.assign({},fe,t):fe;const s=ae(l,e,!0,0);return s.observers=null,s.observerSlots=null,s.comparator=t.equals||void 0,$(s),We.bind(s)}function Q(l){if(x===null)return l();const e=x;x=null;try{return l()}finally{x=e}}function Ve(l){Be(()=>Q(l))}function We(){if(this.sources&&this.state)if(this.state===B)$(this);else{const l=R;R=null,_(()=>j(this),!1),R=l}if(x){const l=this.observers?this.observers.length:0;x.sources?(x.sources.push(this),x.sourceSlots.push(l)):(x.sources=[this],x.sourceSlots=[l]),this.observers?(this.observers.push(x),this.observerSlots.push(x.sources.length-1)):(this.observers=[x],this.observerSlots=[x.sources.length-1])}return this.value}function He(l,e,t){let s=l.value;return(!l.comparator||!l.comparator(s,e))&&(l.value=e,l.observers&&l.observers.length&&_(()=>{for(let o=0;o<l.observers.length;o+=1){const i=l.observers[o],r=te&&te.running;r&&te.disposed.has(i),(r?!i.tState:!i.state)&&(i.pure?R.push(i):O.push(i),i.observers&&Ce(i)),r||(i.state=B)}if(R.length>1e6)throw R=[],new Error},!1)),e}function $(l){if(!l.fn)return;H(l);const e=Z;$e(l,l.value,e)}function $e(l,e,t){let s;const o=M,i=x;x=M=l;try{s=l.fn(e)}catch(r){return l.pure&&(l.state=B,l.owned&&l.owned.forEach(H),l.owned=null),l.updatedAt=t+1,Ae(r)}finally{x=i,M=o}(!l.updatedAt||l.updatedAt<=t)&&(l.updatedAt!=null&&"observers"in l?He(l,s):l.value=s,l.updatedAt=t)}function ae(l,e,t,s=B,o){const i={fn:l,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:e,owner:M,context:M?M.context:null,pure:t};return M===null||M!==xe&&(M.owned?M.owned.push(i):M.owned=[i]),i}function U(l){if(l.state===0)return;if(l.state===z)return j(l);if(l.suspense&&Q(l.suspense.inFallback))return l.suspense.effects.push(l);const e=[l];for(;(l=l.owner)&&(!l.updatedAt||l.updatedAt<Z);)l.state&&e.push(l);for(let t=e.length-1;t>=0;t--)if(l=e[t],l.state===B)$(l);else if(l.state===z){const s=R;R=null,_(()=>j(l,e[0]),!1),R=s}}function _(l,e){if(R)return l();let t=!1;e||(R=[]),O?t=!0:O=[],Z++;try{const s=l();return _e(t),s}catch(s){t||(O=null),R=null,Ae(s)}}function _e(l){if(R&&(ve(R),R=null),l)return;const e=O;O=null,e.length&&_(()=>we(e),!1)}function ve(l){for(let e=0;e<l.length;e++)U(l[e])}function Ne(l){let e,t=0;for(e=0;e<l.length;e++){const s=l[e];s.user?l[t++]=s:U(s)}for(e=0;e<t;e++)U(l[e])}function j(l,e){l.state=0;for(let t=0;t<l.sources.length;t+=1){const s=l.sources[t];if(s.sources){const o=s.state;o===B?s!==e&&(!s.updatedAt||s.updatedAt<Z)&&U(s):o===z&&j(s,e)}}}function Ce(l){for(let e=0;e<l.observers.length;e+=1){const t=l.observers[e];t.state||(t.state=z,t.pure?R.push(t):O.push(t),t.observers&&Ce(t))}}function H(l){let e;if(l.sources)for(;l.sources.length;){const t=l.sources.pop(),s=l.sourceSlots.pop(),o=t.observers;if(o&&o.length){const i=o.pop(),r=t.observerSlots.pop();s<o.length&&(i.sourceSlots[r]=s,o[s]=i,t.observerSlots[s]=r)}}if(l.tOwned){for(e=l.tOwned.length-1;e>=0;e--)H(l.tOwned[e]);delete l.tOwned}if(l.owned){for(e=l.owned.length-1;e>=0;e--)H(l.owned[e]);l.owned=null}if(l.cleanups){for(e=l.cleanups.length-1;e>=0;e--)l.cleanups[e]();l.cleanups=null}l.state=0}function Ge(l){return l instanceof Error?l:new Error(typeof l=="string"?l:"Unknown error",{cause:l})}function Ae(l,e=M){throw Ge(l)}function G(){return!0}const ze={get(l,e,t){return e===oe?t:l.get(e)},has(l,e){return e===oe?!0:l.has(e)},set:G,deleteProperty:G,getOwnPropertyDescriptor(l,e){return{configurable:!0,enumerable:!0,get(){return l.get(e)},set:G,deleteProperty:G}},ownKeys(l){return l.keys()}};function se(l){return(l=typeof l=="function"?l():l)?l:{}}function Ue(){for(let l=0,e=this.length;l<e;++l){const t=this[l]();if(t!==void 0)return t}}function Ee(...l){let e=!1;for(let r=0;r<l.length;r++){const a=l[r];e=e||!!a&&oe in a,l[r]=typeof a=="function"?(e=!0,Pe(a)):a}if(ke&&e)return new Proxy({get(r){for(let a=l.length-1;a>=0;a--){const n=se(l[a])[r];if(n!==void 0)return n}},has(r){for(let a=l.length-1;a>=0;a--)if(r in se(l[a]))return!0;return!1},keys(){const r=[];for(let a=0;a<l.length;a++)r.push(...Object.keys(se(l[a])));return[...new Set(r)]}},ze);const t={},s=Object.create(null);for(let r=l.length-1;r>=0;r--){const a=l[r];if(!a)continue;const n=Object.getOwnPropertyNames(a);for(let d=n.length-1;d>=0;d--){const c=n[d];if(c==="__proto__"||c==="constructor")continue;const h=Object.getOwnPropertyDescriptor(a,c);if(!s[c])s[c]=h.get?{enumerable:!0,configurable:!0,get:Ue.bind(t[c]=[h.get.bind(a)])}:h.value!==void 0?h:void 0;else{const p=t[c];p&&(h.get?p.push(h.get.bind(a)):h.value!==void 0&&p.push(()=>h.value))}}}const o={},i=Object.keys(s);for(let r=i.length-1;r>=0;r--){const a=i[r],n=s[a];n&&n.get?Object.defineProperty(o,a,n):o[a]=n?n.value:void 0}return o}function je(l,e,t){let s=t.length,o=e.length,i=s,r=0,a=0,n=e[o-1].nextSibling,d=null;for(;r<o||a<i;){if(e[r]===t[a]){r++,a++;continue}for(;e[o-1]===t[i-1];)o--,i--;if(o===r){const c=i<s?a?t[a-1].nextSibling:t[i-a]:n;for(;a<i;)l.insertBefore(t[a++],c)}else if(i===a)for(;r<o;)(!d||!d.has(e[r]))&&e[r].remove(),r++;else if(e[r]===t[i-1]&&t[a]===e[o-1]){const c=e[--o].nextSibling;l.insertBefore(t[a++],e[r++].nextSibling),l.insertBefore(t[--i],c),e[o]=t[i]}else{if(!d){d=new Map;let h=a;for(;h<i;)d.set(t[h],h++)}const c=d.get(e[r]);if(c!=null)if(a<c&&c<i){let h=r,p=1,m;for(;++h<o&&h<i&&!((m=d.get(e[h]))==null||m!==c+p);)p++;if(p>c-a){const g=e[r];for(;a<c;)l.insertBefore(t[a++],g)}else l.replaceChild(t[a++],e[r++])}else r++;else e[r++].remove()}}}function Xe(l,e,t,s={}){let o;return Le(i=>{o=i,e===document?l():Je(e,l(),e.firstChild?null:void 0,t)},s.owner),()=>{o(),e.textContent=""}}function Ke(l,e,t){let s;const o=()=>{const r=document.createElement("template");return r.innerHTML=l,r.content.firstChild},i=()=>(s||(s=o())).cloneNode(!0);return i.cloneNode=i,i}function Ye(l,e,t){return Q(()=>l(e,t))}function Je(l,e,t,s){if(t!==void 0&&!s&&(s=[]),typeof e!="function")return X(l,e,s,t);ie(o=>X(l,e(),o,t),s)}function X(l,e,t,s,o){for(;typeof t=="function";)t=t();if(e===t)return t;const i=typeof e,r=s!==void 0;if(l=r&&t[0]&&t[0].parentNode||l,i==="string"||i==="number"){if(i==="number"&&(e=e.toString(),e===t))return t;if(r){let a=t[0];a&&a.nodeType===3?a.data!==e&&(a.data=e):a=document.createTextNode(e),t=V(l,t,s,a)}else t!==""&&typeof t=="string"?t=l.firstChild.data=e:t=l.textContent=e}else if(e==null||i==="boolean")t=V(l,t,s);else{if(i==="function")return ie(()=>{let a=e();for(;typeof a=="function";)a=a();t=X(l,a,t,s)}),()=>t;if(Array.isArray(e)){const a=[],n=t&&Array.isArray(t);if(re(a,e,t,o))return ie(()=>t=X(l,a,t,s,!0)),()=>t;if(a.length===0){if(t=V(l,t,s),r)return t}else n?t.length===0?ue(l,a,s):je(l,t,a):(t&&V(l),ue(l,a));t=a}else if(e.nodeType){if(Array.isArray(t)){if(r)return t=V(l,t,s,e);V(l,t,null,e)}else t==null||t===""||!l.firstChild?l.appendChild(e):l.replaceChild(e,l.firstChild);t=e}}return t}function re(l,e,t,s){let o=!1;for(let i=0,r=e.length;i<r;i++){let a=e[i],n=t&&t[l.length],d;if(!(a==null||a===!0||a===!1))if((d=typeof a)=="object"&&a.nodeType)l.push(a);else if(Array.isArray(a))o=re(l,a,n)||o;else if(d==="function")if(s){for(;typeof a=="function";)a=a();o=re(l,Array.isArray(a)?a:[a],Array.isArray(n)?n:[n])||o}else l.push(a),o=!0;else{const c=String(a);n&&n.nodeType===3&&n.data===c?l.push(n):l.push(document.createTextNode(c))}}return o}function ue(l,e,t=null){for(let s=0,o=e.length;s<o;s++)l.insertBefore(e[s],t)}function V(l,e,t,s){if(t===void 0)return l.textContent="";const o=s||document.createTextNode("");if(e.length){let i=!1;for(let r=e.length-1;r>=0;r--){const a=e[r];if(o!==a){const n=a.parentNode===l;!i&&!r?n?l.replaceChild(o,a):l.insertBefore(o,t):n&&a.remove()}else i=!0}}else l.insertBefore(o,t);return[o]}class qe{constructor(e){this.code=e}render(e,t,s,o,i,r,a){const n=Ee({rowIndex:t,columnIndex:s,areaIdent:o,areaModel:i,cellValue:r});Xe(()=>this.code(n),e)}}const Ze=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Qe(l,e=500){let t=null;return function(...s){t&&window.clearTimeout(t),t=window.setTimeout(()=>{l.apply(this,s),t=null},e)}}class P{constructor(){this.alreadySet=!1}static getInstance(){return P.instance||(P.instance=new P),P.instance}setLicenseKey(e){if(e&&!this.alreadySet){const t=document.createElement("meta");t.content="license="+e,t.name="guiexperttable",document.getElementsByTagName("head")[0].appendChild(t),this.alreadySet=!0}}}function K(l){return l&&l.type==="TreeRow"}function le(l){return l&&l.type==="AreaModelTree"}class ne{constructor(e=-1,t=-1,s=-1,o=-1,i,r,a,n=0,d=0,c=0,h=""){this.rowIndex=e,this.rowTop=t,this.columnIndex=s,this.columnLeft=o,this.areaIdent=i,this.sideIdent=r,this.originalEvent=a,this.clickCount=n,this.draggingX=d,this.draggingY=c,this.action=h}clone(){return new ne(this.rowIndex,this.rowTop,this.columnIndex,this.columnLeft,this.areaIdent,this.sideIdent,this.originalEvent,this.clickCount,this.draggingX,this.draggingY,this.action)}}class k{constructor(e=">",t="",s=[]){this.content=e,this.style=t,this.classes=s}}class Re{constructor(e=new k(">","transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",["gt-table-tree-arrow-expanded"]),t=new k(">","",["ge-table-tree-arrow-collapsed"]),s=new k(">","color:transparent;",["gt-table-tree-arrow-hidden"]),o=new k("↕","",["gt-table-tree-arrow-expanded-all"])){this.arrowExpanded=e,this.arrowCollapsed=t,this.arrowPlaceholder=s,this.arrowExpandCollapseAll=o}}class Me{constructor(e=new k("↑","",["ge-header-sorted-asc"]),t=new k("↓","",["ge-header-sorted-desc"]),s=new k("↑","color:transparent;",[])){this.iconAsc=e,this.iconDesc=t,this.iconPlaceholder=s}}class et{constructor(e){this.domService=e}setStyle(e,t,s){return this.domService.setStyle(e,t,s),e}applyStyle(e,t){for(const s in t)this.domService.setStyle(e,s,t[s]);return e}applyDisplayNoneStyle(e){return this.domService.setStyle(e,"display","none"),e}applyDisplayBlockStyle(e){return this.domService.setStyle(e,"display","block"),e}applyStyleInPx(e,t){return Object.entries(t).forEach(([s,o])=>this.domService.setStyle(e,s,o+"px")),e}applyStylePosistionRelative(e){return this.domService.setStyle(e,"position","relative"),this.domService.setStyle(e,"overflow","clip"),e}applyStylePosistionAbsolute(e){return this.domService.setStyle(e,"position","absolute"),e}applyStyleFullSize(e){return this.domService.setStyle(e,"width","100%"),this.domService.setStyle(e,"height","100%"),e}applyStyleOverflowAuto(e="auto",t="auto",s){return this.domService.setStyle(s,"overflow-x",e),this.domService.setStyle(s,"overflow-y",t),s}applyStyleNoPadding(e){return this.domService.setStyle(e,"padding","0"),this.domService.setStyle(e,"margin","0"),this.domService.setStyle(e,"border","0"),e}appendRelativeChildDiv(e){const t=this.applyStylePosistionRelative(this.applyStyleFullSize(this.applyStyleNoPadding(this.domService.createElement("div"))));return this.domService.appendChild(e,t),this.applyStylePosistionAbsolute(e),{parent:e,child:t,cache:{}}}appendText(e,t){const s=this.domService.createText(t);return this.domService.appendChild(e,s),s}addClass(e,t){return e.includes(" ")?e.split(" ").forEach(s=>this.domService.addClass(t,s)):this.domService.addClass(t,e),t}removeClass(e,t){return e.includes(" ")?e.split(" ").forEach(s=>this.domService.removeClass(t,s)):this.domService.removeClass(t,e),t}addClasses(e,t){if(e)for(const s of e)this.domService.addClass(t,s);return t}setAttribute(e,t,s){return t&&s&&this.domService.setAttribute(e,t,s),e}createAreaDivWithClass(e,t,s,o){const i=this.domService.createElement("div");return this.addClass(e,i),this.domService.setAttribute(i,"data-area",s),this.domService.setAttribute(i,"data-side",o),this.domService.appendChild(t,i),i}createDivWithClass(e,t){const s=this.domService.createElement("div");return this.addClass(e,s),this.domService.appendChild(t,s),s}addRowDiv(e,t,s=-1,o,i,r=""){const a=t.index??-1,n=this.getDivOrCreateDiv(a,e);if(this.domService.addClass(n,"ge-table-row-div"),this.domService.addClass(n,`ge-table-row-div-${t.index}`),o==="body"&&i==="center"){const d=((t==null?void 0:t.index)??0)%2===0?"even":"odd";this.domService.addClass(n,`ge-table-row-${d}`)}if(this.domService.setStyle(n,"display","clip"),this.domService.setStyle(n,"position","absolute"),this.domService.setStyle(n,"left",`${t.left}px`),this.domService.setStyle(n,"top",`${t.top}px`),this.domService.setStyle(n,"width",`${t.width}px`),this.domService.setStyle(n,"height",`${t.height}px`),this.domService.setAttribute(n,"data-row-index",`${s}`),this.domService.setAttribute(n,"data-area",`${o}`),r){const d=this.domService.createText(r);this.domService.appendChild(n,d)}return this.domService.appendChild(e.child,n),n}addColumnDiv(e){const{parent:t,geo:s,rowIndex:o=-1,columnIndex:i=-1,areaIdent:r,sideIdent:a,text:n="",treeArrow:d,tableOptions:c,checkedType:h=void 0,sortState:p}=e,m=c==null?void 0:c.treeOptions,g=c==null?void 0:c.showCheckboxWihoutExtraColumn,b=this.domService.createElement("div");this.domService.addClass(b,"ge-table-col-div"),g&&this.domService.addClass(b,"ge-with-checkbox"),this.domService.addClass(b,`ge-table-col-div-${s.index}`),this.domService.setAttribute(b,"data-col-index",`${s.index}`),this.domService.setAttribute(b,"data-row-index",`${o}`),this.domService.setAttribute(b,"data-area",`${r}`);const f=((s==null?void 0:s.index)??0)%2===0?"even":"odd";if(r==="body"&&a==="center"&&this.domService.addClass(b,`ge-table-column-${f}`),this.domService.setStyle(b,"display","clip"),this.domService.setStyle(b,"position","absolute"),this.domService.setStyle(b,"left",`${s.left}px`),this.domService.setStyle(b,"top",`${s.top}px`),this.domService.setStyle(b,"width",`${s.width}px`),this.domService.setStyle(b,"height",`${s.height}px`),d&&d!=="none"&&(this.domService.addClass(b,"ge-table-col-tree"),this.addArrowDiv(b,d,m,o,i,r)),g&&i===0&&h&&this.addCheckboxToDiv(b,h,r,o),n){const u=d!=="none"&&i===0;this.addLabelDiv(b,n,u,o,i,r)}return p&&this.addSortedIcon(b,p,c==null?void 0:c.sortedOptions,i),this.domService.appendChild(t,b),b}addCheckboxToDiv(e,t,s,o){const i=this.domService.createElement("div"),r=t==="full"?"checked":"";return i.innerHTML=`
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const Re=(r,e)=>r===e,te=Symbol("solid-proxy"),Me=typeof Proxy=="function",pe={equals:Re};let ge=ye;const P=1,j=2,Se={owned:null,cleanups:null,context:null,owner:null};var M=null;let Q=null,Te=null,x=null,R=null,O=null,J=0;function Fe(r,e){const t=x,s=M,i=r.length===0,o=e===void 0?s:e,l=i?Se:{owned:null,cleanups:null,context:o?o.context:null,owner:o},n=i?r:()=>r(()=>q(()=>H(l)));M=l,x=null;try{return _(n,!0)}finally{x=t,M=s}}function se(r,e,t){const s=le(r,e,!1,P);$(s)}function De(r,e,t){ge=ke;const s=le(r,e,!1,P);s.user=!0,O?O.push(s):$(s)}function Ie(r,e,t){t=t?Object.assign({},pe,t):pe;const s=le(r,e,!0,0);return s.observers=null,s.observerSlots=null,s.comparator=t.equals||void 0,$(s),Oe.bind(s)}function q(r){if(x===null)return r();const e=x;x=null;try{return r()}finally{x=e}}function Le(r){De(()=>q(r))}function Oe(){if(this.sources&&this.state)if(this.state===P)$(this);else{const r=R;R=null,_(()=>X(this),!1),R=r}if(x){const r=this.observers?this.observers.length:0;x.sources?(x.sources.push(this),x.sourceSlots.push(r)):(x.sources=[this],x.sourceSlots=[r]),this.observers?(this.observers.push(x),this.observerSlots.push(x.sources.length-1)):(this.observers=[x],this.observerSlots=[x.sources.length-1])}return this.value}function Be(r,e,t){let s=r.value;return(!r.comparator||!r.comparator(s,e))&&(r.value=e,r.observers&&r.observers.length&&_(()=>{for(let i=0;i<r.observers.length;i+=1){const o=r.observers[i],l=Q&&Q.running;l&&Q.disposed.has(o),(l?!o.tState:!o.state)&&(o.pure?R.push(o):O.push(o),o.observers&&be(o)),l||(o.state=P)}if(R.length>1e6)throw R=[],new Error},!1)),e}function $(r){if(!r.fn)return;H(r);const e=J;Pe(r,r.value,e)}function Pe(r,e,t){let s;const i=M,o=x;x=M=r;try{s=r.fn(e)}catch(l){return r.pure&&(r.state=P,r.owned&&r.owned.forEach(H),r.owned=null),r.updatedAt=t+1,we(l)}finally{x=o,M=i}(!r.updatedAt||r.updatedAt<=t)&&(r.updatedAt!=null&&"observers"in r?Be(r,s):r.value=s,r.updatedAt=t)}function le(r,e,t,s=P,i){const o={fn:r,state:s,updatedAt:null,owned:null,sources:null,sourceSlots:null,cleanups:null,value:e,owner:M,context:M?M.context:null,pure:t};return M===null||M!==Se&&(M.owned?M.owned.push(o):M.owned=[o]),o}function U(r){if(r.state===0)return;if(r.state===j)return X(r);if(r.suspense&&q(r.suspense.inFallback))return r.suspense.effects.push(r);const e=[r];for(;(r=r.owner)&&(!r.updatedAt||r.updatedAt<J);)r.state&&e.push(r);for(let t=e.length-1;t>=0;t--)if(r=e[t],r.state===P)$(r);else if(r.state===j){const s=R;R=null,_(()=>X(r,e[0]),!1),R=s}}function _(r,e){if(R)return r();let t=!1;e||(R=[]),O?t=!0:O=[],J++;try{const s=r();return Ve(t),s}catch(s){t||(O=null),R=null,we(s)}}function Ve(r){if(R&&(ye(R),R=null),r)return;const e=O;O=null,e.length&&_(()=>ge(e),!1)}function ye(r){for(let e=0;e<r.length;e++)U(r[e])}function ke(r){let e,t=0;for(e=0;e<r.length;e++){const s=r[e];s.user?r[t++]=s:U(s)}for(e=0;e<t;e++)U(r[e])}function X(r,e){r.state=0;for(let t=0;t<r.sources.length;t+=1){const s=r.sources[t];if(s.sources){const i=s.state;i===P?s!==e&&(!s.updatedAt||s.updatedAt<J)&&U(s):i===j&&X(s,e)}}}function be(r){for(let e=0;e<r.observers.length;e+=1){const t=r.observers[e];t.state||(t.state=j,t.pure?R.push(t):O.push(t),t.observers&&be(t))}}function H(r){let e;if(r.sources)for(;r.sources.length;){const t=r.sources.pop(),s=r.sourceSlots.pop(),i=t.observers;if(i&&i.length){const o=i.pop(),l=t.observerSlots.pop();s<i.length&&(o.sourceSlots[l]=s,i[s]=o,t.observerSlots[s]=l)}}if(r.tOwned){for(e=r.tOwned.length-1;e>=0;e--)H(r.tOwned[e]);delete r.tOwned}if(r.owned){for(e=r.owned.length-1;e>=0;e--)H(r.owned[e]);r.owned=null}if(r.cleanups){for(e=r.cleanups.length-1;e>=0;e--)r.cleanups[e]();r.cleanups=null}r.state=0}function We(r){return r instanceof Error?r:new Error(typeof r=="string"?r:"Unknown error",{cause:r})}function we(r,e=M){throw We(r)}function G(){return!0}const He={get(r,e,t){return e===te?t:r.get(e)},has(r,e){return e===te?!0:r.has(e)},set:G,deleteProperty:G,getOwnPropertyDescriptor(r,e){return{configurable:!0,enumerable:!0,get(){return r.get(e)},set:G,deleteProperty:G}},ownKeys(r){return r.keys()}};function ee(r){return(r=typeof r=="function"?r():r)?r:{}}function $e(){for(let r=0,e=this.length;r<e;++r){const t=this[r]();if(t!==void 0)return t}}function xe(...r){let e=!1;for(let l=0;l<r.length;l++){const n=r[l];e=e||!!n&&te in n,r[l]=typeof n=="function"?(e=!0,Ie(n)):n}if(Me&&e)return new Proxy({get(l){for(let n=r.length-1;n>=0;n--){const a=ee(r[n])[l];if(a!==void 0)return a}},has(l){for(let n=r.length-1;n>=0;n--)if(l in ee(r[n]))return!0;return!1},keys(){const l=[];for(let n=0;n<r.length;n++)l.push(...Object.keys(ee(r[n])));return[...new Set(l)]}},He);const t={},s=Object.create(null);for(let l=r.length-1;l>=0;l--){const n=r[l];if(!n)continue;const a=Object.getOwnPropertyNames(n);for(let d=a.length-1;d>=0;d--){const c=a[d];if(c==="__proto__"||c==="constructor")continue;const h=Object.getOwnPropertyDescriptor(n,c);if(!s[c])s[c]=h.get?{enumerable:!0,configurable:!0,get:$e.bind(t[c]=[h.get.bind(n)])}:h.value!==void 0?h:void 0;else{const p=t[c];p&&(h.get?p.push(h.get.bind(n)):h.value!==void 0&&p.push(()=>h.value))}}}const i={},o=Object.keys(s);for(let l=o.length-1;l>=0;l--){const n=o[l],a=s[n];a&&a.get?Object.defineProperty(i,n,a):i[n]=a?a.value:void 0}return i}function _e(r,e,t){let s=t.length,i=e.length,o=s,l=0,n=0,a=e[i-1].nextSibling,d=null;for(;l<i||n<o;){if(e[l]===t[n]){l++,n++;continue}for(;e[i-1]===t[o-1];)i--,o--;if(i===l){const c=o<s?n?t[n-1].nextSibling:t[o-n]:a;for(;n<o;)r.insertBefore(t[n++],c)}else if(o===n)for(;l<i;)(!d||!d.has(e[l]))&&e[l].remove(),l++;else if(e[l]===t[o-1]&&t[n]===e[i-1]){const c=e[--i].nextSibling;r.insertBefore(t[n++],e[l++].nextSibling),r.insertBefore(t[--o],c),e[i]=t[o]}else{if(!d){d=new Map;let h=n;for(;h<o;)d.set(t[h],h++)}const c=d.get(e[l]);if(c!=null)if(n<c&&c<o){let h=l,p=1,g;for(;++h<i&&h<o&&!((g=d.get(e[h]))==null||g!==c+p);)p++;if(p>c-n){const u=e[l];for(;n<c;)r.insertBefore(t[n++],u)}else r.replaceChild(t[n++],e[l++])}else l++;else e[l++].remove()}}}function Ne(r,e,t,s={}){let i;return Fe(o=>{i=o,e===document?r():Ue(e,r(),e.firstChild?null:void 0,t)},s.owner),()=>{i(),e.textContent=""}}function Ge(r,e,t){let s;const i=()=>{const l=document.createElement("template");return l.innerHTML=r,l.content.firstChild},o=()=>(s||(s=i())).cloneNode(!0);return o.cloneNode=o,o}function je(r,e,t){return q(()=>r(e,t))}function Ue(r,e,t,s){if(t!==void 0&&!s&&(s=[]),typeof e!="function")return z(r,e,s,t);se(i=>z(r,e(),i,t),s)}function z(r,e,t,s,i){for(;typeof t=="function";)t=t();if(e===t)return t;const o=typeof e,l=s!==void 0;if(r=l&&t[0]&&t[0].parentNode||r,o==="string"||o==="number"){if(o==="number"&&(e=e.toString(),e===t))return t;if(l){let n=t[0];n&&n.nodeType===3?n.data!==e&&(n.data=e):n=document.createTextNode(e),t=k(r,t,s,n)}else t!==""&&typeof t=="string"?t=r.firstChild.data=e:t=r.textContent=e}else if(e==null||o==="boolean")t=k(r,t,s);else{if(o==="function")return se(()=>{let n=e();for(;typeof n=="function";)n=n();t=z(r,n,t,s)}),()=>t;if(Array.isArray(e)){const n=[],a=t&&Array.isArray(t);if(ie(n,e,t,i))return se(()=>t=z(r,n,t,s,!0)),()=>t;if(n.length===0){if(t=k(r,t,s),l)return t}else a?t.length===0?ue(r,n,s):_e(r,t,n):(t&&k(r),ue(r,n));t=n}else if(e.nodeType){if(Array.isArray(t)){if(l)return t=k(r,t,s,e);k(r,t,null,e)}else t==null||t===""||!r.firstChild?r.appendChild(e):r.replaceChild(e,r.firstChild);t=e}}return t}function ie(r,e,t,s){let i=!1;for(let o=0,l=e.length;o<l;o++){let n=e[o],a=t&&t[r.length],d;if(!(n==null||n===!0||n===!1))if((d=typeof n)=="object"&&n.nodeType)r.push(n);else if(Array.isArray(n))i=ie(r,n,a)||i;else if(d==="function")if(s){for(;typeof n=="function";)n=n();i=ie(r,Array.isArray(n)?n:[n],Array.isArray(a)?a:[a])||i}else r.push(n),i=!0;else{const c=String(n);a&&a.nodeType===3&&a.data===c?r.push(a):r.push(document.createTextNode(c))}}return i}function ue(r,e,t=null){for(let s=0,i=e.length;s<i;s++)r.insertBefore(e[s],t)}function k(r,e,t,s){if(t===void 0)return r.textContent="";const i=s||document.createTextNode("");if(e.length){let o=!1;for(let l=e.length-1;l>=0;l--){const n=e[l];if(i!==n){const a=n.parentNode===r;!o&&!l?a?r.replaceChild(i,n):r.insertBefore(i,t):a&&n.remove()}else o=!0}}else r.insertBefore(i,t);return[i]}class Xe{constructor(e){this.code=e}render(e,t,s,i,o,l,n){const a=xe({rowIndex:t,columnIndex:s,areaIdent:i,areaModel:o,cellValue:l});Ne(()=>this.code(a),e)}}const ze=Object.freeze(Object.defineProperty({__proto__:null},Symbol.toStringTag,{value:"Module"}));function Ke(r,e=500){let t=null;return function(...s){t&&window.clearTimeout(t),t=window.setTimeout(()=>{r.apply(this,s),t=null},e)}}class V{constructor(){this.alreadySet=!1}static getInstance(){return V.instance||(V.instance=new V),V.instance}setLicenseKey(e){if(e&&!this.alreadySet){const t=document.createElement("meta");t.content="license="+e,t.name="guiexperttable",document.getElementsByTagName("head")[0].appendChild(t),this.alreadySet=!0}}}function K(r){return r&&r.type==="TreeRow"}function oe(r){return r&&r.type==="AreaModelTree"}class re{constructor(e=-1,t=-1,s=-1,i=-1,o,l,n,a=0,d=0,c=0,h=""){this.rowIndex=e,this.rowTop=t,this.columnIndex=s,this.columnLeft=i,this.areaIdent=o,this.sideIdent=l,this.originalEvent=n,this.clickCount=a,this.draggingX=d,this.draggingY=c,this.action=h}clone(){return new re(this.rowIndex,this.rowTop,this.columnIndex,this.columnLeft,this.areaIdent,this.sideIdent,this.originalEvent,this.clickCount,this.draggingX,this.draggingY,this.action)}}class L{constructor(e=">",t="",s=[]){this.content=e,this.style=t,this.classes=s}}class Ce{constructor(e=new L(">","transform: rotate(90deg) translate(66%, -66%); transform-origin: 0 0;",["gt-table-tree-arrow-expanded"]),t=new L(">","",["ge-table-tree-arrow-collapsed"]),s=new L(">","color:transparent;",["gt-table-tree-arrow-hidden"]),i=new L("↕","",["gt-table-tree-arrow-expanded-all"])){this.arrowExpanded=e,this.arrowCollapsed=t,this.arrowPlaceholder=s,this.arrowExpandCollapseAll=i}}class ve{constructor(e=new L("↑","",["ge-header-sorted-asc"]),t=new L("↓","",["ge-header-sorted-desc"]),s=new L("↑","color:transparent;",[])){this.iconAsc=e,this.iconDesc=t,this.iconPlaceholder=s}}class Ye{constructor(e){this.domService=e}setStyle(e,t,s){return this.domService.setStyle(e,t,s),e}applyStyle(e,t){for(const s in t)this.domService.setStyle(e,s,t[s]);return e}applyDisplayNoneStyle(e){return this.domService.setStyle(e,"display","none"),e}applyDisplayBlockStyle(e){return this.domService.setStyle(e,"display","block"),e}applyStyleInPx(e,t){return Object.entries(t).forEach(([s,i])=>this.domService.setStyle(e,s,i+"px")),e}applyStylePosistionRelative(e){return this.domService.setStyle(e,"position","relative"),this.domService.setStyle(e,"overflow","clip"),e}applyStylePosistionAbsolute(e){return this.domService.setStyle(e,"position","absolute"),e}applyStyleFullSize(e){return this.domService.setStyle(e,"width","100%"),this.domService.setStyle(e,"height","100%"),e}applyStyleOverflowAuto(e="auto",t="auto",s){return this.domService.setStyle(s,"overflow-x",e),this.domService.setStyle(s,"overflow-y",t),s}applyStyleNoPadding(e){return this.domService.setStyle(e,"padding","0"),this.domService.setStyle(e,"margin","0"),this.domService.setStyle(e,"border","0"),e}appendRelativeChildDiv(e){const t=this.applyStylePosistionRelative(this.applyStyleFullSize(this.applyStyleNoPadding(this.domService.createElement("div"))));return this.domService.appendChild(e,t),this.applyStylePosistionAbsolute(e),{parent:e,child:t,cache:{}}}appendText(e,t){const s=this.domService.createText(t);return this.domService.appendChild(e,s),s}addClass(e,t){return e.includes(" ")?e.split(" ").forEach(s=>this.domService.addClass(t,s)):this.domService.addClass(t,e),t}removeClass(e,t){return e.includes(" ")?e.split(" ").forEach(s=>this.domService.removeClass(t,s)):this.domService.removeClass(t,e),t}addClasses(e,t){if(e)for(const s of e)this.domService.addClass(t,s);return t}setAttribute(e,t,s){return t&&s&&this.domService.setAttribute(e,t,s),e}createAreaDivWithClass(e,t,s,i){const o=this.domService.createElement("div");return this.addClass(e,o),this.domService.setAttribute(o,"data-area",s),this.domService.setAttribute(o,"data-side",i),this.domService.appendChild(t,o),o}createDivWithClass(e,t){const s=this.domService.createElement("div");return this.addClass(e,s),this.domService.appendChild(t,s),s}addRowDiv(e,t,s=-1,i,o,l=""){const n=t.index??-1,a=this.getDivOrCreateDiv(n,e);if(this.domService.addClass(a,"ge-table-row-div"),this.domService.addClass(a,`ge-table-row-div-${t.index}`),i==="body"&&o==="center"){const d=((t==null?void 0:t.index)??0)%2===0?"even":"odd";this.domService.addClass(a,`ge-table-row-${d}`)}if(this.domService.setStyle(a,"display","clip"),this.domService.setStyle(a,"position","absolute"),this.domService.setStyle(a,"left",`${t.left}px`),this.domService.setStyle(a,"top",`${t.top}px`),this.domService.setStyle(a,"width",`${t.width}px`),this.domService.setStyle(a,"height",`${t.height}px`),this.domService.setAttribute(a,"data-row-index",`${s}`),this.domService.setAttribute(a,"data-area",`${i}`),l){const d=this.domService.createText(l);this.domService.appendChild(a,d)}return this.domService.appendChild(e.child,a),a}addColumnDiv(e){const{parent:t,geo:s,rowIndex:i=-1,columnIndex:o=-1,areaIdent:l,sideIdent:n,text:a="",treeArrow:d,tableOptions:c,checkedType:h=void 0,sortState:p}=e,g=c==null?void 0:c.treeOptions,u=c==null?void 0:c.showCheckboxWihoutExtraColumn,S=this.domService.createElement("div");this.domService.addClass(S,"ge-table-col-div"),u&&this.domService.addClass(S,"ge-with-checkbox"),this.domService.addClass(S,`ge-table-col-div-${s.index}`),this.domService.setAttribute(S,"data-col-index",`${s.index}`),this.domService.setAttribute(S,"data-row-index",`${i}`),this.domService.setAttribute(S,"data-area",`${l}`);const f=((s==null?void 0:s.index)??0)%2===0?"even":"odd";if(l==="body"&&n==="center"&&this.domService.addClass(S,`ge-table-column-${f}`),this.domService.setStyle(S,"display","clip"),this.domService.setStyle(S,"position","absolute"),this.domService.setStyle(S,"left",`${s.left}px`),this.domService.setStyle(S,"top",`${s.top}px`),this.domService.setStyle(S,"width",`${s.width}px`),this.domService.setStyle(S,"height",`${s.height}px`),d&&d!=="none"&&(this.domService.addClass(S,"ge-table-col-tree"),this.addArrowDiv(S,d,g,i,o,l)),u&&o===0&&h&&this.addCheckboxToDiv(S,h,l,i),a){const m=d!=="none"&&o===0;this.addLabelDiv(S,a,m,i,o,l)}return p&&this.addSortedIcon(S,p,c==null?void 0:c.sortedOptions,o),this.domService.appendChild(t,S),S}addCheckboxToDiv(e,t,s,i){const o=this.domService.createElement("div"),l=t==="full"?"checked":"";return o.innerHTML=`
|
|
2
2
|
<input
|
|
3
3
|
type="checkbox"
|
|
4
4
|
data-area="${s}"
|
|
5
|
-
data-row-index="${
|
|
5
|
+
data-row-index="${i}"
|
|
6
6
|
data-input-type="checkbox"
|
|
7
|
-
${
|
|
8
|
-
class="ge-table-row-checkbox"> `,this.domService.setStyle(i,"display","inline"),this.domService.setStyle(i,"width","inherit"),this.domService.setAttribute(i,"data-row-index",`${o}`),this.domService.appendChild(e,i),i}addLabelDiv(e,t="",s=!1,o=-1,i=-1,r="body"){const a=this.domService.createElement("div");if(this.domService.addClass(a,"ge-table-label-div"),this.domService.setStyle(a,"position","relative"),this.domService.setStyle(a,"background","transparent"),this.domService.setStyle(a,"width","100%"),this.domService.setStyle(a,"height","100%"),this.domService.setAttribute(a,"data-row-index",`${o}`),this.domService.setAttribute(a,"data-col-index",`${i}`),this.domService.setAttribute(a,"data-area",`${r}`),t)if(s){const n=this.domService.createText(t);this.domService.appendChild(a,n)}else{const n=this.domService.createElement("div");this.domService.appendChild(a,n);const d=this.domService.createText(t);this.domService.addClass(n,"ge-table-label"),this.domService.appendChild(n,d),this.domService.setAttribute(n,"data-row-index",`${o}`),this.domService.setAttribute(n,"data-col-index",`${i}`),this.domService.setAttribute(n,"data-area",`${r}`)}return this.domService.appendChild(e,a),a}addSortedIcon(e,t="",s=new Me,o=-1){const i=this.domService.createElement("div");this.domService.addClass(i,"ge-table-sorted-icon-div"),this.domService.setStyle(i,"position","absolute"),this.domService.setStyle(i,"top","0"),this.domService.setStyle(i,"right","0"),this.domService.setStyle(i,"width","20px"),this.domService.setStyle(i,"background","transparent"),this.domService.setStyle(i,"cursor","pointer"),this.domService.setAttribute(i,"data-col-index",`${o}`),this.domService.setAttribute(i,"data-area","header");let r;t==="asc"?r=s.iconAsc:t==="desc"?r=s.iconDesc:r=s.iconPlaceholder;const a=r.content,n=this.domService.createText(a);this.domService.appendChild(i,n),r.style&&this.applyStyleString(i,r.style);for(const d of r.classes)this.domService.addClass(i,d);return this.domService.appendChild(e,i),i}addArrowDiv(e,t="none",s=new Re,o=-1,i=-1,r="body"){const a=this.domService.createElement("div");this.domService.addClass(a,"ge-table-tree-arrow-div"),this.domService.setStyle(a,"display","inline-block"),this.domService.setStyle(a,"position",""),this.domService.setStyle(a,"width","20px"),this.domService.setStyle(a,"background","transparent"),this.domService.setStyle(a,"cursor","pointer"),this.domService.setAttribute(a,"data-row-index",`${o}`),this.domService.setAttribute(a,"data-col-index",`${i}`),this.domService.setAttribute(a,"data-area",`${r}`);let n;t==="expanded"?n=s.arrowExpanded:t==="collapsed"?n=s.arrowCollapsed:n=s.arrowPlaceholder;const d=n.content,c=this.domService.createText(d);this.domService.appendChild(a,c),n.style&&this.applyStyleString(a,n.style);for(const h of n.classes)this.domService.addClass(a,h);return this.domService.appendChild(e,a),a}addColumnBorderDivs(e,t,s,o,i){if(e.verticalBorderVisible){const r=`ge-table-${o}-${i}-vertical-border`;this.addVerticalBorder(s,t,r)}if(e.horizontalBorderVisible){const r=`ge-table-${o}-${i}-horizontal-border`;this.addHorizontalBorder(s,t,r)}return t}addHorizontalBorder(e,t,s="ge-table-body-center-horizontal-border"){const o=this.domService.createElement("div");return this.domService.addClass(o,s),this.domService.setStyle(o,"display","clip"),this.domService.setStyle(o,"position","absolute"),this.domService.setStyle(o,"left",`${e.left}px`),this.domService.setStyle(o,"top",`${e.top}px`),this.domService.setStyle(o,"width",`${e.width}px`),this.domService.setStyle(o,"height","1px"),this.domService.appendChild(t,o),o}addFocusBorderDivs(e,t,s){t={...t,width:t.width+1,height:t.height+1};let o=this.domService.createElement("div");return this.domService.addClass(o,"ge-table-focus-border"),this.domService.setStyle(o,"display","clip"),this.domService.setStyle(o,"position","absolute"),this.domService.setStyle(o,"left",`${t.left}px`),this.domService.setStyle(o,"top",`${t.top}px`),this.domService.setStyle(o,"width","1px"),this.domService.setStyle(o,"height",`${t.height}px`),this.domService.setStyle(o,"z-index","9999"),this.applyStyle(o,s),this.domService.appendChild(e,o),o=this.domService.createElement("div"),this.domService.addClass(o,"ge-table-focus-border"),this.domService.setStyle(o,"display","clip"),this.domService.setStyle(o,"position","absolute"),this.domService.setStyle(o,"left",`${t.left+t.width-1}px`),this.domService.setStyle(o,"top",`${t.top}px`),this.domService.setStyle(o,"width","1px"),this.domService.setStyle(o,"height",`${t.height}px`),this.domService.setStyle(o,"z-index","9999"),this.applyStyle(o,s),this.domService.appendChild(e,o),o=this.domService.createElement("div"),this.domService.addClass(o,"ge-table-focus-border"),this.domService.setStyle(o,"display","clip"),this.domService.setStyle(o,"position","absolute"),this.domService.setStyle(o,"left",`${t.left}px`),this.domService.setStyle(o,"top",`${t.top}px`),this.domService.setStyle(o,"width",`${t.width}px`),this.domService.setStyle(o,"height","1px"),this.domService.setStyle(o,"z-index","9999"),this.applyStyle(o,s),this.domService.appendChild(e,o),o=this.domService.createElement("div"),this.domService.addClass(o,"ge-table-focus-border"),this.domService.setStyle(o,"display","clip"),this.domService.setStyle(o,"position","absolute"),this.domService.setStyle(o,"left",`${t.left}px`),this.domService.setStyle(o,"top",`${t.top+t.height-1}px`),this.domService.setStyle(o,"width",`${t.width}px`),this.domService.setStyle(o,"height","1px"),this.domService.setStyle(o,"z-index","9999"),this.applyStyle(o,s),this.domService.appendChild(e,o),e}addVerticalBorder(e,t,s="ge-table-body-center-vertical-border"){const o=this.domService.createElement("div");return this.domService.addClass(o,s),this.domService.setStyle(o,"display","clip"),this.domService.setStyle(o,"position","absolute"),this.domService.setStyle(o,"left",`${e.left}px`),this.domService.setStyle(o,"top",`${e.top}px`),this.domService.setStyle(o,"width","1px"),this.domService.setStyle(o,"height",`${e.height}px`),this.domService.appendChild(t,o),o}addDiv(e,t,s=""){const o=this.domService.createElement("div");return s&&this.domService.addClass(o,s),this.domService.setStyle(o,"display","clip"),this.domService.setStyle(o,"position","absolute"),this.domService.setStyle(o,"left",`${t.left}px`),this.domService.setStyle(o,"top",`${t.top}px`),this.domService.setStyle(o,"width",`${t.width}px`),this.domService.setStyle(o,"height",`${t.height}px`),this.domService.appendChild(e,o),o}applyStyleString(e,t){const s=t.split(";").map(o=>o.trim()).filter(o=>o);for(const o of s){const[i,r]=o.split(":");this.domService.setStyle(e,i.trim(),r.trim())}}getDivOrCreateDiv(e,t){let s=t.cache[e];return s?(s.innerText="",s):(s=this.domService.createElement("div"),t.cache[e]=s,s)}}const ce=l=>l==="header"?"header":l==="footer"?"footer":"body";class tt{constructor(e,t){if(this.rowIdx=-1,this.colIdx=-1,this.action=null,this.inputType=null,this.className="",e!==null&&(e instanceof HTMLDivElement||e instanceof HTMLSpanElement||e instanceof HTMLInputElement)){this.className=e.className,this.action=e.getAttribute("data-ge-action"),this.inputType=e.getAttribute("data-input-type"),this.rowIdx=Number(e.getAttribute("data-row-index")),this.colIdx=Number(e.getAttribute("data-col-index"));const s=e.getAttribute("data-area");if(s&&(this.areaIdent=ce(s),this.areaModel=t.tableModel.getAreaModel(this.areaIdent),this.row=this.areaModel.getRowByIndex(this.rowIdx)),e instanceof HTMLInputElement){const o=e;this.value=o.value}}}}class st{constructor(e){this.tableScope=e,this.doubleClickDelay=500,this.expandedAll=!0,this.mouseDown=!1,this.dragging=!1,this.lastClicked=0,this.tableScope.hostElement.addEventListener("click",this.onHostElementClicked.bind(this)),this.tableScope.hostElement.addEventListener("dblclick",this.onHostElementDblClicked.bind(this)),this.tableScope.hostElement.addEventListener("mousedown",this.onMouseDown.bind(this)),this.tableScope.hostElement.addEventListener("mousemove",this.onMouseMove.bind(this)),this.tableScope.hostElement.addEventListener("mouseup",this.onMouseUp.bind(this)),this.tableScope.hostElement.addEventListener("contextmenu",this.onContextmenu.bind(this)),this.tableScope.hostElement._MouseHandler="true",this.tableScope.scrollViewport.addEventListener("scroll",this.tableScope.adjustAfterScrolling.bind(this.tableScope)),[window,this.tableScope.hostElement].forEach(t=>t.addEventListener("resize",this.tableScope.adjustContainersAndRows.bind(this.tableScope)))}onContextmenu(e){this.mouseEvent=e;const t=this.tableScope.createGeMouseEvent(this.mouseEvent);this.tableScope.contextmenu(t)}onHostElementClicked(e){const t=Date.now();if(t-this.lastClicked<this.doubleClickDelay){this.lastClicked=t,this.publishGeMouseEvent(e,2);return}this.lastClicked=t;const s=new tt(e.target,this.tableScope);if(s.action==="toggleExpandCollapseAll")this.expandedAll=!this.expandedAll,this.tableScope.toggleExpandCollapseAll(this.expandedAll),e.preventDefault(),e.stopPropagation();else if(s.action==="toggleHeaderGroup")this.tableScope.toggleHeaderGroup(s),e.preventDefault(),e.stopPropagation();else if(s.inputType==="checkbox"&&s.areaIdent)this.tableScope.toggleRowCheckbox(s.rowIdx,s.colIdx,s.areaIdent),e.preventDefault(),e.stopPropagation();else if(K(s.row)&&s.areaModel){const o=s.colIdx===this.getArrowColumnIndex()&&e.altKey,i=s.className.includes("ge-table-tree-arrow-div");if(o||i){e.preventDefault(),e.stopPropagation();const r=s.row;r.expanded=!r.expanded,"recalcVisibleTreeRows"in s.areaModel&&s.areaModel.recalcVisibleTreeRows(),this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth),this.tableScope.adjustContainersAndRows(),this.updateCollapsedExpandedState(r)}}if(s.areaIdent==="body"&&this.tableScope.tableOptions.getFocusModel){const o=this.tableScope.tableOptions.getFocusModel();o==null||o.clear(),o==null||o.setFocus(s.rowIdx,s.colIdx)}this.publishGeMouseEvent(e,1)}onHostElementDblClicked(e){if(this.lastClicked=Date.now(),e.target instanceof HTMLElement){const t=e.target,s=t.getAttribute("data-area"),o=ce(s),i=Number(t.getAttribute("data-row-index")),r=Number(t.getAttribute("data-col-index")),a=this.tableScope.tableModel.getAreaModel(o);if(s&&o==="header")this.tableScope.tableModel.isSortable(r)&&(this.tableScope.clearSelection(),this.tableScope.onHeaderDblClicked(e,i,r));else if(t.getAttribute("data-row-index")){const n=a.getRowByIndex(i);if(s&&o==="body"&&a.isEditable(i,r)&&(this.tableScope.clearSelection(),this.tableScope.initRenderEditor(i,r)),K(n)&&r===this.getArrowColumnIndex()){e.preventDefault(),e.stopPropagation();const d=n;d.expanded=!d.expanded,"recalcVisibleTreeRows"in a&&a.recalcVisibleTreeRows(),this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth),this.tableScope.adjustContainersAndRows(),this.updateCollapsedExpandedState(d)}}}this.publishGeMouseEvent(e,2)}publishGeMouseEvent(e,t){var s;this.mouseEvent=e,this.geMouseEventOld=(s=this.geMouseEvent)==null?void 0:s.clone(),this.geMouseEvent=this.tableScope.createGeMouseEvent(e),this.geMouseEvent&&(this.geMouseEvent.clickCount=t),this.tableScope.onMouseClicked(this.geMouseEvent,this.geMouseEventOld),this.tableScope.publishGeMouseEvent(this.geMouseEvent)}updateCollapsedExpandedState(e){var s,o,i,r,a;const t=(o=(s=this.tableScope.tableOptions)==null?void 0:s.autoRestoreOptions)==null?void 0:o.getRowId;if(t){const n=(i=this.tableScope.storeStateCollapsedExpandService)==null?void 0:i.collapsedExpandedStateGet().mode,d=n==="collapsed"&&!e.expanded||n==="expanded"&&e.expanded,c=n==="collapsed"&&e.expanded||n==="expanded"&&!e.expanded,h=t(e.data);d?(r=this.tableScope.storeStateCollapsedExpandService)==null||r.collapsedStateIdsPush(h):c&&((a=this.tableScope.storeStateCollapsedExpandService)==null||a.collapsedStateIdsRemove(h))}}getArrowColumnIndex(){return this.tableScope.tableModel.isRowCheckboxVisible()?1:0}onMouseDown(e){this.dragging||(this.mouseEvent=e,this.startMouseEvent=this.tableScope.createGeMouseEvent(this.mouseEvent),this.tableScope.onMouseDown(this.startMouseEvent),this.mouseDown=!0)}onMouseMove(e){this.mouseEvent=e,this.mouseDown?(this.dragging||(this.dragging=!0,this.tableScope.setDragging(!0)),requestAnimationFrame(this.mouseDraggingOnFrame.bind(this))):requestAnimationFrame(this.mouseMoveOnFrame.bind(this))}onMouseUp(e){this.mouseEvent=e,this.dragging&&requestAnimationFrame(this.mouseDraggingEndOnFrame.bind(this)),this.mouseDown=!1,this.dragging=!1,this.tableScope.setDragging(!1)}mouseDraggingOnFrame(){var e;if(this.mouseEvent){const t=this.tableScope.createGeMouseEvent(this.mouseEvent);(e=this.startMouseEvent)!=null&&e.originalEvent&&(t.draggingX=this.mouseEvent.clientX-this.startMouseEvent.originalEvent.clientX,t.draggingY=this.mouseEvent.clientY-this.startMouseEvent.originalEvent.clientY),this.tableScope.mouseDraggingOnFrame(t,this.startMouseEvent)}}mouseDraggingEndOnFrame(){var e;if(this.mouseEvent){const t=this.tableScope.createGeMouseEvent(this.mouseEvent);(e=this.startMouseEvent)!=null&&e.originalEvent&&(t.draggingX=this.mouseEvent.clientX-this.startMouseEvent.originalEvent.clientX,t.draggingY=this.mouseEvent.clientY-this.startMouseEvent.originalEvent.clientY),this.tableScope.mouseDraggingEndOnFrame(t)}}mouseMoveOnFrame(){if(this.mouseEvent){const e=this.tableScope.createGeMouseEvent(this.mouseEvent);this.tableScope.mouseMove(e)}}}class ot{constructor(e,t=[],s=-1){this.areaIdent=e,this.columnDefs=t,this.defaultRowHeight=s,this.rowSelectionModel=void 0,this.yPositions=[],this.cellRenderers=t.map(o=>o.rendererMap[e])}getTextValueAt(e,t){return""+this.getValueAt(e,t)}getTooltipAt(e,t){return""}getCellRenderer(e,t){if(t<this.cellRenderers.length)return this.cellRenderers[t]}getColspanAt(e,t){return 0}getCustomClassesAt(e,t){return[]}getCustomStyleAt(e,t){}getRowspanAt(e,t){return 0}getRowByIndex(e){}isRowCheckable(e){return!0}isRowChecked(e){var s;const t=this.getRowByIndex(e);return(s=this.rowSelectionModel)==null?void 0:s.isRowChecked(t)}setRowChecked(e,t){if(this.rowSelectionModel){const s=this.getRowByIndex(e);this.rowSelectionModel.checkRow(s,t)}}getMaxColspan(){return 31}getMaxRowspan(){return 31}getYPosByRowIndex(e){return this.defaultRowHeight>0?this.defaultRowHeight*e:this.yPositions[e]}init(){!this.yPositions.length&&this.getRowCount()!==void 0&&this.defaultRowHeight===-1&&this.calcYPositions()}isFilterable(){return this.areaIdent==="body"}doSort(e){return!1}sort(e){}isEditable(e,t){var o,i;const s=(o=this.columnDefs)==null?void 0:o[t];return((i=s==null?void 0:s.editable)==null?void 0:i.call(s))??!1}setValue(e,t,s){var a;const o=(a=this.columnDefs[t])==null?void 0:a.editInputPipe;o&&(s=o(s,e,t));const i=this.getRowByIndex(e),r=this.columnDefs[t].property;return r.includes(".")?this.setPropertyValue(i,r.split("."),s):(i[r]=s,!0)}isSelectable(e,t){return!0}changeColumnOrder(e,t){this.arrayMove(this.cellRenderers,e,t)}setPropertyValue(e,t,s){const o=t.shift();if(o){const i=e[o];return i&&t.length?this.setPropertyValue(i,t,s):(e[o]=s,!0)}return!1}arrayMove(e,t,s){const o=e.splice(t,1)[0];return e.splice(s,0,o),e}calcYPositions(){const e=this.getRowCount();this.yPositions=new Array(e+1),this.yPositions[0]=0;for(let t=0;t<e;t++)this.yPositions[t+1]=this.getRowHeight(t)+this.yPositions[t]}}class it{genericSortComparator(e,t,s){if(typeof e=="number"&&typeof t=="number")return s*(e-t);if(typeof e=="string"&&typeof t=="string")return s*e.localeCompare(t);if(typeof e=="boolean"&&typeof t=="boolean")return s*((e?-1:1)-(t?-1:1));if(e instanceof Date&&t instanceof Date)return s*(e.getTime()-t.getTime());if(e instanceof Array&&t instanceof Array){const o=e,i=t;if(o.length&&i.length)return this.genericSortComparator(o[0],i[0],s)}return s*(""+e).localeCompare(""+t)}}class L extends ot{constructor(e,t,s,o=[],i="ge-selected-row",r="ge-focused-row"){super(e,o,s),this.areaIdent=e,this.rows=t,this.defaultRowHeight=s,this.columnDefs=o,this.selectedRowClass=i,this.focusedRowClass=r,this.sorterService=new it,this._focusedRowIndex=0,this.filteredRows=[...t],this.properties=o.map(a=>a.property)}getFocusedRowIndex(){return this._focusedRowIndex}setFocusedRowIndex(e){this._focusedRowIndex=e}setRows(e){this.rows=e,this.filteredRows=[...e]}filterRowsByPredict(e){this.rows=this.rows.filter(e),this.filteredRows=this.filteredRows.filter(e)}getRowCount(){var e;return((e=this.filteredRows)==null?void 0:e.length)??0}getValueAt(e,t){const s=this.properties[t];let o=this.filteredRows[e];return K(o)&&(o=o.data),o?this.getValueByT(o,s):""}getFilteredRows(){return this.filteredRows}getAllRows(){return this.rows}findRowFromFilteredRowsByAllCriteria(e,t){return this.getFilteredRows().find(s=>t(e,s))}findRowFromAllRowsByAllCriteria(e,t){return this.getAllRows().find(s=>t(e,s))}getRowHeight(e){return this.defaultRowHeight}getRowByIndex(e){return this.filteredRows[e]}externalFilterChanged(e){this.filteredRows=this.rows?this.rows.filter(e):[]}doSort(e){for(const t of e){const{columnIndex:s,sortState:o}=t,i=o==="asc"?1:o==="desc"?-1:0,r=this.properties[s];this.filteredRows=this.filteredRows.sort(this.genericFlatTableSortComparator(r,i))}return!0}sort(e){this.filteredRows=this.filteredRows.sort(e)}getValueByT(e,t){if(e&&t)return t.includes(".")?this.getPropertyValue(e,t.split(".")):e[t]}changeColumnOrder(e,t){this.arrayMove(this.properties,e,t),super.changeColumnOrder(e,t)}getCustomClassesAt(e,t){const s=super.getCustomClassesAt(e,t);return this.getRowByIndex(e).selected&&s.push(this.selectedRowClass),this._focusedRowIndex===e&&s.push(this.focusedRowClass),s}genericFlatTableSortComparator(e,t){const s=this.columnDefs.find(o=>o.property===e);return(o,i)=>{const r=this.getValueByT(o,e),a=this.getValueByT(i,e);return s!=null&&s.sortComparator?t*s.sortComparator(r,a,o,i,t):this.sorterService.genericSortComparator(r,a,t)}}getPropertyValue(e,t){const s=t.shift(),o=e[s];return o&&t.length?this.getPropertyValue(o,t):o}}class rt{constructor(e){this.tableScope=e}updateCells(e,t=!1){this.tableScope.updateCells(e,t)}externalFilterChanged(){this.tableScope.externalFilterChanged()}scrollToPixel(e=0,t=0){this.tableScope.scrollToPixel(e,t)}scrollToIndex(e=0,t=0){this.tableScope.scrollToIndex(e,t)}setHeaderVisible(e=!0){}setColumnVisible(e,t=!0){}isColumnVisible(e){return!0}isHeaderVisible(){return!0}setFooterVisible(e=!0){}isFooterVisible(){return!0}repaint(){this.tableScope.repaint()}repaintHard(){this.tableScope.repaintHard()}recalcColumnWidths(e){this.tableScope.recalcColumnWidths(e)}clearSelection(){this.tableScope.clearSelection(!0)}setSelectionModel(e,t=!0){this.tableScope.setSelectionModel(e,t)}triggerAction(e){this.tableScope.onActionTriggered(e)}getShortcutActionMapping(){return this.tableScope.shortcutService.getShortcutActionMapping()}copyToClipboard(){return this.tableScope.copyService.copyToClipboard(this.tableScope.tableModel,this.tableScope.selectionModel(),this.tableScope.focusModel())}downloadExcel(e="table.xlsx",t=""){const s=[],o=this.tableScope.tableModel.getColumnCount(),i=["header","body","footer"];for(const r of i){const a=this.tableScope.tableModel.getAreaModel(r),n=(a==null?void 0:a.getRowCount())??0;for(let d=0;d<n;d++){const c=[];s.push(c);for(let h=0;h<o;h++)c.push(a.getValueAt(d,h))}}return this.tableScope.excelService.downloadExcel(s,e,t)}getTableScope(){return this.tableScope}getSelectionModel(){return this.tableScope.selectionModel()}autoResizeColumns(e=!0){this.tableScope.autoResizeColumns(e)}recalcWrappers(){this.tableScope.recalcWrappers()}setColumnWidth(e,t){this.tableScope.setColumnWidth(e,t)}getTableModel(){return this.tableScope.tableModel}getBodyModel(){return this.tableScope.tableModel.getBodyModel()}setRows(e){const t=this.getBodyModel();t instanceof L?t.setRows(e):console.warn("setRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ",typeof t,t)}addRows(e){const t=this.getBodyModel();if(t instanceof L){const s=t;let o=s.getAllRows();s.setRows([...o,...e])}else console.warn("addRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ",typeof t,t)}addRowsAt(e,t){const s=this.getBodyModel();if(s instanceof L){const o=s;let i=o.getAllRows();o.setRows([...i.slice(0,t),...e,...i.slice(t)])}else console.warn("addRowsAt<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ",typeof s,s)}removeRows(e,t=(s,o)=>s===o){const s=this.getBodyModel();if(s instanceof L){const o=s,i=o.getAllRows().filter(r=>!e.some(a=>t(r,a)));o.setRows(i)}else console.warn("removeRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ",typeof s,s)}findRows(e,t=(s,o)=>s===o){const s=this.getBodyModel();return s instanceof L?s.getAllRows().filter(i=>e.some(r=>t(i,r))):(console.warn("findRows<T>(rows: T[], predicate: (a: T, b: T) => boolean) only works with AreaModelObjectArray<T>, but this body area model is ",typeof s,s),[])}findRowFromFilteredRowsByAllCriteria(e,t){const s=this.getBodyModel();if(s instanceof L)return s.getFilteredRows().find(i=>t(e,i));console.warn("findRowFromFilteredRowsByAllCriteria(...) only works with AreaModelObjectArray<T>, but this body area model is ",typeof s,s)}findRowFromAllRowsByAllCriteria(e,t){const s=this.getBodyModel();if(s instanceof L)return s.getAllRows().find(i=>t(e,i));console.warn("findRowFromAllRowsByAllCriteria(...) only works with AreaModelObjectArray<T>, but this body area model is ",typeof s,s)}updateRows(e,t=(s,o)=>s===o){const s=this.getBodyModel();if(s instanceof L){let i=s.getAllRows();for(const r of i)for(const a of e)if(t(r,a))for(const n of Object.keys(a))r[n]=a[n]}else console.warn("updateRows<T>(rows: T[], predicate: (a: T, b: T) => boolean) only works with AreaModelObjectArray<T>, but this body area model is ",typeof s,s)}reSort(){this.tableScope.reSort()}sort(e){this.tableScope.sort(e)}ensureRowIsVisible(e){return this.tableScope.ensureRowIsVisible(e)}getDisplayedRowCount(){return this.tableScope.getDisplayedRowCount()}getFirstVisibleRowIndex(){return this.tableScope.getFirstVisibleRowIndex()}getFirstFullVisibleRowIndex(){return this.tableScope.getFirstFullVisibleRowIndex()}getLastVisibleRowIndex(){return this.tableScope.getLastVisibleRowIndex()}getLastFullVisibleRowIndex(){return this.tableScope.getLastFullVisibleRowIndex()}setLoggingActive(e){this.tableScope.loggingActive=e}isLoggingActive(){return this.tableScope.loggingActive}}class de{constructor(e){this.getStorageKeyFn=e}autoConvertMapToObject(e){const t={};return e instanceof Map&&e.forEach((o,i)=>{t[o]=i}),t}checkAndPersistItem(e,t){const s=this.getStorageKeyFn;if(s){const o=s();if(o){const i=o+e;if((t+"").includes("Map")){const r=this.autoConvertMapToObject(t);this.persistItem(i,r)}else this.persistItem(i,t)}}}persistItem(e,t){t?localStorage.setItem(e,JSON.stringify(t)):localStorage.removeItem(e)}loadFromLocalStorage(e){const t=localStorage.getItem(e);return t?JSON.parse(t):null}}class lt extends de{constructor(e){super(e),this.SCROLL_STATE="scrollState",this.scrollOffset=[0,0],this.load()}getScrollOffset(){return this.scrollOffset}updateScrollOffset(e){this.scrollOffset=e,this.checkAndPersistItem(this.SCROLL_STATE,this.scrollOffset)}load(){const e=this.getStorageKeyFn;if(e){const t=e();if(t){const s=t+this.SCROLL_STATE;let o=this.loadFromLocalStorage(s);this.scrollOffset=o||[0,0]}}}}class at{constructor(e="collapsed",t=[],s=!1,o=!1){this.mode=e,this.rowIds=t,this.allCollapsed=s,this.allExpanded=o}}class nt extends de{constructor(e){super(e),this.COLLAPSED_EXPANDED_STATE="collapsedExpandedState",this.collapsedExpandedState=new at,this.load()}collapsedExpandedStateGet(){return this.collapsedExpandedState}collapsedExpandedStateIncludes(e){return this.collapsedExpandedState.rowIds.includes(e)}collapsedStateIdsPush(e){this.collapsedExpandedState.rowIds.includes(e)||(this.collapsedExpandedState.rowIds.push(e),this.collapsedExpandedState.allCollapsed=!1,this.collapsedExpandedState.allExpanded=!1,this.persist())}collapsedStateIdsRemove(e){const t=this.collapsedExpandedState.rowIds.indexOf(e);t!==-1&&(this.collapsedExpandedState.rowIds.splice(t,1),this.collapsedExpandedState.allCollapsed=!1,this.collapsedExpandedState.allExpanded=!1,this.persist())}collapsedStateAll(e){this.collapsedExpandedState.rowIds=[],this.collapsedExpandedState.mode=e?"collapsed":"expanded",this.collapsedExpandedState.allCollapsed=!e,this.collapsedExpandedState.allExpanded=e,this.persist()}load(){const e=this.getStorageKeyFn;if(e){const t=e();if(t){const s=t+this.COLLAPSED_EXPANDED_STATE,o=this.loadFromLocalStorage(s);o&&(this.collapsedExpandedState=o)}}}persist(){this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE,this.collapsedExpandedState)}}class ct extends de{constructor(e){super(e),this.SORTING_STATE="sortingState",this.sortItems=[],this.load()}getSortItems(){return this.sortItems}setSortItems(e){this.sortItems=e,this.checkAndPersistItem(this.SORTING_STATE,this.sortItems)}load(){const e=this.getStorageKeyFn;if(e){const t=e();if(t){const s=t+this.SORTING_STATE,o=this.loadFromLocalStorage(s);this.sortItems=o||[]}}}}class I{constructor(e=0,t=0,s=0,o=0,i){this.left=e,this.width=t,this.height=s,this.top=o,this.index=i}}class dt{constructor(e,t,s,o){this.hostElement=e,this.tableModel=t,this.dom=s,this.tableOptions=o,this.scrollTop=0,this.areaBodyWestGeo=new I,this.areaBodyCenterGeo=new I,this.areaBodyEastGeo=new I;const i=this.hostElement;i.innerText="",this.dom.setAttribute(i,"tabindex","0"),this.dom.setStyle(this.dom.addClass("ge-table",i),"position","relative"),this.hoverRow=s.applyStylePosistionAbsolute(s.createDivWithClass("ge-table-hover-row",i)),this.hoverColumn=s.applyStylePosistionAbsolute(s.createDivWithClass("ge-table-hover-column",i)),this.draggingColumn=s.applyStylePosistionAbsolute(s.createDivWithClass("ge-table-dragging-column",i)),this.areaHeaderWest=s.appendRelativeChildDiv(s.applyStylePosistionAbsolute(s.createAreaDivWithClass("ge-table-header ge-table-header-west",i,"header","west"))),this.areaHeaderCenter=s.appendRelativeChildDiv(s.applyStylePosistionAbsolute(s.createAreaDivWithClass("ge-table-header ge-table-header-center",i,"header","center"))),this.areaHeaderEast=s.appendRelativeChildDiv(s.applyStylePosistionAbsolute(s.createAreaDivWithClass("ge-table-header ge-table-header-east",i,"body","east"))),this.areaBodyWest=s.appendRelativeChildDiv(s.applyStylePosistionAbsolute(s.createAreaDivWithClass("ge-table-body ge-table-body-west",i,"body","west"))),this.areaBodyEast=s.appendRelativeChildDiv(s.applyStylePosistionAbsolute(s.createAreaDivWithClass("ge-table-body ge-table-body-east",i,"body","east"))),this.areaFooterWest=s.appendRelativeChildDiv(s.applyStylePosistionAbsolute(s.createAreaDivWithClass("ge-table-footer ge-table-footer-west",i,"footer","west"))),this.areaFooterCenter=s.appendRelativeChildDiv(s.applyStylePosistionAbsolute(s.createAreaDivWithClass("ge-table-footer ge-table-footer-center",i,"footer","center"))),this.areaFooterEast=s.appendRelativeChildDiv(s.applyStylePosistionAbsolute(s.createAreaDivWithClass("ge-table-footer ge-table-footer-east",i,"footer","east"))),this.scrollViewport=s.applyStyleOverflowAuto(this.tableOptions.overflowX??"auto",this.tableOptions.overflowY??"auto",s.applyStyleNoPadding(s.applyStylePosistionAbsolute(s.createAreaDivWithClass("ge-table-scroll-viewport",i,"body","center")))),this.contentWrapperDiv=s.applyStyleNoPadding(s.applyStylePosistionRelative(s.createDivWithClass("ge-table-scroll-content-wrapper",this.scrollViewport))),this.contentDiv=s.applyStyleNoPadding(s.applyStylePosistionRelative(s.createDivWithClass("ge-table-scroll-content",this.contentWrapperDiv))),this.areaBodyCenter=s.appendRelativeChildDiv(s.createDivWithClass("ge-table-body-center",this.contentDiv)),this.borderHeaderBottom=s.applyStylePosistionAbsolute(s.createDivWithClass("ge-table-header-border",i)),this.borderFixedWest=s.applyStylePosistionAbsolute(s.createDivWithClass("ge-table-west-fixed-column-border",i)),this.borderFixedEast=s.applyStylePosistionAbsolute(s.createDivWithClass("ge-table-east-fixed-column-border",i)),this.borderFooterTop=s.applyStylePosistionAbsolute(s.createDivWithClass("ge-table-footer-border",i))}adjustContainersAndRows(){const e=this.tableModel.getPadding(),t=this.hostElement.clientWidth,s=this.hostElement.clientHeight;this.dom.applyStyle(this.scrollViewport,{width:`${t-e.left}px`,height:`${s-e.top}px`,top:`${e.top}px`,left:`${e.left}px`}),this.scrollTop=this.scrollViewport.scrollTop,this.dom.applyStyle(this.contentDiv,{width:`${this.scrollViewport.clientWidth}px`,height:`${this.scrollViewport.clientHeight}px`,top:`${this.scrollTop}px`,left:`${this.scrollViewport.scrollLeft}px`}),this.areaBodyWestGeo.width=e.left,this.areaBodyWestGeo.height=s-e.top-e.bottom,this.areaBodyWestGeo.top=e.top,this.areaBodyWestGeo.left=0,this.dom.applyStyleInPx(this.areaBodyWest.parent,this.areaBodyWestGeo),this.tableOptions.fixedWestSeparatorBorderVisible&&this.tableModel.getFixedLeftColumnCount()?this.dom.applyDisplayBlockStyle(this.dom.applyStyle(this.borderFixedWest,{width:"1px",height:`${this.areaBodyWestGeo.height}px`,top:`${this.areaBodyWestGeo.top}px`,left:`${this.areaBodyWestGeo.width}px`})):this.dom.applyDisplayNoneStyle(this.borderFixedWest),this.areaBodyEastGeo.width=e.right,this.areaBodyEastGeo.height=s-e.top-e.bottom,this.areaBodyEastGeo.top=e.top,this.areaBodyEastGeo.left=t-e.right,this.dom.applyStyleInPx(this.areaBodyEast.parent,this.areaBodyEastGeo),this.tableOptions.fixedEastSeparatorBorderVisible&&this.tableModel.getFixedLeftColumnCount()?this.dom.applyDisplayBlockStyle(this.dom.applyStyle(this.borderFixedEast,{width:"1px",height:`${this.areaBodyEastGeo.height}px`,top:`${this.areaBodyEastGeo.top}px`,left:`${this.areaBodyEastGeo.left}px`})):this.dom.applyDisplayNoneStyle(this.borderFixedEast),this.areaBodyCenterGeo.width=t-e.left-e.right,this.areaBodyCenterGeo.height=s-e.top-e.bottom,this.areaBodyCenterGeo.top=0,this.areaBodyCenterGeo.left=0,this.dom.applyStyleInPx(this.areaBodyCenter.parent,this.areaBodyCenterGeo),this.dom.applyStyle(this.areaHeaderCenter.parent,{width:`${t-e.left-e.right}px`,height:`${e.top}px`,top:"0",left:`${e.left}px`}),this.dom.applyStyle(this.areaHeaderWest.parent,{width:`${e.left}px`,height:`${e.top}px`,top:"0",left:"0"}),this.dom.applyStyle(this.areaHeaderEast.parent,{width:`${e.right}px`,height:`${e.top}px`,top:"0",left:`${t-e.right}px`}),this.tableOptions.headerSeparatorBorderVisible&&this.tableModel.isHeaderVisibe()?this.dom.applyDisplayBlockStyle(this.dom.applyStyle(this.borderHeaderBottom,{width:`${t}px`,height:"1px",top:`${e.top}px`,left:"0px"})):this.dom.applyDisplayNoneStyle(this.borderHeaderBottom),this.dom.applyStyle(this.areaFooterWest.parent,{width:`${e.left}px`,height:`${e.bottom}px`,top:`${s-e.bottom}px`,left:"0"}),this.dom.applyStyle(this.areaFooterCenter.parent,{width:`${t-e.left-e.right}px`,height:`${e.bottom}px`,top:`${s-e.bottom}px`,left:`${e.left}px`}),this.dom.applyStyle(this.areaFooterEast.parent,{width:`${e.right}px`,height:`${e.bottom}px`,top:`${s-e.bottom}px`,left:`${t-e.right}px`}),this.tableOptions.footerSeparatorBorderVisible&&this.tableModel.isFooterVisibe()?this.dom.applyDisplayBlockStyle(this.dom.applyStyle(this.borderFooterTop,{width:`${t}px`,height:"1px",top:`${s-e.bottom}px`,left:"0px"})):this.dom.applyDisplayNoneStyle(this.borderFooterTop),this.adjustAfterScrolling()}adjustAfterScrolling(){}resetSizeOfWrapperDiv(){const e=`${this.tableModel.getContentWidthInPixel()}px`,t=`${this.tableModel.getContentHeightInPixel()+1}px`;this.dom.setStyle(this.contentWrapperDiv,"width",e),this.dom.setStyle(this.contentWrapperDiv,"height",t)}}class E{constructor(e,t,s,o,i=!1){this.r1=e,this.c1=t,this.r2=s,this.c2=o,this.gammaRange=i}static create(e){return e.gammaRange===void 0&&(e.gammaRange=!1),new E(e.rowIndex1,e.columnIndex1,e.rowIndex2,e.columnIndex2,e.gammaRange)}static singleCell(e,t){return new E(e,t,e,t)}static singleRow(e){return new E(e,0,e,Number.MAX_SAFE_INTEGER)}static singleColumn(e){return new E(0,e,Number.MAX_SAFE_INTEGER,e)}isInRange(e,t){return e>=this.r1&&e<=this.r2&&t>=this.c1&&t<=this.c2}}class ht{constructor(e,t){this.tableModel=e,this.areaModel=t,this.colAndRowspanRanges=void 0}init(){if(this.areaModel.getMaxColspan()<2&&this.areaModel.getMaxRowspan()<2)return;this.colAndRowspanRanges=[];const e=this.areaModel.getRowCount(),t=this.tableModel.getColumnCount();for(let s=0;s<e;s++)for(let o=0;o<t;o++){let i=this.areaModel.getColspanAt(s,o),r=this.areaModel.getRowspanAt(s,o);if(i>1||r>1){i===0&&(i=1),r===0&&(r=1);const a="gammaCells"in this.areaModel;this.colAndRowspanRanges.push(new E(s,o,s+r-1,o+i-1,a))}}}getRanges(){return this.colAndRowspanRanges?this.colAndRowspanRanges:[]}isInRange(e,t){if(this.colAndRowspanRanges){for(const s of this.colAndRowspanRanges)if(s.isInRange(e,t))return!0}return!1}}class pt{constructor(e,t,s){this.header=e,this.body=t,this.footer=s}}class gt extends dt{constructor(e,t,s,o){var r,a;super(e,t,s,o),this.firstVisibleRowIndex=-1,this.lastVisibleRowIndex=-1,this.firstFullVisibleRowIndex=-1,this.lastFullVisibleRowIndex=-1,this.displayedRowCount=0,this.pixelLimitForFullVisible=5,this.loggingActive=!1,this.dragging=!1,this.editing=!1,this.storedColumnWidths=[],this.scrollLeft=0,this.scrollViewportLeft=0,this.scrollFactorY=0,this.scrollFactorX=0,this.cleanupFunctions={header:[],body:[],footer:[]},this.tree=!1,this.colAndRowspanModels=new pt,this.draggingTargetColumnIndex=-1,this.removables=[],this.tableModel.getSelectionModel?this.getSelectionModel=this.tableModel.getSelectionModel:(r=this.tableOptions)!=null&&r.getSelectionModel&&(this.getSelectionModel=this.tableOptions.getSelectionModel),(a=this.tableOptions)!=null&&a.getFocusModel&&(this.getFocusModel=this.tableOptions.getFocusModel),le(t.getAreaModel("body"))&&(this.tree=!0),["header","body","footer"].forEach(n=>{var d;this.colAndRowspanModels[n]=new ht(t,t.getAreaModel(n)),(d=this.colAndRowspanModels[n])==null||d.init()})}isEditing(){return this.editing}resetEditorRenderer(){this.editorRenderer=void 0,this.editorRendererRow=-1,this.editorRendererColumn=-1,this.editing=!1}clearSelection(e=!1){if(this.getSelectionModel){const t=this.getSelectionModel();t==null||t.clear(),e&&this.repaint()}}initRenderEditor(e,t){var o;let s=(o=this.tableModel.getColumnDef(t))==null?void 0:o.getEditRenderer;if(s||(s=this.tableOptions.getEditRenderer),s)if(this.editorRenderer=s(e,t),this.editorRenderer){this.editorRendererRow=e,this.editorRendererColumn=t,this.editing=!0,this.repaint();const i=document.querySelector("input.ge-table-cell-editor-input");i&&i.focus()}else this.resetEditorRenderer()}repaint(){this.adjustAfterScrolling()}repaintHard(){this.tableModel.recalcHeightAndPadding(),this.resetSizeOfWrapperDiv(),this.adjustContainersAndRows(),this.adjustAfterScrolling()}recalcColumnWidths(e){let t=(!e||e>this.scrollViewport.offsetWidth)&&this.scrollViewport.offsetWidth>100?this.scrollViewport.offsetWidth:this.scrollViewport.clientWidth;this.tableModel.setParentWidth(t),this.tableModel.init(),this.repaintHard()}adjustAfterScrolling(){var e;for(const t of this.removables)t.remove();this.hideHoverRow(),this.hideHoverColumn(),this.scrollTop=this.scrollViewport.scrollTop,this.scrollLeft=this.scrollViewport.scrollLeft,this.debounce(this.checkForScrollPosSaving.bind(this)),this.scrollFactorY=this.scrollTop/(this.scrollViewport.scrollHeight-this.scrollViewport.clientHeight),this.scrollFactorX=this.scrollLeft/(this.scrollViewport.scrollWidth-this.scrollViewport.clientWidth),isNaN(this.scrollFactorY)&&(this.scrollFactorY=0),isNaN(this.scrollFactorX)&&(this.scrollFactorX=0),this.adjustBody(),this.adjustArea("footer"),this.adjustArea("header"),this.tableOptions.tableTopBorderVisible&&this.removables.push(this.dom.addHorizontalBorder(new I(0,this.hostElement.clientWidth,1,0),this.hostElement,"ge-table-border")),this.tableOptions.tableBottomBorderVisible&&this.removables.push(this.dom.addHorizontalBorder(new I(0,this.hostElement.clientWidth,1,this.hostElement.clientHeight-1),this.hostElement,"ge-table-border")),this.tableModel.getFixedLeftColumnCount()>0&&this.removables.push(this.dom.addVerticalBorder(new I(this.areaBodyWest.child.clientWidth,1,this.hostElement.clientHeight,0),this.hostElement,"ge-table-body-west-vertical-border")),((e=this.tableModel.getAreaModel("header"))==null?void 0:e.getRowCount())>0&&this.removables.push(this.dom.addHorizontalBorder(new I(0,this.hostElement.clientWidth,1,this.areaHeaderCenter.child.clientHeight),this.hostElement,"ge-table-body-west-vertical-border"))}checkForScrollPosSaving(){var e,t;this.storeScrollPosStateService&&((t=(e=this.tableOptions)==null?void 0:e.autoRestoreOptions)!=null&&t.autoRestoreScrollPosition)&&this.storeScrollPosStateService.updateScrollOffset([this.scrollLeft,this.scrollTop])}updateCells(e,t=!1){e.forEach(s=>{this.tableModel.getAreaModel(s.area).setValue(s.rowIndex,s.columnIndex,s.value),t||this.rerenderCellContent(s)}),t&&this.repaint()}rerenderCellContent({area:e,rowIndex:t,columnIndex:s,value:o,cssClasses:i}){const r=this.tableModel.getAreaModel(e),a='div[data-col-index="'+s+'"][data-row-index="'+t+'"][data-area="'+e+'"]',n=document.querySelector(a);if(n){let d;const c=this.editorRenderer&&this.editorRendererRow===t&&this.editorRendererColumn===s;let h;if(c?h=this.editorRenderer:h=r.getCellRenderer(t,s),n.innerText="",this.applyCssClasses(n,i),h)d=h.render(n,t,s,e,r,o,this.dom.domService),d&&this.cleanupFunctions[e].push(d);else{const g=`${o}`;this.dom.addLabelDiv(n,g,!1,t,s,e)}const p=r.getCustomClassesAt(t,s);p.length&&this.dom.addClasses(p,n);const m=r.getCustomStyleAt(t,s);if(m)for(const g in m)this.dom.setStyle(n,g,m[g])}}getFirstVisibleRowIndex(){return this.firstVisibleRowIndex}getLastVisibleRowIndex(){return this.lastVisibleRowIndex}getFirstFullVisibleRowIndex(){return this.firstFullVisibleRowIndex}getLastFullVisibleRowIndex(){return this.lastFullVisibleRowIndex}getDisplayedRowCount(){return this.displayedRowCount}storeColumnWidths(){const e=this.tableModel.getColumnDefs();e!=null&&e.length&&(this.storedColumnWidths=e.map((t,s)=>this.tableModel.getColumnWidth(s)))}getAreaAndSideIdentByAttr(e){if(e){const t=this.getStringByAttr(e,"data-area"),s=this.getStringByAttr(e,"data-side");if(s&&t)return[t,s]}return[void 0,void 0]}getArea(e,t){if(e==="header"){if(t==="west")return this.areaHeaderWest;if(t==="center")return this.areaHeaderCenter;if(t==="east")return this.areaHeaderEast}else if(e==="body"){if(t==="west")return this.areaBodyWest;if(t==="center")return this.areaBodyCenter;if(t==="east")return this.areaBodyEast}else if(e==="footer"){if(t==="west")return this.areaFooterWest;if(t==="center")return this.areaFooterCenter;if(t==="east")return this.areaFooterEast}throw Error(`Wrong area identifier: row:${e}, col:${t}`)}adjustBody(){const e=this.areaBodyCenterGeo.height-this.tableModel.getContentHeightInPixel(),t=this.scrollFactorY*e;this.dom.setStyle(this.contentDiv,"top",`${this.scrollTop}px`),this.dom.setStyle(this.contentDiv,"left",`${this.scrollViewport.scrollLeft}px`),this.adjustArea("body",t)}getNumberByAttr(e,t){var s;if(e){const o=(s=e.closest("["+t+"]"))==null?void 0:s.getAttribute(t);if(o)return Number(o)}return-1}getStringByAttr(e,t){var s;if(e){const o=(s=e.closest("["+t+"]"))==null?void 0:s.getAttribute(t);if(o)return o}return""}adjustArea(e,t=0){var f;const s=this.getArea(e,"west"),o=this.getArea(e,"center"),i=this.getArea(e,"east"),r=o.child.clientHeight;s.child.innerText="",o.child.innerText="",i.child.innerText="";const a=0,n=this.areaBodyCenterGeo.width,d=this.tableModel.getPadding(),c=this.tableModel.getAreaModel(e),h=c.getRowCount();for(;this.cleanupFunctions[e].length;){const u=this.cleanupFunctions[e].shift();u&&u()}let p=t;const m=this.tableModel.getColumnCount(),g=this.tableModel.getFixedRightColumnCount(),b=this.tableModel.getFixedLeftColumnCount();e==="body"&&(this.firstVisibleRowIndex=-1,this.firstFullVisibleRowIndex=-1,this.lastVisibleRowIndex=-1,this.lastFullVisibleRowIndex=-1);for(let u=0;u<h;u++){const w=p,v=u===h-1,A=this.tableModel.getRowHeight(e,u);if(w+A>0){e==="body"&&this.firstVisibleRowIndex===-1&&(this.firstVisibleRowIndex=u,this.firstFullVisibleRowIndex=w<-this.pixelLimitForFullVisible?this.firstVisibleRowIndex+1:this.firstVisibleRowIndex);let y={left:a,width:n,height:A,top:w,index:u},S=this.dom.addRowDiv(o,y,u,e,"center");const F=b;if(this.adjustColumnsToRowParent({areaIdent:e,sideIdent:"center",areaModel:c,geo:y,parent:S,rowIndex:u,columnIndexStart:F,columnIndexEnd:m-g-1,verticalFixed:!1,lastRowOfModel:v}),d.left>0&&(y={left:a,width:this.areaBodyWestGeo.width,height:A,top:w,index:u},S=this.dom.addRowDiv(s,y,u,e,"west"),this.adjustColumnsToRowParent({areaIdent:e,sideIdent:"west",areaModel:c,geo:y,parent:S,rowIndex:u,columnIndexStart:0,columnIndexEnd:F-1,verticalFixed:!0,lastRowOfModel:v})),d.right>0&&(y={left:a,width:this.areaBodyEastGeo.width,height:A,top:w,index:u},S=this.dom.addRowDiv(i,y,u,e,"east"),this.adjustColumnsToRowParent({areaIdent:e,sideIdent:"east",areaModel:c,geo:y,parent:S,rowIndex:u,columnIndexStart:m-g,columnIndexEnd:m-1,verticalFixed:!0,lastRowOfModel:v})),e==="header"&&this.tree&&u===h-1){const T=this.dom.applyStyle(this.dom.setAttribute(this.dom.addDiv(S,new I(16,20,20,8)),"data-ge-action","toggleExpandCollapseAll"),{cursor:"pointer"}),D=this.tableOptions.treeOptions.arrowExpandCollapseAll;if(D){const N=this.dom.domService.createText(D.content);this.dom.domService.appendChild(T,N),D.style&&this.dom.applyStyleString(T,D.style)}}}if(p=p+A,p>r){e==="body"&&(this.lastVisibleRowIndex=u,this.lastFullVisibleRowIndex=r-p<-this.pixelLimitForFullVisible?u-1:u,this.displayedRowCount=this.lastFullVisibleRowIndex-this.firstFullVisibleRowIndex+1);break}}if(this.loggingActive&&e==="body"&&console.log("render scope: this.firstVisibleRowIndex <- "+this.firstVisibleRowIndex+`
|
|
7
|
+
${l}
|
|
8
|
+
class="ge-table-row-checkbox"> `,this.domService.setStyle(o,"display","inline"),this.domService.setStyle(o,"width","inherit"),this.domService.setAttribute(o,"data-row-index",`${i}`),this.domService.appendChild(e,o),o}addLabelDiv(e,t="",s=!1,i=-1,o=-1,l="body"){const n=this.domService.createElement("div");if(this.domService.addClass(n,"ge-table-label-div"),this.domService.setStyle(n,"position","relative"),this.domService.setStyle(n,"background","transparent"),this.domService.setStyle(n,"width","100%"),this.domService.setStyle(n,"height","100%"),this.domService.setAttribute(n,"data-row-index",`${i}`),this.domService.setAttribute(n,"data-col-index",`${o}`),this.domService.setAttribute(n,"data-area",`${l}`),t)if(s){const a=this.domService.createText(t);this.domService.appendChild(n,a)}else{const a=this.domService.createElement("div");this.domService.appendChild(n,a);const d=this.domService.createText(t);this.domService.addClass(a,"ge-table-label"),this.domService.appendChild(a,d),this.domService.setAttribute(a,"data-row-index",`${i}`),this.domService.setAttribute(a,"data-col-index",`${o}`),this.domService.setAttribute(a,"data-area",`${l}`)}return this.domService.appendChild(e,n),n}addSortedIcon(e,t="",s=new ve,i=-1){const o=this.domService.createElement("div");this.domService.addClass(o,"ge-table-sorted-icon-div"),this.domService.setStyle(o,"position","absolute"),this.domService.setStyle(o,"top","0"),this.domService.setStyle(o,"right","0"),this.domService.setStyle(o,"width","20px"),this.domService.setStyle(o,"background","transparent"),this.domService.setStyle(o,"cursor","pointer"),this.domService.setAttribute(o,"data-col-index",`${i}`),this.domService.setAttribute(o,"data-area","header");let l;t==="asc"?l=s.iconAsc:t==="desc"?l=s.iconDesc:l=s.iconPlaceholder;const n=l.content,a=this.domService.createText(n);this.domService.appendChild(o,a),l.style&&this.applyStyleString(o,l.style);for(const d of l.classes)this.domService.addClass(o,d);return this.domService.appendChild(e,o),o}addArrowDiv(e,t="none",s=new Ce,i=-1,o=-1,l="body"){const n=this.domService.createElement("div");this.domService.addClass(n,"ge-table-tree-arrow-div"),this.domService.setStyle(n,"display","inline-block"),this.domService.setStyle(n,"position",""),this.domService.setStyle(n,"width","20px"),this.domService.setStyle(n,"background","transparent"),this.domService.setStyle(n,"cursor","pointer"),this.domService.setAttribute(n,"data-row-index",`${i}`),this.domService.setAttribute(n,"data-col-index",`${o}`),this.domService.setAttribute(n,"data-area",`${l}`);let a;t==="expanded"?a=s.arrowExpanded:t==="collapsed"?a=s.arrowCollapsed:a=s.arrowPlaceholder;const d=a.content,c=this.domService.createText(d);this.domService.appendChild(n,c),a.style&&this.applyStyleString(n,a.style);for(const h of a.classes)this.domService.addClass(n,h);return this.domService.appendChild(e,n),n}addColumnBorderDivs(e,t,s,i,o){if(e.verticalBorderVisible){const l=`ge-table-${i}-${o}-vertical-border`;this.addVerticalBorder(s,t,l)}if(e.horizontalBorderVisible){const l=`ge-table-${i}-${o}-horizontal-border`;this.addHorizontalBorder(s,t,l)}return t}addHorizontalBorder(e,t,s="ge-table-body-center-horizontal-border"){const i=this.domService.createElement("div");return this.domService.addClass(i,s),this.domService.setStyle(i,"display","clip"),this.domService.setStyle(i,"position","absolute"),this.domService.setStyle(i,"left",`${e.left}px`),this.domService.setStyle(i,"top",`${e.top}px`),this.domService.setStyle(i,"width",`${e.width}px`),this.domService.setStyle(i,"height","1px"),this.domService.appendChild(t,i),i}addFocusBorderDivs(e,t,s){t={...t,width:t.width+1,height:t.height+1};let i=this.domService.createElement("div");return this.domService.addClass(i,"ge-table-focus-border"),this.domService.setStyle(i,"display","clip"),this.domService.setStyle(i,"position","absolute"),this.domService.setStyle(i,"left",`${t.left}px`),this.domService.setStyle(i,"top",`${t.top}px`),this.domService.setStyle(i,"width","1px"),this.domService.setStyle(i,"height",`${t.height}px`),this.domService.setStyle(i,"z-index","9999"),this.applyStyle(i,s),this.domService.appendChild(e,i),i=this.domService.createElement("div"),this.domService.addClass(i,"ge-table-focus-border"),this.domService.setStyle(i,"display","clip"),this.domService.setStyle(i,"position","absolute"),this.domService.setStyle(i,"left",`${t.left+t.width-1}px`),this.domService.setStyle(i,"top",`${t.top}px`),this.domService.setStyle(i,"width","1px"),this.domService.setStyle(i,"height",`${t.height}px`),this.domService.setStyle(i,"z-index","9999"),this.applyStyle(i,s),this.domService.appendChild(e,i),i=this.domService.createElement("div"),this.domService.addClass(i,"ge-table-focus-border"),this.domService.setStyle(i,"display","clip"),this.domService.setStyle(i,"position","absolute"),this.domService.setStyle(i,"left",`${t.left}px`),this.domService.setStyle(i,"top",`${t.top}px`),this.domService.setStyle(i,"width",`${t.width}px`),this.domService.setStyle(i,"height","1px"),this.domService.setStyle(i,"z-index","9999"),this.applyStyle(i,s),this.domService.appendChild(e,i),i=this.domService.createElement("div"),this.domService.addClass(i,"ge-table-focus-border"),this.domService.setStyle(i,"display","clip"),this.domService.setStyle(i,"position","absolute"),this.domService.setStyle(i,"left",`${t.left}px`),this.domService.setStyle(i,"top",`${t.top+t.height-1}px`),this.domService.setStyle(i,"width",`${t.width}px`),this.domService.setStyle(i,"height","1px"),this.domService.setStyle(i,"z-index","9999"),this.applyStyle(i,s),this.domService.appendChild(e,i),e}addVerticalBorder(e,t,s="ge-table-body-center-vertical-border"){const i=this.domService.createElement("div");return this.domService.addClass(i,s),this.domService.setStyle(i,"display","clip"),this.domService.setStyle(i,"position","absolute"),this.domService.setStyle(i,"left",`${e.left}px`),this.domService.setStyle(i,"top",`${e.top}px`),this.domService.setStyle(i,"width","1px"),this.domService.setStyle(i,"height",`${e.height}px`),this.domService.appendChild(t,i),i}addDiv(e,t,s=""){const i=this.domService.createElement("div");return s&&this.domService.addClass(i,s),this.domService.setStyle(i,"display","clip"),this.domService.setStyle(i,"position","absolute"),this.domService.setStyle(i,"left",`${t.left}px`),this.domService.setStyle(i,"top",`${t.top}px`),this.domService.setStyle(i,"width",`${t.width}px`),this.domService.setStyle(i,"height",`${t.height}px`),this.domService.appendChild(e,i),i}applyStyleString(e,t){const s=t.split(";").map(i=>i.trim()).filter(i=>i);for(const i of s){const[o,l]=i.split(":");this.domService.setStyle(e,o.trim(),l.trim())}}getDivOrCreateDiv(e,t){let s=t.cache[e];return s?(s.innerText="",s):(s=this.domService.createElement("div"),t.cache[e]=s,s)}}const ne=r=>r==="header"?"header":r==="footer"?"footer":"body";class Je{constructor(e,t){if(this.rowIdx=-1,this.colIdx=-1,this.action=null,this.inputType=null,this.className="",e!==null&&(e instanceof HTMLDivElement||e instanceof HTMLSpanElement||e instanceof HTMLInputElement)){this.className=e.className,this.action=e.getAttribute("data-ge-action"),this.inputType=e.getAttribute("data-input-type"),this.rowIdx=Number(e.getAttribute("data-row-index")),this.colIdx=Number(e.getAttribute("data-col-index"));const s=e.getAttribute("data-area");if(s&&(this.areaIdent=ne(s),this.areaModel=t.tableModel.getAreaModel(this.areaIdent),this.row=this.areaModel.getRowByIndex(this.rowIdx)),e instanceof HTMLInputElement){const i=e;this.value=i.value}}}}class qe{constructor(e){this.tableScope=e,this.doubleClickDelay=500,this.expandedAll=!0,this.mouseDown=!1,this.dragging=!1,this.lastClicked=0,this.tableScope.hostElement.addEventListener("click",this.onHostElementClicked.bind(this)),this.tableScope.hostElement.addEventListener("dblclick",this.onHostElementDblClicked.bind(this)),this.tableScope.hostElement.addEventListener("mousedown",this.onMouseDown.bind(this)),this.tableScope.hostElement.addEventListener("mousemove",this.onMouseMove.bind(this)),this.tableScope.hostElement.addEventListener("mouseup",this.onMouseUp.bind(this)),this.tableScope.hostElement.addEventListener("contextmenu",this.onContextmenu.bind(this)),this.tableScope.hostElement._MouseHandler="true",this.tableScope.scrollViewport.addEventListener("scroll",this.tableScope.adjustAfterScrolling.bind(this.tableScope)),[window,this.tableScope.hostElement].forEach(t=>t.addEventListener("resize",this.tableScope.adjustContainersAndRows.bind(this.tableScope)))}onContextmenu(e){this.mouseEvent=e;const t=this.tableScope.createGeMouseEvent(this.mouseEvent);this.tableScope.contextmenu(t)}onHostElementClicked(e){const t=Date.now();if(t-this.lastClicked<this.doubleClickDelay){this.lastClicked=t,this.publishGeMouseEvent(e,2);return}this.lastClicked=t;const s=new Je(e.target,this.tableScope);if(s.action==="toggleExpandCollapseAll")this.expandedAll=!this.expandedAll,this.tableScope.toggleExpandCollapseAll(this.expandedAll),e.preventDefault(),e.stopPropagation();else if(s.action==="toggleHeaderGroup")this.tableScope.toggleHeaderGroup(s),e.preventDefault(),e.stopPropagation();else if(s.inputType==="checkbox"&&s.areaIdent)this.tableScope.toggleRowCheckbox(s.rowIdx,s.colIdx,s.areaIdent),e.preventDefault(),e.stopPropagation();else if(K(s.row)&&s.areaModel){const i=s.colIdx===this.getArrowColumnIndex()&&e.altKey,o=s.className.includes("ge-table-tree-arrow-div");if(i||o){e.preventDefault(),e.stopPropagation();const l=s.row;l.expanded=!l.expanded,"recalcVisibleTreeRows"in s.areaModel&&s.areaModel.recalcVisibleTreeRows(),this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth),this.tableScope.adjustContainersAndRows(),this.updateCollapsedExpandedState(l)}}if(s.areaIdent==="body"&&this.tableScope.tableOptions.getFocusModel){const i=this.tableScope.tableOptions.getFocusModel();i==null||i.clear(),i==null||i.setFocus(s.rowIdx,s.colIdx)}this.publishGeMouseEvent(e,1)}onHostElementDblClicked(e){if(this.lastClicked=Date.now(),e.target instanceof HTMLElement){const t=e.target,s=t.getAttribute("data-area"),i=ne(s),o=Number(t.getAttribute("data-row-index")),l=Number(t.getAttribute("data-col-index")),n=this.tableScope.tableModel.getAreaModel(i);if(s&&i==="header")this.tableScope.tableModel.isSortable(l)&&(this.tableScope.clearSelection(),this.tableScope.onHeaderDblClicked(e,o,l));else if(t.getAttribute("data-row-index")){const a=n.getRowByIndex(o);if(s&&i==="body"&&n.isEditable(o,l)&&(this.tableScope.clearSelection(),this.tableScope.initRenderEditor(o,l)),K(a)&&l===this.getArrowColumnIndex()){e.preventDefault(),e.stopPropagation();const d=a;d.expanded=!d.expanded,"recalcVisibleTreeRows"in n&&n.recalcVisibleTreeRows(),this.tableScope.tableModel.recalcSize(this.tableScope.hostElement.clientWidth),this.tableScope.adjustContainersAndRows(),this.updateCollapsedExpandedState(d)}}}this.publishGeMouseEvent(e,2)}publishGeMouseEvent(e,t){var s;this.mouseEvent=e,this.geMouseEventOld=(s=this.geMouseEvent)==null?void 0:s.clone(),this.geMouseEvent=this.tableScope.createGeMouseEvent(e),this.geMouseEvent&&(this.geMouseEvent.clickCount=t),this.tableScope.onMouseClicked(this.geMouseEvent,this.geMouseEventOld),this.tableScope.publishGeMouseEvent(this.geMouseEvent)}updateCollapsedExpandedState(e){var s,i,o,l,n;const t=(i=(s=this.tableScope.tableOptions)==null?void 0:s.autoRestoreOptions)==null?void 0:i.getRowId;if(t){const a=(o=this.tableScope.storeStateCollapsedExpandService)==null?void 0:o.collapsedExpandedStateGet().mode,d=a==="collapsed"&&!e.expanded||a==="expanded"&&e.expanded,c=a==="collapsed"&&e.expanded||a==="expanded"&&!e.expanded,h=t(e.data);d?(l=this.tableScope.storeStateCollapsedExpandService)==null||l.collapsedStateIdsPush(h):c&&((n=this.tableScope.storeStateCollapsedExpandService)==null||n.collapsedStateIdsRemove(h))}}getArrowColumnIndex(){return this.tableScope.tableModel.isRowCheckboxVisible()?1:0}onMouseDown(e){this.dragging||(this.mouseEvent=e,this.startMouseEvent=this.tableScope.createGeMouseEvent(this.mouseEvent),this.tableScope.onMouseDown(this.startMouseEvent),this.mouseDown=!0)}onMouseMove(e){this.mouseEvent=e,this.mouseDown?(this.dragging||(this.dragging=!0,this.tableScope.setDragging(!0)),requestAnimationFrame(this.mouseDraggingOnFrame.bind(this))):requestAnimationFrame(this.mouseMoveOnFrame.bind(this))}onMouseUp(e){this.mouseEvent=e,this.dragging&&requestAnimationFrame(this.mouseDraggingEndOnFrame.bind(this)),this.mouseDown=!1,this.dragging=!1,this.tableScope.setDragging(!1)}mouseDraggingOnFrame(){var e;if(this.mouseEvent){const t=this.tableScope.createGeMouseEvent(this.mouseEvent);(e=this.startMouseEvent)!=null&&e.originalEvent&&(t.draggingX=this.mouseEvent.clientX-this.startMouseEvent.originalEvent.clientX,t.draggingY=this.mouseEvent.clientY-this.startMouseEvent.originalEvent.clientY),this.tableScope.mouseDraggingOnFrame(t,this.startMouseEvent)}}mouseDraggingEndOnFrame(){var e;if(this.mouseEvent){const t=this.tableScope.createGeMouseEvent(this.mouseEvent);(e=this.startMouseEvent)!=null&&e.originalEvent&&(t.draggingX=this.mouseEvent.clientX-this.startMouseEvent.originalEvent.clientX,t.draggingY=this.mouseEvent.clientY-this.startMouseEvent.originalEvent.clientY),this.tableScope.mouseDraggingEndOnFrame(t)}}mouseMoveOnFrame(){if(this.mouseEvent){const e=this.tableScope.createGeMouseEvent(this.mouseEvent);this.tableScope.mouseMove(e)}}}class Ze{constructor(e,t=[],s=-1){this.areaIdent=e,this.columnDefs=t,this.defaultRowHeight=s,this.rowSelectionModel=void 0,this.yPositions=[],this.cellRenderers=t.map(i=>i.rendererMap[e])}getTextValueAt(e,t){return""+this.getValueAt(e,t)}getTooltipAt(e,t){return""}getCellRenderer(e,t){if(t<this.cellRenderers.length)return this.cellRenderers[t]}getColspanAt(e,t){return 0}getCustomClassesAt(e,t){return[]}getCustomStyleAt(e,t){}getRowspanAt(e,t){return 0}getRowByIndex(e){}isRowCheckable(e){return!0}isRowChecked(e){var s;const t=this.getRowByIndex(e);return(s=this.rowSelectionModel)==null?void 0:s.isRowChecked(t)}setRowChecked(e,t){if(this.rowSelectionModel){const s=this.getRowByIndex(e);this.rowSelectionModel.checkRow(s,t)}}getMaxColspan(){return 31}getMaxRowspan(){return 31}getYPosByRowIndex(e){return this.defaultRowHeight>0?this.defaultRowHeight*e:this.yPositions[e]}init(){!this.yPositions.length&&this.getRowCount()!==void 0&&this.defaultRowHeight===-1&&this.calcYPositions()}isFilterable(){return this.areaIdent==="body"}doSort(e){return!1}sort(e){}isEditable(e,t){var i,o;const s=(i=this.columnDefs)==null?void 0:i[t];return((o=s==null?void 0:s.editable)==null?void 0:o.call(s))??!1}setValue(e,t,s){var n;const i=(n=this.columnDefs[t])==null?void 0:n.editInputPipe;i&&(s=i(s,e,t));const o=this.getRowByIndex(e),l=this.columnDefs[t].property;return l.includes(".")?this.setPropertyValue(o,l.split("."),s):(o[l]=s,!0)}isSelectable(e,t){return!0}changeColumnOrder(e,t){this.arrayMove(this.cellRenderers,e,t)}setPropertyValue(e,t,s){const i=t.shift();if(i){const o=e[i];return o&&t.length?this.setPropertyValue(o,t,s):(e[i]=s,!0)}return!1}arrayMove(e,t,s){const i=e.splice(t,1)[0];return e.splice(s,0,i),e}calcYPositions(){const e=this.getRowCount();this.yPositions=new Array(e+1),this.yPositions[0]=0;for(let t=0;t<e;t++)this.yPositions[t+1]=this.getRowHeight(t)+this.yPositions[t]}}class Qe{genericSortComparator(e,t,s){if(typeof e=="number"&&typeof t=="number")return s*(e-t);if(typeof e=="string"&&typeof t=="string")return s*e.localeCompare(t);if(typeof e=="boolean"&&typeof t=="boolean")return s*((e?-1:1)-(t?-1:1));if(e instanceof Date&&t instanceof Date)return s*(e.getTime()-t.getTime());if(e instanceof Array&&t instanceof Array){const i=e,o=t;if(i.length&&o.length)return this.genericSortComparator(i[0],o[0],s)}return s*(""+e).localeCompare(""+t)}}class B extends Ze{constructor(e,t,s,i=[],o="ge-selected-row",l="ge-focused-row"){super(e,i,s),this.areaIdent=e,this.rows=t,this.defaultRowHeight=s,this.columnDefs=i,this.selectedRowClass=o,this.focusedRowClass=l,this.sorterService=new Qe,this._focusedRowIndex=0,this.filteredRows=[...t],this.properties=i.map(n=>n.property)}getFocusedRowIndex(){return this._focusedRowIndex}setFocusedRowIndex(e){this._focusedRowIndex=e}setRows(e){this.rows=e,this.filteredRows=[...e]}filterRowsByPredict(e){this.rows=this.rows.filter(e),this.filteredRows=this.filteredRows.filter(e)}getRowCount(){var e;return((e=this.filteredRows)==null?void 0:e.length)??0}getValueAt(e,t){const s=this.properties[t];let i=this.filteredRows[e];return K(i)&&(i=i.data),i?this.getValueByT(i,s):""}getFilteredRows(){return this.filteredRows}getAllRows(){return this.rows}findRowFromFilteredRowsByAllCriteria(e,t){return this.getFilteredRows().find(s=>t(e,s))}findRowFromAllRowsByAllCriteria(e,t){return this.getAllRows().find(s=>t(e,s))}getRowHeight(e){return this.defaultRowHeight}getRowByIndex(e){return this.filteredRows[e]}externalFilterChanged(e){this.filteredRows=this.rows?this.rows.filter(e):[]}doSort(e){for(const t of e){const{columnIndex:s,sortState:i}=t,o=i==="asc"?1:i==="desc"?-1:0,l=this.properties[s];this.filteredRows=this.filteredRows.sort(this.genericFlatTableSortComparator(l,o))}return!0}sort(e){this.filteredRows=this.filteredRows.sort(e)}getValueByT(e,t){if(e&&t)return t.includes(".")?this.getPropertyValue(e,t.split(".")):e[t]}changeColumnOrder(e,t){this.arrayMove(this.properties,e,t),super.changeColumnOrder(e,t)}getCustomClassesAt(e,t){const s=super.getCustomClassesAt(e,t);return this.getRowByIndex(e).selected&&s.push(this.selectedRowClass),this._focusedRowIndex===e&&s.push(this.focusedRowClass),s}genericFlatTableSortComparator(e,t){const s=this.columnDefs.find(i=>i.property===e);return(i,o)=>{const l=this.getValueByT(i,e),n=this.getValueByT(o,e);return s!=null&&s.sortComparator?t*s.sortComparator(l,n,i,o,t):this.sorterService.genericSortComparator(l,n,t)}}getPropertyValue(e,t){const s=t.shift(),i=e[s];return i&&t.length?this.getPropertyValue(i,t):i}}class et{constructor(e){this.tableScope=e}updateCells(e,t=!1){this.tableScope.updateCells(e,t)}externalFilterChanged(){this.tableScope.externalFilterChanged()}scrollToPixel(e=0,t=0){this.tableScope.scrollToPixel(e,t)}scrollToIndex(e=0,t=0){this.tableScope.scrollToIndex(e,t)}setHeaderVisible(e=!0){}setColumnVisible(e,t=!0){}isColumnVisible(e){return!0}isHeaderVisible(){return!0}setFooterVisible(e=!0){}isFooterVisible(){return!0}repaint(){this.tableScope.repaint()}repaintHard(){this.tableScope.repaintHard()}recalcColumnWidths(e){this.tableScope.recalcColumnWidths(e)}clearSelection(){this.tableScope.clearSelection(!0)}setSelectionModel(e,t=!0){this.tableScope.setSelectionModel(e,t)}triggerAction(e){this.tableScope.onActionTriggered(e)}getShortcutActionMapping(){return this.tableScope.shortcutService.getShortcutActionMapping()}copyToClipboard(){return this.tableScope.copyService.copyToClipboard(this.tableScope.tableModel,this.tableScope.selectionModel(),this.tableScope.focusModel())}downloadExcel(e="table.xlsx",t=""){const s=[],i=this.tableScope.tableModel.getColumnCount(),o=["header","body","footer"];for(const l of o){const n=this.tableScope.tableModel.getAreaModel(l),a=(n==null?void 0:n.getRowCount())??0;for(let d=0;d<a;d++){const c=[];s.push(c);for(let h=0;h<i;h++)c.push(n.getValueAt(d,h))}}return this.tableScope.excelService.downloadExcel(s,e,t)}getTableScope(){return this.tableScope}getSelectionModel(){return this.tableScope.selectionModel()}autoResizeColumns(e=!0){this.tableScope.autoResizeColumns(e)}recalcWrappers(){this.tableScope.recalcWrappers()}setColumnWidth(e,t){this.tableScope.setColumnWidth(e,t)}getTableModel(){return this.tableScope.tableModel}getBodyModel(){return this.tableScope.tableModel.getBodyModel()}setRows(e){const t=this.getBodyModel();t instanceof B?t.setRows(e):console.warn("setRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ",typeof t,t)}addRows(e){const t=this.getBodyModel();if(t instanceof B){const s=t;let i=s.getAllRows();s.setRows([...i,...e])}else console.warn("addRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ",typeof t,t)}addRowsAt(e,t){const s=this.getBodyModel();if(s instanceof B){const i=s;let o=i.getAllRows();i.setRows([...o.slice(0,t),...e,...o.slice(t)])}else console.warn("addRowsAt<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ",typeof s,s)}removeRows(e,t=(s,i)=>s===i){const s=this.getBodyModel();if(s instanceof B){const i=s,o=i.getAllRows().filter(l=>!e.some(n=>t(l,n)));i.setRows(o)}else console.warn("removeRows<T>(rows: T[]) only works with AreaModelObjectArray<T>, but this body area model is ",typeof s,s)}findRows(e,t=(s,i)=>s===i){const s=this.getBodyModel();return s instanceof B?s.getAllRows().filter(o=>e.some(l=>t(o,l))):(console.warn("findRows<T>(rows: T[], predicate: (a: T, b: T) => boolean) only works with AreaModelObjectArray<T>, but this body area model is ",typeof s,s),[])}findRowFromFilteredRowsByAllCriteria(e,t){const s=this.getBodyModel();if(s instanceof B)return s.getFilteredRows().find(o=>t(e,o));console.warn("findRowFromFilteredRowsByAllCriteria(...) only works with AreaModelObjectArray<T>, but this body area model is ",typeof s,s)}findRowFromAllRowsByAllCriteria(e,t){const s=this.getBodyModel();if(s instanceof B)return s.getAllRows().find(o=>t(e,o));console.warn("findRowFromAllRowsByAllCriteria(...) only works with AreaModelObjectArray<T>, but this body area model is ",typeof s,s)}updateRows(e,t=(s,i)=>s===i){const s=this.getBodyModel();if(s instanceof B){let o=s.getAllRows();for(const l of o)for(const n of e)if(t(l,n))for(const a of Object.keys(n))l[a]=n[a]}else console.warn("updateRows<T>(rows: T[], predicate: (a: T, b: T) => boolean) only works with AreaModelObjectArray<T>, but this body area model is ",typeof s,s)}reSort(){this.tableScope.reSort()}sort(e){this.tableScope.sort(e)}ensureRowIsVisible(e){return this.tableScope.ensureRowIsVisible(e)}getDisplayedRowCount(){return this.tableScope.getDisplayedRowCount()}getFirstVisibleRowIndex(){return this.tableScope.getFirstVisibleRowIndex()}getFirstFullVisibleRowIndex(){return this.tableScope.getFirstFullVisibleRowIndex()}getLastVisibleRowIndex(){return this.tableScope.getLastVisibleRowIndex()}getLastFullVisibleRowIndex(){return this.tableScope.getLastFullVisibleRowIndex()}setLoggingActive(e){this.tableScope.loggingActive=e}isLoggingActive(){return this.tableScope.loggingActive}}class ae{constructor(e){this.getStorageKeyFn=e}autoConvertMapToObject(e){const t={};return e instanceof Map&&e.forEach((i,o)=>{t[i]=o}),t}checkAndPersistItem(e,t){const s=this.getStorageKeyFn;if(s){const i=s();if(i){const o=i+e;if((t+"").includes("Map")){const l=this.autoConvertMapToObject(t);this.persistItem(o,l)}else this.persistItem(o,t)}}}persistItem(e,t){t?localStorage.setItem(e,JSON.stringify(t)):localStorage.removeItem(e)}loadFromLocalStorage(e){const t=localStorage.getItem(e);return t?JSON.parse(t):null}}class tt extends ae{constructor(e){super(e),this.SCROLL_STATE="scrollState",this.scrollOffset=[0,0],this.load()}getScrollOffset(){return this.scrollOffset}updateScrollOffset(e){this.scrollOffset=e,this.checkAndPersistItem(this.SCROLL_STATE,this.scrollOffset)}load(){const e=this.getStorageKeyFn;if(e){const t=e();if(t){const s=t+this.SCROLL_STATE;let i=this.loadFromLocalStorage(s);this.scrollOffset=i||[0,0]}}}}class st{constructor(e="collapsed",t=[],s=!1,i=!1){this.mode=e,this.rowIds=t,this.allCollapsed=s,this.allExpanded=i}}class it extends ae{constructor(e){super(e),this.COLLAPSED_EXPANDED_STATE="collapsedExpandedState",this.collapsedExpandedState=new st,this.load()}collapsedExpandedStateGet(){return this.collapsedExpandedState}collapsedExpandedStateIncludes(e){return this.collapsedExpandedState.rowIds.includes(e)}collapsedStateIdsPush(e){this.collapsedExpandedState.rowIds.includes(e)||(this.collapsedExpandedState.rowIds.push(e),this.collapsedExpandedState.allCollapsed=!1,this.collapsedExpandedState.allExpanded=!1,this.persist())}collapsedStateIdsRemove(e){const t=this.collapsedExpandedState.rowIds.indexOf(e);t!==-1&&(this.collapsedExpandedState.rowIds.splice(t,1),this.collapsedExpandedState.allCollapsed=!1,this.collapsedExpandedState.allExpanded=!1,this.persist())}collapsedStateAll(e){this.collapsedExpandedState.rowIds=[],this.collapsedExpandedState.mode=e?"collapsed":"expanded",this.collapsedExpandedState.allCollapsed=!e,this.collapsedExpandedState.allExpanded=e,this.persist()}load(){const e=this.getStorageKeyFn;if(e){const t=e();if(t){const s=t+this.COLLAPSED_EXPANDED_STATE,i=this.loadFromLocalStorage(s);i&&(this.collapsedExpandedState=i)}}}persist(){this.checkAndPersistItem(this.COLLAPSED_EXPANDED_STATE,this.collapsedExpandedState)}}class ot extends ae{constructor(e){super(e),this.SORTING_STATE="sortingState",this.sortItems=[],this.load()}getSortItems(){return this.sortItems}setSortItems(e){this.sortItems=e,this.checkAndPersistItem(this.SORTING_STATE,this.sortItems)}load(){const e=this.getStorageKeyFn;if(e){const t=e();if(t){const s=t+this.SORTING_STATE,i=this.loadFromLocalStorage(s);this.sortItems=i||[]}}}}class I{constructor(e=0,t=0,s=0,i=0,o){this.left=e,this.width=t,this.height=s,this.top=i,this.index=o}}class lt{constructor(e,t,s,i){this.hostElement=e,this.tableModel=t,this.dom=s,this.tableOptions=i,this.scrollTop=0,this.areaBodyWestGeo=new I,this.areaBodyCenterGeo=new I,this.areaBodyEastGeo=new I;const o=this.hostElement;o.innerText="",this.dom.setAttribute(o,"tabindex","0"),this.dom.setStyle(this.dom.addClass("ge-table",o),"position","relative"),this.hoverRow=s.applyStylePosistionAbsolute(s.createDivWithClass("ge-table-hover-row",o)),this.hoverColumn=s.applyStylePosistionAbsolute(s.createDivWithClass("ge-table-hover-column",o)),this.draggingColumn=s.applyStylePosistionAbsolute(s.createDivWithClass("ge-table-dragging-column",o)),this.areaHeaderWest=s.appendRelativeChildDiv(s.applyStylePosistionAbsolute(s.createAreaDivWithClass("ge-table-header ge-table-header-west",o,"header","west"))),this.areaHeaderCenter=s.appendRelativeChildDiv(s.applyStylePosistionAbsolute(s.createAreaDivWithClass("ge-table-header ge-table-header-center",o,"header","center"))),this.areaHeaderEast=s.appendRelativeChildDiv(s.applyStylePosistionAbsolute(s.createAreaDivWithClass("ge-table-header ge-table-header-east",o,"body","east"))),this.areaBodyWest=s.appendRelativeChildDiv(s.applyStylePosistionAbsolute(s.createAreaDivWithClass("ge-table-body ge-table-body-west",o,"body","west"))),this.areaBodyEast=s.appendRelativeChildDiv(s.applyStylePosistionAbsolute(s.createAreaDivWithClass("ge-table-body ge-table-body-east",o,"body","east"))),this.areaFooterWest=s.appendRelativeChildDiv(s.applyStylePosistionAbsolute(s.createAreaDivWithClass("ge-table-footer ge-table-footer-west",o,"footer","west"))),this.areaFooterCenter=s.appendRelativeChildDiv(s.applyStylePosistionAbsolute(s.createAreaDivWithClass("ge-table-footer ge-table-footer-center",o,"footer","center"))),this.areaFooterEast=s.appendRelativeChildDiv(s.applyStylePosistionAbsolute(s.createAreaDivWithClass("ge-table-footer ge-table-footer-east",o,"footer","east"))),this.scrollViewport=s.applyStyleOverflowAuto(this.tableOptions.overflowX??"auto",this.tableOptions.overflowY??"auto",s.applyStyleNoPadding(s.applyStylePosistionAbsolute(s.createAreaDivWithClass("ge-table-scroll-viewport",o,"body","center")))),this.contentWrapperDiv=s.applyStyleNoPadding(s.applyStylePosistionRelative(s.createDivWithClass("ge-table-scroll-content-wrapper",this.scrollViewport))),this.contentDiv=s.applyStyleNoPadding(s.applyStylePosistionRelative(s.createDivWithClass("ge-table-scroll-content",this.contentWrapperDiv))),this.areaBodyCenter=s.appendRelativeChildDiv(s.createDivWithClass("ge-table-body-center",this.contentDiv)),this.borderHeaderBottom=s.applyStylePosistionAbsolute(s.createDivWithClass("ge-table-header-border",o)),this.borderFixedWest=s.applyStylePosistionAbsolute(s.createDivWithClass("ge-table-west-fixed-column-border",o)),this.borderFixedEast=s.applyStylePosistionAbsolute(s.createDivWithClass("ge-table-east-fixed-column-border",o)),this.borderFooterTop=s.applyStylePosistionAbsolute(s.createDivWithClass("ge-table-footer-border",o))}adjustContainersAndRows(){const e=this.tableModel.getPadding(),t=this.hostElement.clientWidth,s=this.hostElement.clientHeight;this.dom.applyStyle(this.scrollViewport,{width:`${t-e.left}px`,height:`${s-e.top}px`,top:`${e.top}px`,left:`${e.left}px`}),this.scrollTop=this.scrollViewport.scrollTop,this.dom.applyStyle(this.contentDiv,{width:`${this.scrollViewport.clientWidth}px`,height:`${this.scrollViewport.clientHeight}px`,top:`${this.scrollTop}px`,left:`${this.scrollViewport.scrollLeft}px`}),this.areaBodyWestGeo.width=e.left,this.areaBodyWestGeo.height=s-e.top-e.bottom,this.areaBodyWestGeo.top=e.top,this.areaBodyWestGeo.left=0,this.dom.applyStyleInPx(this.areaBodyWest.parent,this.areaBodyWestGeo),this.tableOptions.fixedWestSeparatorBorderVisible&&this.tableModel.getFixedLeftColumnCount()?this.dom.applyDisplayBlockStyle(this.dom.applyStyle(this.borderFixedWest,{width:"1px",height:`${this.areaBodyWestGeo.height}px`,top:`${this.areaBodyWestGeo.top}px`,left:`${this.areaBodyWestGeo.width}px`})):this.dom.applyDisplayNoneStyle(this.borderFixedWest),this.areaBodyEastGeo.width=e.right,this.areaBodyEastGeo.height=s-e.top-e.bottom,this.areaBodyEastGeo.top=e.top,this.areaBodyEastGeo.left=t-e.right,this.dom.applyStyleInPx(this.areaBodyEast.parent,this.areaBodyEastGeo),this.tableOptions.fixedEastSeparatorBorderVisible&&this.tableModel.getFixedLeftColumnCount()?this.dom.applyDisplayBlockStyle(this.dom.applyStyle(this.borderFixedEast,{width:"1px",height:`${this.areaBodyEastGeo.height}px`,top:`${this.areaBodyEastGeo.top}px`,left:`${this.areaBodyEastGeo.left}px`})):this.dom.applyDisplayNoneStyle(this.borderFixedEast),this.areaBodyCenterGeo.width=t-e.left-e.right,this.areaBodyCenterGeo.height=s-e.top-e.bottom,this.areaBodyCenterGeo.top=0,this.areaBodyCenterGeo.left=0,this.dom.applyStyleInPx(this.areaBodyCenter.parent,this.areaBodyCenterGeo),this.dom.applyStyle(this.areaHeaderCenter.parent,{width:`${t-e.left-e.right}px`,height:`${e.top}px`,top:"0",left:`${e.left}px`}),this.dom.applyStyle(this.areaHeaderWest.parent,{width:`${e.left}px`,height:`${e.top}px`,top:"0",left:"0"}),this.dom.applyStyle(this.areaHeaderEast.parent,{width:`${e.right}px`,height:`${e.top}px`,top:"0",left:`${t-e.right}px`}),this.tableOptions.headerSeparatorBorderVisible&&this.tableModel.isHeaderVisibe()?this.dom.applyDisplayBlockStyle(this.dom.applyStyle(this.borderHeaderBottom,{width:`${t}px`,height:"1px",top:`${e.top}px`,left:"0px"})):this.dom.applyDisplayNoneStyle(this.borderHeaderBottom),this.dom.applyStyle(this.areaFooterWest.parent,{width:`${e.left}px`,height:`${e.bottom}px`,top:`${s-e.bottom}px`,left:"0"}),this.dom.applyStyle(this.areaFooterCenter.parent,{width:`${t-e.left-e.right}px`,height:`${e.bottom}px`,top:`${s-e.bottom}px`,left:`${e.left}px`}),this.dom.applyStyle(this.areaFooterEast.parent,{width:`${e.right}px`,height:`${e.bottom}px`,top:`${s-e.bottom}px`,left:`${t-e.right}px`}),this.tableOptions.footerSeparatorBorderVisible&&this.tableModel.isFooterVisibe()?this.dom.applyDisplayBlockStyle(this.dom.applyStyle(this.borderFooterTop,{width:`${t}px`,height:"1px",top:`${s-e.bottom}px`,left:"0px"})):this.dom.applyDisplayNoneStyle(this.borderFooterTop),this.adjustAfterScrolling()}adjustAfterScrolling(){}resetSizeOfWrapperDiv(){const e=`${this.tableModel.getContentWidthInPixel()}px`,t=`${this.tableModel.getContentHeightInPixel()+1}px`;this.dom.setStyle(this.contentWrapperDiv,"width",e),this.dom.setStyle(this.contentWrapperDiv,"height",t)}}class E{constructor(e,t,s,i,o=!1){this.r1=e,this.c1=t,this.r2=s,this.c2=i,this.gammaRange=o}static create(e){return e.gammaRange===void 0&&(e.gammaRange=!1),new E(e.rowIndex1,e.columnIndex1,e.rowIndex2,e.columnIndex2,e.gammaRange)}static singleCell(e,t){return new E(e,t,e,t)}static singleRow(e){return new E(e,0,e,Number.MAX_SAFE_INTEGER)}static singleColumn(e){return new E(0,e,Number.MAX_SAFE_INTEGER,e)}isInRange(e,t){return e>=this.r1&&e<=this.r2&&t>=this.c1&&t<=this.c2}}class rt{constructor(e,t){this.tableModel=e,this.areaModel=t,this.colAndRowspanRanges=void 0}init(){if(this.areaModel.getMaxColspan()<2&&this.areaModel.getMaxRowspan()<2)return;this.colAndRowspanRanges=[];const e=this.areaModel.getRowCount(),t=this.tableModel.getColumnCount();for(let s=0;s<e;s++)for(let i=0;i<t;i++){let o=this.areaModel.getColspanAt(s,i),l=this.areaModel.getRowspanAt(s,i);if(o>1||l>1){o===0&&(o=1),l===0&&(l=1);const n="gammaCells"in this.areaModel;this.colAndRowspanRanges.push(new E(s,i,s+l-1,i+o-1,n))}}}getRanges(){return this.colAndRowspanRanges?this.colAndRowspanRanges:[]}isInRange(e,t){if(this.colAndRowspanRanges){for(const s of this.colAndRowspanRanges)if(s.isInRange(e,t))return!0}return!1}}class nt{constructor(e,t,s){this.header=e,this.body=t,this.footer=s}}class at extends lt{constructor(e,t,s,i){var l,n;super(e,t,s,i),this.firstVisibleRowIndex=-1,this.lastVisibleRowIndex=-1,this.firstFullVisibleRowIndex=-1,this.lastFullVisibleRowIndex=-1,this.displayedRowCount=0,this.pixelLimitForFullVisible=5,this.loggingActive=!1,this.dragging=!1,this.editing=!1,this.storedColumnWidths=[],this.scrollLeft=0,this.scrollViewportLeft=0,this.scrollFactorY=0,this.scrollFactorX=0,this.cleanupFunctions={header:[],body:[],footer:[]},this.tree=!1,this.colAndRowspanModels=new nt,this.draggingTargetColumnIndex=-1,this.removables=[],this.tableModel.getSelectionModel?this.getSelectionModel=this.tableModel.getSelectionModel:(l=this.tableOptions)!=null&&l.getSelectionModel&&(this.getSelectionModel=this.tableOptions.getSelectionModel),(n=this.tableOptions)!=null&&n.getFocusModel&&(this.getFocusModel=this.tableOptions.getFocusModel),oe(t.getAreaModel("body"))&&(this.tree=!0),["header","body","footer"].forEach(a=>{var d;this.colAndRowspanModels[a]=new rt(t,t.getAreaModel(a)),(d=this.colAndRowspanModels[a])==null||d.init()})}isEditing(){return this.editing}resetEditorRenderer(){this.editorRenderer=void 0,this.editorRendererRow=-1,this.editorRendererColumn=-1,this.editing=!1}clearSelection(e=!1){if(this.getSelectionModel){const t=this.getSelectionModel();t==null||t.clear(),e&&this.repaint()}}initRenderEditor(e,t){var i;let s=(i=this.tableModel.getColumnDef(t))==null?void 0:i.getEditRenderer;if(s||(s=this.tableOptions.getEditRenderer),s)if(this.editorRenderer=s(e,t),this.editorRenderer){this.editorRendererRow=e,this.editorRendererColumn=t,this.editing=!0,this.repaint();const o=document.querySelector("input.ge-table-cell-editor-input");o&&o.focus()}else this.resetEditorRenderer()}repaint(){this.adjustAfterScrolling()}repaintHard(){this.tableModel.recalcHeightAndPadding(),this.resetSizeOfWrapperDiv(),this.adjustContainersAndRows(),this.adjustAfterScrolling()}recalcColumnWidths(e){let t=(!e||e>this.scrollViewport.offsetWidth)&&this.scrollViewport.offsetWidth>100?this.scrollViewport.offsetWidth:this.scrollViewport.clientWidth;this.tableModel.setParentWidth(t),this.tableModel.init(),this.repaintHard()}adjustAfterScrolling(){var e;for(const t of this.removables)t.remove();this.hideHoverRow(),this.hideHoverColumn(),this.scrollTop=this.scrollViewport.scrollTop,this.scrollLeft=this.scrollViewport.scrollLeft,this.debounce(this.checkForScrollPosSaving.bind(this)),this.scrollFactorY=this.scrollTop/(this.scrollViewport.scrollHeight-this.scrollViewport.clientHeight),this.scrollFactorX=this.scrollLeft/(this.scrollViewport.scrollWidth-this.scrollViewport.clientWidth),isNaN(this.scrollFactorY)&&(this.scrollFactorY=0),isNaN(this.scrollFactorX)&&(this.scrollFactorX=0),this.adjustBody(),this.adjustArea("footer"),this.adjustArea("header"),this.tableOptions.tableTopBorderVisible&&this.removables.push(this.dom.addHorizontalBorder(new I(0,this.hostElement.clientWidth,1,0),this.hostElement,"ge-table-border")),this.tableOptions.tableBottomBorderVisible&&this.removables.push(this.dom.addHorizontalBorder(new I(0,this.hostElement.clientWidth,1,this.hostElement.clientHeight-1),this.hostElement,"ge-table-border")),this.tableModel.getFixedLeftColumnCount()>0&&this.removables.push(this.dom.addVerticalBorder(new I(this.areaBodyWest.child.clientWidth,1,this.hostElement.clientHeight,0),this.hostElement,"ge-table-body-west-vertical-border")),((e=this.tableModel.getAreaModel("header"))==null?void 0:e.getRowCount())>0&&this.removables.push(this.dom.addHorizontalBorder(new I(0,this.hostElement.clientWidth,1,this.areaHeaderCenter.child.clientHeight),this.hostElement,"ge-table-body-west-vertical-border"))}checkForScrollPosSaving(){var e,t;this.storeScrollPosStateService&&((t=(e=this.tableOptions)==null?void 0:e.autoRestoreOptions)!=null&&t.autoRestoreScrollPosition)&&this.storeScrollPosStateService.updateScrollOffset([this.scrollLeft,this.scrollTop])}updateCells(e,t=!1){e.forEach(s=>{this.tableModel.getAreaModel(s.area).setValue(s.rowIndex,s.columnIndex,s.value),t||this.rerenderCellContent(s)}),t&&this.repaint()}rerenderCellContent({area:e,rowIndex:t,columnIndex:s,value:i,cssClasses:o}){const l=this.tableModel.getAreaModel(e),n='div[data-col-index="'+s+'"][data-row-index="'+t+'"][data-area="'+e+'"]',a=document.querySelector(n);if(a){let d;const c=this.editorRenderer&&this.editorRendererRow===t&&this.editorRendererColumn===s;let h;if(c?h=this.editorRenderer:h=l.getCellRenderer(t,s),a.innerText="",this.applyCssClasses(a,o),h)d=h.render(a,t,s,e,l,i,this.dom.domService),d&&this.cleanupFunctions[e].push(d);else{const u=`${i}`;this.dom.addLabelDiv(a,u,!1,t,s,e)}const p=l.getCustomClassesAt(t,s);p.length&&this.dom.addClasses(p,a);const g=l.getCustomStyleAt(t,s);if(g)for(const u in g)this.dom.setStyle(a,u,g[u])}}getFirstVisibleRowIndex(){return this.firstVisibleRowIndex}getLastVisibleRowIndex(){return this.lastVisibleRowIndex}getFirstFullVisibleRowIndex(){return this.firstFullVisibleRowIndex}getLastFullVisibleRowIndex(){return this.lastFullVisibleRowIndex}getDisplayedRowCount(){return this.displayedRowCount}storeColumnWidths(){const e=this.tableModel.getColumnDefs();e!=null&&e.length&&(this.storedColumnWidths=e.map((t,s)=>this.tableModel.getColumnWidth(s)))}getAreaAndSideIdentByAttr(e){if(e){const t=this.getStringByAttr(e,"data-area"),s=this.getStringByAttr(e,"data-side");if(s&&t)return[t,s]}return[void 0,void 0]}getArea(e,t){if(e==="header"){if(t==="west")return this.areaHeaderWest;if(t==="center")return this.areaHeaderCenter;if(t==="east")return this.areaHeaderEast}else if(e==="body"){if(t==="west")return this.areaBodyWest;if(t==="center")return this.areaBodyCenter;if(t==="east")return this.areaBodyEast}else if(e==="footer"){if(t==="west")return this.areaFooterWest;if(t==="center")return this.areaFooterCenter;if(t==="east")return this.areaFooterEast}throw Error(`Wrong area identifier: row:${e}, col:${t}`)}adjustBody(){const e=this.areaBodyCenterGeo.height-this.tableModel.getContentHeightInPixel(),t=this.scrollFactorY*e;this.dom.setStyle(this.contentDiv,"top",`${this.scrollTop}px`),this.dom.setStyle(this.contentDiv,"left",`${this.scrollViewport.scrollLeft}px`),this.adjustArea("body",t)}getNumberByAttr(e,t){var s;if(e){const i=(s=e.closest("["+t+"]"))==null?void 0:s.getAttribute(t);if(i)return Number(i)}return-1}getStringByAttr(e,t){var s;if(e){const i=(s=e.closest("["+t+"]"))==null?void 0:s.getAttribute(t);if(i)return i}return""}adjustArea(e,t=0){var f;const s=this.getArea(e,"west"),i=this.getArea(e,"center"),o=this.getArea(e,"east"),l=i.child.clientHeight;s.child.innerText="",i.child.innerText="",o.child.innerText="";const n=0,a=this.areaBodyCenterGeo.width,d=this.tableModel.getPadding(),c=this.tableModel.getAreaModel(e),h=c.getRowCount();for(;this.cleanupFunctions[e].length;){const m=this.cleanupFunctions[e].shift();m&&m()}let p=t;const g=this.tableModel.getColumnCount(),u=this.tableModel.getFixedRightColumnCount(),S=this.tableModel.getFixedLeftColumnCount();e==="body"&&(this.firstVisibleRowIndex=-1,this.firstFullVisibleRowIndex=-1,this.lastVisibleRowIndex=-1,this.lastFullVisibleRowIndex=-1);for(let m=0;m<h;m++){const w=p,C=m===h-1,A=this.tableModel.getRowHeight(e,m);if(w+A>0){e==="body"&&this.firstVisibleRowIndex===-1&&(this.firstVisibleRowIndex=m,this.firstFullVisibleRowIndex=w<-this.pixelLimitForFullVisible?this.firstVisibleRowIndex+1:this.firstVisibleRowIndex);let b={left:n,width:a,height:A,top:w,index:m},y=this.dom.addRowDiv(i,b,m,e,"center");const D=S;if(this.adjustColumnsToRowParent({areaIdent:e,sideIdent:"center",areaModel:c,geo:b,parent:y,rowIndex:m,columnIndexStart:D,columnIndexEnd:g-u-1,verticalFixed:!1,lastRowOfModel:C}),d.left>0&&(b={left:n,width:this.areaBodyWestGeo.width,height:A,top:w,index:m},y=this.dom.addRowDiv(s,b,m,e,"west"),this.adjustColumnsToRowParent({areaIdent:e,sideIdent:"west",areaModel:c,geo:b,parent:y,rowIndex:m,columnIndexStart:0,columnIndexEnd:D-1,verticalFixed:!0,lastRowOfModel:C})),d.right>0&&(b={left:n,width:this.areaBodyEastGeo.width,height:A,top:w,index:m},y=this.dom.addRowDiv(o,b,m,e,"east"),this.adjustColumnsToRowParent({areaIdent:e,sideIdent:"east",areaModel:c,geo:b,parent:y,rowIndex:m,columnIndexStart:g-u,columnIndexEnd:g-1,verticalFixed:!0,lastRowOfModel:C})),e==="header"&&this.tree&&m===h-1){const T=this.dom.applyStyle(this.dom.setAttribute(this.dom.addDiv(y,new I(16,20,20,8)),"data-ge-action","toggleExpandCollapseAll"),{cursor:"pointer"}),F=this.tableOptions.treeOptions.arrowExpandCollapseAll;if(F){const N=this.dom.domService.createText(F.content);this.dom.domService.appendChild(T,N),F.style&&this.dom.applyStyleString(T,F.style)}}}if(p=p+A,p>l){e==="body"&&(this.lastVisibleRowIndex=m,this.lastFullVisibleRowIndex=l-p<-this.pixelLimitForFullVisible?m-1:m,this.displayedRowCount=this.lastFullVisibleRowIndex-this.firstFullVisibleRowIndex+1);break}}if(this.loggingActive&&e==="body"&&console.log("render scope: this.firstVisibleRowIndex <- "+this.firstVisibleRowIndex+`
|
|
9
9
|
render scope: this.firstFullVisibleRowIndex <- `+this.firstFullVisibleRowIndex+`
|
|
10
10
|
render scope: this.lastVisibleRowIndex <- `+this.lastVisibleRowIndex+`
|
|
11
|
-
render scope: this.lastFullVisibleRowIndex <- `+this.lastFullVisibleRowIndex),this.colAndRowspanModels&&this.colAndRowspanModels[e]){const u=((f=this.colAndRowspanModels[e])==null?void 0:f.getRanges())??[];if(u.length)for(const w of u){let v=0,A=o.child,y="center";if(w.c1<b)A=s.child,y="west";else if(g>0&&w.c1>=m-g)A=i.child,y="east";else{const S=this.areaBodyCenterGeo.width-this.tableModel.getContentWidthInPixel();v=this.scrollFactorX*S-this.areaBodyWestGeo.width,y="center"}this.drawBigCell(w,v,t,c,A,y)}}}drawBigCell(e,t,s,o,i,r){const a=s+this.getRowHeights(0,e.r1-1,o).reduce((f,u)=>f+u,0),n=this.tableModel.getColumnCount(),d=this.tableModel.getFixedRightColumnCount();let c=0;d>0&&e.c1>=n-d&&(c=n-d);const h=t+this.getColumnWidths(c,e.c1-1).reduce((f,u)=>f+u,0),p=this.getRowHeights(e.r1,e.r2,o).reduce((f,u)=>f+u,0),m=this.getColumnWidths(e.c1,e.c2).reduce((f,u)=>f+u,0);let g=!1;const b=this.getSelectionModel?this.getSelectionModel():void 0;b&&(g=b.getSelectionCount(e.r1,e.c1)>0),e.gammaRange?this.renderCell({areaModel:o,areaIdent:o.areaIdent,sideIdent:r,rowIndex:e.r1,columnIndex:e.c1,left:h,top:a,width:m,height:p,parent:i,cellSelected:g,lastRowOfModel:!0,gammaRange:e.gammaRange}):this.renderCell({areaModel:o,areaIdent:o.areaIdent,sideIdent:r,rowIndex:e.r1,columnIndex:e.c1,left:h,top:a,width:m,height:p,parent:i,cellSelected:g,lastRowOfModel:!0,gammaRange:e.gammaRange}),o.areaIdent==="header"&&this.tableOptions.columnsResizable&&this.renderHeaderCellResizeHandle({rowIndex:e.r1,columnIndex:e.c1,cellLeft:h,cellTop:a,cellWidth:m,cellHeight:p,parent:i})}findRowOfImportantRowspanCell(e,t,s){const o=e.getMaxRowspan();for(let i=t-1;i>-1;i--){const r=e.getRowspanAt(i,s);if(r>1&&i+r+1>=t)return i;if(t-i>o)return-1}return-1}adjustColumnsToRowParent({areaIdent:e,sideIdent:t,areaModel:s,geo:o,parent:i,rowIndex:r,columnIndexStart:a,columnIndexEnd:n,verticalFixed:d=!1,lastRowOfModel:c=!1}){var b;this.scrollViewportLeft=this.scrollViewport.scrollLeft;let h=0;if(!d){const f=this.areaBodyCenterGeo.width-this.tableModel.getContentWidthInPixel();h=this.scrollFactorX*f}const p=0,m=!!(e==="body"&&t);let g=h;for(let f=a;f<=n;f++){const u=g,w=this.tableModel.getColumnWidth(f);if(w>0&&u+w>0){let v=o.height;const A=s.getRowspanAt(r,f),y=s.getColspanAt(r,f);A>1&&(v=this.getRowHeights(r,r+A-1,s).reduce((T,D)=>T+D,0));let S=w;y>1&&(S=this.getColumnWidths(f,f+y-1).reduce((T,D)=>T+D,0));let F=!1;if(this.colAndRowspanModels&&this.colAndRowspanModels[e]&&(b=this.colAndRowspanModels[e])!=null&&b.isInRange(r,f)&&(F=!0),this.draggingTargetColumnIndex===f&&e!=="header"){this.renderDragTargetDiv(i,u,p,S,v);const T={left:u,top:p,width:S,height:v};this.dom.addColumnBorderDivs(this.tableOptions,i,T,e,t)}else{const T=this.renderSelectedBackgroundDiv(F,m,t,s,r,f,i,u,p,S,v);"gammaCells"in s&&s.getValueAt(r,f)&&(F=!1),F||this.renderCell({areaModel:s,areaIdent:e,sideIdent:t,rowIndex:r,columnIndex:f,left:u,top:p,width:S,height:v,parent:i,cellSelected:T,lastRowOfModel:c,gammaRange:!0}),e==="header"&&this.tableOptions.columnsResizable&&this.renderHeaderCellResizeHandle({rowIndex:r,columnIndex:f,cellLeft:u,cellTop:p,cellWidth:S,cellHeight:v,parent:i})}}if(g=g+w,g>this.areaBodyCenterGeo.width)break}this.tableOptions.verticalBorderVisible&&this.dom.addVerticalBorder(new I(g-1,1,o.height,0),i)}getTreeArrowColumnIndex(){return this.tableOptions.showCheckboxWihoutExtraColumn?0:this.tableModel.isRowCheckboxVisible()?1:0}addAndRenderCellDiv({areaModel:e,areaIdent:t,sideIdent:s,rowIndex:o,index:i,left:r,width:a,height:n,top:d,parent:c,lastRowOfModel:h}){var ge;const m=this.editorRenderer&&this.editorRendererRow===o&&this.editorRendererColumn===i?this.editorRenderer:e.getCellRenderer(o,i),g={left:r,width:a,height:n,top:d,index:i},b=e.getRowByIndex(o);let f="none";if(i===this.getTreeArrowColumnIndex()&&K(b)){const C=b;(ge=C.children)!=null&&ge.length?C.expanded?f="expanded":f="collapsed":f="hidden"}let w;if(t==="header"){const C=this.tableModel.getColumnDef(i);(!(C!=null&&C.sortIconVisible)||C!=null&&C.sortIconVisible())&&(w=C==null?void 0:C.sortState)}const v=e.getValueAt(o,i),A=m?"":`${v}`,y=e.isRowChecked(o),S=this.dom.addColumnDiv({parent:c,geo:g,rowIndex:o,columnIndex:i,areaIdent:t,sideIdent:s,text:A,treeArrow:f,tableOptions:this.tableOptions,checkedType:y,sortState:w}),F=e.getTooltipAt(o,i);F&&this.dom.setAttribute(S,"title",F);const T=this.tableModel.getColumnDef(i);T&&T.classes[t]&&this.dom.addClasses(T.classes[t],S);let D;m&&(D=m.render(S,o,i,t,e,v,this.dom.domService));const N=e.getCustomClassesAt(o,i);if(N.length&&this.dom.addClasses(N,S),this.dom.addColumnBorderDivs(this.tableOptions,c,g,t,s),h&&this.dom.addHorizontalBorder({left:r,width:a,height:n,top:d+n},c),this.getFocusModel&&t==="body"){const C=this.getFocusModel();C!=null&&C.hasFocus(o,i)&&this.dom.addFocusBorderDivs(c,g,{})}t==="header"&&this.dom.setAttribute(S,"data-ge-action","drag-column");const ee=e.getCustomStyleAt(o,i);if(ee)for(const C in ee)this.dom.setStyle(S,C,ee[C]);return[S,D]}applyCssClasses(e,t={}){e&&Object.entries(t).forEach(([s,o])=>{o?this.dom.addClass(s,e):this.dom.removeClass(s,e)})}getColumnWidths(e,t){const s=[];for(let o=e;o<=t;o++)s.push(this.tableModel.getColumnWidth(o));return s}getRowHeights(e,t,s){const o=[];for(let i=e;i<=t;i++)o.push(s.getRowHeight(i));return o}adjustHoverRows(e){if(this.tableOptions.hoverRowVisible&&e.rowIndex>-1){const t=this.hostElement.clientWidth,s=this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex),o=e.rowTop+this.areaHeaderCenter.parent.clientHeight-this.scrollTop;this.dom.applyStyle(this.hoverRow,{left:"0",top:o+"px",width:t+"px",height:s+"px",display:"block"})}else this.hideHoverRow()}hideHoverRow(){this.dom.applyStyle(this.hoverRow,{display:"none"})}adjustHoverColumns(e){if(this.tableOptions.hoverColumnVisible&&e.rowIndex>-1){const t=this.hostElement.clientHeight,s=this.tableModel.getColumnWidth(e.columnIndex),o=this.areaBodyWestGeo.width,i=e.columnLeft+this.tableModel.getPadding().left-this.scrollLeft-o;this.dom.applyStyle(this.hoverColumn,{left:i+"px",top:"0px",width:s+"px",height:t+"px",display:"block"})}else this.hideHoverColumn()}hideHoverColumn(){this.dom.applyStyle(this.hoverColumn,{display:"none"})}debounce(e,t=1e3){this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(e.bind(this),t)}adjustDraggingColumn(e,t,s){var o,i;if(this.dragging){const r=this.hostElement.clientHeight,a=this.storedColumnWidths[t];if((o=e.originalEvent)!=null&&o.clientX){const c={left:((i=e.originalEvent)==null?void 0:i.clientX)-a/2,width:a,height:r,top:0,index:t};this.dom.applyStyle(this.draggingColumn,{background:"rgba(128,128,128,0.2)",display:"block",overfllow:"clip"}),this.dom.applyStyleInPx(this.draggingColumn,c),s&&this.renderContentOfDraggingColumn(c)}}else this.hideDraggingColumn()}renderContentOfDraggingColumn(e){const t=this.renderContentOfDraggingColumnForArea(e,"header",0);this.renderContentOfDraggingColumnForArea(e,"body",t)}renderContentOfDraggingColumnForArea(e,t,s=0){const o="center",i=this.tableModel.getAreaModel(t),r=i==null?void 0:i.getRowCount();if(r){const a=e.index??0,n=this.draggingColumn;for(let d=0;d<r;d++){const c=s,h=i.getRowHeight(d),p={left:0,width:e.width,height:h,top:c,index:d},m=i.getValueAt(d,a),g=i.getCellRenderer(d,a),b=g?"":`${m}`,f={parent:n,geo:p,rowIndex:d,columnIndex:a,areaIdent:t,sideIdent:o,text:b},u=this.dom.addColumnDiv(f);let w;g&&(w=g.render(u,d,a,t,i,m,this.dom.domService),w&&this.cleanupFunctions[t].push(w));const v=i.getCustomClassesAt(d,a);v.length&&this.dom.addClasses(v,u);const A=this.tableModel.getColumnDef(a);A&&A.classes[t]&&this.dom.addClasses(A.classes[t],u),this.dom.addColumnBorderDivs(this.tableOptions,n,p,t,o);const y=i.getCustomStyleAt(d,a);if(y)for(const S in y)this.dom.setStyle(u,S,y[S]);s=s+h}}return s}hideDraggingColumn(){this.dom.applyStyle(this.draggingColumn,{display:"none"})}renderDragTargetDiv(e,t,s,o,i){const r=this.dom.applyStylePosistionAbsolute(this.dom.createDivWithClass("ge-table-drop-zone",e));return this.dom.setStyle(r,"left",`${t}px`),this.dom.setStyle(r,"top",`${s}px`),this.dom.setStyle(r,"width",`${o}px`),this.dom.setStyle(r,"height",`${i}px`),r}renderSelectedBackgroundDiv(e,t,s,o,i,r,a,n,d,c,h){let p=!1;if(!e&&t&&o.isSelectable(i,r)&&this.getSelectionModel){const m=this.getSelectionModel();if(m){const g=m.getSelectionCount(i,r);p=g>0;for(let b=0;b<g;b++){const f=this.dom.applyStylePosistionAbsolute(this.dom.createDivWithClass(`ge-table-${o.areaIdent}-${s}-selected-range`,a));this.dom.setStyle(f,"left",`${n}px`),this.dom.setStyle(f,"top",`${d}px`),this.dom.setStyle(f,"width",`${c}px`),this.dom.setStyle(f,"height",`${h}px`)}}}return p}renderCell({areaModel:e,areaIdent:t,sideIdent:s,rowIndex:o,columnIndex:i,left:r,top:a,width:n,height:d,parent:c,cellSelected:h,lastRowOfModel:p}){const[m,g]=this.addAndRenderCellDiv({areaModel:e,areaIdent:t,sideIdent:s,rowIndex:o,index:i,left:r,width:n,height:d,top:a,parent:c,lastRowOfModel:p});h&&this.dom.addClass(`ge-table-${t}-${s}-selected-range`,m),g&&this.cleanupFunctions[t].push(g)}renderHeaderCellResizeHandle({rowIndex:e,columnIndex:t,cellLeft:s,cellTop:o,cellWidth:i,cellHeight:r,parent:a}){const n=this.dom.domService,d=this.tableOptions.columnResizeHandleWidthInPx??2,c=n.createElement("div");n.setAttribute(c,"data-col-index",`${t}`),n.setAttribute(c,"data-row-index",`${e}`),n.setAttribute(c,"data-area","header"),n.setAttribute(c,"data-ge-action","resize-column"),n.addClass(c,"ge-table-column-resize-handle"),n.setStyle(c,"display","clip"),n.setStyle(c,"position","absolute"),n.setStyle(c,"cursor","col-resize"),n.setStyle(c,"left",`${s+i-d}px`),n.setStyle(c,"top",`${o}px`),n.setStyle(c,"width",`${d}px`),n.setStyle(c,"height",`${r}px`),n.appendChild(a,c)}}class ft{constructor(e,t){this.columnIndex=e,this.sortState=t}}class ut{constructor(e){this.tableScope=e,this.tableScope.hostElement.addEventListener("change",this.onHostElementChanged.bind(this))}onHostElementChanged(e){if(e.target instanceof HTMLInputElement||e.target instanceof HTMLSelectElement||e.target instanceof HTMLTextAreaElement){const t=e.target,s=t.getAttribute("data-area"),o=t.getAttribute("data-row-index"),i=t.getAttribute("data-col-index");if(s&&o&&i){const r=ce(s),a=Number(o),n=Number(i);this.tableScope.updateModelValueAfterEdit(r,a,n,t.value)}}}}class mt{constructor(e=-1,t=-1){this.rowIndex=e,this.columnIndex=t}}class he{constructor(e){this.cells=e}static createSingle(e,t){return new he([new mt(e,t)])}}class bt{constructor(e){var t,s;this.tableScope=e,(t=this.tableScope.tableOptions)!=null&&t.getSelectionModel&&(this.getSelectionModel=this.tableScope.tableOptions.getSelectionModel),(s=this.tableScope.tableOptions)!=null&&s.getFocusModel&&(this.getFocusModel=this.tableScope.tableOptions.getFocusModel)}onMouseClicked(e,t){var i,r,a,n,d,c,h;let s=!1,o=!1;if(this.getSelectionModel&&this.getFocusModel){const p=this.getSelectionModel(),m=this.getFocusModel();p&&m&&(m.hasFocus(e.rowIndex,e.columnIndex)||(m.setFocus(e.rowIndex,e.columnIndex),this.tableScope.onFocusChanged(m),s=!0),(i=e.originalEvent)!=null&&i.shiftKey||p.hasSelection()&&(p.clear(),s=!0),(r=e.originalEvent)!=null&&r.shiftKey&&this.previousEvt?(p.addSelection(this.createRangeByEvents(e,this.previousEvt)),o=!0,s=!0):(a=e.originalEvent)!=null&&a.altKey&&((n=e.originalEvent)!=null&&n.ctrlKey||(d=e.originalEvent)!=null&&d.metaKey)?(p.removeSelection(E.singleCell(e.rowIndex,e.columnIndex)),o=!0,s=!0):(c=e.originalEvent)!=null&&c.ctrlKey||(h=e.originalEvent)!=null&&h.metaKey?(p.addSelection(E.singleCell(e.rowIndex,e.columnIndex)),o=!0,s=!0):(p.firstClick(e.rowIndex,e.columnIndex),s=!0),this.tableScope.onSelectionChanged(p))}return o?this.previousEvt=void 0:this.previousEvt=e==null?void 0:e.clone(),s}onActionTriggered(e){if(this.getSelectionModel&&this.getFocusModel){const t=this.getSelectionModel(),s=this.getFocusModel();if(t&&s){if(e==="SELECT_ALL")return t.selectAll(),this.tableScope.repaint(),!0;if(e==="DESELECT_ALL")return t.clear(),this.tableScope.repaint(),!0;if(e==="TOGGLE_SELECTION"){const[o,i]=s.getFocus();return t.togglePoint(o,i),this.tableScope.repaint(),!0}}}return!1}createRangeByEvents(e,t){t||(t=e);const s=Math.min(e.rowIndex,t==null?void 0:t.rowIndex),o=Math.max(e.rowIndex,t==null?void 0:t.rowIndex),i=Math.min(e.columnIndex,t==null?void 0:t.columnIndex),r=Math.max(e.columnIndex,t==null?void 0:t.columnIndex);return E.create({rowIndex1:s,columnIndex1:i,rowIndex2:o,columnIndex2:r})}}class St{get(){return{f2:"START_EDITING",space:"TOGGLE_SELECTION","ctrl+num_add":"SELECT_ALL","ctrl+a":"SELECT_ALL","ctrl+shift+a":"DESELECT_ALL","ctrl+x":"DESELECT_ALL","ctrl+num_subtract":"DESELECT_ALL","meta -":"DESELECT_ALL",arrowup:"NAVIGATE_UP",arrowdown:"NAVIGATE_DOWN",arrowleft:"NAVIGATE_LEFT",arrowright:"NAVIGATE_RIGHT","meta+c":"COPY_2_CLIPBOARD","ctrl+c":"COPY_2_CLIPBOARD"}}}class yt{get(){return{f2:"START_EDITING",space:"TOGGLE_SELECTION","ctrl+num_add":"SELECT_ALL","meta+a":"SELECT_ALL","ctrl+a":"SELECT_ALL","meta+x":"DESELECT_ALL","meta+shift+a":"DESELECT_ALL","ctrl+shift+a":"DESELECT_ALL","ctrl+num_subtract":"DESELECT_ALL","ctrl -":"DESELECT_ALL",arrowup:"NAVIGATE_UP",arrowdown:"NAVIGATE_DOWN",arrowleft:"NAVIGATE_LEFT",arrowright:"NAVIGATE_RIGHT","meta+c":"COPY_2_CLIPBOARD","ctrl+c":"COPY_2_CLIPBOARD"}}}function wt(l){return l.trim().replace(/\+/g," ").replace(/ +/g," ").replace(/⌫/g,"backspace").replace(/↩/g,"enter").replace(/⇧/g,"shift").replace(/⌥/g,"alt").replace(/option/g,"alt").replace(/opt/g,"alt").replace(/⌃/g,"ctrl").replace(/control/g,"ctrl").replace(/command/g,"cmd").replace(/meta/g,"cmd").replace(/escape/g,"esc").replace(/⌘/g,"cmd").replace(/\*/g,"multiply").split(" ").filter(e=>e).filter((e,t,s)=>s.indexOf(e)===t).sort((e,t)=>{const s={cmd:1,ctrl:2,alt:3,shift:4},o=s[e]||5,i=s[t]||5;return o!==i?o-i:e.localeCompare(t)}).join(" ")}function me(l){let e=l.key.toLowerCase();if(e===" "&&(e="space"),e==="arrowleft"&&(e="left"),e==="arrowright"&&(e="right"),e==="arrowup"&&(e="up"),e==="arrowdown"&&(e="down"),e==="delete"&&l.code==="Delete"&&(e="delete"),e==="backspace"&&(e="backspace"),e==="escape"&&(e="esc"),e==="return"&&(e="enter"),l.code.startsWith("Numpad")){const s=l.code.replace("Numpad","").toLowerCase();s==="add"?e="num_add":s==="subtract"?e="num_subtract":s==="multiply"?e="num_multiply":s==="divide"?e="num_divide":s==="decimal"?e="num_decimal":s==="enter"?e="num_enter":e="num_"+s}l.code.match(/^F\d+$/)&&(e=l.code.toLowerCase()),l.code.match(/^Digit\d+$/)&&(e=l.code.replace(/Digit/g,""));let t="";return l.ctrlKey&&(t+=" ctrl"),l.altKey&&(t+=t+" alt"),l.shiftKey&&(t+=t+" shift"),l.metaKey&&(t+=t+" cmd"),wt(t+" "+e)}class xt{constructor(e){this.tableScope=e,this.shortcutActionIdMapping={},this.listener=[],this.listener.push(e),this.init()}addListener(e){this.listener.includes(e)||this.listener.push(e)}init(){var e,t;(t=(e=this.tableScope)==null?void 0:e.tableOptions)!=null&&t.shortcutActionsDisabled?this.isDebug()&&console.debug("ShortcutService skipped."):(this.assignPredefinedSystemShortcutMappings(),Object.assign(this.shortcutActionIdMapping,this.tableScope.tableOptions.shortcutActionIdMapping),this.isDebug()&&console.debug("ShortcutService",this.shortcutActionIdMapping),this.tableScope.hostElement.addEventListener("keydown",this.onKeyDown.bind(this)))}assignPredefinedSystemShortcutMappings(){this.isMacintosh()?Object.assign(this.shortcutActionIdMapping,new yt().get()):Object.assign(this.shortcutActionIdMapping,new St().get())}isMacintosh(){return navigator.platform.indexOf("Mac")>-1}isDebug(){return this.isLocalhost()}isLocalhost(){return location.hostname==="localhost"||location.hostname==="127.0.0.1"}onKeyDown(e){const t=this.findEntity(e);t&&this.emit(t)&&(e.preventDefault(),e.stopPropagation())}emit(e){this.isDebug()&&console.debug("ShortcutService emit :",e);let t=!1;for(const s of this.listener)s.onActionTriggered(e)&&(t=!0);return t}findEntity(e){const t=me(e);this.isDebug()&&console.debug("ShortcutService shortcut :",t);for(const s in this.shortcutActionIdMapping)if(me(e)===t)return this.isDebug()&&console.debug("ShortcutService action :",this.shortcutActionIdMapping[s]),this.shortcutActionIdMapping[s]}getShortcutActionMapping(){return this.shortcutActionIdMapping}}class be{onCheckboxChanged(e){}onContextmenu(e){}onModelChanged(e){}onMouseClicked(e){}onMouseDragging(e){}onMouseDraggingEnd(e){}onMouseMoved(e){}onSelectionChanged(e){}onFocusChanged(e){}}class Te{setStyle(e,t,s){return e.style[t]=s,e}appendText(e,t){const s=this.createText(t);return this.appendChild(e,s),s}addClass(e,t){return t.includes(" ")?t.split(" ").forEach(s=>e.classList.add(s)):e.classList.add(t),e}removeClass(e,t){return t.includes(" ")?t.split(" ").forEach(s=>e.classList.remove(s)):e.classList.remove(t),e}appendChild(e,t){e.appendChild(t)}createElement(e){return document.createElement(e)}createText(e){return document.createTextNode(e)}setAttribute(e,t,s){e.setAttribute(t,s)}}class vt{render(e,t,s,o,i,r,a){if(i.isEditable(t,s)){a.addClass(e,"ge-table-row-input-div");const n=i.getValueAt(t,s);e.innerHTML=`
|
|
11
|
+
render scope: this.lastFullVisibleRowIndex <- `+this.lastFullVisibleRowIndex),this.colAndRowspanModels&&this.colAndRowspanModels[e]){const m=((f=this.colAndRowspanModels[e])==null?void 0:f.getRanges())??[];if(m.length)for(const w of m){let C=0,A=i.child,b="center";if(w.c1<S)A=s.child,b="west";else if(u>0&&w.c1>=g-u)A=o.child,b="east";else{const y=this.areaBodyCenterGeo.width-this.tableModel.getContentWidthInPixel();C=this.scrollFactorX*y-this.areaBodyWestGeo.width,b="center"}this.drawBigCell(w,C,t,c,A,b)}}}drawBigCell(e,t,s,i,o,l){const n=s+this.getRowHeights(0,e.r1-1,i).reduce((f,m)=>f+m,0),a=this.tableModel.getColumnCount(),d=this.tableModel.getFixedRightColumnCount();let c=0;d>0&&e.c1>=a-d&&(c=a-d);const h=t+this.getColumnWidths(c,e.c1-1).reduce((f,m)=>f+m,0),p=this.getRowHeights(e.r1,e.r2,i).reduce((f,m)=>f+m,0),g=this.getColumnWidths(e.c1,e.c2).reduce((f,m)=>f+m,0);let u=!1;const S=this.getSelectionModel?this.getSelectionModel():void 0;S&&(u=S.getSelectionCount(e.r1,e.c1)>0),e.gammaRange?this.renderCell({areaModel:i,areaIdent:i.areaIdent,sideIdent:l,rowIndex:e.r1,columnIndex:e.c1,left:h,top:n,width:g,height:p,parent:o,cellSelected:u,lastRowOfModel:!0,gammaRange:e.gammaRange}):this.renderCell({areaModel:i,areaIdent:i.areaIdent,sideIdent:l,rowIndex:e.r1,columnIndex:e.c1,left:h,top:n,width:g,height:p,parent:o,cellSelected:u,lastRowOfModel:!0,gammaRange:e.gammaRange}),i.areaIdent==="header"&&this.tableOptions.columnsResizable&&this.renderHeaderCellResizeHandle({rowIndex:e.r1,columnIndex:e.c1,cellLeft:h,cellTop:n,cellWidth:g,cellHeight:p,parent:o})}findRowOfImportantRowspanCell(e,t,s){const i=e.getMaxRowspan();for(let o=t-1;o>-1;o--){const l=e.getRowspanAt(o,s);if(l>1&&o+l+1>=t)return o;if(t-o>i)return-1}return-1}adjustColumnsToRowParent({areaIdent:e,sideIdent:t,areaModel:s,geo:i,parent:o,rowIndex:l,columnIndexStart:n,columnIndexEnd:a,verticalFixed:d=!1,lastRowOfModel:c=!1}){var S;this.scrollViewportLeft=this.scrollViewport.scrollLeft;let h=0;if(!d){const f=this.areaBodyCenterGeo.width-this.tableModel.getContentWidthInPixel();h=this.scrollFactorX*f}const p=0,g=!!(e==="body"&&t);let u=h;for(let f=n;f<=a;f++){const m=u,w=this.tableModel.getColumnWidth(f);if(w>0&&m+w>0){let C=i.height;const A=s.getRowspanAt(l,f),b=s.getColspanAt(l,f);A>1&&(C=this.getRowHeights(l,l+A-1,s).reduce((T,F)=>T+F,0));let y=w;b>1&&(y=this.getColumnWidths(f,f+b-1).reduce((T,F)=>T+F,0));let D=!1;if(this.colAndRowspanModels&&this.colAndRowspanModels[e]&&(S=this.colAndRowspanModels[e])!=null&&S.isInRange(l,f)&&(D=!0),this.draggingTargetColumnIndex===f&&e!=="header"){this.renderDragTargetDiv(o,m,p,y,C);const T={left:m,top:p,width:y,height:C};this.dom.addColumnBorderDivs(this.tableOptions,o,T,e,t)}else{const T=this.renderSelectedBackgroundDiv(D,g,t,s,l,f,o,m,p,y,C);"gammaCells"in s&&s.getValueAt(l,f)&&(D=!1),D||this.renderCell({areaModel:s,areaIdent:e,sideIdent:t,rowIndex:l,columnIndex:f,left:m,top:p,width:y,height:C,parent:o,cellSelected:T,lastRowOfModel:c,gammaRange:!0}),e==="header"&&this.tableOptions.columnsResizable&&this.renderHeaderCellResizeHandle({rowIndex:l,columnIndex:f,cellLeft:m,cellTop:p,cellWidth:y,cellHeight:C,parent:o})}}if(u=u+w,u>this.areaBodyCenterGeo.width)break}this.tableOptions.verticalBorderVisible&&this.dom.addVerticalBorder(new I(u-1,1,i.height,0),o)}getTreeArrowColumnIndex(){return this.tableOptions.showCheckboxWihoutExtraColumn?0:this.tableModel.isRowCheckboxVisible()?1:0}addAndRenderCellDiv({areaModel:e,areaIdent:t,sideIdent:s,rowIndex:i,index:o,left:l,width:n,height:a,top:d,parent:c,lastRowOfModel:h}){var he;const g=this.editorRenderer&&this.editorRendererRow===i&&this.editorRendererColumn===o?this.editorRenderer:e.getCellRenderer(i,o),u={left:l,width:n,height:a,top:d,index:o},S=e.getRowByIndex(i);let f="none";if(o===this.getTreeArrowColumnIndex()&&K(S)){const v=S;(he=v.children)!=null&&he.length?v.expanded?f="expanded":f="collapsed":f="hidden"}let w;if(t==="header"){const v=this.tableModel.getColumnDef(o);(!(v!=null&&v.sortIconVisible)||v!=null&&v.sortIconVisible())&&(w=v==null?void 0:v.sortState)}const C=e.getValueAt(i,o),A=g?"":`${C}`,b=e.isRowChecked(i),y=this.dom.addColumnDiv({parent:c,geo:u,rowIndex:i,columnIndex:o,areaIdent:t,sideIdent:s,text:A,treeArrow:f,tableOptions:this.tableOptions,checkedType:b,sortState:w}),D=e.getTooltipAt(i,o);D&&this.dom.setAttribute(y,"title",D);const T=this.tableModel.getColumnDef(o);T&&T.classes[t]&&this.dom.addClasses(T.classes[t],y);let F;g&&(F=g.render(y,i,o,t,e,C,this.dom.domService));const N=e.getCustomClassesAt(i,o);if(N.length&&this.dom.addClasses(N,y),this.dom.addColumnBorderDivs(this.tableOptions,c,u,t,s),h&&this.dom.addHorizontalBorder({left:l,width:n,height:a,top:d+a},c),this.getFocusModel&&t==="body"){const v=this.getFocusModel();v!=null&&v.hasFocus(i,o)&&this.dom.addFocusBorderDivs(c,u,{})}t==="header"&&this.dom.setAttribute(y,"data-ge-action","drag-column");const Z=e.getCustomStyleAt(i,o);if(Z)for(const v in Z)this.dom.setStyle(y,v,Z[v]);return[y,F]}applyCssClasses(e,t={}){e&&Object.entries(t).forEach(([s,i])=>{i?this.dom.addClass(s,e):this.dom.removeClass(s,e)})}getColumnWidths(e,t){const s=[];for(let i=e;i<=t;i++)s.push(this.tableModel.getColumnWidth(i));return s}getRowHeights(e,t,s){const i=[];for(let o=e;o<=t;o++)i.push(s.getRowHeight(o));return i}adjustHoverRows(e){if(this.tableOptions.hoverRowVisible&&e.rowIndex>-1){const t=this.hostElement.clientWidth,s=this.tableModel.getAreaModel("body").getRowHeight(e.rowIndex),i=e.rowTop+this.areaHeaderCenter.parent.clientHeight-this.scrollTop;this.dom.applyStyle(this.hoverRow,{left:"0",top:i+"px",width:t+"px",height:s+"px",display:"block"})}else this.hideHoverRow()}hideHoverRow(){this.dom.applyStyle(this.hoverRow,{display:"none"})}adjustHoverColumns(e){if(this.tableOptions.hoverColumnVisible&&e.rowIndex>-1){const t=this.hostElement.clientHeight,s=this.tableModel.getColumnWidth(e.columnIndex),i=this.areaBodyWestGeo.width,o=e.columnLeft+this.tableModel.getPadding().left-this.scrollLeft-i;this.dom.applyStyle(this.hoverColumn,{left:o+"px",top:"0px",width:s+"px",height:t+"px",display:"block"})}else this.hideHoverColumn()}hideHoverColumn(){this.dom.applyStyle(this.hoverColumn,{display:"none"})}debounce(e,t=1e3){this.debounceTimeout&&clearTimeout(this.debounceTimeout),this.debounceTimeout=setTimeout(e.bind(this),t)}adjustDraggingColumn(e,t,s){var i,o;if(this.dragging){const l=this.hostElement.clientHeight,n=this.storedColumnWidths[t];if((i=e.originalEvent)!=null&&i.clientX){const c={left:((o=e.originalEvent)==null?void 0:o.clientX)-n/2,width:n,height:l,top:0,index:t};this.dom.applyStyle(this.draggingColumn,{background:"rgba(128,128,128,0.2)",display:"block",overfllow:"clip"}),this.dom.applyStyleInPx(this.draggingColumn,c),s&&this.renderContentOfDraggingColumn(c)}}else this.hideDraggingColumn()}renderContentOfDraggingColumn(e){const t=this.renderContentOfDraggingColumnForArea(e,"header",0);this.renderContentOfDraggingColumnForArea(e,"body",t)}renderContentOfDraggingColumnForArea(e,t,s=0){const i="center",o=this.tableModel.getAreaModel(t),l=o==null?void 0:o.getRowCount();if(l){const n=e.index??0,a=this.draggingColumn;for(let d=0;d<l;d++){const c=s,h=o.getRowHeight(d),p={left:0,width:e.width,height:h,top:c,index:d},g=o.getValueAt(d,n),u=o.getCellRenderer(d,n),S=u?"":`${g}`,f={parent:a,geo:p,rowIndex:d,columnIndex:n,areaIdent:t,sideIdent:i,text:S},m=this.dom.addColumnDiv(f);let w;u&&(w=u.render(m,d,n,t,o,g,this.dom.domService),w&&this.cleanupFunctions[t].push(w));const C=o.getCustomClassesAt(d,n);C.length&&this.dom.addClasses(C,m);const A=this.tableModel.getColumnDef(n);A&&A.classes[t]&&this.dom.addClasses(A.classes[t],m),this.dom.addColumnBorderDivs(this.tableOptions,a,p,t,i);const b=o.getCustomStyleAt(d,n);if(b)for(const y in b)this.dom.setStyle(m,y,b[y]);s=s+h}}return s}hideDraggingColumn(){this.dom.applyStyle(this.draggingColumn,{display:"none"})}renderDragTargetDiv(e,t,s,i,o){const l=this.dom.applyStylePosistionAbsolute(this.dom.createDivWithClass("ge-table-drop-zone",e));return this.dom.setStyle(l,"left",`${t}px`),this.dom.setStyle(l,"top",`${s}px`),this.dom.setStyle(l,"width",`${i}px`),this.dom.setStyle(l,"height",`${o}px`),l}renderSelectedBackgroundDiv(e,t,s,i,o,l,n,a,d,c,h){let p=!1;if(!e&&t&&i.isSelectable(o,l)&&this.getSelectionModel){const g=this.getSelectionModel();if(g){const u=g.getSelectionCount(o,l);p=u>0;for(let S=0;S<u;S++){const f=this.dom.applyStylePosistionAbsolute(this.dom.createDivWithClass(`ge-table-${i.areaIdent}-${s}-selected-range`,n));this.dom.setStyle(f,"left",`${a}px`),this.dom.setStyle(f,"top",`${d}px`),this.dom.setStyle(f,"width",`${c}px`),this.dom.setStyle(f,"height",`${h}px`)}}}return p}renderCell({areaModel:e,areaIdent:t,sideIdent:s,rowIndex:i,columnIndex:o,left:l,top:n,width:a,height:d,parent:c,cellSelected:h,lastRowOfModel:p}){const[g,u]=this.addAndRenderCellDiv({areaModel:e,areaIdent:t,sideIdent:s,rowIndex:i,index:o,left:l,width:a,height:d,top:n,parent:c,lastRowOfModel:p});h&&this.dom.addClass(`ge-table-${t}-${s}-selected-range`,g),u&&this.cleanupFunctions[t].push(u)}renderHeaderCellResizeHandle({rowIndex:e,columnIndex:t,cellLeft:s,cellTop:i,cellWidth:o,cellHeight:l,parent:n}){const a=this.dom.domService,d=this.tableOptions.columnResizeHandleWidthInPx??2,c=a.createElement("div");a.setAttribute(c,"data-col-index",`${t}`),a.setAttribute(c,"data-row-index",`${e}`),a.setAttribute(c,"data-area","header"),a.setAttribute(c,"data-ge-action","resize-column"),a.addClass(c,"ge-table-column-resize-handle"),a.setStyle(c,"display","clip"),a.setStyle(c,"position","absolute"),a.setStyle(c,"cursor","col-resize"),a.setStyle(c,"left",`${s+o-d}px`),a.setStyle(c,"top",`${i}px`),a.setStyle(c,"width",`${d}px`),a.setStyle(c,"height",`${l}px`),a.appendChild(n,c)}}class ct{constructor(e,t){this.columnIndex=e,this.sortState=t}}class dt{constructor(e){this.tableScope=e,this.tableScope.hostElement.addEventListener("change",this.onHostElementChanged.bind(this))}onHostElementChanged(e){if(e.target instanceof HTMLInputElement||e.target instanceof HTMLSelectElement||e.target instanceof HTMLTextAreaElement){const t=e.target,s=t.getAttribute("data-area"),i=t.getAttribute("data-row-index"),o=t.getAttribute("data-col-index");if(s&&i&&o){const l=ne(s),n=Number(i),a=Number(o);this.tableScope.updateModelValueAfterEdit(l,n,a,t.value)}}}}class ht{constructor(e=-1,t=-1){this.rowIndex=e,this.columnIndex=t}}class ce{constructor(e){this.cells=e}static createSingle(e,t){return new ce([new ht(e,t)])}}class pt{constructor(e,t,s,i,o,l,n,a){this.scrollTop=e,this.scrollLeft=t,this.scrollHeight=s,this.scrollWidth=i,this.clientHeight=o,this.clientWidth=l,this.scrollFactorY=n,this.scrollFactorX=a}}class ut{constructor(e){var t,s;this.tableScope=e,(t=this.tableScope.tableOptions)!=null&&t.getSelectionModel&&(this.getSelectionModel=this.tableScope.tableOptions.getSelectionModel),(s=this.tableScope.tableOptions)!=null&&s.getFocusModel&&(this.getFocusModel=this.tableScope.tableOptions.getFocusModel)}onMouseClicked(e,t){var o,l,n,a,d,c,h;let s=!1,i=!1;if(this.getSelectionModel&&this.getFocusModel){const p=this.getSelectionModel(),g=this.getFocusModel();p&&g&&(g.hasFocus(e.rowIndex,e.columnIndex)||(g.setFocus(e.rowIndex,e.columnIndex),this.tableScope.onFocusChanged(g),s=!0),(o=e.originalEvent)!=null&&o.shiftKey||p.hasSelection()&&(p.clear(),s=!0),(l=e.originalEvent)!=null&&l.shiftKey&&this.previousEvt?(p.addSelection(this.createRangeByEvents(e,this.previousEvt)),i=!0,s=!0):(n=e.originalEvent)!=null&&n.altKey&&((a=e.originalEvent)!=null&&a.ctrlKey||(d=e.originalEvent)!=null&&d.metaKey)?(p.removeSelection(E.singleCell(e.rowIndex,e.columnIndex)),i=!0,s=!0):(c=e.originalEvent)!=null&&c.ctrlKey||(h=e.originalEvent)!=null&&h.metaKey?(p.addSelection(E.singleCell(e.rowIndex,e.columnIndex)),i=!0,s=!0):(p.firstClick(e.rowIndex,e.columnIndex),s=!0),this.tableScope.onSelectionChanged(p))}return i?this.previousEvt=void 0:this.previousEvt=e==null?void 0:e.clone(),s}onActionTriggered(e){if(this.getSelectionModel&&this.getFocusModel){const t=this.getSelectionModel(),s=this.getFocusModel();if(t&&s){if(e==="SELECT_ALL")return t.selectAll(),this.tableScope.repaint(),!0;if(e==="DESELECT_ALL")return t.clear(),this.tableScope.repaint(),!0;if(e==="TOGGLE_SELECTION"){const[i,o]=s.getFocus();return t.togglePoint(i,o),this.tableScope.repaint(),!0}}}return!1}createRangeByEvents(e,t){t||(t=e);const s=Math.min(e.rowIndex,t==null?void 0:t.rowIndex),i=Math.max(e.rowIndex,t==null?void 0:t.rowIndex),o=Math.min(e.columnIndex,t==null?void 0:t.columnIndex),l=Math.max(e.columnIndex,t==null?void 0:t.columnIndex);return E.create({rowIndex1:s,columnIndex1:o,rowIndex2:i,columnIndex2:l})}}class ft{get(){return{f2:"START_EDITING",space:"TOGGLE_SELECTION","ctrl+num_add":"SELECT_ALL","ctrl+a":"SELECT_ALL","ctrl+shift+a":"DESELECT_ALL","ctrl+x":"DESELECT_ALL","ctrl+num_subtract":"DESELECT_ALL","meta -":"DESELECT_ALL",arrowup:"NAVIGATE_UP",arrowdown:"NAVIGATE_DOWN",arrowleft:"NAVIGATE_LEFT",arrowright:"NAVIGATE_RIGHT","meta+c":"COPY_2_CLIPBOARD","ctrl+c":"COPY_2_CLIPBOARD"}}}class mt{get(){return{f2:"START_EDITING",space:"TOGGLE_SELECTION","ctrl+num_add":"SELECT_ALL","meta+a":"SELECT_ALL","ctrl+a":"SELECT_ALL","meta+x":"DESELECT_ALL","meta+shift+a":"DESELECT_ALL","ctrl+shift+a":"DESELECT_ALL","ctrl+num_subtract":"DESELECT_ALL","ctrl -":"DESELECT_ALL",arrowup:"NAVIGATE_UP",arrowdown:"NAVIGATE_DOWN",arrowleft:"NAVIGATE_LEFT",arrowright:"NAVIGATE_RIGHT","meta+c":"COPY_2_CLIPBOARD","ctrl+c":"COPY_2_CLIPBOARD"}}}function gt(r){return r.trim().replace(/\+/g," ").replace(/ +/g," ").replace(/⌫/g,"backspace").replace(/↩/g,"enter").replace(/⇧/g,"shift").replace(/⌥/g,"alt").replace(/option/g,"alt").replace(/opt/g,"alt").replace(/⌃/g,"ctrl").replace(/control/g,"ctrl").replace(/command/g,"cmd").replace(/meta/g,"cmd").replace(/escape/g,"esc").replace(/⌘/g,"cmd").replace(/\*/g,"multiply").split(" ").filter(e=>e).filter((e,t,s)=>s.indexOf(e)===t).sort((e,t)=>{const s={cmd:1,ctrl:2,alt:3,shift:4},i=s[e]||5,o=s[t]||5;return i!==o?i-o:e.localeCompare(t)}).join(" ")}function fe(r){let e=r.key.toLowerCase();if(e===" "&&(e="space"),e==="arrowleft"&&(e="left"),e==="arrowright"&&(e="right"),e==="arrowup"&&(e="up"),e==="arrowdown"&&(e="down"),e==="delete"&&r.code==="Delete"&&(e="delete"),e==="backspace"&&(e="backspace"),e==="escape"&&(e="esc"),e==="return"&&(e="enter"),r.code.startsWith("Numpad")){const s=r.code.replace("Numpad","").toLowerCase();s==="add"?e="num_add":s==="subtract"?e="num_subtract":s==="multiply"?e="num_multiply":s==="divide"?e="num_divide":s==="decimal"?e="num_decimal":s==="enter"?e="num_enter":e="num_"+s}r.code.match(/^F\d+$/)&&(e=r.code.toLowerCase()),r.code.match(/^Digit\d+$/)&&(e=r.code.replace(/Digit/g,""));let t="";return r.ctrlKey&&(t+=" ctrl"),r.altKey&&(t+=t+" alt"),r.shiftKey&&(t+=t+" shift"),r.metaKey&&(t+=t+" cmd"),gt(t+" "+e)}class St{constructor(e){this.tableScope=e,this.shortcutActionIdMapping={},this.listener=[],this.listener.push(e),this.init()}addListener(e){this.listener.includes(e)||this.listener.push(e)}init(){var e,t;(t=(e=this.tableScope)==null?void 0:e.tableOptions)!=null&&t.shortcutActionsDisabled?this.isDebug()&&console.debug("ShortcutService skipped."):(this.assignPredefinedSystemShortcutMappings(),Object.assign(this.shortcutActionIdMapping,this.tableScope.tableOptions.shortcutActionIdMapping),this.isDebug()&&console.debug("ShortcutService",this.shortcutActionIdMapping),this.tableScope.hostElement.addEventListener("keydown",this.onKeyDown.bind(this)))}assignPredefinedSystemShortcutMappings(){this.isMacintosh()?Object.assign(this.shortcutActionIdMapping,new mt().get()):Object.assign(this.shortcutActionIdMapping,new ft().get())}isMacintosh(){return navigator.platform.indexOf("Mac")>-1}isDebug(){return this.isLocalhost()}isLocalhost(){return location.hostname==="localhost"||location.hostname==="127.0.0.1"}onKeyDown(e){const t=this.findEntity(e);t&&this.emit(t)&&(e.preventDefault(),e.stopPropagation())}emit(e){this.isDebug()&&console.debug("ShortcutService emit :",e);let t=!1;for(const s of this.listener)s.onActionTriggered(e)&&(t=!0);return t}findEntity(e){const t=fe(e);this.isDebug()&&console.debug("ShortcutService shortcut :",t);for(const s in this.shortcutActionIdMapping)if(fe(e)===t)return this.isDebug()&&console.debug("ShortcutService action :",this.shortcutActionIdMapping[s]),this.shortcutActionIdMapping[s]}getShortcutActionMapping(){return this.shortcutActionIdMapping}}class me{onCheckboxChanged(e){}onContextmenu(e){}onModelChanged(e){}onMouseClicked(e){}onMouseDragging(e){}onMouseDraggingEnd(e){}onMouseMoved(e){}onScroll(e){}onSelectionChanged(e){}onFocusChanged(e){}}class Ae{setStyle(e,t,s){return e.style[t]=s,e}appendText(e,t){const s=this.createText(t);return this.appendChild(e,s),s}addClass(e,t){return t.includes(" ")?t.split(" ").forEach(s=>e.classList.add(s)):e.classList.add(t),e}removeClass(e,t){return t.includes(" ")?t.split(" ").forEach(s=>e.classList.remove(s)):e.classList.remove(t),e}appendChild(e,t){e.appendChild(t)}createElement(e){return document.createElement(e)}createText(e){return document.createTextNode(e)}setAttribute(e,t,s){e.setAttribute(t,s)}}class yt{render(e,t,s,i,o,l,n){if(o.isEditable(t,s)){n.addClass(e,"ge-table-row-input-div");const a=o.getValueAt(t,s);e.innerHTML=`
|
|
12
12
|
<input
|
|
13
13
|
type="text"
|
|
14
|
-
value="${
|
|
14
|
+
value="${a}"
|
|
15
15
|
autofocus
|
|
16
16
|
onfocus="this.setSelectionRange(0, this.value.length)"
|
|
17
17
|
data-listen="change"
|
|
18
|
-
data-area="${
|
|
18
|
+
data-area="${i}"
|
|
19
19
|
data-row-index="${t}"
|
|
20
20
|
data-col-index="${s}"
|
|
21
21
|
data-input-type="text"
|
|
22
22
|
style="width:calc(100% - 8px);height:100%;border:0;padding:0 0 0 8px;"
|
|
23
|
-
class="ge-table-cell-editor-input">`}}}class
|
|
24
|
-
`;let Y=W;class
|
|
25
|
-
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>`,
|
|
26
|
-
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Application>Microsoft Macintosh Excel</Application><DocSecurity>0</DocSecurity><ScaleCrop>false</ScaleCrop><HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>1</vt:i4></vt:variant></vt:vector></HeadingPairs><TitlesOfParts><vt:vector size="1" baseType="lpstr"><vt:lpstr>Sheet1</vt:lpstr></vt:vector></TitlesOfParts><Company></Company><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>16.0300</AppVersion></Properties>`,
|
|
27
|
-
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:creator>${t}</dc:creator><cp:lastModifiedBy>${t}</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">2024-12-13T19:45:08Z</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">2024-12-13T19:45:35Z</dcterms:modified></cp:coreProperties>`,
|
|
28
|
-
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/></Relationships>`,
|
|
29
|
-
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="0E2841"/></a:dk2><a:lt2><a:srgbClr val="E8E8E8"/></a:lt2><a:accent1><a:srgbClr val="156082"/></a:accent1><a:accent2><a:srgbClr val="E97132"/></a:accent2><a:accent3><a:srgbClr val="196B24"/></a:accent3><a:accent4><a:srgbClr val="0F9ED5"/></a:accent4><a:accent5><a:srgbClr val="A02B93"/></a:accent5><a:accent6><a:srgbClr val="4EA72E"/></a:accent6><a:hlink><a:srgbClr val="467886"/></a:hlink><a:folHlink><a:srgbClr val="96607D"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Aptos Display" panose="02110004020202020204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线 Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:majorFont><a:minorFont><a:latin typeface="Aptos Narrow" panose="02110004020202020204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults><a:lnDef><a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style></a:lnDef></a:objectDefaults><a:extraClrSchemeLst/><a:extLst><a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}"><thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{2E142A2C-CD16-42D6-873A-C26D2A0506FA}" vid="{1BDDFF52-6CD6-40A5-AB3C-68EB2F1E4D0A}"/></a:ext></a:extLst></a:theme>`,
|
|
23
|
+
class="ge-table-cell-editor-input">`}}}class bt{constructor(e="none",t="single"){this.selectionType=e,this.selectionMode=t,this.ranges=[],this.negativeRanges=[],this.allSelected=!1,this.silent=!1,this.listenerArr=[]}getEventSelectionChangedListeners(){return this.listenerArr}addEventSelectionChangedListener(e){this.listenerArr.includes(e)||this.listenerArr.push(e)}removeEventSelectionChangedListener(e){const t=this.listenerArr.indexOf(e,0);t>-1&&this.listenerArr.splice(t,1)}fireChangeEvent(){this.silent||this.listenerArr.forEach(e=>e.onSelectionChanged(this))}firstClick(e,t){this.selectionType==="row"?this.addRange(E.singleRow(e)):this.selectionType==="column"&&this.addRange(E.singleColumn(t))}getSelectionCount(e,t){let s=0;for(const i of this.ranges)i.isInRange(e,t)&&s++;return this.allSelected&&s++,this.isInNegativeRange(e,t)&&(s=0),s}isInNegativeRange(e,t){for(const s of this.negativeRanges)if(s.isInRange(e,t))return!0;return!1}getRanges(){return this.ranges}clear(){this.ranges=[],this.negativeRanges=[],this.allSelected=!1,this.fireChangeEvent()}hasSelection(){return this.allSelected||!!this.ranges.length}hasNoSelection(){return!this.hasSelection()}getMergedRowIndices(){const e=new Set;for(const t of this.ranges)for(let s=t.r1;s<=t.r2;s++)!e.has(s)&&!this.isInNegativeRange(s,0)&&e.add(s);return Array.from(e)}selectAll(){this.allSelected=!0,this.fireChangeEvent()}isAllSelected(){return this.allSelected}addSelection(e){this.addRange(e),this.fireChangeEvent()}removeSelection(e){if(this.selectionType==="none")return;let t=e;this.selectionType==="row"?t=E.singleRow(e.r1):this.selectionType==="column"&&(t=E.singleColumn(e.c1)),this.negativeRanges.push(t),this.fireChangeEvent()}togglePoint(e,t){this.getSelectionCount(e,t)>0?this.removeSelection(E.singleCell(e,t)):this.addSelection(E.singleCell(e,t))}isSelected(e,t){return this.getSelectionCount(e,t)>0}addRange(e){this.selectionType!=="none"&&(this.allSelected=!1,this.selectionMode==="single"&&(this.ranges=[]),this.selectionType==="row"?(e.c1=0,e.c2=Number.MAX_SAFE_INTEGER):this.selectionType==="column"?(e.r1=0,e.r2=Number.MAX_SAFE_INTEGER):this.selectionType==="cell"?(e.r2=e.r1,e.c2=e.c1):this.selectionType,this.ranges.push(e),this.fireChangeEvent())}}class wt{constructor(e="none"){this.selectionType=e,this.rowIndex=-1,this.columnIndex=-1,this.changed=!1,this.listenerArr=[]}getEventFocusChangedListeners(){return this.listenerArr}addEventFocusChangedListener(e){this.listenerArr.includes(e)||this.listenerArr.push(e)}removeEventFocusChangedListener(e){const t=this.listenerArr.indexOf(e,0);t>-1&&this.listenerArr.splice(t,1)}fireChangeEvent(){this.listenerArr.forEach(e=>e.onFocusChanged(this))}clearChanged(){this.changed=!1}hasChanged(){return this.changed}clear(){this.rowIndex=-1,this.columnIndex=-1,this.fireChangeEvent()}setFocus(e,t){(this.rowIndex!==e||this.columnIndex!==t)&&(this.rowIndex=e,this.columnIndex=t,this.changed=!0,this.fireChangeEvent())}hasFocus(e,t){return this.rowIndex===e&&this.columnIndex===t}getFocus(){return[this.rowIndex,this.columnIndex]}}class xt{constructor(e=new L("❯","",["gt-table-icon-expanded"]),t=new L("❯","transform: rotate(180deg) translate(-100%, -100%); transform-origin: 0 0;",["ge-table-icon-collapsed"])){this.iconExpanded=e,this.iconCollapsed=t}}const Ct=new bt,vt=new wt("cell");class Ee{constructor(){this.overflowX="auto",this.overflowY="auto",this.horizontalBorderVisible=!0,this.verticalBorderVisible=!0,this.footerSeparatorBorderVisible=!0,this.headerSeparatorBorderVisible=!0,this.fixedEastSeparatorBorderVisible=!0,this.fixedWestSeparatorBorderVisible=!0,this.tableTopBorderVisible=!0,this.tableBottomBorderVisible=!0,this.hoverRowVisible=!0,this.hoverColumnVisible=!0,this.columnsResizable=!0,this.columnsDraggable=!0,this.columnResizeHandleWidthInPx=4,this.defaultRowHeights={header:34,body:34,footer:34},this.footerVerticalSeparator=!1,this.headerToggleExpandCollapseIcons=!1,this.headerVerticalSeparator=!1,this.treeOptions=new Ce,this.headerGroupOptions=new xt,this.showCheckboxWihoutExtraColumn=!1,this.externalFilterFunction=void 0,this.sortedOptions=new ve,this.sortOrder=["asc","desc"],this.shortcutActionsDisabled=!1,this.resizeEventDebounceDelay=500,this.getEditRenderer=(e,t)=>new yt,this.getSelectionModel=()=>Ct,this.getFocusModel=()=>vt}}const W=class W{createContent(e,t,s){return new Promise((i,o)=>{if(t!=null&&t.hasSelection()){const l=this.mergeRanges(t.getRanges());if(l){l.c2=Math.min(l.c2,e.getColumnCount()-1),l.r2=Math.min(l.r2,e.getBodyModel().getRowCount()-1);const n=[];for(let a=l.r1;a<=l.r2;a++){const d=[];for(let c=l.c1;c<=l.c2;c++){const h=t.isSelected(a,c)?e.getBodyModel().getTextValueAt(a,c):"";d.push(h)}n.push(d.join(W.columnSeparatorChar))}return i(n.join(W.rowSeparatorChar))}}if(s){const[l,n]=s.getFocus(),a=e.getBodyModel().getTextValueAt(l,n);return i(a)}o("Cannot copy, neither selection nor focus defined.")})}copyContent(e){return navigator.clipboard.writeText(e)}copyToClipboard(e,t,s){return new Promise((i,o)=>{this.createContent(e,t,s).then(l=>{l&&this.copyContent(l).then(n=>{i(l)}).catch(n=>{o()})}).catch(l=>{o()})})}mergeRanges(e){let t;for(const s of e)t?(t.r1=Math.min(t.r1,s.r1),t.c1=Math.min(t.c1,s.c1),t.r2=Math.max(t.r2,s.r2),t.c2=Math.max(t.c2,s.c2)):t=new E(s.r1,s.c1,s.r2,s.c2);return t}};W.columnSeparatorChar=" ",W.rowSeparatorChar=`
|
|
24
|
+
`;let Y=W;class At{constructor(e,t=500){this.tableScope=e,this.debounceDelay=t,new ResizeObserver(Ke(this.handleResize.bind(this),t)).observe(this.tableScope.hostElement)}handleResize(e){const t=e[0],{width:s}=t.contentRect;this.tableScope.recalcColumnWidths(s)}}class Et{downloadExcel(e,t="file.xlsx",s=""){if(!Array.isArray(e)||e.some(i=>!Array.isArray(i)))throw new Error("Invalid matrix format. Expected a 2D array.");if((t==null?void 0:t.trim())==="")throw new Error("Invalid filename. Filename must be a non-empty string.");try{const i=this.generateBuffer(e,s),o=new Blob([i],{type:"application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"}),l=document.createElement("a");l.href=URL.createObjectURL(o),l.download=t,document.body.appendChild(l),l.click(),document.body.removeChild(l)}catch(i){throw console.error("Error generating Excel file:",i),new Error("Failed to download Excel file.")}}generateMap(e,t=""){const s=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
25
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml"/></Relationships>`,i=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
26
|
+
<Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties" xmlns:vt="http://schemas.openxmlformats.org/officeDocument/2006/docPropsVTypes"><Application>Microsoft Macintosh Excel</Application><DocSecurity>0</DocSecurity><ScaleCrop>false</ScaleCrop><HeadingPairs><vt:vector size="2" baseType="variant"><vt:variant><vt:lpstr>Worksheets</vt:lpstr></vt:variant><vt:variant><vt:i4>1</vt:i4></vt:variant></vt:vector></HeadingPairs><TitlesOfParts><vt:vector size="1" baseType="lpstr"><vt:lpstr>Sheet1</vt:lpstr></vt:vector></TitlesOfParts><Company></Company><LinksUpToDate>false</LinksUpToDate><SharedDoc>false</SharedDoc><HyperlinksChanged>false</HyperlinksChanged><AppVersion>16.0300</AppVersion></Properties>`,o=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
27
|
+
<cp:coreProperties xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><dc:creator>${t}</dc:creator><cp:lastModifiedBy>${t}</cp:lastModifiedBy><dcterms:created xsi:type="dcterms:W3CDTF">2024-12-13T19:45:08Z</dcterms:created><dcterms:modified xsi:type="dcterms:W3CDTF">2024-12-13T19:45:35Z</dcterms:modified></cp:coreProperties>`,l=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
28
|
+
<Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml"/><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/theme" Target="theme/theme1.xml"/><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet1.xml"/><Relationship Id="rId4" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml"/></Relationships>`,n=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
29
|
+
<a:theme xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main" name="Office Theme"><a:themeElements><a:clrScheme name="Office"><a:dk1><a:sysClr val="windowText" lastClr="000000"/></a:dk1><a:lt1><a:sysClr val="window" lastClr="FFFFFF"/></a:lt1><a:dk2><a:srgbClr val="0E2841"/></a:dk2><a:lt2><a:srgbClr val="E8E8E8"/></a:lt2><a:accent1><a:srgbClr val="156082"/></a:accent1><a:accent2><a:srgbClr val="E97132"/></a:accent2><a:accent3><a:srgbClr val="196B24"/></a:accent3><a:accent4><a:srgbClr val="0F9ED5"/></a:accent4><a:accent5><a:srgbClr val="A02B93"/></a:accent5><a:accent6><a:srgbClr val="4EA72E"/></a:accent6><a:hlink><a:srgbClr val="467886"/></a:hlink><a:folHlink><a:srgbClr val="96607D"/></a:folHlink></a:clrScheme><a:fontScheme name="Office"><a:majorFont><a:latin typeface="Aptos Display" panose="02110004020202020204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック Light"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线 Light"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Times New Roman"/><a:font script="Hebr" typeface="Times New Roman"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="MoolBoran"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Times New Roman"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:majorFont><a:minorFont><a:latin typeface="Aptos Narrow" panose="02110004020202020204"/><a:ea typeface=""/><a:cs typeface=""/><a:font script="Jpan" typeface="游ゴシック"/><a:font script="Hang" typeface="맑은 고딕"/><a:font script="Hans" typeface="等线"/><a:font script="Hant" typeface="新細明體"/><a:font script="Arab" typeface="Arial"/><a:font script="Hebr" typeface="Arial"/><a:font script="Thai" typeface="Tahoma"/><a:font script="Ethi" typeface="Nyala"/><a:font script="Beng" typeface="Vrinda"/><a:font script="Gujr" typeface="Shruti"/><a:font script="Khmr" typeface="DaunPenh"/><a:font script="Knda" typeface="Tunga"/><a:font script="Guru" typeface="Raavi"/><a:font script="Cans" typeface="Euphemia"/><a:font script="Cher" typeface="Plantagenet Cherokee"/><a:font script="Yiii" typeface="Microsoft Yi Baiti"/><a:font script="Tibt" typeface="Microsoft Himalaya"/><a:font script="Thaa" typeface="MV Boli"/><a:font script="Deva" typeface="Mangal"/><a:font script="Telu" typeface="Gautami"/><a:font script="Taml" typeface="Latha"/><a:font script="Syrc" typeface="Estrangelo Edessa"/><a:font script="Orya" typeface="Kalinga"/><a:font script="Mlym" typeface="Kartika"/><a:font script="Laoo" typeface="DokChampa"/><a:font script="Sinh" typeface="Iskoola Pota"/><a:font script="Mong" typeface="Mongolian Baiti"/><a:font script="Viet" typeface="Arial"/><a:font script="Uigh" typeface="Microsoft Uighur"/><a:font script="Geor" typeface="Sylfaen"/><a:font script="Armn" typeface="Arial"/><a:font script="Bugi" typeface="Leelawadee UI"/><a:font script="Bopo" typeface="Microsoft JhengHei"/><a:font script="Java" typeface="Javanese Text"/><a:font script="Lisu" typeface="Segoe UI"/><a:font script="Mymr" typeface="Myanmar Text"/><a:font script="Nkoo" typeface="Ebrima"/><a:font script="Olck" typeface="Nirmala UI"/><a:font script="Osma" typeface="Ebrima"/><a:font script="Phag" typeface="Phagspa"/><a:font script="Syrn" typeface="Estrangelo Edessa"/><a:font script="Syrj" typeface="Estrangelo Edessa"/><a:font script="Syre" typeface="Estrangelo Edessa"/><a:font script="Sora" typeface="Nirmala UI"/><a:font script="Tale" typeface="Microsoft Tai Le"/><a:font script="Talu" typeface="Microsoft New Tai Lue"/><a:font script="Tfng" typeface="Ebrima"/></a:minorFont></a:fontScheme><a:fmtScheme name="Office"><a:fillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:lumMod val="110000"/><a:satMod val="105000"/><a:tint val="67000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="103000"/><a:tint val="73000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="105000"/><a:satMod val="109000"/><a:tint val="81000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:satMod val="103000"/><a:lumMod val="102000"/><a:tint val="94000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:satMod val="110000"/><a:lumMod val="100000"/><a:shade val="100000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:lumMod val="99000"/><a:satMod val="120000"/><a:shade val="78000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:fillStyleLst><a:lnStyleLst><a:ln w="12700" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="19050" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln><a:ln w="25400" cap="flat" cmpd="sng" algn="ctr"><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:prstDash val="solid"/><a:miter lim="800000"/></a:ln></a:lnStyleLst><a:effectStyleLst><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst/></a:effectStyle><a:effectStyle><a:effectLst><a:outerShdw blurRad="57150" dist="19050" dir="5400000" algn="ctr" rotWithShape="0"><a:srgbClr val="000000"><a:alpha val="63000"/></a:srgbClr></a:outerShdw></a:effectLst></a:effectStyle></a:effectStyleLst><a:bgFillStyleLst><a:solidFill><a:schemeClr val="phClr"/></a:solidFill><a:solidFill><a:schemeClr val="phClr"><a:tint val="95000"/><a:satMod val="170000"/></a:schemeClr></a:solidFill><a:gradFill rotWithShape="1"><a:gsLst><a:gs pos="0"><a:schemeClr val="phClr"><a:tint val="93000"/><a:satMod val="150000"/><a:shade val="98000"/><a:lumMod val="102000"/></a:schemeClr></a:gs><a:gs pos="50000"><a:schemeClr val="phClr"><a:tint val="98000"/><a:satMod val="130000"/><a:shade val="90000"/><a:lumMod val="103000"/></a:schemeClr></a:gs><a:gs pos="100000"><a:schemeClr val="phClr"><a:shade val="63000"/><a:satMod val="120000"/></a:schemeClr></a:gs></a:gsLst><a:lin ang="5400000" scaled="0"/></a:gradFill></a:bgFillStyleLst></a:fmtScheme></a:themeElements><a:objectDefaults><a:lnDef><a:spPr/><a:bodyPr/><a:lstStyle/><a:style><a:lnRef idx="2"><a:schemeClr val="accent1"/></a:lnRef><a:fillRef idx="0"><a:schemeClr val="accent1"/></a:fillRef><a:effectRef idx="1"><a:schemeClr val="accent1"/></a:effectRef><a:fontRef idx="minor"><a:schemeClr val="tx1"/></a:fontRef></a:style></a:lnDef></a:objectDefaults><a:extraClrSchemeLst/><a:extLst><a:ext uri="{05A4C25C-085E-4340-85A3-A5531E510DB2}"><thm15:themeFamily xmlns:thm15="http://schemas.microsoft.com/office/thememl/2012/main" name="Office Theme" id="{2E142A2C-CD16-42D6-873A-C26D2A0506FA}" vid="{1BDDFF52-6CD6-40A5-AB3C-68EB2F1E4D0A}"/></a:ext></a:extLst></a:theme>`,a=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
30
30
|
<sst xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" count="3" uniqueCount="3"><si><t>a</t></si><si><t>b</t></si><si><t>c</t></si></sst>`,d=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
31
31
|
<styleSheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac x16r2 xr" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:x16r2="http://schemas.microsoft.com/office/spreadsheetml/2015/02/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision"><fonts count="1" x14ac:knownFonts="1"><font><sz val="12"/><color theme="1"/><name val="Aptos Narrow"/><family val="2"/><scheme val="minor"/></font></fonts><fills count="2"><fill><patternFill patternType="none"/></fill><fill><patternFill patternType="gray125"/></fill></fills><borders count="1"><border><left/><right/><top/><bottom/><diagonal/></border></borders><cellStyleXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0"/></cellStyleXfs><cellXfs count="1"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0"/></cellXfs><cellStyles count="1"><cellStyle name="Normal" xfId="0" builtinId="0"/></cellStyles><dxfs count="0"/><tableStyles count="0" defaultTableStyle="TableStyleMedium2" defaultPivotStyle="PivotStyleLight16"/><extLst><ext uri="{EB79DEF2-80B8-43e5-95BD-54CBDDF9020C}" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main"><x14:slicerStyles defaultSlicerStyle="SlicerStyleLight1"/></ext><ext uri="{9260A510-F301-46a8-8635-F512D64BE5F5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:timelineStyles defaultTimelineStyle="TimeSlicerStyleLight1"/></ext></extLst></styleSheet>`,c=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
32
32
|
<workbook xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x15 xr xr6 xr10 xr2" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr6="http://schemas.microsoft.com/office/spreadsheetml/2016/revision6" xmlns:xr10="http://schemas.microsoft.com/office/spreadsheetml/2016/revision10" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2"><fileVersion appName="xl" lastEdited="7" lowestEdited="7" rupBuild="11207"/><workbookPr defaultThemeVersion="202300"/><mc:AlternateContent xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"><mc:Choice Requires="x15"><x15ac:absPath url="/" xmlns:x15ac="http://schemas.microsoft.com/office/spreadsheetml/2010/11/ac"/></mc:Choice></mc:AlternateContent><xr:revisionPtr revIDLastSave="0" documentId="8_{292BF245-1F37-B045-B1A5-26C42FB62779}" xr6:coauthVersionLast="47" xr6:coauthVersionMax="47" xr10:uidLastSave="{00000000-0000-0000-0000-000000000000}"/><bookViews><workbookView xWindow="11340" yWindow="5060" windowWidth="28040" windowHeight="17440" xr2:uid="{858B8D3F-6246-774D-8903-6D38687B7BC6}"/></bookViews><sheets><sheet name="Sheet1" sheetId="1" r:id="rId1"/></sheets><calcPr calcId="181029"/><extLst><ext uri="{140A7094-0E35-4892-8432-C4D2E57EDEB5}" xmlns:x15="http://schemas.microsoft.com/office/spreadsheetml/2010/11/main"><x15:workbookPr chartTrackingRefBase="1"/></ext><ext uri="{B58B0392-4F1F-4190-BB64-5DF3571DCE5F}" xmlns:xcalcf="http://schemas.microsoft.com/office/spreadsheetml/2018/calcfeatures"><xcalcf:calcFeatures><xcalcf:feature name="microsoft.com:RD"/><xcalcf:feature name="microsoft.com:Single"/><xcalcf:feature name="microsoft.com:FV"/><xcalcf:feature name="microsoft.com:CNMTM"/><xcalcf:feature name="microsoft.com:LET_WF"/><xcalcf:feature name="microsoft.com:LAMBDA_WF"/><xcalcf:feature name="microsoft.com:ARRAYTEXT_WF"/></xcalcf:calcFeatures></ext></extLst></workbook>`,h=`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
33
|
-
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/xl/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/><Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/></Types>`,p=new Map;return p.set("_rels/.rels",s),p.set("docProps/app.xml",
|
|
33
|
+
<Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml"/><Default Extension="xml" ContentType="application/xml"/><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml"/><Override PartName="/xl/worksheets/sheet1.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml"/><Override PartName="/xl/theme/theme1.xml" ContentType="application/vnd.openxmlformats-officedocument.theme+xml"/><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml"/><Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml"/><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml"/><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml"/></Types>`,p=new Map;return p.set("_rels/.rels",s),p.set("docProps/app.xml",i),p.set("docProps/core.xml",o),p.set("xl/_rels/workbook.xml.rels",l),p.set("xl/theme/theme1.xml",n),p.set("xl/worksheets/sheet1.xml",this.getX1WorksheetsSheet1Xml(e)),p.set("xl/sharedStrings.xml",a),p.set("xl/styles.xml",d),p.set("xl/workbook.xml",c),p.set("[Content_Types].xml",h),p}getX1WorksheetsSheet1Xml(e){const t=[];t.push(`<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
34
34
|
<worksheet xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main" xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac xr xr2 xr3" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns:xr="http://schemas.microsoft.com/office/spreadsheetml/2014/revision" xmlns:xr2="http://schemas.microsoft.com/office/spreadsheetml/2015/revision2" xmlns:xr3="http://schemas.microsoft.com/office/spreadsheetml/2016/revision3" xr:uid="{E15F8FC4-4D40-434C-921A-3D9CFAAA2865}">
|
|
35
35
|
<dimension ref="A1:B3"/>
|
|
36
36
|
<sheetViews>
|
|
37
37
|
<sheetView tabSelected="1" workbookViewId="0"/></sheetViews>
|
|
38
38
|
<sheetFormatPr baseColWidth="10" defaultRowHeight="16" x14ac:dyDescent="0.2"/>
|
|
39
|
-
<sheetData>`);for(let s=0;s<e.length;s++){const
|
|
40
|
-
`)}escapeXml(e){return e==null?"":String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}getCellAddress(e,t){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";let o="";for(;t>=0;)o=s[t%26]+o,t=Math.floor(t/26)-1;return`${o}${e+1}`}createZip(e){const t=[];let s=0;const o=[];e.forEach((h,p)=>{const m=new TextEncoder().encode(p),g=new TextEncoder().encode(h),b=new Uint8Array(30+m.length),f=new DataView(b.buffer);b.set([80,75,3,4],0),f.setUint16(4,20,!0),f.setUint16(6,0,!0),f.setUint16(8,0,!0),f.setUint16(10,0,!0),f.setUint16(12,0,!0),f.setUint32(14,0,!0),f.setUint32(18,g.length,!0),f.setUint32(22,g.length,!0),f.setUint16(26,m.length,!0),f.setUint16(28,0,!0),b.set(m,30),t.push(b,g),o.push({path:p,offset:s,contentSize:g.length}),s+=b.length+g.length});const i=s;o.forEach(h=>{const p=new TextEncoder().encode(h.path),m=new Uint8Array(46+p.length),g=new DataView(m.buffer);m.set([80,75,1,2],0),g.setUint16(4,20,!0),g.setUint16(6,20,!0),g.setUint16(8,0,!0),g.setUint16(10,0,!0),g.setUint16(12,0,!0),g.setUint16(14,0,!0),g.setUint32(16,0,!0),g.setUint32(20,h.contentSize,!0),g.setUint32(24,h.contentSize,!0),g.setUint16(28,p.length,!0),g.setUint16(30,0,!0),g.setUint16(32,0,!0),g.setUint16(34,0,!0),g.setUint16(36,0,!0),g.setUint32(38,0,!0),g.setUint32(42,h.offset,!0),m.set(p,46),t.push(m),s+=m.length});const r=new Uint8Array(22),a=new DataView(r.buffer);r.set([80,75,5,6],0),a.setUint16(4,0,!0),a.setUint16(6,0,!0),a.setUint16(8,o.length,!0),a.setUint16(10,o.length,!0),a.setUint32(12,s-i,!0),a.setUint32(16,i,!0),a.setUint16(20,0,!0),t.push(r);const n=t.reduce((h,p)=>h+p.length,0),d=new Uint8Array(n);let c=0;for(const h of t)d.set(h,c),c+=h.length;return d}generateBuffer(e,t=""){const s=this.generateMap(e,t);return this.createZip(s)}}class pe extends gt{constructor(e,t,s,o,i,r=new Y,a=new Tt){var c;if(super(e,t,new et(s),o),this.eventListener=i,this.copyService=r,this.excelService=a,this.licenseManager=P.getInstance(),this.selectionService=new bt(this),this.api=new rt(this),this.mouseStartAction="",this.mouseStartWidth=-1,this.mouseStartColumnIndex=-1,this.dragFrom=-1,this.dragTo=-1,this.lastDragFrom=-1,this.lastDragTo=-1,this.firstDraggingRendering=!0,this.lastContextmenu=Date.now(),t.setTableScope(this),i||(this.eventListener=new be),(c=this.tableOptions)!=null&&c.autoRestoreOptions){const h=this.tableOptions.autoRestoreOptions,p=h.getStorageKeyFn;p&&(h.autoRestoreScrollPosition&&(this.storeScrollPosStateService=new lt(p)),h.autoRestoreCollapsedExpandedState&&(this.storeStateCollapsedExpandService=new nt(p)),h.autoRestoreSortingState&&(this.storeSortingService=new ct(p)))}this.mouseHandler=new st(this),this.inputHandler=new ut(this),this.resizeHandler=new Mt(this,o.resizeEventDebounceDelay),this.shortcutService=new xt(this),this.shortcutService.addListener(this.selectionService);const n=this.getSelectionModel?this.getSelectionModel():void 0;n&&n.addEventSelectionChangedListener(this);const d=this.getFocusModel?this.getFocusModel():void 0;d&&d.addEventFocusChangedListener(this)}static create(e,t,s=new Fe,o=new be,i=new Te,r=new Y){return new pe(e,t,i,s,o,r)}onActionTriggered(e){if(e==="NAVIGATE_DOWN"&&this.changeFocusCell(0,1)||e==="NAVIGATE_UP"&&this.changeFocusCell(0,-1)||e==="NAVIGATE_LEFT"&&this.changeFocusCell(-1,0)||e==="NAVIGATE_RIGHT"&&this.changeFocusCell(1,0))return!0;if(e==="START_EDITING"&&this.getFocusModel){const t=this.getFocusModel();if(t){const[s,o]=t.getFocus();this.tableModel.getBodyModel().isEditable(s,o)&&(this.clearSelection(),this.initRenderEditor(s,o))}return!0}if(e==="COPY_2_CLIPBOARD"){const t=this.getSelectionModel?this.getSelectionModel():void 0,s=this.getFocusModel?this.getFocusModel():void 0;this.copyService.createContent(this.tableModel,t,s).then(o=>this.copyService.copyContent(o))}return!1}updateModelValueAfterEdit(e,t,s,o){e==="body"&&this.tableModel.getAreaModel(e).setValue(t,s,o)&&(this.resetEditorRenderer(),this.repaint(),this.eventListener.onModelChanged(he.createSingle(t,s)),this.hostElement.focus())}getApi(){return this.api}firstInit(){var e;return this.tableModel.init(),(e=this.tableOptions)!=null&&e.externalFilterFunction&&this.externalFilterChanged(!1),this.autoRestoreCollapsedExpandedState(),this.autoRestoreSortingState(),this.resetSizeOfWrapperDiv(),this.adjustContainersAndRows(),this.autoRestoreScrollPosition(),this}createGeMouseEvent(e){const t=new ne;if(t.originalEvent=e,e){const s=e.target;if([t.areaIdent,t.sideIdent]=this.getAreaAndSideIdentByAttr(s),t.rowIndex=this.getNumberByAttr(s,"data-row-index"),t.columnIndex=this.getNumberByAttr(s,"data-col-index"),t.action=this.getStringByAttr(s,"data-ge-action"),t.areaIdent){const o=this.tableModel.getAreaModel(t.areaIdent);t.rowTop=o.getYPosByRowIndex(t.rowIndex)}if(t.columnLeft=this.tableModel.getXPosByColumnIndex(t.columnIndex),e.ctrlKey&&e.altKey){const o=e.clientY-this.hostElement.offsetTop-this.areaHeaderCenter.parent.clientHeight,i=e.clientX-this.hostElement.offsetLeft-this.areaBodyWestGeo.width;this.debugOnce(i,o)}}return t}onMouseDown(e){e.columnIndex>-1&&e.action&&["resize-column","drag-column"].includes(e.action)&&(this.mouseStartWidth=this.tableModel.getColumnWidth(e.columnIndex),this.mouseStartAction=e.action,this.mouseStartColumnIndex=e.columnIndex,this.mouseStartAction==="drag-column"&&(this.firstDraggingRendering=!0,this.dragFrom=this.mouseStartColumnIndex))}mouseDraggingOnFrame(e,t){this.eventListener.onMouseDragging(e),this.mouseEvent=e,this.mouseStartColumnIndex>-1&&this.mouseStartAction==="resize-column"&&this.tableOptions.columnsResizable?this.resizeColumn(e):this.mouseStartAction==="drag-column"&&e.columnIndex>-1&&this.tableOptions.columnsDraggable&&(this.draggingTargetColumnIndex=e.columnIndex,this.dragTo=this.draggingTargetColumnIndex,this.dragFrom>-1&&this.dragTo>-1&&this.dragFrom!==this.dragTo&&(this.lastDragFrom===this.dragTo&&this.lastDragTo===this.dragFrom||(this.tableModel.changeColumnOrder(this.dragFrom,this.dragTo),this.lastDragFrom=this.dragFrom,this.lastDragTo=this.dragTo,this.dragFrom=this.dragTo,this.resetSizeOfWrapperDiv(),this.adjustContainersAndRows())),t&&(this.adjustDraggingColumn(e,t.columnIndex,this.firstDraggingRendering),this.firstDraggingRendering=!1),this.repaint())}mouseDraggingEndOnFrame(e){this.eventListener.onMouseDraggingEnd(e),this.draggingTargetColumnIndex=-1,this.mouseStartAction==="resize-column"?this.resizeColumn(e):this.mouseStartAction==="drag-column"&&(this.hideDraggingColumn(),this.repaint()),this.mouseStartWidth=-1,this.mouseStartColumnIndex=-1,this.dragFrom=-1,this.dragTo=-1,this.firstDraggingRendering=!0,this.mouseStartAction=""}mouseMove(e){this.eventListener.onMouseMoved(e),this.adjustHoverRows(e),this.adjustHoverColumns(e)}contextmenu(e){var s,o;const t=Date.now();if(t-this.lastContextmenu<50){this.lastContextmenu=t,(s=e.originalEvent)==null||s.preventDefault(),(o=e.originalEvent)==null||o.stopImmediatePropagation();return}this.lastContextmenu=t,this.eventListener.onContextmenu(e)}toggleExpandCollapseAll(e=!0){var s;const t=this.tableModel.getBodyModel();le(t)&&(t.toggleExpandCollapseAll(e),this.repaint(),(s=this.storeStateCollapsedExpandService)==null||s.collapsedStateAll(e))}toggleRowCheckbox(e,t,s){var n;const o=this.tableModel.getAreaModel(s),i=o.isRowChecked(e),r=i===void 0||i==="semi"||i==="none";o.setRowChecked(e,r),this.repaint();const a=(n=o.rowSelectionModel)==null?void 0:n.getCheckedRows();this.eventListener.onCheckboxChanged(a||[])}onMouseClicked(e,t){let s=this.selectionService.onMouseClicked(e,t);if(!s&&this.getFocusModel){this.resetEditorRenderer();const o=this.getFocusModel();o&&(s=o.hasChanged(),o.clearChanged())}return s}debounceRepaint(){this.debounce(this.repaint.bind(this),1)}publishGeMouseEvent(e){this.eventListener.onMouseClicked(e)}onFocusChanged(e){this.eventListener.onFocusChanged(e)}onSelectionChanged(e){this.eventListener.onSelectionChanged(e)}externalFilterChanged(e=!0){const t=this.tableOptions.externalFilterFunction;t&&(e&&this.clearSelectionModel(),this.tableModel.externalFilterChanged(t),this.scrollViewport.scrollTo(0,0),this.tableModel.recalcHeightAndPadding(),this.resetSizeOfWrapperDiv(),this.repaint())}onHeaderDblClicked(e,t,s){var i,r;const o=this.tableModel.getColumnDef(s);if(o!=null&&o.sortable&&o.sortable()){e.preventDefault(),e.stopPropagation();const a=o.sortStatesOrder?o.sortStatesOrder:this.tableOptions.sortOrder,n=o.sortState??"",d=a[(a.indexOf(n)+1)%a.length],c=new ft(s,d);this.tableModel.doSort([c])&&((i=this.tableModel.getColumnDefs())==null||i.forEach(p=>p.sortState=""),o.sortState=d),this.repaint(),(r=this.storeSortingService)==null||r.setSortItems([c])}}scrollToPixel(e,t){this.scrollViewport.scrollTo(e,t)}scrollToIndex(e,t){const o=this.tableModel.getAreaModel("body").getYPosByRowIndex(t);this.scrollToPixel(0,o)}setSelectionModel(e,t=!1){const s=()=>e;this.tableOptions.getSelectionModel=s,this.getSelectionModel=s,this.selectionService.getSelectionModel=s,t&&this.repaint()}toggleHeaderGroup(e){const t=this.tableModel.getAreaModel("header");"columnDefs"in this.tableModel&&(this.tableModel.columnDefs=t.toggleHeaderGroup(e),console.info("####### !!!!!! *******, this.tableModel.columnDefs")),this.firstInit()}selectionModel(){if(this!=null&&this.getSelectionModel)return this.getSelectionModel()}focusModel(){if(this!=null&&this.getFocusModel)return this.getFocusModel()}setDragging(e){this.dragging=e,this.dragging?(this.storeColumnWidths(),this.lastDragFrom=-1,this.lastDragTo=-1):this.storedColumnWidths=[]}changeFocusCell(e,t){if(!this.isEditing()&&this.getFocusModel){const s=this.getFocusModel();if(s){const[o,i]=s.getFocus();return s.setFocus(o+t,i+e),this.repaint(),!0}}return!1}resizeColumn(e){this.tableModel.setColumnWidth(this.mouseStartColumnIndex,this.mouseStartWidth+e.draggingX),this.tableModel.recalcPadding(),this.resetSizeOfWrapperDiv(),this.adjustContainersAndRows()}clearSelectionModel(){var e;this.getSelectionModel&&((e=this.getSelectionModel())==null||e.clear())}debugOnce(e,t){var s;console.clear(),console.info("this.hostElement.offsetTop",this.hostElement.offsetTop),console.info("this.hostElement.scrollHeight",this.hostElement.scrollHeight),console.info("this.scrollViewportTop",this.scrollTop),console.info("this.areaHeaderCenter.parent.clientHeight",this.areaHeaderCenter.parent.clientHeight),console.info("bodyY",t),console.info("bodyX",e),console.info("rows",this.firstVisibleRowIndex),console.info(""),console.info("this.tableModel",this.tableModel),console.info(""),console.info("this.mouseMoveEvent.clientX",(s=this.mouseHandler.mouseEvent)==null?void 0:s.clientX),console.info("this.hostElement.offsetLeft",this.hostElement.offsetLeft),console.info("this.areaBodyWestGeo.width",this.areaBodyWestGeo.width)}autoRestoreScrollPosition(){var e;if((e=this.tableOptions)!=null&&e.autoRestoreOptions&&this.storeScrollPosStateService&&this.tableOptions.autoRestoreOptions.autoRestoreScrollPosition){const s=this.storeScrollPosStateService.getScrollOffset();s&&this.scrollViewport.scrollTo(...s)}}autoRestoreSortingState(){var e,t;if((t=(e=this.tableOptions)==null?void 0:e.autoRestoreOptions)!=null&&t.autoRestoreSortingState&&this.storeSortingService){const s=this.storeSortingService.getSortItems();s!=null&&s.length&&this.tableModel.getBodyModel().doSort(s)}}autoRestoreCollapsedExpandedState(){var e,t;if((t=(e=this.tableOptions)==null?void 0:e.autoRestoreOptions)!=null&&t.getRowId&&this.storeStateCollapsedExpandService){const s=this.tableOptions.autoRestoreOptions,o=s.getRowId;if(s.autoRestoreCollapsedExpandedState&&o){const i=this.storeStateCollapsedExpandService.collapsedExpandedStateGet(),r=this.tableModel.getAreaModel("body");if(le(r)){const a=r,n=r.getRowCount();for(let d=0;d<n;d++){const c=r.getRowByIndex(d);if(c)if(i.allExpanded)c.expanded=!0;else if(i.allCollapsed)c.expanded=!1;else{const h=o(c.data);i.mode==="expanded"?c.expanded=this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h):i.mode==="collapsed"&&(c.expanded=!this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h))}}a.recalcVisibleTreeRows()}}}}calcAutoColumnWidths(){const e=this.tableModel.getBodyModel(),t=this.tableModel.getColumnCount(),s=(e==null?void 0:e.getRowCount())??0;if(!e)return console.warn("Body model is not available."),[];const o=new Array(t).fill(0);for(let i=0;i<s;i++)for(let r=0;r<t;r++){const a=e.getValueAt(i,r),n=(a==null?void 0:a.toString().length)||0;n>o[r]&&(o[r]=n)}return o.map(i=>Math.max(i*10,50))}setColumnWidth(e,t){this.tableModel.setColumnWidth(e,t)}autoResizeColumns(e=!0){const t=this.calcAutoColumnWidths();for(let s=0;s<t.length;s++){const o=t[s];this.tableModel.setColumnWidth(s,o)}e&&this.recalcWrappers()}recalcWrappers(){this.tableModel.recalcPadding(),this.resetSizeOfWrapperDiv(),this.adjustContainersAndRows()}reSort(){var t;let e=((t=this.storeSortingService)==null?void 0:t.getSortItems())??[];this.tableModel.doSort(e)}sort(e){this.tableModel.sort(e)}ensureRowIsVisible(e){const t=this.getFirstFullVisibleRowIndex(),s=this.getLastFullVisibleRowIndex(),o=this.getDisplayedRowCount();return e<t?(this.scrollToIndex(0,e),!0):e>s?(this.scrollToIndex(0,e-o+1),!0):!1}}const J=class J{};J.themes=["light","combat","paper","blackboard"],J.vars={light:`html[data-theme="light"] {
|
|
41
|
-
--ge-table-bg: rgba(255,255,255, 0.5);
|
|
42
|
-
--ge-table-header-west-bg: rgba(233, 233, 233, 0.5);
|
|
43
|
-
--ge-table-header-center-bg: rgba(233, 233, 233, 0.5);
|
|
44
|
-
--ge-table-header-east-bg: rgba(233, 233, 233, 0.5);
|
|
45
|
-
--ge-table-header-west-text: #000;
|
|
46
|
-
--ge-table-header-center-text: #000;
|
|
47
|
-
--ge-table-header-east-text: #000;
|
|
48
|
-
--ge-table-header-west-horizontal-border: #ddd;
|
|
49
|
-
--ge-table-header-west-vertical-border: #ccc;
|
|
50
|
-
--ge-table-header-center-horizontal-border: #ddd;
|
|
51
|
-
--ge-table-header-center-vertical-border: #ccc;
|
|
52
|
-
--ge-table-header-east-horizontal-border: #ddd;
|
|
53
|
-
--ge-table-header-east-vertical-border: #ccc;
|
|
54
|
-
--ge-table-body-west-bg: rgba(233, 233, 233, 0.5);
|
|
55
|
-
--ge-table-body-center-bg: rgba(255,255,255, 0.5);
|
|
56
|
-
--ge-table-body-east-bg: rgba(233, 233, 233, 0.5);
|
|
57
|
-
--ge-table-body-west-text: #000;
|
|
58
|
-
--ge-table-body-center-text: #000;
|
|
59
|
-
--ge-table-body-east-text: #000;
|
|
60
|
-
--ge-table-body-west-horizontal-border: #ddd;
|
|
61
|
-
--ge-table-body-west-vertical-border: #ccc;
|
|
62
|
-
--ge-table-body-center-horizontal-border: #bbb;
|
|
63
|
-
--ge-table-body-center-vertical-border: #ddd;
|
|
64
|
-
--ge-table-body-east-horizontal-border: #ddd;
|
|
65
|
-
--ge-table-body-east-vertical-border: #ccc;
|
|
66
|
-
--ge-table-body-west-selected-range-bg: rgba(0, 152, 219, 0.4);
|
|
67
|
-
--ge-table-body-center-selected-range-bg: rgba(0, 152, 219, 0.4);
|
|
68
|
-
--ge-table-body-east-selected-range-bg: rgba(0, 152, 219, 0.4);
|
|
69
|
-
--ge-table-body-west-selected-range-text: #000;
|
|
70
|
-
--ge-table-body-center-selected-range-text: #000;
|
|
71
|
-
--ge-table-body-east-selected-range-text: #000;
|
|
72
|
-
--ge-table-footer-west-bg: rgba(233, 233, 233, 0.5);
|
|
73
|
-
--ge-table-footer-center-bg: rgba(233, 233, 233, 0.5);
|
|
74
|
-
--ge-table-footer-east-bg: rgba(233, 233, 233, 0.5);
|
|
75
|
-
--ge-table-footer-west-text: #000;
|
|
76
|
-
--ge-table-footer-center-text: #000;
|
|
77
|
-
--ge-table-footer-east-text: #000;
|
|
78
|
-
--ge-table-footer-west-horizontal-border: #ddd;
|
|
79
|
-
--ge-table-footer-west-vertical-border: #ccc;
|
|
80
|
-
--ge-table-footer-center-horizontal-border: #ddd;
|
|
81
|
-
--ge-table-footer-center-vertical-border: #ccc;
|
|
82
|
-
--ge-table-footer-east-horizontal-border: #ddd;
|
|
83
|
-
--ge-table-footer-east-vertical-border: #ccc;
|
|
84
|
-
--ge-table-border: #ccc;
|
|
85
|
-
--ge-table-row-odd-bg: transparent;
|
|
86
|
-
--ge-table-row-even-bg: transparent;
|
|
87
|
-
--ge-table-column-odd-bg: transparent;
|
|
88
|
-
--ge-table-column-even-bg: transparent;
|
|
89
|
-
--ge-table-hover-column-bg: rgba(0, 224, 255, 0.27);
|
|
90
|
-
--ge-table-hover-row-bg: rgba(0, 224, 255, 0.27);
|
|
91
|
-
--ge-table-focus-border: rgb(0, 255, 255);
|
|
92
|
-
--ge-table-color-error-text: #e00034;
|
|
93
|
-
--ge-table-tree-arrow-collapsed-color: #e00034;
|
|
94
|
-
--ge-table-column-resize-handle-border: rgb(0, 255, 255);
|
|
95
|
-
--ge-table-dragged-col-div-bg: lightcyan;
|
|
96
|
-
--ge-table-drop-zone-bg: rgba(244, 255, 242, 0.6);
|
|
97
|
-
}`,combat:`html[data-theme="combat"] {
|
|
98
|
-
--ge-table-bg: #101010;
|
|
99
|
-
--ge-table-header-west-bg: #101010;
|
|
100
|
-
--ge-table-header-center-bg: #101010;
|
|
101
|
-
--ge-table-header-east-bg: #101010;
|
|
102
|
-
--ge-table-header-west-text: oklch(100% 0 0);
|
|
103
|
-
--ge-table-header-center-text: oklch(100% 0 0);
|
|
104
|
-
--ge-table-header-east-text: oklch(100% 0 0);
|
|
105
|
-
--ge-table-header-west-horizontal-border: oklch(100% 0 0 / 0%);
|
|
106
|
-
--ge-table-header-west-vertical-border: oklch(100% 0 0 / 0%);
|
|
107
|
-
--ge-table-header-center-horizontal-border: oklch(100% 0 0 / 0%);
|
|
108
|
-
--ge-table-header-center-vertical-border: oklch(100% 0 0 / 0%);
|
|
109
|
-
--ge-table-header-east-horizontal-border: oklch(100% 0 0 / 0%);
|
|
110
|
-
--ge-table-header-east-vertical-border: oklch(100% 0 0 / 0%);
|
|
111
|
-
--ge-table-body-west-bg: #101010;
|
|
112
|
-
--ge-table-body-center-bg: #101010;
|
|
113
|
-
--ge-table-body-east-bg: #101010;
|
|
114
|
-
--ge-table-body-west-text: #b6b4b4;
|
|
115
|
-
--ge-table-body-center-text: #b6b4b4;
|
|
116
|
-
--ge-table-body-east-text: #b6b4b4;
|
|
117
|
-
--ge-table-body-west-horizontal-border: oklch(100% 0 0 / 0%);
|
|
118
|
-
--ge-table-body-west-vertical-border: oklch(100% 0 0 / 0%);
|
|
119
|
-
--ge-table-body-center-horizontal-border: oklch(100% 0 0 / 0%);
|
|
120
|
-
--ge-table-body-center-vertical-border: oklch(100% 0 0 / 0%);
|
|
121
|
-
--ge-table-body-east-horizontal-border: oklch(100% 0 0 / 0%);
|
|
122
|
-
--ge-table-body-east-vertical-border: oklch(100% 0 0 / 0%);
|
|
123
|
-
--ge-table-body-west-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
|
|
124
|
-
--ge-table-body-center-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
|
|
125
|
-
--ge-table-body-east-selected-range-bg: oklch(20% 0.2 39.6 / 37%);
|
|
126
|
-
--ge-table-body-west-selected-range-text: #f00032;
|
|
127
|
-
--ge-table-body-center-selected-range-text: #f00032;
|
|
128
|
-
--ge-table-body-east-selected-range-text: #f00032;
|
|
129
|
-
--ge-table-footer-west-bg: #101010;
|
|
130
|
-
--ge-table-footer-center-bg: #101010;
|
|
131
|
-
--ge-table-footer-east-bg: #101010;
|
|
132
|
-
--ge-table-footer-west-text: oklch(100% 0 0);
|
|
133
|
-
--ge-table-footer-center-text: oklch(100% 0 0);
|
|
134
|
-
--ge-table-footer-east-text: oklch(100% 0 0);
|
|
135
|
-
--ge-table-footer-west-horizontal-border: oklch(100% 0 0 / 0%);
|
|
136
|
-
--ge-table-footer-west-vertical-border: oklch(100% 0 0 / 0%);
|
|
137
|
-
--ge-table-footer-center-horizontal-border: oklch(100% 0 0 / 0%);
|
|
138
|
-
--ge-table-footer-center-vertical-border: oklch(100% 0 0 / 0%);
|
|
139
|
-
--ge-table-footer-east-horizontal-border: oklch(100% 0 0 / 0%);
|
|
140
|
-
--ge-table-footer-east-vertical-border: oklch(100% 0 0 / 0%);
|
|
141
|
-
--ge-table-border: oklch(100% 0 0 / 0%);
|
|
142
|
-
--ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
|
|
143
|
-
--ge-table-row-even-bg: oklch(100% 0 0 / 0%);
|
|
144
|
-
--ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
|
|
145
|
-
--ge-table-column-even-bg: oklch(100% 0 0 / 0%);
|
|
146
|
-
--ge-table-hover-column-bg: oklch(34% 0.25 3.6 / 27%);
|
|
147
|
-
--ge-table-hover-row-bg: oklch(34% 0.25 3.6 / 27%);
|
|
148
|
-
--ge-table-focus-border: oklch(40% 0.25 3.6);
|
|
149
|
-
--ge-table-color-error-text: oklch(65% 0.31 43.2);
|
|
150
|
-
--ge-table-tree-arrow-collapsed-color: #e00034;
|
|
151
|
-
--ge-table-column-resize-handle-border: oklch(63% 0.31 43.2);
|
|
152
|
-
--ge-table-dragged-col-div-bg: #2c2e33;
|
|
153
|
-
--ge-table-drop-zone-bg: #101010;
|
|
154
|
-
}`,paper:`html[data-theme="paper"] {
|
|
155
|
-
--ge-table-bg: #e7e5df;
|
|
156
|
-
--ge-table-header-west-bg: oklch(80% 0.02 99 / 48%);
|
|
157
|
-
--ge-table-header-center-bg: oklch(80% 0.02 99 / 48%);
|
|
158
|
-
--ge-table-header-east-bg: oklch(80% 0.02 99 / 48%);
|
|
159
|
-
--ge-table-header-west-text: #111;
|
|
160
|
-
--ge-table-header-center-text: #111;
|
|
161
|
-
--ge-table-header-east-text: #111;
|
|
162
|
-
--ge-table-header-west-horizontal-border: oklch(100% 0 0 / 0%);
|
|
163
|
-
--ge-table-header-west-vertical-border: oklch(100% 0 0 / 0%);
|
|
164
|
-
--ge-table-header-center-horizontal-border: oklch(100% 0 0 / 0%);
|
|
165
|
-
--ge-table-header-center-vertical-border: oklch(100% 0 0 / 0%);
|
|
166
|
-
--ge-table-header-east-horizontal-border: oklch(100% 0 0 / 0%);
|
|
167
|
-
--ge-table-header-east-vertical-border: oklch(100% 0 0 / 0%);
|
|
168
|
-
--ge-table-body-west-bg: oklch(80% 0.02 99 / 48%);
|
|
169
|
-
--ge-table-body-center-bg: #e7e5df;
|
|
170
|
-
--ge-table-body-east-bg: oklch(80% 0.02 99 / 48%);
|
|
171
|
-
--ge-table-body-west-text: #000;
|
|
172
|
-
--ge-table-body-center-text: #000;
|
|
173
|
-
--ge-table-body-east-text: #000;
|
|
174
|
-
--ge-table-body-west-horizontal-border: oklch(100% 0 0 / 0%);
|
|
175
|
-
--ge-table-body-west-vertical-border: oklch(100% 0 0 / 0%);
|
|
176
|
-
--ge-table-body-center-horizontal-border: oklch(100% 0 0 / 0%);
|
|
177
|
-
--ge-table-body-center-vertical-border: oklch(100% 0 0 / 0%);
|
|
178
|
-
--ge-table-body-east-horizontal-border: oklch(100% 0 0 / 0%);
|
|
179
|
-
--ge-table-body-east-vertical-border: oklch(100% 0 0 / 0%);
|
|
180
|
-
--ge-table-body-west-selected-range-bg: #cfcdc2;
|
|
181
|
-
--ge-table-body-center-selected-range-bg: #cfcdc2;
|
|
182
|
-
--ge-table-body-east-selected-range-bg: #cfcdc2;
|
|
183
|
-
--ge-table-body-west-selected-range-text: #000;
|
|
184
|
-
--ge-table-body-center-selected-range-text: #000;
|
|
185
|
-
--ge-table-body-east-selected-range-text: #000;
|
|
186
|
-
--ge-table-footer-west-bg: oklch(80% 0.02 99 / 48%);
|
|
187
|
-
--ge-table-footer-center-bg: oklch(80% 0.02 99 / 48%);
|
|
188
|
-
--ge-table-footer-east-bg: oklch(80% 0.02 99 / 48%);
|
|
189
|
-
--ge-table-footer-west-text: #111;
|
|
190
|
-
--ge-table-footer-center-text: #111;
|
|
191
|
-
--ge-table-footer-east-text: #111;
|
|
192
|
-
--ge-table-footer-west-horizontal-border: oklch(100% 0 0 / 0%);
|
|
193
|
-
--ge-table-footer-west-vertical-border: oklch(100% 0 0 / 0%);
|
|
194
|
-
--ge-table-footer-center-horizontal-border: oklch(100% 0 0 / 0%);
|
|
195
|
-
--ge-table-footer-center-vertical-border: oklch(100% 0 0 / 0%);
|
|
196
|
-
--ge-table-footer-east-horizontal-border: oklch(100% 0 0 / 0%);
|
|
197
|
-
--ge-table-footer-east-vertical-border: oklch(100% 0 0 / 0%);
|
|
198
|
-
--ge-table-border: oklch(100% 0 0 / 0%);
|
|
199
|
-
--ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
|
|
200
|
-
--ge-table-row-even-bg: oklch(100% 0 0 / 0%);
|
|
201
|
-
--ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
|
|
202
|
-
--ge-table-column-even-bg: oklch(100% 0 0 / 0%);
|
|
203
|
-
--ge-table-hover-column-bg: oklch(5% 0.2 266.40000000000003 / 9%);
|
|
204
|
-
--ge-table-hover-row-bg: oklch(5% 0.2 266.40000000000003 / 9%);
|
|
205
|
-
--ge-table-focus-border: oklch(100% 0.19 205.20000000000002);
|
|
206
|
-
--ge-table-color-error-text: oklch(45% 0.25 43.2);
|
|
207
|
-
--ge-table-tree-arrow-collapsed-color: #e00034;
|
|
208
|
-
--ge-table-column-resize-handle-border: oklch(100% 0.19 205.20000000000002 / 71%);
|
|
209
|
-
--ge-table-dragged-col-div-bg: #2c2e33;
|
|
210
|
-
--ge-table-drop-zone-bg: #e7e5df;
|
|
211
|
-
}`,blackboard:`html[data-theme="dark"] {
|
|
212
|
-
--ge-table-bg: #0c1021;
|
|
213
|
-
--ge-table-header-west-bg: #0c1021;
|
|
214
|
-
--ge-table-header-center-bg: #0c1021;
|
|
215
|
-
--ge-table-header-east-bg: #0c1021;
|
|
216
|
-
--ge-table-header-west-text: #e0df85;
|
|
217
|
-
--ge-table-header-center-text: #e0df85;
|
|
218
|
-
--ge-table-header-east-text: #e0df85;
|
|
219
|
-
--ge-table-header-west-horizontal-border: transparent;
|
|
220
|
-
--ge-table-header-west-vertical-border: transparent;
|
|
221
|
-
--ge-table-header-center-horizontal-border: transparent;
|
|
222
|
-
--ge-table-header-center-vertical-border: transparent;
|
|
223
|
-
--ge-table-header-east-horizontal-border: transparent;
|
|
224
|
-
--ge-table-header-east-vertical-border: transparent;
|
|
225
|
-
--ge-table-body-west-bg: #0c1021;
|
|
226
|
-
--ge-table-body-center-bg: #0c1021;
|
|
227
|
-
--ge-table-body-east-bg: #0c1021;
|
|
228
|
-
--ge-table-body-west-text: #a7a7a7;
|
|
229
|
-
--ge-table-body-center-text: #a7a7a7;
|
|
230
|
-
--ge-table-body-east-text: #a7a7a7;
|
|
231
|
-
--ge-table-body-west-horizontal-border: transparent;
|
|
232
|
-
--ge-table-body-west-vertical-border: transparent;
|
|
233
|
-
--ge-table-body-center-horizontal-border: transparent;
|
|
234
|
-
--ge-table-body-center-vertical-border: transparent;
|
|
235
|
-
--ge-table-body-east-horizontal-border: transparent;
|
|
236
|
-
--ge-table-body-east-vertical-border: transparent;
|
|
237
|
-
--ge-table-body-west-selected-range-bg: #758129;
|
|
238
|
-
--ge-table-body-center-selected-range-bg: #758129;
|
|
239
|
-
--ge-table-body-east-selected-range-bg: #758129;
|
|
240
|
-
--ge-table-body-west-selected-range-text: oklch(100% 0 0);
|
|
241
|
-
--ge-table-body-center-selected-range-text: oklch(100% 0 0);
|
|
242
|
-
--ge-table-body-east-selected-range-text: oklch(100% 0 0);
|
|
243
|
-
--ge-table-footer-west-bg: #0c1021;
|
|
244
|
-
--ge-table-footer-center-bg: #0c1021;
|
|
245
|
-
--ge-table-footer-east-bg: #0c1021;
|
|
246
|
-
--ge-table-footer-west-text: #e0df85;
|
|
247
|
-
--ge-table-footer-center-text: #e0df85;
|
|
248
|
-
--ge-table-footer-east-text: #e0df85;
|
|
249
|
-
--ge-table-footer-west-horizontal-border: transparent;
|
|
250
|
-
--ge-table-footer-west-vertical-border: transparent;
|
|
251
|
-
--ge-table-footer-center-horizontal-border: transparent;
|
|
252
|
-
--ge-table-footer-center-vertical-border: otransparent;
|
|
253
|
-
--ge-table-footer-east-horizontal-border: transparent;
|
|
254
|
-
--ge-table-footer-east-vertical-border: transparent;
|
|
255
|
-
--ge-table-border: oklch(0% 0 0);
|
|
256
|
-
--ge-table-row-odd-bg: oklch(100% 0 0 / 0%);
|
|
257
|
-
--ge-table-row-even-bg: oklch(100% 0 0 / 0%);
|
|
258
|
-
--ge-table-column-odd-bg: oklch(100% 0 0 / 0%);
|
|
259
|
-
--ge-table-column-even-bg: oklch(100% 0 0 / 0%);
|
|
260
|
-
--ge-table-hover-column-bg: #a9a9a9;
|
|
261
|
-
--ge-table-hover-row-bg: #a9a9a9;
|
|
262
|
-
--ge-table-focus-border: #e1ff00;
|
|
263
|
-
--ge-table-color-error-text: #ff0040;
|
|
264
|
-
--ge-table-tree-arrow-collapsed-color: #e00034;
|
|
265
|
-
--ge-table-column-resize-handle-border: oklch(0% 0 0);
|
|
266
|
-
--ge-table-dragged-col-div-bg: #2c2e33;
|
|
267
|
-
--ge-table-drop-zone-bg: #758129;
|
|
268
|
-
}`};let Se=J;const q=class q{constructor(e=new De){this.headerGroupOptions=e}render(e,t,s,o,i,r,a){const n=r!=null&&r.data?r.data:"";if(r){const{toggle:d,visibility:c,closed:h}=r,p=d?q.toggleHeaderGroup:"";this.addText(e,o,t,s,n,p),d&&c!=="always"&&this.addArrowDiv(a,e,!h,t,s,o,p)}else this.addText(e,o,t,s,n,"")}addText(e,t,s,o,i,r){e.innerHTML=`<span
|
|
269
|
-
data-ge-action="${r}"
|
|
270
|
-
data-area="${t}"
|
|
271
|
-
data-row-index="${s}"
|
|
272
|
-
data-col-index="${o}"
|
|
273
|
-
>${i}</span>`}addArrowDiv(e,t,s=!0,o=-1,i=-1,r="header",a){const n=e.createElement("div");e.addClass(n,"ge-table-toggle-icon-div"),e.setStyle(n,"display","inline-block"),e.setStyle(n,"position",""),e.setStyle(n,"width","20px"),e.setStyle(n,"background","transparent"),e.setStyle(n,"cursor","pointer"),e.setAttribute(n,"data-row-index",`${o}`),e.setAttribute(n,"data-col-index",`${i}`),e.setAttribute(n,"data-area",`${r}`),e.setAttribute(n,"data-ge-action",`${a}`);let d;s?d=this.headerGroupOptions.iconExpanded:d=this.headerGroupOptions.iconCollapsed;const c=d.content,h=e.createText(c);e.appendChild(n,h),d.style&&this.applyStyleString(e,n,d.style);for(const p of d.classes)e.addClass(n,p);return e.appendChild(t,n),n}applyStyleString(e,t,s){const o=s.split(";").map(i=>i.trim()).filter(i=>i);for(const i of o){const[r,a]=i.split(":");e.setStyle(t,r.trim(),a.trim())}}};q.toggleHeaderGroup="toggleHeaderGroup";let ye=q;var Dt=Ke("<div>");const Ft=l=>{let e;const t=Ee({tableModel:null,tableOptions:new Fe},l);return Ve(()=>{const s={onSelectionChanged(r){const a=new CustomEvent("selectionChanged",{detail:r,bubbles:!0});e&&e.dispatchEvent(a)},onFocusChanged(r){const a=new CustomEvent("focusChanged",{detail:r,bubbles:!0});e&&e.dispatchEvent(a)},onCheckboxChanged:r=>{const a=new CustomEvent("checkboxChanged",{detail:r,bubbles:!0});e&&e.dispatchEvent(a)},onContextmenu:r=>{const a=new CustomEvent("contextmenu",{detail:r,bubbles:!0});e&&e.dispatchEvent(a)},onModelChanged:r=>{const a=new CustomEvent("modelChanged",{detail:r,bubbles:!0});e&&e.dispatchEvent(a)},onMouseClicked:r=>{const a=new CustomEvent("mouseClicked",{detail:r,bubbles:!0});e&&e.dispatchEvent(a)},onMouseDragging:r=>{const a=new CustomEvent("mouseDragging",{detail:r,bubbles:!0});e&&e.dispatchEvent(a)},onMouseDraggingEnd:r=>{const a=new CustomEvent("mouseDraggingEnd",{detail:r,bubbles:!0});e&&e.dispatchEvent(a)},onMouseMoved:r=>{const a=new CustomEvent("mouseMoved",{detail:r,bubbles:!0});e&&e.dispatchEvent(a)}},o=new pe(e,t.tableModel,new Te,t.tableOptions,s);o.firstInit();const i=new CustomEvent("tableReady",{detail:o.getApi(),bubbles:!0});e&&e.dispatchEvent(i),t.licenseKey&&P.getInstance().setLicenseKey(t.licenseKey)}),(()=>{var s=Dt(),o=e;return typeof o=="function"?Ye(o,s):e=s,s})()};exports.ComponentRendererWrapper=qe;exports.GuiexpertTable=Ft;exports.GuiexpertTableProps=Ze;
|
|
39
|
+
<sheetData>`);for(let s=0;s<e.length;s++){const i=e[s];t.push('<row r="${r + 1}" spans="1:2" x14ac:dyDescent="0.2">');for(let o=0;o<i.length;o++){const l=i[o],n=this.getCellAddress(s,o);if(typeof l=="number")t.push(`<c r="${n}"><v>${l}</v></c>`);else if(l instanceof Date){const a=l;t.push(`<c r="${n}" t="inlineStr"><is><t>${a.toISOString()}</t></is></c>`)}else{const a=l!=null?this.escapeXml(String(l)):"";t.push(`<c r="${n}" t="inlineStr"><is><t>${a}</t></is></c>`)}}t.push("</row>")}return t.push(""),t.push(""),t.push('</sheetData><pageMargins left="0.7" right="0.7" top="0.75" bottom="0.75" header="0.3" footer="0.3"/>'),t.push("</worksheet>"),t.join(`
|
|
40
|
+
`)}escapeXml(e){return e==null?"":String(e).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""").replace(/'/g,"'")}getCellAddress(e,t){const s="ABCDEFGHIJKLMNOPQRSTUVWXYZ";let i="";for(;t>=0;)i=s[t%26]+i,t=Math.floor(t/26)-1;return`${i}${e+1}`}createZip(e){const t=[];let s=0;const i=[];e.forEach((h,p)=>{const g=new TextEncoder().encode(p),u=new TextEncoder().encode(h),S=new Uint8Array(30+g.length),f=new DataView(S.buffer);S.set([80,75,3,4],0),f.setUint16(4,20,!0),f.setUint16(6,0,!0),f.setUint16(8,0,!0),f.setUint16(10,0,!0),f.setUint16(12,0,!0),f.setUint32(14,0,!0),f.setUint32(18,u.length,!0),f.setUint32(22,u.length,!0),f.setUint16(26,g.length,!0),f.setUint16(28,0,!0),S.set(g,30),t.push(S,u),i.push({path:p,offset:s,contentSize:u.length}),s+=S.length+u.length});const o=s;i.forEach(h=>{const p=new TextEncoder().encode(h.path),g=new Uint8Array(46+p.length),u=new DataView(g.buffer);g.set([80,75,1,2],0),u.setUint16(4,20,!0),u.setUint16(6,20,!0),u.setUint16(8,0,!0),u.setUint16(10,0,!0),u.setUint16(12,0,!0),u.setUint16(14,0,!0),u.setUint32(16,0,!0),u.setUint32(20,h.contentSize,!0),u.setUint32(24,h.contentSize,!0),u.setUint16(28,p.length,!0),u.setUint16(30,0,!0),u.setUint16(32,0,!0),u.setUint16(34,0,!0),u.setUint16(36,0,!0),u.setUint32(38,0,!0),u.setUint32(42,h.offset,!0),g.set(p,46),t.push(g),s+=g.length});const l=new Uint8Array(22),n=new DataView(l.buffer);l.set([80,75,5,6],0),n.setUint16(4,0,!0),n.setUint16(6,0,!0),n.setUint16(8,i.length,!0),n.setUint16(10,i.length,!0),n.setUint32(12,s-o,!0),n.setUint32(16,o,!0),n.setUint16(20,0,!0),t.push(l);const a=t.reduce((h,p)=>h+p.length,0),d=new Uint8Array(a);let c=0;for(const h of t)d.set(h,c),c+=h.length;return d}generateBuffer(e,t=""){const s=this.generateMap(e,t);return this.createZip(s)}}class de extends at{constructor(e,t,s,i,o,l=new Y,n=new Et){var c;if(super(e,t,new Ye(s),i),this.eventListener=o,this.copyService=l,this.excelService=n,this.licenseManager=V.getInstance(),this.selectionService=new ut(this),this.api=new et(this),this.mouseStartAction="",this.mouseStartWidth=-1,this.mouseStartColumnIndex=-1,this.dragFrom=-1,this.dragTo=-1,this.lastDragFrom=-1,this.lastDragTo=-1,this.firstDraggingRendering=!0,this.lastContextmenu=Date.now(),t.setTableScope(this),o||(this.eventListener=new me),(c=this.tableOptions)!=null&&c.autoRestoreOptions){const h=this.tableOptions.autoRestoreOptions,p=h.getStorageKeyFn;p&&(h.autoRestoreScrollPosition&&(this.storeScrollPosStateService=new tt(p)),h.autoRestoreCollapsedExpandedState&&(this.storeStateCollapsedExpandService=new it(p)),h.autoRestoreSortingState&&(this.storeSortingService=new ot(p)))}this.mouseHandler=new qe(this),this.inputHandler=new dt(this),this.resizeHandler=new At(this,i.resizeEventDebounceDelay),this.shortcutService=new St(this),this.shortcutService.addListener(this.selectionService);const a=this.getSelectionModel?this.getSelectionModel():void 0;a&&a.addEventSelectionChangedListener(this);const d=this.getFocusModel?this.getFocusModel():void 0;d&&d.addEventFocusChangedListener(this)}static create(e,t,s=new Ee,i=new me,o=new Ae,l=new Y){return new de(e,t,o,s,i,l)}onActionTriggered(e){if(e==="NAVIGATE_DOWN"&&this.changeFocusCell(0,1)||e==="NAVIGATE_UP"&&this.changeFocusCell(0,-1)||e==="NAVIGATE_LEFT"&&this.changeFocusCell(-1,0)||e==="NAVIGATE_RIGHT"&&this.changeFocusCell(1,0))return!0;if(e==="START_EDITING"&&this.getFocusModel){const t=this.getFocusModel();if(t){const[s,i]=t.getFocus();this.tableModel.getBodyModel().isEditable(s,i)&&(this.clearSelection(),this.initRenderEditor(s,i))}return!0}if(e==="COPY_2_CLIPBOARD"){const t=this.getSelectionModel?this.getSelectionModel():void 0,s=this.getFocusModel?this.getFocusModel():void 0;this.copyService.createContent(this.tableModel,t,s).then(i=>this.copyService.copyContent(i))}return!1}updateModelValueAfterEdit(e,t,s,i){e==="body"&&this.tableModel.getAreaModel(e).setValue(t,s,i)&&(this.resetEditorRenderer(),this.repaint(),this.eventListener.onModelChanged(ce.createSingle(t,s)),this.hostElement.focus())}getApi(){return this.api}firstInit(){var e;return this.tableModel.init(),(e=this.tableOptions)!=null&&e.externalFilterFunction&&this.externalFilterChanged(!1),this.autoRestoreCollapsedExpandedState(),this.autoRestoreSortingState(),this.resetSizeOfWrapperDiv(),this.adjustContainersAndRows(),this.autoRestoreScrollPosition(),this}createGeMouseEvent(e){const t=new re;if(t.originalEvent=e,e){const s=e.target;if([t.areaIdent,t.sideIdent]=this.getAreaAndSideIdentByAttr(s),t.rowIndex=this.getNumberByAttr(s,"data-row-index"),t.columnIndex=this.getNumberByAttr(s,"data-col-index"),t.action=this.getStringByAttr(s,"data-ge-action"),t.areaIdent){const i=this.tableModel.getAreaModel(t.areaIdent);t.rowTop=i.getYPosByRowIndex(t.rowIndex)}if(t.columnLeft=this.tableModel.getXPosByColumnIndex(t.columnIndex),e.ctrlKey&&e.altKey){const i=e.clientY-this.hostElement.offsetTop-this.areaHeaderCenter.parent.clientHeight,o=e.clientX-this.hostElement.offsetLeft-this.areaBodyWestGeo.width;this.debugOnce(o,i)}}return t}onMouseDown(e){e.columnIndex>-1&&e.action&&["resize-column","drag-column"].includes(e.action)&&(this.mouseStartWidth=this.tableModel.getColumnWidth(e.columnIndex),this.mouseStartAction=e.action,this.mouseStartColumnIndex=e.columnIndex,this.mouseStartAction==="drag-column"&&(this.firstDraggingRendering=!0,this.dragFrom=this.mouseStartColumnIndex))}mouseDraggingOnFrame(e,t){this.eventListener.onMouseDragging(e),this.mouseEvent=e,this.mouseStartColumnIndex>-1&&this.mouseStartAction==="resize-column"&&this.tableOptions.columnsResizable?this.resizeColumn(e):this.mouseStartAction==="drag-column"&&e.columnIndex>-1&&this.tableOptions.columnsDraggable&&(this.draggingTargetColumnIndex=e.columnIndex,this.dragTo=this.draggingTargetColumnIndex,this.dragFrom>-1&&this.dragTo>-1&&this.dragFrom!==this.dragTo&&(this.lastDragFrom===this.dragTo&&this.lastDragTo===this.dragFrom||(this.tableModel.changeColumnOrder(this.dragFrom,this.dragTo),this.lastDragFrom=this.dragFrom,this.lastDragTo=this.dragTo,this.dragFrom=this.dragTo,this.resetSizeOfWrapperDiv(),this.adjustContainersAndRows())),t&&(this.adjustDraggingColumn(e,t.columnIndex,this.firstDraggingRendering),this.firstDraggingRendering=!1),this.repaint())}mouseDraggingEndOnFrame(e){this.eventListener.onMouseDraggingEnd(e),this.draggingTargetColumnIndex=-1,this.mouseStartAction==="resize-column"?this.resizeColumn(e):this.mouseStartAction==="drag-column"&&(this.hideDraggingColumn(),this.repaint()),this.mouseStartWidth=-1,this.mouseStartColumnIndex=-1,this.dragFrom=-1,this.dragTo=-1,this.firstDraggingRendering=!0,this.mouseStartAction=""}mouseMove(e){this.eventListener.onMouseMoved(e),this.adjustHoverRows(e),this.adjustHoverColumns(e)}contextmenu(e){var s,i;const t=Date.now();if(t-this.lastContextmenu<50){this.lastContextmenu=t,(s=e.originalEvent)==null||s.preventDefault(),(i=e.originalEvent)==null||i.stopImmediatePropagation();return}this.lastContextmenu=t,this.eventListener.onContextmenu(e)}toggleExpandCollapseAll(e=!0){var s;const t=this.tableModel.getBodyModel();oe(t)&&(t.toggleExpandCollapseAll(e),this.repaint(),(s=this.storeStateCollapsedExpandService)==null||s.collapsedStateAll(e))}toggleRowCheckbox(e,t,s){var a;const i=this.tableModel.getAreaModel(s),o=i.isRowChecked(e),l=o===void 0||o==="semi"||o==="none";i.setRowChecked(e,l),this.repaint();const n=(a=i.rowSelectionModel)==null?void 0:a.getCheckedRows();this.eventListener.onCheckboxChanged(n||[])}onMouseClicked(e,t){let s=this.selectionService.onMouseClicked(e,t);if(!s&&this.getFocusModel){this.resetEditorRenderer();const i=this.getFocusModel();i&&(s=i.hasChanged(),i.clearChanged())}return s}debounceRepaint(){this.debounce(this.repaint.bind(this),1)}publishGeMouseEvent(e){this.eventListener.onMouseClicked(e)}onFocusChanged(e){this.eventListener.onFocusChanged(e)}onSelectionChanged(e){this.eventListener.onSelectionChanged(e)}externalFilterChanged(e=!0){const t=this.tableOptions.externalFilterFunction;t&&(e&&this.clearSelectionModel(),this.tableModel.externalFilterChanged(t),this.scrollViewport.scrollTo(0,0),this.tableModel.recalcHeightAndPadding(),this.resetSizeOfWrapperDiv(),this.repaint())}onHeaderDblClicked(e,t,s){var o,l;const i=this.tableModel.getColumnDef(s);if(i!=null&&i.sortable&&i.sortable()){e.preventDefault(),e.stopPropagation();const n=i.sortStatesOrder?i.sortStatesOrder:this.tableOptions.sortOrder,a=i.sortState??"",d=n[(n.indexOf(a)+1)%n.length],c=new ct(s,d);this.tableModel.doSort([c])&&((o=this.tableModel.getColumnDefs())==null||o.forEach(p=>p.sortState=""),i.sortState=d),this.repaint(),(l=this.storeSortingService)==null||l.setSortItems([c])}}scrollToPixel(e,t){this.scrollViewport.scrollTo(e,t)}scrollToIndex(e,t){const i=this.tableModel.getAreaModel("body").getYPosByRowIndex(t);this.scrollToPixel(0,i)}adjustAfterScrolling(){super.adjustAfterScrolling();const e=this.scrollViewport;this.eventListener.onScroll(new pt(this.scrollTop,this.scrollLeft,e.scrollHeight,e.scrollWidth,e.clientHeight,e.clientWidth,this.scrollFactorY,this.scrollFactorX))}setSelectionModel(e,t=!1){const s=()=>e;this.tableOptions.getSelectionModel=s,this.getSelectionModel=s,this.selectionService.getSelectionModel=s,t&&this.repaint()}toggleHeaderGroup(e){const t=this.tableModel.getAreaModel("header");"columnDefs"in this.tableModel&&(this.tableModel.columnDefs=t.toggleHeaderGroup(e),console.info("####### !!!!!! *******, this.tableModel.columnDefs")),this.firstInit()}selectionModel(){if(this!=null&&this.getSelectionModel)return this.getSelectionModel()}focusModel(){if(this!=null&&this.getFocusModel)return this.getFocusModel()}setDragging(e){this.dragging=e,this.dragging?(this.storeColumnWidths(),this.lastDragFrom=-1,this.lastDragTo=-1):this.storedColumnWidths=[]}changeFocusCell(e,t){if(!this.isEditing()&&this.getFocusModel){const s=this.getFocusModel();if(s){const[i,o]=s.getFocus();return s.setFocus(i+t,o+e),this.repaint(),!0}}return!1}resizeColumn(e){this.tableModel.setColumnWidth(this.mouseStartColumnIndex,this.mouseStartWidth+e.draggingX),this.tableModel.recalcPadding(),this.resetSizeOfWrapperDiv(),this.adjustContainersAndRows()}clearSelectionModel(){var e;this.getSelectionModel&&((e=this.getSelectionModel())==null||e.clear())}debugOnce(e,t){var s;console.clear(),console.info("this.hostElement.offsetTop",this.hostElement.offsetTop),console.info("this.hostElement.scrollHeight",this.hostElement.scrollHeight),console.info("this.scrollViewportTop",this.scrollTop),console.info("this.areaHeaderCenter.parent.clientHeight",this.areaHeaderCenter.parent.clientHeight),console.info("bodyY",t),console.info("bodyX",e),console.info("rows",this.firstVisibleRowIndex),console.info(""),console.info("this.tableModel",this.tableModel),console.info(""),console.info("this.mouseMoveEvent.clientX",(s=this.mouseHandler.mouseEvent)==null?void 0:s.clientX),console.info("this.hostElement.offsetLeft",this.hostElement.offsetLeft),console.info("this.areaBodyWestGeo.width",this.areaBodyWestGeo.width)}autoRestoreScrollPosition(){var e;if((e=this.tableOptions)!=null&&e.autoRestoreOptions&&this.storeScrollPosStateService&&this.tableOptions.autoRestoreOptions.autoRestoreScrollPosition){const s=this.storeScrollPosStateService.getScrollOffset();s&&this.scrollViewport.scrollTo(...s)}}autoRestoreSortingState(){var e,t;if((t=(e=this.tableOptions)==null?void 0:e.autoRestoreOptions)!=null&&t.autoRestoreSortingState&&this.storeSortingService){const s=this.storeSortingService.getSortItems();s!=null&&s.length&&this.tableModel.getBodyModel().doSort(s)}}autoRestoreCollapsedExpandedState(){var e,t;if((t=(e=this.tableOptions)==null?void 0:e.autoRestoreOptions)!=null&&t.getRowId&&this.storeStateCollapsedExpandService){const s=this.tableOptions.autoRestoreOptions,i=s.getRowId;if(s.autoRestoreCollapsedExpandedState&&i){const o=this.storeStateCollapsedExpandService.collapsedExpandedStateGet(),l=this.tableModel.getAreaModel("body");if(oe(l)){const n=l,a=l.getRowCount();for(let d=0;d<a;d++){const c=l.getRowByIndex(d);if(c)if(o.allExpanded)c.expanded=!0;else if(o.allCollapsed)c.expanded=!1;else{const h=i(c.data);o.mode==="expanded"?c.expanded=this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h):o.mode==="collapsed"&&(c.expanded=!this.storeStateCollapsedExpandService.collapsedExpandedStateIncludes(h))}}n.recalcVisibleTreeRows()}}}}calcAutoColumnWidths(){const e=this.tableModel.getBodyModel(),t=this.tableModel.getColumnCount(),s=(e==null?void 0:e.getRowCount())??0;if(!e)return console.warn("Body model is not available."),[];const i=new Array(t).fill(0);for(let o=0;o<s;o++)for(let l=0;l<t;l++){const n=e.getValueAt(o,l),a=(n==null?void 0:n.toString().length)||0;a>i[l]&&(i[l]=a)}return i.map(o=>Math.max(o*10,50))}setColumnWidth(e,t){this.tableModel.setColumnWidth(e,t)}autoResizeColumns(e=!0){const t=this.calcAutoColumnWidths();for(let s=0;s<t.length;s++){const i=t[s];this.tableModel.setColumnWidth(s,i)}e&&this.recalcWrappers()}recalcWrappers(){this.tableModel.recalcPadding(),this.resetSizeOfWrapperDiv(),this.adjustContainersAndRows()}reSort(){var t;let e=((t=this.storeSortingService)==null?void 0:t.getSortItems())??[];this.tableModel.doSort(e)}sort(e){this.tableModel.sort(e)}ensureRowIsVisible(e){const t=this.getFirstFullVisibleRowIndex(),s=this.getLastFullVisibleRowIndex(),i=this.getDisplayedRowCount();return e<t?(this.scrollToIndex(0,e),!0):e>s?(this.scrollToIndex(0,e-i+1),!0):!1}}var Rt=Ge("<div>");const Mt=r=>{let e;const t=xe({tableModel:null,tableOptions:new Ee},r);return Le(()=>{const s={onSelectionChanged(l){const n=new CustomEvent("selectionChanged",{detail:l,bubbles:!0});e&&e.dispatchEvent(n)},onScroll(l){const n=new CustomEvent("scroll",{detail:l,bubbles:!0});e&&e.dispatchEvent(n)},onFocusChanged(l){const n=new CustomEvent("focusChanged",{detail:l,bubbles:!0});e&&e.dispatchEvent(n)},onCheckboxChanged:l=>{const n=new CustomEvent("checkboxChanged",{detail:l,bubbles:!0});e&&e.dispatchEvent(n)},onContextmenu:l=>{const n=new CustomEvent("contextmenu",{detail:l,bubbles:!0});e&&e.dispatchEvent(n)},onModelChanged:l=>{const n=new CustomEvent("modelChanged",{detail:l,bubbles:!0});e&&e.dispatchEvent(n)},onMouseClicked:l=>{const n=new CustomEvent("mouseClicked",{detail:l,bubbles:!0});e&&e.dispatchEvent(n)},onMouseDragging:l=>{const n=new CustomEvent("mouseDragging",{detail:l,bubbles:!0});e&&e.dispatchEvent(n)},onMouseDraggingEnd:l=>{const n=new CustomEvent("mouseDraggingEnd",{detail:l,bubbles:!0});e&&e.dispatchEvent(n)},onMouseMoved:l=>{const n=new CustomEvent("mouseMoved",{detail:l,bubbles:!0});e&&e.dispatchEvent(n)}},i=new de(e,t.tableModel,new Ae,t.tableOptions,s);i.firstInit();const o=new CustomEvent("tableReady",{detail:i.getApi(),bubbles:!0});e&&e.dispatchEvent(o),t.licenseKey&&V.getInstance().setLicenseKey(t.licenseKey)}),(()=>{var s=Rt(),i=e;return typeof i=="function"?je(i,s):e=s,s})()};exports.ComponentRendererWrapper=Xe;exports.GuiexpertTable=Mt;exports.GuiexpertTableProps=ze;
|