Your IP : 192.168.165.1


Current Path : C:/Users/Mahmood/Desktop/moodle/lib/amd/build/
Upload File :
Current File : C:/Users/Mahmood/Desktop/moodle/lib/amd/build/chart_output_htmltable.min.js.map

{"version":3,"sources":["../src/chart_output_htmltable.js"],"names":["define","$","Base","Output","prototype","constructor","apply","arguments","_build","Object","create","_node","empty","append","_makeTable","tbl","c","_chart","node","value","labels","getLabels","hasLabel","length","series","getSeries","seriesLabels","rowCount","getCount","addClass","getTitle","text","forEach","serie","getLabel","attr","rowId","serieId","getValues","update"],"mappings":"AAuBAA,OAAM,+BAAC,CACH,QADG,CAEH,wBAFG,CAAD,CAGH,SAASC,CAAT,CAAYC,CAAZ,CAAkB,CASjB,QAASC,CAAAA,CAAT,EAAkB,CACdD,CAAI,CAACE,SAAL,CAAeC,WAAf,CAA2BC,KAA3B,CAAiC,IAAjC,CAAuCC,SAAvC,EACA,KAAKC,MAAL,EACH,CACDL,CAAM,CAACC,SAAP,CAAmBK,MAAM,CAACC,MAAP,CAAcR,CAAI,CAACE,SAAnB,CAAnB,CAOAD,CAAM,CAACC,SAAP,CAAiBI,MAAjB,CAA0B,UAAW,CACjC,KAAKG,KAAL,CAAWC,KAAX,GACA,KAAKD,KAAL,CAAWE,MAAX,CAAkB,KAAKC,UAAL,EAAlB,CACH,CAHD,CAWAX,CAAM,CAACC,SAAP,CAAiBU,UAAjB,CAA8B,UAAW,CACrC,GAAIC,CAAAA,CAAG,CAAGd,CAAC,CAAC,SAAD,CAAX,CACIe,CAAC,CAAG,KAAKC,MADb,CAEIC,CAFJ,CAGIC,CAHJ,CAIIC,CAAM,CAAGJ,CAAC,CAACK,SAAF,EAJb,CAKIC,CAAQ,CAAmB,CAAhB,CAAAF,CAAM,CAACG,MALtB,CAMIC,CAAM,CAAGR,CAAC,CAACS,SAAF,EANb,CAOIC,CAPJ,CAQIC,CAAQ,CAAGH,CAAM,CAAC,CAAD,CAAN,CAAUI,QAAV,EARf,CAWAb,CAAG,CAACc,QAAJ,CAAa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AAK,CAAGK,CAAM,CAACa,CAAD,CAAN,CAAgBhB,SAAhB,GAA4Be,CAA5B,CACX,CACDlB,CAAI,CAACL,MAAL,CAAYZ,CAAC,CAAC,MAAD,CAAD,CAAU8B,IAAV,CAAeZ,CAAf,CAAZ,CACH,CACDJ,CAAG,CAACF,MAAJ,CAAWK,CAAX,CACH,CAED,MAAOH,CAAAA,CACV,CAvDD,CA0DAZ,CAAM,CAACC,SAAP,CAAiBmC,MAAjB,CAA0B,UAAW,CACjC,KAAK/B,MAAL,EACH,CAFD,CAIA,MAAOL,CAAAA,CAEV,CAlGK,CAAN","sourcesContent":["// This file is part of Moodle - http://moodle.org/\n//\n// Moodle is free software: you can redistribute it and/or modify\n// it under the terms of the GNU General Public License as published by\n// the Free Software Foundation, either version 3 of the License, or\n// (at your option) any later version.\n//\n// Moodle is distributed in the hope that it will be useful,\n// but WITHOUT ANY WARRANTY; without even the implied warranty of\n// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the\n// GNU General Public License for more details.\n//\n// You should have received a copy of the GNU General Public License\n// along with Moodle.  If not, see <http://www.gnu.org/licenses/>.\n\n/**\n * Chart output for HTML table.\n *\n * @package    core\n * @copyright  2016 Frédéric Massart - FMCorz.net\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n * @module     core/chart_output_htmltable\n */\ndefine([\n    'jquery',\n    'core/chart_output_base',\n], function($, Base) {\n\n    /**\n     * Render a chart as an HTML table.\n     *\n     * @class\n     * @extends {module:core/chart_output_base}\n     * @alias module:core/chart_output_htmltable\n     */\n    function Output() {\n        Base.prototype.constructor.apply(this, arguments);\n        this._build();\n    }\n    Output.prototype = Object.create(Base.prototype);\n\n    /**\n     * Attach the table to the document.\n     *\n     * @protected\n     */\n    Output.prototype._build = function() {\n        this._node.empty();\n        this._node.append(this._makeTable());\n    };\n\n    /**\n     * Builds the table node.\n     *\n     * @protected\n     * @return {Jquery}\n     */\n    Output.prototype._makeTable = function() {\n        var tbl = $('<table>'),\n            c = this._chart,\n            node,\n            value,\n            labels = c.getLabels(),\n            hasLabel = labels.length > 0,\n            series = c.getSeries(),\n            seriesLabels,\n            rowCount = series[0].getCount();\n\n        // Identify the table.\n        tbl.addClass('chart-output-htmltable generaltable');\n\n        // Set the caption.\n        if (c.getTitle() !== null) {\n            tbl.append($('<caption>').text(c.getTitle()));\n        }\n\n        // Write the column headers.\n        node = $('<tr>');\n        if (hasLabel) {\n            node.append($('<td>'));\n        }\n        series.forEach(function(serie) {\n            node.append(\n                $('<th>')\n                .text(serie.getLabel())\n                .attr('scope', 'col')\n            );\n        });\n        tbl.append(node);\n\n        // Write rows.\n        for (var rowId = 0; rowId < rowCount; rowId++) {\n            node = $('<tr>');\n            if (labels.length > 0) {\n                node.append(\n                    $('<th>')\n                    .text(labels[rowId])\n                    .attr('scope', 'row')\n                );\n            }\n            for (var serieId = 0; serieId < series.length; serieId++) {\n                value = series[serieId].getValues()[rowId];\n                seriesLabels = series[serieId].getLabels();\n                if (seriesLabels !== null) {\n                    value = series[serieId].getLabels()[rowId];\n                }\n                node.append($('<td>').text(value));\n            }\n            tbl.append(node);\n        }\n\n        return tbl;\n    };\n\n    /** @override */\n    Output.prototype.update = function() {\n        this._build();\n    };\n\n    return Output;\n\n});\n"],"file":"chart_output_htmltable.min.js"}