@hexinfo/gf-ui
Version:
goframe common ui library
8 lines • 2.12 MB
JavaScript
(function(t,e){"object"===typeof exports&&"object"===typeof module?module.exports=e():"function"===typeof define&&define.amd?define([],e):"object"===typeof exports?exports["gf-ui"]=e():t["gf-ui"]=e()})("undefined"!==typeof self?self:this,(function(){return function(t){var e={};function o(n){if(e[n])return e[n].exports;var r=e[n]={i:n,l:!1,exports:{}};return t[n].call(r.exports,r,r.exports,o),r.l=!0,r.exports}return o.m=t,o.c=e,o.d=function(t,e,n){o.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},o.r=function(t){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},o.t=function(t,e){if(1&e&&(t=o(t)),8&e)return t;if(4&e&&"object"===typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(o.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)o.d(n,r,function(e){return t[e]}.bind(null,r));return n},o.n=function(t){var e=t&&t.__esModule?function(){return t["default"]}:function(){return t};return o.d(e,"a",e),e},o.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},o.p="",o(o.s="fb15")}({"00ae":function(t,e,o){},"00b4":function(t,e,o){"use strict";o("ac1f");var n=o("23e7"),r=o("c65b"),i=o("1626"),a=o("825a"),s=o("577e"),l=function(){var t=!1,e=/[ac]/;return e.exec=function(){return t=!0,/./.exec.apply(this,arguments)},!0===e.test("abc")&&t}(),c=/./.test;n({target:"RegExp",proto:!0,forced:!l},{test:function(t){var e=a(this),o=s(t),n=e.exec;if(!i(n))return r(c,e,o);var l=r(n,e,o);return null!==l&&(a(l),!0)}})},"00c5":function(t,e,o){"use strict";o.r(e),o.d(e,"dynamicXView",(function(){return b}));var n=o("5530"),r=(o("8a79"),o("cca6"),o("308f")),i=o.n(r),a=function(){var t=this,e=t._self._c;return e("div",{directives:[{name:"loading",rawName:"v-loading",value:t.loading,expression:"loading"}],staticClass:"xcp-component",attrs:{"element-loading-text":"页面加载中...","element-loading-spinner":"el-icon-loading","element-loading-background":"rgba(255, 255, 255, 0.2)"}},[e("div",{staticClass:"content"},[t.loading?t._e():e("xcp-vue-renderer",{ref:"xcp-renderer",attrs:{schema:t.schema}})],1),t.actions&&t.actions.length>0?e("div",{staticClass:"actions"},[t._l(t.actions,(function(o,n){return[t.onVisible(o.visibleOn||"")?e("el-button",{key:"action-".concat(n),attrs:{disabled:t.onDisabled(o.disabledOn||""),type:o.level},on:{click:function(e){return t.doAction(o)}}},[t._v(" "+t._s(o.label)+" ")]):t._e()]}))],2):t._e()])},s=[],l=o("c7eb"),c=o("1da1"),u=(o("b64b"),o("e9c4"),o("ac1f"),o("5319"),o("5b81"),o("caad"),o("2532"),o("fb6a"),o("2ca0"),o("d3b7"),o("e6cf"),o("a79d"),o("14d9"),o("4de4"),o("159b"),o("e260"),o("3ca3"),o("ddb0"),o("4020")),p=o("21f4"),d={name:"xcp-component",props:{pageCode:String,data:Object,isTab:{type:Boolean,default:!1}},data:function(){return{loading:!0,schema:{},actions:[]}},methods:{onVisible:function(t){return!t||this.calcBool(t)},onDisabled:function(t){return!!t&&this.calcBool(t)},calcBool:function(t){var e;try{var o=p["a"].evil.bind(this);e=o("`"+t+"`")}catch(n){e=!1}return"true"==e},calc:function(t,e){var o=p["a"].evil.bind({row:e}),n=o("`"+t+"`");if("undefined"!==n&&void 0!==n)return n},loadPageData:function(){var t=this;return Object(c["a"])(Object(l["a"])().mark((function e(){var o,n,r;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return o=t.page(),e.next=3,Object(u["a"])({url:"/xcp-page/v1/xcp/page/v/".concat(o),method:"get"});case 3:if(n=e.sent,n){e.next=7;break}return t.schema={},e.abrupt("return");case 7:r={},r="string"==typeof n?JSON.parse(n):n,r.actions&&(t.actions=JSON.parse(JSON.stringify(r.actions)),r.actions=[]),t.data&&(r.data=t.data),t.schema=r,t.loading=!1;case 13:case"end":return e.stop()}}),e)})))()},page:function(){var t=this.pageCode;return t.substr(0,t.length-6).replaceAll(".","/")+".xview"},doAction:function(t){var e=this;return Object(c["a"])(Object(l["a"])().mark((function o(){var n;return Object(l["a"])().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(n=t.actionType,n){o.next=3;break}return o.abrupt("return");case 3:o.t0=n,o.next="commit"===o.t0?6:"ajax"===o.t0?9:"close"===o.t0||"cancel"===o.t0?12:17;break;case 6:return o.next=8,e.doCommit(t);case 8:return o.abrupt("break",17);case 9:return o.next=11,e.doAjax(t);case 11:return o.abrupt("break",17);case 12:if(!t.confirmText){o.next=15;break}return o.next=15,e.$confirm(t.confirmText,"提示");case 15:return e.doClose("close"),o.abrupt("break",17);case 17:case"end":return o.stop()}}),o)})))()},doClose:function(t){this.isTab?this.$nav.closeCurrentTab(t):this.$emit("close2",t)},getDataMapping:function(t){var e={},o=this.getValue();for(var n in t){var r=t[n];if(r.includes("${")){var i=r.slice(2,-1),a="${this.row."+i+"}",s=this.calc(a,o);void 0!==s&&(e[n]=s)}}return e},doCommit:function(t){var e=this;return Object(c["a"])(Object(l["a"])().mark((function o(){var n;return Object(l["a"])().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(!t.confirmText){o.next=3;break}return o.next=3,e.$confirm(t.confirmText,"提示");case 3:return o.next=5,e.valid();case 5:if(o.sent){o.next=7;break}return o.abrupt("return");case 7:n=e.getValue(),e.doClose(n);case 9:case"end":return o.stop()}}),o)})))()},doAjax:function(t){var e=this;return Object(c["a"])(Object(l["a"])().mark((function o(){var r,i,a,s,c,p,d,h;return Object(l["a"])().wrap((function(o){while(1)switch(o.prev=o.next){case 0:if(!t.confirmText){o.next=3;break}return o.next=3,e.$confirm(t.confirmText,"提示");case 3:if(r=e.$loading({text:"处理中....",background:"rgba(0, 0, 0, 0.5)"}),i=t.required||!1,o.t0=!i||i.length>0,!o.t0){o.next=10;break}return o.next=9,e.valid();case 9:o.t0=!o.sent;case 10:if(!o.t0){o.next=13;break}return r.close(),o.abrupt("return");case 13:if(a=t.api,a&&a.url){o.next=18;break}return e.$message.warning("api未定义"),r.close(),o.abrupt("return");case 18:return s=a.url,s.startsWith("/api")&&(s=s.substring(4)),c=a.method||"post",p=e.getDataMapping(t.api.data),d=e.getValue(),o.next=25,Object(u["a"])({url:s,method:c,data:Object(n["a"])(Object(n["a"])({},d),p)}).finally((function(){r.close()}));case 25:h=o.sent,h&&h.success?(e.$message.success(h.msg||h.message||"操作成功"),e.doClose("ok")):e.$message.error(h.msg||h.message||"操作失败");case 27:case"end":return o.stop()}}),o)})))()},valid:function(){var t=this;return Object(c["a"])(Object(l["a"])().mark((function e(){var o,n,r;return Object(l["a"])().wrap((function(e){while(1)switch(e.prev=e.next){case 0:return o=t.getComponent(),n=new Array,n.push(o.validate()),r=o.context.getComponents().filter((function(t){return"xcp-vue-custom"===t.props.type})),r.forEach((function(t){var e=t.vm.validate();n.push(e)})),e.abrupt("return",Promise.all(n).then((function(t){return Promise.resolve(!t.includes(!1))})));case 6:case"end":return e.stop()}}),e)})))()},getValue:function(){var t=this.getComponent();return t.props.data},getComponent:function(){var t=this.$refs["xcp-renderer"].scoped,e=t.getComponentByName("xcp-form");return null==e&&t.getComponents().forEach((function(t){"form"==t.props.type&&(e=t)})),e}},watch:{data:{handler:function(){this.pageCode&&(this.loading=!0,this.loadPageData())},deep:!0,immediate:!0}}},h=d,f=(o("8a14"),o("2877")),g=Object(f["a"])(h,a,s,!1,null,"7940bef2",null),y=g.exports,v=o("8bbf"),m=o.n(v),C={install:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};t.use(i.a,Object(n["a"])({request:u["a"]},e)),t.component("xcp-component",y)}};e["default"]=C;function b(t,e){if(t&&t.endsWith(".xview")){var o=m.a.prototype.$app,n=o.views.getView(t);if(!n){var r=sessionStorage.getItem(t)||"",i=Object.assign({viewId:t,pageCode:t,isTab:!0},e||{});o.views.componentView(t,y,{title:r,args:i})}}}},"00ee":function(t,e,o){"use strict";var n=o("b622"),r=n("toStringTag"),i={};i[r]="z",t.exports="[object z]"===String(i)},"01b4":function(t,e,o){"use strict";var n=function(){this.head=null,this.tail=null};n.prototype={add:function(t){var e={item:t,next:null},o=this.tail;o?o.next=e:this.head=e,this.tail=e},get:function(){var t=this.head;if(t){var e=this.head=t.next;return null===e&&(this.tail=null),t.item}}},t.exports=n},"0366":function(t,e,o){"use strict";var n=o("4625"),r=o("59ed"),i=o("40d5"),a=n(n.bind);t.exports=function(t,e){return r(t),void 0===e?t:i?a(t,e):function(){return t.apply(e,arguments)}}},"0450":function(t,e,o){"use strict";o.d(e,"a",(function(){return s}));var n=o("dc3a"),r=o("bc71"),i=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])},t(e,o)};return function(e,o){function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),a=function(t,e,o,n){var r,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(t,e,o,n);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,o,a):r(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},s=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return i(e,t),e.prototype.formatValue=function(t,e,o,n,r,i){void 0===i&&(i=!0);var a,s=null,l=t.getColDef();if(r?a=r:i&&(a=e&&e.rowPinned&&l.pinnedRowValueFormatter?l.pinnedRowValueFormatter:l.valueFormatter),a){var c={value:n,node:e,data:e?e.data:null,colDef:l,column:t,api:this.gridOptionsWrapper.getApi(),columnApi:this.gridOptionsWrapper.getColumnApi(),context:this.gridOptionsWrapper.getContext()};c.$scope=o,s=this.expressionService.evaluate(a,c)}else if(l.refData)return l.refData[n]||"";return null==s&&Array.isArray(n)&&(s=n.join(", ")),s},a([Object(n["a"])("gridOptionsWrapper")],e.prototype,"gridOptionsWrapper",void 0),a([Object(n["a"])("expressionService")],e.prototype,"expressionService",void 0),e=a([Object(n["b"])("valueFormatterService")],e),e}(r["a"])},"04d1":function(t,e,o){"use strict";var n=o("342f"),r=n.match(/firefox\/(\d+)/i);t.exports=!!r&&+r[1]},"04f8":function(t,e,o){"use strict";var n=o("2d00"),r=o("d039"),i=o("da84"),a=i.String;t.exports=!!Object.getOwnPropertySymbols&&!r((function(){var t=Symbol("symbol detection");return!a(t)||!(Object(t)instanceof Symbol)||!Symbol.sham&&n&&n<41}))},"0538":function(t,e,o){"use strict";var n=o("e330"),r=o("59ed"),i=o("861d"),a=o("1a2d"),s=o("f36a"),l=o("40d5"),c=Function,u=n([].concat),p=n([].join),d={},h=function(t,e,o){if(!a(d,e)){for(var n=[],r=0;r<e;r++)n[r]="a["+r+"]";d[e]=c("C,a","return new C("+p(n,",")+")")}return d[e](t,o)};t.exports=l?c.bind:function(t){var e=r(this),o=e.prototype,n=s(arguments,1),a=function(){var o=u(n,s(arguments));return this instanceof a?h(e,o.length,o):e.apply(t,o)};return i(o)&&(a.prototype=o),a}},"056f":function(t,e,o){"use strict";o.d(e,"a",(function(){return u}));var n=o("dc3a"),r=o("64bd"),i=o("1e01"),a=o("7347"),s=o("bc71"),l=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])},t(e,o)};return function(e,o){function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),c=function(t,e,o,n){var r,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(t,e,o,n);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,o,a):r(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},u=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return l(e,t),e.prototype.createDisplayedGroups=function(t,e,o,n,r){var i,s,l=this,c=[],u=this.mapOldGroupsById(r);return t.forEach((function(t){for(var r=l.getOriginalPathForColumn(e,t),p=[],d=!s,h=0;h<r.length;h++)if(d||r[h]!==s[h]){var f=l.createColumnGroup(r[h],o,u,n);p[h]=f,0==h?c.push(f):p[h-1].addChild(f)}else p[h]=i[h];var g=0===p.length;if(g)c.push(t);else{var y=a["d"].last(p);y.addChild(t)}i=p,s=r})),this.setupParentsIntoColumns(c,null),c},e.prototype.createColumnGroup=function(t,e,o,n){var i=t.getGroupId(),s=e.getInstanceIdForKey(i),l=r["a"].createUniqueId(i,s),c=o[l];return c&&c.getOriginalColumnGroup()!==t&&(c=null),a["d"].exists(c)?c.reset():(c=new r["a"](t,i,s,n),this.context.createBean(c)),c},e.prototype.mapOldGroupsById=function(t){var e={},o=function(t){t.forEach((function(t){if(t instanceof r["a"]){var n=t;e[t.getUniqueId()]=n,o(n.getChildren())}}))};return t&&o(t),e},e.prototype.setupParentsIntoColumns=function(t,e){var o=this;t.forEach((function(t){if(t.setParent(e),t instanceof r["a"]){var n=t;o.setupParentsIntoColumns(n.getChildren(),n)}}))},e.prototype.getOriginalPathForColumn=function(t,e){var o=[],n=!1,r=function(t,a){for(var s=0;s<t.length;s++){if(n)return;var l=t[s];if(l instanceof i["a"]){var c=l;r(c.getChildren(),a+1),o[a]=l}else l===e&&(n=!0)}};return r(t,0),n?o:(console.warn("could not get path"),null)},c([Object(n["a"])("columnUtils")],e.prototype,"columnUtils",void 0),e=c([Object(n["b"])("displayedGroupCreator")],e),e}(s["a"])},"057f":function(t,e,o){"use strict";var n=o("c6b6"),r=o("fc6a"),i=o("241c").f,a=o("4dae"),s="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],l=function(t){try{return i(t)}catch(e){return a(s)}};t.exports.f=function(t){return s&&"Window"===n(t)?l(t):i(r(t))}},"061b":function(t,e,o){"use strict";o.d(e,"a",(function(){return c}));var n=o("dc3a"),r=o("bc71"),i=o("38ec"),a=o("7347"),s=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])},t(e,o)};return function(e,o){function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),l=function(t,e,o,n){var r,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(t,e,o,n);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,o,a):r(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},c=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return s(e,t),e.prototype.hideActiveMenu=function(){this.hidePopup&&this.hidePopup()},e.prototype.showMenuAfterMouseEvent=function(t,e){var o=this;this.showPopup(t,(function(n){o.popupService.positionPopupUnderMouseEvent({column:t,type:"columnMenu",mouseEvent:e,ePopup:n})}),e.target)},e.prototype.showMenuAfterButtonClick=function(t,e){var o=this;this.showPopup(t,(function(n){o.popupService.positionPopupUnderComponent({type:"columnMenu",eventSource:e,ePopup:n,keepWithinBounds:!0,column:t})}),e)},e.prototype.showPopup=function(t,e,o){var n,r=this,i=this.filterManager.getOrCreateFilterWrapper(t,"COLUMN_MENU"),s=document.createElement("div");a["d"].addCssClass(s,"ag-menu"),this.tabListener=this.addManagedListener(s,"keydown",(function(t){return r.trapFocusWithin(t,s)})),i.guiPromise.then((function(t){return s.appendChild(t)}));var l=function(t){"horizontal"===t.direction&&n()};this.eventService.addEventListener("bodyScroll",l);var c=function(e){r.eventService.removeEventListener("bodyScroll",l),t.setMenuVisible(!1,"contextMenu");var n=e instanceof KeyboardEvent;if(r.tabListener&&(r.tabListener=r.tabListener()),n&&o&&a["d"].isVisible(o)){var i=r.focusController.findTabbableParent(o);i&&i.focus()}};n=this.popupService.addAsModalPopup(s,!0,c),e(s),i.filterPromise.then((function(t){if(t.afterGuiAttached){var e={hidePopup:n};t.afterGuiAttached(e)}})),this.hidePopup=n,t.setMenuVisible(!0,"contextMenu")},e.prototype.trapFocusWithin=function(t,e){t.keyCode===i["a"].KEY_TAB&&(this.focusController.findNextFocusableElement(e,!1,t.shiftKey)||(t.preventDefault(),t.shiftKey?this.focusController.focusLastFocusableElement(e):this.focusController.focusFirstFocusableElement(e)))},e.prototype.isMenuEnabled=function(t){return t.isFilterAllowed()},l([Object(n["a"])("filterManager")],e.prototype,"filterManager",void 0),l([Object(n["a"])("popupService")],e.prototype,"popupService",void 0),l([Object(n["a"])("focusController")],e.prototype,"focusController",void 0),e=l([Object(n["b"])("menuFactory")],e),e}(r["a"])},"0632":function(t,e,o){"use strict";o.d(e,"a",(function(){return n}));
/**
* @ag-grid-community/core - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
* @version v23.2.1
* @link http://www.ag-grid.com/
* @license MIT
*/
var n=function(){function t(){}return t.prototype.setTimeout=function(t,e){window.setTimeout(t,e)},t.prototype.addEventListenerOutsideAngular=function(t,e,o,n){t.addEventListener(e,o,n)},t}()},"06c5":function(t,e,o){"use strict";o.d(e,"a",(function(){return r}));o("fb6a"),o("d3b7"),o("25f0"),o("b0c0"),o("a630"),o("3ca3"),o("ac1f"),o("00b4");var n=o("6b75");function r(t,e){if(t){if("string"===typeof t)return Object(n["a"])(t,e);var o=Object.prototype.toString.call(t).slice(8,-1);return"Object"===o&&t.constructor&&(o=t.constructor.name),"Map"===o||"Set"===o?Array.from(t):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?Object(n["a"])(t,e):void 0}}},"06cf":function(t,e,o){"use strict";var n=o("83ab"),r=o("c65b"),i=o("d1e7"),a=o("5c6c"),s=o("fc6a"),l=o("a04b"),c=o("1a2d"),u=o("0cfb"),p=Object.getOwnPropertyDescriptor;e.f=n?p:function(t,e){if(t=s(t),e=l(e),u)try{return p(t,e)}catch(o){}if(c(t,e))return a(!r(i.f,t,e),t[e])}},"0742":function(t,e){t.exports=require("pinyin-pro")},"07ac":function(t,e,o){"use strict";var n=o("23e7"),r=o("6f53").values;n({target:"Object",stat:!0},{values:function(t){return r(t)}})},"07fa":function(t,e,o){"use strict";var n=o("50c4");t.exports=function(t){return n(t.length)}},"083a":function(t,e,o){"use strict";var n=o("0d51"),r=TypeError;t.exports=function(t,e){if(!delete t[e])throw r("Cannot delete property "+n(e)+" of "+n(t))}},"0b42":function(t,e,o){"use strict";var n=o("e8b5"),r=o("68ee"),i=o("861d"),a=o("b622"),s=a("species"),l=Array;t.exports=function(t){var e;return n(t)&&(e=t.constructor,r(e)&&(e===l||n(e.prototype))?e=void 0:i(e)&&(e=e[s],null===e&&(e=void 0))),void 0===e?l:e}},"0b43":function(t,e,o){"use strict";var n=o("04f8");t.exports=n&&!!Symbol["for"]&&!!Symbol.keyFor},"0bfb":function(t,e,o){"use strict";o.d(e,"a",(function(){return _}));var n=o("38ec"),r=o("ad5d"),i=o("9cc8"),a=o("35c3"),s=o("f992"),l=o("dc3a"),c=o("fb19"),u=o("255a"),p=o("2377"),d=o("bc71"),h=o("7347"),f=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])},t(e,o)};return function(e,o){function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),g=function(t,e,o,n){var r,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(t,e,o,n);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,o,a):r(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},y=function(t){function e(e,o,n,r){var i=t.call(this,'<div class="ag-drag-handle ag-row-drag" role="presentation"></div>')||this;return i.rowNode=e,i.column=o,i.cellValue=n,i.beans=r,i}return f(e,t),e.prototype.postConstruct=function(){var t=this.getGui();t.appendChild(h["d"].createIconNoSpan("rowDrag",this.beans.gridOptionsWrapper,null)),this.addDragSource(),this.checkCompatibility();var e=this.beans.gridOptionsWrapper.isRowDragManaged()?new C(this,this.beans,this.rowNode,this.column):new m(this,this.beans,this.rowNode,this.column);this.createManagedBean(e,this.beans.context)},e.prototype.getSelectedCount=function(){var t=this.beans.gridOptionsWrapper.isEnableMultiRowDragging();if(!t)return 1;var e=this.beans.selectionController.getSelectedNodes();return-1!==e.indexOf(this.rowNode)?e.length:1},e.prototype.checkCompatibility=function(){var t=this.beans.gridOptionsWrapper.isRowDragManaged(),e=this.beans.gridOptionsWrapper.isTreeData();e&&t&&h["d"].doOnce((function(){return console.warn("ag-Grid: If using row drag with tree data, you cannot have rowDragManaged=true")}),"RowDragComp.managedAndTreeData")},e.prototype.addDragSource=function(){var t=this,e={rowNode:this.rowNode,columns:[this.column],defaultTextValue:this.cellValue},o=this.column.getColDef().rowDragText,n={type:u["b"].RowDrag,eElement:this.getGui(),dragItemName:function(){var n=t.getSelectedCount();return o?o(e,n):1===n?t.cellValue:n+" rows"},getDragItem:function(){return e},dragStartPixels:0};this.beans.dragAndDropService.addDragSource(n,!0),this.addDestroyFunc((function(){return t.beans.dragAndDropService.removeDragSource(n)}))},g([l["e"]],e.prototype,"postConstruct",null),e}(i["a"]),v=function(t){function e(e,o,n){var r=t.call(this)||this;return r.parent=e,r.column=n,r.rowNode=o,r}return f(e,t),e.prototype.setDisplayedOrVisible=function(t){if(t)this.parent.setDisplayed(!1);else{var e=this.column.isRowDrag(this.rowNode),o=h["d"].isFunction(this.column.getColDef().rowDrag);o?(this.parent.setDisplayed(!0),this.parent.setVisible(e)):this.parent.setDisplayed(e)}},e}(d["a"]),m=function(t){function e(e,o,n,r){var i=t.call(this,e,n,r)||this;return i.beans=o,i}return f(e,t),e.prototype.postConstruct=function(){this.addManagedListener(this.beans.gridOptionsWrapper,"suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.addManagedListener(this.rowNode,c["a"].EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,c["a"].EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.workOutVisibility()},e.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},e.prototype.workOutVisibility=function(){var t=this.beans.gridOptionsWrapper.isSuppressRowDrag();this.setDisplayedOrVisible(t)},g([l["e"]],e.prototype,"postConstruct",null),e}(v),C=function(t){function e(e,o,n,r){var i=t.call(this,e,n,r)||this;return i.beans=o,i}return f(e,t),e.prototype.postConstruct=function(){this.addManagedListener(this.beans.eventService,p["a"].EVENT_SORT_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,p["a"].EVENT_FILTER_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.eventService,p["a"].EVENT_COLUMN_ROW_GROUP_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,c["a"].EVENT_DATA_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.rowNode,c["a"].EVENT_CELL_CHANGED,this.workOutVisibility.bind(this)),this.addManagedListener(this.beans.gridOptionsWrapper,"suppressRowDrag",this.onSuppressRowDrag.bind(this)),this.workOutVisibility()},e.prototype.onSuppressRowDrag=function(){this.workOutVisibility()},e.prototype.workOutVisibility=function(){var t=this.beans.gridPanel.getRowDragFeature(),e=t&&t.shouldPreventRowMove(),o=this.beans.gridOptionsWrapper.isSuppressRowDrag(),n=this.beans.dragAndDropService.hasExternalDropZones(),r=e&&!n||o;this.setDisplayedOrVisible(r)},g([l["e"]],e.prototype,"postConstruct",null),e}(v),b=o("5230"),w=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])},t(e,o)};return function(e,o){function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),O=function(t,e,o,n){var r,i=arguments.length,a=i<3?e:null===n?n=Object.getOwnPropertyDescriptor(e,o):n;if("object"===typeof Reflect&&"function"===typeof Reflect.decorate)a=Reflect.decorate(t,e,o,n);else for(var s=t.length-1;s>=0;s--)(r=t[s])&&(a=(i<3?r(a):i>3?r(e,o,a):r(e,o))||a);return i>3&&a&&Object.defineProperty(e,o,a),a},E=function(t){function e(e,o,n,r,i){var a=t.call(this,'<div class="ag-drag-handle ag-row-drag" draggable="true"></div>')||this;return a.rowNode=e,a.column=o,a.cellValue=n,a.beans=r,a.eCell=i,a}return w(e,t),e.prototype.postConstruct=function(){var t=this.getGui();t.appendChild(h["d"].createIconNoSpan("rowDrag",this.beans.gridOptionsWrapper,null)),this.addDragSource(),this.checkVisibility()},e.prototype.addDragSource=function(){this.addGuiEventListener("dragstart",this.onDragStart.bind(this))},e.prototype.onDragStart=function(t){var e=this,o=this.column.getColDef().dndSourceOnRowDrag,n=h["d"].isBrowserIE();n||t.dataTransfer.setDragImage(this.eCell,0,0);var r=function(){try{var o=JSON.stringify(e.rowNode.data);n?t.dataTransfer.setData("text",o):(t.dataTransfer.setData("application/json",o),t.dataTransfer.setData("text/plain",o))}catch(r){}};o?o({rowNode:this.rowNode,dragEvent:t}):r()},e.prototype.checkVisibility=function(){var t=this.column.isDndSource(this.rowNode);this.setDisplayed(t)},O([l["e"]],e.prototype,"postConstruct",null),e}(i["a"]),S=o("7e80"),P=function(){var t=function(e,o){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var o in e)e.hasOwnProperty(o)&&(t[o]=e[o])},t(e,o)};return function(e,o){function n(){this.constructor=e}t(e,o),e.prototype=null===o?Object.create(o):(n.prototype=o.prototype,new n)}}(),R=function(){return R=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var r in e=arguments[o],e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r]);return t},R.apply(this,arguments)},_=function(t){function e(e,o,n,r,i,a,s){var l=t.call(this)||this;if(l.hasChartRange=!1,l.editingCell=!1,l.suppressRefreshCell=!1,l.scope=null,l.cellEditorVersion=0,l.cellRendererVersion=0,l.scope=e,l.beans=o,l.column=n,l.rowNode=r,l.rowComp=i,l.autoHeightCell=a,l.printLayout=s,l.createGridCellVo(),l.rangeSelectionEnabled=l.beans.rangeController&&o.gridOptionsWrapper.isEnableRangeSelection(),l.cellFocused=l.beans.focusController.isCellFocused(l.cellPosition),l.firstRightPinned=l.column.isFirstRightPinned(),l.lastLeftPinned=l.column.isLastLeftPinned(),l.rangeSelectionEnabled&&l.beans.rangeController){var c=l.beans.rangeController;l.rangeCount=c.getCellRangeCount(l.cellPosition),l.hasChartRange=l.getHasChartRange()}return l.getValueAndFormat(),l.setUsingWrapper(),l.chooseCellRenderer(),l.setupColSpan(),l.rowSpan=l.column.getRowSpan(l.rowNode),l}return P(e,t),e.prototype.getCreateTemplate=function(){var t=this.beans.gridOptionsWrapper.isEnableCellTextSelection()?"":'unselectable="on"',e=[],o=this.column,n=this.getCellWidth(),r=this.modifyLeftForPrintLayout(this.getCellLeft()),i=this.getInitialValueToRender(),a=h["d"].get(this.column,"colDef.template",null)?i:h["d"].escape(i);this.tooltip=this.getToolTip();var s=h["d"].escape(this.tooltip),l=h["d"].escape(o.getId()),c="",u="",p=this.preProcessStylesFromColDef(),d=this.getInitialCssClasses(),f=this.getStylesForRowSpanning(),g=h["d"].escape(this.getAriaColumnIndex());return this.usingWrapper&&(c='<div ref="eCellWrapper" class="ag-cell-wrapper" role="presentation">\n <span ref="eCellValue" role="gridcell" aria-colindex="'+g+'" class="ag-cell-value" '+t+">",u="</span></div>"),e.push("<div"),e.push(' tabindex="-1"'),e.push(" "+t),e.push(' role="'+(this.usingWrapper?"presentation":"gridcell")+'"'),this.usingWrapper||e.push(" aria-colindex="+g),e.push(' comp-id="'+this.getCompId()+'" '),e.push(' col-id="'+l+'"'),e.push(' class="'+h["d"].escape(d.join(" "))+'"'),this.beans.gridOptionsWrapper.isEnableBrowserTooltips()&&h["d"].exists(s)&&e.push('title="'+s+'"'),e.push(' style="width: '+Number(n)+"px; left: "+Number(r)+"px; "+h["d"].escape(p)+" "+h["d"].escape(f)+'" >'),e.push(c),h["d"].exists(a,!0)&&e.push(a),e.push(u),e.push("</div>"),e.join("")},e.prototype.getStylesForRowSpanning=function(){if(1===this.rowSpan)return"";var t=this.beans.gridOptionsWrapper.getRowHeightAsNumber(),e=t*this.rowSpan;return"height: "+e+"px; z-index: 1;"},e.prototype.afterAttached=function(){var t='[comp-id="'+this.getCompId()+'"]',e=this.eParentRow.querySelector(t);this.setGui(e),this.addDomData(),this.populateTemplate(),this.createCellRendererInstance(!0),this.angular1Compile(),this.refreshHandle(),h["d"].exists(this.tooltip)&&!this.beans.gridOptionsWrapper.isEnableBrowserTooltips()&&this.createManagedBean(new S["a"](this,"cell"),this.beans.context)},e.prototype.onColumnHover=function(){var t=this.beans.columnHoverService.isHovered(this.column);h["d"].addOrRemoveCssClass(this.getGui(),"ag-column-hover",t)},e.prototype.onCellChanged=function(t){var e=t.column===this.column;e&&this.refreshCell({})},e.prototype.getCellLeft=function(){var t;return t=this.beans.gridOptionsWrapper.isEnableRtl()&&this.colsSpanning?h["d"].last(this.colsSpanning):this.column,t.getLeft()},e.prototype.getCellWidth=function(){return this.colsSpanning?this.colsSpanning.reduce((function(t,e){return t+e.getActualWidth()}),0):this.column.getActualWidth()},e.prototype.onFlashCells=function(t){var e=this.beans.cellPositionUtils.createId(this.cellPosition),o=t.cells[e];o&&this.animateCell("highlight")},e.prototype.setupColSpan=function(){h["d"].missing(this.getComponentHolder().colSpan)||(this.addManagedListener(this.beans.eventService,r["a"].EVENT_DISPLAYED_COLUMNS_CHANGED,this.onDisplayColumnsChanged.bind(this)),this.addManagedListener(this.beans.eventService,r["a"].EVENT_DISPLAYED_COLUMNS_WIDTH_CHANGED,this.onWidthChanged.bind(this)),this.colsSpanning=this.getColSpanningList())},e.prototype.getColSpanningList=function(){var t=this.column.getColSpan(this.rowNode),e=[];if(1===t)e.push(this.column);else for(var o=this.column,n=this.column.getPinned(),r=0;o&&r<t;r++){if(e.push(o),o=this.beans.columnController.getDisplayedColAfter(o),!o||h["d"].missing(o))break;if(n!==o.getPinned())break}return e},e.prototype.onDisplayColumnsChanged=function(){var t=this.getColSpanningList();h["d"].areEqual(this.colsSpanning,t)||(this.colsSpanning=t,this.onWidthChanged(),this.onLeftChanged())},e.prototype.getAriaColumnIndex=function(){var t=this.beans.columnController.getAllDisplayedColumns();return(t.indexOf(this.column)+1).toString()},e.prototype.refreshAriaIndex=function(){var t=this.getAriaColumnIndex(),e=this.usingWrapper?this.eCellValue:this.getGui();e.setAttribute("aria-colindex",t)},e.prototype.getInitialCssClasses=function(){var t=["ag-cell","ag-cell-not-inline-editing"];this.autoHeightCell||t.push("ag-cell-auto-height");var e=!this.beans.gridOptionsWrapper.isSuppressCellSelection();return e&&this.cellFocused&&t.push("ag-cell-focus"),this.firstRightPinned&&t.push("ag-cell-first-right-pinned"),this.lastLeftPinned&&t.push("ag-cell-last-left-pinned"),this.beans.columnHoverService.isHovered(this.column)&&t.push("ag-column-hover"),h["d"].pushAll(t,this.preProcessClassesFromColDef()),h["d"].pushAll(t,this.preProcessCellClassRules()),h["d"].pushAll(t,this.getInitialRangeClasses()),this.usingWrapper||t.push("ag-cell-value"),t},e.prototype.getInitialValueToRender=function(){if(this.usingCellRenderer)return"string"===typeof this.cellRendererGui?this.cellRendererGui:"";var t=this.getComponentHolder();if(t.template)return t.template;if(t.templateUrl){var e=this.beans.templateService.getTemplate(t.templateUrl,this.refreshCell.bind(this,!0));return e||""}return this.getValueToUse()},e.prototype.getRenderedRow=function(){return this.rowComp},e.prototype.isSuppressNavigable=function(){return this.column.isSuppressNavigable(this.rowNode)},e.prototype.getCellRenderer=function(){return this.cellRenderer},e.prototype.getCellEditor=function(){return this.cellEditor},e.prototype.refreshCell=function(t){if(!this.suppressRefreshCell&&!this.editingCell){var e=this.getComponentHolder(),o=t&&t.newData,n=t&&t.suppressFlash||e.suppressCellFlash,r=t&&t.forceRefresh,i=this.value;this.value=this.getValue();var a=!this.valuesAreEqual(i,this.value),s=r||a;if(s){this.valueFormatted=this.beans.valueFormatterService.formatValue(this.column,this.rowNode,this.scope,this.value);var l=!o&&this.attemptCellRendererRefresh();l||this.replaceContentsAfterRefresh();var c=this.beans.filterManager.isSuppressFlashingCellsBecauseFiltering(),u=!n&&!c&&(this.beans.gridOptionsWrapper.isEnableCellChangeFlash()||e.enableCellChangeFlash);u&&this.flashCell(),this.postProcessStylesFromColDef(),this.postProcessClassesFromColDef()}this.updateAngular1ScopeAndCompile(),this.refreshToolTip(),this.postProcessCellClassRules()}},e.prototype.flashCell=function(t){var e=t&&t.flashDelay,o=t&&t.fadeDelay;this.animateCell("data-changed",e,o)},e.prototype.animateCell=function(t,e,o){var n="ag-cell-"+t,r="ag-cell-"+t+"-animation",i=this.getGui(),a=this.beans.gridOptionsWrapper;e||(e=a.getCellFlashDelay()),o||(o=a.getCellFadeDelay()),h["d"].addCssClass(i,n),h["d"].removeCssClass(i,r),window.setTimeout((function(){h["d"].removeCssClass(i,n),h["d"].addCssClass(i,r),i.style.transition="background-color "+o+"ms",window.setTimeout((function(){h["d"].removeCssClass(i,r),i.style.transition=null}),o)}),e)},e.prototype.replaceContentsAfterRefresh=function(){h["d"].clearElement(this.eParentOfValue),this.cellRenderer=this.beans.context.destroyBean(this.cellRenderer),this.cellRendererGui=null,this.putDataIntoCellAfterRefresh(),this.updateAngular1ScopeAndCompile()},e.prototype.updateAngular1ScopeAndCompile=function(){this.beans.gridOptionsWrapper.isAngularCompileRows()&&this.scope&&(this.scope.data=R({},this.rowNode.data),this.angular1Compile())},e.prototype.angular1Compile=function(){if(this.beans.gridOptionsWrapper.isAngularCompileRows()){var t=this.getGui();if(!t.classList.contains("ng-scope")||0===t.childElementCount){var e=this.beans.$compile(t)(this.scope);this.addDestroyFunc((function(){return e.remove()}))}}},e.prototype.postProcessStylesFromColDef=function(){var t=this.processStylesFromColDef();t&&h["d"].addStylesToElement(this.getGui(),t)},e.prototype.preProcessStylesFromColDef=function(){return h["d"].cssStyleObjectToMarkup(this.processStylesFromColDef())},e.prototype.processStylesFromColDef=function(){var t=this.getComponentHolder();if(t.cellStyle){var e=void 0;if("function"===typeof t.cellStyle){var o={value:this.value,data:this.rowNode.data,node:this.rowNode,colDef:t,column:this.column,$scope:this.scope,context:this.beans.gridOptionsWrapper.getContext(),api:this.beans.gridOptionsWrapper.getApi()},n=t.cellStyle;e=n(o)}else e=t.cellStyle;return e}},e.prototype.postProcessClassesFromColDef=function(){var t=this;this.processClassesFromColDef((function(e){return h["d"].addCssClass(t.getGui(),e)}))},e.prototype.preProcessClassesFromColDef=function(){var t=[];return this.processClassesFromColDef((function(e){return t.push(e)})),t},e.prototype.processClassesFromColDef=function(t){var e=this.getComponentHolder();this.beans.stylingService.processStaticCellClasses(e,{value:this.value,data:this.rowNode.data,node:this.rowNode,colDef:e,rowIndex:this.rowNode.rowIndex,$scope:this.scope,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext()},t)},e.prototype.putDataIntoCellAfterRefresh=function(){var t=this.getComponentHolder();if(t.template)this.eParentOfValue.innerHTML=t.template;else if(t.templateUrl){var e=this.beans.templateService.getTemplate(t.templateUrl,this.refreshCell.bind(this,!0));e&&(this.eParentOfValue.innerHTML=e)}else if(this.chooseCellRenderer(),this.usingCellRenderer)this.createCellRendererInstance();else{var o=this.getValueToUse();null!=o&&(this.eParentOfValue.innerHTML=h["d"].escape(o))}},e.prototype.attemptCellRendererRefresh=function(){if(h["d"].missing(this.cellRenderer)||!this.cellRenderer||h["d"].missing(this.cellRenderer.refresh))return!1;var t=this.createCellRendererParams(),e=this.beans.userComponentFactory.createFinalParams(this.getComponentHolder(),this.cellRendererType,t),o=this.cellRenderer.refresh(e);return!0===o||void 0===o},e.prototype.refreshToolTip=function(){var t=this.getToolTip();if(this.tooltip!==t){var e=h["d"].exists(t);if(!e||this.tooltip!==t.toString()){h["d"].exists(this.tooltip);this.tooltip=t,this.beans.gridOptionsWrapper.isEnableBrowserTooltips()&&(e?this.eParentOfValue.setAttribute("title",this.tooltip):this.eParentOfValue.removeAttribute("title"))}}},e.prototype.valuesAreEqual=function(t,e){var o=this.getComponentHolder(),n=o?o.equals:null;return n?n(t,e):t===e},e.prototype.getToolTip=function(){var t=this.getComponentHolder(),e=this.rowNode.data;if(t.tooltipField&&h["d"].exists(e))return h["d"].getValueUsingField(e,t.tooltipField,this.column.isTooltipFieldContainsDots());var o=t.tooltipValueGetter||t.tooltip;return o?o({api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),colDef:t,column:this.getColumn(),context:this.beans.gridOptionsWrapper.getContext(),value:this.value,valueFormatted:this.valueFormatted,rowIndex:this.cellPosition.rowIndex,node:this.rowNode,data:this.rowNode.data}):null},e.prototype.getTooltipText=function(t){return void 0===t&&(t=!0),t?h["d"].escape(this.tooltip):this.tooltip},e.prototype.processCellClassRules=function(t,e){var o=this.getComponentHolder();this.beans.stylingService.processClassRules(o.cellClassRules,{value:this.value,data:this.rowNode.data,node:this.rowNode,colDef:o,rowIndex:this.cellPosition.rowIndex,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),$scope:this.scope,context:this.beans.gridOptionsWrapper.getContext()},t,e)},e.prototype.postProcessCellClassRules=function(){var t=this;this.processCellClassRules((function(e){return h["d"].addCssClass(t.getGui(),e)}),(function(e){return h["d"].removeCssClass(t.getGui(),e)}))},e.prototype.preProcessCellClassRules=function(){var t=[];return this.processCellClassRules((function(e){return t.push(e)}),(function(t){})),t},e.prototype.setUsingWrapper=function(){var t=this.getComponentHolder();if(this.rowNode.rowPinned)return this.usingWrapper=!1,this.includeSelectionComponent=!1,this.includeRowDraggingComponent=!1,void(this.includeDndSourceComponent=!1);var e="function"===typeof t.checkboxSelection,o="function"===typeof t.rowDrag,n="function"===typeof t.dndSource;this.includeSelectionComponent=e||!0===t.checkboxSelection,this.includeRowDraggingComponent=o||!0===t.rowDrag,this.includeDndSourceComponent=n||!0===t.dndSource;var r=this.beans.gridOptionsWrapper.isEnableCellTextSelection();this.usingWrapper=r||this.includeRowDraggingComponent||this.includeSelectionComponent||this.includeDndSourceComponent},e.prototype.chooseCellRenderer=function(){var t=this.getComponentHolder();if(t.template||t.templateUrl)this.usingCellRenderer=!1;else{var o=this.createCellRendererParams(),n=this.beans.userComponentFactory.lookupComponentClassDef(t,"cellRenderer",o),r=this.beans.userComponentFactory.lookupComponentClassDef(t,"pinnedRowCellRenderer",o);r&&this.rowNode.rowPinned?(this.cellRendererType=e.CELL_RENDERER_TYPE_PINNED,this.usingCellRenderer=!0):n?(this.cellRendererType=e.CELL_RENDERER_TYPE_NORMAL,this.usingCellRenderer=!0):this.usingCellRenderer=!1}},e.prototype.createCellRendererInstance=function(t){var o=this;if(void 0===t&&(t=!1),this.usingCellRenderer){var n=this.beans.gridOptionsWrapper.isAngularCompileRows(),r=this.beans.gridOptionsWrapper.isSuppressAnimationFrame();(n||r||this.autoHeightCell)&&(t=!1);var i=this.createCellRendererParams();this.cellRendererVersion++;var a=this.afterCellRendererCreated.bind(this,this.cellRendererVersion),s=this.cellRendererType===e.CELL_RENDERER_TYPE_NORMAL;this.createCellRendererFunc=function(){o.createCellRendererFunc=null;var t=o.beans.userComponentFactory.newCellRenderer(o.getComponentHolder(),i,!s);t&&t.then(a)},t?this.beans.taskQueue.createTask(this.createCellRendererFunc,this.rowNode.rowIndex,"createTasksP2"):this.createCellRendererFunc()}},e.prototype.afterCellRendererCreated=function(t,e){var o=!this.isAlive()||t!==this.cellRendererVersion;o?this.beans.context.destroyBean(e):(this.cellRenderer=e,this.cellRendererGui=this.cellRenderer.getGui(),h["d"].missing(this.cellRendererGui)||this.editingCell||this.eParentOfValue.appendChild(this.cellRendererGui))},e.prototype.createCellRendererParams=function(){var t=this;return{value:this.value,valueFormatted:this.valueFormatted,getValue:this.getValue.bind(this),setValue:function(e){return t.beans.valueService.setValue(t.rowNode,t.column,e)},formatValue:this.formatValue.bind(this),data:this.rowNode.data,node:this.rowNode,colDef:this.getComponentHolder(),column:this.column,$scope:this.scope,rowIndex:this.cellPosition.rowIndex,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext(),refreshCell:this.refreshCell.bind(this),eGridCell:this.getGui(),eParentOfValue:this.eParentOfValue,addRowCompListener:this.rowComp?this.rowComp.addEventListener.bind(this.rowComp):null,addRenderedRowListener:function(e,o){console.warn("ag-Grid: since ag-Grid .v11, params.addRenderedRowListener() is now params.addRowCompListener()"),t.rowComp&&t.rowComp.addEventListener(e,o)}}},e.prototype.formatValue=function(t){var e=this.beans.valueFormatterService.formatValue(this.column,this.rowNode,this.scope,t);return null!=e?e:t},e.prototype.getValueToUse=function(){return null!=this.valueFormatted?this.valueFormatted:this.value},e.prototype.getValueAndFormat=function(){this.value=this.getValue(),this.valueFormatted=this.beans.valueFormatterService.formatValue(this.column,this.rowNode,this.scope,this.value)},e.prototype.getValue=function(){var t=this.rowNode.leafGroup&&this.beans.columnController.isPivotMode(),e=this.rowNode.group&&this.rowNode.expanded&&!this.rowNode.footer&&!t,o=this.beans.gridOptionsWrapper.isGroupIncludeFooter(),n=this.beans.gridOptionsWrapper.isGroupSuppressBlankHeader(),r=e&&o&&!n;return this.beans.valueService.getValue(this.column,this.rowNode,!1,r)},e.prototype.onMouseEvent=function(t,e){if(!h["d"].isStopPropagationForAgGrid(e))switch(t){case"click":this.onCellClicked(e);break;case"mousedown":this.onMouseDown(e);break;case"dblclick":this.onCellDoubleClicked(e);break;case"mouseout":this.onMouseOut(e);break;case"mouseover":this.onMouseOver(e);break}},e.prototype.dispatchCellContextMenuEvent=function(t){var e=this.getComponentHolder(),o=this.createEvent(t,r["a"].EVENT_CELL_CONTEXT_MENU);this.beans.eventService.dispatchEvent(o),e.onCellContextMenu&&window.setTimeout((function(){return e.onCellContextMenu(o)}),0)},e.prototype.createEvent=function(t,e){var o={node:this.rowNode,data:this.rowNode.data,value:this.value,column:this.column,colDef:this.getComponentHolder(),context:this.beans.gridOptionsWrapper.getContext(),api:this.beans.gridApi,columnApi:this.beans.columnApi,rowPinned:this.rowNode.rowPinned,event:t,type:e,rowIndex:this.rowNode.rowIndex};return this.scope&&(o.$scope=this.scope),o},e.prototype.onMouseOut=function(t){var e=this.createEvent(t,r["a"].EVENT_CELL_MOUSE_OUT);this.beans.eventService.dispatchEvent(e),this.beans.columnHoverService.clearMouseOver()},e.prototype.onMouseOver=function(t){var e=this.createEvent(t,r["a"].EVENT_CELL_MOUSE_OVER);this.beans.eventService.dispatchEvent(e),this.beans.columnHoverService.setMouseOver([this.column])},e.prototype.onCellDoubleClicked=function(t){var e=this.getComponentHolder(),o=this.createEvent(t,r["a"].EVENT_CELL_DOUBLE_CLICKED);this.beans.eventService.dispatchEvent(o),"function"===typeof e.onCellDoubleClicked&&window.setTimeout((function(){return e.onCellDoubleClicked(o)}),0);var n=!this.beans.gridOptionsWrapper.isSingleClickEdit()&&!this.beans.gridOptionsWrapper.isSuppressClickEdit();n&&this.startRowOrCellEdit()},e.prototype.startRowOrCellEdit=function(t,e){this.beans.gridOptionsWrapper.isFullRowEdit()?this.rowComp.startRowEditing(t,e,this):this.startEditingIfEnabled(t,e,!0)},e.prototype.isCellEditable=function(){return this.column.isCellEditable(this.rowNode)},e.prototype.startEditingIfEnabled=function(t,e,o){if(void 0===t&&(t=null),void 0===e&&(e=null),void 0===o&&(o=!1),this.isCellEditable()&&!this.editingCell){this.editingCell=!0,this.cellEditorVersion++;var n=this.afterCellEditorCreated.bind(this,this.cellEditorVersion),r=this.createCellEditorParams(t,e,o);this.createCellEditor(r).then(n);var i=h["d"].missing(this.cellEditor);i&&o&&this.focusCell(!0)}},e.prototype.createCellEditor=function(t){var e=this,o=this.beans.userComponentFactory.newCellEditor(this.column.getColDef(),t);return o.then((function(o){var n=o.isPopup&&o.isPopup();if(!n)return o;e.beans.gridOptionsWrapper.isFullRowEdit()&&console.warn("ag-Grid: popup cellEditor does not work with fullRowEdit - you cannot use them both - either turn off fullRowEdit, or stop using popup editors.");var r=new b["a"](o);return e.beans.context.createBean(r),r.init(t),r}))},e.prototype.afterCellEditorCreated=function(t,e){var o=t!==this.cellEditorVersion,n=o||!this.editingCell;if(n)this.beans.context.destroyBean(e);else{var i=e.isCancelBeforeStart&&e.isCancelBeforeStart();if(i)return this.beans.context.destroyBean(e),void(this.editingCell=!1);if(!e.getGui)return console.warn("ag-Grid: cellEditor for column "+this.column.getId()+" is missing getGui() method"),e.render&&console.warn("ag-Grid: we found 'render' on the component, are you trying to set a React renderer but added it as colDef.cellEditor instead of colDef.cellEditorFmk?"),this.beans.context.destroyBean(e),void(this.editingCell=!1);this.cellEditor=e,this.cellEditorInPopup=void 0!==e.isPopup&&e.isPopup(),this.setInlineEditingClass(),this.cellEditorInPopup?this.addPopupCellEditor():this.addInCellEditor(),e.afterGuiAttached&&e.afterGuiAttached();var a=this.createEvent(null,r["a"].EVENT_CELL_EDITING_STARTED);this.beans.eventService.dispatchEvent(a)}},e.prototype.addInCellEditor=function(){h["d"].clearElement(this.getGui()),this.cellEditor&&this.getGui().appendChild(this.cellEditor.getGui()),this.angular1Compile()},e.prototype.addPopupCellEditor=function(){var t=this,e=this.cellEditor?this.cellEditor.getGui():null,o=this.beans.gridOptionsWrapper.isStopEditingWhenGridLosesFocus();this.hideEditorPopup=this.beans.popupService.addPopup(o,e,!0,(function(){t.onPopupEditorClosed()}));var n={column:this.column,rowNode:this.rowNode,type:"popupCellEditor",eventSource:this.getGui(),ePopup:e,keepWithinBounds:!0},r=this.cellEditor&&this.cellEditor.getPopupPosition?this.cellEditor.getPopupPosition():"over";"under"===r?this.beans.popupService.positionPopupUnderComponent(n):this.beans.popupService.positionPopupOverComponent(n),this.angular1Compile()},e.prototype.onPopupEditorClosed=function(){this.editingCell&&(this.stopRowOrCellEdit(),this.beans.focusController.isCellFocused(this.cellPosition)&&this.focusCell(!0))},e.prototype.setInlineEditingClass=function(){if(this.isAlive()){var t=this.editingCell&&!this.cellEditorInPopup,e=this.editingCell&&this.cellEditorInPopup;h["d"].addOrRemoveCssClass(this.getGui(),"ag-cell-inline-editing",t),h["d"].addOrRemoveCssClass(this.getGui(),"ag-cell-not-inline-editing",!t),h["d"].addOrRemoveCssClass(this.getGui(),"ag-cell-popup-editing",e),h["d"].addOrRemoveCssClass(this.getGui().parentNode,"ag-row-inline-editing",t),h["d"].addOrRemoveCssClass(this.getGui().parentNode,"ag-row-not-inline-editing",!t)}},e.prototype.createCellEditorParams=function(t,e,o){return{value:this.getValue(),keyPress:t,charPress:e,column:this.column,colDef:this.column.getColDef(),rowIndex:this.cellPosition.rowIndex,node:this.rowNode,data:this.rowNode.data,api:this.beans.gridOptionsWrapper.getApi(),cellStartedEdit:o,columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext(),$scope:this.scope,onKeyDown:this.onKeyDown.bind(this),stopEditing:this.stopEditingAndFocus.bind(this),eGridCell:this.getGui(),parseValue:this.parseValue.bind(this),formatValue:this.formatValue.bind(this)}},e.prototype.stopEditingAndFocus=function(t){void 0===t&&(t=!1),this.stopRowOrCellEdit(),this.focusCell(!0),t||this.navigateAfterEdit()},e.prototype.parseValue=function(t){var e=this.getComponentHolder(),o={node:this.rowNode,data:this.rowNode.data,oldValue:this.value,newValue:t,colDef:e,column:this.column,api:this.beans.gridOptionsWrapper.getApi(),columnApi:this.beans.gridOptionsWrapper.getColumnApi(),context:this.beans.gridOptionsWrapper.getContext()},n=e.valueParser;return h["d"].exists(n)?this.beans.expressionService.evaluate(n,o):t},e.prototype.focusCell=function(t){void 0===t&&(t=!1),this.beans.focusController.setFocusedCell(this.cellPosition.rowIndex,this.column,this.rowNode.rowPinned,t)},e.prototype.setFocusInOnEditor=function(){this.editingCell&&(this.cellEditor&&this.cellEditor.focusIn?this.cellEditor.focusIn():this.focusCell(!0))},e.prototype.isEditing=function(){return this.editingCell},e.prototype.onKeyDown=function(t){var e=t.which||t.keyCode;switch(e){case n["a"].KEY_ENTER:this.onEnterKeyDown(t);break;case n["a"].KEY_F2:this.onF2KeyDown();break;case n["a"].KEY_ESCAPE:this.onEscapeKeyDown();break;case n["a"].KEY_TAB:this.onTabKeyDown(t);break;case n["a"].KEY_BACKSPACE:case n["a"].KEY_DELETE:this.onBackspaceOrDeleteKeyPressed(e);break;case n["a"].KEY_DOWN:case n["a"].KEY_UP:case n["a"].KEY_RIGHT:case n["a"].KEY_LEFT:this.onNavigationKeyPressed(t,e);break}},e.prototype.setFocusOutOnEditor=function(){this.editingCell&&this.cellEditor&&this.cellEditor.focusOut&&this.cellEditor.focusOut()},e.prototype.onNavigationKeyPressed=function(t,e){this.editingCell||(t.shiftKey&&this.rangeSelectionEnabled?this.onShiftRangeSelect(e):this.beans.rowRenderer.navigateToNextCell(t,e,this.cellPosition,!0),t.preventDefault())},e.prototype.onShiftRangeSelect=function(t){if(this.beans.rangeController){var e=this.beans.rangeController.extendLatestRangeInDirection(t);e&&this.beans.rowRenderer.ensureCellVisible(e)}},e.prototype.onTabKeyDown=function(t){this.beans.rowRenderer.onTabKeyDown(this,t)},e.prototype.onBackspaceOrDeleteKeyPressed=function(t){this.editingCell||this.startRowOrCellEdit(t)},e.prototype.onEnterKeyDown=function(t){this.editingCell||this.rowComp.isEditing()?this.stopEditingAndFocus():this.beans.gridOptionsWrapper.is