{"version":3,"sources":["webpack:///./node_modules/ui-core/components/tables/js/tables.js"],"names":["$body","$window","isMobile","toggleTable","$","window","vPort","init","on","build","control","e","preventDefault","this","closest","hasClass","hide","show","document","buildExpandable","each","$target","find","to_hide","removeClass","elem","slideDown","addClass","slideUp","UX"],"mappings":"8EAAA,IACQA,EACAC,EACAC,EAEAC,EAJAH,EAAQI,EAAE,QACVH,EAAUG,EAAEC,QACZH,GAAW,GAEXC,EAAc,CACdG,MAAO,YAEPC,KAAM,SAANA,OACIJ,EAAYK,GAAGC,QACfN,EAAYO,WAEhBA,QAAS,SAATA,UAEQV,EAAMQ,GAAG,QAAS,uCAAuC,SAAUG,GAC/DA,EAAEC,iBAEER,EAAES,MAAMC,QAAQ,MAAMC,SAAS,gBAC/BZ,EAAYK,GAAGQ,KAAKZ,EAAES,MAAMC,QAAQ,OAEpCX,EAAYK,GAAGS,KAAKb,EAAES,MAAMC,QAAQ,UAKhDb,EAAQO,GAAG,UAAU,WACjBL,EAAYK,GAAGC,WAGnBL,EAAEc,UAAUV,GAAGL,EAAYG,MAAQ,OAAO,WAEtCJ,GAAW,EACXC,EAAYK,GAAGC,WAGnBL,EAAEc,UAAUV,GAAGL,EAAYG,MAAQ,QAAQ,WAEvCJ,GAAW,MAGnBM,GAAI,CACAC,MAAO,SAAPA,QAC0CI,KAAKM,sBAKvCX,GAAGW,gBAAkB,WACff,EAAE,eACRgB,MAAK,WACT,IAAIC,EAAUjB,EAAES,MAAMS,KAAK,MACvBC,EAAUF,EAAQC,KAAK,YAC3BD,EAAQG,YAAY,gBAEhBtB,EACAE,EAAEmB,GAASP,KAAK,GAEhBZ,EAAEmB,GAASN,KAAK,OAI5Bd,EAAYK,GAAGS,KAAO,SAAUQ,GACdA,EAAKH,KAAK,YAEhBI,UAAU,KAClBD,EAAKE,SAAS,iBAElBxB,EAAYK,GAAGQ,KAAO,SAAUS,GACdA,EAAKH,KAAK,YAEhBM,QAAQ,KAChBH,EAAKD,YAAY,iBAGzBK,GAAG1B,YAAcA","file":"js/toggleTable-5706c8cc9dccb48a1a81.js","sourcesContent":["(function () {\n    var $body = $('body'),\n        $window = $(window),\n        isMobile = false; // variable use to determine if responsive mode is on or off\n\n    var toggleTable = {\n        vPort: 'screen-xs',\n\n        init: function () {\n            toggleTable.on.build();\n            toggleTable.control();\n        },\n        control: function () {\n            if (config.enableTableTypeExpandable) {\n                $body.on('click', '.expandable .table__control__button', function (e) {\n                    e.preventDefault();\n\n                    if ($(this).closest('tr').hasClass('js--expanded')) {\n                        toggleTable.on.hide($(this).closest('tr'));\n                    } else {\n                        toggleTable.on.show($(this).closest('tr'));\n                    }\n                });\n            }\n\n            $window.on('resize', function () {\n                toggleTable.on.build();\n            });\n\n            $(document).on(toggleTable.vPort + '-on', function () {\n                // Waiting for custom event that will be triggered by controller.js to activate responsive effects\n                isMobile = true;\n                toggleTable.on.build();\n            });\n\n            $(document).on(toggleTable.vPort + '-off', function () {\n                // Waiting for custom event that will be triggered by controller.js to deactivate responsive effects\n                isMobile = false;\n            });\n        },\n        on: {\n            build: function () {\n                if (config.enableTableTypeExpandable) this.buildExpandable();\n            },\n        },\n    };\n    if (config.enableTableTypeExpandable) {\n        toggleTable.on.buildExpandable = function () {\n            var $toggle = $('.expandable');\n            $toggle.each(function () {\n                var $target = $(this).find('tr');\n                var to_hide = $target.find('.to_hide');\n                $target.removeClass('js--expanded');\n\n                if (isMobile) {\n                    $(to_hide).hide(0);\n                } else {\n                    $(to_hide).show(0);\n                }\n            });\n        };\n        toggleTable.on.show = function (elem) {\n            var $target = elem.find('.to_hide');\n\n            $target.slideDown(200);\n            elem.addClass('js--expanded');\n        };\n        toggleTable.on.hide = function (elem) {\n            var $target = elem.find('.to_hide');\n\n            $target.slideUp(200);\n            elem.removeClass('js--expanded');\n        };\n    }\n    UX.toggleTable = toggleTable; // add to global namespace\n})();\n"],"sourceRoot":""}