Sindbad~EG File Manager

Current Path : /var/www/html/demo-borrar/course/format/amd/build/local/content/
Upload File :
Current File : /var/www/html/demo-borrar/course/format/amd/build/local/content/section.min.js.map

{"version":3,"file":"section.min.js","sources":["../../../src/local/content/section.js"],"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 * Course section format component.\n *\n * @module     core_courseformat/local/content/section\n * @class      core_courseformat/local/content/section\n * @copyright  2021 Ferran Recio <ferran@moodle.com>\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nimport Header from 'core_courseformat/local/content/section/header';\nimport DndSection from 'core_courseformat/local/courseeditor/dndsection';\n\nexport default class extends DndSection {\n\n    /**\n     * Constructor hook.\n     */\n    create() {\n        // Optional component name for debugging.\n        this.name = 'content_section';\n        // Default query selectors.\n        this.selectors = {\n            SECTION_ITEM: `[data-for='section_title']`,\n            CM: `[data-for=\"cmitem\"]`,\n            SECTIONINFO: `[data-for=\"sectioninfo\"]`,\n        };\n        // Most classes will be loaded later by DndCmItem.\n        this.classes = {\n            LOCKED: 'editinprogress',\n            HASDESCRIPTION: 'description',\n        };\n\n        // We need our id to watch specific events.\n        this.id = this.element.dataset.id;\n    }\n\n    /**\n     * Initial state ready method.\n     *\n     * @param {Object} state the initial state\n     */\n    stateReady(state) {\n        this.configState(state);\n        // Drag and drop is only available for components compatible course formats.\n        if (this.reactive.isEditing && this.reactive.supportComponents) {\n            // Section zero and other formats sections may not have a title to drag.\n            const sectionItem = this.getElement(this.selectors.SECTION_ITEM);\n            if (sectionItem) {\n                // Init the inner dragable element.\n                const headerComponent = new Header({\n                    ...this,\n                    element: sectionItem,\n                    fullregion: this.element,\n                });\n                this.configDragDrop(headerComponent);\n            }\n        }\n    }\n\n    /**\n     * Component watchers.\n     *\n     * @returns {Array} of watchers\n     */\n    getWatchers() {\n        return [\n            {watch: `section[${this.id}]:updated`, handler: this._refreshSection},\n        ];\n    }\n\n    /**\n     * Validate if the drop data can be dropped over the component.\n     *\n     * @param {Object} dropdata the exported drop data.\n     * @returns {boolean}\n     */\n    validateDropData(dropdata) {\n        // If the format uses one section per page sections dropping in the content is ignored.\n       if (dropdata?.type === 'section' && this.reactive.sectionReturn != 0) {\n            return false;\n        }\n        return super.validateDropData(dropdata);\n    }\n\n    /**\n     * Get the last CM element of that section.\n     *\n     * @returns {element|null}\n     */\n    getLastCm() {\n        const cms = this.getElements(this.selectors.CM);\n        // DndUpload may add extra elements so :last-child selector cannot be used.\n        if (!cms || cms.length === 0) {\n            return null;\n        }\n        return cms[cms.length - 1];\n    }\n\n    /**\n     * Update a course index section using the state information.\n     *\n     * @param {object} param\n     * @param {Object} param.element details the update details.\n     */\n    _refreshSection({element}) {\n        // Update classes.\n        this.element.classList.toggle(this.classes.DRAGGING, element.dragging ?? false);\n        this.element.classList.toggle(this.classes.LOCKED, element.locked ?? false);\n        this.locked = element.locked;\n        // The description box classes depends on the section state.\n        const sectioninfo = this.getElement(this.selectors.SECTIONINFO);\n        if (sectioninfo) {\n            sectioninfo.classList.toggle(this.classes.HASDESCRIPTION, element.hasrestrictions);\n        }\n    }\n}\n"],"names":["DndSection","create","name","selectors","SECTION_ITEM","CM","SECTIONINFO","classes","LOCKED","HASDESCRIPTION","id","this","element","dataset","stateReady","state","configState","reactive","isEditing","supportComponents","sectionItem","getElement","headerComponent","Header","fullregion","configDragDrop","getWatchers","watch","handler","_refreshSection","validateDropData","dropdata","type","sectionReturn","super","getLastCm","cms","getElements","length","classList","toggle","DRAGGING","dragging","locked","sectioninfo","hasrestrictions"],"mappings":";;;;;;;;oMA2B6BA,oBAKzBC,cAESC,KAAO,uBAEPC,UAAY,CACbC,0CACAC,yBACAC,6CAGCC,QAAU,CACXC,OAAQ,iBACRC,eAAgB,oBAIfC,GAAKC,KAAKC,QAAQC,QAAQH,GAQnCI,WAAWC,eACFC,YAAYD,OAEbJ,KAAKM,SAASC,WAAaP,KAAKM,SAASE,kBAAmB,OAEtDC,YAAcT,KAAKU,WAAWV,KAAKR,UAAUC,iBAC/CgB,YAAa,OAEPE,gBAAkB,IAAIC,gBAAO,IAC5BZ,KACHC,QAASQ,YACTI,WAAYb,KAAKC,eAEhBa,eAAeH,mBAUhCI,oBACW,CACH,CAACC,wBAAkBhB,KAAKD,gBAAekB,QAASjB,KAAKkB,kBAU7DC,iBAAiBC,iBAES,aAAnBA,MAAAA,gBAAAA,SAAUC,OAAqD,GAA/BrB,KAAKM,SAASgB,gBAG1CC,MAAMJ,iBAAiBC,UAQlCI,kBACUC,IAAMzB,KAAK0B,YAAY1B,KAAKR,UAAUE,WAEvC+B,KAAsB,IAAfA,IAAIE,OAGTF,IAAIA,IAAIE,OAAS,GAFb,KAWfT,gEAAgBjB,QAACA,mBAERA,QAAQ2B,UAAUC,OAAO7B,KAAKJ,QAAQkC,mCAAU7B,QAAQ8B,+DACxD9B,QAAQ2B,UAAUC,OAAO7B,KAAKJ,QAAQC,+BAAQI,QAAQ+B,yDACtDA,OAAS/B,QAAQ+B,aAEhBC,YAAcjC,KAAKU,WAAWV,KAAKR,UAAUG,aAC/CsC,aACAA,YAAYL,UAAUC,OAAO7B,KAAKJ,QAAQE,eAAgBG,QAAQiC"}

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists