diff --git a/js/dist/bbj-grid-widget.min.js b/js/dist/bbj-grid-widget.min.js index 366b2ab3..94f74bf2 100644 --- a/js/dist/bbj-grid-widget.min.js +++ b/js/dist/bbj-grid-widget.min.js @@ -1,4 +1,4 @@ -!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=50)}([function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){e.exports=!n(7)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(31)("wks"),i=n(6),o=n(0).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(46),i=n(41);e.exports=n(3)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";function r(){return{"basic-string":{cellEditor:"agTextCellEditor"},"basic-text":{cellEditor:"agLargeTextCellEditor"},"basic-boolean":{cellRenderer:"BasicBooleansRenderer",cellRendererParams:{RENDERER_TRUE:"✔",RENDERER_FALSE:"✘"},cellEditor:"BasicBooleansEditor",filter:"BasicBooleansFilter"},"basic-number":{valueFormatter:Basis.AgGridComponents.BasicNumbersValueFormatter.format,cellEditor:"BasicNumbersEditor",filter:"agNumberColumnFilter",filterParams:{inRangeInclusive:!0},floatingFilter:"agNumberColumnFilter",floatingFilterParams:{inRangeInclusive:!0}},"basic-date":{valueFormatter:Basis.AgGridComponents.BasicDateTimesValueFormatter.format,cellEditor:"BasicDateTimesEditor",cellEditorParams:{EDITOR_MASK:"%Y/%Mz/%Dz",EDITOR_ALLOW_INPUT:!0},filter:"BasicDateTimesFilter",filterParams:{FILTER_MASK:"%Y/%Mz/%Dz",FILTER_ALLOW_INPUT:!0}},"basic-timestamp":{valueFormatter:Basis.AgGridComponents.BasicDateTimesValueFormatter.format,cellEditor:"BasicDateTimesEditor",cellEditorParams:{EDITOR_MASK:"%Y/%Mz/%Dz %Hz:%mz:%sz",EDITOR_ENABLE_TIME:!0,EDITOR_ALLOW_INPUT:!0},filter:"BasicDateTimesFilter",filterParams:{FILTER_MASK:"%Y/%Mz/%Dz %Hz:%mz:%sz",FILTER_ENABLE_TIME:!0,FILTER_ALLOW_INPUT:!0}},"basic-image":{cellRenderer:"BasicImagesRenderer",suppressMenu:!0,suppressFilter:!0,cellRendererParams:{IMAGE_WIDTH:"25px",IMAGE_HEIGHT:"25px"}},"basic-image-filterable":{cellRenderer:"BasicImagesRenderer",cellRendererParams:{IMAGE_WIDTH:"25px",IMAGE_HEIGHT:"25px"}}}}function i(){return{BasicBooleansRenderer:Basis.AgGridComponents.BasicBooleansRenderer,BasicBooleansEditor:Basis.AgGridComponents.BasicBooleansEditor,BasicBooleansFilter:Basis.AgGridComponents.BasicBooleansFilter,BasicNumbersEditor:Basis.AgGridComponents.BasicNumbersEditor,BasicDateTimesEditor:Basis.AgGridComponents.BasicDateTimesEditor,BasicDateTimesFilter:Basis.AgGridComponents.BasicDateTimesFilter,BasicImagesRenderer:Basis.AgGridComponents.BasicImagesRenderer}}function o(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};agGrid.LicenseManager&&t&&agGrid.LicenseManager.setLicenseKey(t);var a=r(),s=Object.assign(o,{rowData:n,getDocument:function(){return $doc},components:i(),columnTypes:a,onRowDoubleClicked:gw_onRowDoubleClicked,onRowSelected:gw_onRowSelected,onSelectionChanged:gw_onSelectionChanged,onCellEditingStarted:gw_onCellEditingsEvent,onCellEditingStopped:gw_onCellEditingsEvent,onCellValueChanged:gw_onCellEditingsEvent,onRowEditingStarted:gw_onRowEditingsEvent,onRowEditingStopped:gw_onRowEditingsEvent,onRowValueChanged:gw_onRowEditingsEvent,getRowNodeId:gw_getRowNodeId,rememberGroupStateWhenNewData:!0});for(var c in s.hasOwnProperty("__isTree")&&!0===s.__isTree&&(s.getNodeChildDetails=gw_getNodeChildDetails),s.hasOwnProperty("__navigateToNextCell")&&s.__navigateToNextCell&&(s.navigateToNextCell=gw_navigateToNextRow),s.columnDefs){var l=s.columnDefs[c],u=l.field;l.hasOwnProperty("type")&&"basic-number"===l.type&&gw_meta&&gw_meta.hasOwnProperty("field")&&(gw_meta[u].hasOwnProperty("RENDERER_GROUP_SEPARATOR")||(l.RENDERER_GROUP_SEPARATOR=o.__numberGroupSep),gw_meta[u].hasOwnProperty("RENDERER_DECIMAL_SEPARATOR")||(l.RENDERER_DECIMAL_SEPARATOR=o.__numberDecimalSep)),l.cellStyle=gw_cellStyler,l.cellClass=gw_getCellClass,l.toolPanelClass=gw_getToolPanelClass,l.cellClassRules=gw_getGlobalMeta(u,"CELL_CLASS_RULES",null,!0);var f=Number(gw_getGlobalMeta(u,"ROW_GROUP")),d=Number(gw_getGlobalMeta(u,"ENABLE_VALUE")),p=gw_getGlobalMeta(u,"FOOTER_VALUE_GETTER");l.rowGroup=f,l.enableRowGroup=!!f||l.enableRowGroup,l.rowGroupIndex=f?Number(gw_getGlobalMeta(u,"ROW_GROUP_INDEX")):null,l.enableValue=d>0,l.showRowGroup=gw_getGlobalMeta(u,"SHOW_ROW_GROUP",gw_getGlobalMeta(u,"LABEL")),l.aggFunc=gw_getGlobalMeta(u,"AGG_FUNC"),l.allowedAggFuncs=gw_getGlobalMeta(u,"ALLOWED_AGG_FUNCS","sum,min,max,count,avg,first,last").split(","),l.valueGetter=gw_getGlobalMeta(u,"VALUE_GETTER"),l.valueSetter=gw_getGlobalMeta(u,"VALUE_SETTER"),l.hide=l.headerName.startsWith("__")||gw_getGlobalMeta(u,"HIDE",gw_getGlobalMeta(u,"HIDDEN",!1)),l.suppressToolPanel=l.headerName.startsWith("__"),l.editable="1"===gw_getGlobalMeta(u,"EDITABLE",!1),p&&(l.cellRenderer="agGroupCellRenderer",l.cellRendererParams=Object.assign({},l.cellRendererParams,{footerValueGetter:p}))}return gw_groupColumns(JSON.parse(s.__columnsGroup),s.columnDefs),new agGrid.Grid(e,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.gw_getSupportedColumnTypes=r,t.gw_getDefaultComponents=i,t.gw_init=o,t.gw_setData=function(e,t,n){var r=$doc.getElementById("grid");if(r.innerHTML="",window.gw_meta=e[0].meta,window.AGridComponentsMetaConfig=gw_meta,console.log(t),window.gw_options=t,window.gw_instance=o(r,n,e,t),gw_options.hasOwnProperty("__enterKeyBehavior"))switch(gw_options.__enterKeyBehavior){case"next":r.addEventListener("keydown",gw_onMoveToNextCell)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gw_setStyle=function(e,t){jss.forDocument($doc||document).set(e,JSON.parse(t))},t.gw_removeStyle=function(e){jss.forDocument($doc||document).remove(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gw_showToolPanel=function(e){gw_options.api.showToolPanel(Boolean(e))},t.gw_setFunctionsReadOnly=function(e){gw_options.api.setFunctionsReadOnly(Boolean(e))},t.gw_getToolPanelClass=function(e){var t=e.colDef;if(gw_meta.hasOwnProperty(t.field)&&gw_meta[t.field].hasOwnProperty("TOOLPANEL_CLASS"))return gw_meta[t.field].TOOLPANEL_CLASS}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gw_setState=function(e){gw_options.columnApi.setColumnState(e)},t.gw_getState=function(){var e=gw_options.columnApi.getColumnState();try{return JSON.stringify(e)}catch(e){console.warn("Failed to parse state",e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gw_startEditingCell=function(e,t,n,r){gw_options.api.setFocusedCell(Number(e),t),gw_options.api.startEditingCell({rowIndex:Number(e),colKey:t,keyPress:Number(n),charPress:r})},t.gw_stopEditing=function(e){gw_options.api.stopEditing(e)},t.gw_editNextCell=function(){gw_options.api.tabToNextCell()},t.gw_editPreviousCell=function(){gw_options.api.tabToPreviousCell()},t.gw_cellStyler=function(e){var t=e.column.colDef.cellStyleDefaults||{},n={};e.data&&e.data.meta&&(n=e.data.meta[e.column.colId]||{});var r={};return n.FGCOLOR?r.color=n.FGCOLOR:t.FGCOLOR&&(r.color=t.FGCOLOR),n.BGCOLOR?r["background-color"]=n.BGCOLOR:t.BGCOLOR&&(r["background-color"]=t.BGCOLOR),n.ALIGN?r["text-align"]=n.ALIGN:t.ALIGN&&(r["text-align"]=t.ALIGN),r.color||r["background-color"]||r["text-align"]?r:null},t.gw_getCellClass=function(e){var t=e.colDef.field;if(e.data&&e.data.hasOwnProperty("meta"))return e.data.meta.hasOwnProperty(t)&&e.data.meta[t].hasOwnProperty("CELL_CLASS")?e.data.meta[t].CELL_CLASS:"CELL_CLASS_".concat(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gw_setQuickFilter=function(e){gw_options.api.setQuickFilter(e)},t.gw_expandAll=function(){gw_options.api.expandAll()},t.gw_collapseAll=function(){gw_options.api.collapseAll()},t.gw_setVisibleRow=function(e,t){gw_options.api.ensureIndexVisible(e,t)},t.gw_navigateToNextRow=function(e){var t=e.previousCellDef,n=e.nextCellDef;switch(e.key){case 40:return t=e.previousCellDef,gw_options.api.forEachNode(function(e){t.rowIndex+1===e.rowIndex&&e.setSelected(!0)}),n;case 38:return t=e.previousCellDef,gw_options.api.forEachNode(function(e){t.rowIndex-1===e.rowIndex&&e.setSelected(!0)}),n;case 37:case 39:return n;default:throw new Error("You have super strange keyboard")}},t.gw_getRowNodeId=function(e){var t;return gw_options.hasOwnProperty("__getRowNodeId")&&(t=e[gw_options.__getRowNodeId]),t||e.__ROW_INDEX},t.gw_getNodeChildDetails=function(e){var t=e[gw_options.__getParentNodeId];return!!e.__node__children&&{group:!0,expanded:!1,children:e.__node__children,key:t||-1}},t.gw_setRowsData=function(e){gw_options.api.setRowData(e),gw_options.rowData=e,gw_options.api.refreshClientSideRowModel("group")},t.gw_setRowData=function(e){var t=e[0],n=0===gw_options.__getRowNodeId.length?"__ROW_INDEX":gw_options.__getRowNodeId;gw_options.api.getRowNode(t[n]).setData(t),gw_options.api.refreshClientSideRowModel("group")},t.gw_removeRow=function(e){gw_options.rowData.splice(Number(e),1),gw_options.api.setRowData(gw_options.rowData),gw_options.api.refreshClientSideRowModel("group")},t.gw_addRows=function(e,t){gw_options.api.updateRowData({add:t,addIndex:e})}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gw_sizeColumnsToFit=function(){gw_options.api.sizeColumnsToFit()},t.gw_setSelectedRows=function(e){gw_options.api.forEachNodeAfterFilterAndSort(function(t){e.indexOf(t.rowIndex)>-1&&(t.setSelected(!0),t.expanded=!0)}.bind(this)),gw_options.api.onGroupExpandedOrCollapsed()},t.gw_selectAll=function(e){1===e?gw_options.api.selectAllFiltered():gw_options.api.selectAll()},t.gw_deselectAll=function(e){1===e?gw_options.api.deselectAllFiltered():gw_options.api.deselectAll()},t.gw_setVisibleColumn=function(e){gw_options.api.ensureColumnVisible(e)},t.gw_setColumnWidth=function(e,t){gw_options.columnApi.setColumnWidth(e,Number(t))},t.gw_pinColumn=function(e,t){gw_options.columnApi.setColumnPinned(e,t)},t.gw_moveColumn=function(e,t){gw_options.columnApi.moveColumn(e,t)},t.gw_groupColumns=function(e,t){var n=function(n){if(!e.hasOwnProperty(n))return"continue";var r=JSON.parse(e[n]),i=[];r.children.split(",").forEach(function(e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(gw_meta&&gw_meta.hasOwnProperty(e)&&gw_meta[e].hasOwnProperty(t)){if(!r)return gw_meta[e][t];try{return JSON.parse(gw_meta[e][t])}catch(r){return console.warn("BBjGridExWidget : Faild to parse [".concat(e,"][").concat(t,"] as JSON")),n}}return n}},function(e,t,n){"undefined"!=typeof self&&self,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=24)}([function(e,t,n){"use strict";function r(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:null;if(t.hasOwnProperty("colDef")&&t.colDef.hasOwnProperty(e))n=t.colDef[e];else{var i=this.getWin(t).AGridComponentsMetaConfig;n=i&&i.hasOwnProperty(t.column.colId)&&i[t.column.colId].hasOwnProperty(e)?i[t.column.colId][e]:t[e]||r}return n}}]),e}()},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(r),o=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(o).concat([i]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i=0&&c.splice(t,1)}function h(e){var t=document.createElement("style");return e.attrs.type="text/css",g(t,e.attrs),d(e,t),t}function g(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function m(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var c=s++;n=a||(a=h(t)),r=v.bind(null,n,c,!1),i=v.bind(null,n,c,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",g(t,e.attrs),d(e,t),t}(t),r=function(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=l(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),i=function(){p(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(t),r=function(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){p(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=i()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return u(n,t),function(e){for(var i=[],o=0;o0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._build(r,t,n)}return function(e,t,n){t&&r(e.prototype,t)}(e,[{key:"getValue",value:function(){return this.input.checked}},{key:"focus",value:function(){this.component.focus()}},{key:"toggle",value:function(){this.input.checked=!this.input.checked}},{key:"check",value:function(){this.input.checked=!0}},{key:"uncheck",value:function(){this.input.checked=!1}},{key:"enable",value:function(){this.input.disabled=!1}},{key:"disable",value:function(){this.input.disabled=!0}},{key:"destroy",value:function(){this.component.removeEventListener("click",this._onClick.bind(this)),this.component.removeEventListener("keydown",this._onChange.bind(this)),this.disable()}},{key:"_build",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;this.component=n.createElement("div"),this.component.className="BooleanSwitch",this.component.tabIndex="-1",this.slider=n.createElement("span"),this.slider.className="slider round",this.input=n.createElement("input"),this.input.type="checkbox",this.input.checked=t,this.input.tabIndex="0",this.component.appendChild(this.input),this.component.appendChild(this.slider),this.component.addEventListener("click",this._onClick.bind(this,e)),this.component.addEventListener("keydown",this._onChange.bind(this,e))}},{key:"_onClick",value:function(e,t){if(this.input.disabled)return!1;this.toggle(),e&&e(this)}},{key:"_onChange",value:function(e,t){if(this.input.disabled)return!1;var n=t.which||t.keyCode;32==n?(this.toggle(),e&&e(this),t.stopPropagation()):39==n?(this.check(),e&&e(this),t.stopPropagation()):37==n&&(this.uncheck(),e&&e(this),t.stopPropagation())}}]),e}()},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.doc=n,this.options=function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];this.flatpickr.setDate(e||"",t)}},{key:"setOption",value:function(e,t){this.flatpickr.set(e,t)}},{key:"open",value:function(){this.flatpickr.open(),this.flatpickr.input.focus()}},{key:"close",value:function(){this.flatpickr.close()}},{key:"enable",value:function(){this.input.disabled=!1}},{key:"disable",value:function(){this.input.disabled=!0}},{key:"destroy",value:function(){this.flatpickr.destroy(),this.clearButton.removeEventListener("click",this._onClearButtonClick.bind(this)),this.component.removeEventListener("keydown",this._onKeyDown.bind(this))}},{key:"_build",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;this.component=t.createElement("div"),this.component.className="DateTimesDialog",this.component.tabIndex="0",this.input=t.createElement("input"),this.component.appendChild(this.input),this.flatpickr=flatpickr(this.input,e),this.component.addEventListener("keydown",this._onKeyDown.bind(this))}},{key:"_onKeyDown",value:function(e){var t=e.which||e.keyCode;if([37,39].indexOf(t)>-1)e.stopPropagation();else if(38===t){var n=this.flatpickr.input.value,r=Date.parse(n);r instanceof Date||(r=new Date(n)),r.setDate(r.getDate()+1),this.flatpickr.setDate(r),this.flatpickr.input.value=BBj.Masks.Types.date(r,this.options.mask),e.stopPropagation()}else if(40===t){var i=this.flatpickr.input.value,o=Date.parse(i);o instanceof Date||(next=new Date(i)),o.setDate(o.getDate()-1),this.flatpickr.setDate(o),this.flatpickr.input.value=BBj.Masks.Types.date(o,this.options.mask),e.stopPropagation()}else 9===t&&this.setDate(this.flatpickr.input.value,!0)}},{key:"_onReady",value:function(e,t,n){n.calendarContainer.querySelector(".flatpickr-clear")||(this.clearButton=this.doc.createElement("button"),this.clearButton.className="flatpickr-clear",this.clearButton.innerHTML="Clear",n.calendarContainer.appendChild(this.clearButton),this.clearButton.addEventListener("click",this._onClearButtonClick.bind(this,n)))}},{key:"_onClearButtonClick",value:function(e){e.clear(),e.close(),this.options.hasOwnProperty("onClear")&&this.options.onClear()}},{key:"_mapMask",value:function(e){var t=this._getMasksMapping(),n=e;for(var r in t)n=n.replace(new RegExp("(%"+r+")","g"),t[r]);return n}},{key:"_getMasksMapping",value:function(){return{Yz:"y",Ys:"Y",Yl:"Y",Yp:"Y",Yd:"Y",Y:"Y",Mz:"m",Ms:"n",Ml:"n",Mp:"n",Md:"n",M:"n",Dz:"d",Ds:"j",Dl:"j",Dp:"j",Dd:"j",D:"j",Hz:"H",Hs:"H",Hl:"H",Hp:"H",Hd:"H",H:"H",hz:"h",hs:"h",hl:"h",hp:"h",hd:"h",h:"h",mz:"i",ms:"i",ml:"i",mp:"i",md:"i",m:"i",sz:"S",ss:"s",sl:"s",sp:"s",sd:"s",s:"s",PP:"K",P:"K",pp:"K",p:"K"}}}]),e}()},function(e,t,n){var r=n(6);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:function(){return window.top.document.head}};n(2)(r,i),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,'.BasicBooleansRenderer{display:block;margin-left:auto;margin-right:auto;text-align:center}.BasicBooleansFilter ul{display:block;list-style:none;margin:0;padding:0;cursor:pointer}.BasicBooleansFilter ul li{padding:10px;-webkit-transition:.4s;transition:.4s;border-bottom:thin solid #ccc}.BasicBooleansFilter ul li.selected{background:#569ff7;color:#fff}.BasicBooleansFilter ul li:last-child{border-bottom:none}.BooleanSwitch{outline:none;position:relative;display:block;margin-left:auto;margin-right:auto;width:40px;height:20px}.BooleanSwitch input{display:none}.BooleanSwitch .slider{cursor:pointer;top:20%;left:0;right:0;bottom:10%;background-color:#ccc}.BooleanSwitch .slider,.BooleanSwitch .slider:before{position:absolute;-webkit-transition:.4s;transition:.4s}.BooleanSwitch .slider:before{content:"";height:12px;width:12px;left:1px;top:1px;bottom:1px;right:1px;background-color:#fff}.BooleanSwitch input:checked+.slider{background-color:#569ff7}.BooleanSwitch input:focus+.slider{box-shadow:0 0 1px #569ff7}.BooleanSwitch input:checked+.slider:before{-webkit-transform:translateX(26px);-ms-transform:translateX(26px);transform:translateX(26px)}.BooleanSwitch .slider.round{border-radius:28px}.BooleanSwitch .slider.round:before{border-radius:50%}',""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var i,o=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")})}},function(e,t,n){var r=n(9);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:function(){return window.top.document.head}};n(2)(r,i),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".flatpickr-calendar{font-size:13px;border-radius:5px}.flatpickr-calendar .flatpickr-clear{padding:7px;margin:12px;text-align:center;background-color:#569ff7;color:#fff;outline:0;border:0;min-width:100px;cursor:pointer;box-shadow:0 0 2px 0 transparent;transition:box-shadow .36s}.flatpickr-calendar .flatpickr-clear:focus,.flatpickr-calendar .flatpickr-clear:hover{box-shadow:0 0 2px 0 #9e9e9e}.DateTimesDialog{max-width:307.875px;overflow:hidden}.DateTimesDialog input{min-width:100%;max-width:100%;width:100%;height:100%;margin-left:auto;margin-right:auto;padding:3px;outline:0;border:none}",""])},function(e,t,n){var r=n(11);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:function(){return window.top.document.head}};n(2)(r,i),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".BasicImagesRenderer img{display:block;margin-left:auto;margin-right:auto}",""])},function(e,t,n){var r=n(13);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:function(){return window.top.document.head}};n(2)(r,i),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".BasicNumbersEditor{display:block}.BasicNumbersEditor input{min-width:100%;outline:0;height:100%;display:block;margin-left:auto;margin-right:auto;border:none;padding:3px}",""])},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n(3),i=n(0);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n\n
  • '.concat(n||"◉ True",'
  • \n
  • ').concat(r||"◎ False",'
  • \n
  • ').concat(i||"◍ None","
  • \n \n "),this.filterElements=this.gui.querySelectorAll("li");for(var o=0;o=s&&n<=c}else t=void 0===i||new Date(i)===n;return t}},{key:"isFilterActive",value:function(){return Array.isArray(this.filterDates)&&this.filterDates.length}},{key:"getModel",value:function(){return{value:this.filterDates}}},{key:"getModelAsString",value:function(){var e=this.getOption("FILTER_MASK",this.params),t=a(this.filterDates,2),n=t[0],r=t[1],i="";return n&&(i+="".concat(BBj.Masks.Types.date(n,e))),r&&(i+=" - ".concat(BBj.Masks.Types.date(r,e))),i}}]),t}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(0);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var n=0;n'):this.container.innerHTML=e.value}else this.container.innerHTML=""}},{key:"getGui",value:function(){return this.container}}]),t}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(0);function i(e,t){for(var n=0;n12?"PM":"AM",pp:e.hours24>12?"pm":"am",p:e.hours24>12?"pm":"am",Jz:1==String(e.dayOfYear).length?"0"+e.dayOfYear:e.dayOfYear,Js:e.dayOfYear,Jl:e.dayOfYear,Jd:e.dayOfYear,J:e.dayOfYear,Wz:1==String(e.dayOfWeek).length?"0"+e.dayOfWeek:e.dayOfWeek,Ws:e.dayOfWeek,Wl:e.dayOfWeek,Wp:String.fromCharCode(e.dayOfWeek),Wd:e.dayOfWeek,W:e.dayOfWeek}}},{key:"_getDayOfYear",value:function(e){var t=Date.parse(e);t instanceof Date||(t=new Date(e));var n=new Date(t.getFullYear(),0,0),r=t-n+60*(n.getTimezoneOffset()-t.getTimezoneOffset())*1e3;return Math.floor(r/864e5)}}]),e}();t.default=i},function(e,t,n){"use strict";function r(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:",",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=n.length;if(0===o)return t;for(var a=0,s=0,c=!1,l=0;la)return t.toString();if(g>s){f=e._round(f,s),p=(d=e._toCharArray(f)).length,h=0,g=0,c=!1;for(var y=0;ya)return t.toString()}var v=-1===e._getSign(f),b=p>0||n.indexOf("0")>=0,w=!1,k="";c=!1;for(var D=0,_=0;_0)&&(k+=r);break;case"-":case"(":case")":v&&(k+=x);break;case"+":k+=v?"-":"+";break;case".":c?k+=x:(b&&(k+=i),c=!0,++D);break;case"C":_1&&"0"==i.charAt(0)&&(i=i.substring(1)),r=i.split("")}return r}},{key:"_getSign",value:function(e){return(e>0)-(e<0)||+e}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DateMask",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"NumberMask",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"Types",{enumerable:!0,get:function(){return o.default}});var r=a(n(0)),i=a(n(1)),o=a(n(3));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(1)),i=o(n(0));function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:",",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".";return r.default.mask(e,t,n,i)}},{key:"date",value:function(e,t){return i.default.mask(e,t)}}]),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(5);var r=n(2);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})})},function(e,t){ +!function(e,t){for(var n in t)e[n]=t[n]}(window,function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(r,i,function(t){return e[t]}.bind(null,i));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=50)}([function(e,t){var n=e.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(e,t){e.exports=function(e){return"object"==typeof e?null!==e:"function"==typeof e}},function(e,t){var n=e.exports={version:"2.5.7"};"number"==typeof __e&&(__e=n)},function(e,t,n){e.exports=!n(7)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(e,t){var n;n=function(){return this}();try{n=n||Function("return this")()||(0,eval)("this")}catch(e){"object"==typeof window&&(n=window)}e.exports=n},function(e,t,n){var r=n(31)("wks"),i=n(6),o=n(0).Symbol,a="function"==typeof o;(e.exports=function(e){return r[e]||(r[e]=a&&o[e]||(a?o:i)("Symbol."+e))}).store=r},function(e,t){var n=0,r=Math.random();e.exports=function(e){return"Symbol(".concat(void 0===e?"":e,")_",(++n+r).toString(36))}},function(e,t){e.exports=function(e){try{return!!e()}catch(e){return!0}}},function(e,t,n){var r=n(46),i=n(41);e.exports=n(3)?function(e,t,n){return r.f(e,t,i(1,n))}:function(e,t,n){return e[t]=n,e}},function(e,t,n){"use strict";function r(){return{"basic-string":{cellEditor:"agTextCellEditor"},"basic-text":{cellEditor:"agLargeTextCellEditor"},"basic-boolean":{cellRenderer:"BasicBooleansRenderer",cellRendererParams:{RENDERER_TRUE:"✔",RENDERER_FALSE:"✘"},cellEditor:"BasicBooleansEditor",filter:"BasicBooleansFilter"},"basic-number":{valueFormatter:Basis.AgGridComponents.BasicNumbersValueFormatter.format,cellEditor:"BasicNumbersEditor",filter:"agNumberColumnFilter",filterParams:{inRangeInclusive:!0},floatingFilter:"agNumberColumnFilter",floatingFilterParams:{inRangeInclusive:!0}},"basic-date":{valueFormatter:Basis.AgGridComponents.BasicDateTimesValueFormatter.format,cellEditor:"BasicDateTimesEditor",cellEditorParams:{EDITOR_MASK:"%Y/%Mz/%Dz",EDITOR_ALLOW_INPUT:!0},filter:"BasicDateTimesFilter",filterParams:{FILTER_MASK:"%Y/%Mz/%Dz",FILTER_ALLOW_INPUT:!0}},"basic-timestamp":{valueFormatter:Basis.AgGridComponents.BasicDateTimesValueFormatter.format,cellEditor:"BasicDateTimesEditor",cellEditorParams:{EDITOR_MASK:"%Y/%Mz/%Dz %Hz:%mz:%sz",EDITOR_ENABLE_TIME:!0,EDITOR_ALLOW_INPUT:!0},filter:"BasicDateTimesFilter",filterParams:{FILTER_MASK:"%Y/%Mz/%Dz %Hz:%mz:%sz",FILTER_ENABLE_TIME:!0,FILTER_ALLOW_INPUT:!0}},"basic-image":{cellRenderer:"BasicImagesRenderer",suppressMenu:!0,suppressFilter:!0,cellRendererParams:{IMAGE_WIDTH:"25px",IMAGE_HEIGHT:"25px"}},"basic-image-filterable":{cellRenderer:"BasicImagesRenderer",cellRendererParams:{IMAGE_WIDTH:"25px",IMAGE_HEIGHT:"25px"}}}}function i(){return{BasicBooleansRenderer:Basis.AgGridComponents.BasicBooleansRenderer,BasicBooleansEditor:Basis.AgGridComponents.BasicBooleansEditor,BasicBooleansFilter:Basis.AgGridComponents.BasicBooleansFilter,BasicNumbersEditor:Basis.AgGridComponents.BasicNumbersEditor,BasicDateTimesEditor:Basis.AgGridComponents.BasicDateTimesEditor,BasicDateTimesFilter:Basis.AgGridComponents.BasicDateTimesFilter,BasicImagesRenderer:Basis.AgGridComponents.BasicImagesRenderer}}function o(e,t,n){var o=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};agGrid.LicenseManager&&t&&agGrid.LicenseManager.setLicenseKey(t);var a=r(),s=Object.assign(o,{rowData:n,getDocument:function(){return $doc},components:i(),columnTypes:a,onRowDoubleClicked:gw_onRowDoubleClicked,onRowSelected:gw_onRowSelected,onSelectionChanged:gw_onSelectionChanged,onCellEditingStarted:gw_onCellEditingsEvent,onCellEditingStopped:gw_onCellEditingsEvent,onCellValueChanged:gw_onCellEditingsEvent,onRowEditingStarted:gw_onRowEditingsEvent,onRowEditingStopped:gw_onRowEditingsEvent,onRowValueChanged:gw_onRowEditingsEvent,getRowNodeId:gw_getRowNodeId,rememberGroupStateWhenNewData:!0});for(var c in s.hasOwnProperty("__isTree")&&!0===s.__isTree&&(s.getNodeChildDetails=gw_getNodeChildDetails),s.hasOwnProperty("__navigateToNextCell")&&s.__navigateToNextCell&&(s.navigateToNextCell=gw_navigateToNextRow),s.columnDefs){var l=s.columnDefs[c],u=l.field;l.hasOwnProperty("type")&&"basic-number"===l.type&&gw_meta&&gw_meta.hasOwnProperty("field")&&(gw_meta[u].hasOwnProperty("RENDERER_GROUP_SEPARATOR")||(l.RENDERER_GROUP_SEPARATOR=o.__numberGroupSep),gw_meta[u].hasOwnProperty("RENDERER_DECIMAL_SEPARATOR")||(l.RENDERER_DECIMAL_SEPARATOR=o.__numberDecimalSep)),l.cellStyle=gw_cellStyler,l.cellClass=gw_getCellClass,l.toolPanelClass=gw_getToolPanelClass,l.cellClassRules=gw_getGlobalMeta(u,"CELL_CLASS_RULES",null,!0);var f=Number(gw_getGlobalMeta(u,"ROW_GROUP")),d=Number(gw_getGlobalMeta(u,"ENABLE_VALUE")),p=gw_getGlobalMeta(u,"FOOTER_VALUE_GETTER");l.rowGroup=f,l.enableRowGroup=!!f||l.enableRowGroup,l.rowGroupIndex=f?Number(gw_getGlobalMeta(u,"ROW_GROUP_INDEX")):null,l.enableValue=d>0,l.showRowGroup=gw_getGlobalMeta(u,"SHOW_ROW_GROUP",gw_getGlobalMeta(u,"LABEL")),l.aggFunc=gw_getGlobalMeta(u,"AGG_FUNC"),l.allowedAggFuncs=gw_getGlobalMeta(u,"ALLOWED_AGG_FUNCS","sum,min,max,count,avg,first,last").split(","),l.valueGetter=gw_getGlobalMeta(u,"VALUE_GETTER"),l.valueSetter=gw_getGlobalMeta(u,"VALUE_SETTER"),l.hide=l.headerName.startsWith("__")||gw_getGlobalMeta(u,"HIDE",gw_getGlobalMeta(u,"HIDDEN",!1)),l.suppressToolPanel=l.headerName.startsWith("__"),l.editable="1"===gw_getGlobalMeta(u,"EDITABLE",!1),p&&(l.cellRenderer="agGroupCellRenderer",l.cellRendererParams=Object.assign({},l.cellRendererParams,{footerValueGetter:p}))}return gw_groupColumns(JSON.parse(s.__columnsGroup),s.columnDefs),new agGrid.Grid(e,s)}Object.defineProperty(t,"__esModule",{value:!0}),t.gw_getSupportedColumnTypes=r,t.gw_getDefaultComponents=i,t.gw_init=o,t.gw_setData=function(e,t,n){var r=$doc.getElementById("grid");if(r.innerHTML="",window.gw_meta=e[0].meta,window.AGridComponentsMetaConfig=gw_meta,console.log(t),window.gw_options=t,window.gw_instance=o(r,n,e,t),gw_options.hasOwnProperty("__enterKeyBehavior"))switch(gw_options.__enterKeyBehavior){case"next":r.addEventListener("keydown",gw_onMoveToNextCell)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gw_setStyle=function(e,t){jss.forDocument($doc||document).set(e,JSON.parse(t))},t.gw_removeStyle=function(e){jss.forDocument($doc||document).remove(e)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gw_showToolPanel=function(e){gw_options.api.showToolPanel(Boolean(e))},t.gw_setFunctionsReadOnly=function(e){gw_options.api.setFunctionsReadOnly(Boolean(e))},t.gw_getToolPanelClass=function(e){var t=e.colDef;if(gw_meta.hasOwnProperty(t.field)&&gw_meta[t.field].hasOwnProperty("TOOLPANEL_CLASS"))return gw_meta[t.field].TOOLPANEL_CLASS}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gw_setState=function(e){gw_options.columnApi.setColumnState(e)},t.gw_getState=function(){var e=gw_options.columnApi.getColumnState();try{return JSON.stringify(e)}catch(e){console.warn("Failed to parse state",e)}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gw_startEditingCell=function(e,t,n,r){gw_options.api.setFocusedCell(Number(e),t),gw_options.api.startEditingCell({rowIndex:Number(e),colKey:t,keyPress:Number(n),charPress:r})},t.gw_stopEditing=function(e){gw_options.api.stopEditing(e)},t.gw_editNextCell=function(){gw_options.api.tabToNextCell()},t.gw_editPreviousCell=function(){gw_options.api.tabToPreviousCell()},t.gw_cellStyler=function(e){var t=e.column.colDef.cellStyleDefaults||{},n={};e.data&&e.data.meta&&(n=e.data.meta[e.column.colId]||{});var r={};return n.FGCOLOR?r.color=n.FGCOLOR:t.FGCOLOR&&(r.color=t.FGCOLOR),n.BGCOLOR?r["background-color"]=n.BGCOLOR:t.BGCOLOR&&(r["background-color"]=t.BGCOLOR),n.ALIGN?r["text-align"]=n.ALIGN:t.ALIGN&&(r["text-align"]=t.ALIGN),r.color||r["background-color"]||r["text-align"]?r:null},t.gw_getCellClass=function(e){var t=e.colDef.field;if(e.data&&e.data.hasOwnProperty("meta"))return e.data.meta.hasOwnProperty(t)&&e.data.meta[t].hasOwnProperty("CELL_CLASS")?e.data.meta[t].CELL_CLASS:"CELL_CLASS_".concat(t)}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gw_setQuickFilter=function(e){gw_options.api.setQuickFilter(e)},t.gw_expandAll=function(){gw_options.api.expandAll()},t.gw_collapseAll=function(){gw_options.api.collapseAll()},t.gw_setVisibleRow=function(e,t){gw_options.api.ensureIndexVisible(e,t)},t.gw_navigateToNextRow=function(e){var t=e.previousCellDef,n=e.nextCellDef;switch(e.key){case 40:return t=e.previousCellDef,gw_options.api.forEachNode(function(e){t.rowIndex+1===e.rowIndex&&e.setSelected(!0)}),n;case 38:return t=e.previousCellDef,gw_options.api.forEachNode(function(e){t.rowIndex-1===e.rowIndex&&e.setSelected(!0)}),n;case 37:case 39:return n;default:throw new Error("You have super strange keyboard")}},t.gw_getRowNodeId=function(e){var t;return gw_options.hasOwnProperty("__getRowNodeId")&&(t=e[gw_options.__getRowNodeId]),t||e.__ROW_INDEX},t.gw_getNodeChildDetails=function(e){var t=e[gw_options.__getParentNodeId];return!!e.__node__children&&{group:!0,expanded:!1,children:e.__node__children,key:t||-1}},t.gw_setRowsData=function(e){gw_options.api.setRowData(e),gw_options.rowData=e,gw_options.api.refreshClientSideRowModel("group")},t.gw_setRowData=function(e){var t=e[0],n=0===gw_options.__getRowNodeId.length?"__ROW_INDEX":gw_options.__getRowNodeId;gw_options.api.getRowNode(t[n]).setData(t),gw_options.api.refreshClientSideRowModel("group")},t.gw_removeRow=function(e){gw_options.rowData.splice(Number(e),1),gw_options.api.setRowData(gw_options.rowData),gw_options.api.refreshClientSideRowModel("group")},t.gw_addRows=function(e,t){gw_options.api.updateRowData({add:t,addIndex:e}),gw_options.api.refreshClientSideRowModel("group")}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.gw_sizeColumnsToFit=function(){gw_options.api.sizeColumnsToFit()},t.gw_setSelectedRows=function(e){gw_options.api.forEachNodeAfterFilterAndSort(function(t){e.indexOf(t.rowIndex)>-1&&(t.setSelected(!0),t.expanded=!0)}.bind(this)),gw_options.api.onGroupExpandedOrCollapsed()},t.gw_selectAll=function(e){1===e?gw_options.api.selectAllFiltered():gw_options.api.selectAll()},t.gw_deselectAll=function(e){1===e?gw_options.api.deselectAllFiltered():gw_options.api.deselectAll()},t.gw_setVisibleColumn=function(e){gw_options.api.ensureColumnVisible(e)},t.gw_setColumnWidth=function(e,t){gw_options.columnApi.setColumnWidth(e,Number(t))},t.gw_pinColumn=function(e,t){gw_options.columnApi.setColumnPinned(e,t)},t.gw_moveColumn=function(e,t){gw_options.columnApi.moveColumn(e,t)},t.gw_groupColumns=function(e,t){var n=function(n){if(!e.hasOwnProperty(n))return"continue";var r=JSON.parse(e[n]),i=[];r.children.split(",").forEach(function(e){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:null,r=arguments.length>3&&void 0!==arguments[3]&&arguments[3];if(gw_meta&&gw_meta.hasOwnProperty(e)&&gw_meta[e].hasOwnProperty(t)){if(!r)return gw_meta[e][t];try{return JSON.parse(gw_meta[e][t])}catch(r){return console.warn("BBjGridExWidget : Faild to parse [".concat(e,"][").concat(t,"] as JSON")),n}}return n}},function(e,t,n){"undefined"!=typeof self&&self,e.exports=function(e){var t={};function n(r){if(t[r])return t[r].exports;var i=t[r]={i:r,l:!1,exports:{}};return e[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:r})},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=24)}([function(e,t,n){"use strict";function r(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:null;if(t.hasOwnProperty("colDef")&&t.colDef.hasOwnProperty(e))n=t.colDef[e];else{var i=this.getWin(t).AGridComponentsMetaConfig;n=i&&i.hasOwnProperty(t.column.colId)&&i[t.column.colId].hasOwnProperty(e)?i[t.column.colId][e]:t[e]||r}return n}}]),e}()},function(e,t){e.exports=function(e){var t=[];return t.toString=function(){return this.map(function(t){var n=function(e,t){var n=e[1]||"",r=e[3];if(!r)return n;if(t&&"function"==typeof btoa){var i=function(e){return"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(e))))+" */"}(r),o=r.sources.map(function(e){return"/*# sourceURL="+r.sourceRoot+e+" */"});return[n].concat(o).concat([i]).join("\n")}return[n].join("\n")}(t,e);return t[2]?"@media "+t[2]+"{"+n+"}":n}).join("")},t.i=function(e,n){"string"==typeof e&&(e=[[null,e,""]]);for(var r={},i=0;i=0&&c.splice(t,1)}function h(e){var t=document.createElement("style");return e.attrs.type="text/css",g(t,e.attrs),d(e,t),t}function g(e,t){Object.keys(t).forEach(function(n){e.setAttribute(n,t[n])})}function m(e,t){var n,r,i,o;if(t.transform&&e.css){if(!(o=t.transform(e.css)))return function(){};e.css=o}if(t.singleton){var c=s++;n=a||(a=h(t)),r=v.bind(null,n,c,!1),i=v.bind(null,n,c,!0)}else e.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(e){var t=document.createElement("link");return e.attrs.type="text/css",e.attrs.rel="stylesheet",g(t,e.attrs),d(e,t),t}(t),r=function(e,t,n){var r=n.css,i=n.sourceMap,o=void 0===t.convertToAbsoluteUrls&&i;(t.convertToAbsoluteUrls||o)&&(r=l(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=e.href;e.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,t),i=function(){p(n),n.href&&URL.revokeObjectURL(n.href)}):(n=h(t),r=function(e,t){var n=t.css,r=t.media;if(r&&e.setAttribute("media",r),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){p(n)});return r(e),function(t){if(t){if(t.css===e.css&&t.media===e.media&&t.sourceMap===e.sourceMap)return;r(e=t)}else i()}}e.exports=function(e,t){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(t=t||{}).attrs="object"==typeof t.attrs?t.attrs:{},t.singleton||"boolean"==typeof t.singleton||(t.singleton=i()),t.insertInto||(t.insertInto="head"),t.insertAt||(t.insertAt="bottom");var n=f(e,t);return u(n,t),function(e){for(var i=[],o=0;o0&&void 0!==arguments[0]&&arguments[0],n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this._build(r,t,n)}return function(e,t,n){t&&r(e.prototype,t)}(e,[{key:"getValue",value:function(){return this.input.checked}},{key:"focus",value:function(){this.component.focus()}},{key:"toggle",value:function(){this.input.checked=!this.input.checked}},{key:"check",value:function(){this.input.checked=!0}},{key:"uncheck",value:function(){this.input.checked=!1}},{key:"enable",value:function(){this.input.disabled=!1}},{key:"disable",value:function(){this.input.disabled=!0}},{key:"destroy",value:function(){this.component.removeEventListener("click",this._onClick.bind(this)),this.component.removeEventListener("keydown",this._onChange.bind(this)),this.disable()}},{key:"_build",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:document;this.component=n.createElement("div"),this.component.className="BooleanSwitch",this.component.tabIndex="-1",this.slider=n.createElement("span"),this.slider.className="slider round",this.input=n.createElement("input"),this.input.type="checkbox",this.input.checked=t,this.input.tabIndex="0",this.component.appendChild(this.input),this.component.appendChild(this.slider),this.component.addEventListener("click",this._onClick.bind(this,e)),this.component.addEventListener("keydown",this._onChange.bind(this,e))}},{key:"_onClick",value:function(e,t){if(this.input.disabled)return!1;this.toggle(),e&&e(this)}},{key:"_onChange",value:function(e,t){if(this.input.disabled)return!1;var n=t.which||t.keyCode;32==n?(this.toggle(),e&&e(this),t.stopPropagation()):39==n?(this.check(),e&&e(this),t.stopPropagation()):37==n&&(this.uncheck(),e&&e(this),t.stopPropagation())}}]),e}()},function(e,t,n){"use strict";function r(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t){for(var n=0;n0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.doc=n,this.options=function(e){for(var t=1;t1&&void 0!==arguments[1]&&arguments[1];this.flatpickr.setDate(e||"",t)}},{key:"setOption",value:function(e,t){this.flatpickr.set(e,t)}},{key:"open",value:function(){this.flatpickr.open(),this.flatpickr.input.focus()}},{key:"close",value:function(){this.flatpickr.close()}},{key:"enable",value:function(){this.input.disabled=!1}},{key:"disable",value:function(){this.input.disabled=!0}},{key:"destroy",value:function(){this.flatpickr.destroy(),this.clearButton.removeEventListener("click",this._onClearButtonClick.bind(this)),this.component.removeEventListener("keydown",this._onKeyDown.bind(this))}},{key:"_build",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document;this.component=t.createElement("div"),this.component.className="DateTimesDialog",this.component.tabIndex="0",this.input=t.createElement("input"),this.component.appendChild(this.input),this.flatpickr=flatpickr(this.input,e),this.component.addEventListener("keydown",this._onKeyDown.bind(this))}},{key:"_onKeyDown",value:function(e){var t=e.which||e.keyCode;if([37,39].indexOf(t)>-1)e.stopPropagation();else if(38===t){var n=this.flatpickr.input.value,r=Date.parse(n);r instanceof Date||(r=new Date(n)),r.setDate(r.getDate()+1),this.flatpickr.setDate(r),this.flatpickr.input.value=BBj.Masks.Types.date(r,this.options.mask),e.stopPropagation()}else if(40===t){var i=this.flatpickr.input.value,o=Date.parse(i);o instanceof Date||(next=new Date(i)),o.setDate(o.getDate()-1),this.flatpickr.setDate(o),this.flatpickr.input.value=BBj.Masks.Types.date(o,this.options.mask),e.stopPropagation()}else 9===t&&this.setDate(this.flatpickr.input.value,!0)}},{key:"_onReady",value:function(e,t,n){n.calendarContainer.querySelector(".flatpickr-clear")||(this.clearButton=this.doc.createElement("button"),this.clearButton.className="flatpickr-clear",this.clearButton.innerHTML="Clear",n.calendarContainer.appendChild(this.clearButton),this.clearButton.addEventListener("click",this._onClearButtonClick.bind(this,n)))}},{key:"_onClearButtonClick",value:function(e){e.clear(),e.close(),this.options.hasOwnProperty("onClear")&&this.options.onClear()}},{key:"_mapMask",value:function(e){var t=this._getMasksMapping(),n=e;for(var r in t)n=n.replace(new RegExp("(%"+r+")","g"),t[r]);return n}},{key:"_getMasksMapping",value:function(){return{Yz:"y",Ys:"Y",Yl:"Y",Yp:"Y",Yd:"Y",Y:"Y",Mz:"m",Ms:"n",Ml:"n",Mp:"n",Md:"n",M:"n",Dz:"d",Ds:"j",Dl:"j",Dp:"j",Dd:"j",D:"j",Hz:"H",Hs:"H",Hl:"H",Hp:"H",Hd:"H",H:"H",hz:"h",hs:"h",hl:"h",hp:"h",hd:"h",h:"h",mz:"i",ms:"i",ml:"i",mp:"i",md:"i",m:"i",sz:"S",ss:"s",sl:"s",sp:"s",sd:"s",s:"s",PP:"K",P:"K",pp:"K",p:"K"}}}]),e}()},function(e,t,n){var r=n(6);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:function(){return window.top.document.head}};n(2)(r,i),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,'.BasicBooleansRenderer{display:block;margin-left:auto;margin-right:auto;text-align:center}.BasicBooleansFilter ul{display:block;list-style:none;margin:0;padding:0;cursor:pointer}.BasicBooleansFilter ul li{padding:10px;-webkit-transition:.4s;transition:.4s;border-bottom:thin solid #ccc}.BasicBooleansFilter ul li.selected{background:#569ff7;color:#fff}.BasicBooleansFilter ul li:last-child{border-bottom:none}.BooleanSwitch{outline:none;position:relative;display:block;margin-left:auto;margin-right:auto;width:40px;height:20px}.BooleanSwitch input{display:none}.BooleanSwitch .slider{cursor:pointer;top:20%;left:0;right:0;bottom:10%;background-color:#ccc}.BooleanSwitch .slider,.BooleanSwitch .slider:before{position:absolute;-webkit-transition:.4s;transition:.4s}.BooleanSwitch .slider:before{content:"";height:12px;width:12px;left:1px;top:1px;bottom:1px;right:1px;background-color:#fff}.BooleanSwitch input:checked+.slider{background-color:#569ff7}.BooleanSwitch input:focus+.slider{box-shadow:0 0 1px #569ff7}.BooleanSwitch input:checked+.slider:before{-webkit-transform:translateX(26px);-ms-transform:translateX(26px);transform:translateX(26px)}.BooleanSwitch .slider.round{border-radius:28px}.BooleanSwitch .slider.round:before{border-radius:50%}',""])},function(e,t){e.exports=function(e){var t="undefined"!=typeof window&&window.location;if(!t)throw new Error("fixUrls requires window.location");if(!e||"string"!=typeof e)return e;var n=t.protocol+"//"+t.host,r=n+t.pathname.replace(/\/[^\/]*$/,"/");return e.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(e,t){var i,o=t.trim().replace(/^"(.*)"$/,function(e,t){return t}).replace(/^'(.*)'$/,function(e,t){return t});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?e:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")})}},function(e,t,n){var r=n(9);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:function(){return window.top.document.head}};n(2)(r,i),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".flatpickr-calendar{font-size:13px;border-radius:5px}.flatpickr-calendar .flatpickr-clear{padding:7px;margin:12px;text-align:center;background-color:#569ff7;color:#fff;outline:0;border:0;min-width:100px;cursor:pointer;box-shadow:0 0 2px 0 transparent;transition:box-shadow .36s}.flatpickr-calendar .flatpickr-clear:focus,.flatpickr-calendar .flatpickr-clear:hover{box-shadow:0 0 2px 0 #9e9e9e}.DateTimesDialog{max-width:307.875px;overflow:hidden}.DateTimesDialog input{min-width:100%;max-width:100%;width:100%;height:100%;margin-left:auto;margin-right:auto;padding:3px;outline:0;border:none}",""])},function(e,t,n){var r=n(11);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:function(){return window.top.document.head}};n(2)(r,i),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".BasicImagesRenderer img{display:block;margin-left:auto;margin-right:auto}",""])},function(e,t,n){var r=n(13);"string"==typeof r&&(r=[[e.i,r,""]]);var i={hmr:!0,transform:void 0,insertInto:function(){return window.top.document.head}};n(2)(r,i),r.locals&&(e.exports=r.locals)},function(e,t,n){(e.exports=n(1)(!1)).push([e.i,".BasicNumbersEditor{display:block}.BasicNumbersEditor input{min-width:100%;outline:0;height:100%;display:block;margin-left:auto;margin-right:auto;border:none;padding:3px}",""])},function(e,t,n){"use strict";n.d(t,"a",function(){return l});var r=n(3),i=n(0);function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function a(e,t){for(var n=0;n\n
  • '.concat(n||"◉ True",'
  • \n
  • ').concat(r||"◎ False",'
  • \n
  • ').concat(i||"◍ None","
  • \n \n "),this.filterElements=this.gui.querySelectorAll("li");for(var o=0;o=s&&n<=c}else t=void 0===i||new Date(i)===n;return t}},{key:"isFilterActive",value:function(){return Array.isArray(this.filterDates)&&this.filterDates.length}},{key:"getModel",value:function(){return{value:this.filterDates}}},{key:"getModelAsString",value:function(){var e=this.getOption("FILTER_MASK",this.params),t=a(this.filterDates,2),n=t[0],r=t[1],i="";return n&&(i+="".concat(BBj.Masks.Types.date(n,e))),r&&(i+=" - ".concat(BBj.Masks.Types.date(r,e))),i}}]),t}()},function(e,t,n){"use strict";n.d(t,"a",function(){return c});var r=n(0);function i(e){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){for(var n=0;n'):this.container.innerHTML=e.value}else this.container.innerHTML=""}},{key:"getGui",value:function(){return this.container}}]),t}()},function(e,t,n){"use strict";n.d(t,"a",function(){return o});var r=n(0);function i(e,t){for(var n=0;n12?"PM":"AM",pp:e.hours24>12?"pm":"am",p:e.hours24>12?"pm":"am",Jz:1==String(e.dayOfYear).length?"0"+e.dayOfYear:e.dayOfYear,Js:e.dayOfYear,Jl:e.dayOfYear,Jd:e.dayOfYear,J:e.dayOfYear,Wz:1==String(e.dayOfWeek).length?"0"+e.dayOfWeek:e.dayOfWeek,Ws:e.dayOfWeek,Wl:e.dayOfWeek,Wp:String.fromCharCode(e.dayOfWeek),Wd:e.dayOfWeek,W:e.dayOfWeek}}},{key:"_getDayOfYear",value:function(e){var t=Date.parse(e);t instanceof Date||(t=new Date(e));var n=new Date(t.getFullYear(),0,0),r=t-n+60*(n.getTimezoneOffset()-t.getTimezoneOffset())*1e3;return Math.floor(r/864e5)}}]),e}();t.default=i},function(e,t,n){"use strict";function r(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:",",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".",o=n.length;if(0===o)return t;for(var a=0,s=0,c=!1,l=0;la)return t.toString();if(g>s){f=e._round(f,s),p=(d=e._toCharArray(f)).length,h=0,g=0,c=!1;for(var y=0;ya)return t.toString()}var v=-1===e._getSign(f),b=p>0||n.indexOf("0")>=0,w=!1,k="";c=!1;for(var D=0,_=0;_0)&&(k+=r);break;case"-":case"(":case")":v&&(k+=x);break;case"+":k+=v?"-":"+";break;case".":c?k+=x:(b&&(k+=i),c=!0,++D);break;case"C":_1&&"0"==i.charAt(0)&&(i=i.substring(1)),r=i.split("")}return r}},{key:"_getSign",value:function(e){return(e>0)-(e<0)||+e}}]),e}();t.default=i},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"DateMask",{enumerable:!0,get:function(){return r.default}}),Object.defineProperty(t,"NumberMask",{enumerable:!0,get:function(){return i.default}}),Object.defineProperty(t,"Types",{enumerable:!0,get:function(){return o.default}});var r=a(n(0)),i=a(n(1)),o=a(n(3));function a(e){return e&&e.__esModule?e:{default:e}}},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.default=void 0;var r=o(n(1)),i=o(n(0));function o(e){return e&&e.__esModule?e:{default:e}}function a(e,t){for(var n=0;n2&&void 0!==arguments[2]?arguments[2]:",",i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:".";return r.default.mask(e,t,n,i)}},{key:"date",value:function(e,t){return i.default.mask(e,t)}}]),e}();t.default=s},function(e,t,n){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),n(5);var r=n(2);Object.keys(r).forEach(function(e){"default"!==e&&"__esModule"!==e&&Object.defineProperty(t,e,{enumerable:!0,get:function(){return r[e]}})})},function(e,t){ /** * @version: 1.0 Alpha-1 * @author: Coolite Inc. http://www.coolite.com/ diff --git a/js/dist/report.html b/js/dist/report.html index 5f72e440..0e06a389 100644 --- a/js/dist/report.html +++ b/js/dist/report.html @@ -18,7 +18,7 @@
    diff --git a/js/src/api/rows.js b/js/src/api/rows.js index c62072fd..90cb7986 100644 --- a/js/src/api/rows.js +++ b/js/src/api/rows.js @@ -111,4 +111,5 @@ export function gw_removeRow(index) { export function gw_addRows(index,rows) { gw_options.api.updateRowData({add: rows, addIndex: index}); + gw_options.api.refreshClientSideRowModel('group'); }