Your IP : 192.168.165.1


Current Path : C:/xampp/htdocs/moodle/calendar/amd/build/
Upload File :
Current File : C:/xampp/htdocs/moodle/calendar/amd/build/drag_drop_data_store.min.js.map

{"version":3,"sources":["../src/drag_drop_data_store.js"],"names":["define","eventId","durationDays","minTimestart","maxTimestart","minError","maxError","setEventId","id","getEventId","hasEventId","setDurationDays","days","getDurationDays","setMinTimestart","timestamp","getMinTimestart","hasMinTimestart","setMaxTimestart","getMaxTimestart","hasMaxTimestart","setMinError","message","getMinError","setMaxError","getMaxError","clearAll"],"mappings":"AA2BAA,OAAM,sCAAC,EAAD,CAAK,UAAW,IAEdC,CAAAA,CAAO,CAAG,IAFI,CAIdC,CAAY,CAAG,IAJD,CAMdC,CAAY,CAAG,IAND,CAQdC,CAAY,CAAG,IARD,CAUdC,CAAQ,CAAG,IAVG,CAYdC,CAAQ,CAAG,IAZG,CAmBdC,CAAU,CAAG,SAASC,CAAT,CAAa,CAC1BP,CAAO,CAAGO,CACb,CArBiB,CA4BdC,CAAU,CAAG,UAAW,CACxB,MAAOR,CAAAA,CACV,CA9BiB,CAqCdS,CAAU,CAAG,UAAW,CACxB,MAAmB,KAAZ,GAAAT,CACV,CAvCiB,CA8CdU,CAAe,CAAG,SAASC,CAAT,CAAe,CACjCV,CAAY,CAAGU,CAClB,CAhDiB,CAuDdC,CAAe,CAAG,UAAW,CAC7B,MAAOX,CAAAA,CACV,CAzDiB,CAgEdY,CAAe,CAAG,SAASC,CAAT,CAAoB,CACtCZ,CAAY,CAAGY,CAClB,CAlEiB,CAyEdC,CAAe,CAAG,UAAW,CAC7B,MAAOb,CAAAA,CACV,CA3EiB,CAkFdc,CAAe,CAAG,UAAW,CAC7B,MAAwB,KAAjB,GAAAd,CACV,CApFiB,CA2Fde,CAAe,CAAG,SAASH,CAAT,CAAoB,CACtCX,CAAY,CAAGW,CAClB,CA7FiB,CAoGdI,CAAe,CAAG,UAAW,CAC7B,MAAOf,CAAAA,CACV,CAtGiB,CA6GdgB,CAAe,CAAG,UAAW,CAC7B,MAAwB,KAAjB,GAAAhB,CACV,CA/GiB,CAuHdiB,CAAW,CAAG,SAASC,CAAT,CAAkB,CAChCjB,CAAQ,CAAGiB,CACd,CAzHiB,CAgIdC,CAAW,CAAG,UAAW,CACzB,MAAOlB,CAAAA,CACV,CAlIiB,CA0IdmB,CAAW,CAAG,SAASF,CAAT,CAAkB,CAChChB,CAAQ,CAAGgB,CACd,CA5IiB,CAmJdG,CAAW,CAAG,UAAW,CACzB,MAAOnB,CAAAA,CACV,CArJiB,CAmKlB,MAAO,CACHC,UAAU,CAAEA,CADT,CAEHE,UAAU,CAAEA,CAFT,CAGHC,UAAU,CAAEA,CAHT,CAIHC,eAAe,CAAEA,CAJd,CAKHE,eAAe,CAAEA,CALd,CAMHC,eAAe,CAAEA,CANd,CAOHE,eAAe,CAAEA,CAPd,CAQHC,eAAe,CAAEA,CARd,CASHC,eAAe,CAAEA,CATd,CAUHC,eAAe,CAAEA,CAVd,CAWHC,eAAe,CAAEA,CAXd,CAYHC,WAAW,CAAEA,CAZV,CAaHE,WAAW,CAAEA,CAbV,CAcHC,WAAW,CAAEA,CAdV,CAeHC,WAAW,CAAEA,CAfV,CAgBHC,QAAQ,CAzBG,QAAXA,CAAAA,QAAW,EAAW,CACtBnB,CAAU,CAAC,IAAD,CAAV,CACAI,CAAe,CAAC,IAAD,CAAf,CACAG,CAAe,CAAC,IAAD,CAAf,CACAI,CAAe,CAAC,IAAD,CAAf,CACAG,CAAW,CAAC,IAAD,CAAX,CACAG,CAAW,CAAC,IAAD,CACd,CAEM,CAkBV,CArLK,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 * A javascript module to store calendar drag and drop data.\n *\n * This module is unfortunately required because of the limitations\n * of the HTML5 drag and drop API and it's ability to provide data\n * between the different stages of the drag/drop lifecycle.\n *\n * @module     core_calendar/drag_drop_data_store\n * @package    core_calendar\n * @copyright  2017 Ryan Wyllie <ryan@moodle.com>\n * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\ndefine([], function() {\n    /* @var {int|null} eventId The id of the event being dragged */\n    var eventId = null;\n    /* @var {int|null} durationDays How many days the event spans */\n    var durationDays = null;\n    /* @var {int|null} minTimestart The earliest valid timestart */\n    var minTimestart = null;\n    /* @var {int|null} maxTimestart The latest valid tiemstart */\n    var maxTimestart = null;\n    /* @var {string|null} minError Error message for min timestamp violation */\n    var minError = null;\n    /* @var {string|null} maxError Error message for max timestamp violation */\n    var maxError = null;\n\n    /**\n     * Store the id of the event being dragged.\n     *\n     * @param {int} id The event id\n     */\n    var setEventId = function(id) {\n        eventId = id;\n    };\n\n    /**\n     * Get the stored event id.\n     *\n     * @return {int|null}\n     */\n    var getEventId = function() {\n        return eventId;\n    };\n\n    /**\n     * Check if the store has an event id.\n     *\n     * @return {bool}\n     */\n    var hasEventId = function() {\n        return eventId !== null;\n    };\n\n    /**\n     * Store the duration (in days) of the event being dragged.\n     *\n     * @param {int} days Number of days the event spans\n     */\n    var setDurationDays = function(days) {\n        durationDays = days;\n    };\n\n    /**\n     * Get the stored number of days.\n     *\n     * @return {int|null}\n     */\n    var getDurationDays = function() {\n        return durationDays;\n    };\n\n    /**\n     * Store the minimum timestart valid for an event being dragged.\n     *\n     * @param {int} timestamp The unix timstamp\n     */\n    var setMinTimestart = function(timestamp) {\n        minTimestart = timestamp;\n    };\n\n    /**\n     * Get the minimum valid timestart.\n     *\n     * @return {int|null}\n     */\n    var getMinTimestart = function() {\n        return minTimestart;\n    };\n\n    /**\n     * Check if a minimum timestamp is set.\n     *\n     * @return {bool}\n     */\n    var hasMinTimestart = function() {\n        return minTimestart !== null;\n    };\n\n    /**\n     * Store the maximum timestart valid for an event being dragged.\n     *\n     * @param {int} timestamp The unix timstamp\n     */\n    var setMaxTimestart = function(timestamp) {\n        maxTimestart = timestamp;\n    };\n\n    /**\n     * Get the maximum valid timestart.\n     *\n     * @return {int|null}\n     */\n    var getMaxTimestart = function() {\n        return maxTimestart;\n    };\n\n    /**\n     * Check if a maximum timestamp is set.\n     *\n     * @return {bool}\n     */\n    var hasMaxTimestart = function() {\n        return maxTimestart !== null;\n    };\n\n    /**\n     * Store the error string to display if trying to drag an event\n     * earlier than the minimum allowed date.\n     *\n     * @param {string} message The error message\n     */\n    var setMinError = function(message) {\n        minError = message;\n    };\n\n    /**\n     * Get the error message for a minimum time start violation.\n     *\n     * @return {string|null}\n     */\n    var getMinError = function() {\n        return minError;\n    };\n\n    /**\n     * Store the error string to display if trying to drag an event\n     * later than the maximum allowed date.\n     *\n     * @param {string} message The error message\n     */\n    var setMaxError = function(message) {\n        maxError = message;\n    };\n\n    /**\n     * Get the error message for a maximum time start violation.\n     *\n     * @return {string|null}\n     */\n    var getMaxError = function() {\n        return maxError;\n    };\n\n    /**\n     * Reset all of the stored values.\n     */\n    var clearAll = function() {\n        setEventId(null);\n        setDurationDays(null);\n        setMinTimestart(null);\n        setMaxTimestart(null);\n        setMinError(null);\n        setMaxError(null);\n    };\n\n    return {\n        setEventId: setEventId,\n        getEventId: getEventId,\n        hasEventId: hasEventId,\n        setDurationDays: setDurationDays,\n        getDurationDays: getDurationDays,\n        setMinTimestart: setMinTimestart,\n        getMinTimestart: getMinTimestart,\n        hasMinTimestart: hasMinTimestart,\n        setMaxTimestart: setMaxTimestart,\n        getMaxTimestart: getMaxTimestart,\n        hasMaxTimestart: hasMaxTimestart,\n        setMinError: setMinError,\n        getMinError: getMinError,\n        setMaxError: setMaxError,\n        getMaxError: getMaxError,\n        clearAll: clearAll\n    };\n});\n"],"file":"drag_drop_data_store.min.js"}