slickgrid
Advanced tools
Comparing version 4.1.5 to 4.1.6
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./controls/slick.columnmenu.js | ||
*/ | ||
!function(x){"use strict";Slick.Utils.extend(!0,x,{Slick:{Controls:{ColumnPicker:function(a,e,n){var i,m,p,h,k=e,C=n,f=e&&e.getUID?e.getUID():"",c=new Slick.Event,l=new Slick.BindingEventService,g={fadeSpeed:250,hideForceFitButton:!1,hideSyncResizeButton:!1,forceFitTitle:"Force fit columns",syncResizeTitle:"Synchronous resize",headerColumnValueExtractor:function(e){return e.name}};function t(e){e.onHeaderContextMenu.subscribe(d),e.onColumnsReordered.subscribe(y),C=Slick.Utils.extend({},g,n),(p=document.createElement("div")).className="slick-columnpicker "+f,p.style.display="none",document.body.appendChild(p);var e=document.createElement("button"),t=(e.type="button",e.className="close",e.dataset.dismiss="slick-columnpicker",e.ariaLabel="Close",document.createElement("span"));t.className="close",t.ariaHidden="true",t.textContent="×",e.appendChild(t),p.appendChild(e),(C.columnPickerTitle||C.columnPicker&&C.columnPicker.columnTitle)&&(t=C.columnPickerTitle||C.columnPicker.columnTitle,(i=document.createElement("div")).className="slick-gridmenu-custom",i.textContent=t,p.appendChild(i)),l.bind(p,"click",u),(m=document.createElement("span")).className="slick-columnpicker-list",l.bind(document.body,"mousedown",r),l.bind(document.body,"beforeunload",o)}function o(){k.onHeaderContextMenu.unsubscribe(d),k.onColumnsReordered.unsubscribe(y),l.unbindAll(),m&&m.remove(),p&&p.remove()}function r(e){(p===e.target||p&&p.contains(e.target))&&"close"!==e.target.className||(p.setAttribute("aria-expanded","false"),p.style.display="none")}function d(e){e.preventDefault(),Slick.Utils.emptyElement(m),y(),h=[];let t,n,i;for(var l,c,o,r=0;r<a.length;r++){t=a[r].id,i=a[r].excludeFromColumnPicker?"hidden":"";var d=document.createElement("li"),u=(d.className=i,d.ariaLabel=a[r]&&a[r].name,document.createElement("input")),u=(u.type="checkbox",u.id=f+"colpicker-"+t,u.dataset.columnid=a[r].id,d.appendChild(u),h.push(u),null==k.getColumnIndex(t)||a[r].hidden||(u.checked=!0),n=(C&&C.columnPicker&&C.columnPicker.headerColumnValueExtractor?C.columnPicker:g).headerColumnValueExtractor(a[r],C),document.createElement("label"));u.htmlFor=f+"colpicker-"+t,u.innerHTML=n,d.appendChild(u),m.appendChild(d)}!C.columnPicker||C.columnPicker.hideForceFitButton&&C.columnPicker.hideSyncResizeButton||m.appendChild(document.createElement("hr")),C.columnPicker&&C.columnPicker.hideForceFitButton||(s=C.columnPicker&&C.columnPicker.forceFitTitle||C.forceFitTitle,(l=document.createElement("li")).ariaLabel=s,m.appendChild(l),(o=document.createElement("input")).type="checkbox",o.id=f+"colpicker-forcefit",o.dataset.option="autoresize",l.appendChild(o),(c=document.createElement("label")).htmlFor=f+"colpicker-forcefit",c.textContent=s,l.appendChild(c),k.getOptions().forceFitColumns&&(o.checked=!0)),C.columnPicker&&C.columnPicker.hideSyncResizeButton||(s=C.columnPicker&&C.columnPicker.syncResizeTitle||C.syncResizeTitle,(l=document.createElement("li")).ariaLabel=s,m.appendChild(l),(c=document.createElement("input")).type="checkbox",c.id=f+"colpicker-syncresize",c.dataset.option="syncresize",l.appendChild(c),(o=document.createElement("label")).htmlFor=f+"colpicker-syncresize",o.textContent=s,l.appendChild(o),k.getOptions().syncColumnCellResize&&(c.checked=!0));var s=e;s=s&&s.touches&&s.touches[0]||s,p.style.top=s.pageY-10+"px",p.style.left=s.pageX-10+"px",p.style.maxHeight=x.innerHeight-s.clientY+"px",p.style.display="block",p.setAttribute("aria-expanded","true"),p.appendChild(m)}function y(){var t=k.getColumns().slice(0),n=new Array(a.length);for(let e=0;e<n.length;e++)void 0===k.getColumnIndex(a[e].id)?n[e]=a[e]:n[e]=t.shift();a=n}function u(e){var t;if("autoresize"===e.target.dataset.option)i=b(),t=e.target.checked,k.setOptions({forceFitColumns:t}),k.setColumns(i);else if("syncresize"===e.target.dataset.option)e.target.checked?k.setOptions({syncColumnCellResize:!0}):k.setOptions({syncColumnCellResize:!1});else if("checkbox"===e.target.type){const t=e.target.checked;var i=e.target.dataset.columnid||"";let n=[];h.forEach((e,t)=>{void 0!==a[t].hidden&&(a[t].hidden=!e.checked),e.checked&&n.push(a[t])}),n.length?(k.setColumns(n),c.notify({columnId:i,showing:t,allColumns:a,columns:n,grid:k})):e.target.checked=!0}}function s(t){for(let e=0;e<a.length;e++)if(a[e].id===t)return e;return-1}function b(){return k.getColumns()}return t(k),{init:t,getAllColumns:function(){return a},getColumnbyId:function(t){for(let e=0;e<a.length;e++)if(a[e].id===t)return a[e];return null},getColumnIndexbyId:s,getVisibleColumns:b,destroy:o,updateAllTitles:function(e){i&&i.innerHTML&&(i.innerHTML=e.columnTitle)},onColumnsChanged:c,setColumnVisibiliy:function(e,t){var e="number"==typeof e?e:s(e),n=(k.getColumnIndex(a[e].id),b()),i=a[e];if(t)i.hidden=!1,n.splice(e,0,i);else{var l=[];for(let e=0;e<n.length;e++)n[e].id!==i.id&&l.push(n[e]);n=l}k.setColumns(n),c.notify({columnId:i.id,showing:t,allColumns:a,columns:n,grid:k})}}}}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./controls/slick.columnpicker.js | ||
*/ | ||
!function(x){"use strict";Slick.Utils.extend(!0,x,{Slick:{Controls:{ColumnPicker:function(a,e,n){var i,m,p,h,k=e,C=n,f=e&&e.getUID?e.getUID():"",c=new Slick.Event,l=new Slick.BindingEventService,g={fadeSpeed:250,hideForceFitButton:!1,hideSyncResizeButton:!1,forceFitTitle:"Force fit columns",syncResizeTitle:"Synchronous resize",headerColumnValueExtractor:function(e){return e.name}};function t(e){e.onHeaderContextMenu.subscribe(d),e.onColumnsReordered.subscribe(y),C=Slick.Utils.extend({},g,n),(p=document.createElement("div")).className="slick-columnpicker "+f,p.style.display="none",document.body.appendChild(p);var e=document.createElement("button"),t=(e.type="button",e.className="close",e.dataset.dismiss="slick-columnpicker",e.ariaLabel="Close",document.createElement("span"));t.className="close",t.ariaHidden="true",t.textContent="×",e.appendChild(t),p.appendChild(e),(C.columnPickerTitle||C.columnPicker&&C.columnPicker.columnTitle)&&(t=C.columnPickerTitle||C.columnPicker.columnTitle,(i=document.createElement("div")).className="slick-gridmenu-custom",i.textContent=t,p.appendChild(i)),l.bind(p,"click",u),(m=document.createElement("span")).className="slick-columnpicker-list",l.bind(document.body,"mousedown",r),l.bind(document.body,"beforeunload",o)}function o(){k.onHeaderContextMenu.unsubscribe(d),k.onColumnsReordered.unsubscribe(y),l.unbindAll(),m&&m.remove(),p&&p.remove()}function r(e){(p===e.target||p&&p.contains(e.target))&&"close"!==e.target.className||(p.setAttribute("aria-expanded","false"),p.style.display="none")}function d(e){e.preventDefault(),Slick.Utils.emptyElement(m),y(),h=[];let t,n,i;for(var l,c,o,r=0;r<a.length;r++){t=a[r].id,i=a[r].excludeFromColumnPicker?"hidden":"";var d=document.createElement("li"),u=(d.className=i,d.ariaLabel=a[r]&&a[r].name,document.createElement("input")),u=(u.type="checkbox",u.id=f+"colpicker-"+t,u.dataset.columnid=a[r].id,d.appendChild(u),h.push(u),null==k.getColumnIndex(t)||a[r].hidden||(u.checked=!0),n=(C&&C.columnPicker&&C.columnPicker.headerColumnValueExtractor?C.columnPicker:g).headerColumnValueExtractor(a[r],C),document.createElement("label"));u.htmlFor=f+"colpicker-"+t,u.innerHTML=n,d.appendChild(u),m.appendChild(d)}!C.columnPicker||C.columnPicker.hideForceFitButton&&C.columnPicker.hideSyncResizeButton||m.appendChild(document.createElement("hr")),C.columnPicker&&C.columnPicker.hideForceFitButton||(s=C.columnPicker&&C.columnPicker.forceFitTitle||C.forceFitTitle,(l=document.createElement("li")).ariaLabel=s,m.appendChild(l),(o=document.createElement("input")).type="checkbox",o.id=f+"colpicker-forcefit",o.dataset.option="autoresize",l.appendChild(o),(c=document.createElement("label")).htmlFor=f+"colpicker-forcefit",c.textContent=s,l.appendChild(c),k.getOptions().forceFitColumns&&(o.checked=!0)),C.columnPicker&&C.columnPicker.hideSyncResizeButton||(s=C.columnPicker&&C.columnPicker.syncResizeTitle||C.syncResizeTitle,(l=document.createElement("li")).ariaLabel=s,m.appendChild(l),(c=document.createElement("input")).type="checkbox",c.id=f+"colpicker-syncresize",c.dataset.option="syncresize",l.appendChild(c),(o=document.createElement("label")).htmlFor=f+"colpicker-syncresize",o.textContent=s,l.appendChild(o),k.getOptions().syncColumnCellResize&&(c.checked=!0));var s=e;s=s&&s.touches&&s.touches[0]||s,p.style.top=s.pageY-10+"px",p.style.left=s.pageX-10+"px",p.style.maxHeight=x.innerHeight-s.clientY+"px",p.style.display="block",p.setAttribute("aria-expanded","true"),p.appendChild(m)}function y(){var t=k.getColumns().slice(0),n=new Array(a.length);for(let e=0;e<n.length;e++)void 0===k.getColumnIndex(a[e].id)?n[e]=a[e]:n[e]=t.shift();a=n}function u(e){var t;if("autoresize"===e.target.dataset.option)i=b(),t=e.target.checked,k.setOptions({forceFitColumns:t}),k.setColumns(i);else if("syncresize"===e.target.dataset.option)e.target.checked?k.setOptions({syncColumnCellResize:!0}):k.setOptions({syncColumnCellResize:!1});else if("checkbox"===e.target.type){const t=e.target.checked;var i=e.target.dataset.columnid||"";let n=[];h.forEach((e,t)=>{void 0!==a[t].hidden&&(a[t].hidden=!e.checked),e.checked&&n.push(a[t])}),n.length?(k.setColumns(n),c.notify({columnId:i,showing:t,allColumns:a,columns:n,grid:k})):e.target.checked=!0}}function s(t){for(let e=0;e<a.length;e++)if(a[e].id===t)return e;return-1}function b(){return k.getColumns()}return t(k),{init:t,getAllColumns:function(){return a},getColumnbyId:function(t){for(let e=0;e<a.length;e++)if(a[e].id===t)return a[e];return null},getColumnIndexbyId:s,getVisibleColumns:b,destroy:o,updateAllTitles:function(e){i&&i.innerHTML&&(i.innerHTML=e.columnTitle)},onColumnsChanged:c,setColumnVisibiliy:function(e,t){var e="number"==typeof e?e:s(e),n=(k.getColumnIndex(a[e].id),b()),i=a[e];if(t)i.hidden=!1,n.splice(e,0,i);else{var l=[];for(let e=0;e<n.length;e++)n[e].id!==i.id&&l.push(n[e]);n=l}k.setColumns(n),c.notify({columnId:i.id,showing:t,allColumns:a,columns:n,grid:k})}}}}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./controls/slick.gridmenu.js | ||
*/ | ||
"use strict";!function(R){Slick.Utils.extend(!0,R,{Slick:{Controls:{GridMenu:function(p,e,o){var h,l,n,C,d,f,s,M,y,b=e,k=e&&e.getUID?e.getUID():"",v=!1,E=o,S=this,w={showButton:!0,hideForceFitButton:!1,hideSyncResizeButton:!1,forceFitTitle:"Force fit columns",marginBottom:15,menuWidth:18,contentMinWidth:0,resizeOnShowHeaderRow:!1,syncResizeTitle:"Synchronous resize",useClickToRepositionMenu:!0,headerColumnValueExtractor:function(e){return e.name}},r=new Slick.BindingEventService;function t(e){h=e.getOptions();var n,t=E.gridMenu&&E.gridMenu.menuWidth||w.menuWidth;(d=h&&h.hasOwnProperty("frozenColumn")&&0<=h.frozenColumn?document.querySelector(`.${k} .slick-header-right`):document.querySelector(`.${k} .slick-header-left`)).style.width=`calc(100% - ${t}px)`,(E.gridMenu&&null!=E.gridMenu.resizeOnShowHeaderRow?E.gridMenu:w).resizeOnShowHeaderRow&&E.showHeaderRow&&(n=document.querySelector(`.${k}.slick-headerrow`))&&(n.style.width=`calc(100% - ${t}px)`),(E.gridMenu&&void 0!==E.gridMenu.showButton?E.gridMenu:w).showButton&&((s=document.createElement("button")).className="slick-gridmenu-button",s.ariaLabel="Grid Menu",E.gridMenu&&E.gridMenu.iconCssClass?s.classList.add(...E.gridMenu.iconCssClass.split(" ")):((n=document.createElement("img")).src=E.gridMenu&&E.gridMenu.iconImage?E.gridMenu.iconImage:"../images/drag-handle.png",s.appendChild(n)),o.iconCssClass&&s.classList.add(...o.iconCssClass.split(" ")),d.parentElement.insertBefore(s,d.parentElement.firstChild),r.bind(s,"click",a)),(M=document.createElement("div")).className="slick-gridmenu "+k,M.style.display="none",document.body.appendChild(M);(t=document.createElement("button")).type="button",t.className="close",t.dataset.dismiss="slick-gridmenu",t.ariaLabel="Close";var i=document.createElement("span");i.className="close",i.ariaHidden="true",i.textContent="×",t.appendChild(i),M.appendChild(t),(C=document.createElement("div")).className="slick-gridmenu-custom",C.role="menu",M.appendChild(C),x(E,C),b.onColumnsReordered.subscribe(z),(E=Slick.Utils.extend({},w,E)).gridMenu&&E.gridMenu.columnTitle&&((l=document.createElement("div")).className="title",l.innerHTML=E.gridMenu.columnTitle,M.appendChild(l)),r.bind(M,"click",B),(f=document.createElement("span")).className="slick-gridmenu-list",f.role="menu",r.bind(document.body,"mousedown",m),r.bind(document.body,"beforeunload",u),e.onBeforeDestroy.subscribe(u)}function u(){S.onAfterMenuShow.unsubscribe(),S.onBeforeMenuShow.unsubscribe(),S.onMenuClose.unsubscribe(),S.onCommand.unsubscribe(),S.onColumnsChanged.unsubscribe(),b.onColumnsReordered.unsubscribe(z),b.onBeforeDestroy.unsubscribe(),b.onSetOptions.unsubscribe(),r.unbindAll(),M&&M.remove&&M.remove(),i()}function i(){r.unbindAll();var e=document.querySelector("div.slick-gridmenu."+k);e&&(e.style.display="none"),d&&(d.style.width="100%"),s&&s.remove(),M&&M.remove()}function x(t,i){if(t.gridMenu&&t.gridMenu.customItems){E.gridMenu&&E.gridMenu.customTitle&&((n=document.createElement("div")).className="title",n.innerHTML=E.gridMenu.customTitle,i.appendChild(n));for(let n=0,e=t.gridMenu.customItems.length;n<e;n++){let e=!0;var o=t.gridMenu.customItems[n],l={grid:b,menu:M,columns:p,visibleColumns:L()},d=O(o.itemVisibilityOverride,l),l=O(o.itemUsabilityOverride,l);d&&(Object.prototype.hasOwnProperty.call(o,"itemUsabilityOverride")&&(o.disabled=!l),(d=document.createElement("div")).className="slick-gridmenu-item",d.role="menuitem",!o.divider&&"divider"!==o||(d.classList.add("slick-gridmenu-item-divider"),e=!1),o.disabled&&d.classList.add("slick-gridmenu-item-disabled"),o.hidden&&d.classList.add("slick-gridmenu-item-hidden"),o.cssClass&&d.classList.add(...o.cssClass.split(" ")),o.tooltip&&(d.title=o.tooltip),(l=document.createElement("div")).className="slick-gridmenu-icon",d.appendChild(l),o.iconCssClass&&l.classList.add(...o.iconCssClass.split(" ")),o.iconImage&&(l.style.backgroundImage="url("+o.iconImage+")"),(l=document.createElement("span")).className="slick-gridmenu-content",l.innerHTML=o.title,d.appendChild(l),o.textCssClass&&l.classList.add(...o.textCssClass.split(" ")),i.appendChild(d),e)&&r.bind(d,"click",g.bind(this,o))}}}function c(){i(),t(b)}function a(o){var l=o.touches?o.touches[0]:o,d=(o.preventDefault(),Slick.Utils.emptyElement(f),Slick.Utils.emptyElement(C),x(E,C),z(),y=[],{grid:b,menu:M,allColumns:p,visibleColumns:L()});if((!E||!E.gridMenu||O(E.gridMenu.menuUsabilityOverride,d))&&("function"!=typeof o.stopPropagation||0!=S.onBeforeMenuShow.notify(d,o,S).getReturnValue())){let n,t,i;for(let e=0;e<p.length;e++){n=p[e].id,i=p[e].excludeFromGridMenu?"hidden":"";var s=document.createElement("li"),r=(s.className=i,s.ariaLabel=p[e]&&p[e].name,document.createElement("input")),r=(r.type="checkbox",r.id=k+"-gridmenu-colpicker-"+n,r.dataset.columnid=p[e].id,s.appendChild(r),null==b.getColumnIndex(p[e].id)||p[e].hidden||(r.checked=!0),y.push(r),t=(E&&E.gridMenu&&E.gridMenu.headerColumnValueExtractor?E.gridMenu:w).headerColumnValueExtractor(p[e],h),document.createElement("label"));r.htmlFor=k+"-gridmenu-colpicker-"+n,r.innerHTML=t,s.appendChild(r),f.appendChild(s)}!E.gridMenu||E.gridMenu.hideForceFitButton&&E.gridMenu.hideSyncResizeButton||f.appendChild(document.createElement("hr")),E.gridMenu&&E.gridMenu.hideForceFitButton||(u=E.gridMenu&&E.gridMenu.forceFitTitle||w.forceFitTitle,(c=document.createElement("li")).ariaLabel=u,c.role="menuitem",f.appendChild(c),(a=document.createElement("input")).type="checkbox",a.id=k+"-gridmenu-colpicker-forcefit",a.dataset.option="autoresize",c.appendChild(a),(m=document.createElement("label")).htmlFor=k+"-gridmenu-colpicker-forcefit",m.textContent=u,c.appendChild(m),b.getOptions().forceFitColumns&&(a.checked=!0)),E.gridMenu&&E.gridMenu.hideSyncResizeButton||(u=E.gridMenu&&E.gridMenu.syncResizeTitle||w.syncResizeTitle,(c=document.createElement("li")).ariaLabel=u,f.appendChild(c),(m=document.createElement("input")).type="checkbox",m.id=k+"-gridmenu-colpicker-syncresize",m.dataset.option="syncresize",c.appendChild(m),(a=document.createElement("label")).htmlFor=k+"-gridmenu-colpicker-syncresize",a.textContent=u,c.appendChild(a),b.getOptions().syncColumnCellResize&&(m.checked=!0));let e="BUTTON"===o.target.nodeName?o.target:o.target.querySelector("button");e=e||o.target.parentElement,M.style.display="block",M.style.opacity="0";var u=Slick.Utils.offset(e),c=M.offsetWidth,a=(E.gridMenu&&void 0!==E.gridMenu.useClickToRepositionMenu?E.gridMenu:w).useClickToRepositionMenu,m=(E.gridMenu&&E.gridMenu.contentMinWidth?E.gridMenu:w).contentMinWidth,c=c<m?m:c+5,g=a&&0<l.pageY?l.pageY:u.top+10,a=a&&0<l.pageX?l.pageX:u.left+10,u=(E.gridMenu&&void 0!==E.gridMenu.marginBottom?E.gridMenu:w).marginBottom;M.style.top=g+10+"px",M.style.left=a-c+10+"px",0<m&&(M.style.minWidth=m+"px"),E.gridMenu&&void 0!==E.gridMenu.height?M.style.height=E.gridMenu.height+"px":M.style.maxHeight=R.innerHeight-l.clientY-u+"px",M.style.display="block",M.style.opacity="1",M.appendChild(f),v=!0,"function"==typeof o.stopPropagation&&S.onAfterMenuShow.notify(d,o,S).getReturnValue()}}function m(e){(M===e.target||M&&M.contains(e.target)||!v)&&"close"!==e.target.className||T(e)}function g(e,n){var t=e.command||"";e.disabled||e.divider||"divider"===e||(null!=t&&""!=t&&(t={grid:b,command:t,item:e,allColumns:p,visibleColumns:L()},S.onCommand.notify(t,n,S),"function"==typeof e.action)&&e.action.call(this,n,t),E.gridMenu&&E.gridMenu.leaveOpen||n.defaultPrevented||T(n),n.preventDefault(),n.stopPropagation())}function T(e){var n;M&&(Slick.Utils.hide(M),v=!1,n={grid:b,menu:M,allColumns:p,visibleColumns:L()},S.onMenuClose.notify(n,e,S).getReturnValue())}function z(){for(var e=b.getColumns().slice(0),n=new Array(p.length),t=0;t<n.length;t++)void 0===b.getColumnIndex(p[t].id)?n[t]=p[t]:n[t]=e.shift();p=n}function B(e){var n;if("autoresize"===e.target.dataset.option)i=L(),n=e.target.checked,b.setOptions({forceFitColumns:n}),b.setColumns(i);else if("syncresize"===e.target.dataset.option)b.setOptions({syncColumnCellResize:!!e.target.checked});else if("checkbox"===e.target.type){const n=e.target.checked;var i=e.target.dataset.columnid||"";let t=[];y.forEach((e,n)=>{e.checked&&(p[n].hidden&&(p[n].hidden=!1),t.push(p[n]))}),t.length?(i={columnId:i,showing:n,grid:b,allColumns:p,columns:t},b.setColumns(t),S.onColumnsChanged.notify(i,e,S)):e.target.checked=!0}}function L(){return b.getColumns()}function O(e,n){return"function"!=typeof e||e.call(this,n)}e.onSetOptions.subscribe(function(e,n){var t;n&&n.optionsBefore&&n.optionsAfter&&(t=0<=n.optionsBefore.frozenColumn&&-1===n.optionsAfter.frozenColumn,n=-1===n.optionsBefore.frozenColumn&&0<=n.optionsAfter.frozenColumn,t||n)&&c()}),t(b),Slick.Utils.extend(this,{init:t,getAllColumns:function(){return p},getVisibleColumns:L,destroy:u,deleteMenu:i,recreateGridMenu:c,showGridMenu:a,setOptions:function(e){o=Slick.Utils.extend({},o,e)},updateAllTitles:function(e){n&&n.innerHTML&&(n.innerHTML=e.customTitle),l&&l.innerHTML&&(l.innerHTML=e.columnTitle)},hideMenu:T,onAfterMenuShow:new Slick.Event,onBeforeMenuShow:new Slick.Event,onMenuClose:new Slick.Event,onCommand:new Slick.Event,onColumnsChanged:new Slick.Event})}}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./controls/slick.pager.js | ||
*/ | ||
!function(e){Slick.Utils.extend(!0,e,{Slick:{Controls:{Pager:function(c,r,p,d){const e=C(p);let u,g,m={showAllText:"Showing all {rowCount} rows",showPageText:"Showing page {pageNum} of {pageCount}",showCountText:"From {countBegin} to {countEnd} of {rowCount} rows",showCount:!1,pagingOptions:[{data:0,name:"All",ariaLabel:"Show All Pages"},{data:-1,name:"Auto",ariaLabel:"Auto Page Size"},{data:25,name:"25",ariaLabel:"Show 25 rows per page"},{data:50,name:"50",ariaLabel:"Show 50 rows per page"},{data:100,name:"100",ariaLabel:"Show 100 rows per page"}],showPageSizes:!1};var k=new Slick.BindingEventService;function a(){g=Slick.Utils.extend(!0,{},m,d),c.onPagingInfoChanged.subscribe(function(e,a){v(a)});var e=C(p);if(e&&(!e.jquery||e[0])){const s=document.createElement("span");s.className="slick-pager-nav";var a=document.createElement("span");a.className="slick-pager-settings",(u=document.createElement("span")).className="slick-pager-status";const l=document.createElement("span");l.className="slick-pager-settings-expanded",l.textContent="Show: ";for(let e=0;e<g.pagingOptions.length;e++){var t=g.pagingOptions[e],n=document.createElement("a");n.textContent=t.name,n.ariaLabel=t.ariaLabel,n.dataset.val=t.data,l.appendChild(n),k.bind(n,"click",function(e){var a,e=e.target.dataset.val;void 0!==e&&(-1===Number(e)?b((a=r.getViewport()).bottom-a.top):b(parseInt(e)))})}l.style.display=g.showPageSizes?"block":"none",a.appendChild(l);var i=document.createElement("span"),o=document.createElement("span");i.className="ui-state-default ui-corner-all ui-icon-container",o.ariaLabel="Show Pagination Options",o.role="button",o.className="ui-icon ui-icon-lightbulb slick-icon-lightbulb",i.appendChild(o),k.bind(o,"click",()=>{var e=l.style.display;l.style.display="none"===e?"inline":"none"}),a.appendChild(i);[{key:"first",ariaLabel:"First Page",callback:h},{key:"prev",ariaLabel:"Previous Page",callback:f},{key:"next",ariaLabel:"Next Page",callback:w},{key:"end",ariaLabel:"Last Page",callback:S}].forEach(e=>{var a=document.createElement("span"),t=(a.className="ui-state-default ui-corner-all ui-icon-container",document.createElement("span"));t.role="button",t.ariaLabel=e.ariaLabel,t.className=`ui-icon ui-icon-seek-${e.key} slick-icon-seek-`+e.key,k.bind(t,"click",e.callback),a.appendChild(t),s.appendChild(a)});o=document.createElement("div");o.className="slick-pager",o.appendChild(s),o.appendChild(a),o.appendChild(u),e.appendChild(o)}v(c.getPagingInfo())}function n(){var e=!Slick.GlobalEditorLock.commitCurrentEdit(),a=c.getPagingInfo(),t=a.totalPages-1;return{canGotoFirst:!e&&0!==a.pageSize&&0<a.pageNum,canGotoLast:!e&&0!==a.pageSize&&a.pageNum!==t,canGotoPrev:!e&&0!==a.pageSize&&0<a.pageNum,canGotoNext:!e&&0!==a.pageSize&&a.pageNum<t,pagingInfo:a}}function b(e){c.setRefreshHints({isFilterUnchanged:!0}),c.setPagingOptions({pageSize:e})}function h(){n().canGotoFirst&&c.setPagingOptions({pageNum:0})}function S(){var e=n();e.canGotoLast&&c.setPagingOptions({pageNum:e.pagingInfo.totalPages-1})}function f(){var e=n();e.canGotoPrev&&c.setPagingOptions({pageNum:e.pagingInfo.pageNum-1})}function w(){var e=n();e.canGotoNext&&c.setPagingOptions({pageNum:e.pagingInfo.pageNum+1})}function C(e){return"string"==typeof e?document.querySelector(e):"object"==typeof e&&e[0]?e[0]:e}function v(a){if(e&&(!e.jquery||e[0])){var t=n();if(e.querySelectorAll(".slick-pager-nav span").forEach(e=>e.classList.remove("ui-state-disabled","slick-icon-state-disabled")),t.canGotoFirst||(e.querySelector(".ui-icon-seek-first").classList.add("ui-state-disabled"),e.querySelector(".slick-icon-seek-first").classList.add("slick-icon-state-disabled")),t.canGotoLast||(e.querySelector(".ui-icon-seek-end").classList.add("ui-state-disabled"),e.querySelector(".slick-icon-seek-end").classList.add("slick-icon-state-disabled")),t.canGotoNext||(e.querySelector(".ui-icon-seek-next").classList.add("ui-state-disabled"),e.querySelector(".slick-icon-seek-next").classList.add("slick-icon-state-disabled")),t.canGotoPrev||(e.querySelector(".ui-icon-seek-prev").classList.add("ui-state-disabled"),e.querySelector(".slick-icon-seek-prev").classList.add("slick-icon-state-disabled")),0===a.pageSize?u.textContent=g.showAllText.replace("{rowCount}",a.totalRows+"").replace("{pageCount}",a.totalPages+""):u.textContent=g.showPageText.replace("{pageNum}",a.pageNum+1+"").replace("{pageCount}",a.totalPages+""),g.showCount&&0!==a.pageSize){t=a.pageNum*a.pageSize;let e=u.textContent;e&&(e+=" - "),u.textContent=e+g.showCountText.replace("{rowCount}",a.totalRows+"").replace("{countBegin}",1+t).replace("{countEnd}",Math.min(t+a.pageSize,a.totalRows))}}}a(),Slick.Utils.extend(this,{init:a,destroy:function(){b(0),k.unbindAll(),Slick.Utils.emptyElement(e)}})}}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.autotooltips.js | ||
*/ | ||
!function(e){Slick.Utils.extend(!0,e,{Slick:{AutoTooltips:function(n){var i,t={enableForCells:!0,enableForHeaderCells:!1,maxToolTipLength:null,replaceExisting:!0};function l(){var l=i.getCellFromEvent(event);if(l){let e=i.getCellNode(l.row,l.cell),t;n&&e&&(!e.title||n&&n.replaceExisting)&&(e.clientWidth<e.scrollWidth?(t=e.textContent&&e.textContent.trim()||"",n&&n.maxToolTipLength&&t.length>n.maxToolTipLength&&(t=t.substring(0,n.maxToolTipLength-3)+"...")):t="",e.title=t),e=null}}function o(e,t){t=t.column;let l;e=e.target;!e||!(l=e.closest(".slick-header-column"))||t&&t.toolTip||(l.title=e.clientWidth<l.clientWidth&&t&&t.name||""),l=null}Slick.Utils.extend(this,{init:function(e){n=Slick.Utils.extend(!0,{},t,n),i=e,n.enableForCells&&i.onMouseEnter.subscribe(l),n.enableForHeaderCells&&i.onHeaderMouseEnter.subscribe(o)},destroy:function(){n.enableForCells&&i.onMouseEnter.unsubscribe(l),n.enableForHeaderCells&&i.onHeaderMouseEnter.unsubscribe(o)},pluginName:"AutoTooltips"})}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.cellcopymanager.js | ||
*/ | ||
!function(e){Slick.Utils.extend(!0,e,{Slick:{CellCopyManager:function(){var r,a,C=this;function n(e){var n;if(!r.getEditorLock().isActive()){if(e.which==Slick.keyCode.ESCAPE&&a&&(e.preventDefault(),y(),C.onCopyCancelled.notify({ranges:a}),a=null),67==e.which&&(e.ctrlKey||e.metaKey)&&0!==(n=r.getSelectionModel().getSelectedRanges()).length){e.preventDefault();for(var l=a=n,t=r.getColumns(),o={},i=0;i<l.length;i++)for(var c=l[i].fromRow;c<=l[i].toRow;c++){o[c]={};for(var s=l[i].fromCell;s<=l[i].toCell;s++)o[c][t[s].id]="copied"}r.setCellCssStyles("copy-manager",o),C.onCopyCells.notify({ranges:n})}86==e.which&&(e.ctrlKey||e.metaKey)&&a&&(e.preventDefault(),n=r.getSelectionModel().getSelectedRanges(),C.onPasteCells.notify({from:a,to:n}),r.getOptions().preserveCopiedSelectionOnPaste||(y(),a=null))}}function y(){r.removeCellCssStyles("copy-manager")}Slick.Utils.extend(this,{init:function(e){(r=e).onKeyDown.subscribe(n)},destroy:function(){r.onKeyDown.unsubscribe(n)},pluginName:"CellCopyManager",clearCopySelection:y,onCopyCells:new Slick.Event,onCopyCancelled:new Slick.Event,onPasteCells:new Slick.Event})}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.cellexternalcopymanager.js | ||
*/ | ||
!function(b){Slick.Utils.extend(!0,b,{Slick:{CellExternalCopyManager:function(e){var g,p,y=this,v=e||{},i=v.copiedCellStyleLayerKey||"copy-manager",r=v.copiedCellStyle||"copied",s=0,w=v.bodyElement||document.body,S=v.onCopyInit||null,D=v.onCopySuccess||null,E={C:67,V:86,ESC:27,INSERT:45};function R(e,t,l){var o,n;return t.denyPaste?null:v.dataItemColumnValueSetter?v.dataItemColumnValueSetter(e,t,l):void(t.editor?(o=document.createElement("div"),(n=new t.editor({container:o,column:t,position:{top:0,left:0},grid:g})).loadValue(e),n.applyValue(e,l),n.destroy(),o.remove()):e[t.field]=l)}function x(e){var t=document.createElement("textarea");return t.style.position="absolute",t.style.left="-1000px",t.style.top=document.body.scrollTop+"px",t.value=e,w.appendChild(t),t.select(),t}function t(e,t){var l;if(!g.getEditorLock().isActive()||g.getOptions().autoEdit){if(e.which==E.ESC&&p&&(e.preventDefault(),I(),y.onCopyCancelled.notify({ranges:p}),p=null),(e.which===E.C||e.which===E.INSERT)&&(e.ctrlKey||e.metaKey)&&!e.shiftKey&&(S&&S.call(),0!==(l=g.getSelectionModel().getSelectedRanges()).length)){V(p=l),y.onCopyCells.notify({ranges:l});for(var o,f,n,a=g.getColumns(),i="",r=0;r<l.length;r++){for(var s=l[r],c=[],d=s.fromRow;d<s.toRow+1;d++){var u=[],h=g.getDataItem(d);if(0===c.length&&v.includeHeaderWhenCopying){for(var m=[],C=s.fromCell;C<s.toCell+1;C++)0<a[C].name.length&&!a[C].hidden&&m.push(function(e){if(v.headerColumnValueExtractor){var t=v.headerColumnValueExtractor(e);if(t)return t}return e.name}(a[C]));c.push(m.join("\t"))}for(C=s.fromCell;C<s.toCell+1;C++)0<a[C].name.length&&!a[C].hidden&&u.push(function(e,t,l){if("function"==typeof v.dataItemColumnValueExtractor){var o=v.dataItemColumnValueExtractor(e,t);if(o)return o}let n="";return t&&t.editor?(o=document.createElement("p"),(l=new t.editor({container:o,column:t,event:l,position:{top:0,left:0},grid:g})).loadValue(e),n=l.serializeValue(),l.destroy(),o.remove()):n=e[t.field||""],n}(h,a[C],e));c.push(u.join("\t"))}i+=c.join("\r\n")+"\r\n"}return b.clipboardData?(b.clipboardData.setData("Text",i),!0):(o=document.activeElement,(f=x(i)).focus(),setTimeout(function(){w.removeChild(f),o?o.focus():console.log("Not element to restore focus to after copy?")},100),D&&(n=0,n=1===l.length?l[0].toRow+1-l[0].fromRow:l.length,D.call(this,n)),!1)}if(!v.readOnlyMode&&(e.which===E.V&&(e.ctrlKey||e.metaKey)&&!e.shiftKey||e.which===E.INSERT&&e.shiftKey&&!e.ctrlKey))return f=x(""),setTimeout(function(){var r=g,e=f,s=r.getColumns(),t=e.value.split(/[\n\f\r]/),i=(""===t[t.length-1]&&t.pop(),[]),l=0;w.removeChild(e);for(var o=0;o<t.length;o++)""!==t[o]?i[l++]=t[o].split("\t"):i[l++]=[""];var e=r.getActiveCell(),n=(n=r.getSelectionModel().getSelectedRanges())&&n.length?n[0]:null,c=null,d=null;if(n)c=n.fromRow,d=n.fromCell;else{if(!e)return;c=e.row,d=e.cell}var u=!1,a=i.length,e=i.length?i[0].length:0,h=(1==i.length&&1==i[0].length&&n&&(u=!0,a=n.toRow-n.fromRow+1,e=n.toCell-n.fromCell+1),r.getData().length-c),m=0;if(h<a&&v.newRowCreator){for(var C=r.getData(),m=1;m<=a-h;m++)C.push({});r.setData(C),r.render()}n=c+a>r.getDataLength(),v.newRowCreator&&n&&(n=c+a-r.getDataLength(),v.newRowCreator(n)),n={isClipboardCommand:!0,clippedRange:i,oldValues:[],cellExternalCopyManager:y,_options:v,setDataItemValueForColumn:R,markCopySelection:V,oneCellToMultiple:u,activeRow:c,activeCell:d,destH:a,destW:e,maxDestY:r.getDataLength(),maxDestX:r.getColumns().length,h:0,w:0,execute:function(){for(var e=this.h=0;e<this.destH;e++){this.oldValues[e]=[],this.w=0,this.h++;for(var t=0;t<this.destW;t++){this.w++;var l,o=c+e,n=d+t;o<this.maxDestY&&n<this.maxDestX&&(r.getCellNode(o,n),l=r.getDataItem(o),this.oldValues[e][t]=l[s[n].field],u?this.setDataItemValueForColumn(l,s[n],i[0][0]):this.setDataItemValueForColumn(l,s[n],i[e]?i[e][t]:""),r.updateCell(o,n),r.onCellChange.notify({row:o,cell:n,item:l,grid:r}))}}var a={fromCell:d,fromRow:c,toCell:d+this.w-1,toRow:c+this.h-1};this.markCopySelection([a]),r.getSelectionModel().setSelectedRanges([a]),this.cellExternalCopyManager.onPasteCells.notify({ranges:[a]})},undo:function(){for(var e=0;e<this.destH;e++)for(var t=0;t<this.destW;t++){var l,o=c+e,n=d+t;o<this.maxDestY&&n<this.maxDestX&&(r.getCellNode(o,n),l=r.getDataItem(o),u?this.setDataItemValueForColumn(l,s[n],this.oldValues[0][0]):this.setDataItemValueForColumn(l,s[n],this.oldValues[e][t]),r.updateCell(o,n),r.onCellChange.notify({row:o,cell:n,item:l,grid:r}))}var a={fromCell:d,fromRow:c,toCell:d+this.w-1,toRow:c+this.h-1};if(this.markCopySelection([a]),r.getSelectionModel().setSelectedRanges([a]),this.cellExternalCopyManager.onPasteCells.notify({ranges:[a]}),1<m){for(var i=r.getData();1<m;m--)i.splice(i.length-1,1);r.setData(i),r.render()}}},v.clipboardCommandHandler?v.clipboardCommandHandler(n):n.execute()},100),!1}}function V(e){I();for(var t=g.getColumns(),l={},o=0;o<e.length;o++)for(var n=e[o].fromRow;n<=e[o].toRow;n++){l[n]={};for(var a=e[o].fromCell;a<=e[o].toCell&&a<t.length;a++)l[n][t[a].id]=r}g.setCellCssStyles(i,l),clearTimeout(s),s=setTimeout(function(){y.clearCopySelection()},2e3)}function I(){g.removeCellCssStyles(i)}Slick.Utils.extend(this,{init:function(e){if((g=e).onKeyDown.subscribe(t),!(e=e.getSelectionModel()))throw new Error("Selection model is mandatory for this plugin. Please set a selection model on the grid before adding this plugin: grid.setSelectionModel(new Slick.CellSelectionModel())");e.onSelectedRangesChanged.subscribe(()=>{g.getEditorLock().isActive()||g.focus()})},destroy:function(){g.onKeyDown.unsubscribe(t)},pluginName:"CellExternalCopyManager",clearCopySelection:I,handleKeyDown:t,onCopyCells:new Slick.Event,onCopyCancelled:new Slick.Event,onPasteCells:new Slick.Event,setIncludeHeaderWhenCopying:function(e){v.includeHeaderWhenCopying=e}})}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.cellmenu.js | ||
*/ | ||
!function(e){Slick.Utils.extend(!0,e,{Slick:{Plugins:{CellMenu:function(t){let r,u=-1,m=-1,p,f,d="",l=new Slick.EventHandler,c=this,a,g,h,v=new Slick.BindingEventService,i={autoAdjustDrop:!0,autoAlignSide:!0,autoAdjustDropOffset:0,autoAlignSideOffset:0,hideMenuOnScroll:!0,maxHeight:"none",width:"auto"};function e(e){var t=p.getCellFromEvent(e),t=(u=t&&t.cell,m=t&&t.row,p.getColumns()[u]),l=p.getDataItem(m),i=r.commandItems||[],n=r.optionItems||[];if(t&&t.cellMenu&&(i.length||n.length)&&(b(),0!=c.onBeforeMenuShow.notify({cell:u,row:m,grid:p},e,c).getReturnValue())){var s=isNaN(r.maxHeight)?r.maxHeight:r.maxHeight+"px",o=isNaN(r.width)?r.width:r.width+"px",o=((h=document.createElement("div")).className="slick-cell-menu "+d,h.role="menu",h.style.width=o,h.style.maxHeight=s,h.style.top=e.pageY+5+"px",h.style.left=e.pageX+"px",h.style.display="none",document.createElement("button")),s=(o.type="button",o.className="close",o.dataset.dismiss="slick-cell-menu",o.ariaLabel="Close",document.createElement("span"));if(s.className="close",s.ariaHidden="true",s.textContent="×",o.appendChild(s),!r.hideOptionSection&&0<n.length&&((s=document.createElement("div")).className="slick-cell-menu-option-list",s.role="menu",r.hideCloseButton||(v.bind(o,"click",C),h.appendChild(o)),h.appendChild(s),function(e,l,i,n){if(n&&i&&e){e&&e.optionTitle&&((g=document.createElement("div")).className="title",g.textContent=e.optionTitle,l.appendChild(g));for(let t=0,e=i.length;t<e;t++){let e=!0;var s=i[t],o=y(s.itemVisibilityOverride,n),d=y(s.itemUsabilityOverride,n);o&&(Object.prototype.hasOwnProperty.call(s,"itemUsabilityOverride")&&(s.disabled=!d),(o=document.createElement("div")).className="slick-cell-menu-item",o.role="menuitem",!s.divider&&"divider"!==s||(o.classList.add("slick-cell-menu-item-divider"),e=!1),!s.disabled&&d||o.classList.add("slick-cell-menu-item-disabled"),s.hidden&&o.classList.add("slick-cell-menu-item-hidden"),s.cssClass&&o.classList.add(...s.cssClass.split(" ")),s.tooltip&&(o.title=s.tooltip),(d=document.createElement("div")).className="slick-cell-menu-icon",o.appendChild(d),s.iconCssClass&&d.classList.add(...s.iconCssClass.split(" ")),s.iconImage&&(d.style.backgroundImage="url("+s.iconImage+")"),(d=document.createElement("span")).className="slick-cell-menu-content",d.textContent=s.title,o.appendChild(d),s.textCssClass&&d.classList.add(...s.textCssClass.split(" ")),l.appendChild(o),e)&&v.bind(o,"click",S.bind(this,s))}}}(r,s,n,{cell:u,row:m,column:t,dataContext:l,grid:p})),!r.hideCommandSection&&0<i.length&&((s=document.createElement("div")).className="slick-cell-menu-command-list",s.role="menu",r.hideCloseButton||0!==n.length&&!r.hideOptionSection||(v.bind(o,"click",C),h.appendChild(o)),h.appendChild(s),function(e,l,i,n){if(n&&i&&e){e&&e.commandTitle&&((a=document.createElement("div")).className="title",a.textContent=e.commandTitle,l.appendChild(a));for(let t=0,e=i.length;t<e;t++){let e=!0;var s=i[t],o=y(s.itemVisibilityOverride,n),d=y(s.itemUsabilityOverride,n);o&&(Object.prototype.hasOwnProperty.call(s,"itemUsabilityOverride")&&(s.disabled=!d),(o=document.createElement("div")).className="slick-cell-menu-item",o.role="menuitem",!s.divider&&"divider"!==s||(o.classList.add("slick-cell-menu-item-divider"),e=!1),!s.disabled&&d||o.classList.add("slick-cell-menu-item-disabled"),s.hidden&&o.classList.add("slick-cell-menu-item-hidden"),s.cssClass&&o.classList.add(...s.cssClass.split(" ")),s.tooltip&&(o.title=s.tooltip),(d=document.createElement("div")).className="slick-cell-menu-icon",o.appendChild(d),s.iconCssClass&&d.classList.add(...s.iconCssClass.split(" ")),s.iconImage&&(d.style.backgroundImage="url("+s.iconImage+")"),(d=document.createElement("span")).className="slick-cell-menu-content",d.textContent=s.title,o.appendChild(d),s.textCssClass&&d.classList.add(...s.textCssClass.split(" ")),l.appendChild(o),e)&&v.bind(o,"click",w.bind(this,s))}}}(r,s,i,{cell:u,row:m,column:t,dataContext:l,grid:p})),h.style.display="block",document.body.appendChild(h),0!=c.onAfterMenuShow.notify({cell:u,row:m,grid:p},e,c).getReturnValue())return h}}function C(e){e.defaultPrevented||b(e)}function b(e,t){(h=h||document.querySelector(".slick-cell-menu."+d))&&h.remove&&0!=c.onBeforeMenuClose.notify({cell:t&&t.cell,row:t&&t.row,grid:p,menu:h},e,c).getReturnValue()&&(h.remove(),h=null)}function n(l,i){l instanceof Slick.EventData&&(l=l.getNativeEvent());var n=p.getCellFromEvent(l),s=p.getDataItem(n.row),n=p.getColumns()[n.cell];if(n&&n.cellMenu&&l.preventDefault(),r=Slick.Utils.extend({},r,n.cellMenu),(i=i||{}).columnDef=n,i.dataContext=s,i.grid=p,y(r.menuUsabilityOverride,i)){if(h=e(l)){{n=l;s=n.target.closest(".slick-cell"),i=s&&Slick.Utils.offset(s);let e=s?i.left:n.pageX,t=s?i.top:n.pageY;var o,i=s.offsetWidth||0,n=h&&h.offsetHeight||0,l=h&&h.offsetWidth||r.width||0,d=f.rowHeight,c=r.autoAdjustDropOffset,a=r.autoAlignSideOffset;r.autoAdjustDrop&&(o=Slick.Utils.calculateAvailableSpace(s).bottom,s=Slick.Utils.calculateAvailableSpace(s).top,o=o+c-d,t="top"==(o<n&&o<s-c+d?"top":"bottom")?(h.classList.remove("dropdown"),h.classList.add("dropup"),t-n-c):(h.classList.remove("dropup"),h.classList.add("dropdown"),t+d+c)),r.autoAlignSide&&(o=p.getGridPosition(),"left"==(e+l>=o.width?"left":"right")?(h.classList.remove("dropright"),h.classList.add("dropleft"),e=e-(l-i)-a):(h.classList.remove("dropleft"),h.classList.add("dropright"),e+=a)),h.style.top=t+"px",h.style.left=e+"px"}h.setAttribute("aria-expanded","true"),h.style.display="block"}v.bind(document.body,"mousedown",function(e){h==e.target||h&&h.contains(e.target)||e.defaultPrevented||k(e,{cell:u,row:m})}.bind(this))}}function k(e,t){h&&0!=c.onBeforeMenuClose.notify({cell:t&&t.cell,row:t&&t.row,grid:p,menu:h},e,c).getReturnValue()&&h&&h.remove&&(h.remove(),h=null)}function w(e,t){var l,i,n,s,o;!e||e.disabled||e.divider||"divider"===e||(o=e.command||"",l=m,i=u,n=p.getColumns()[i],s=p.getDataItem(l),null!==o&&""!==o&&(o={cell:i,row:l,grid:p,command:o,item:e,column:n,dataContext:s},c.onCommand.notify(o,t,c),"function"==typeof e.action&&e.action.call(this,t,o),t.defaultPrevented||k(t,{cell:i,row:l})))}function S(e,t){var l,i,n,s,o;!e||e.disabled||e.divider||"divider"===e||p.getEditorLock().commitCurrentEdit()&&(o=void 0!==e.option?e.option:"",l=m,i=u,n=p.getColumns()[i],s=p.getDataItem(l),void 0!==o)&&(o={cell:i,row:l,grid:p,option:o,item:e,column:n,dataContext:s},c.onOptionSelected.notify(o,t,c),"function"==typeof e.action&&e.action.call(this,t,o),t.defaultPrevented||k(t,{cell:i,row:l}))}function y(e,t){return"function"!=typeof e||e.call(this,t)}Slick.Utils.extend(this,{init:function(e){p=e,f=e.getOptions(),r=Slick.Utils.extend({},i,t),d=e&&e.getUID?e.getUID():"",l.subscribe(p.onClick,n),r.hideMenuOnScroll&&l.subscribe(p.onScroll,b)},closeMenu:b,destroy:function(){c.onAfterMenuShow.unsubscribe(),c.onBeforeMenuShow.unsubscribe(),c.onBeforeMenuClose.unsubscribe(),c.onCommand.unsubscribe(),c.onOptionSelected.unsubscribe(),l.unsubscribeAll(),v.unbindAll(),h&&h.remove&&h.remove(),a=null,g=null,h=null},pluginName:"CellMenu",setOptions:function(e){r=Slick.Utils.extend({},r,e)},onAfterMenuShow:new Slick.Event,onBeforeMenuShow:new Slick.Event,onBeforeMenuClose:new Slick.Event,onCommand:new Slick.Event,onOptionSelected:new Slick.Event})}}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.cellrangedecorator.js | ||
*/ | ||
!function(e){Slick.Utils.extend(!0,e,{Slick:{CellRangeDecorator:function(o,l){var s;function e(){s&&(s.remove(),s=null)}l=Slick.Utils.extend(!0,{},{selectionCssClass:"slick-range-decorator",selectionCss:{zIndex:"9999",border:"2px dashed red"},offset:{top:-1,left:-1,height:-2,width:-2}},l),Slick.Utils.extend(this,{pluginName:"CellRangeDecorator",show:function(e){!s&&((s=document.createElement("div")).className=l.selectionCssClass,Object.keys(l.selectionCss).forEach(e=>{s.style[e]=l.selectionCss[e]}),s.style.position="absolute",t=o.getActiveCanvasNode())&&t.appendChild(s);var t=o.getCellNodeBox(e.fromRow,e.fromCell),e=o.getCellNodeBox(e.toRow,e.toCell);return t&&e&&l&&l.offset&&(s.style.top=t.top+l.offset.top+"px",s.style.left=t.left+l.offset.left+"px",s.style.height=e.bottom-t.top+l.offset.height+"px",s.style.width=e.right-t.left+l.offset.width+"px"),s},hide:e,destroy:function(){e()}})}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.cellrangeselector.js | ||
*/ | ||
!function(e){Slick.Utils.extend(!0,e,{Slick:{CellRangeSelector:function(s){var r,a,i,c,n,f,g,u,d,w,p,v,S,m,h,C,o,b,x,y=this,t=new Slick.EventHandler,l={autoScroll:!0,minIntervalToShowNextCell:30,maxIntervalToShowNextCell:600,accelerateInterval:5,selectionCss:{border:"2px dashed blue"}},I=!1,R=0,k=0;function N(e,t){R=t.scrollTop,k=t.scrollLeft}function D(e){n=r.getActiveCanvasNode(e),v=r.getActiveViewportNode(e);var t=r.getDisplayedScrollbarDimensions();S=v.offsetWidth-t.width,m=v.offsetHeight-t.height,C={x:r.getAbsoluteColumnMinWidth()/2,y:r.getOptions().rowHeight/2},I=!(!r.getPluginByName("RowMoveManager")&&!r.getPluginByName("CrossGridRowMoveManager")),d=u=0,p=n.classList.contains("grid-canvas-bottom"),-1<c.frozenRow&&p&&(t=`.${r.getUID()} .grid-canvas-`+(c.frozenBottom?"bottom":"top"),t=document.querySelector(t))&&(u=t.clientHeight||0),w=n.classList.contains("grid-canvas-right"),-1<c.frozenColumn&&w&&(t=document.querySelector(`.${r.getUID()} .grid-canvas-left`))&&(d=t.clientWidth||0),e.stopImmediatePropagation(),e.preventDefault()}function z(o,l){var n=r.getCellFromEvent(o);if(!1!==y.onBeforeCellRangeSelected.notify(n)&&r.canCellBeSelected(n.row,n.cell)&&(f=!0,o.stopImmediatePropagation()),f){r.focus();n=Slick.Utils.offset(i);let e=l.startX-(n.left||0),t=(0<=c.frozenColumn&&w&&(e+=k),l.startY-(n.top||0));0<=c.frozenRow&&p&&(t+=R);o=r.getCellFromPoint(e,t);return l.range={start:o,end:{}},a=l.range,g.show(new Slick.Range(o.row,o.cell))}}function T(e,t){if(f||I){I||e.stopImmediatePropagation();var i,c,e=e.getNativeEvent();if(s.autoScroll)if((h=function(e,t){var o=e.touches?e.touches[0]:e,l=v.scrollLeft,n=v.scrollTop,r=l+S,a=n+m,i=Slick.Utils.offset(v),c=i.left||0,i=i.top||0,s=c+S,f=i+m,e={e:e,dd:t,viewport:{left:l,top:n,right:r,bottom:a,offset:{left:c,top:i,right:s,bottom:f}},offset:{x:0,y:0},isOutsideViewport:!1};o.pageX<c?e.offset.x=o.pageX-c:o.pageX>s&&(e.offset.x=o.pageX-s);o.pageY<i?e.offset.y=i-o.pageY:o.pageY>f&&(e.offset.y=f-o.pageY);return e.isOutsideViewport=!!e.offset.x||!!e.offset.y,e}(e,t)).isOutsideViewport)return b=s.maxIntervalToShowNextCell-Math.abs(h.offset.x)*s.accelerateInterval,x=s.maxIntervalToShowNextCell-Math.abs(h.offset.y)*s.accelerateInterval,void(o||(c=i=0,o=setInterval(function(){var e,t,o,l,n,r=!1,a=!1;h.offset.x?(i+=s.minIntervalToShowNextCell,r=b<=i):i=0,h.offset.y?(c+=s.minIntervalToShowNextCell,a=x<=c):c=0,(r||a)&&(r&&(i=0),a&&(c=0),r=r,a=a,e=h.e.pageX,t=h.e.pageY,o=h.offset.x,l=h.offset.y,n=h.viewport.offset,r&&o&&(e=0<o?n.right+C.x:n.left-C.x),a&&l&&(t=0<l?n.top-C.y:n.bottom+C.y),E({pageX:e,pageY:t},h.dd))},s.minIntervalToShowNextCell)));B(),E(e,t)}}function B(){clearInterval(o),o=null}function E(e,t){var e=e.touches?e.touches[0]:e,o=Slick.Utils.offset(n),e=r.getCellFromPoint(e.pageX-(o&&o.left||0)+d,e.pageY-(o&&o.top||0)+u);if(!(0<=c.frozenColumn&&!w&&e.cell>c.frozenColumn||w&&e.cell<=c.frozenColumn||0<=c.frozenRow&&!p&&e.row>=c.frozenRow||p&&e.row<c.frozenRow)){if(s.autoScroll&&h){var o=r.getCellNodeBox(e.row,e.cell);if(!o)return;var l=h.viewport;(o.left<l.left||o.right>l.right||o.top<l.top||o.bottom>l.bottom)&&r.scrollCellIntoView(e.row,e.cell)}r.canCellBeSelected(e.row,e.cell)&&t&&t.range&&(t.range.end=e,o=new Slick.Range(t.range.start.row,t.range.start.cell,e.row,e.cell),g.show(o),y.onCellRangeSelecting.notify({range:o}))}}function P(e,t){g.hide(),f&&(f=!1,e.stopImmediatePropagation(),B(),y.onCellRangeSelected.notify({range:new Slick.Range(t.range.start.row,t.range.start.cell,t.range.end.row,t.range.end.cell)}))}Slick.Utils.extend(this,{init:function(e){if(void 0===Slick.Draggable)throw new Error('Slick.Draggable is undefined, make sure to import "slick.interactions.js"');s=Slick.Utils.extend(!0,{},l,s),g=s.cellDecorator||new Slick.CellRangeDecorator(e,s),i=(r=e).getCanvasNode(),c=r.getOptions(),t.subscribe(r.onScroll,N).subscribe(r.onDragInit,D).subscribe(r.onDragStart,z).subscribe(r.onDrag,T).subscribe(r.onDragEnd,P)},destroy:function(){t.unsubscribeAll(),i=v=n=null,g&&g.destroy&&g.destroy()},pluginName:"CellRangeSelector",getCellDecorator:function(){return g},getCurrentRange:function(){return a},onBeforeCellRangeSelected:new Slick.Event,onCellRangeSelected:new Slick.Event,onCellRangeSelecting:new Slick.Event})}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.cellselectionmodel.js | ||
*/ | ||
!function(e){Slick.Utils.extend(!0,e,{Slick:{CellSelectionModel:function(l){var s,n,o,a=[],t=this;n=void 0===l||void 0===l.cellRangeSelector?new Slick.CellRangeSelector({selectionCss:{border:"2px solid black"}}):l.cellRangeSelector;var c={selectActiveCell:!0};function u(e){for(var l=[],n=0;n<e.length;n++){var o=e[n];s.canCellBeSelected(o.fromRow,o.fromCell)&&s.canCellBeSelected(o.toRow,o.toCell)&&l.push(o)}return l}function w(e,l){var n;(a&&0!==a.length||e&&0!==e.length)&&(n=!function(e,l){var n=e.length!==l.length;if(!n)for(var o=0;o<e.length;o++)if(e[o].fromCell!==l[o].fromCell||e[o].fromRow!==l[o].fromRow||e[o].toCell!==l[o].toCell||e[o].toRow!==l[o].toRow){n=!0;break}return!n}(a,e),a=u(e),n)&&(e=new Slick.EventData(null,a),Object.defineProperty(e,"detail",{writable:!0,configurable:!0,value:{caller:l||"SlickCellSelectionModel.setSelectedRanges"}}),t.onSelectedRangesChanged.notify(a,e))}function e(){return a}function i(e){if(s.getEditorLock().isActive())return e.stopPropagation(),!1}function r(e,l){s.setActiveCell(l.range.fromRow,l.range.fromCell,!1,!1,!0),w([l.range])}function g(e,l){o.selectActiveCell&&null!=l.row&&null!=l.cell?w([new Slick.Range(l.row,l.cell)]):o.selectActiveCell||w([])}function f(e){var l,n,o,t,c,i=s.getActiveCell(),r=e.ctrlKey||e.metaKey;!i||!e.shiftKey||r||e.altKey||37!=e.which&&39!=e.which&&38!=e.which&&40!=e.which||((r=a.slice()).length||r.push(new Slick.Range(i.row,i.cell)),t=(l=(l=r.pop()).contains(i.row,i.cell)?l:new Slick.Range(i.row,i.cell)).toRow-l.fromRow,c=l.toCell-l.fromCell,n=i.row==l.fromRow?1:-1,o=i.cell==l.fromCell?1:-1,37==e.which?c-=o:39==e.which?c+=o:38==e.which?t-=n:40==e.which&&(t+=n),u([t=new Slick.Range(i.row,i.cell,i.row+n*t,i.cell+o*c)]).length?(r.push(t),i=0<n?t.toRow:t.fromRow,c=0<o?t.toCell:t.fromCell,s.scrollRowIntoView(i),s.scrollCellIntoView(i,c)):r.push(l),w(r),e.preventDefault(),e.stopPropagation())}Slick.Utils.extend(this,{getSelectedRanges:e,setSelectedRanges:w,refreshSelections:function(){w(a)},init:function(e){o=Slick.Utils.extend(!0,{},c,l),(s=e).onActiveCellChanged.subscribe(g),s.onKeyDown.subscribe(f),e.registerPlugin(n),n.onCellRangeSelected.subscribe(r),n.onBeforeCellRangeSelected.subscribe(i)},destroy:function(){s.onActiveCellChanged.unsubscribe(g),s.onKeyDown.unsubscribe(f),n.onCellRangeSelected.unsubscribe(r),n.onBeforeCellRangeSelected.unsubscribe(i),s.unregisterPlugin(n),n&&n.destroy&&n.destroy()},pluginName:"CellSelectionModel",onSelectedRangesChanged:new Slick.Event})}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.checkboxselectcolumn.js | ||
*/ | ||
!function(e){Slick.Utils.extend(!0,e,{Slick:{CheckboxSelectColumn:function(e){let d,s,h=!1,f=null,m,g=w(),t=new Slick.EventHandler,p={},b=!1,n=new Slick.BindingEventService,k=Slick.Utils.extend(!0,{},{columnId:"_checkbox_selector",cssClass:null,hideSelectAllCheckbox:!1,toolTip:"Select/Deselect All",width:30,applySelectOnAllPages:!1,hideInColumnTitleRow:!1,hideInFilterHeaderRow:!0},e);"function"==typeof k.selectableOverride&&y(k.selectableOverride);function l(){s.updateColumnHeader(k.columnId,"","")}function o(){var e=m&&m.querySelector("#filter-checkbox-selectall-container");e&&(e.style.display="none")}function c(){var e=s.getSelectedRows();let t={},l,o,c,n=0;if("function"==typeof f)for(c=0;c<s.getDataLength();c++){var i=s.getDataItem(c);I(o,i,s)||n++}var r,d=[];for(o=0;o<e.length;o++){l=e[o];var a=s.getDataItem(l);I(o,a,s)?(t[l]=!0,t[l]!==p[l]&&(s.invalidateRow(l),delete p[l])):d.push(l)}for(o in p)s.invalidateRow(o);if(p=t,s.render(),b=e&&e.length+n>=s.getDataLength(),h&&k.applySelectOnAllPages||(k.hideInColumnTitleRow||k.hideSelectAllCheckbox||v(b),k.hideInFilterHeaderRow)||(r=m&&m.querySelector("#header-filter-selector"+g))&&(r.checked=b),0<d.length){for(o=0;o<d.length;o++){var u=e.indexOf(d[o]);e.splice(u,1)}s.setSelectedRows(e,"click.cleanup")}}function i(){var e=d.getAllSelectedFilteredIds(),o=d.getFilteredItems();let c=0;if("function"==typeof f&&0<e.length)for(let e=0;e<d.getItemCount();e++){var n=d.getItemByIdx(e);let t=d.getIdPropertyName(),l=n[t];0<=o.findIndex(function(e){return e[t]===l})&&!I(e,n,s)&&c++}b=(e&&e.length)+c>=o.length,k.hideInColumnTitleRow||k.hideSelectAllCheckbox||v(b),k.hideInFilterHeaderRow||(e=m&&m.querySelector("#header-filter-selector"+g))&&(e.checked=b)}function r(e,t){32==e.which&&s.getColumns()[t.cell].id===k.columnId&&(s.getEditorLock().isActive()&&!s.getEditorLock().commitCurrentEdit()||u(t.row),e.preventDefault(),e.stopImmediatePropagation())}function a(e,t){s.getColumns()[t.cell].id===k.columnId&&"checkbox"===e.target.type&&(s.getEditorLock().isActive()&&!s.getEditorLock().commitCurrentEdit()?e.preventDefault():(u(t.row),e.stopPropagation()),e.stopImmediatePropagation())}function u(t){var e=s.getDataItem(t);I(t,e,s)&&(p[t]?(e=s.getSelectedRows().filter(e=>e!==t),s.setSelectedRows(e,"click.toggle")):s.setSelectedRows(s.getSelectedRows().concat(t),"click.toggle"),s.setActiveCell(t,function(){if(null===S){S=0;var t=s.getColumns();for(let e=0;e<t.length;e++)t[e].id==k.columnId&&(S=e)}return S}()))}function C(t,l){if(l.column.id==k.columnId&&"checkbox"===t.target.type){if(s.getEditorLock().isActive()&&!s.getEditorLock().commitCurrentEdit())t.preventDefault();else{let e=t.target.checked;var l=e?"click.selectAll":"click.unselectAll",o=[];if(e){for(let e=0;e<s.getDataLength();e++){var c=s.getDataItem(e);c.__group||c.__groupTotals||!I(e,c,s)||o.push(e)}e=!0}if(h&&d&&k.applySelectOnAllPages){var n=[],i=d.getFilteredItems();for(let e=0;e<i.length;e++){var r=i[e];I(e,r,s)&&n.push(r[d.getIdPropertyName()])}d.setSelectedIds(n,{isRowBeingAdded:e})}s.setSelectedRows(o,l),t.stopPropagation()}t.stopImmediatePropagation()}}let S=null;function w(){return Math.round(1e7*Math.random())}function x(e,t,l,o,c,n){var i=w()+e;return c&&I(e,c,n)?p[e]?"<input id='selector"+i+"' type='checkbox' checked='checked'><label for='selector"+i+"'></label>":"<input id='selector"+i+"' type='checkbox'><label for='selector"+i+"'></label>":null}function I(e,t,l){return"function"!=typeof f||f(e,t,l)}function v(e){e?s.updateColumnHeader(k.columnId,"<input id='header-selector"+g+"' type='checkbox' checked='checked'><label for='header-selector"+g+"'></label>",k.toolTip):s.updateColumnHeader(k.columnId,"<input id='header-selector"+g+"' type='checkbox'><label for='header-selector"+g+"'></label>",k.toolTip)}function y(e){f=e}Slick.Utils.extend(this,{init:function(e){s=e,(h=!Array.isArray(e.getData()))&&(d=e.getData()),t.subscribe(s.onSelectedRowsChanged,c).subscribe(s.onClick,a).subscribe(s.onKeyDown,r),h&&d&&k.applySelectOnAllPages&&t.subscribe(d.onSelectedRowIdsChanged,i).subscribe(d.onPagingInfoChanged,i),k.hideInFilterHeaderRow||(e=e,t.subscribe(e.onHeaderRowCellRendered,function(e,t){var l,o,c;"sel"===t.column.field&&(Slick.Utils.emptyElement(t.node),(l=document.createElement("span")).id="filter-checkbox-selectall-container",(o=document.createElement("input")).type="checkbox",o.id="header-filter-selector"+g,(c=document.createElement("label")).htmlFor="header-filter-selector"+g,l.appendChild(o),l.appendChild(c),t.node.appendChild(l),m=t.node,n.bind(l,"click",e=>C(e,t)))})),k.hideInColumnTitleRow||t.subscribe(s.onHeaderClick,C)},destroy:function(){t.unsubscribeAll(),n.unbindAll()},pluginName:"CheckboxSelectColumn",deSelectRows:function(e){let t,l=e.length,o=[];for(t=0;t<l;t++)p[e[t]]&&(o[o.length]=e[t]);s.setSelectedRows(s.getSelectedRows().filter(e=>o.indexOf(e)<0),"SlickCheckboxSelectColumn.deSelectRows")},selectRows:function(e){let t,l=e.length,o=[];for(t=0;t<l;t++)p[e[t]]||(o[o.length]=e[t]);s.setSelectedRows(s.getSelectedRows().concat(o),"SlickCheckboxSelectColumn.selectRows")},getColumnDefinition:function(){return{id:k.columnId,name:k.hideSelectAllCheckbox||k.hideInColumnTitleRow?"":"<input id='header-selector"+g+"' type='checkbox'><label for='header-selector"+g+"'></label>",toolTip:k.hideSelectAllCheckbox||k.hideInColumnTitleRow?"":k.toolTip,field:"sel",width:k.width,resizable:!1,sortable:!1,cssClass:k.cssClass,hideSelectAllCheckbox:k.hideSelectAllCheckbox,formatter:x,excludeFromColumnPicker:void 0===k.excludeFromColumnPicker||k.excludeFromColumnPicker,excludeFromGridMenu:void 0===k.excludeFromGridMenu||k.excludeFromGridMenu,excludeFromHeaderMenu:void 0===k.excludeFromHeaderMenu||k.excludeFromHeaderMenu}},getOptions:function(){return k},selectableOverride:y,setOptions:function(e){(k=Slick.Utils.extend(!0,{},k,e)).hideSelectAllCheckbox?(l(),o()):(k.hideInColumnTitleRow?l():(v(b),t.subscribe(s.onHeaderClick,C)),k.hideInFilterHeaderRow?o():(e=m.querySelector("#filter-checkbox-selectall-container"))&&(e.style.display="flex",e=e.querySelector('input[type="checkbox"]'))&&(e.checked=b))}})}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.contextmenu.js | ||
*/ | ||
!function(e){Slick.Utils.extend(!0,e,{Slick:{Plugins:{ContextMenu:function(t){let r,m=-1,u=-1,p,a,h="",n=new Slick.EventHandler,f=this,v,C,g,b=new Slick.BindingEventService,i={autoAdjustDrop:!0,autoAlignSide:!0,autoAdjustDropOffset:-4,autoAlignSideOffset:0,hideMenuOnScroll:!1,maxHeight:"none",width:"auto",optionShownOverColumnIds:[],commandShownOverColumnIds:[]};function e(e){var t=(e=e instanceof Slick.EventData?e.getNativeEvent():e).touches?e.touches[0]:e,n=p.getCellFromEvent(e),n=(m=n&&n.cell,u=n&&n.row,p.getColumns()[m]),i=p.getDataItem(u),l=x(r.optionShownOverColumnIds,n.id),o=x(r.commandShownOverColumnIds,n.id),s=r.commandItems||[],d=r.optionItems||[];if(n&&(o||l)&&(s.length||d.length)&&(S(e),0!=f.onBeforeMenuShow.notify({cell:m,row:u,grid:p},e,f).getReturnValue())){var c=isNaN(r.maxHeight)?r.maxHeight:r.maxHeight+"px",a=isNaN(r.width)?r.width:r.width+"px",a=((g=document.createElement("div")).className="slick-context-menu "+h,g.role="menu",g.style.width=a,g.style.maxHeight=c,g.style.top=t.pageY+"px",g.style.left=t.pageX+"px",g.style.display="none",document.createElement("button")),c=(a.type="button",a.className="close",a.dataset.dismiss="slick-context-menu",a.ariaLabel="Close",document.createElement("span"));if(c.className="close",c.ariaHidden="true",c.textContent="×",a.appendChild(c),!r.hideOptionSection&&l&&0<d.length&&((t=document.createElement("div")).className="slick-context-menu-option-list",t.role="menu",r.hideCloseButton||(b.bind(a,"click",w),g.appendChild(a)),g.appendChild(t),function(e,n,i,l){if(l&&i&&e){e&&e.optionTitle&&((v=document.createElement("div")).className="title",v.textContent=e.optionTitle,n.appendChild(v));for(let t=0,e=i.length;t<e;t++){let e=!0;var o=i[t],s=O(o.itemVisibilityOverride,l),d=O(o.itemUsabilityOverride,l);s&&(Object.prototype.hasOwnProperty.call(o,"itemUsabilityOverride")&&(o.disabled=!d),(s=document.createElement("div")).className="slick-context-menu-item",s.role="menuitem",!o.divider&&"divider"!==o||(s.classList.add("slick-context-menu-item-divider"),e=!1),!o.disabled&&d||s.classList.add("slick-context-menu-item-disabled"),o.hidden&&s.classList.add("slick-context-menu-item-hidden"),o.cssClass&&s.classList.add(...o.cssClass.split(" ")),o.tooltip&&(s.title=o.tooltip),(d=document.createElement("div")).role="button",d.className="slick-context-menu-icon",s.appendChild(d),o.iconCssClass&&d.classList.add(...o.iconCssClass.split(" ")),o.iconImage&&(d.style.backgroundImage="url("+o.iconImage+")"),(d=document.createElement("span")).className="slick-context-menu-content",d.textContent=o.title,s.appendChild(d),o.textCssClass&&d.classList.add(...o.textCssClass.split(" ")),n.appendChild(s),e)&&b.bind(s,"click",y.bind(this,o))}}}(r,t,d,{cell:m,row:u,column:n,dataContext:i,grid:p})),!r.hideCommandSection&&o&&0<s.length&&((c=document.createElement("div")).className="slick-context-menu-command-list",c.role="menu",r.hideCloseButton||l&&0!==d.length&&!r.hideOptionSection||(b.bind(a,"click",w),g.appendChild(a)),g.appendChild(c),function(e,n,i,l){if(l&&i&&e){e&&e.commandTitle&&((C=document.createElement("div")).className="title",C.textContent=e.commandTitle,n.appendChild(C));for(let t=0,e=i.length;t<e;t++){let e=!0;var o=i[t],s=O(o.itemVisibilityOverride,l),d=O(o.itemUsabilityOverride,l);s&&(Object.prototype.hasOwnProperty.call(o,"itemUsabilityOverride")&&(o.disabled=!d),(s=document.createElement("div")).className="slick-context-menu-item",s.role="menuitem",!o.divider&&"divider"!==o||(s.classList.add("slick-context-menu-item-divider"),e=!1),!o.disabled&&d||s.classList.add("slick-context-menu-item-disabled"),o.hidden&&s.classList.add("slick-context-menu-item-hidden"),o.cssClass&&s.classList.add(...o.cssClass.split(" ")),o.tooltip&&(s.title=o.tooltip),(d=document.createElement("div")).className="slick-context-menu-icon",s.appendChild(d),o.iconCssClass&&d.classList.add(...o.iconCssClass.split(" ")),o.iconImage&&(d.style.backgroundImage="url("+o.iconImage+")"),(d=document.createElement("span")).className="slick-context-menu-content",d.textContent=o.title,s.appendChild(d),o.textCssClass&&d.classList.add(...o.textCssClass.split(" ")),n.appendChild(s),e)&&b.bind(s,"click",k.bind(this,o))}}}(r,c,s,{cell:m,row:u,column:n,dataContext:i,grid:p})),g.style.display="block",document.body.appendChild(g),0!=f.onAfterMenuShow.notify({cell:m,row:u,grid:p},e,f).getReturnValue())return g}}function w(e){e.defaultPrevented||S(e)}function S(e,t){(g=g||document.querySelector(".slick-context-menu."+h))&&g.remove&&0!=f.onBeforeMenuClose.notify({cell:t&&t.cell,row:t&&t.row,grid:p,menu:g},e,f).getReturnValue()&&(g.remove(),g=null)}function x(n,i){let l=!1;if(n&&0<n.length)for(let e=0,t=n.length;e<t;e++)n[e]===i&&(l=!0);else l=!0;return l}function l(n,i){(n=n instanceof Slick.EventData?n.getNativeEvent():n).preventDefault();var l,o=p.getCellFromEvent(n),s=p.getColumns()[o.cell],d=p.getDataItem(o.row);if((i=i||{}).cell=o.cell,i.row=o.row,i.columnDef=s,i.dataContext=d,i.grid=p,O(r.menuUsabilityOverride,i)){if(g=e(n)){{o=n;s=o.touches?o.touches[0]:o,o=o.target.closest(".slick-cell");let e=s.pageX,t=o?Slick.Utils.offset(o).top:s.pageY;s=g&&g.offsetHeight||0,d=g&&g.offsetWidth||r.width||0;var i=a.rowHeight,n=r.autoAdjustDropOffset,c=r.autoAlignSideOffset;r.autoAdjustDrop&&(l=Slick.Utils.calculateAvailableSpace(o).bottom,o=Slick.Utils.calculateAvailableSpace(o).top,l=(l=l+n-i)<s&&l<o-n+i?"top":"bottom",t="top"==l?(g.classList.remove("dropdown"),g.classList.add("dropup"),t-s-n):(g.classList.remove("dropup"),g.classList.add("dropdown"),t+i+n));r.autoAlignSide&&(o=p.getGridPosition(),"left"==(e+d>=o.width?"left":"right")?(g.classList.remove("dropright"),g.classList.add("dropleft"),e=e-d-c):(g.classList.remove("dropleft"),g.classList.add("dropright"),e+=c));g.style.top=t+"px",g.style.left=e+"px"}g.style.display="block"}b.bind(document.body,"click",e=>{e.defaultPrevented||S(e,{cell:m,row:u})})}}function k(t,n){if(t&&!t.disabled&&!t.divider){var i=t.command||"",l=u,o=m,s=p.getColumns()[o],d=p.getDataItem(l);let e;Object.prototype.hasOwnProperty.call(d,s&&s.field)&&(e=d[s.field]),null!=i&&""!==i&&(o={cell:o,row:l,grid:p,command:i,item:t,column:s,dataContext:d,value:e},f.onCommand.notify(o,n,f),"function"==typeof t.action)&&t.action.call(this,n,o)}}function y(e,t){var n,i,l,o,s;e.disabled||e.divider||p.getEditorLock().commitCurrentEdit()&&(n=void 0!==e.option?e.option:"",i=u,s=m,l=p.getColumns()[s],o=p.getDataItem(i),void 0!==n)&&(s={cell:s,row:i,grid:p,option:n,item:e,column:l,dataContext:o},f.onOptionSelected.notify(s,t,f),"function"==typeof e.action)&&e.action.call(this,t,s)}function O(e,t){return"function"!=typeof e||e.call(this,t)}Slick.Utils.extend(this,{init:function(e){p=e,a=e.getOptions(),r=Slick.Utils.extend({},i,t),h=e&&e.getUID?e.getUID():"",n.subscribe(p.onContextMenu,l),r.hideMenuOnScroll&&n.subscribe(p.onScroll,S)},closeMenu:S,destroy:function(){f.onAfterMenuShow.unsubscribe(),f.onBeforeMenuShow.unsubscribe(),f.onBeforeMenuClose.unsubscribe(),f.onCommand.unsubscribe(),f.onOptionSelected.unsubscribe(),n.unsubscribeAll(),b.unbindAll(),g&&g.remove&&g.remove(),C=null,v=null,g=null},pluginName:"ContextMenu",setOptions:function(e){r=Slick.Utils.extend({},r,e),e.commandShownOverColumnIds&&(r.commandShownOverColumnIds=e.commandShownOverColumnIds),e.optionShownOverColumnIds&&(r.optionShownOverColumnIds=e.optionShownOverColumnIds)},onAfterMenuShow:new Slick.Event,onBeforeMenuShow:new Slick.Event,onBeforeMenuClose:new Slick.Event,onCommand:new Slick.Event,onOptionSelected:new Slick.Event})}}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.crossgridrowmovemanager.js | ||
*/ | ||
!function(e){Slick.Utils.extend(!0,e,{Slick:{CrossGridRowMoveManager:function(n){var l,s,r,c,d,i=this,a=null,o=new Slick.EventHandler,t={columnId:"_move",cssClass:null,cancelEditOnDrag:!1,disableRowSelection:!1,hideRowMoveShadow:!0,rowMoveShadowMarginTop:0,rowMoveShadowMarginLeft:0,rowMoveShadowOpacity:.95,rowMoveShadowScale:.75,singleRowMove:!1,width:40};n&&"function"==typeof n.usabilityOverride&&y(n.usabilityOverride);function w(e){e.stopImmediatePropagation()}function u(e,o){var t=l.getCellFromEvent(e),i=t&&t.row;if(p(i,l.getDataItem(i),l)){if(n.cancelEditOnDrag&&l.getEditorLock().isActive()&&l.getEditorLock().cancelCurrentEdit(),l.getEditorLock().isActive()||!f(t.cell))return!1;d=!0,e.stopImmediatePropagation(),n.hideRowMoveShadow||(e=(i=l.getCellNode(t.row,t.cell))&&i.closest(".slick-row"))&&(o.clonedSlickRow=e.cloneNode(!0),o.clonedSlickRow.classList.add("slick-reorder-shadow-row"),o.clonedSlickRow.style.display="none",o.clonedSlickRow.style.marginLeft=Number(n.rowMoveShadowMarginLeft||0)+"px",o.clonedSlickRow.style.marginTop=Number(n.rowMoveShadowMarginTop||0)+"px",o.clonedSlickRow.style.opacity=""+(n.rowMoveShadowOpacity||.95),o.clonedSlickRow.style.transform=`scale(${n.rowMoveShadowScale||.75})`,s.appendChild(o.clonedSlickRow));i=n.singleRowMove?[t.row]:l.getSelectedRows(),e=(0!==i.length&&i.some(e=>e===t.row)||(i=[t.row],n.disableRowSelection)||l.setSelectedRows(i),i.sort(function(e,o){return e-o}),l.getOptions().rowHeight);o.fromGrid=l,o.toGrid=r,o.selectedRows=i,o.selectionProxy=document.createElement("div"),o.selectionProxy.className="slick-reorder-proxy",o.selectionProxy.style.display="none",o.selectionProxy.style.position="absolute",o.selectionProxy.style.zIndex="99999",o.selectionProxy.style.width=c.clientWidth+"px",o.selectionProxy.style.height=e*i.length+"px",c.appendChild(o.selectionProxy),o.guide=document.createElement("div"),o.guide.className="slick-reorder-guide",o.guide.style.position="absolute",o.guide.style.zIndex="99999",o.guide.style.width=c.clientWidth+"px",o.guide.style.top="-1000px",c.appendChild(o.guide),o.insertBefore=-1}}function g(e,o){var t;d&&(e.stopImmediatePropagation(),e=((e=e.getNativeEvent()).touches?e.touches[0]:e).pageY-(Slick.Utils.offset(c).top||0),o.selectionProxy.style.top=e-5+"px",o.selectionProxy.style.display="block",o.clonedSlickRow&&(o.clonedSlickRow.style.top=e-6+"px",o.clonedSlickRow.style.display="block"),(e=Math.max(0,Math.min(Math.round(e/r.getOptions().rowHeight),r.getDataLength())))!==o.insertBefore)&&(!(t={fromGrid:l,toGrid:r,rows:o.selectedRows,insertBefore:e})===i.onBeforeMoveRows.notify(t).getReturnValue()?o.canMove=!1:o.canMove=!0,a&&o.canMove&&(t=r.getDataItem(e),o.canMove=p(e,t,r)),o.canMove?o.guide.style.top=e*(r.getOptions().rowHeight||0)+"px":o.guide.style.top="-1000px",o.insertBefore=e)}function v(e,o){d&&(d=!1,e.stopImmediatePropagation(),o.guide.remove(),o.selectionProxy.remove(),o.clonedSlickRow&&(o.clonedSlickRow.remove(),o.clonedSlickRow=null),o.canMove)&&(e={fromGrid:l,toGrid:r,rows:o.selectedRows,insertBefore:o.insertBefore},i.onMoveRows.notify(e))}function e(e,o,t,i,n,l){return p(e,n,l)?{addClasses:"cell-reorder dnd",text:""}:null}function p(e,o,t){return"function"!=typeof a||a(e,o,t)}function y(e){a=e}function f(e){return/move|selectAndMove/.test(l.getColumns()[e].behavior)}Slick.Utils.extend(this,{onBeforeMoveRows:new Slick.Event,onMoveRows:new Slick.Event,init:function(e){n=Slick.Utils.extend(!0,{},t,n),s=(l=e).getCanvasNode(),r=n.toGrid,c=r.getCanvasNode(),o.subscribe(l.onDragInit,w).subscribe(l.onDragStart,u).subscribe(l.onDrag,g).subscribe(l.onDragEnd,v)},destroy:function(){o.unsubscribeAll()},getColumnDefinition:function(){return{id:n.columnId||"_move",name:"",field:"move",width:n.width||40,behavior:"selectAndMove",selectable:!1,resizable:!1,cssClass:n.cssClass,formatter:e}},setOptions:function(e){n=Slick.Utils.extend({},n,e)},usabilityOverride:y,isHandlerColumn:f,pluginName:"CrossGridRowMoveManager"})}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.customtooltip.js | ||
*/ | ||
!function(C){Slick.Utils.extend(!0,C,{Slick:{Plugins:{CustomTooltip:function(o){var i,f,l,d,m,p,c,g={className:"slick-custom-tooltip",offsetLeft:0,offsetRight:0,offsetTopBottom:4,hideArrow:!1,tooltipTextMaxLength:700,regularTooltipWhiteSpace:"pre-line",whiteSpace:"normal"},r=new Slick.EventHandler,h={};function n(t,e){s(t,e,"slick-header-column")}function a(t,e){s(t,e,"slick-headerrow-column")}function s(t,e,o){b();var i={row:-1,cell:d.getColumns().findIndex(function(t){return e&&e.column&&e.column.id===t.id})},l=e.column,r={},n="slick-headerrow-column"===o;(e=e||{}).cell=i.cell,e.row=i.row,e.columnDef=l,e.dataContext=r,e.grid=d,e.type=n?"header-row":"header",h=Slick.Utils.extend(!0,{},c,l.customTooltip),l&&l.disableTooltip||!k(h.usabilityOverride,e)||l&&t.target&&(t=t.target,o=o,f="function"!=typeof t.closest?t.classList.contains(o)?t:t.parentElement.classList.contains(o)?t.parentElement:null:t.closest("."+o),t=n?h.headerRowFormatter:h.headerFormatter,h.useRegularTooltip||!t?y(n?h.useRegularTooltip?null:t:l.name,i,null,l,r):f&&"function"==typeof t&&S(t,i,null,l,r))}function u(t,e){if(b(),d&&t){var r=d.getCellFromEvent(t);if(r){var n=l?l.getItem(r.row):d.getDataItem(r.row),a=d.getColumns()[r.cell];if(f=d.getCellNode(r.row,r.cell),h=Slick.Utils.extend(!0,{},c,a.customTooltip),n&&a&&((e=e||{}).cell=r.cell,e.row=r.row,e.columnDef=a,e.dataContext=n,e.grid=d,e.type="cell",!(a&&a.disableTooltip||!k(h.usabilityOverride,e)))){var s=n.hasOwnProperty(a.field)?n[a.field]:null;if(h.useRegularTooltip||!h.formatter)y(a.formatter,r,s,a,n);else if("function"==typeof h.formatter&&S(h.formatter,r,s,a,n),"function"==typeof h.asyncProcess){t=h.asyncProcess(r.row,r.cell,s,a,n,d);if(!h.asyncPostFormatter)throw new Error('[SlickGrid] when using "asyncProcess", you must also provide an "asyncPostFormatter" formatter');t instanceof Promise&&(i=function(t){var e=!1;if(t instanceof Promise)return{promise:t.then(function(t){if(e)throw{isPromiseCancelled:!0};return t}),cancel:function(){e=!0}};return t}(t)).promise.then(function(t){var e=r,o=s,i=a,l=n;b(),l=Slick.Utils.extend(!0,{},l,{[h.asyncParamsPropName||"__params"]:t}),S(h.asyncPostFormatter,e,o,i,l)}).catch(function(t){if(!t.isPromiseCancelled)throw t})}}}}}function w(e,t){var o;return e?(t.forEach(function(t){t=e.getAttribute(t);t&&(o=t)}),o):null}function y(t,e,o,i,l){var r,n=document.createElement("div"),a=(n.innerHTML=T(t,e,o,i,l),i.toolTip||"");a||(f&&f.clientWidth<f.scrollWidth&&!h.useRegularTooltipFromFormatterOnly?(a=(f.textContent||"").trim()||"",h.tooltipTextMaxLength&&a.length>h.tooltipTextMaxLength&&(a=a.substring(0,h.tooltipTextMaxLength-3)+"..."),r=f):(h.useRegularTooltipFromFormatterOnly?r=n.querySelector("[title], [data-slick-tooltip]"):(r=w(f,["title","data-slick-tooltip"])?f:n.querySelector("[title], [data-slick-tooltip]"))&&w(r,["title","data-slick-tooltip"])||!f||(r=f.querySelector("[title], [data-slick-tooltip]")),(!a||"function"==typeof t&&h.useRegularTooltipFromFormatterOnly)&&(a=w(r,["title","data-slick-tooltip"])||""))),""!==a&&S(t,e,o,i,l,a),x(r,a)}function x(t,e){t=t||f&&(f.hasAttribute("title")&&f.getAttribute("title")?f:f.querySelector("[title]"));t&&(t.setAttribute("data-slick-tooltip",e||""),t.hasAttribute("title"))&&t.setAttribute("title","")}function v(t){var e=0,o=(C.pageXOffset||document.documentElement.scrollLeft,C.pageYOffset||document.documentElement.scrollTop||0),t=L(t);return e=t?t.top-o:e}function L(t){var e,o,i,l;if(t)return void(l=i=o=e=0)!==(t=t.getBoundingClientRect()).top&&void 0!==t.left&&(e=t.top+C.pageYOffset,o=t.left+C.pageXOffset,l=t.right,i=t.bottom),{top:e,left:o,bottom:i,right:l}}function b(){i&&i.cancel&&i.cancel();var t=document.body.querySelector("."+h.className+"."+d.getUID());t&&t.remove&&t.remove()}function T(t,e,o,i,l){return"function"==typeof t?(o="object"==typeof(e=t(e.row,e.cell,o,i,l,d))&&e&&e.text?e.text:"string"==typeof e?e:"",d.sanitizeHtmlString(o)):"string"==typeof t?d.sanitizeHtmlString(t):""}function S(t,e,o,i,l,r,n){(p=document.createElement("div")).className=h.className,p.classList.add(d.getUID()),p.classList.add("l"+e.cell),p.classList.add("r"+e.cell);var a,s,c,t=r||T(t,e,o,i,l)||"",t=h.tooltipTextMaxLength&&t.length>h.tooltipTextMaxLength?t.substring(0,h.tooltipTextMaxLength-3)+"...":t;let u="";!r||h&&h.renderRegularTooltipAsHtml?(u=d.sanitizeHtmlString(t),p.innerHTML=u,p.style.whiteSpace=h&&h.whiteSpace||g.whiteSpace):(u=t||"",p.textContent=u,p.style.whiteSpace=h&&h.regularTooltipWhiteSpace||g.regularTooltipWhiteSpace),h.maxHeight&&(p.style.maxHeight=h.maxHeight+"px"),h.maxWidth&&(p.style.maxWidth=h.maxWidth+"px"),u&&(document.body.appendChild(p),o=e,p&&(o=L(f=f||d.getCellNode(o.row,o.cell)),i=f.offsetWidth,l=p.getBoundingClientRect().height,r=p.getBoundingClientRect().width,e=document.body.offsetWidth||C.innerWidth,a=o.top-p.offsetHeight-(h.offsetTopBottom||0),s=(o&&o.left||0)-(h.offsetRight||0),"center"===(c=h.position||"auto")?(s+=i/2-r/2+(h.offsetRight||0),p.classList.remove("arrow-left-align"),p.classList.remove("arrow-right-align"),p.classList.add("arrow-center-align")):"right-align"===c||("auto"===c||"left-align"!==c)&&e<s+r?(s-=r-i-(h.offsetLeft||0),p.classList.remove("arrow-center-align"),p.classList.remove("arrow-left-align"),p.classList.add("arrow-right-align")):(p.classList.remove("arrow-center-align"),p.classList.remove("arrow-right-align"),p.classList.add("arrow-left-align")),"bottom"===c||"auto"===c&&l>v(f)?(a=o.top+(m.rowHeight||0)+(h.offsetTopBottom||0),p.classList.remove("arrow-down"),p.classList.add("arrow-up")):(p.classList.add("arrow-down"),p.classList.remove("arrow-up")),p.style.top=a+"px",p.style.left=s+"px"),h.hideArrow||p.classList.add("tooltip-arrow"),x(n,t))}function k(t,e){return"function"!=typeof t||t.call(this,e)}Slick.Utils.extend(this,{init:function(t){var e=(d=t)&&t.getData()||[];l=Array.isArray(e)?null:e,m=t.getOptions()||{},c=Slick.Utils.extend(!0,{},g,m.customTooltip,o),r.subscribe(t.onMouseEnter,u).subscribe(t.onHeaderMouseEnter,n).subscribe(t.onHeaderRowMouseEnter,a).subscribe(t.onMouseLeave,b).subscribe(t.onHeaderMouseLeave,b).subscribe(t.onHeaderRowMouseLeave,b)},destroy:function(){b(),r.unsubscribeAll()},hide:b,setOptions:function(t){c=Slick.Utils.extend({},c,t)},pluginName:"CustomTooltip"})}}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.draggablegrouping.js | ||
*/ | ||
!function(e){Slick.Utils.extend(!0,e,{Slick:{DraggableGrouping:function(d){var t,p,u,n,s,a,y,h,v,k,i={},o=new Slick.Event,g=new Slick.BindingEventService,c=new Slick.EventHandler;var m=[];function f(e,l){var o,r,t,n=l.getAttribute("data-id"),s=n&&n.replace(p,"");let a=!0;for(const i of m)i.id===s&&(a=!1);if(a){for(const c of u)c.id===s&&c.grouping&&!Slick.Utils.isEmptyObject(c.grouping)&&(r=l.querySelector(".slick-column-name"),(o=document.createElement("div")).id=`${p}_${c.id}_entry`,o.className="slick-dropped-grouping",o.dataset.id=""+c.id,(t=document.createElement("div")).className="slick-dropped-grouping-title",t.style.display="inline-flex",t.textContent=(r||l).textContent,o.appendChild(t),(r=document.createElement("div")).className="slick-groupby-remove",d.deleteIconCssClass&&r.classList.add(...d.deleteIconCssClass.split(" ")),d.deleteIconImage&&r.classList.add(...d.deleteIconImage.split(" ")),d.deleteIconCssClass||r.classList.add("slick-groupby-remove-icon"),d.deleteIconImage||r.classList.add("slick-groupby-remove-image"),d&&!0!==d.hideGroupSortIcons&&c.sortable&&c.grouping&&void 0===c.grouping.sortAsc&&(c.grouping.sortAsc=!0),o.appendChild(r),o.appendChild(document.createElement("div")),e.appendChild(o),t=c,m.push(t),b("add-group"),function(r,t,n){g.bind(t,"click",()=>{for(const o of g.boundedEvents.filter(e=>e.element===t))g.unbind(o.element,"click",o.listener);var e=r,l=(n.remove(),[]);u.forEach(function(e){l[e.id]=e}),function(e){var l,o,r=arguments,t=r.length;for(;1<t&&e.length;)for(l=r[--t];-1!=(o=e.indexOf(l));)e.splice(o,1)}(m,l[e]),0===m.length&&(y.style="block",h.style.display="none"),b("remove-group")})}(c.id,r,o));h.style.display="inline-block"}}function b(e){var l;0===m.length?(n.setGrouping([]),o.notify({caller:e,groupColumns:[]})):(l=[],m.forEach(function(e){l.push(e.grouping)}),n.setGrouping(l),o.notify({caller:e,groupColumns:l}))}Slick.Utils.extend(this,{init:function(e){d=Slick.Utils.extend(!0,{},i,d),p=(t=e).getUID(),u=t.getColumns(),n=t.getData(),(s=e.getPreHeaderPanel()).classList.add("slick-dropzone"),e=d.dropPlaceHolderText||"Drop a column header here to group by the column",(y=document.createElement("div")).className="slick-placeholder",y.textContent=e,(h=document.createElement("div")).className="slick-group-toggle-all expanded",h.style.display="none",s.appendChild(y),s.appendChild(h);{const r=s;a=Sortable.create(r,{group:"shared",ghostClass:"slick-droppable-sortitem-hover",draggable:".slick-dropped-grouping",dragoverBubble:!0,onAdd:e=>{var l=e.item,o=l.getAttribute("id");o&&o.replace(p,"")&&f(r,Sortable.utils.clone(e.item)),e.clone.style.opacity=".5",l.parentNode&&l.parentNode.removeChild(l)},onUpdate:()=>{for(var e=a&&a.toArray()||[],l=[],o=0,r=e.length;o<r;o++)for(var t=0,n=m.length;t<n;t++)if(m[t].id==e[o]){l.push(m[t]);break}m=l,b("sort-group")}});e=s.querySelector(".slick-placeholder");e&&(g.bind(e,"dragover",e=>e.preventDefault),g.bind(e,"dragenter",()=>s.classList.add("slick-dropzone-hover")),g.bind(e,"dragleave",()=>s.classList.remove("slick-dropzone-hover"))),h&&g.bind(h,"click",e=>{var l,o,e=e.target;[e,l=!0,o=!0]=[e,e&&e.classList.contains("expanded")],e&&(!0===l?(e.classList.add("collapsed"),e.classList.remove("expanded"),o&&n.collapseAllGroups()):(e.classList.remove("collapsed"),e.classList.add("expanded"),o&&n.expandAllGroups()))})}c.subscribe(t.onHeaderCellRendered,function(e,l){var o=l.column,l=l.node;!Slick.Utils.isEmptyObject(o.grouping)&&l&&(l.style.cursor="pointer",d.groupIconCssClass||d.groupIconImage)&&((o=document.createElement("span")).className="slick-column-groupable",d.groupIconCssClass&&o.classList.add(...d.groupIconCssClass.split(" ")),d.groupIconImage&&(o.style.background="url("+d.groupIconImage+") no-repeat center center"),l.appendChild(o))});for(var l=0;l<u.length;l++){var o=u[l].field;t.updateColumnHeader(o)}},destroy:function(){v&&v.el&&v.destroy(),k&&k.el&&k.destroy(),o.unsubscribe(),c.unsubscribeAll(),g.unbindAll(),Slick.Utils.emptyElement(document.querySelector(`.${p} .slick-preheader-panel`))},pluginName:"DraggableGrouping",onGroupChanged:o,setDroppedGroups:function(e){e=Array.isArray(e)?e:[e],y.style.display="none";for(const o of e){var l=t.getHeaderColumn(o);f(s,l)}},clearDroppedGroups:function(){m=[],b("clear-all");var e=s.querySelectorAll(".slick-dropped-grouping");h.style.display="none";for(const o of Array.from(e)){var l=s.querySelector(".slick-groupby-remove");l&&l.remove(),o&&o.remove()}y.style.display="inline-block"},getSetupColumnReorder:function(i,c,e,d,p,l,u,o,g){const m=i.getPreHeaderPanel();var r={animation:50,ghostClass:"slick-sortable-placeholder",draggable:".slick-header-column",dataIdAttr:"data-id",group:{name:"shared",pull:"clone",put:!1},revertClone:!0,onStart:function(){m.classList.add("slick-dropzone-hover"),m.classList.add("slick-dropzone-placeholder-hover"),m.querySelector(".slick-placeholder").style.display="inline-block",h.style.display="none",m.querySelectorAll(".slick-dropped-grouping").forEach(e=>e.style.display="none")},onEnd:function(e){var l=m.querySelector(".slick-placeholder"),o=(m.classList.remove("slick-dropzone-hover"),l.classList.remove("slick-dropzone-placeholder-hover"),y&&(y.style.display="none"),l&&l.parentElement&&l.parentElement.classList.remove("slick-dropzone-placeholder-hover"),m.querySelectorAll(".slick-dropped-grouping"));if(o.forEach(e=>e.style.display="inline-block"),o.length&&(l&&(l.style.display="none"),h.style.display="inline-block"),i.getEditorLock().commitCurrentEdit()){var r=v&&v.toArray()||[];if(1<c.length)for(const s of k&&k.toArray()||[])r.push(s);var t=[],n=i.getColumns();for(const a of r)t.push(n[u(a)]);d(t),g(i.onColumnsReordered,{grid:i}),e.stopPropagation(),p()}}};return v=Sortable.create(document.querySelector(`.${i.getUID()} .slick-header-columns.slick-header-columns-left`),r),k=Sortable.create(document.querySelector(`.${i.getUID()} .slick-header-columns.slick-header-columns-right`),r),{sortableLeftInstance:v,sortableRightInstance:k}}})}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.headerbuttons.js | ||
*/ | ||
!function(e){Slick.Utils.extend(!0,e,{Slick:{Plugins:{HeaderButtons:function(a){var s,o=this,t=new Slick.EventHandler,d=new Slick.BindingEventService,n={buttonCssClass:"slick-header-button"};function i(e,t){var n=t.column;if(n.header&&n.header.buttons)for(var i=n.header.buttons.length;i--;){var l=n.header.buttons[i],s=c(l.itemVisibilityOverride,t),o=c(l.itemUsabilityOverride,t);s&&(Object.prototype.hasOwnProperty.call(l,"itemUsabilityOverride")&&(l.disabled=!o),(s=document.createElement("div")).className=a.buttonCssClass,s.ariaLabel="Header Button",s.role="button",l.disabled&&s.classList.add("slick-header-button-disabled"),l.showOnHover&&s.classList.add("slick-header-button-hidden"),l.image&&(s.style.backgroundImage="url("+l.image+")"),l.cssClass&&s.classList.add(...l.cssClass.split(" ")),l.tooltip&&(s.title=l.tooltip),l.handler&&d.bind(s,"click",l.handler),d.bind(s,"click",r.bind(this,l,t.column)),t.node.appendChild(s))}}function l(e,t){var n=t.column;n.header&&n.header.buttons&&(n=(a.buttonCssClass||"").replace(/(\s+)/g,"."))&&t.node.querySelectorAll("."+n).forEach(e=>e.remove())}function r(e,t,n){var i=e.command||"",l={grid:s,column:t,button:e};null!=i&&(l.command=i),"function"==typeof e.action&&e.action.call(this,n,l),null==i||e.disabled||(o.onCommand.notify(l,n,o),s.updateColumnHeader(t.id)),n.preventDefault(),n.stopPropagation()}function c(e,t){return"function"!=typeof e||e.call(this,t)}Slick.Utils.extend(this,{init:function(e){a=Slick.Utils.extend(!0,{},n,a),s=e,t.subscribe(s.onHeaderCellRendered,i).subscribe(s.onBeforeHeaderCellDestroy,l),s.setColumns(s.getColumns())},destroy:function(){t.unsubscribeAll(),d.unbindAll()},pluginName:"HeaderButtons",onCommand:new Slick.Event})}}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.headermenu.js | ||
*/ | ||
!function(e){Slick.Utils.extend(!0,e,{Slick:{Plugins:{HeaderMenu:function(f){var h,p,v,b=this,t=new Slick.EventHandler,g=new Slick.BindingEventService,i={buttonCssClass:null,buttonImage:null,minWidth:100,autoAlign:!0,autoAlignOffset:0};function l(){v&&(v.remove(),v=void 0),p&&p.classList.remove("slick-header-column-active")}function n(e,t){var i=t.column,n=i.header&&i.header.menu;n&&C(f.menuUsabilityOverride,t)&&((i=document.createElement("div")).className="slick-header-menubutton",i.ariaLabel="Header Menu",i.role="button",f.buttonCssClass&&i.classList.add(...f.buttonCssClass.split(" ")),f.buttonImage&&(i.style.backgroundImage="url("+f.buttonImage+")"),f.tooltip&&(i.title=f.tooltip),g.bind(i,"click",e=>function(t,i,n){var l={grid:h,column:n,menu:i};if(0!=b.onBeforeMenuShow.notify(l,t,b).getReturnValue()){!v&&((v=document.createElement("div")).className="slick-header-menu",v.role="menu",v.style.minWidth=f.minWidth+"px",v.setAttribute("aria-expanded","true"),r=h.getContainerNode())&&r.appendChild(v),Slick.Utils.emptyElement(v);for(var s=0;s<i.items.length;s++){var a=i.items[s],o=C(a.itemVisibilityOverride,l),d=C(a.itemUsabilityOverride,l);o&&(Object.prototype.hasOwnProperty.call(a,"itemUsabilityOverride")&&(a.disabled=!d),(o=document.createElement("div")).className="slick-header-menuitem",o.role="menuitem",a.divider||"divider"===a?o.classList.add("slick-header-menuitem-divider"):(a.disabled&&o.classList.add("slick-header-menuitem-disabled"),a.hidden&&o.classList.add("slick-header-menuitem-hidden"),a.cssClass&&o.classList.add(...a.cssClass.split(" ")),a.tooltip&&(o.title=a.tooltip),(d=document.createElement("div")).className="slick-header-menuicon",o.appendChild(d),a.iconCssClass&&d.classList.add(...a.iconCssClass.split(" ")),a.iconImage&&(d.style.backgroundImage="url("+a.iconImage+")"),(d=document.createElement("span")).className="slick-header-menucontent",d.textContent=a.title,o.appendChild(d),a.textCssClass&&d.classList.add(...a.textCssClass.split(" ")),v.appendChild(o),g.bind(o,"click",k.bind(this,a,n))))}var c,r=t.target,u=Slick.Utils.offset(r),m=Slick.Utils.offset(v);let e=u&&u.left||0;f.autoAlign&&(c=h.getGridPosition(),e+v.offsetWidth>=c.width)&&(e=e+r.clientWidth-v.clientWidth+(f.autoAlignOffset||0)),v.style.top=(r.clientHeight||u&&u.top||0)+(f&&f.menuOffsetTop||0)+"px",v.style.left=e-m.left+"px",(p=v.closest(".slick-header-column"))&&p.classList.add("slick-header-column-active"),0!=b.onAfterMenuShow.notify(l,t,b).getReturnValue()&&(t.preventDefault(),t.stopPropagation())}}(e,n,t.column)),t.node.appendChild(i))}function s(e,t){var i=t.column;i.header&&i.header.menu&&t.node.querySelectorAll(".slick-header-menubutton").forEach(e=>e.remove())}function k(e,t,i){var n=e.command||"";if(e.disabled||e.divider||"divider"===e)return!1;null!=n&&""!==n&&(t={grid:h,column:t,command:n,item:e},b.onCommand.notify(t,i,b),"function"==typeof e.action)&&e.action.call(this,i,t),i.defaultPrevented||l(),i.preventDefault(),i.stopPropagation()}function C(e,t){return"function"!=typeof e||e.call(this,t)}Slick.Utils.extend(this,{init:function(e){f=Slick.Utils.extend(!0,{},i,f),h=e,t.subscribe(h.onHeaderCellRendered,n).subscribe(h.onBeforeHeaderCellDestroy,s),h.setColumns(h.getColumns()),g.bind(document.body,"mousedown",function(e){(v===e.target||v&&v.contains(e.target))&&"close"!==e.target.className||l()}.bind(this))},destroy:function(){var e;t.unsubscribeAll(),g.unbindAll(),(v=v||document.body.querySelector(".slick-header-menu"+((e=h.getUID()||"")?"."+e:"")))&&v.remove(),p=void 0},pluginName:"HeaderMenu",setOptions:function(e){f=Slick.Utils.extend(!0,{},f,e)},onAfterMenuShow:new Slick.Event,onBeforeMenuShow:new Slick.Event,onCommand:new Slick.Event})}}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.resizer.js | ||
*/ | ||
"use strict";!function(C){Slick.Utils.extend(!0,C,{Slick:{Plugins:{Resizer:function(e,t){let l=180,a=300,h=20,n=this,g,f,o,r,d,s,u,c=!1,m,v,z,S={bottomPadding:20,applyResizeToContainer:!1,minHeight:180,minWidth:300,rightPadding:0},w={},p=new Slick.BindingEventService;function y(i){w=Slick.Utils.extend(!0,{},S,w,i)}function R(e){var i=Slick.Utils.offset(m);void 0===m&&void 0===i||(k(0,e,null),p.bind(C,"resize",function(i){n.onGridBeforeResize.notify({grid:o},i,n),c||(k(0,e,i),k(0,e,i))}))}function b(){n.onGridBeforeResize.unsubscribe(),n.onGridAfterResize.unsubscribe(),p.unbindAll()}function k(e,t,n){if(e=e||0,"function"==typeof Promise)return new Promise(function(i){0<e?(clearTimeout(u),u=setTimeout(function(){i(x(t,n))},e)):i(x(t,n))});0<e?(clearTimeout(u),u=setTimeout(function(){x(t,n)},e)):x(t,n)}function x(i,e){i=function(i){var e=function(){var i=Slick.Utils.offset(m);if(!C||void 0===v||void 0===m||void 0===i)return null;var e=w&&void 0!==w.bottomPadding?w.bottomPadding:h;let t=0,n=0;"container"===w.calculateAvailableSizeBy?t=Slick.Utils.innerSize(v,"height")||0:(t=C.innerHeight||0,n=void 0!==i?i.top:0);var i=t-n-e,e=Slick.Utils.innerSize(v,"width")||C.innerWidth||0,o=w&&w.maxHeight||void 0,r=w&&void 0!==w.minHeight?w.minHeight:l,d=w&&w.maxWidth||void 0,s=w&&void 0!==w.minWidth?w.minWidth:a;let u=i,c=w&&w.rightPadding?e-w.rightPadding:e;return u<r&&(u=r),o&&u>o&&(u=o),c<s&&(c=s),d&&c>d&&(c=d),{height:g||u,width:f||c}}();if((i||e)&&m)try{var t=(i&&i.height?i:e).height,n=(i&&i.width?i:e).width;r.autoHeight||(m.style.height=t+"px"),m.style.width=n+"px",z&&(z.style.width=n+"px"),null===new RegExp("MSIE [6-8]").exec(navigator.userAgent)&&o&&o.resizeCanvas&&o.resizeCanvas(),r&&r.enableAutoSizeColumns&&o.autosizeColumns&&d&&document.querySelector("."+d)&&o.autosizeColumns(),s={height:t,width:n}}catch(i){b()}return s}(i);return n.onGridAfterResize.notify({grid:o,dimensions:i},e,n),i}Slick.Utils.extend(this,{init:function(i){y(e),o=i,r=o.getOptions(),d=o.getUID(),m=o.getContainerNode(),v="string"==typeof e.container&&"string"==typeof e.container?document.querySelector(e.container):e.container,w.gridContainer&&(z=w.gridContainer),t&&(g=t.height,f=t.width),r&&R()},destroy:b,pluginName:"Resizer",bindAutoResizeDataGrid:R,getLastResizeDimensions:function(){return s},pauseResizer:function(i){c=i},resizeGrid:k,setOptions:y,onGridAfterResize:new Slick.Event,onGridBeforeResize:new Slick.Event})}}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.rowdetailview.js | ||
*/ | ||
!function(e){Slick.Utils.extend(!0,e,{Slick:{Plugins:{RowDetailView:function(e){var d,r,c,u,p="id",n=null,o=this,t=null,l=[],i=new Slick.EventHandler,s=5,w=0,a={columnId:"_detail_selector",cssClass:"detailView-toggle",expandedClass:null,collapsedClass:null,keyPrefix:"_",loadOnce:!1,collapseAllOnSort:!0,saveDetailViewOnScroll:!0,singleRowExpand:!1,useSimpleViewportCalc:!1,alwaysRenderColumn:!0,toolTip:"",width:30,maxRows:null},g=a.keyPrefix,f=0,m=[],R=Slick.Utils.extend(!0,{},a,e);"function"==typeof R.expandableOverride&&E(R.expandableOverride);function h(e,t){if(e)for(var i=0;i<e.length;i++)if(e[i]===t)return i;return-1}function v(e,t){var i,n=d.getDataItem(t.row);z(t.row,n,d)&&(R.useRowClick||d.getColumns()[t.cell].id===R.columnId&&e.target.classList.contains(R.cssClass||""))&&(d.getEditorLock().isActive()&&!d.getEditorLock().commitCurrentEdit()?e.preventDefault():(o.onBeforeRowDetailToggle.notify({grid:d,item:n},e,o),z(t=t.row,i=n,d)&&(u.beginUpdate(),(t=i)&&(t[g+"collapsed"]?I:V)(t),u.endUpdate()),o.onAfterRowDetailToggle.notify({grid:d,item:n,expandedRows:l},e,o),e.stopPropagation()),e.stopImmediatePropagation())}function b(){var i;if(R.useSimpleViewportCalc)d&&(i=d.getRenderedRange(),l.forEach(function(e){var t=function(e,t){if(Math.abs(t.bottom-f-e)>2*w)return!0;return!1}(u.getRowById(e[p]),i);!t&&0<=h(m,e[p])?y(e,e[p]):t&&x(e,e[p])}));else if(d){var o=d.getRenderedRange();if(0<l.length){var a="DOWN";if(t){if(t.top===o.top&&t.bottom===o.bottom)return;(t.top>o.top||0===t.top&&0===o.top&&t.bottom>o.bottom)&&(a="UP")}}l.forEach(function(e){var t=u.getRowById(e[p]),i=e[g+"sizePadding"],n=0<=h(m,e[p]);"UP"===a?(R.saveDetailViewOnScroll&&t>=o.bottom-f&&P(e),n&&t-s<o.top&&t>=o.top?y(e,e[p]):!n&&t+i>o.bottom&&x(e,e[p])):"DOWN"===a&&(R.saveDetailViewOnScroll&&t<=o.top+f&&P(e),n&&t+i+s>o.bottom&&t<t+i?y(e,e[p]):!n&&t<o.top&&x(e,e[p]))}),t=o}}function x(e,t){var i=e.rowIndex||u.getRowById(e[p]);o.onRowOutOfViewportRange.notify({grid:d,item:e,rowId:t,rowIndex:i,expandedRows:l,rowIdsOutOfViewport:C(t,!0)},null,o)}function y(e,t){var i=e.rowIndex||u.getRowById(e[p]);setTimeout(function(){document.querySelector(`.${c} .cellDetailView_`+e[p])&&o.onRowBackToViewportRange.notify({grid:d,item:e,rowId:t,rowIndex:i,expandedRows:l,rowIdsOutOfViewport:C(t,!1)},null,o)},100)}function C(e,t){var i=h(m,e);return t&&i<0?m.push(e):!t&&0<=i&&m.splice(i,1),m}function D(){u.beginUpdate();for(var e=l.length-1;0<=e;e--)V(l[e],!0);u.endUpdate()}function V(t,e){e||u.beginUpdate(),R.loadOnce&&P(t),t[g+"collapsed"]=!0;for(var i=1;i<=t[g+"sizePadding"];i++)u.deleteItem(t[p]+"."+i);t[g+"sizePadding"]=0,u.updateItem(t[p],t),l=l.filter(function(e){return e[p]!==t[p]}),e||u.endUpdate()}function I(e){R&&R.singleRowExpand&&D(),e[g+"collapsed"]=!1,l.push(e),e[g+"detailContent"]||(e[g+"detailViewLoaded"]=!1),e[g+"detailViewLoaded"]&&!0===R.loadOnce?(o.onAsyncResponse.notify({item:e,itemDetail:e,detailView:e[g+"detailContent"]},void 0,this),S(e),u.updateItem(e[p],e)):(e[g+"detailContent"]=R.preTemplate(e),S(e),u.updateItem(e[p],e),R.process(e))}function P(e){var t=document.querySelector(`.${c} .innerDetailView_`+e[p]);t&&void 0!==(t=t.innerHTML)&&(e[g+"detailContent"]=t)}var O=function(e,t){var i,n={};for(i in d.getData())n[i]=null;return n[p]=e[p]+"."+t,n[g+"collapsed"]=!0,n[g+"isPadding"]=!0,n[g+"parent"]=e,n[g+"offset"]=t,n};function S(e){for(var t=R.panelRows,i=(e[g+"sizePadding"]=Math.ceil(2*t*13/r.rowHeight),e[g+"height"]=e[g+"sizePadding"]*r.rowHeight,u.getIdxById(e[p])),n=1;n<=e[g+"sizePadding"];n++)u.insertItem(i+n,O(e,n))}function k(e,t,i,n,o,a){var l,s;return!z(e,o,a)||(null==o[g+"collapsed"]&&(o[g+"collapsed"]=!0,o[g+"sizePadding"]=0,o[g+"height"]=0,o[g+"isPadding"]=!1,o[g+"parent"]=void 0,o[g+"offset"]=0),o[g+"isPadding"])?null:o[g+"collapsed"]?(e=R.cssClass+" expand ",R.collapsedClass&&(e+=R.collapsedClass),'<div class="'+e+'"></div>'):(a=[],e=r.rowHeight,l=o[g+"sizePadding"]*r.rowHeight,null!==R.maxRows&&o[g+"sizePadding"]>R.maxRows&&(l=R.maxRows*e,o[g+"sizePadding"]=R.maxRows),s=R.cssClass+" collapse ",R.expandedClass&&(s+=R.expandedClass),a.push('<div class="'+s+'"></div></div>'),a.push('<div class="dynamic-cell-detail cellDetailView_',o[p],'" '),a.push('style="height:',l,"px;"),a.push("top:",e,'px">'),a.push('<div class="detail-container detailViewContainer_',o[p],'">'),a.push('<div class="innerDetailView_',o[p],'">',o[g+"detailContent"],"</div></div>"),a.join(""))}function z(e,t,i){return"function"!=typeof n||n(e,t,i)}function E(e){n=e}Slick.Utils.extend(this,{init:function(e){if(!e)throw new Error('RowDetailView Plugin requires the Grid instance to be passed as argument to the "init()" method');c=(d=e).getUID(),r=e.getOptions()||{},u=d.getData(),g=R&&R.keyPrefix||"_",f=d.getOptions().minRowBuffer,d.getOptions().minRowBuffer=R.panelRows+3,i.subscribe(d.onClick,v).subscribe(d.onScroll,b),R.collapseAllOnSort&&(i.subscribe(d.onSort,D),l=[],m=[]),i.subscribe(d.getData().onRowCountChanged,function(){d.updateRowCount(),d.render()}),i.subscribe(d.getData().onRowsChanged,function(e,t){d.invalidateRows(t.rows),d.render()}),o.onAsyncResponse.subscribe(function(e,t){if(!t||!t.item&&!t.itemDetail)throw'Slick.RowDetailView plugin requires the onAsyncResponse() to supply "args.item" property.';var i=t.item||t.itemDetail;t.detailView?i[g+"detailContent"]=t.detailView:i[g+"detailContent"]=R.postTemplate(i),i[g+"detailViewLoaded"]=!0,u.updateItem(i[p],i),o.onAsyncEndUpdate.notify({grid:d,item:i,itemDetail:i},e,o)}),i.subscribe(u.onSetItemsCalled,function(){p=u&&u.getIdPropertyName()||"id"}),R.useSimpleViewportCalc&&i.subscribe(d.onRendered,function(e,t){t&&t.endRow&&(w=t.endRow-t.startRow)})},destroy:function(){i.unsubscribeAll(),o.onAsyncResponse.unsubscribe(),o.onAsyncEndUpdate.unsubscribe(),o.onAfterRowDetailToggle.unsubscribe(),o.onBeforeRowDetailToggle.unsubscribe(),o.onRowOutOfViewportRange.unsubscribe(),o.onRowBackToViewportRange.unsubscribe()},pluginName:"RowDetailView",collapseAll:D,collapseDetailView:V,expandDetailView:I,expandableOverride:E,getColumnDefinition:function(){return{id:R.columnId,name:"",toolTip:R.toolTip,field:"sel",width:R.width,resizable:!1,sortable:!1,alwaysRenderColumn:R.alwaysRenderColumn,cssClass:R.cssClass,formatter:k}},getExpandedRows:function(){return l},getFilterItem:function(e){return e=e[g+"isPadding"]&&e[g+"parent"]?e[g+"parent"]:e},getOptions:function(){return R},resizeDetailView:function(e){if(e){var t=document.querySelector("."+c+" .detailViewContainer_"+e[p]),i=document.querySelector("."+c+" .cellDetailView_"+e[p]),n=document.querySelector("."+c+" .innerDetailView_"+e[p]);if(t&&i&&n){for(var o=1;o<=e[g+"sizePadding"];o++)u.deleteItem(e[p]+"."+o);for(var n=r.rowHeight,a=(t.style.minHeight=null,t.scrollHeight),l=Math.ceil(a/n),l=(e[g+"sizePadding"]=Math.ceil(2*l*13/n),e[g+"height"]=a,e[g+"sizePadding"]*n),s=(null!==R.maxRows&&e[g+"sizePadding"]>R.maxRows&&(l=R.maxRows*n,e[g+"sizePadding"]=R.maxRows),d.getOptions().minRowBuffer<e[g+"sizePadding"]&&(d.getOptions().minRowBuffer=e[g+"sizePadding"]+3),t.setAttribute("style","min-height: "+e[g+"height"]+"px"),i&&i.setAttribute("style","height: "+l+"px; top:"+n+"px"),u.getIdxById(e[p])),o=1;o<=e[g+"sizePadding"];o++)u.insertItem(s+o,O(e,o));P(e)}}},saveDetailView:P,setOptions:function(e){(R=Slick.Utils.extend(!0,{},R,e))&&R.singleRowExpand&&D()},onAsyncResponse:new Slick.Event,onAsyncEndUpdate:new Slick.Event,onAfterRowDetailToggle:new Slick.Event,onBeforeRowDetailToggle:new Slick.Event,onRowOutOfViewportRange:new Slick.Event,onRowBackToViewportRange:new Slick.Event})}}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.rowmovemanager.js | ||
*/ | ||
!function(e){Slick.Utils.extend(!0,e,{Slick:{RowMoveManager:function(n){var l,s,c,i=this,r=null,o=new Slick.EventHandler,t={columnId:"_move",cssClass:null,cancelEditOnDrag:!1,disableRowSelection:!1,hideRowMoveShadow:!0,rowMoveShadowMarginTop:0,rowMoveShadowMarginLeft:0,rowMoveShadowOpacity:.95,rowMoveShadowScale:.75,singleRowMove:!1,width:40};n&&"function"==typeof n.usabilityOverride&&v(n.usabilityOverride);function d(e){e.stopImmediatePropagation()}function a(e,o){var t=l.getCellFromEvent(e),i=t&&t.row;if(g(i,l.getDataItem(i),l)){if(n.cancelEditOnDrag&&l.getEditorLock().isActive()&&l.getEditorLock().cancelCurrentEdit(),l.getEditorLock().isActive()||!p(t.cell))return!1;c=!0,e.stopImmediatePropagation(),n.hideRowMoveShadow||(e=(i=l.getCellNode(t.row,t.cell))&&i.closest(".slick-row"))&&(o.clonedSlickRow=e.cloneNode(!0),o.clonedSlickRow.classList.add("slick-reorder-shadow-row"),o.clonedSlickRow.style.display="none",o.clonedSlickRow.style.marginLeft=Number(n.rowMoveShadowMarginLeft||0)+"px",o.clonedSlickRow.style.marginTop=Number(n.rowMoveShadowMarginTop||0)+"px",o.clonedSlickRow.style.opacity=""+(n.rowMoveShadowOpacity||.95),o.clonedSlickRow.style.transform=`scale(${n.rowMoveShadowScale||.75})`,s.appendChild(o.clonedSlickRow));i=n.singleRowMove?[t.row]:l.getSelectedRows(),e=(0!==i.length&&i.some(e=>e===t.row)||(i=[t.row],n.disableRowSelection)||l.setSelectedRows(i),l.getOptions().rowHeight);o.selectedRows=i,o.selectionProxy=document.createElement("div"),o.selectionProxy.className="slick-reorder-proxy",o.selectionProxy.style.display="none",o.selectionProxy.style.position="absolute",o.selectionProxy.style.zIndex="99999",o.selectionProxy.style.width=s.clientWidth+"px",o.selectionProxy.style.height=e*i.length+"px",s.appendChild(o.selectionProxy),o.guide=document.createElement("div"),o.guide.className="slick-reorder-guide",o.guide.style.position="absolute",o.guide.style.zIndex="99999",o.guide.style.width=s.clientWidth+"px",o.guide.style.top="-1000px",s.appendChild(o.guide),o.insertBefore=-1}}function w(e,o){var t;c&&(e.stopImmediatePropagation(),e=((e=e.getNativeEvent()).touches?e.touches[0]:e).pageY-(Slick.Utils.offset(s).top||0),o.selectionProxy.style.top=e-5+"px",o.selectionProxy.style.display="block",o.clonedSlickRow&&(o.clonedSlickRow.style.top=e-6+"px",o.clonedSlickRow.style.display="block"),(e=Math.max(0,Math.min(Math.round(e/l.getOptions().rowHeight),l.getDataLength())))!==o.insertBefore)&&(!(t={grid:l,rows:o.selectedRows,insertBefore:e})===i.onBeforeMoveRows.notify(t).getReturnValue()?o.canMove=!1:o.canMove=!0,r&&o.canMove&&(t=l.getDataItem(e),o.canMove=g(e,t,l)),o.canMove?o.guide.style.top=e*(l.getOptions().rowHeight||0)+"px":o.guide.style.top="-1000px",o.insertBefore=e)}function u(e,o){c&&(c=!1,e.stopImmediatePropagation(),o.guide.remove(),o.selectionProxy.remove(),o.clonedSlickRow&&(o.clonedSlickRow.remove(),o.clonedSlickRow=null),o.canMove)&&(e={grid:l,rows:o.selectedRows,insertBefore:o.insertBefore},i.onMoveRows.notify(e))}function e(e,o,t,i,n,l){return g(e,n,l)?{addClasses:"cell-reorder dnd",text:""}:null}function g(e,o,t){return"function"!=typeof r||r(e,o,t)}function v(e){r=e}function p(e){return/move|selectAndMove/.test(l.getColumns()[e].behavior)}Slick.Utils.extend(this,{onBeforeMoveRows:new Slick.Event,onMoveRows:new Slick.Event,init:function(e){n=Slick.Utils.extend(!0,{},t,n),s=(l=e).getCanvasNode(),o.subscribe(l.onDragInit,d).subscribe(l.onDragStart,a).subscribe(l.onDrag,w).subscribe(l.onDragEnd,u)},destroy:function(){o.unsubscribeAll()},getColumnDefinition:function(){return{id:n.columnId||"_move",name:"",field:"move",width:n.width||40,behavior:"selectAndMove",selectable:!1,resizable:!1,cssClass:n.cssClass,formatter:e}},setOptions:function(e){n=Slick.Utils.extend({},n,e)},usabilityOverride:v,isHandlerColumn:p,pluginName:"RowMoveManager"})}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.rowselectionmodel.js | ||
*/ | ||
!function(e){Slick.Utils.extend(!0,e,{Slick:{RowSelectionModel:function(t){var c,n,l,o,i,s=[],r=this,a=new Slick.EventHandler,u={selectActiveRow:!0,dragToSelect:!1,autoScrollWhenDrag:!0,cellRangeSelector:void 0};function g(e){return function(){n||(n=!0,e.apply(this,arguments),n=!1)}}function w(e){for(var t=[],n=0;n<e.length;n++)for(var l=e[n].fromRow;l<=e[n].toRow;l++)t.push(l);return t}function S(e){for(var t=[],n=c.getColumns().length-1,l=0;l<e.length;l++)t.push(new Slick.Range(e[l],0,e[l],n));return t}function f(){return w(s)}function e(e){d(S(e),"SlickRowSelectionModel.setSelectedRows")}function d(e,t){(s&&0!==s.length||e&&0!==e.length)&&(s=e,e=new Slick.EventData(null,s),Object.defineProperty(e,"detail",{writable:!0,configurable:!0,value:{caller:t||"SlickRowSelectionModel.setSelectedRanges"}}),r.onSelectedRangesChanged.notify(s,e))}function h(e,t){l.selectActiveRow&&null!=t.row&&d([new Slick.Range(t.row,0,t.row,c.getColumns().length-1)])}function R(e){var t,n,l=c.getActiveCell();!(c.getOptions().multiSelect&&l&&e.shiftKey)||e.ctrlKey||e.altKey||e.metaKey||e.which!=Slick.keyCode.UP&&e.which!=Slick.keyCode.DOWN||((n=f()).sort(function(e,t){return e-t}),t=(n=n.length?n:[l.row])[0],n=n[n.length-1],0<=(l=e.which==Slick.keyCode.DOWN?l.row<n||t==n?++n:++t:l.row<n?--n:--t)&&l<c.getDataLength()&&(c.scrollRowIntoView(l),d(S(function(e,t){for(var n=[],l=e;l<=t;l++)n.push(l);for(l=t;l<e;l++)n.push(l);return n}(t,n)))),e.preventDefault(),e.stopPropagation())}function v(e){var t=c.getCellFromEvent(e);if(!t||!c.canCellBeActive(t.row,t.cell))return!1;if(!c.getOptions().multiSelect||!e.ctrlKey&&!e.shiftKey&&!e.metaKey)return!1;var n=(i=w(s)).indexOf(t.row);if(-1===n&&(e.ctrlKey||e.metaKey))i.push(t.row),c.setActiveCell(t.row,t.cell);else if(-1!==n&&(e.ctrlKey||e.metaKey))i=i.filter(e=>e!==t.row),c.setActiveCell(t.row,t.cell);else if(i.length&&e.shiftKey){for(var l=i.pop(),n=Math.min(t.row,l),o=Math.max(t.row,l),i=[],r=n;r<=o;r++)r!==l&&i.push(r);i.push(l),c.setActiveCell(t.row,t.cell)}return d(S(i)),e.stopImmediatePropagation(),!0}function C(e,t){var n;if(i||(n=c.getPluginByName("RowMoveManager")||c.getPluginByName("CrossGridRowMoveManager"),i=n?n.isHandlerColumn:Slick.Utils.noop),c.getEditorLock().isActive()||i(t.cell))return e.stopPropagation(),!1;c.setActiveCell(t.row,t.cell)}function k(e,t){if(!c.getOptions().multiSelect||!l.selectActiveRow)return!1;d([new Slick.Range(t.range.fromRow,0,t.range.toRow,c.getColumns().length-1)])}Slick.Utils.extend(this,{getSelectedRows:f,setSelectedRows:e,getSelectedRanges:function(){return s},setSelectedRanges:d,refreshSelections:function(){e(f())},init:function(e){if(void 0===Slick.Draggable)throw new Error('Slick.Draggable is undefined, make sure to import "slick.interactions.js"');if(l=Slick.Utils.extend(!0,{},u,t),o=l.cellRangeSelector,c=e,!o&&l.dragToSelect){if(!Slick.CellRangeDecorator)throw new Error("Slick.CellRangeDecorator is required when option dragToSelect set to true");o=new Slick.CellRangeSelector({selectionCss:{border:"none"},autoScroll:l.autoScrollWhenDrag})}a.subscribe(c.onActiveCellChanged,g(h)),a.subscribe(c.onKeyDown,g(R)),a.subscribe(c.onClick,g(v)),o&&(e.registerPlugin(o),o.onCellRangeSelecting.subscribe(k),o.onCellRangeSelected.subscribe(k),o.onBeforeCellRangeSelected.subscribe(C))},destroy:function(){a.unsubscribeAll(),o&&(o.onCellRangeSelecting.unsubscribe(k),o.onCellRangeSelected.unsubscribe(k),o.onBeforeCellRangeSelected.unsubscribe(C),c.unregisterPlugin(o),o.destroy)&&o.destroy()},pluginName:"RowSelectionModel",onSelectedRangesChanged:new Slick.Event})}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./plugins/slick.state.js | ||
*/ | ||
!function(t){Slick.Utils.extend(!0,t,{Slick:{State:function(i){var o,n,s=(i=Slick.Utils.extend(!0,{},a,i)).storage,e=new Slick.Event,r={state:null,current:null};function u(){var t;if(n&&s)return(t={sortcols:o.getSortColumns(),viewport:o.getViewport(),columns:o.getColumns().map(function(t){return{id:t.id,width:t.width}}),userData:null}).userData=r.current,l(t.userData),e.notify(t),s.set(i.key_prefix+n,t)}function c(t){return r.current=t,this}function l(t){r.state=t,c(t)}Slick.Utils.extend(this,{init:function(t){(n=(o=t).cid||i.cid)?(o.onColumnsResized.subscribe(u),o.onColumnsReordered.subscribe(u),o.onSort.subscribe(u)):console.warn("grid has no client id. state persisting is disabled.")},destroy:function(){o.onSort.unsubscribe(u),o.onColumnsReordered.unsubscribe(u),o.onColumnsResized.unsubscribe(u),u()},save:u,setUserData:c,resetUserData:function(){return r.current=r.state,this},getUserData:function(){return r.current},getStateUserData:function(){return r.state},restore:function(){return new Promise((r,e)=>{n?s?s.get(i.key_prefix+n).then(function(t){var e,n,s;t&&(t.sortcols&&o.setSortColumns(t.sortcols||[]),t.viewport&&i.scrollRowIntoView&&o.scrollRowIntoView(t.viewport.top,!0),t.columns&&((e=i.defaultColumns)&&(n={},e.forEach(function(t){n[t.id]=t}),s=[],(t.columns||[]).forEach(function(t){n[t.id]&&s.push(Slick.Utils.extend(!0,{},n[t.id],{width:t.width,headerCssClass:t.headerCssClass}))}),t.columns=s),o.setColumns(t.columns)),l(t.userData)),r(t)}).catch(function(t){e(t)}):e("missing store"):e("missing client id")})},onStateChanged:e,reset:function(){s.set(i.key_prefix+n,{}),l(null)}})}}});var a={key_prefix:"slickgrid:",storage:new function(){var r=t.localStorage;return void 0===r&&console.error("localStorage is not available. slickgrid statepersistor disabled."),{get:function(s){return new Promise((t,e)=>{if(r)try{var n=r.getItem(s);if(n)return t(JSON.parse(n));t({})}catch(t){e(t)}else e("missing localStorage")})},set:function(t,e){r&&(void 0!==e&&(e=JSON.stringify(e)),r.setItem(t,e))}}},scrollRowIntoView:!0}}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./slick.compositeeditor.js | ||
*/ | ||
Slick.Utils.extend(Slick,{CompositeEditor:function(a,u,h){var c,r=function(){};function i(i){var d=[];this.destroy=function(){for(var i=0;i<d.length;)d[i].destroy(),i++;h.destroy&&h.destroy(),d=[]},this.focus=function(){(c||d[0]).focus()},this.isValueChanged=function(){for(var i=0;i<d.length;){if(d[i].isValueChanged())return!0;i++}return!1},this.serializeValue=function(){for(var i=[],t=0;t<d.length;)i[t]=d[t].serializeValue(),t++;return i},this.applyValue=function(i,t){for(var e=0;e<d.length;)d[e].applyValue(i,t[e]),e++},this.loadValue=function(i){for(var t=0;t<d.length;)d[t].loadValue(i),t++},this.validate=function(i){for(var t,e=[],o=i||null,l=(c=null,0);l<d.length;){var n,s,a,r=d[l].args&&d[l].args.column||{};r&&(n=document.querySelector(".item-details-validation.editor-"+r.id),s=document.querySelector(".item-details-label.editor-"+r.id),r=document.querySelector("[data-editorid="+r.id+"]"),a=h&&h.validationMsgPrefix||"",o&&!Slick.Utils.contains(r,o)||((t=d[l].validate()).valid?n&&(n.textContent="",r.classList.remove("invalid"),s.classList.remove("invalid")):(c=d[l],e.push({index:l,editor:d[l],container:u[l],msg:t.msg}),n&&(n.textContent=a+t.msg,s.classList.add("invalid"),r.classList.add("invalid")))),r=s=n=null),l++}return o=null,e.length?{valid:!1,msg:h.validationFailedMsg,errors:e}:{valid:!0,msg:""}},this.hide=function(){for(var i=0;i<d.length;)d[i].hide&&d[i].hide(),i++;h.hide&&h.hide()},this.show=function(){for(var i=0;i<d.length;)d[i].show&&d[i].show(),i++;h.show&&h.show()},this.position=function(i){h.position&&h.position(i)};for(var t,e,o,l,n={},s=0;s<a.length;)a[s].editor&&(t=a[s],(n=Slick.Utils.extend(!1,{},i)).container=u[s],n.column=t,n.position=(l=o=void 0,e=u[e=s],o=Slick.Utils.offset(e),l=Slick.Utils.width(e),e=Slick.Utils.height(e),{top:o&&o.top,left:o&&o.left,bottom:o&&o.top+e,right:o&&o.left+l,width:l,height:e,visible:!0}),n.commitChanges=r,n.cancelChanges=r,n.compositeEditorOptions=h,n.formValues={},o=new t.editor(n),h.editors[t.id]=o,d.push(o)),s++;setTimeout(function(){Array.isArray(d)&&0<d.length&&d[0].focus&&d[0].focus()},0)}return h=Slick.Utils.extend({},{modalType:"edit",validationFailedMsg:"Some of the fields have failed validation",validationMsgPrefix:null,show:null,hide:null,position:null,destroy:null,formValues:{},editors:{}},h),i.prototype=this,i}}); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./slick.core.js | ||
*/ | ||
!function(a){function s(t,e){let n=this.event=t,i=e,o=!1,r=!1,s=!1,l=[],u=void 0;var c;if(t)for(c of["altKey","ctrlKey","metaKey","shiftKey","key","keyCode","clientX","clientY","offsetX","offsetY","pageX","pageY","bubbles","type","which","x","y"])this[c]=t[c];this.target=n?n.target:void 0,this.stopPropagation=function(){o=!0,n&&n.stopPropagation()},this.isPropagationStopped=function(){return o},this.stopImmediatePropagation=function(){r=!0,n&&n.stopImmediatePropagation()},this.isImmediatePropagationStopped=function(){return r},this.getNativeEvent=function(){return n},this.preventDefault=function(){n&&n.preventDefault(),s=!0},this.isDefaultPrevented=function(){return n?n.defaultPrevented:s},this.addReturnValue=function(t){l.push(t),void 0===u&&void 0!==t&&(u=t)},this.getReturnValue=function(){return u},this.getArguments=function(){return i}}function t(){this.__nonDataRow=!0}function e(){this.__group=!0,this.level=0,this.count=0,this.value=null,this.title=null,this.collapsed=!1,this.selectChecked=!1,this.totals=null,this.rows=[],this.groups=null,this.groupingKey=null}function n(){this.__groupTotals=!0,this.group=null,this.initialized=!1}function i(){var e=null;this.isActive=function(t){return t?e===t:null!==e},this.activate=function(t){if(t!==e){if(null!==e)throw new Error("SlickGrid.EditorLock.activate: an editController is still active, can't activate another editController");if(!t.commitCurrentEdit)throw new Error("SlickGrid.EditorLock.activate: editController must implement .commitCurrentEdit()");if(!t.cancelCurrentEdit)throw new Error("SlickGrid.EditorLock.activate: editController must implement .cancelCurrentEdit()");e=t}},this.deactivate=function(t){if(e){if(e!==t)throw new Error("SlickGrid.EditorLock.deactivate: specified editController is not the currently active one");e=null}},this.commitCurrentEdit=function(){return!e||e.commitCurrentEdit()},this.cancelCurrentEdit=function(){return!e||e.cancelCurrentEdit()}}function f(t){var e;if(t&&t.getBoundingClientRect)return t=t.getBoundingClientRect(),e=document.documentElement,{top:t.top+a.pageYOffset-e.clientTop,left:t.left+a.pageXOffset-e.clientLeft}}function o(t,e,n){"function"==typeof n?n():t.style[e]="string"==typeof n?n:n+"px"}function r(t){return 0===t.offsetWidth&&0===t.offsetHeight}function l(t,e){for(var n=[],i=":visible"==e,o=":hidden"==e;(t=t.parentNode)&&t!==document&&t&&t.parentNode;)o?r(t)&&n.push(t):i?r(t)||n.push(t):e&&!t.matches(e)||n.push(t);return n}function u(t,e){e=e||"",Array.isArray(t)?t.forEach(function(t){t.style.display=e}):t.style.display=e}function c(t){Array.isArray(t)?t.forEach(function(t){t.style.display="none"}):t.style.display="none"}function h(t,e,n){void 0!==a.jQuery?a.jQuery(t)[e]("fast",n):(("slideUp"===e?c:u)(t),n())}(e.prototype=new t).equals=function(t){return this.value===t.value&&this.count===t.count&&this.collapsed===t.collapsed&&this.title===t.title},n.prototype=new t;var d=Object.getPrototypeOf,p={},g=p.toString,v=p.hasOwnProperty,m=v.toString,y=m.call(Object);function C(t){return!(!t||"[object Object]"!==g.call(t)||(t=d(t))&&("function"!=typeof(t=v.call(t,"constructor")&&t.constructor)||m.call(t)!==y))}a.Slick={Event:function(){var r=[];this.subscribe=function(t){r.push(t)},this.unsubscribe=function(t){for(var e=r.length-1;0<=e;e--)r[e]===t&&r.splice(e,1)},this.notify=function(t,e,n){e instanceof s||(e=new s(e,t)),n=n||this;for(var i=0;i<r.length&&!e.isPropagationStopped()&&!e.isImmediatePropagationStopped();i++){var o=r[i].call(n,e,t);e.addReturnValue(o)}return e}},EventData:s,EventHandler:function(){var i=[];this.subscribe=function(t,e){return i.push({event:t,handler:e}),t.subscribe(e),this},this.unsubscribe=function(t,e){for(var n=i.length;n--;)if(i[n].event===t&&i[n].handler===e)return i.splice(n,1),void t.unsubscribe(e);return this},this.unsubscribeAll=function(){for(var t=i.length;t--;)i[t].event.unsubscribe(i[t].handler);return i=[],this}},Range:function(t,e,n,i){void 0===n&&void 0===i&&(n=t,i=e),this.fromRow=Math.min(t,n),this.fromCell=Math.min(e,i),this.toRow=Math.max(t,n),this.toCell=Math.max(e,i),this.isSingleRow=function(){return this.fromRow==this.toRow},this.isSingleCell=function(){return this.fromRow==this.toRow&&this.fromCell==this.toCell},this.contains=function(t,e){return t>=this.fromRow&&t<=this.toRow&&e>=this.fromCell&&e<=this.toCell},this.toString=function(){return this.isSingleCell()?"("+this.fromRow+":"+this.fromCell+")":"("+this.fromRow+":"+this.fromCell+" - "+this.toRow+":"+this.toCell+")"}},NonDataRow:t,Group:e,GroupTotals:n,RegexSanitizer:function(t){return t.replace(/(\b)(on[a-z]+)(\s*)=|javascript:([^>]*)[^>]*|(<\s*)(\/*)script([<>]*).*(<\s*)(\/*)script(>*)|(<)(\/*)(script|script defer)(.*)(>|>">)/gi,"")},EditorLock:i,BindingEventService:function(){this.boundedEvents=[],this.destroy=function(){this.unbindAll(),this.boundedEvents=[]},this.bind=function(t,e,n,i){t.addEventListener(e,n,i),this.boundedEvents.push({element:t,eventName:e,listener:n})},this.unbind=function(t,e,n){t&&t.removeEventListener&&t.removeEventListener(e,n)},this.unbindByEventName=function(e,n){var t=this.boundedEvents.find(t=>t.element===e&&t.eventName===n);t&&this.unbind(t.element,t.eventName,t.listener)},this.unbindAll=function(){for(;0<this.boundedEvents.length;){var{element:t,eventName:e,listener:n}=this.boundedEvents.pop();this.unbind(t,e,n)}}},Utils:{debounce:function(e,n){let i=null;return(...t)=>{0<=n?(clearTimeout(i),i=setTimeout(()=>e.apply(null,t),n)):e.apply(null)}},extend:function t(){var e,n,i,o,r,s,l=arguments[0],u=1,c=arguments.length,a=!1;for("boolean"==typeof l?(a=l,l=arguments[u]||{},u++):l=l||{},"object"==typeof l||"function"==typeof(s=l)&&"number"!=typeof s.nodeType&&"function"!=typeof s.item||(l={}),u===c&&(l=this,u--);u<c;u++)if(null!=(e=arguments[u]))for(n in e)i=e[n],"__proto__"!==n&&l!==i&&(a&&i&&(C(i)||(o=Array.isArray(i)))?(r=l[n],r=o&&!Array.isArray(r)?[]:o||C(r)?r:{},o=!1,l[n]=t(a,r,i)):void 0!==i&&(l[n]=i));return l},calculateAvailableSpace:function(t){let e=0,n=0,i=0,o=0;var r,s=a.innerHeight||0,l=a.innerWidth||0,u=(c={left:a.pageXOffset||document.documentElement.scrollLeft||0,top:a.pageYOffset||document.documentElement.scrollTop||0}).top,c=c.left;return(t=f(t))&&(r=t.top||0,t=t.left||0,n=r-u,e=s-(r-u),i=t-c,o=l-(t-c)),{top:n,bottom:e,left:i,right:o}},createDomElement:function(t,n,e){const i=document.createElement(t);return n&&Object.keys(n).forEach(t=>{var e=n[t];"object"==typeof e?Object.assign(i[t],e):i[t]=n[t]}),e&&e.appendChild&&e.appendChild(i),i},emptyElement:function(t){if(t&&t.firstChild)for(;t.firstChild;)t.lastChild&&t.removeChild(t.lastChild);return t},innerSize:function(t,e){let n=0;if(t){n=t["height"===e?"clientHeight":"clientWidth"];for(const o of"height"===e?["top","bottom"]:["left","right"]){var i=parseFloat(function(t,e){if(t&&t.getComputedStyle)return a.getComputedStyle(t,null).getPropertyValue(e);return null}(t,"padding-"+o))||0;n-=i}}return n},isEmptyObject:function(t){return null==t||0===Object.entries(t).length},noop:function(){},offset:f,height:function(t,e){if(t)return void 0===e?t.getBoundingClientRect().height:void o(t,"height",e)},width:function(t,e){if(t&&t.getBoundingClientRect)return void 0===e?t.getBoundingClientRect().width:void o(t,"width",e)},setStyleSize:o,contains:function(e,t){return!(!e||!t||l(t).every(function(t){return e!=t}))},toFloat:function(t){return t=parseFloat(t),isNaN(t)?0:t},parents:l,show:u,hide:c,slideUp:function(t,e){return h(t,"slideUp",e)},slideDown:function(t,e){return h(t,"slideDown",e)},storage:{_storage:new WeakMap,put:function(t,e,n){this._storage.has(t)||this._storage.set(t,new Map),this._storage.get(t).set(e,n)},get:function(t,e){t=this._storage.get(t);return t?t.get(e):null},remove:function(t,e){e=this._storage.get(t).delete(e);return 0===!this._storage.get(t).size&&this._storage.delete(t),e}}},GlobalEditorLock:new i,keyCode:{SPACE:8,BACKSPACE:8,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,INSERT:45,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,RIGHT:39,TAB:9,UP:38,A:65},preClickClassName:"slick-edit-preclick",GridAutosizeColsMode:{None:"NOA",LegacyOff:"LOF",LegacyForceFit:"LFF",IgnoreViewport:"IGV",FitColsToViewport:"FCV",FitViewportToCols:"FVC"},ColAutosizeMode:{Locked:"LCK",Guide:"GUI",Content:"CON",ContentExpandOnly:"CXO",ContentIntelligent:"CTI"},RowSelectionMode:{FirstRow:"FS1",FirstNRows:"FSN",AllRows:"ALL",LastRow:"LS1"},ValueFilterMode:{None:"NONE",DeDuplicate:"DEDP",GetGreatestAndSub:"GR8T",GetLongestTextAndSub:"LNSB",GetLongestText:"LNSC"},WidthEvalMode:{Auto:"AUTO",TextOnly:"CANV",HTML:"HTML"}},"undefined"!=typeof global&&(global.Slick=a.Slick)}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./slick.dataview.js | ||
*/ | ||
Slick.Utils.extend(!0,Slick,{Data:{DataView:function(r){var i,o,l,a,P,s,u=this,g="id",c=[],d=[],f=new Map,h=null,p=null,m=null,j=!1,w=!1,v=new Map,_=!0,y={},B={},S=[],U=[],C=null,z={getter:null,formatter:null,comparer:function(e,t){return e.value===t.value?0:e.value>t.value?1:-1},predefinedValues:[],aggregators:[],aggregateEmpty:!1,aggregateCollapsed:!1,aggregateChildGroups:!1,collapsed:!1,displayTotalsRow:!0,lazyTotalsCalculation:!1},I=[],$=[],R=[],x=":|:",k=null,E=0,G=0,M=0,b=new Slick.Event,n=new Slick.Event,K=new Slick.Event,q=new Slick.Event,L=new Slick.Event,H=new Slick.Event,W=new Slick.Event,A=new Slick.Event,F=new Slick.Event;function D(e){if(!w&&f)for(var t,n=e=e||0,i=c.length;n<i;n++){if(void 0===(t=c[n][g]))throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property");f.set(t,n)}}function J(){if(!w&&f)for(var e,t=0,n=c.length;t<n;t++)if(void 0===(e=c[t][g])||f.get(e)!==t)throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property")}function V(){var e=E?Math.max(1,Math.ceil(M/E)):1;return{pageSize:E,pageNum:G,totalRows:M,totalPages:e,dataView:u}}function e(e,t){o=e,i=null,!1===(_=t)&&c.reverse(),c.sort(e),!1===t&&c.reverse(),f=new Map,D(),T()}function t(e,t){_=t,i=e,o=null;var n=Object.prototype.toString;Object.prototype.toString="function"==typeof e?e:function(){return this[e]},!1===t&&c.reverse(),c.sort(),Object.prototype.toString=n,!1===t&&c.reverse(),f=new Map,D(),T()}function Q(e){r.groupItemMetadataProvider||(r.groupItemMetadataProvider=new Slick.Data.GroupItemMetadataProvider),$=[],R=[],I=(e=e||[])instanceof Array?e:[e];for(var t=0;t<I.length;t++){for(var n=I[t]=Slick.Utils.extend(!0,{},z,I[t]),i=(n.getterIsAFn="function"==typeof n.getter,n.compiledAccumulators=[],n.aggregators.length);i--;)n.compiledAccumulators[i]=function(e){{var t;return e.accumulate?(e=ae(e.accumulate),e=new Function("_items","for (var "+e.params[0]+", _i=0, _il=_items.length; _i<_il; _i++) {"+e.params[0]+" = _items[_i]; "+e.body+"}"),t="compiledAccumulatorLoop",e.displayName=t,e.name=se(e,t),e):function(){}}}(n.aggregators[i]);R[t]={}}T()}function N(){if(!h){h={};for(var e=0,t=d.length;e<t;e++)h[d[e][g]]=e}}function X(e){return c[f&&f.get(e)]}function Y(e,t){if(f){if(!f.has(e))throw new Error("[SlickGrid DataView] Invalid id");if(e!==t[g]){var n=t[g];if(null==n)throw new Error("[SlickGrid DataView] Cannot update item to associate with a null id");if(f.has(n))throw new Error("[SlickGrid DataView] Cannot update item to associate with a non-unique id");f.set(n,f.get(e)),f.delete(e),m&&m[e]&&delete m[e],e=n}c[f.get(e)]=t,(m=m||{})[e]=!0}}function Z(e,t){Y(e,t),T()}function ee(e,t){c.splice(e,0,t),D(e),T()}function te(e){if(f)if(w)v.set(e,!0);else{var t=f.get(e);if(void 0===t)throw new Error("[SlickGrid DataView] Invalid id");f.delete(e),c.splice(t,1),D(t),T()}}function ne(e){if(!o)throw new Error("[SlickGrid DataView] sortedAddItem() requires a sort comparer, use sort()");ee(function(e){var t=0,n=c.length;for(;t<n;){var i=t+n>>>1;-1===o(c[i],e)?t=1+i:n=i}return t}(e),e)}function ie(e,t){if(null==e)for(var n=0;n<I.length;n++)R[n]={},(!0===(I[n].collapsed=t)?F:A).notify({level:n,groupingKey:null});else R[e]={},(!0===(I[e].collapsed=t)?F:A).notify({level:e,groupingKey:null});T()}function re(e,t,n){R[e][t]=I[e].collapsed^n,T()}function oe(e,t){for(var n,i,r,o=[],l={},a=t?t.level+1:0,s=I[a],u=0,g=s.predefinedValues.length;u<g;u++)(n=l[i=s.predefinedValues[u]])||((n=new Slick.Group).value=i,n.level=a,n.groupingKey=(t?t.groupingKey+x:"")+i,o[o.length]=n,l[i]=n);for(u=0,g=e.length;u<g;u++)r=e[u],(n=l[i=s.getterIsAFn?s.getter(r):r[s.getter]])||((n=new Slick.Group).value=i,n.level=a,n.groupingKey=(t?t.groupingKey+x:"")+i,o[o.length]=n,l[i]=n),n.rows[n.count++]=r;if(a<I.length-1)for(u=0;u<o.length;u++)(n=o[u]).groups=oe(n.rows,n);return o.length&&function e(t,n){n=n||0;var i=I[n];var r=i.collapsed;var o=R[n];var l,a=t.length;for(;a--;)(l=t[a]).collapsed&&!i.aggregateCollapsed||(l.groups&&e(l.groups,n+1),i.aggregators.length&&(i.aggregateEmpty||l.rows.length||l.groups&&l.groups.length)&&le(l),l.collapsed=r^o[l.groupingKey],l.title=i.formatter?i.formatter(l):l.value)}(o,a),o.sort(I[a].comparer),o}function O(e){var t,n=e.group,i=I[n.level],r=n.level==I.length,o=i.aggregators.length;if(!r&&i.aggregateChildGroups)for(var l=n.groups.length;l--;)n.groups[l].totals.initialized||O(n.groups[l].totals);for(;o--;)(t=i.aggregators[o]).init(),!r&&i.aggregateChildGroups?i.compiledAccumulators[o].call(t,n.groups):i.compiledAccumulators[o].call(t,n.rows),t.storeResult(e);e.initialized=!0}function le(e){var t=I[e.level],n=new Slick.GroupTotals;(n.group=e).totals=n,t.lazyTotalsCalculation||O(n)}function ae(e){var t=0<=e.toString().indexOf("function")?/^function[^(]*\(([^)]*)\)\s*{([\s\S]*)}$/:/^[^(]*\(([^)]*)\)\s*{([\s\S]*)}$/,e=e.toString().match(t);return{params:e[1].split(","),body:e[2]}}function se(t,n){try{Object.defineProperty(t,"name",{writable:!0,value:n})}catch(e){t.name=n}}function ue(e,t){for(var n=[],i=0,r=0,o=e.length;r<o;r++)p(e[r],t)&&(n[i++]=e[r]);return n}function ge(e,t,n){for(var i,r=[],o=0,l=0,a=e.length;l<a;l++)i=e[l],n[l]?r[o++]=i:p(i,t)&&(r[o++]=i,n[l]=!0);return r}function ce(e){h=null,y.isFilterNarrowing==B.isFilterNarrowing&&y.isFilterExpanding==B.isFilterExpanding||(U=[]);e=e,p?(t=r.inlineFilters?a:ue,n=r.inlineFilters?P:ge,y.isFilterNarrowing?S=t(S,l):y.isFilterExpanding?S=n(e,l,U):y.isFilterUnchanged||(S=t(e,l))):S=E?e:e.concat(),n=E?(S.length<=G*E&&(G=0===S.length?0:Math.floor((S.length-1)/E)),S.slice(E*G,E*G+E)):S;var t={totalRows:S.length,rows:n},e=(M=t.totalRows,t.rows),n=($=[],I.length&&($=oe(e)).length&&(e=function e(t,n){for(var i,r=I[n=n||0],o=[],l=0,a=0,s=t.length;a<s;a++){if(i=t[a],!(o[l++]=i).collapsed)for(var u,g=0,c=(u=i.groups?e(i.groups,n+1):i.rows).length;g<c;g++)o[l++]=u[g];i.totals&&r.displayTotalsRow&&(!i.collapsed||r.aggregateCollapsed)&&(o[l++]=i.totals)}return o}($)),function(e,t){var n,i,r,o=[],l=0,a=Math.max(t.length,e.length);y&&y.ignoreDiffsBefore&&(l=Math.max(0,Math.min(t.length,y.ignoreDiffsBefore))),y&&y.ignoreDiffsAfter&&(a=Math.min(t.length,Math.max(0,y.ignoreDiffsAfter)));for(var s=l,u=e.length;s<a;s++)(u<=s||(n=t[s],i=e[s],!n)||I.length&&(r=n.__nonDataRow||i.__nonDataRow)&&n.__group!==i.__group||n.__group&&!n.equals(i)||r&&(n.__groupTotals||i.__groupTotals)||n[g]!=i[g]||m&&m[n[g]])&&(o[o.length]=s);return o}(d,e));return d=e,n}function T(){var e,t,n,i;!j&&(e=Slick.Utils.extend(!0,{},V()),t=d.length,n=M,i=ce(c),E&&M<G*E&&(G=Math.max(0,Math.ceil(M/E)-1),i=ce(c)),m=null,B=y,y={},n!==M&&!1!==H.notify(e,null,u)&&W.notify(V(),null,u),t!==d.length&&K.notify({previous:t,current:d.length,itemCount:c.length,dataView:u,callingOnRowsChanged:0<i.length},null,u),0<i.length&&q.notify({rows:i,itemCount:c.length,dataView:u,calledOnRowCountChanged:t!==d.length},null,u),t!==d.length||0<i.length)&&L.notify({rowsDiff:i,previousRowCount:t,currentRowCount:d.length,itemCount:c.length,rowCountChanged:t!==d.length,rowsChanged:0<i.length,dataView:u},null,u)}function de(){return k}function fe(){return Array.isArray(k)&&S.filter(function(t){return k.some(function(e){return t[g]===e})})||[]}r=Slick.Utils.extend(!0,{},{groupItemMetadataProvider:null,inlineFilters:!1},r),Slick.Utils.extend(this,{beginUpdate:function(e){w=(j=!0)===e},endUpdate:function(){var e=w;if(j=w=!1,e){if(f){for(var t,n,i=0,r=0,o=c.length;r<o;r++){if(n=c[r],void 0===(t=n[g]))throw new Error("[SlickGrid DataView] Each data element must implement a unique 'id' property");v.has(t)?f.delete(t):(c[i]=n,f.set(t,i),++i)}c.length=i,v=new Map}J()}T()},destroy:function(){c=[],U=[],S=[],P=a=o=m=p=h=f=null,C&&C.onSelectedRowsChanged&&C.onCellCssStylesChanged&&(C.onSelectedRowsChanged.unsubscribe(),C.onCellCssStylesChanged.unsubscribe()),u.onRowsOrCountChanged&&u.onRowsOrCountChanged.unsubscribe()},setPagingOptions:function(e){!1!==H.notify(V(),null,u).getReturnValue()&&(null!=e.pageSize&&(E=e.pageSize,G=E?Math.min(G,Math.max(0,Math.ceil(M/E)-1)):0),null!=e.pageNum&&(G=Math.min(e.pageNum,Math.max(0,Math.ceil(M/E)-1))),W.notify(V(),null,u),T())},getPagingInfo:V,getIdPropertyName:function(){return g},getItems:function(){return c},setItems:function(e,t){void 0!==t&&(g=t),c=S=e,n.notify({idProperty:t,itemCount:c.length},null,u),f=new Map,D(),J(),T()},setFilter:function(e){var t,n;p=e,r.inlineFilters&&(e=ae(p),t="{ continue _coreloop; }$1",n="{ _retval[_idx++] = $item$; continue _coreloop; }$1",t=e.body.replace(/return false\s*([;}]|\}|$)/gi,t).replace(/return!1([;}]|\}|$)/gi,t).replace(/return true\s*([;}]|\}|$)/gi,n).replace(/return!0([;}]|\}|$)/gi,n).replace(/return ([^;}]+?)\s*([;}]|$)/gi,"{ if ($1) { _retval[_idx++] = $item$; }; continue _coreloop; }$2"),n=(n=(n=(n=["var _retval = [], _idx = 0; ","var $item$, $args$ = _args; ","_coreloop: ","for (var _i = 0, _il = _items.length; _i < _il; _i++) { ","$item$ = _items[_i]; ","$filter$; ","} ","return _retval; "].join("")).replace(/\$filter\$/gi,t)).replace(/\$item\$/gi,e.params[0])).replace(/\$args\$/gi,e.params[1]),t=new Function("_items,_args",n),e="compiledFilter",t.displayName=e,t.name=se(t,e),a=t,n=ae(p),e="{ continue _coreloop; }$1",t="{ _cache[_i] = true;_retval[_idx++] = $item$; continue _coreloop; }$1",e=n.body.replace(/return false\s*([;}]|\}|$)/gi,e).replace(/return!1([;}]|\}|$)/gi,e).replace(/return true\s*([;}]|\}|$)/gi,t).replace(/return!0([;}]|\}|$)/gi,t).replace(/return ([^;}]+?)\s*([;}]|$)/gi,"{ if ((_cache[_i] = $1)) { _retval[_idx++] = $item$; }; continue _coreloop; }$2"),t=(t=(t=(t=["var _retval = [], _idx = 0; ","var $item$, $args$ = _args; ","_coreloop: ","for (var _i = 0, _il = _items.length; _i < _il; _i++) { ","$item$ = _items[_i]; ","if (_cache[_i]) { ","_retval[_idx++] = $item$; ","continue _coreloop; ","} ","$filter$; ","} ","return _retval; "].join("")).replace(/\$filter\$/gi,e)).replace(/\$item\$/gi,n.params[0])).replace(/\$args\$/gi,n.params[1]),e=new Function("_items,_args,_cache",t),n="compiledFilterWithCaching",e.displayName=n,e.name=se(e,n),P=e),T()},getFilter:function(){return p},getFilteredItems:function(){return S},getFilteredItemCount:function(){return S.length},sort:e,fastSort:t,reSort:function(){o?e(o,_):i&&t(i,_)},setGrouping:Q,getGrouping:function(){return I},groupBy:function(e,t,n){Q(null==e?[]:{getter:e,formatter:t,comparer:n})},setAggregators:function(e,t){if(!I.length)throw new Error("[SlickGrid DataView] At least one grouping must be specified before calling setAggregators().");I[0].aggregators=e,I[0].aggregateCollapsed=t,Q(I)},collapseAllGroups:function(e){ie(e,!0)},expandAllGroups:function(e){ie(e,!1)},collapseGroup:function(e){var t,n=Array.prototype.slice.call(arguments),i=n[0];re(i=1===n.length&&-1!==i.indexOf(x)?(t=i).split(x).length-1:(t=n.join(x),n.length-1),t,!0),F.notify({level:i,groupingKey:t})},expandGroup:function(e){var t,n=Array.prototype.slice.call(arguments),i=n[0],i=1===n.length&&-1!==i.indexOf(x)?(t=i.split(x).length-1,i):(t=n.length-1,n.join(x));re(t,i,!1),A.notify({level:t,groupingKey:i})},getGroups:function(){return $},getAllSelectedIds:de,getAllSelectedItems:function(){var t=[];return k.forEach(function(e){t.push(u.getItemById(e))}),t},getAllSelectedFilteredIds:function(){return fe().map(function(e){return e[g]})},getAllSelectedFilteredItems:fe,setSelectedIds:function(e,t){var n=t&&t.isRowBeingAdded,i=t&&t.shouldTriggerEvent,t=t&&t.applyRowSelectionToGrid,r=(!1!==n&&(n=!0),u.mapIdsToRows(e));s(e={grid:C,ids:e,rows:r,added:n,dataView:u}),!1!==i&&b.notify(Object.assign(e,{selectedRowIds:k,filteredIds:u.getAllSelectedFilteredIds()}),new Slick.EventData,u),!1!==t&&C&&C.setSelectedRows(r)},getIdxById:function(e){return f&&f.get(e)},getRowByItem:function(e){return N(),h[e[g]]},getRowById:function(e){return N(),h[e]},getItemById:X,getItemByIdx:function(e){return c[e]},mapItemsToRows:function(e){var t=[];N();for(var n=0,i=e.length;n<i;n++){var r=h[e[n][g]];null!=r&&(t[t.length]=r)}return t},mapRowsToIds:function(e){for(var t,n=[],i=0,r=e.length;i<r;i++)e[i]<d.length&&(t=d[e[i]],n[n.length]=t&&t[g]);return n},mapIdsToRows:function(e){var t=[];N();for(var n=0,i=e.length;n<i;n++){var r=h[e[n]];null!=r&&(t[t.length]=r)}return t},setRefreshHints:function(e){y=e},setFilterArgs:function(e){l=e},refresh:T,updateItem:Z,updateItems:function(e,t){if(e.length!==t.length)throw new Error("[SlickGrid DataView] Mismatch on the length of ids and items provided to update");for(var n=0,i=t.length;n<i;n++)Y(e[n],t[n]);T()},insertItem:ee,insertItems:function(e,t){Array.prototype.splice.apply(c,[e,0].concat(t)),D(e),T()},addItem:function(e){c.push(e),D(c.length-1),T()},addItems:function(e){D((c=c.concat(e)).length-e.length),T()},deleteItem:te,deleteItems:function(e){if(0!==e.length&&f)if(w)for(var t=0,n=e.length;t<n;t++){var i=e[t];if(void 0===(o=f.get(i)))throw new Error("[SlickGrid DataView] Invalid id");v.set(i,!0)}else{for(var r=[],t=0,n=e.length;t<n;t++){var o,i=e[t];if(void 0===(o=f.get(i)))throw new Error("[SlickGrid DataView] Invalid id");f.delete(i),r.push(o)}r.sort();for(t=r.length-1;0<=t;--t)c.splice(r[t],1);D(r[0]),T()}},sortedAddItem:ne,sortedUpdateItem:function(e,t){if(f){if(!f.has(e)||e!==t[g])throw new Error("[SlickGrid DataView] Invalid or non-matching id "+f.get(e));if(!o)throw new Error("[SlickGrid DataView] sortedUpdateItem() requires a sort comparer, use sort()");var n=X(e);0!==o(n,t)?(te(e),ne(t)):Z(e,t)}},syncGridSelection:function(n,i,e){var r,o=this;function l(e){!1===e?k=[]:k.sort().join(",")!==e.sort().join(",")&&(k=e)}return C=n,k=o.mapRowsToIds(n.getSelectedRows()),n.onSelectedRowsChanged.subscribe(function(e,t){var n;r||(n=o.mapRowsToIds(t.rows),n={grid:C,ids:n,rows:t.rows,added:!0,dataView:o},s(n),b.notify(Object.assign(n,{selectedRowIds:k,filteredIds:o.getAllSelectedFilteredIds()}),new Slick.EventData,o))}),s=function(t){r||(r=!0,l(void 0===t.added?t.ids:t.added?e&&n.getOptions().multiSelect?k.filter(function(e){return void 0===o.getRowById(e)}).concat(t.ids):t.ids:e&&n.getOptions().multiSelect?k.filter(function(e){return-1===t.ids.indexOf(e)}):[]),r=!1)},this.onRowsOrCountChanged.subscribe(function(){var e,t;0<k.length&&!r&&(r=!0,e=o.mapIdsToRows(k),i||(t={grid:C,ids:o.mapRowsToIds(e),rows:e,dataView:o},s(t),b.notify(Object.assign(t,{selectedRowIds:k,filteredIds:o.getAllSelectedFilteredIds()}),new Slick.EventData,o)),n.setSelectedRows(e),r=!1)}),b},syncGridCellCssStyles:function(i,r){var o,l;function n(e){for(var t in o={},e){var n=d[t][g];o[n]=e[t]}}function a(){if(o){l=!0,N();var e,t={};for(e in o){var n=h[e];null!=n&&(t[n]=o[e])}i.setCellCssStyles(r,t),l=!1}}n(i.getCellCssStyles(r)),i.onCellCssStylesChanged.subscribe(function(e,t){l||r==t.key&&(t.hash?n(t.hash):(i.onCellCssStylesChanged.unsubscribe(),u.onRowsOrCountChanged.unsubscribe(a)))}),this.onRowsOrCountChanged.subscribe(a)},getItemCount:function(){return c.length},getLength:function(){return d.length},getItem:function(e){var t;return(e=d[e])&&e.__group&&e.totals&&!e.totals.initialized?(t=I[e.level]).displayTotalsRow||(O(e.totals),e.title=t.formatter?t.formatter(e):e.value):e&&e.__groupTotals&&!e.initialized&&O(e),e},getItemMetadata:function(e){return void 0===(e=d[e])?null:e.__group?r.groupItemMetadataProvider.getGroupRowMetadata(e):e.__groupTotals?r.groupItemMetadataProvider.getTotalsRowMetadata(e):null},onSelectedRowIdsChanged:b,onSetItemsCalled:n,onRowCountChanged:K,onRowsChanged:q,onRowsOrCountChanged:L,onBeforePagingInfoChanged:H,onPagingInfoChanged:W,onGroupExpanded:A,onGroupCollapsed:F})},Aggregators:{Avg:function(e){this.field_=e,this.init=function(){this.count_=0,this.nonNullCount_=0,this.sum_=0},this.accumulate=function(e){e=e[this.field_];this.count_++,null==e||""===e||isNaN(e)||(this.nonNullCount_++,this.sum_+=parseFloat(e))},this.storeResult=function(e){e.avg||(e.avg={}),0!==this.nonNullCount_&&(e.avg[this.field_]=this.sum_/this.nonNullCount_)}},Min:function(e){this.field_=e,this.init=function(){this.min_=null},this.accumulate=function(e){e=e[this.field_];null==e||""===e||isNaN(e)||(null==this.min_||e<this.min_)&&(this.min_=e)},this.storeResult=function(e){e.min||(e.min={}),e.min[this.field_]=this.min_}},Max:function(e){this.field_=e,this.init=function(){this.max_=null},this.accumulate=function(e){e=e[this.field_];null==e||""===e||isNaN(e)||(null==this.max_||e>this.max_)&&(this.max_=e)},this.storeResult=function(e){e.max||(e.max={}),e.max[this.field_]=this.max_}},Sum:function(e){this.field_=e,this.init=function(){this.sum_=null},this.accumulate=function(e){e=e[this.field_];null==e||""===e||isNaN(e)||(this.sum_+=parseFloat(e))},this.storeResult=function(e){e.sum||(e.sum={}),e.sum[this.field_]=this.sum_}},Count:function(e){this.field_=e,this.init=function(){},this.storeResult=function(e){e.count||(e.count={}),e.count[this.field_]=e.group.rows.length}}}}}); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./slick.editors.js | ||
*/ | ||
!function(e){const u=Slick.Utils;function l(i){var n,t,e,o=this;function a(){var e=i.column.editorFixedDecimalPlaces;return(e=void 0===e?l.DefaultDecimalPlaces:e)||0===e?e:null}this.args=i,this.init=function(){e=i.grid.getOptions().editorCellNavOnLRKeys,(n=u.createDomElement("input",{type:"text",className:"editor-text"},i.container)).addEventListener("keydown.nav",e?s:r),n.focus(),n.select(),i.compositeEditorOptions&&n.addEventListener("change",this.onChange)},this.onChange=function(){var e=i.grid.getActiveCell();o.validate().valid&&o.applyValue(o.args.item,o.serializeValue()),o.applyValue(o.args.compositeEditorOptions.formValues,o.serializeValue()),i.grid.onCompositeEditorChange.notify({row:e.row,cell:e.cell,item:o.args.item,column:o.args.column,formValues:o.args.compositeEditorOptions.formValues})},this.destroy=function(){n.removeEventListener("keydown.nav",e?s:r),n.removeEventListener("change",this.onChange),n.remove()},this.focus=function(){n.focus()},this.loadValue=function(e){t=e[i.column.field];e=a();null!==e&&(t||0===t)&&t.toFixed&&(t=t.toFixed(e)),n.value=t,n.defaultValue=t,n.select()},this.serializeValue=function(){var e=parseFloat(n.value),t=(l.AllowEmptyValue?e||0===e||(e=""):e=e||0,a());return e=null!==t&&(e||0===e)&&e.toFixed?parseFloat(e.toFixed(t)):e},this.applyValue=function(e,t){e[i.column.field]=t},this.isValueChanged=function(){return!(""===n.value&&null==t)&&n.value!=t},this.validate=function(){if(isNaN(n.value))return{valid:!1,msg:"Please enter a valid number"};if(i.column.validator){var e=i.column.validator(n.value,i);if(!e.valid)return e}return{valid:!0,msg:null}},this.init()}function s(e){var t=this.selectionStart,i=this.value.length;(e.keyCode===Slick.keyCode.LEFT&&0<t||e.keyCode===Slick.keyCode.RIGHT&&t<i-1)&&e.stopImmediatePropagation()}function r(e){e.keyCode!==Slick.keyCode.LEFT&&e.keyCode!==Slick.keyCode.RIGHT||e.stopImmediatePropagation()}l.DefaultDecimalPlaces=null,l.AllowEmptyValue=!1,Slick.Utils.extend(!0,e,{Slick:{Editors:{Text:function(i){var t,n,e,o=this;this.args=i,this.init=function(){e=i.grid.getOptions().editorCellNavOnLRKeys,(t=u.createDomElement("input",{type:"text",className:"editor-text"},i.container)).addEventListener("keydown.nav",e?s:r),t.focus(),t.select(),i.compositeEditorOptions&&t.addEventListener("change",this.onChange)},this.onChange=function(){var e=i.grid.getActiveCell();o.validate().valid&&o.applyValue(o.args.item,o.serializeValue()),o.applyValue(o.args.compositeEditorOptions.formValues,o.serializeValue()),i.grid.onCompositeEditorChange.notify({row:e.row,cell:e.cell,item:o.args.item,column:o.args.column,formValues:o.args.compositeEditorOptions.formValues})},this.destroy=function(){t.removeEventListener("keydown.nav",e?s:r),t.removeEventListener("change",this.onChange),t.remove()},this.focus=function(){t.focus()},this.getValue=function(){return t.value},this.setValue=function(e){t.value=e},this.loadValue=function(e){n=e[i.column.field]||"",t.value=n,t.defaultValue=n,t.select()},this.serializeValue=function(){return t.value},this.applyValue=function(e,t){e[i.column.field]=t},this.isValueChanged=function(){return!(""===t.value&&null==n)&&t.value!=n},this.validate=function(){if(i.column.validator){var e=i.column.validator(t.value,i);if(!e.valid)return e}return{valid:!0,msg:null}},this.init()},Integer:function(i){var t,n,e,o=this;this.args=i,this.init=function(){e=i.grid.getOptions().editorCellNavOnLRKeys,(t=u.createDomElement("input",{type:"text",className:"editor-text"},i.container)).addEventListener("keydown.nav",e?s:r),t.focus(),t.select(),i.compositeEditorOptions&&t.addEventListener("change",this.onChange)},this.onChange=function(){var e=i.grid.getActiveCell();o.validate().valid&&o.applyValue(o.args.item,o.serializeValue()),o.applyValue(o.args.compositeEditorOptions.formValues,o.serializeValue()),i.grid.onCompositeEditorChange.notify({row:e.row,cell:e.cell,item:o.args.item,column:o.args.column,formValues:o.args.compositeEditorOptions.formValues})},this.destroy=function(){t.removeEventListener("keydown.nav",e?s:r),t.removeEventListener("change",this.onChange),t.remove()},this.focus=function(){t.focus()},this.loadValue=function(e){n=e[i.column.field],t.value=n,t.defaultValue=n,t.select()},this.serializeValue=function(){return parseInt(t.value,10)||0},this.applyValue=function(e,t){e[i.column.field]=t},this.isValueChanged=function(){return!(""===t.value&&null==n)&&t.value!=n},this.validate=function(){if(isNaN(t.value))return{valid:!1,msg:"Please enter a valid integer"};if(i.column.validator){var e=i.column.validator(t.value,i);if(!e.valid)return e}return{valid:!0,msg:null}},this.init()},Float:l,Flatpickr:function(i){if("undefined"==typeof flatpickr)throw new Error("Flatpickr not loaded but required in SlickGrid.Editors, refer to Flatpickr documentation: https://flatpickr.js.org/getting-started/");var t,n,o,a=this;this.args=i,this.init=function(){(t=u.createDomElement("input",{type:"text",className:"editor-text"},i.container)).focus(),t.select(),o=flatpickr(t,{closeOnSelect:!0,allowInput:!0,altInput:!0,altFormat:"m/d/Y",dateFormat:"m/d/Y",onChange:()=>{var e;i.compositeEditorOptions&&(e=i.grid.getActiveCell(),a.validate().valid&&a.applyValue(a.args.item,a.serializeValue()),a.applyValue(a.args.compositeEditorOptions.formValues,a.serializeValue()),i.grid.onCompositeEditorChange.notify({row:e.row,cell:e.cell,item:a.args.item,column:a.args.column,formValues:a.args.compositeEditorOptions.formValues}))}}),i.compositeEditorOptions||setTimeout(()=>{a.show(),a.focus()},50),u.width(t,u.width(t)-(i.compositeEditorOptions?28:18))},this.destroy=function(){a.hide(),o&&o.destroy(),t.remove()},this.show=function(){!i.compositeEditorOptions&&o&&o.open()},this.hide=function(){!i.compositeEditorOptions&&o&&o.close()},this.focus=function(){t.focus()},this.loadValue=function(e){n=e[i.column.field],t.value=n,t.defaultValue=n,t.select(),o&&o.setDate(n)},this.serializeValue=function(){return t.value},this.applyValue=function(e,t){e[i.column.field]=t},this.isValueChanged=function(){return!(""===t.value&&null==n)&&t.value!=n},this.validate=function(){if(i.column.validator){var e=i.column.validator(t.value,i);if(!e.valid)return e}return{valid:!0,msg:null}},this.init()},YesNoSelect:function(i){var t,n,o=this;this.args=i,this.init=function(){t=u.createDomElement("select",{tabIndex:0,className:"editor-yesno"},i.container),u.createDomElement("option",{value:"yes",textContent:"Yes"},t),u.createDomElement("option",{value:"no",textContent:"No"},t),t.focus(),i.compositeEditorOptions&&t.addEventListener("change",this.onChange)},this.onChange=function(){var e=i.grid.getActiveCell();o.validate().valid&&o.applyValue(o.args.item,o.serializeValue()),o.applyValue(o.args.compositeEditorOptions.formValues,o.serializeValue()),i.grid.onCompositeEditorChange.notify({row:e.row,cell:e.cell,item:o.args.item,column:o.args.column,formValues:o.args.compositeEditorOptions.formValues})},this.destroy=function(){t.removeEventListener("change",this.onChange),t.remove()},this.focus=function(){t.focus()},this.loadValue=function(e){t.value=(n=e[i.column.field])?"yes":"no"},this.serializeValue=function(){return"yes"==t.value},this.applyValue=function(e,t){e[i.column.field]=t},this.isValueChanged=function(){return t.value!=n},this.validate=function(){return{valid:!0,msg:null}},this.init()},Checkbox:function(i){var t,n,o=this;this.args=i,this.init=function(){(t=u.createDomElement("input",{className:"editor-checkbox",type:"checkbox",value:"true"},i.container)).focus(),i.compositeEditorOptions&&t.addEventListener("change",this.onChange)},this.onChange=function(){var e=i.grid.getActiveCell();o.validate().valid&&o.applyValue(o.args.item,o.serializeValue()),o.applyValue(o.args.compositeEditorOptions.formValues,o.serializeValue()),i.grid.onCompositeEditorChange.notify({row:e.row,cell:e.cell,item:o.args.item,column:o.args.column,formValues:o.args.compositeEditorOptions.formValues})},this.destroy=function(){t.removeEventListener("change",this.onChange),t.remove()},this.focus=function(){t.focus()},this.loadValue=function(e){n=!!e[i.column.field],t.checked=!!n},this.serializeValue=function(){return t.checked},this.applyValue=function(e,t){e[i.column.field]=t},this.isValueChanged=function(){return this.serializeValue()!==n},this.validate=function(){return{valid:!0,msg:null}},this.init()},PercentComplete:function(i){function t(){o.value=this.value}function n(){var e;i.compositeEditorOptions&&(e=i.grid.getActiveCell(),r.validate().valid&&r.applyValue(r.args.item,r.serializeValue()),r.applyValue(r.args.compositeEditorOptions.formValues,r.serializeValue()),i.grid.onCompositeEditorChange.notify({row:e.row,cell:e.cell,item:r.args.item,column:r.args.column,formValues:r.args.compositeEditorOptions.formValues}))}var o,a,l,s,r=this;this.args=i,this.init=function(){o=u.createDomElement("input",{className:"editor-percentcomplete",type:"text"},i.container),u.width(o,i.container.clientWidth-25),a=u.createDomElement("div",{className:"editor-percentcomplete-picker"},i.container);var e=u.createDomElement("div",{className:"editor-percentcomplete-helper"},a),e=u.createDomElement("div",{className:"editor-percentcomplete-wrapper"},e),e=(u.createDomElement("div",{className:"editor-percentcomplete-slider"},e),u.createDomElement("input",{className:"editor-percentcomplete-slider",type:"range"},e),u.createDomElement("div",{className:"editor-percentcomplete-buttons"},e)),e=(u.createDomElement("button",{value:"0",textContent:"Not started"},e),e.appendChild(document.createElement("br")),u.createDomElement("button",{value:"50",textContent:"In Progress"},e),e.appendChild(document.createElement("br")),u.createDomElement("button",{value:"100",textContent:"Complete"},e),o.focus(),o.select(),(s=a.querySelector("input.editor-percentcomplete-slider")).value=l,s.addEventListener("input",t),s.addEventListener("change",n),a.querySelectorAll(".editor-percentcomplete-buttons button"));[].forEach.call(e,e=>{e.addEventListener("click",this.onClick)})},this.onClick=function(){o.value=this.value,s.value=this.value},this.destroy=function(){s.removeEventListener("input",t),s.removeEventListener("change",n),a.querySelectorAll(".editor-percentcomplete-buttons button").forEach(e=>e.removeEventListener("click",this.onClick)),o.remove(),a.remove()},this.focus=function(){o.focus()},this.loadValue=function(e){l=e[i.column.field],s.value=l,o.value=l,o.select()},this.serializeValue=function(){return parseInt(o.value,10)||0},this.applyValue=function(e,t){e[i.column.field]=t},this.isValueChanged=function(){return!(""===o.value&&null==l)&&(parseInt(o.value,10)||0)!=l},this.validate=function(){return isNaN(parseInt(o.value,10))?{valid:!1,msg:"Please enter a valid positive number"}:{valid:!0,msg:null}},this.init()},LongText:function(n){var i,o,t,a=this;this.args=n,this.init=function(){var e=n.compositeEditorOptions,t=(n.grid.getOptions().editorCellNavOnLRKeys,e?n.container:document.body);o=u.createDomElement("div",{className:"slick-large-editor-text",style:{zIndex:1e4,background:"white",padding:"5px",border:"3px solid gray",borderRadius:"10px"}},t),e?(o.style.position="relative",u.setStyleSize(o,"padding",0),u.setStyleSize(o,"border",0)):o.style.position="absolute",i=u.createDomElement("textarea",{rows:5,style:{background:"white",width:"250px",height:"80px",border:"0",outline:"0"}},o),e?i.addEventListener("change",this.onChange):(t=u.createDomElement("div",{style:"text-align:right"},o),u.createDomElement("button",{id:"save",textContent:"Save"},t),u.createDomElement("button",{id:"cancel",textContent:"Cancel"},t),o.querySelector("#save").addEventListener("click",this.save),o.querySelector("#cancel").addEventListener("click",this.cancel),i.addEventListener("keydown",this.handleKeyDown),a.position(n.position)),i.focus(),i.select()},this.onChange=function(){var e=n.grid.getActiveCell();a.validate().valid&&a.applyValue(a.args.item,a.serializeValue()),a.applyValue(a.args.compositeEditorOptions.formValues,a.serializeValue()),n.grid.onCompositeEditorChange.notify({row:e.row,cell:e.cell,item:a.args.item,column:a.args.column,formValues:a.args.compositeEditorOptions.formValues})},this.handleKeyDown=function(e){var t,i;e.which==Slick.keyCode.ENTER&&e.ctrlKey?a.save():e.which==Slick.keyCode.ESCAPE?(e.preventDefault(),a.cancel()):e.which==Slick.keyCode.TAB&&e.shiftKey?(e.preventDefault(),n.grid.navigatePrev()):e.which==Slick.keyCode.TAB?(e.preventDefault(),n.grid.navigateNext()):e.which!=Slick.keyCode.LEFT&&e.which!=Slick.keyCode.RIGHT||n.grid.getOptions().editorCellNavOnLRKeys&&(t=this.selectionStart,i=this.value.length,e.keyCode===Slick.keyCode.LEFT&&0===t&&n.grid.navigatePrev(),e.keyCode===Slick.keyCode.RIGHT)&&i-1<=t&&n.grid.navigateNext()},this.save=function(){(n.grid.getOptions()||{}).autoCommitEdit?n.grid.getEditorLock().commitCurrentEdit():n.commitChanges()},this.cancel=function(){i.value=t,n.cancelChanges()},this.hide=function(){u.hide(o)},this.show=function(){u.show(o)},this.position=function(e){u.setStyleSize(o,"top",e.top-5),u.setStyleSize(o,"left",e.left-2)},this.destroy=function(){n.compositeEditorOptions?i.removeEventListener("change",this.onChange):(o.querySelector("#save").removeEventListener("click",this.save),o.querySelector("#cancel").removeEventListener("click",this.cancel),i.removeEventListener("keydown",this.handleKeyDown)),o.remove()},this.focus=function(){i.focus()},this.loadValue=function(e){i.value=t=e[n.column.field],i.select()},this.serializeValue=function(){return i.value},this.applyValue=function(e,t){e[n.column.field]=t},this.isValueChanged=function(){return!(""===i.value&&null==t)&&i.value!=t},this.validate=function(){if(n.column.validator){var e=n.column.validator(i.value,n);if(!e.valid)return e}return{valid:!0,msg:null}},this.init()}}}})}(window); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./slick.formatters.js | ||
*/ | ||
Slick.Utils.extend(Slick,{Formatters:{PercentComplete:function(e,n,t,r,c){return null==t||""===t?"-":t<50?"<span style='color:red;font-weight:bold;'>"+t+"%</span>":"<span style='color:green'>"+t+"%</span>"},PercentCompleteBar:function(e,n,t,r,c){return null==t||""===t?"":"<span class='percent-complete-bar' style='background:"+(t<30?"red":t<70?"silver":"green")+";width:"+t+"%' title='"+t+"%'></span>"},YesNo:function(e,n,t,r,c){return t?"Yes":"No"},Checkmark:function(e,n,t,r,c){return t?"<img src='../images/tick.png'>":""},Checkbox:function(e,n,t,r,c){return'<img class="slick-edit-preclick" src="../images/'+(t?"CheckboxY":"CheckboxN")+'.png">'}}}); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./slick.groupitemmetadataprovider.js | ||
*/ | ||
Slick.Data=Slick.Data||{},Slick.Data.GroupItemMetadataProvider=function(e){const s=Slick.Utils;var o,n=s.extend(!0,{},{checkboxSelect:!1,checkboxSelectCssClass:"slick-group-select-checkbox",checkboxSelectPlugin:null,groupCssClass:"slick-group",groupTitleCssClass:"slick-group-title",totalsCssClass:"slick-group-totals",groupFocusable:!0,totalsFocusable:!1,toggleCssClass:"slick-group-toggle",toggleExpandedCssClass:"expanded",toggleCollapsedCssClass:"collapsed",enableExpandCollapse:!0,groupFormatter:function(e,s,t,l,o,a){var c;return n.enableExpandCollapse?(c=15*o.level+"px",(n.checkboxSelect?'<span class="'+n.checkboxSelectCssClass+" "+(o.selectChecked?"checked":"unchecked")+'"></span>':"")+"<span class='"+n.toggleCssClass+" "+(o.collapsed?n.toggleCollapsedCssClass:n.toggleExpandedCssClass)+"' style='margin-left:"+c+"'></span><span class='"+n.groupTitleCssClass+"' level='"+o.level+"'>"+o.title+"</span>"):o.title},totalsFormatter:function(e,s,t,l,o,a){return l.groupTotalsFormatter&&l.groupTotalsFormatter(o,l,a)||""},includeHeaderTotals:!1},e);function t(e,s){var t,l=e.target,s=this.getDataItem(s.row);s&&s instanceof Slick.Group&&l.classList.contains(n.toggleCssClass)&&(t=o.getRenderedRange(),this.getData().setRefreshHints({ignoreDiffsBefore:t.top,ignoreDiffsAfter:t.bottom+1}),s.collapsed?this.getData().expandGroup(s.groupingKey):this.getData().collapseGroup(s.groupingKey),e.stopImmediatePropagation(),e.preventDefault()),s&&s instanceof Slick.Group&&l.classList.contains(n.checkboxSelectCssClass)&&(s.selectChecked=!s.selectChecked,l.classList.remove(s.selectChecked?"unchecked":"checked"),l.classList.add(s.selectChecked?"checked":"unchecked"),t=o.getData().mapItemsToRows(s.rows),(s.selectChecked?n.checkboxSelectPlugin.selectRows:n.checkboxSelectPlugin.deSelectRows)(t))}function l(e,s){var t,l;n.enableExpandCollapse&&e.which==Slick.keyCode.SPACE&&(t=this.getActiveCell())&&(t=this.getDataItem(t.row))&&t instanceof Slick.Group&&(l=o.getRenderedRange(),this.getData().setRefreshHints({ignoreDiffsBefore:l.top,ignoreDiffsAfter:l.bottom+1}),t.collapsed?this.getData().expandGroup(t.groupingKey):this.getData().collapseGroup(t.groupingKey),e.stopImmediatePropagation(),e.preventDefault())}return{init:function(e){(o=e).onClick.subscribe(t),o.onKeyDown.subscribe(l)},destroy:function(){o&&(o.onClick.unsubscribe(t),o.onKeyDown.unsubscribe(l))},getGroupRowMetadata:function(e){return e=e&&e.level,{selectable:!1,focusable:n.groupFocusable,cssClasses:n.groupCssClass+" slick-group-level-"+e,formatter:n.includeHeaderTotals&&n.totalsFormatter,columns:{0:{colspan:n.includeHeaderTotals?"1":"*",formatter:n.groupFormatter,editor:null}}}},getTotalsRowMetadata:function(e){return e=e&&e.group&&e.group.level,{selectable:!1,focusable:n.totalsFocusable,cssClasses:n.totalsCssClass+" slick-group-level-"+e,formatter:n.totalsFormatter,editor:null}},getOptions:function(){return n},setOptions:function(e){s.extend(!0,n,e)}}}; |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./slick.interactions.js | ||
*/ | ||
Slick.Utils.extend(Slick,{Draggable:function(r){let{containerElement:e,onDragInit:a,onDragStart:n,onDrag:o,onDragEnd:s}=r,i,l,d,u,c,m;if(!(e=e||document)||"function"!=typeof e.addEventListener)throw new Error("[Slick.Draggable] You did not provide a valid container html element that will be used for dragging.");let v={dragSource:e,dragHandle:null};function h(e,t,n){"function"==typeof e&&e(t,n)}function t(e){i=e.target;var t,n=e.touches?e.touches[0]:e,o=n["target"];(!r.allowDragFrom||r.allowDragFrom&&i.matches(r.allowDragFrom)||r.allowDragFromClosest&&i.closest(r.allowDragFromClosest))&&(v.dragHandle=i,t={left:window.pageXOffset||document.documentElement.scrollLeft||0,top:window.pageYOffset||document.documentElement.scrollTop||0},l=t.left+n.clientX,d=t.top+n.clientY,u=n.clientX-n.clientX,c=n.clientY-n.clientY,v=Object.assign(v,{deltaX:u,deltaY:c,startX:l,startY:d,target:o}),h(a,e,v),document.addEventListener("mousemove",E),document.addEventListener("touchmove",E),document.addEventListener("mouseup",f),document.addEventListener("touchend",f),document.addEventListener("touchcancel",f))}function E(e){var t=e.touches?e.touches[0]:e,t=(u=t.clientX-l,c=t.clientY-d,t)["target"];m||(v=Object.assign(v,{deltaX:u,deltaY:c,startX:l,startY:d,target:t}),h(n,e,v),m=!0),v=Object.assign(v,{deltaX:u,deltaY:c,startX:l,startY:d,target:t}),h(o,e,v)}function f(e){var t;document.removeEventListener("mousemove",E),document.removeEventListener("touchmove",E),document.removeEventListener("mouseup",f),document.removeEventListener("touchend",f),document.removeEventListener("touchcancel",f),m&&(t=e["target"],v=Object.assign(v,{target:t}),h(s,e,v),m=!1)}return e&&(e.addEventListener("mousedown",t),e.addEventListener("touchstart",t)),{destroy:function(){e&&(e.removeEventListener("mousedown",t),e.removeEventListener("touchstart",t))}}},MouseWheel:function(e){let{element:t,onMouseWheel:a}=e;function n(e){var t=e||window.event;let n=0,o=0,r=0;t.wheelDelta&&(n=t.wheelDelta/120),t.detail&&(n=-t.detail/3),r=n,void 0!==t.axis&&t.axis===t.HORIZONTAL_AXIS&&(r=0,o=-1*n),void 0!==t.wheelDeltaY&&(r=t.wheelDeltaY/120),void 0!==t.wheelDeltaX&&(o=-1*t.wheelDeltaX/120),"function"==typeof a&&a(e,n,o,r)}return t.addEventListener("wheel",n),t.addEventListener("mousewheel",n),{destroy:function(){t.removeEventListener("wheel",n),t.removeEventListener("mousewheel",n)}}},Resizable:function(e){const{resizeableElement:n,resizeableHandleElement:o,onResizeStart:t,onResize:r,onResizeEnd:a}=e;if(o&&"function"==typeof o.addEventListener)return o.addEventListener("mousedown",i),o.addEventListener("touchstart",i),{destroy:function(){o&&"function"==typeof o.removeEventListener&&(o.removeEventListener("mousedown",i),o.removeEventListener("touchstart",i))}};throw new Error("[Slick.Resizable] You did not provide a valid html element that will be used for the handle to resize.");function s(e,t){"function"==typeof e&&e(t,{resizeableElement:n,resizeableHandleElement:o})}function i(e){e.preventDefault();e=e.touches?e.changedTouches[0]:e;s(t,e),document.addEventListener("mousemove",l),document.addEventListener("mouseup",d),document.addEventListener("touchmove",l),document.addEventListener("touchend",d)}function l(e){e.preventDefault&&"touchmove"!==e.type&&e.preventDefault();e=e.touches?e.changedTouches[0]:e;"function"==typeof r&&(r(e,{resizeableElement:n,resizeableHandleElement:o}),r(e,{resizeableElement:n,resizeableHandleElement:o}))}function d(e){e=e.touches?e.changedTouches[0]:e;s(a,e),document.removeEventListener("mousemove",l),document.removeEventListener("mouseup",d),document.removeEventListener("touchmove",l),document.removeEventListener("touchend",d)}}}); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./slick.remotemodel-yahoo.js | ||
*/ | ||
!function(v){v.extend(!0,window,{Slick:{Data:{RemoteModel:function(){var l=10,f={length:0},i=null,c=null,s=new Slick.Event,d=new Slick.Event;function r(e,o){if(c){c.abort();for(var t=c.fromPage;t<=c.toPage;t++)f[t*l]=void 0}e<0&&(e=0),0<f.length&&(o=Math.min(o,f.length-1));for(var u,r,n=Math.floor(e/l),a=Math.floor(o/l);void 0!==f[n*l]&&n<a;)n++;for(;void 0!==f[a*l]&&n<a;)a--;a<n||n==a&&void 0!==f[n*l]?d.notify({from:e,to:o}):(r="https://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20rss("+(u=n*l)+"%2C"+((a-n)*l+l)+")%20where%20url%3D%22http%3A%2F%2Frss.news.yahoo.com%2Frss%2Ftopstories%22&format=json",null!=i&&clearTimeout(i),i=setTimeout(function(){for(var t=n;t<=a;t++)f[t*l]=null;s.notify({from:e,to:o}),(c=v.jsonp({url:r,callbackParameter:"callback",cache:!0,success:function(t,e,o){var r=u,n=r;if(0<t.query.count){var a=t.query.results.item;n=r+a.length,f.length=100;for(var l=0;l<a.length;l++){var i=a[l];i.pubDate=new Date(i.pubDate),f[r+l]={index:r+l},f[r+l].pubDate=i.pubDate,f[r+l].title=i.title,f[r+l].url=i.link,f[r+l].text=i.description}}c=null,d.notify({from:r,to:n})},error:function(){alert("error loading pages "+n+" to "+a)}})).fromPage=n,c.toPage=a},50))}return{data:f,clear:function(){for(var t in f)delete f[t];f.length=0},isDataLoaded:function(t,e){for(var o=t;o<=e;o++)if(null==f[o]||null==f[o])return!1;return!0},ensureData:r,reloadData:function(t,e){for(var o=t;o<=e;o++)delete f[o];r(t,e)},onDataLoading:s,onDataLoaded:d}}}}})}(jQuery); |
/** | ||
* SlickGrid v4.1.5 | ||
* SlickGrid v4.1.6 | ||
* (c) 2009-present Michael Leibman | ||
* homepage: http://github.com/mleibman/slickgrid | ||
* license: MIT | ||
* date: 2023-11-25 | ||
* date: 2023-12-02 | ||
* file: ./slick.remotemodel.js | ||
*/ | ||
!function(g){g.extend(!0,window,{Slick:{Data:{RemoteModel:function(){var l=50,i={length:0},u="",s=null,c=1,f=null,d=null,h=new Slick.Event,v=new Slick.Event;function r(){for(var t in i)delete i[t];i.length=0}function e(o,r){if(d){d.abort();for(var t=d.fromPage;t<=d.toPage;t++)i[t*l]=void 0}o<0&&(o=0),0<i.length&&(r=Math.min(r,i.length-1));for(var e,n=Math.floor(o/l),a=Math.floor(r/l);void 0!==i[n*l]&&n<a;)n++;for(;void 0!==i[a*l]&&n<a;)a--;a<n||n==a&&void 0!==i[n*l]?v.notify({from:o,to:r}):(e="http://octopart.com/api/v3/parts/search?apikey=68b25f31&include[]=short_description&show[]=uid&show[]=manufacturer&show[]=mpn&show[]=brand&show[]=octopart_url&show[]=short_description&q="+u+"&start="+n*l+"&limit="+((a-n)*l+l),null!=s&&(e+="&sortby="+s+(0<c?"+asc":"+desc")),null!=f&&clearTimeout(f),f=setTimeout(function(){for(var t=n;t<=a;t++)i[t*l]=null;h.notify({from:o,to:r}),(d=g.jsonp({url:e,callbackParameter:"callback",cache:!0,success:m,error:function(){alert("error loading pages "+n+" to "+a)}})).fromPage=n,d.toPage=a},50))}function m(t){var o=t.request.start,r=o+t.results.length;i.length=Math.min(parseInt(t.hits),1e3);for(var e=0;e<t.results.length;e++){var n=t.results[e].item;i[o+e]=n,i[o+e].index=o+e}d=null,v.notify({from:o,to:r})}return{data:i,clear:r,isDataLoaded:function(t,o){for(var r=t;r<=o;r++)if(null==i[r]||null==i[r])return!1;return!0},ensureData:e,reloadData:function(t,o){for(var r=t;r<=o;r++)delete i[r];e(t,o)},setSort:function(t,o){s=t,c=o,r()},setSearch:function(t){u=t,r()},onDataLoading:h,onDataLoaded:v}}}}})}(jQuery); |
{ | ||
"name": "slickgrid", | ||
"version": "4.1.5", | ||
"version": "4.1.6", | ||
"description": "A lightning fast JavaScript grid/spreadsheet", | ||
@@ -5,0 +5,0 @@ "main": "slick.core.js", |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2011092
35463