(self.webpackChunktimetrex=self.webpackChunktimetrex||[]).push([["column_editor-ColumnEditor"],{9613:(__unused_webpack_module,__unused_webpack_exports,__webpack_require__)=>{eval("/* provided dependency */ var jQuery = __webpack_require__(9755);\n( function( $ ) {\n\n\t$.fn.ColumnEditor = function( options ) {\n\t\tvar opts = $.extend( {}, $.fn.ColumnEditor.defaults, options );\n\n\t\tvar parent_awesome_box = null;\n\n\t\tvar a_dropdown = null;\n\n\t\tvar $this = this;\n\n\t\tvar is_mouse_over = false;\n\n\t\tvar layout_selector = null;\n\n\t\tvar user_generic_data_api = null;\n\n\t\tvar related_layout_Array = null;\n\n\t\tvar all_columns;\n\n\t\tvar original_columns;\n\n\t\tvar numArray = [\n\t\t\t{ label: $.i18n._( 'Default' ), value: 0 },\n\t\t\t{ label: 5, value: 5 },\n\t\t\t{ label: 10, value: 10 },\n\t\t\t{\n\t\t\t\tlabel: 15,\n\t\t\t\tvalue: 15\n\t\t\t},\n\t\t\t{ label: 20, value: 20 },\n\t\t\t{ label: 25, value: 25 },\n\t\t\t{ label: 50, value: 50 },\n\t\t\t{\n\t\t\t\tlabel: 100,\n\t\t\t\tvalue: 100\n\t\t\t},\n\t\t\t{ label: 250, value: 250 },\n\t\t\t{ label: 500, value: 500 },\n\t\t\t{ label: 1000, value: 1000 }\n\t\t];\n\n\t\tthis.getIsMouseOver = function() {\n\t\t\treturn is_mouse_over;\n\t\t};\n\n\t\tthis.getParentAwesomeBox = function() {\n\t\t\treturn parent_awesome_box;\n\t\t};\n\n\t\tGlobal.addCss( 'global/widgets/column_editor/ColumnEditor.css' );\n\n\t\tthis.show = function() {\n\n\t\t\tif ( LocalCacheData.openAwesomeBoxColumnEditor ) {\n\n\t\t\t\tif ( LocalCacheData.openAwesomeBoxColumnEditor.getParentAwesomeBox().getId() === parent_awesome_box.getId() ) {\n\t\t\t\t\tLocalCacheData.openAwesomeBoxColumnEditor.onClose();\n\t\t\t\t\treturn;\n\t\t\t\t} else {\n\t\t\t\t\tLocalCacheData.openAwesomeBoxColumnEditor.onClose();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tvar layout = parent_awesome_box.getLayout();\n\t\t\tvar a_dropdown_div = $( this ).find( '.column-editor-drop-down-div' );\n\n\t\t\tvar rows_per_page_div = $( this ).find( '.rows-per-page-div' );\n\n\t\t\ta_dropdown = Global.loadWidgetByName( FormItemType.AWESOME_DROPDOWN );\n\t\t\t//Create ADropDown\n\t\t\ta_dropdown = a_dropdown.ADropDown( {\n\t\t\t\tdisplay_show_all: false,\n\t\t\t\tid: 'column_editor',\n\t\t\t\tkey: 'value',\n\t\t\t\tdisplay_close_btn: false,\n\t\t\t\tdisplay_column_settings: false,\n\t\t\t\tstatic_height: 150,\n\t\t\t\tresize_grids: true\n\t\t\t} );\n\n\t\t\ta_dropdown_div.append( a_dropdown );\n\n\t\t\t//Add Self to UI\n\t\t\t$( 'body' ).append( $( this ).css( 'visibility', 'hidden' ) ); // #2734 - Add to DOM but invisible so code can do calculations, but user does not see flashes.\n\n\t\t\ta_dropdown.setColumns( [\n\t\t\t\t{ name: 'label', index: 'label', label: $.i18n._( 'Column Name' ), width: 100, sortable: false }\n\t\t\t] );\n\n\t\t\ta_dropdown.setUnselectedGridData( parent_awesome_box.getAllColumns() );\n\n\t\t\toriginal_columns = parent_awesome_box.getDisplayColumnsForEditor();\n\t\t\ta_dropdown.setSelectGridData( original_columns );\n\n\t\t\ta_dropdown.setResizeGrids( true );\n\n\t\t\t//Set position\n\t\t\tif ( 958 + $( parent_awesome_box ).offset().left + 50 > Global.bodyWidth() ) {\n\t\t\t\t$( this ).css( 'left', Global.bodyWidth() - 958 - 50 );\n\t\t\t} else {\n\n\t\t\t\t$( this ).css( 'left', $( parent_awesome_box ).offset().left );\n\t\t\t}\n\n\t\t\tvar $$this = this;\n\t\t\tsetTimeout( function() {\n\t\t\t\tif ( ( $( $$this ).height() + $( parent_awesome_box ).offset().top + 50 ) > Global.bodyHeight() ) {\n\t\t\t\t\t$( $$this ).css( 'top', ( Global.bodyHeight() - $( $$this ).height() - 25 ) );\n\t\t\t\t} else {\n\t\t\t\t\t$( $$this ).css( 'top', $( parent_awesome_box ).offset().top + 25 );\n\t\t\t\t}\n\t\t\t\t$( $$this ).css( 'visibility', 'visible' ); // show once all positions and sizes are done calculating and moving.\n\t\t\t}, 100 );\n\n\t\t\t$( this ).mouseenter( function() {\n\t\t\t\tis_mouse_over = true;\n\t\t\t} );\n\n\t\t\t$( this ).mouseleave( function( e ) {\n\t\t\t\t// Issue #2853 - This comparison fixes an issue where firefox improperly triggers mouseleave on select menus.\n\t\t\t\tif ( e.target == this ) {\n\t\t\t\t\tis_mouse_over = false;\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tLocalCacheData.openAwesomeBoxColumnEditor = $this;\n\n\t\t\tif ( layout && Global.isSet( layout.data.type ) && layout.data.type === 10 ) {\n\t\t\t\ta_dropdown_div.css( 'display', 'none' );\n\t\t\t\trows_per_page_div.css( 'display', 'none' );\n\n\t\t\t} else {\n\t\t\t\ta_dropdown_div.css( 'display', 'block' );\n\t\t\t\trows_per_page_div.css( 'display', 'block' );\n\t\t\t}\n\n\t\t\tvar script_name = parent_awesome_box.getScriptName();\n\n\t\t\tvar api = parent_awesome_box.getAPI();\n\n\t\t\tapi.getOptions( 'columns', {\n\t\t\t\tonResult: function( columns_result ) {\n\n\t\t\t\t\tvar columns_result_data = columns_result.getResult();\n\t\t\t\t\tall_columns = Global.buildColumnArray( columns_result_data );\n\n\t\t\t\t}\n\t\t\t} );\n\n\t\t\tuser_generic_data_api.getUserGenericData( { filter_data: { script: script_name, deleted: false } },\n\t\t\t\t{\n\t\t\t\t\tonResult: function( results ) {\n\n\t\t\t\t\t\tvar result_data = results.getResult();\n\n\t\t\t\t\t\t//Save layout array\n\t\t\t\t\t\trelated_layout_Array = result_data;\n\n\t\t\t\t\t\tif ( result_data && result_data.length > 0 ) {\n\n\t\t\t\t\t\t\tresult_data.sort( function( a, b ) {\n\n\t\t\t\t\t\t\t\treturn Global.compare( a, b, 'name' );\n\n\t\t\t\t\t\t\t} );\n\n\t\t\t\t\t\t\t$( layout_selector ).empty();\n\n\t\t\t\t\t\t\tvar source_data = [];\n\n\t\t\t\t\t\t\tsource_data.push( { label: $.i18n._( Global.customize_item ), value: -1 } );\n\n\t\t\t\t\t\t\tvar len = result_data.length;\n\t\t\t\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\t\t\t\t\tvar item = result_data[i];\n\t\t\t\t\t\t\t\tsource_data.push( { label: item.name, value: item.id } );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tlayout_selector.setSourceData( source_data );\n\n\t\t\t\t\t\t\tif ( layout && Global.isSet( layout.data.type ) && layout.data.type === 10 ) {\n\t\t\t\t\t\t\t\t$( $( layout_selector ).find( 'option' ) ).filter( function() {\n\t\t\t\t\t\t\t\t\treturn parseInt( $( this ).attr( 'value' ) ) === layout.data.layout_id;\n\t\t\t\t\t\t\t\t} ).prop( 'selected', true ).attr( 'selected', true );\n\n\t\t\t\t\t\t\t\tvar select_id = layout_selector.getValue();\n\n\t\t\t\t\t\t\t\t//If saved layout is deleted. Show first one and show columns setting\n\t\t\t\t\t\t\t\tif ( select_id === -1 ) {\n\t\t\t\t\t\t\t\t\ta_dropdown_div.css( 'display', 'block' );\n\t\t\t\t\t\t\t\t\trows_per_page_div.css( 'display', 'block' );\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tsource_data = [];\n\n\t\t\t\t\t\t\tsource_data.push( { label: $.i18n._( Global.customize_item ), value: -1 } );\n\n//\t\t\t\t\t\t$( layout_selector ).append( '' );\n\n\t\t\t\t\t\t\tlayout_selector.setSourceData( source_data );\n\t\t\t\t\t\t\t//If saved layout is deleted. Show first one and show columns setting\n\t\t\t\t\t\t\ta_dropdown_div.css( 'display', 'block' );\n\t\t\t\t\t\t\trows_per_page_div.css( 'display', 'block' );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t} );\n\n\t\t};\n\n\t\tthis.onClose = function() {\n\t\t\t$( $this ).remove();\n\t\t\tLocalCacheData.openAwesomeBoxColumnEditor = null;\n\t\t\tis_mouse_over = false;\n\t\t};\n\n\t\tthis.onSave = function() {\n\t\t\t$this.onClose();\n\n\t\t\tvar select_id = layout_selector.getValue();\n\n\t\t\tif ( !related_layout_Array ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\tif ( select_id !== -1 ) {\n\t\t\t\tvar len = related_layout_Array.length;\n\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\t\tvar item = related_layout_Array[i];\n\t\t\t\t\tif ( item.id === select_id ) {\n\t\t\t\t\t\titem.data.filter_data = Global.convertLayoutFilterToAPIFilter( item );\n\t\t\t\t\t\titem.data.display_columns = $this.buildDisplayColumns( item.data.display_columns );\n\t\t\t\t\t\tparent_awesome_box.onColumnSettingSaveFromLayout( item );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tvar rowPerPageSelect = $( $this ).find( '#rows-per-page-selector' );\n\n\t\t\t\trowPerPageSelect.find( 'option:selected' ).each( function() {\n\n\t\t\t\t\tvar selectId = $( this ).attr( 'value' );\n\n\t\t\t\t\tvar selection_items = a_dropdown.getSelectItems();\n\n\t\t\t\t\tif ( selection_items.length === 0 ) {\n\t\t\t\t\t\tselection_items = original_columns;\n\t\t\t\t\t}\n\n\t\t\t\t\tparent_awesome_box.onColumnSettingSave( selection_items, selectId, '-1' );\n\n\t\t\t\t} );\n\t\t\t}\n\n\t\t};\n\n\t\tthis.buildDisplayColumns = function( api_display_columns ) {\n\t\t\tvar len = all_columns.length;\n\t\t\tvar len1 = api_display_columns.length;\n\t\t\tvar display_columns = [];\n\n\t\t\tfor ( var j = 0; j < len1; j++ ) {\n\t\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\t\tif ( api_display_columns[j] === all_columns[i].value ) {\n\t\t\t\t\t\tdisplay_columns.push( all_columns[i] );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn display_columns;\n\t\t};\n\n\t\t//For multiple items like .xxx could contains a few widgets.\n\t\tthis.each( function() {\n\n\t\t\tvar o = $.meta ? $.extend( {}, opts, $( this ).data() ) : opts;\n\n\t\t\tvar close_btn = $( this ).find( '#close_btn' );\n\n\t\t\tvar save_btn = $( this ).find( '#save_btn' );\n\n\t\t\tuser_generic_data_api = TTAPI.APIUserGenericData;\n\n\t\t\tparent_awesome_box = o.parent_awesome_box;\n\n\t\t\tclose_btn.bind( 'click', $this.onClose );\n\n\t\t\tsave_btn.bind( 'click', $this.onSave );\n\n\t\t\tvar rows_selector = $( this ).find( '#rows-per-page-selector' );\n\n\t\t\tvar len = numArray.length;\n\n\t\t\tfor ( var i = 0; i < len; i++ ) {\n\t\t\t\tvar item = numArray[i];\n\t\t\t\t$( rows_selector ).append( '' );\n\t\t\t}\n\n\t\t\t$( $( rows_selector ).find( 'option' ) ).filter( function() {\n\t\t\t\treturn $( this ).attr( 'value' ) === parent_awesome_box.getRowPerPage();\n\t\t\t} ).prop( 'selected', true ).attr( 'selected', true );\n\n\t\t\tlayout_selector = $( this ).find( '#layout-selector' );\n\t\t\tlayout_selector = layout_selector.TComboBox();\n\n\t\t\tvar a_dropdown_div = $( this ).find( '.column-editor-drop-down-div' );\n\t\t\tvar rows_per_page_div = $( this ).find( '.rows-per-page-div' );\n\n\t\t\tlayout_selector.bind( 'formItemChange', function( e, widget ) {\n\t\t\t\tvar select_id = widget.getValue();\n\n\t\t\t\tif ( select_id !== -1 ) {\n\t\t\t\t\ta_dropdown_div.css( 'display', 'none' );\n\t\t\t\t\trows_per_page_div.css( 'display', 'none' );\n\n\t\t\t\t} else {\n\t\t\t\t\ta_dropdown_div.css( 'display', 'block' );\n\t\t\t\t\trows_per_page_div.css( 'display', 'block' );\n\t\t\t\t}\n\t\t\t} );\n\n\t\t} );\n\n\t\treturn this;\n\n\t};\n\n\t$.fn.ColumnEditor.defaults = {};\n\t$.fn.ColumnEditor.html_template = `\n\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t
\n\t\t\t\t\n\t\t\t\t\n\t\t\t
\n\t\t
\n\t`;\n\n} )( jQuery );//# sourceURL=[module]\n//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiOTYxMy5qcyIsIm1hcHBpbmdzIjoiO0FBQUE7O0FBRUE7QUFDQSx5QkFBeUI7O0FBRXpCOztBQUVBOztBQUVBOztBQUVBOztBQUVBOztBQUVBOztBQUVBOztBQUVBOztBQUVBOztBQUVBO0FBQ0EsS0FBSyx3Q0FBd0M7QUFDN0MsS0FBSyxvQkFBb0I7QUFDekIsS0FBSyxzQkFBc0I7QUFDM0I7QUFDQTtBQUNBO0FBQ0EsSUFBSTtBQUNKLEtBQUssc0JBQXNCO0FBQzNCLEtBQUssc0JBQXNCO0FBQzNCLEtBQUssc0JBQXNCO0FBQzNCO0FBQ0E7QUFDQTtBQUNBLElBQUk7QUFDSixLQUFLLHdCQUF3QjtBQUM3QixLQUFLLHdCQUF3QjtBQUM3QixLQUFLO0FBQ0w7O0FBRUE7QUFDQTtBQUNBOztBQUVBO0FBQ0E7QUFDQTs7QUFFQTs7QUFFQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxNQUFNO0FBQ047QUFDQTs7QUFFQTs7QUFFQTtBQUNBOztBQUVBOztBQUVBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0E7QUFDQTtBQUNBO0FBQ0EsS0FBSzs7QUFFTDs7QUFFQTtBQUNBLGtFQUFrRTs7QUFFbEU7QUFDQSxNQUFNO0FBQ047O0FBRUE7O0FBRUE7QUFDQTs7QUFFQTs7QUFFQTtBQUNBO0FBQ0E7QUFDQSxLQUFLOztBQUV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