MDL-68833 theme_boost: Add ./pending event checks back
[moodle.git] / theme / boost / amd / build / pending.min.js.map
CommitLineData
721c29ff 1{"version":3,"sources":["../src/pending.js"],"names":["moduleTransitions","alert","start","end","carousel","collapse","dropdown","modal","popover","tab","toast","tooltip","Object","entries","forEach","key","pairs","pair","eventStart","eventEnd","document","body","on","M","util","js_pending","js_complete"],"mappings":"gJAuBA,uD,+9BACMA,CAAAA,CAAiB,CAAG,CACtBC,KAAK,CAAE,CAEH,CACIC,KAAK,CAAE,OADX,CAEIC,GAAG,CAAE,QAFT,CAFG,CADe,CAStBC,QAAQ,CAAE,CACN,CACIF,KAAK,CAAE,OADX,CAEIC,GAAG,CAAE,MAFT,CADM,CATY,CAgBtBE,QAAQ,CAAE,CACN,CACIH,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,QAFT,CADM,CAKN,CACID,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,OAFT,CALM,CAhBY,CA2BtBG,QAAQ,CAAE,CACN,CACIJ,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,QAFT,CADM,CAKN,CACID,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,OAFT,CALM,CA3BY,CAsCtBI,KAAK,CAAE,CACH,CACIL,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,QAFT,CADG,CAKH,CACID,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,OAFT,CALG,CAtCe,CAiDtBK,OAAO,CAAE,CACL,CACIN,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,QAFT,CADK,CAKL,CACID,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,OAFT,CALK,CAjDa,CA4DtBM,GAAG,CAAE,CACD,CACIP,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,QAFT,CADC,CAKD,CACID,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,OAFT,CALC,CA5DiB,CAuEtBO,KAAK,CAAE,CACH,CACIR,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,QAFT,CADG,CAKH,CACID,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,OAFT,CALG,CAvEe,CAkFtBQ,OAAO,CAAE,CACL,CACIT,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,QAFT,CADK,CAKL,CACID,KAAK,CAAE,MADX,CAEIC,GAAG,CAAE,OAFT,CALK,CAlFa,C,WA8FX,UAAM,CACjBS,MAAM,CAACC,OAAP,CAAeb,CAAf,EAAkCc,OAAlC,CAA0C,WAAkB,cAAhBC,CAAgB,MAAXC,CAAW,MACxDA,CAAK,CAACF,OAAN,CAAc,SAAAG,CAAI,CAAI,IACZC,CAAAA,CAAU,WAAMD,CAAI,CAACf,KAAX,gBAAuBa,CAAvB,CADE,CAEZI,CAAQ,WAAMF,CAAI,CAACd,GAAX,gBAAqBY,CAArB,CAFI,CAGlB,cAAOK,QAAQ,CAACC,IAAhB,EAAsBC,EAAtB,CAAyBJ,CAAzB,CAAqC,UAAM,CACvCK,CAAC,CAACC,IAAF,CAAOC,UAAP,CAAkBN,CAAlB,CACH,CAFD,EAIA,cAAOC,QAAQ,CAACC,IAAhB,EAAsBC,EAAtB,CAAyBH,CAAzB,CAAmC,UAAM,CACrCI,CAAC,CAACC,IAAF,CAAOE,WAAP,CAAmBP,CAAnB,CACH,CAFD,CAGH,CAVD,CAWH,CAZD,CAaH,C","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 * Add Pending JS checks to stock Bootstrap transitions.\n *\n * @module theme_boost/pending\n * @copyright 2019 Andrew Nicols <andrew@nicols.co.uk>\n * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later\n */\n\nimport jQuery from 'jquery';\nconst moduleTransitions = {\n alert: [\n // Alert.\n {\n start: 'close',\n end: 'closed',\n },\n ],\n\n carousel: [\n {\n start: 'slide',\n end: 'slid',\n },\n ],\n\n collapse: [\n {\n start: 'hide',\n end: 'hidden',\n },\n {\n start: 'show',\n end: 'shown',\n },\n ],\n\n dropdown: [\n {\n start: 'hide',\n end: 'hidden',\n },\n {\n start: 'show',\n end: 'shown',\n },\n ],\n\n modal: [\n {\n start: 'hide',\n end: 'hidden',\n },\n {\n start: 'show',\n end: 'shown',\n },\n ],\n\n popover: [\n {\n start: 'hide',\n end: 'hidden',\n },\n {\n start: 'show',\n end: 'shown',\n },\n ],\n\n tab: [\n {\n start: 'hide',\n end: 'hidden',\n },\n {\n start: 'show',\n end: 'shown',\n },\n ],\n\n toast: [\n {\n start: 'hide',\n end: 'hidden',\n },\n {\n start: 'show',\n end: 'shown',\n },\n ],\n\n tooltip: [\n {\n start: 'hide',\n end: 'hidden',\n },\n {\n start: 'show',\n end: 'shown',\n },\n ],\n};\n\nexport default () => {\n Object.entries(moduleTransitions).forEach(([key, pairs]) => {\n pairs.forEach(pair => {\n const eventStart = `${pair.start}.bs.${key}`;\n const eventEnd = `${pair.end}.bs.${key}`;\n jQuery(document.body).on(eventStart, () => {\n M.util.js_pending(eventEnd);\n });\n\n jQuery(document.body).on(eventEnd, () => {\n M.util.js_complete(eventEnd);\n });\n });\n });\n};\n"],"file":"pending.min.js"}