From 841c1e180e13f7993e1d217c8f01175c6f2ea6d7 Mon Sep 17 00:00:00 2001 From: Clark Winkelmann Date: Sat, 29 May 2021 09:09:33 +0200 Subject: [PATCH] Update for Flarum 1.0 (#35) * Update for Flarum 1.0 * Apply fixes from StyleCI --- composer.json | 2 +- extend.php | 3 +- js/dist/admin.js | 2 +- js/dist/admin.js.map | 2 +- js/dist/forum.js | 2 +- js/dist/forum.js.map | 2 +- js/package-lock.json | 760 ++++++++++++++--------- js/package.json | 4 +- js/src/admin/components/PagesListItem.js | 2 +- resources/locale/en.yml | 1 + src/Content/Page.php | 28 +- src/Providers/SearchServiceProvider.php | 29 - 12 files changed, 491 insertions(+), 346 deletions(-) delete mode 100644 src/Providers/SearchServiceProvider.php diff --git a/composer.json b/composer.json index 45bd314..78c937a 100644 --- a/composer.json +++ b/composer.json @@ -7,7 +7,7 @@ "type": "flarum-extension", "license": "MIT", "require": { - "flarum/core": "^0.1.0-beta.16", + "flarum/core": "^1.0", "ext-json": "*" }, "support": { diff --git a/extend.php b/extend.php index ab03d5e..788a4b9 100644 --- a/extend.php +++ b/extend.php @@ -48,6 +48,5 @@ ->setFullTextGambit(Search\NoOpGambit::class), (new Extend\ServiceProvider()) - ->register(Providers\PageServiceProvider::class) - ->register(Providers\SearchServiceProvider::class), + ->register(Providers\PageServiceProvider::class), ]; diff --git a/js/dist/admin.js b/js/dist/admin.js index b3b1ece..e05f365 100644 --- a/js/dist/admin.js +++ b/js/dist/admin.js @@ -1,2 +1,2 @@ -module.exports=function(t){var e={};function a(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,a),o.l=!0,o.exports}return a.m=t,a.c=e,a.d=function(t,e,n){a.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},a.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},a.t=function(t,e){if(1&e&&(t=a(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(a.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)a.d(n,o,function(e){return t[e]}.bind(null,o));return n},a.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return a.d(e,"a",e),e},a.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},a.p="",a(a.s=24)}([function(t,e){t.exports=flarum.core.compat["common/Model"]},function(t,e,a){"use strict";function n(t,e){return(n=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function o(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,n(t,e)}a.d(e,"a",(function(){return o}))},function(t,e){t.exports=flarum.core.compat["common/components/Button"]},function(t,e){t.exports=flarum.core.compat["common/Component"]},function(t,e){t.exports=flarum.core.compat["common/utils/ItemList"]},function(t,e){t.exports=flarum.core.compat["common/utils/string"]},function(t,e){t.exports=flarum.core.compat.app},function(t,e){t.exports=flarum.core.compat["common/components/Badge"]},function(t,e){t.exports=flarum.core.compat["common/utils/Stream"]},function(t,e){t.exports=flarum.core.compat["common/components/LoadingIndicator"]},function(t,e){t.exports=flarum.core.compat["common/helpers/listItems"]},function(t,e){t.exports=flarum.core.compat["common/utils/computed"]},function(t,e,a){"use strict";function n(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}a.d(e,"a",(function(){return b}));var o=a(1);function i(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}var s=a(6),r=a.n(s),l=a(0),c=a.n(l),p=a(11),u=a.n(p),m=a(5),d=a(4),f=a.n(d),g=a(7),h=a.n(g),b=function(t){function e(){for(var e,a=arguments.length,o=new Array(a),s=0;s\n
\n
\n \n {\n this.pageTitle(e.target.value);\n this.slug(slug(e.target.value));\n }}\n />\n
\n\n
\n \n {\n this.slug(e.target.value);\n }}\n />\n
\n\n
\n \n \n
\n\n
\n
\n \n
\n
\n\n
\n
\n \n
\n
\n\n
\n
\n \n
\n
\n\n
\n {Button.component(\n {\n type: 'submit',\n className: 'Button Button--primary EditPageModal-save',\n loading: this.loading,\n },\n app.translator.trans('fof-pages.admin.edit_page.submit_button')\n )}\n {this.page.exists ? (\n \n ) : (\n ''\n )}\n
\n
\n \n );\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n this.page\n .save(\n {\n title: this.pageTitle(),\n slug: this.slug(),\n content: this.pageContent(),\n isHidden: this.isHidden(),\n isRestricted: this.isRestricted(),\n isHtml: this.isHtml(),\n },\n { errorHandler: this.onerror.bind(this) }\n )\n .then(this.hideAndRefresh.bind(this))\n .catch(() => {\n this.loading = false;\n m.redraw();\n });\n }\n\n hideAndRefresh() {\n this.hide();\n setRouteWithForcedRefresh(app.route('extension', { id: 'fof-pages' }));\n }\n\n delete() {\n this.loading = true;\n\n if (confirm(app.translator.trans('fof-pages.admin.edit_page.delete_page_confirmation'))) {\n this.page\n .delete()\n .then(this.hideAndRefresh.bind(this))\n .catch(() => {\n this.loading = false;\n m.redraw();\n });\n }\n }\n}\n","import Button from 'flarum/common/components/Button';\nimport Component from 'flarum/common/Component';\nimport saveSettings from 'flarum/admin/utils/saveSettings';\nimport listItems from 'flarum/common/helpers/listItems';\nimport setRouteWithForcedRefresh from 'flarum/common/utils/setRouteWithForcedRefresh';\n\nimport EditPageModal from './EditPageModal';\n\n/**\n * ### Props\n *\n * - `page`\n */\nexport default class PagesListItem extends Component {\n view() {\n const page = this.attrs.page;\n const url = app.forum.attribute('baseUrl') + '/p/' + page.id() + '-' + page.slug();\n const badges = page.badges().toArray();\n return (\n \n \n {page.title()}\n {badges.length ? : null}\n \n \n
\n {Button.component({\n className: 'Button Button--page-edit',\n icon: 'fas fa-pencil-alt',\n onclick: () => app.modal.show(EditPageModal, { page }),\n })}\n {Button.component({\n className: 'Button Button--page-edit',\n icon: 'fas fa-home',\n onclick: this.setAsHomePage.bind(this),\n disabled: app.data.settings['pages_home'] === page.id() && app.data.settings['default_route'] === '/pages/home',\n })}\n {Button.component({\n className: 'Button Button--page-view',\n icon: 'fas fa-eye fa-sm',\n onclick: () => window.open(url, '_blank'),\n })}\n {Button.component({\n className: 'Button Button--danger Button--page-delete',\n icon: 'fas fa-times',\n onclick: this.delete.bind(this),\n })}\n
\n \n \n );\n }\n\n setAsHomePage() {\n app.alerts.dismiss(this.successAlert);\n if (confirm(app.translator.trans('fof-pages.admin.edit_page.set_as_home_page_confirmation'))) {\n const page = this.attrs.page;\n saveSettings({\n default_route: '/pages/home',\n pages_home: page.id(),\n })\n .then(() => {\n app.alerts.show({ type: 'success' }, app.translator.trans('core.admin.basics.saved_message'));\n })\n .catch(() => {})\n .then(() => {\n this.loading = false;\n m.redraw();\n });\n }\n }\n\n delete() {\n if (confirm(app.translator.trans('fof-pages.admin.edit_page.delete_page_confirmation'))) {\n const page = this.attrs.page;\n page.delete().then(() => {\n setRouteWithForcedRefresh(app.route('extension', { id: 'fof-pages' }));\n });\n }\n }\n}\n","import Component from 'flarum/common/Component';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Placeholder from 'flarum/common/components/Placeholder';\nimport Button from 'flarum/common/components/Button';\n\nimport PagesListItem from './PagesListItem';\n\n/**\n * The `PagesList` component displays a list of Pages.\n *\n */\nexport default class PagesList extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n /**\n * Whether or not pages results are loading.\n *\n * @type {Boolean}\n */\n this.loading = true;\n\n /**\n * The pages in the pages list.\n *\n * @type {Page}\n */\n this.pages = [];\n\n /**\n * Current page number.\n *\n * @type {Integer}\n */\n this.page = 0;\n\n /**\n * The number of activity items to load per request.\n *\n * @type {Integer}\n */\n this.loadLimit = 20;\n\n this.refresh();\n }\n\n view() {\n if (this.loading) {\n return
{LoadingIndicator.component()}
;\n }\n\n if (this.pages.length === 0) {\n const text = app.translator.trans('fof-pages.admin.pages_list.empty_text');\n return Placeholder.component({ text });\n }\n\n let next, prev;\n\n if (this.nextResults === true) {\n next = Button.component({\n className: 'Button Button--PageList-next',\n icon: 'fas fa-angle-right',\n onclick: this.loadNext.bind(this),\n });\n }\n\n if (this.prevResults === true) {\n prev = Button.component({\n className: 'Button Button--PageList-prev',\n icon: 'fas fa-angle-left',\n onclick: this.loadPrev.bind(this),\n });\n }\n\n return (\n
\n \n \n \n \n \n \n \n {this.pages.map((page) => {\n return PagesListItem.component({ page });\n })}\n \n
{app.translator.trans('fof-pages.admin.pages_list.title')}\n
\n
\n {next}\n {prev}\n
\n
\n );\n }\n\n /**\n * @public\n */\n refresh(clear = true) {\n if (clear) {\n this.loading = true;\n this.pages = [];\n }\n\n return this.loadResults().then(this.parseResults.bind(this));\n }\n\n /**\n * Load a new page of Pages results.\n *\n * @param {Integer} page number.\n * @return {Promise}\n */\n loadResults() {\n const offset = this.page * this.loadLimit;\n return app.store.find('pages', {\n page: { offset, limit: this.loadLimit },\n sort: '-time',\n });\n }\n\n /**\n * Load the next page of results.\n *\n * @public\n */\n loadNext() {\n if (this.nextResults === true) {\n this.page++;\n this.refresh();\n }\n }\n\n /**\n * Load the previous page of results.\n *\n * @public\n */\n loadPrev() {\n if (this.prevResults === true) {\n this.page--;\n this.refresh();\n }\n }\n\n /**\n * Parse results and append them to the page list.\n *\n * @param {Page[]} results\n * @return {Page[]}\n */\n parseResults(results) {\n [].push.apply(this.pages, results);\n\n this.loading = false;\n\n this.nextResults = !!results.payload.links.next;\n this.prevResults = !!results.payload.links.prev;\n\n m.redraw();\n return results;\n }\n}\n","import ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport Button from 'flarum/common/components/Button';\n\nimport EditPageModal from './EditPageModal';\nimport PagesList from './PagesList';\n\nexport default class PagesPage extends ExtensionPage {\n content() {\n return (\n
\n
\n
\n {Button.component(\n {\n className: 'Button Button--primary',\n icon: 'fas fa-plus',\n onclick: () => app.modal.show(EditPageModal),\n },\n app.translator.trans('fof-pages.admin.pages.create_button')\n )}\n
\n
\n
\n
{PagesList.component()}
\n
\n
\n );\n }\n}\n","import Page from '../common/models/Page';\nimport PagesPage from './components/PagesPage';\nimport addPageHomePageOption from './addPageHomePageOption';\n\napp.initializers.add('fof-pages', (app) => {\n app.store.models.pages = Page;\n\n app.extensionData\n .for('fof-pages')\n .registerPage(PagesPage)\n .registerPermission(\n {\n icon: 'fas fa-file-alt',\n label: app.translator.trans('fof-pages.admin.permissions.restricted'),\n permission: 'fof-pages.viewRestricted',\n },\n 'view'\n );\n\n addPageHomePageOption();\n});\n","import { extend } from 'flarum/common/extend';\nimport BasicsPage from 'flarum/admin/components/BasicsPage';\n\nexport default function () {\n extend(BasicsPage.prototype, 'homePageItems', (items) => {\n items.add('fof-pages', {\n path: '/pages/home',\n label: 'FriendsOfFlarum Pages',\n });\n });\n}\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://@fof/pages/webpack/bootstrap","webpack://@fof/pages/external \"flarum.core.compat['common/Model']\"","webpack://@fof/pages/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/pages/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/pages/external \"flarum.core.compat['common/components/Button']\"","webpack://@fof/pages/external \"flarum.core.compat['common/Component']\"","webpack://@fof/pages/external \"flarum.core.compat['common/utils/ItemList']\"","webpack://@fof/pages/external \"flarum.core.compat['common/utils/string']\"","webpack://@fof/pages/external \"flarum.core.compat['app']\"","webpack://@fof/pages/external \"flarum.core.compat['common/components/Badge']\"","webpack://@fof/pages/external \"flarum.core.compat['common/utils/Stream']\"","webpack://@fof/pages/external \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@fof/pages/external \"flarum.core.compat['common/helpers/listItems']\"","webpack://@fof/pages/./src/common/models/Page.js","webpack://@fof/pages/external \"flarum.core.compat['common/utils/computed']\"","webpack://@fof/pages/external \"flarum.core.compat['common/utils/withAttr']\"","webpack://@fof/pages/external \"flarum.core.compat['common/utils/setRouteWithForcedRefresh']\"","webpack://@fof/pages/external \"flarum.core.compat['admin/components/ExtensionPage']\"","webpack://@fof/pages/external \"flarum.core.compat['common/components/Modal']\"","webpack://@fof/pages/external \"flarum.core.compat['common/components/Placeholder']\"","webpack://@fof/pages/external \"flarum.core.compat['admin/utils/saveSettings']\"","webpack://@fof/pages/external \"flarum.core.compat['common/extend']\"","webpack://@fof/pages/external \"flarum.core.compat['admin/components/BasicsPage']\"","webpack://@fof/pages/./src/admin/components/EditPageModal.js","webpack://@fof/pages/./src/admin/components/PagesListItem.js","webpack://@fof/pages/./src/admin/components/PagesList.js","webpack://@fof/pages/./src/admin/components/PagesPage.js","webpack://@fof/pages/./src/admin/index.js","webpack://@fof/pages/./src/admin/addPageHomePageOption.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","_setPrototypeOf","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","constructor","Page","title","Model","attribute","time","transformDate","editTime","content","contentHtml","contentPlain","computed","getPlainContent","slug","isHidden","isRestricted","isHtml","badges","items","ItemList","this","add","Badge","component","type","icon","label","app","translator","trans","EditPageModal","oninit","vnode","page","attrs","store","createRecord","pageTitle","Stream","pageContent","className","placeholder","oninput","e","target","rows","onchange","withAttr","checked","Button","loading","exists","onclick","onsubmit","preventDefault","save","errorHandler","onerror","then","hideAndRefresh","redraw","hide","setRouteWithForcedRefresh","route","id","confirm","Modal","PagesListItem","view","url","forum","toArray","length","listItems","modal","show","setAsHomePage","disabled","data","settings","window","open","alerts","dismiss","successAlert","saveSettings","default_route","pages_home","Component","PagesList","pages","loadLimit","refresh","LoadingIndicator","text","Placeholder","next","prev","nextResults","loadNext","prevResults","loadPrev","map","clear","loadResults","parseResults","offset","find","limit","sort","results","push","apply","payload","links","PagesPage","ExtensionPage","initializers","models","extensionData","registerPage","registerPermission","permission","extend","BasicsPage","path"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,IAC9I,OAAOF,GAIRzB,EAAoB6B,EAAI,SAAS1B,GAChC,IAAIS,EAAST,GAAUA,EAAOqB,WAC7B,WAAwB,OA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B,SAAU,EAEf9B,KAAK8E,cAAgBY,EAAQG,QAAQC,MAAMlB,KAC3C5E,KAAKgF,cAAgBU,EAAQG,QAAQC,MAAMjB,KAE3CtI,EAAEiG,SACKkD,G,GAtJwBtB,KCLlB2B,E,kGACjB3G,QAAA,WACI,OACI,SAAKgC,UAAU,aACX,SAAKA,UAAU,oBACX,SAAKA,UAAU,aACVS,IAAO1B,UACJ,CACIiB,UAAW,yBACXf,KAAM,cACN2B,QAAS,kBAAMzB,IAAI+C,MAAMC,KAAK7C,KAElCH,IAAIC,WAAWC,MAAM,0CAIjC,SAAKW,UAAU,kBACX,SAAKA,UAAU,aAAaiD,EAAUlE,gB,GAjBnB6F,K,yBCFvCzF,IAAI0F,aAAahG,IAAI,aAAa,SAACM,GAC/BA,EAAIQ,MAAMmF,OAAO5B,MAAQzF,IAEzB0B,EAAI4F,cAAJ,IACS,aACJC,aAAaL,GACbM,mBACG,CACIhG,KAAM,kBACNC,MAAOC,EAAIC,WAAWC,MAAM,0CAC5B6F,WAAY,4BAEhB,QCZRC,iBAAOC,IAAWzI,UAAW,iBAAiB,SAAC+B,GAC3CA,EAAMG,IAAI,YAAa,CACnBwG,KAAM,cACNnG,MAAO","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 24);\n","module.exports = flarum.core.compat['common/Model'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","module.exports = flarum.core.compat['common/components/Button'];","module.exports = flarum.core.compat['common/Component'];","module.exports = flarum.core.compat['common/utils/ItemList'];","module.exports = flarum.core.compat['common/utils/string'];","module.exports = flarum.core.compat['app'];","module.exports = flarum.core.compat['common/components/Badge'];","module.exports = flarum.core.compat['common/utils/Stream'];","module.exports = flarum.core.compat['common/components/LoadingIndicator'];","module.exports = flarum.core.compat['common/helpers/listItems'];","import app from 'flarum/app';\nimport Model from 'flarum/common/Model';\nimport computed from 'flarum/common/utils/computed';\nimport { getPlainContent } from 'flarum/common/utils/string';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Badge from 'flarum/common/components/Badge';\n\nexport default class Page extends Model {\n title = Model.attribute('title');\n time = Model.attribute('time', Model.transformDate);\n editTime = Model.attribute('editTime', Model.transformDate);\n content = Model.attribute('content');\n contentHtml = Model.attribute('contentHtml');\n contentPlain = computed('contentHtml', getPlainContent);\n slug = Model.attribute('slug');\n isHidden = Model.attribute('isHidden');\n isRestricted = Model.attribute('isRestricted');\n isHtml = Model.attribute('isHtml');\n\n badges() {\n const items = new ItemList();\n\n if (this.isHidden()) {\n items.add(\n 'hidden',\n Badge.component({\n type: 'hidden',\n icon: 'fas fa-trash',\n label: app.translator.trans('fof-pages.admin.badges.hidden'),\n })\n );\n }\n\n if (this.isRestricted()) {\n items.add(\n 'restricted',\n Badge.component({\n type: 'restricted',\n icon: 'fas fa-user-shield',\n label: app.translator.trans('fof-pages.admin.badges.restricted'),\n })\n );\n }\n\n return items;\n }\n}\n","module.exports = flarum.core.compat['common/utils/computed'];","module.exports = flarum.core.compat['common/utils/withAttr'];","module.exports = flarum.core.compat['common/utils/setRouteWithForcedRefresh'];","module.exports = flarum.core.compat['admin/components/ExtensionPage'];","module.exports = flarum.core.compat['common/components/Modal'];","module.exports = flarum.core.compat['common/components/Placeholder'];","module.exports = flarum.core.compat['admin/utils/saveSettings'];","module.exports = flarum.core.compat['common/extend'];","module.exports = flarum.core.compat['admin/components/BasicsPage'];","import Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport { slug } from 'flarum/common/utils/string';\nimport Stream from 'flarum/common/utils/Stream';\nimport withAttr from 'flarum/common/utils/withAttr';\nimport setRouteWithForcedRefresh from 'flarum/common/utils/setRouteWithForcedRefresh';\n\n/**\n * The `EditPageModal` component shows a modal dialog which allows the user\n * to create or edit a page.\n */\nexport default class EditPageModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.page = this.attrs.page || app.store.createRecord('pages');\n\n this.pageTitle = Stream(this.page.title() || '');\n this.slug = Stream(this.page.slug() || '');\n this.pageContent = Stream(this.page.content() || '');\n this.isHidden = Stream(this.page.isHidden());\n this.isRestricted = Stream(this.page.isRestricted());\n this.isHtml = Stream(this.page.isHtml());\n }\n\n className() {\n return 'EditPageModal Modal--large';\n }\n\n title() {\n const title = this.pageTitle();\n return title ? title : app.translator.trans('fof-pages.admin.edit_page.title');\n }\n\n content() {\n return (\n
\n
\n
\n \n {\n this.pageTitle(e.target.value);\n this.slug(slug(e.target.value));\n }}\n />\n
\n\n
\n \n {\n this.slug(e.target.value);\n }}\n />\n
\n\n
\n \n \n
\n\n
\n
\n \n
\n
\n\n
\n
\n \n
\n
\n\n
\n
\n \n
\n
\n\n
\n {Button.component(\n {\n type: 'submit',\n className: 'Button Button--primary EditPageModal-save',\n loading: this.loading,\n },\n app.translator.trans('fof-pages.admin.edit_page.submit_button')\n )}\n {this.page.exists ? (\n \n ) : (\n ''\n )}\n
\n
\n
\n );\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n this.loading = true;\n\n this.page\n .save(\n {\n title: this.pageTitle(),\n slug: this.slug(),\n content: this.pageContent(),\n isHidden: this.isHidden(),\n isRestricted: this.isRestricted(),\n isHtml: this.isHtml(),\n },\n { errorHandler: this.onerror.bind(this) }\n )\n .then(this.hideAndRefresh.bind(this))\n .catch(() => {\n this.loading = false;\n m.redraw();\n });\n }\n\n hideAndRefresh() {\n this.hide();\n setRouteWithForcedRefresh(app.route('extension', { id: 'fof-pages' }));\n }\n\n delete() {\n this.loading = true;\n\n if (confirm(app.translator.trans('fof-pages.admin.edit_page.delete_page_confirmation'))) {\n this.page\n .delete()\n .then(this.hideAndRefresh.bind(this))\n .catch(() => {\n this.loading = false;\n m.redraw();\n });\n }\n }\n}\n","import Button from 'flarum/common/components/Button';\nimport Component from 'flarum/common/Component';\nimport saveSettings from 'flarum/admin/utils/saveSettings';\nimport listItems from 'flarum/common/helpers/listItems';\nimport setRouteWithForcedRefresh from 'flarum/common/utils/setRouteWithForcedRefresh';\n\nimport EditPageModal from './EditPageModal';\n\n/**\n * ### Props\n *\n * - `page`\n */\nexport default class PagesListItem extends Component {\n view() {\n const page = this.attrs.page;\n const url = app.forum.attribute('baseUrl') + '/p/' + page.id() + '-' + page.slug();\n const badges = page.badges().toArray();\n return (\n \n \n {page.title()}\n {badges.length ? : null}\n \n \n
\n {Button.component({\n className: 'Button Button--page-edit',\n icon: 'fas fa-pencil-alt',\n onclick: () => app.modal.show(EditPageModal, { page }),\n })}\n {Button.component({\n className: 'Button Button--page-edit',\n icon: 'fas fa-home',\n onclick: this.setAsHomePage.bind(this),\n disabled: app.data.settings['pages_home'] === page.id() && app.data.settings['default_route'] === '/pages/home',\n })}\n {Button.component({\n className: 'Button Button--page-view',\n icon: 'fas fa-eye fa-sm',\n onclick: () => window.open(url, '_blank'),\n })}\n {Button.component({\n className: 'Button Button--danger Button--page-delete',\n icon: 'fas fa-times',\n onclick: this.delete.bind(this),\n })}\n
\n \n \n );\n }\n\n setAsHomePage() {\n app.alerts.dismiss(this.successAlert);\n if (confirm(app.translator.trans('fof-pages.admin.edit_page.set_as_home_page_confirmation'))) {\n const page = this.attrs.page;\n saveSettings({\n default_route: '/pages/home',\n pages_home: page.id(),\n })\n .then(() => {\n app.alerts.show({ type: 'success' }, app.translator.trans('fof-pages.admin.edit_page.set_as_home_page_done'));\n })\n .catch(() => {})\n .then(() => {\n this.loading = false;\n m.redraw();\n });\n }\n }\n\n delete() {\n if (confirm(app.translator.trans('fof-pages.admin.edit_page.delete_page_confirmation'))) {\n const page = this.attrs.page;\n page.delete().then(() => {\n setRouteWithForcedRefresh(app.route('extension', { id: 'fof-pages' }));\n });\n }\n }\n}\n","import Component from 'flarum/common/Component';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Placeholder from 'flarum/common/components/Placeholder';\nimport Button from 'flarum/common/components/Button';\n\nimport PagesListItem from './PagesListItem';\n\n/**\n * The `PagesList` component displays a list of Pages.\n *\n */\nexport default class PagesList extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n /**\n * Whether or not pages results are loading.\n *\n * @type {Boolean}\n */\n this.loading = true;\n\n /**\n * The pages in the pages list.\n *\n * @type {Page}\n */\n this.pages = [];\n\n /**\n * Current page number.\n *\n * @type {Integer}\n */\n this.page = 0;\n\n /**\n * The number of activity items to load per request.\n *\n * @type {Integer}\n */\n this.loadLimit = 20;\n\n this.refresh();\n }\n\n view() {\n if (this.loading) {\n return
{LoadingIndicator.component()}
;\n }\n\n if (this.pages.length === 0) {\n const text = app.translator.trans('fof-pages.admin.pages_list.empty_text');\n return Placeholder.component({ text });\n }\n\n let next, prev;\n\n if (this.nextResults === true) {\n next = Button.component({\n className: 'Button Button--PageList-next',\n icon: 'fas fa-angle-right',\n onclick: this.loadNext.bind(this),\n });\n }\n\n if (this.prevResults === true) {\n prev = Button.component({\n className: 'Button Button--PageList-prev',\n icon: 'fas fa-angle-left',\n onclick: this.loadPrev.bind(this),\n });\n }\n\n return (\n
\n \n \n \n \n \n \n \n {this.pages.map((page) => {\n return PagesListItem.component({ page });\n })}\n \n
{app.translator.trans('fof-pages.admin.pages_list.title')}\n
\n
\n {next}\n {prev}\n
\n
\n );\n }\n\n /**\n * @public\n */\n refresh(clear = true) {\n if (clear) {\n this.loading = true;\n this.pages = [];\n }\n\n return this.loadResults().then(this.parseResults.bind(this));\n }\n\n /**\n * Load a new page of Pages results.\n *\n * @param {Integer} page number.\n * @return {Promise}\n */\n loadResults() {\n const offset = this.page * this.loadLimit;\n return app.store.find('pages', {\n page: { offset, limit: this.loadLimit },\n sort: '-time',\n });\n }\n\n /**\n * Load the next page of results.\n *\n * @public\n */\n loadNext() {\n if (this.nextResults === true) {\n this.page++;\n this.refresh();\n }\n }\n\n /**\n * Load the previous page of results.\n *\n * @public\n */\n loadPrev() {\n if (this.prevResults === true) {\n this.page--;\n this.refresh();\n }\n }\n\n /**\n * Parse results and append them to the page list.\n *\n * @param {Page[]} results\n * @return {Page[]}\n */\n parseResults(results) {\n [].push.apply(this.pages, results);\n\n this.loading = false;\n\n this.nextResults = !!results.payload.links.next;\n this.prevResults = !!results.payload.links.prev;\n\n m.redraw();\n return results;\n }\n}\n","import ExtensionPage from 'flarum/admin/components/ExtensionPage';\nimport Button from 'flarum/common/components/Button';\n\nimport EditPageModal from './EditPageModal';\nimport PagesList from './PagesList';\n\nexport default class PagesPage extends ExtensionPage {\n content() {\n return (\n
\n
\n
\n {Button.component(\n {\n className: 'Button Button--primary',\n icon: 'fas fa-plus',\n onclick: () => app.modal.show(EditPageModal),\n },\n app.translator.trans('fof-pages.admin.pages.create_button')\n )}\n
\n
\n
\n
{PagesList.component()}
\n
\n
\n );\n }\n}\n","import Page from '../common/models/Page';\nimport PagesPage from './components/PagesPage';\nimport addPageHomePageOption from './addPageHomePageOption';\n\napp.initializers.add('fof-pages', (app) => {\n app.store.models.pages = Page;\n\n app.extensionData\n .for('fof-pages')\n .registerPage(PagesPage)\n .registerPermission(\n {\n icon: 'fas fa-file-alt',\n label: app.translator.trans('fof-pages.admin.permissions.restricted'),\n permission: 'fof-pages.viewRestricted',\n },\n 'view'\n );\n\n addPageHomePageOption();\n});\n","import { extend } from 'flarum/common/extend';\nimport BasicsPage from 'flarum/admin/components/BasicsPage';\n\nexport default function () {\n extend(BasicsPage.prototype, 'homePageItems', (items) => {\n items.add('fof-pages', {\n path: '/pages/home',\n label: 'FriendsOfFlarum Pages',\n });\n });\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/js/dist/forum.js b/js/dist/forum.js index 77ed484..b6d3249 100644 --- a/js/dist/forum.js +++ b/js/dist/forum.js @@ -1,2 +1,2 @@ -module.exports=function(t){var e={};function n(o){if(e[o])return e[o].exports;var r=e[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=e,n.d=function(t,e,o){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:o})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(n.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var r in t)n.d(o,r,function(e){return t[e]}.bind(null,r));return o},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=25)}([function(t,e){t.exports=flarum.core.compat["common/Model"]},function(t,e,n){"use strict";function o(t,e){return(o=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function r(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,o(t,e)}n.d(e,"a",(function(){return r}))},,function(t,e){t.exports=flarum.core.compat["common/Component"]},function(t,e){t.exports=flarum.core.compat["common/utils/ItemList"]},function(t,e){t.exports=flarum.core.compat["common/utils/string"]},function(t,e){t.exports=flarum.core.compat.app},function(t,e){t.exports=flarum.core.compat["common/components/Badge"]},,function(t,e){t.exports=flarum.core.compat["common/components/LoadingIndicator"]},function(t,e){t.exports=flarum.core.compat["common/helpers/listItems"]},function(t,e){t.exports=flarum.core.compat["common/utils/computed"]},function(t,e,n){"use strict";function o(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}n.d(e,"a",(function(){return b}));var r=n(1);function a(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}var i=n(6),c=n.n(i),s=n(0),u=n.n(s),p=n(11),m=n.n(p),l=n(5),f=n(4),d=n.n(f),h=n(7),g=n.n(h),b=function(t){function e(){for(var e,n=arguments.length,r=new Array(n),i=0;i\n
\n
    {listItems(this.items().toArray())}
\n
\n \n );\n }\n\n /**\n * Build an item list for the contents of the page hero.\n *\n * @return {ItemList}\n */\n items() {\n const items = new ItemList();\n const page = this.attrs.page;\n\n items.add(\n 'title',\n

\n \n {page.title()}\n \n

\n );\n\n return items;\n }\n}\n","import Page from 'flarum/common/components/Page';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\n\nimport PageHero from './PageHero';\n\nexport default class PagePage extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n /**\n * The page that is being viewed.\n *\n * @type {fof/pages/models/Page}\n */\n this.page = null;\n\n this.loadPage();\n\n this.bodyClass = 'App--page';\n }\n\n view() {\n const page = this.page;\n\n return (\n
\n
\n {page\n ? [\n this.hero(),\n
\n
{this.content()}
\n
,\n ]\n : LoadingIndicator.component({ className: 'LoadingIndicator--block' })}\n
\n
\n );\n }\n\n /**\n * Initialize page.\n *\n * @param {fof/pages/models/Page} page\n * @protected\n */\n show(page) {\n this.page = page;\n\n app.history.push('page', page.title());\n app.setTitle(page.title());\n\n m.redraw();\n }\n\n /**\n * Get the hero of current page.\n */\n hero() {\n return PageHero.component({ page: this.page });\n }\n\n /**\n * Get the content of page.\n */\n content() {\n return m.trust(this.page.contentHtml());\n }\n\n /**\n * Get current page id from route.\n *\n * @return string\n */\n id() {\n const id = m.route.param('id').split('-')[0];\n if (!isNaN(parseInt(id))) {\n return id;\n } else {\n return m.route.param('id');\n }\n }\n\n /**\n * Load page from the store, or make a request\n * if we don't have it yet. Then initialize the page.\n */\n loadPage() {\n const id = this.id();\n\n const preloaded = app.preloadedApiDocument();\n const page = (!Array.isArray(preloaded) && preloaded) || app.store.getById('pages', id);\n\n if (page) {\n this.show(page);\n } else {\n Promise.all([\n app.store.find('pages', id).then((result) => {\n this.show(result);\n }),\n m.redraw(),\n ]);\n }\n }\n}\n","import IndexPage from 'flarum/forum/components/IndexPage';\nimport icon from 'flarum/common/helpers/icon';\n\nimport PagePage from './PagePage';\n\nexport default class HomePage extends PagePage {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.history.push('homePage', icon('fas fa-home'));\n app.drawer.hide();\n app.modal.close();\n }\n\n show(page) {\n this.page = page;\n app.setTitle('');\n m.redraw();\n }\n\n hero() {\n return IndexPage.prototype.hero();\n }\n\n id() {\n return app.data['fof-pages.home'];\n }\n}\n","import HomePage from './components/HomePage';\nimport PagePage from './components/PagePage';\nimport Page from '../common/models/Page';\n\napp.initializers.add('fof-pages', (app) => {\n app.routes.homePage = { path: '/pages/home', component: HomePage };\n\n app.routes.page = { path: '/p/:id', component: PagePage };\n app.store.models.pages = Page;\n\n /**\n * Generate a URL to a page.\n *\n * @param {../common/models/Page} page\n * @return {String}\n */\n app.route.page = (page) => {\n return app.route('page', {\n id: page.id() + '-' + page.slug(),\n });\n };\n});\n"],"sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack://@fof/pages/webpack/bootstrap","webpack://@fof/pages/external \"flarum.core.compat['common/Model']\"","webpack://@fof/pages/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/pages/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/pages/external \"flarum.core.compat['common/Component']\"","webpack://@fof/pages/external \"flarum.core.compat['common/utils/ItemList']\"","webpack://@fof/pages/external \"flarum.core.compat['common/utils/string']\"","webpack://@fof/pages/external \"flarum.core.compat['app']\"","webpack://@fof/pages/external \"flarum.core.compat['common/components/Badge']\"","webpack://@fof/pages/external \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@fof/pages/external \"flarum.core.compat['common/helpers/listItems']\"","webpack://@fof/pages/./src/common/models/Page.js","webpack://@fof/pages/external \"flarum.core.compat['common/utils/computed']\"","webpack://@fof/pages/external \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@fof/pages/external \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/pages/external \"flarum.core.compat['common/components/Page']\"","webpack://@fof/pages/./src/forum/components/PageHero.js","webpack://@fof/pages/./src/forum/components/PagePage.js","webpack://@fof/pages/./src/forum/components/HomePage.js","webpack://@fof/pages/./src/forum/index.js"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","_setPrototypeOf","setPrototypeOf","__proto__","_inheritsLoose","subClass","superClass","constructor","Page","title","Model","attribute","time","transformDate","editTime","content","contentHtml","contentPlain","computed","getPlainContent","slug","isHidden","isRestricted","isHtml","badges","items","ItemList","this","add","Badge","component","type","icon","label","app","translator","trans","PageHero","view","className","listItems","toArray","page","attrs","href","route","config","Component","PagePage","oninit","vnode","loadPage","bodyClass","hero","LoadingIndicator","show","history","push","setTitle","redraw","trust","id","param","split","isNaN","parseInt","preloaded","preloadedApiDocument","Array","isArray","store","getById","Promise","all","find","then","result","HomePage","drawer","hide","modal","close","IndexPage","data","initializers","routes","homePage","path","models","pages"],"mappings":"2BACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH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,KAAK1B,gB,EAQ7B6C,GAAA,WACI,IAAMA,EAAK3F,EAAE2E,MAAMiB,MAAM,MAAMC,MAAM,KAAK,GAC1C,OAAKC,MAAMC,SAASJ,IAGT3F,EAAE2E,MAAMiB,MAAM,MAFdD,G,EAUfV,SAAA,WAAW,WACDU,EAAKlC,KAAKkC,KAEVK,EAAYhC,IAAIiC,uBAChBzB,GAAS0B,MAAMC,QAAQH,IAAcA,GAAchC,IAAIoC,MAAMC,QAAQ,QAASV,GAEhFnB,EACAf,KAAK4B,KAAKb,GAEV8B,QAAQC,IAAI,CACRvC,IAAIoC,MAAMI,KAAK,QAASb,GAAIc,MAAK,SAACC,GAC9B,EAAKrB,KAAKqB,MAEd1G,EAAEyF,Y,GA/FoBnD,KCAjBqE,E,0GACjB5B,OAAA,SAAOC,GACH,YAAMD,OAAN,UAAaC,GAEbhB,IAAIsB,QAAQC,KAAK,WAAYzB,IAAK,gBAClCE,IAAI4C,OAAOC,OACX7C,IAAI8C,MAAMC,S,EAGd1B,KAAA,SAAKb,GACDf,KAAKe,KAAOA,EACZR,IAAIwB,SAAS,IACbxF,EAAEyF,U,EAGNN,KAAA,WACI,OAAO6B,IAAUxF,UAAU2D,Q,EAG/BQ,GAAA,WACI,OAAO3B,IAAIiD,KAAK,mB,GApBcnC,G,QCDtCd,IAAIkD,aAAaxD,IAAI,aAAa,SAACM,GAC/BA,EAAImD,OAAOC,SAAW,CAAEC,KAAM,cAAezD,UAAW+C,GAExD3C,EAAImD,OAAO3C,KAAO,CAAE6C,KAAM,SAAUzD,UAAWkB,GAC/Cd,EAAIoC,MAAMkB,OAAOC,MAAQjF,IAQzB0B,EAAIW,MAAMH,KAAO,SAACA,GACd,OAAOR,EAAIW,MAAM,OAAQ,CACrBgB,GAAInB,EAAKmB,KAAO,IAAMnB,EAAKtB","file":"forum.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 25);\n","module.exports = flarum.core.compat['common/Model'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf || function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","module.exports = flarum.core.compat['common/Component'];","module.exports = flarum.core.compat['common/utils/ItemList'];","module.exports = flarum.core.compat['common/utils/string'];","module.exports = flarum.core.compat['app'];","module.exports = flarum.core.compat['common/components/Badge'];","module.exports = flarum.core.compat['common/components/LoadingIndicator'];","module.exports = flarum.core.compat['common/helpers/listItems'];","import app from 'flarum/app';\nimport Model from 'flarum/common/Model';\nimport computed from 'flarum/common/utils/computed';\nimport { getPlainContent } from 'flarum/common/utils/string';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Badge from 'flarum/common/components/Badge';\n\nexport default class Page extends Model {\n title = Model.attribute('title');\n time = Model.attribute('time', Model.transformDate);\n editTime = Model.attribute('editTime', Model.transformDate);\n content = Model.attribute('content');\n contentHtml = Model.attribute('contentHtml');\n contentPlain = computed('contentHtml', getPlainContent);\n slug = Model.attribute('slug');\n isHidden = Model.attribute('isHidden');\n isRestricted = Model.attribute('isRestricted');\n isHtml = Model.attribute('isHtml');\n\n badges() {\n const items = new ItemList();\n\n if (this.isHidden()) {\n items.add(\n 'hidden',\n Badge.component({\n type: 'hidden',\n icon: 'fas fa-trash',\n label: app.translator.trans('fof-pages.admin.badges.hidden'),\n })\n );\n }\n\n if (this.isRestricted()) {\n items.add(\n 'restricted',\n Badge.component({\n type: 'restricted',\n icon: 'fas fa-user-shield',\n label: app.translator.trans('fof-pages.admin.badges.restricted'),\n })\n );\n }\n\n return items;\n }\n}\n","module.exports = flarum.core.compat['common/utils/computed'];","module.exports = flarum.core.compat['forum/components/IndexPage'];","module.exports = flarum.core.compat['common/helpers/icon'];","module.exports = flarum.core.compat['common/components/Page'];","import Component from 'flarum/common/Component';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport listItems from 'flarum/common/helpers/listItems';\n\n/**\n * The `PageHero` component displays the hero on a page page.\n *\n * ### Props\n *\n * - `page`\n */\nexport default class PageHero extends Component {\n view() {\n return (\n
\n
\n
    {listItems(this.items().toArray())}
\n
\n
\n );\n }\n\n /**\n * Build an item list for the contents of the page hero.\n *\n * @return {ItemList}\n */\n items() {\n const items = new ItemList();\n const page = this.attrs.page;\n\n items.add(\n 'title',\n

\n \n {page.title()}\n \n

\n );\n\n return items;\n }\n}\n","import Page from 'flarum/common/components/Page';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\n\nimport PageHero from './PageHero';\n\nexport default class PagePage extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n /**\n * The page that is being viewed.\n *\n * @type {fof/pages/models/Page}\n */\n this.page = null;\n\n this.loadPage();\n\n this.bodyClass = 'App--page';\n }\n\n view() {\n const page = this.page;\n\n return (\n
\n
\n {page\n ? [\n this.hero(),\n
\n
{this.content()}
\n
,\n ]\n : LoadingIndicator.component({ className: 'LoadingIndicator--block' })}\n
\n
\n );\n }\n\n /**\n * Initialize page.\n *\n * @param {fof/pages/models/Page} page\n * @protected\n */\n show(page) {\n this.page = page;\n\n app.history.push('page', page.title());\n app.setTitle(page.title());\n\n m.redraw();\n }\n\n /**\n * Get the hero of current page.\n */\n hero() {\n return PageHero.component({ page: this.page });\n }\n\n /**\n * Get the content of page.\n */\n content() {\n return m.trust(this.page.contentHtml());\n }\n\n /**\n * Get current page id from route.\n *\n * @return string\n */\n id() {\n const id = m.route.param('id').split('-')[0];\n if (!isNaN(parseInt(id))) {\n return id;\n } else {\n return m.route.param('id');\n }\n }\n\n /**\n * Load page from the store, or make a request\n * if we don't have it yet. Then initialize the page.\n */\n loadPage() {\n const id = this.id();\n\n const preloaded = app.preloadedApiDocument();\n const page = (!Array.isArray(preloaded) && preloaded) || app.store.getById('pages', id);\n\n if (page) {\n this.show(page);\n } else {\n Promise.all([\n app.store.find('pages', id).then((result) => {\n this.show(result);\n }),\n m.redraw(),\n ]);\n }\n }\n}\n","import IndexPage from 'flarum/forum/components/IndexPage';\nimport icon from 'flarum/common/helpers/icon';\n\nimport PagePage from './PagePage';\n\nexport default class HomePage extends PagePage {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.history.push('homePage', icon('fas fa-home'));\n app.drawer.hide();\n app.modal.close();\n }\n\n show(page) {\n this.page = page;\n app.setTitle('');\n m.redraw();\n }\n\n hero() {\n return IndexPage.prototype.hero();\n }\n\n id() {\n return app.data['fof-pages.home'];\n }\n}\n","import HomePage from './components/HomePage';\nimport PagePage from './components/PagePage';\nimport Page from '../common/models/Page';\n\napp.initializers.add('fof-pages', (app) => {\n app.routes.homePage = { path: '/pages/home', component: HomePage };\n\n app.routes.page = { path: '/p/:id', component: PagePage };\n app.store.models.pages = Page;\n\n /**\n * Generate a URL to a page.\n *\n * @param {../common/models/Page} page\n * @return {String}\n */\n app.route.page = (page) => {\n return app.route('page', {\n id: page.id() + '-' + page.slug(),\n });\n };\n});\n"],"sourceRoot":""} \ No newline at end of file diff --git a/js/package-lock.json b/js/package-lock.json index b372d73..04041e0 100644 --- a/js/package-lock.json +++ b/js/package-lock.json @@ -12,24 +12,24 @@ } }, "@babel/compat-data": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.13.12.tgz", - "integrity": "sha512-3eJJ841uKxeV8dcN/2yGEUy+RfgQspPEgQat85umsE1rotuquQ2AbIub4S6j7c50a2d+4myc+zSlnXeIHrOnhQ==" + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.14.0.tgz", + "integrity": "sha512-vu9V3uMM/1o5Hl5OekMUowo3FqXLJSw+s+66nt0fSWVWTtmosdzn45JHOB3cPtZoe6CTBDzvSw0RdOY85Q37+Q==" }, "@babel/core": { - "version": "7.13.14", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.13.14.tgz", - "integrity": "sha512-wZso/vyF4ki0l0znlgM4inxbdrUvCb+cVz8grxDq+6C9k6qbqoIJteQOKicaKjCipU3ISV+XedCqpL2RJJVehA==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.14.3.tgz", + "integrity": "sha512-jB5AmTKOCSJIZ72sd78ECEhuPiDMKlQdDI/4QRI6lzYATx5SSogS1oQA2AoPecRCknm30gHi2l+QVvNUu3wZAg==", "requires": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.9", - "@babel/helper-compilation-targets": "^7.13.13", - "@babel/helper-module-transforms": "^7.13.14", - "@babel/helpers": "^7.13.10", - "@babel/parser": "^7.13.13", + "@babel/generator": "^7.14.3", + "@babel/helper-compilation-targets": "^7.13.16", + "@babel/helper-module-transforms": "^7.14.2", + "@babel/helpers": "^7.14.0", + "@babel/parser": "^7.14.3", "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.13", - "@babel/types": "^7.13.14", + "@babel/traverse": "^7.14.2", + "@babel/types": "^7.14.2", "convert-source-map": "^1.7.0", "debug": "^4.1.0", "gensync": "^1.0.0-beta.2", @@ -39,11 +39,11 @@ } }, "@babel/generator": { - "version": "7.13.9", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.13.9.tgz", - "integrity": "sha512-mHOOmY0Axl/JCTkxTU6Lf5sWOg/v8nUa+Xkt4zMTftX0wqmb6Sh7J8gvcehBw7q0AhrhAR+FDacKjCZ2X8K+Sw==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.14.3.tgz", + "integrity": "sha512-bn0S6flG/j0xtQdz3hsjJ624h3W0r3llttBMfyHX3YrZ/KtLYr15bjA0FXkgW7FpvrDuTuElXeVjiKlYRpnOFA==", "requires": { - "@babel/types": "^7.13.0", + "@babel/types": "^7.14.2", "jsesc": "^2.5.1", "source-map": "^0.5.0" } @@ -66,41 +66,42 @@ } }, "@babel/helper-compilation-targets": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.13.tgz", - "integrity": "sha512-q1kcdHNZehBwD9jYPh3WyXcsFERi39X4I59I3NadciWtNDyZ6x+GboOxncFK0kXlKIv6BJm5acncehXWUjWQMQ==", + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.13.16.tgz", + "integrity": "sha512-3gmkYIrpqsLlieFwjkGgLaSHmhnvlAYzZLlYVjlW+QwI+1zE17kGxuJGmIqDQdYp56XdmGeD+Bswx0UTyG18xA==", "requires": { - "@babel/compat-data": "^7.13.12", + "@babel/compat-data": "^7.13.15", "@babel/helper-validator-option": "^7.12.17", "browserslist": "^4.14.5", "semver": "^6.3.0" } }, "@babel/helper-create-class-features-plugin": { - "version": "7.13.11", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.13.11.tgz", - "integrity": "sha512-ays0I7XYq9xbjCSvT+EvysLgfc3tOkwCULHjrnscGT3A9qD4sk3wXnJ3of0MAWsWGjdinFvajHU2smYuqXKMrw==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.3.tgz", + "integrity": "sha512-BnEfi5+6J2Lte9LeiL6TxLWdIlEv9Woacc1qXzXBgbikcOzMRM2Oya5XGg/f/ngotv1ej2A/b+3iJH8wbS1+lQ==", "requires": { - "@babel/helper-function-name": "^7.12.13", - "@babel/helper-member-expression-to-functions": "^7.13.0", + "@babel/helper-annotate-as-pure": "^7.12.13", + "@babel/helper-function-name": "^7.14.2", + "@babel/helper-member-expression-to-functions": "^7.13.12", "@babel/helper-optimise-call-expression": "^7.12.13", - "@babel/helper-replace-supers": "^7.13.0", + "@babel/helper-replace-supers": "^7.14.3", "@babel/helper-split-export-declaration": "^7.12.13" } }, "@babel/helper-create-regexp-features-plugin": { - "version": "7.12.17", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.17.tgz", - "integrity": "sha512-p2VGmBu9oefLZ2nQpgnEnG0ZlRPvL8gAGvPUMQwUdaE8k49rOMuZpOwdQoy5qJf6K8jL3bcAMhVUlHAjIgJHUg==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.3.tgz", + "integrity": "sha512-JIB2+XJrb7v3zceV2XzDhGIB902CmKGSpSl4q2C6agU9SNLG/2V1RtFRGPG1Ajh9STj3+q6zJMOC+N/pp2P9DA==", "requires": { "@babel/helper-annotate-as-pure": "^7.12.13", "regexpu-core": "^4.7.1" } }, "@babel/helper-define-polyfill-provider": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.1.5.tgz", - "integrity": "sha512-nXuzCSwlJ/WKr8qxzW816gwyT6VZgiJG17zR40fou70yfAcqjoNyTLl/DQ+FExw5Hx5KNqshmN8Ldl/r2N7cTg==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.3.tgz", + "integrity": "sha512-RH3QDAfRMzj7+0Nqu5oqgO5q9mFtQEVvCRsi8qCEfzLR9p2BHfn5FzhSB2oj1fF7I2+DcTORkYaQ6aTR9Cofew==", "requires": { "@babel/helper-compilation-targets": "^7.13.0", "@babel/helper-module-imports": "^7.12.13", @@ -121,13 +122,13 @@ } }, "@babel/helper-function-name": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.12.13.tgz", - "integrity": "sha512-TZvmPn0UOqmvi5G4vvw0qZTpVptGkB1GL61R6lKvrSdIxGm5Pky7Q3fpKiIkQCAtRCBUwB0PaThlx9vebCDSwA==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.14.2.tgz", + "integrity": "sha512-NYZlkZRydxw+YT56IlhIcS8PAhb+FEUiOzuhFTfqDyPmzAhRge6ua0dQYT/Uh0t/EDHq05/i+e5M2d4XvjgarQ==", "requires": { "@babel/helper-get-function-arity": "^7.12.13", "@babel/template": "^7.12.13", - "@babel/types": "^7.12.13" + "@babel/types": "^7.14.2" } }, "@babel/helper-get-function-arity": { @@ -139,12 +140,12 @@ } }, "@babel/helper-hoist-variables": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.13.0.tgz", - "integrity": "sha512-0kBzvXiIKfsCA0y6cFEIJf4OdzfpRuNk4+YTeHZpGGc666SATFKTz6sRncwFnQk7/ugJ4dSrCj6iJuvW4Qwr2g==", + "version": "7.13.16", + "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.13.16.tgz", + "integrity": "sha512-1eMtTrXtrwscjcAeO4BVK+vvkxaLJSPFz1w1KLawz6HLNi9bPFGBNwwDyVfiu1Tv/vRRFYfoGaKhmAQPGPn5Wg==", "requires": { - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" + "@babel/traverse": "^7.13.15", + "@babel/types": "^7.13.16" } }, "@babel/helper-member-expression-to-functions": { @@ -164,18 +165,18 @@ } }, "@babel/helper-module-transforms": { - "version": "7.13.14", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.13.14.tgz", - "integrity": "sha512-QuU/OJ0iAOSIatyVZmfqB0lbkVP0kDRiKj34xy+QNsnVZi/PA6BoSoreeqnxxa9EHFAIL0R9XOaAR/G9WlIy5g==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.14.2.tgz", + "integrity": "sha512-OznJUda/soKXv0XhpvzGWDnml4Qnwp16GN+D/kZIdLsWoHj05kyu8Rm5kXmMef+rVJZ0+4pSGLkeixdqNUATDA==", "requires": { "@babel/helper-module-imports": "^7.13.12", "@babel/helper-replace-supers": "^7.13.12", "@babel/helper-simple-access": "^7.13.12", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/helper-validator-identifier": "^7.12.11", + "@babel/helper-validator-identifier": "^7.14.0", "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.13", - "@babel/types": "^7.13.14" + "@babel/traverse": "^7.14.2", + "@babel/types": "^7.14.2" } }, "@babel/helper-optimise-call-expression": { @@ -202,14 +203,14 @@ } }, "@babel/helper-replace-supers": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.13.12.tgz", - "integrity": "sha512-Gz1eiX+4yDO8mT+heB94aLVNCL+rbuT2xy4YfyNqu8F+OI6vMvJK891qGBTqL9Uc8wxEvRW92Id6G7sDen3fFw==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.14.3.tgz", + "integrity": "sha512-Rlh8qEWZSTfdz+tgNV/N4gz1a0TMNwCUcENhMjHTHKp3LseYH5Jha0NSlyTQWMnjbYcwFt+bqAMqSLHVXkQ6UA==", "requires": { "@babel/helper-member-expression-to-functions": "^7.13.12", "@babel/helper-optimise-call-expression": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.12" + "@babel/traverse": "^7.14.2", + "@babel/types": "^7.14.2" } }, "@babel/helper-simple-access": { @@ -237,9 +238,9 @@ } }, "@babel/helper-validator-identifier": { - "version": "7.12.11", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz", - "integrity": "sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==" + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz", + "integrity": "sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A==" }, "@babel/helper-validator-option": { "version": "7.12.17", @@ -258,29 +259,29 @@ } }, "@babel/helpers": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.13.10.tgz", - "integrity": "sha512-4VO883+MWPDUVRF3PhiLBUFHoX/bsLTGFpFK/HqvvfBZz2D57u9XzPVNFVBTc0PW/CWR9BXTOKt8NF4DInUHcQ==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.14.0.tgz", + "integrity": "sha512-+ufuXprtQ1D1iZTO/K9+EBRn+qPWMJjZSw/S0KlFrxCw4tkrzv9grgpDHkY9MeQTjTY8i2sp7Jep8DfU6tN9Mg==", "requires": { "@babel/template": "^7.12.13", - "@babel/traverse": "^7.13.0", - "@babel/types": "^7.13.0" + "@babel/traverse": "^7.14.0", + "@babel/types": "^7.14.0" } }, "@babel/highlight": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.13.10.tgz", - "integrity": "sha512-5aPpe5XQPzflQrFwL1/QoeHkP2MsA4JCntcXHRhEsdsfPVkvPi2w7Qix4iV7t5S/oC9OodGrggd8aco1g3SZFg==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.0.tgz", + "integrity": "sha512-YSCOwxvTYEIMSGaBQb5kDDsCopDdiUGsqpatp3fOlI4+2HQSkTmEVWnVuySdAC5EWCqSWWTv0ib63RjR7dTBdg==", "requires": { - "@babel/helper-validator-identifier": "^7.12.11", + "@babel/helper-validator-identifier": "^7.14.0", "chalk": "^2.0.0", "js-tokens": "^4.0.0" } }, "@babel/parser": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.13.13.tgz", - "integrity": "sha512-OhsyMrqygfk5v8HmWwOzlYjJrtLaFhF34MrfG/Z73DgYCI6ojNUTUp2TYbtnjo8PegeJp12eamsNettCQjKjVw==" + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.14.3.tgz", + "integrity": "sha512-7MpZDIfI7sUC5zWo2+foJ50CSI5lcqDehZ0lVgIhSi4bFEk94fLAKlF3Q0nzSQQ+ca0lm+O6G9ztKVBeu8PMRQ==" }, "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { "version": "7.13.12", @@ -293,9 +294,9 @@ } }, "@babel/plugin-proposal-async-generator-functions": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.13.8.tgz", - "integrity": "sha512-rPBnhj+WgoSmgq+4gQUtXx/vOcU+UYtjy1AA/aeD61Hwj410fwYyqfUcRP3lR8ucgliVJL/G7sXcNUecC75IXA==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.14.2.tgz", + "integrity": "sha512-b1AM4F6fwck4N8ItZ/AtC4FP/cqZqmKRQ4FaTDutwSYyjuhtvsGEMLK4N/ztV/ImP40BjIDyMgBQAeAMsQYVFQ==", "requires": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/helper-remap-async-to-generator": "^7.13.0", @@ -311,85 +312,95 @@ "@babel/helper-plugin-utils": "^7.13.0" } }, + "@babel/plugin-proposal-class-static-block": { + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.14.3.tgz", + "integrity": "sha512-HEjzp5q+lWSjAgJtSluFDrGGosmwTgKwCXdDQZvhKsRlwv3YdkUEqxNrrjesJd+B9E9zvr1PVPVBvhYZ9msjvQ==", + "requires": { + "@babel/helper-create-class-features-plugin": "^7.14.3", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/plugin-syntax-class-static-block": "^7.12.13" + } + }, "@babel/plugin-proposal-dynamic-import": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.13.8.tgz", - "integrity": "sha512-ONWKj0H6+wIRCkZi9zSbZtE/r73uOhMVHh256ys0UzfM7I3d4n+spZNWjOnJv2gzopumP2Wxi186vI8N0Y2JyQ==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.2.tgz", + "integrity": "sha512-oxVQZIWFh91vuNEMKltqNsKLFWkOIyJc95k2Gv9lWVyDfPUQGSSlbDEgWuJUU1afGE9WwlzpucMZ3yDRHIItkA==", "requires": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-dynamic-import": "^7.8.3" } }, "@babel/plugin-proposal-export-namespace-from": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.12.13.tgz", - "integrity": "sha512-INAgtFo4OnLN3Y/j0VwAgw3HDXcDtX+C/erMvWzuV9v71r7urb6iyMXu7eM9IgLr1ElLlOkaHjJ0SbCmdOQ3Iw==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.2.tgz", + "integrity": "sha512-sRxW3z3Zp3pFfLAgVEvzTFutTXax837oOatUIvSG9o5gRj9mKwm3br1Se5f4QalTQs9x4AzlA/HrCWbQIHASUQ==", "requires": { - "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" } }, "@babel/plugin-proposal-json-strings": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.13.8.tgz", - "integrity": "sha512-w4zOPKUFPX1mgvTmL/fcEqy34hrQ1CRcGxdphBc6snDnnqJ47EZDIyop6IwXzAC8G916hsIuXB2ZMBCExC5k7Q==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.2.tgz", + "integrity": "sha512-w2DtsfXBBJddJacXMBhElGEYqCZQqN99Se1qeYn8DVLB33owlrlLftIbMzn5nz1OITfDVknXF433tBrLEAOEjA==", "requires": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-json-strings": "^7.8.3" } }, "@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.13.8.tgz", - "integrity": "sha512-aul6znYB4N4HGweImqKn59Su9RS8lbUIqxtXTOcAGtNIDczoEFv+l1EhmX8rUBp3G1jMjKJm8m0jXVp63ZpS4A==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.2.tgz", + "integrity": "sha512-1JAZtUrqYyGsS7IDmFeaem+/LJqujfLZ2weLR9ugB0ufUPjzf8cguyVT1g5im7f7RXxuLq1xUxEzvm68uYRtGg==", "requires": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" } }, "@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.13.8.tgz", - "integrity": "sha512-iePlDPBn//UhxExyS9KyeYU7RM9WScAG+D3Hhno0PLJebAEpDZMocbDe64eqynhNAnwz/vZoL/q/QB2T1OH39A==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.2.tgz", + "integrity": "sha512-ebR0zU9OvI2N4qiAC38KIAK75KItpIPTpAtd2r4OZmMFeKbKJpUFLYP2EuDut82+BmYi8sz42B+TfTptJ9iG5Q==", "requires": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" } }, "@babel/plugin-proposal-numeric-separator": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.12.13.tgz", - "integrity": "sha512-O1jFia9R8BUCl3ZGB7eitaAPu62TXJRHn7rh+ojNERCFyqRwJMTmhz+tJ+k0CwI6CLjX/ee4qW74FSqlq9I35w==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.2.tgz", + "integrity": "sha512-DcTQY9syxu9BpU3Uo94fjCB3LN9/hgPS8oUL7KrSW3bA2ePrKZZPJcc5y0hoJAM9dft3pGfErtEUvxXQcfLxUg==", "requires": { - "@babel/helper-plugin-utils": "^7.12.13", + "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-numeric-separator": "^7.10.4" } }, "@babel/plugin-proposal-object-rest-spread": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.13.8.tgz", - "integrity": "sha512-DhB2EuB1Ih7S3/IRX5AFVgZ16k3EzfRbq97CxAVI1KSYcW+lexV8VZb7G7L8zuPVSdQMRn0kiBpf/Yzu9ZKH0g==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.14.2.tgz", + "integrity": "sha512-hBIQFxwZi8GIp934+nj5uV31mqclC1aYDhctDu5khTi9PCCUOczyy0b34W0oE9U/eJXiqQaKyVsmjeagOaSlbw==", "requires": { - "@babel/compat-data": "^7.13.8", - "@babel/helper-compilation-targets": "^7.13.8", + "@babel/compat-data": "^7.14.0", + "@babel/helper-compilation-targets": "^7.13.16", "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.13.0" + "@babel/plugin-transform-parameters": "^7.14.2" } }, "@babel/plugin-proposal-optional-catch-binding": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.13.8.tgz", - "integrity": "sha512-0wS/4DUF1CuTmGo+NiaHfHcVSeSLj5S3e6RivPTg/2k3wOv3jO35tZ6/ZWsQhQMvdgI7CwphjQa/ccarLymHVA==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.2.tgz", + "integrity": "sha512-XtkJsmJtBaUbOxZsNk0Fvrv8eiqgneug0A6aqLFZ4TSkar2L5dSXWcnUKHgmjJt49pyB/6ZHvkr3dPgl9MOWRQ==", "requires": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" } }, "@babel/plugin-proposal-optional-chaining": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.13.12.tgz", - "integrity": "sha512-fcEdKOkIB7Tf4IxrgEVeFC4zeJSTr78no9wTdBuZZbqF64kzllU0ybo2zrzm7gUQfxGhBgq4E39oRs8Zx/RMYQ==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.2.tgz", + "integrity": "sha512-qQByMRPwMZJainfig10BoaDldx/+VDtNcrA7qdNaEOAj6VXud+gfrkA8j4CRAU5HjnWREXqIpSpH30qZX1xivA==", "requires": { "@babel/helper-plugin-utils": "^7.13.0", "@babel/helper-skip-transparent-expression-wrappers": "^7.12.1", @@ -405,6 +416,17 @@ "@babel/helper-plugin-utils": "^7.13.0" } }, + "@babel/plugin-proposal-private-property-in-object": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.14.0.tgz", + "integrity": "sha512-59ANdmEwwRUkLjB7CRtwJxxwtjESw+X2IePItA+RGQh+oy5RmpCh/EvVVvh5XQc3yxsm5gtv0+i9oBZhaDNVTg==", + "requires": { + "@babel/helper-annotate-as-pure": "^7.12.13", + "@babel/helper-create-class-features-plugin": "^7.14.0", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/plugin-syntax-private-property-in-object": "^7.14.0" + } + }, "@babel/plugin-proposal-unicode-property-regex": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.12.13.tgz", @@ -430,6 +452,14 @@ "@babel/helper-plugin-utils": "^7.12.13" } }, + "@babel/plugin-syntax-class-static-block": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.12.13.tgz", + "integrity": "sha512-ZmKQ0ZXR0nYpHZIIuj9zE7oIqCx2hw9TKi+lIo73NNrMPAZGHfS92/VRV0ZmPj6H2ffBgyFHXvJ5NYsNeEaP2A==", + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, "@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", @@ -510,6 +540,14 @@ "@babel/helper-plugin-utils": "^7.8.0" } }, + "@babel/plugin-syntax-private-property-in-object": { + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.0.tgz", + "integrity": "sha512-bda3xF8wGl5/5btF794utNOL0Jw+9jE5C1sLZcoK7c4uonE/y3iQiyG+KbkF3WBV/paX58VCpjhxLPkdj5Fe4w==", + "requires": { + "@babel/helper-plugin-utils": "^7.13.0" + } + }, "@babel/plugin-syntax-top-level-await": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.12.13.tgz", @@ -518,6 +556,14 @@ "@babel/helper-plugin-utils": "^7.12.13" } }, + "@babel/plugin-syntax-typescript": { + "version": "7.12.13", + "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.12.13.tgz", + "integrity": "sha512-cHP3u1JiUiG2LFDKbXnwVad81GvfyIOmCD6HIEId6ojrY0Drfy2q1jw7BwN7dE84+kTnBjLkXoL3IEy/3JPu2w==", + "requires": { + "@babel/helper-plugin-utils": "^7.12.13" + } + }, "@babel/plugin-transform-arrow-functions": { "version": "7.13.0", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.13.0.tgz", @@ -545,23 +591,23 @@ } }, "@babel/plugin-transform-block-scoping": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.12.13.tgz", - "integrity": "sha512-Pxwe0iqWJX4fOOM2kEZeUuAxHMWb9nK+9oh5d11bsLoB0xMg+mkDpt0eYuDZB7ETrY9bbcVlKUGTOGWy7BHsMQ==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.14.2.tgz", + "integrity": "sha512-neZZcP19NugZZqNwMTH+KoBjx5WyvESPSIOQb4JHpfd+zPfqcH65RMu5xJju5+6q/Y2VzYrleQTr+b6METyyxg==", "requires": { - "@babel/helper-plugin-utils": "^7.12.13" + "@babel/helper-plugin-utils": "^7.13.0" } }, "@babel/plugin-transform-classes": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.13.0.tgz", - "integrity": "sha512-9BtHCPUARyVH1oXGcSJD3YpsqRLROJx5ZNP6tN5vnk17N0SVf9WCtf8Nuh1CFmgByKKAIMstitKduoCmsaDK5g==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.14.2.tgz", + "integrity": "sha512-7oafAVcucHquA/VZCsXv/gmuiHeYd64UJyyTYU+MPfNu0KeNlxw06IeENBO8bJjXVbolu+j1MM5aKQtH1OMCNg==", "requires": { "@babel/helper-annotate-as-pure": "^7.12.13", - "@babel/helper-function-name": "^7.12.13", + "@babel/helper-function-name": "^7.14.2", "@babel/helper-optimise-call-expression": "^7.12.13", "@babel/helper-plugin-utils": "^7.13.0", - "@babel/helper-replace-supers": "^7.13.0", + "@babel/helper-replace-supers": "^7.13.12", "@babel/helper-split-export-declaration": "^7.12.13", "globals": "^11.1.0" } @@ -575,9 +621,9 @@ } }, "@babel/plugin-transform-destructuring": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.13.0.tgz", - "integrity": "sha512-zym5em7tePoNT9s964c0/KU3JPPnuq7VhIxPRefJ4/s82cD+q1mgKfuGRDMCPL0HTyKz4dISuQlCusfgCJ86HA==", + "version": "7.13.17", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.13.17.tgz", + "integrity": "sha512-UAUqiLv+uRLO+xuBKKMEpC+t7YRNVRqBsWWq1yKXbBZBje/t3IXCiSinZhjn/DC3qzBfICeYd2EFGEbHsh5RLA==", "requires": { "@babel/helper-plugin-utils": "^7.13.0" } @@ -642,23 +688,23 @@ } }, "@babel/plugin-transform-modules-amd": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.13.0.tgz", - "integrity": "sha512-EKy/E2NHhY/6Vw5d1k3rgoobftcNUmp9fGjb9XZwQLtTctsRBOTRO7RHHxfIky1ogMN5BxN7p9uMA3SzPfotMQ==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.2.tgz", + "integrity": "sha512-hPC6XBswt8P3G2D1tSV2HzdKvkqOpmbyoy+g73JG0qlF/qx2y3KaMmXb1fLrpmWGLZYA0ojCvaHdzFWjlmV+Pw==", "requires": { - "@babel/helper-module-transforms": "^7.13.0", + "@babel/helper-module-transforms": "^7.14.2", "@babel/helper-plugin-utils": "^7.13.0", "babel-plugin-dynamic-import-node": "^2.3.3" } }, "@babel/plugin-transform-modules-commonjs": { - "version": "7.13.8", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.13.8.tgz", - "integrity": "sha512-9QiOx4MEGglfYZ4XOnU79OHr6vIWUakIj9b4mioN8eQIoEh+pf5p/zEB36JpDFWA12nNMiRf7bfoRvl9Rn79Bw==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.14.0.tgz", + "integrity": "sha512-EX4QePlsTaRZQmw9BsoPeyh5OCtRGIhwfLquhxGp5e32w+dyL8htOcDwamlitmNFK6xBZYlygjdye9dbd9rUlQ==", "requires": { - "@babel/helper-module-transforms": "^7.13.0", + "@babel/helper-module-transforms": "^7.14.0", "@babel/helper-plugin-utils": "^7.13.0", - "@babel/helper-simple-access": "^7.12.13", + "@babel/helper-simple-access": "^7.13.12", "babel-plugin-dynamic-import-node": "^2.3.3" } }, @@ -675,11 +721,11 @@ } }, "@babel/plugin-transform-modules-umd": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.13.0.tgz", - "integrity": "sha512-D/ILzAh6uyvkWjKKyFE/W0FzWwasv6vPTSqPcjxFqn6QpX3u8DjRVliq4F2BamO2Wee/om06Vyy+vPkNrd4wxw==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.0.tgz", + "integrity": "sha512-nPZdnWtXXeY7I87UZr9VlsWme3Y0cfFFE41Wbxz4bbaexAjNMInXPFUpRRUJ8NoMm0Cw+zxbqjdPmLhcjfazMw==", "requires": { - "@babel/helper-module-transforms": "^7.13.0", + "@babel/helper-module-transforms": "^7.14.0", "@babel/helper-plugin-utils": "^7.13.0" } }, @@ -717,9 +763,9 @@ } }, "@babel/plugin-transform-parameters": { - "version": "7.13.0", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.13.0.tgz", - "integrity": "sha512-Jt8k/h/mIwE2JFEOb3lURoY5C85ETcYPnbuAJ96zRBzh1XHtQZfs62ChZ6EP22QlC8c7Xqr9q+e1SU5qttwwjw==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.14.2.tgz", + "integrity": "sha512-NxoVmA3APNCC1JdMXkdYXuQS+EMdqy0vIwyDHeKHiJKRxmp1qGSdb0JLEIoPRhkx6H/8Qi3RJ3uqOCYw8giy9A==", "requires": { "@babel/helper-plugin-utils": "^7.13.0" } @@ -733,23 +779,23 @@ } }, "@babel/plugin-transform-react-display-name": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.12.13.tgz", - "integrity": "sha512-MprESJzI9O5VnJZrL7gg1MpdqmiFcUv41Jc7SahxYsNP2kDkFqClxxTZq+1Qv4AFCamm+GXMRDQINNn+qrxmiA==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-display-name/-/plugin-transform-react-display-name-7.14.2.tgz", + "integrity": "sha512-zCubvP+jjahpnFJvPaHPiGVfuVUjXHhFvJKQdNnsmSsiU9kR/rCZ41jHc++tERD2zV+p7Hr6is+t5b6iWTCqSw==", "requires": { - "@babel/helper-plugin-utils": "^7.12.13" + "@babel/helper-plugin-utils": "^7.13.0" } }, "@babel/plugin-transform-react-jsx": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.13.12.tgz", - "integrity": "sha512-jcEI2UqIcpCqB5U5DRxIl0tQEProI2gcu+g8VTIqxLO5Iidojb4d77q+fwGseCvd8af/lJ9masp4QWzBXFE2xA==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx/-/plugin-transform-react-jsx-7.14.3.tgz", + "integrity": "sha512-uuxuoUNVhdgYzERiHHFkE4dWoJx+UFVyuAl0aqN8P2/AKFHwqgUC5w2+4/PjpKXJsFgBlYAFXlUmDQ3k3DUkXw==", "requires": { "@babel/helper-annotate-as-pure": "^7.12.13", "@babel/helper-module-imports": "^7.13.12", "@babel/helper-plugin-utils": "^7.13.0", "@babel/plugin-syntax-jsx": "^7.12.13", - "@babel/types": "^7.13.12" + "@babel/types": "^7.14.2" } }, "@babel/plugin-transform-react-jsx-development": { @@ -770,9 +816,9 @@ } }, "@babel/plugin-transform-regenerator": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.12.13.tgz", - "integrity": "sha512-lxb2ZAvSLyJ2PEe47hoGWPmW22v7CtSl9jW8mingV4H2sEX/JOcrAj2nPuGWi56ERUm2bUpjKzONAuT6HCn2EA==", + "version": "7.13.15", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.13.15.tgz", + "integrity": "sha512-Bk9cOLSz8DiurcMETZ8E2YtIVJbFCPGW28DJWUakmyVWtQSm6Wsf0p4B4BfEr/eL2Nkhe/CICiUiMOCi1TPhuQ==", "requires": { "regenerator-transform": "^0.14.2" } @@ -786,15 +832,15 @@ } }, "@babel/plugin-transform-runtime": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.13.10.tgz", - "integrity": "sha512-Y5k8ipgfvz5d/76tx7JYbKQTcgFSU6VgJ3kKQv4zGTKr+a9T/KBvfRvGtSFgKDQGt/DBykQixV0vNWKIdzWErA==", + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.14.3.tgz", + "integrity": "sha512-t960xbi8wpTFE623ef7sd+UpEC5T6EEguQlTBJDEO05+XwnIWVfuqLw/vdLWY6IdFmtZE+65CZAfByT39zRpkg==", "requires": { - "@babel/helper-module-imports": "^7.12.13", + "@babel/helper-module-imports": "^7.13.12", "@babel/helper-plugin-utils": "^7.13.0", - "babel-plugin-polyfill-corejs2": "^0.1.4", - "babel-plugin-polyfill-corejs3": "^0.1.3", - "babel-plugin-polyfill-regenerator": "^0.1.2", + "babel-plugin-polyfill-corejs2": "^0.2.0", + "babel-plugin-polyfill-corejs3": "^0.2.0", + "babel-plugin-polyfill-regenerator": "^0.2.0", "semver": "^6.3.0" } }, @@ -839,6 +885,16 @@ "@babel/helper-plugin-utils": "^7.12.13" } }, + "@babel/plugin-transform-typescript": { + "version": "7.14.3", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.14.3.tgz", + "integrity": "sha512-G5Bb5pY6tJRTC4ag1visSgiDoGgJ1u1fMUgmc2ijLkcIdzP83Q1qyZX4ggFQ/SkR+PNOatkaYC+nKcTlpsX4ag==", + "requires": { + "@babel/helper-create-class-features-plugin": "^7.14.3", + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/plugin-syntax-typescript": "^7.12.13" + } + }, "@babel/plugin-transform-unicode-escapes": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.12.13.tgz", @@ -857,30 +913,33 @@ } }, "@babel/preset-env": { - "version": "7.13.12", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.13.12.tgz", - "integrity": "sha512-JzElc6jk3Ko6zuZgBtjOd01pf9yYDEIH8BcqVuYIuOkzOwDesoa/Nz4gIo4lBG6K861KTV9TvIgmFuT6ytOaAA==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.14.2.tgz", + "integrity": "sha512-7dD7lVT8GMrE73v4lvDEb85cgcQhdES91BSD7jS/xjC6QY8PnRhux35ac+GCpbiRhp8crexBvZZqnaL6VrY8TQ==", "requires": { - "@babel/compat-data": "^7.13.12", - "@babel/helper-compilation-targets": "^7.13.10", + "@babel/compat-data": "^7.14.0", + "@babel/helper-compilation-targets": "^7.13.16", "@babel/helper-plugin-utils": "^7.13.0", "@babel/helper-validator-option": "^7.12.17", "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.13.12", - "@babel/plugin-proposal-async-generator-functions": "^7.13.8", + "@babel/plugin-proposal-async-generator-functions": "^7.14.2", "@babel/plugin-proposal-class-properties": "^7.13.0", - "@babel/plugin-proposal-dynamic-import": "^7.13.8", - "@babel/plugin-proposal-export-namespace-from": "^7.12.13", - "@babel/plugin-proposal-json-strings": "^7.13.8", - "@babel/plugin-proposal-logical-assignment-operators": "^7.13.8", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.13.8", - "@babel/plugin-proposal-numeric-separator": "^7.12.13", - "@babel/plugin-proposal-object-rest-spread": "^7.13.8", - "@babel/plugin-proposal-optional-catch-binding": "^7.13.8", - "@babel/plugin-proposal-optional-chaining": "^7.13.12", + "@babel/plugin-proposal-class-static-block": "^7.13.11", + "@babel/plugin-proposal-dynamic-import": "^7.14.2", + "@babel/plugin-proposal-export-namespace-from": "^7.14.2", + "@babel/plugin-proposal-json-strings": "^7.14.2", + "@babel/plugin-proposal-logical-assignment-operators": "^7.14.2", + "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.2", + "@babel/plugin-proposal-numeric-separator": "^7.14.2", + "@babel/plugin-proposal-object-rest-spread": "^7.14.2", + "@babel/plugin-proposal-optional-catch-binding": "^7.14.2", + "@babel/plugin-proposal-optional-chaining": "^7.14.2", "@babel/plugin-proposal-private-methods": "^7.13.0", + "@babel/plugin-proposal-private-property-in-object": "^7.14.0", "@babel/plugin-proposal-unicode-property-regex": "^7.12.13", "@babel/plugin-syntax-async-generators": "^7.8.4", "@babel/plugin-syntax-class-properties": "^7.12.13", + "@babel/plugin-syntax-class-static-block": "^7.12.13", "@babel/plugin-syntax-dynamic-import": "^7.8.3", "@babel/plugin-syntax-export-namespace-from": "^7.8.3", "@babel/plugin-syntax-json-strings": "^7.8.3", @@ -890,14 +949,15 @@ "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", "@babel/plugin-syntax-optional-chaining": "^7.8.3", + "@babel/plugin-syntax-private-property-in-object": "^7.14.0", "@babel/plugin-syntax-top-level-await": "^7.12.13", "@babel/plugin-transform-arrow-functions": "^7.13.0", "@babel/plugin-transform-async-to-generator": "^7.13.0", "@babel/plugin-transform-block-scoped-functions": "^7.12.13", - "@babel/plugin-transform-block-scoping": "^7.12.13", - "@babel/plugin-transform-classes": "^7.13.0", + "@babel/plugin-transform-block-scoping": "^7.14.2", + "@babel/plugin-transform-classes": "^7.14.2", "@babel/plugin-transform-computed-properties": "^7.13.0", - "@babel/plugin-transform-destructuring": "^7.13.0", + "@babel/plugin-transform-destructuring": "^7.13.17", "@babel/plugin-transform-dotall-regex": "^7.12.13", "@babel/plugin-transform-duplicate-keys": "^7.12.13", "@babel/plugin-transform-exponentiation-operator": "^7.12.13", @@ -905,16 +965,16 @@ "@babel/plugin-transform-function-name": "^7.12.13", "@babel/plugin-transform-literals": "^7.12.13", "@babel/plugin-transform-member-expression-literals": "^7.12.13", - "@babel/plugin-transform-modules-amd": "^7.13.0", - "@babel/plugin-transform-modules-commonjs": "^7.13.8", + "@babel/plugin-transform-modules-amd": "^7.14.2", + "@babel/plugin-transform-modules-commonjs": "^7.14.0", "@babel/plugin-transform-modules-systemjs": "^7.13.8", - "@babel/plugin-transform-modules-umd": "^7.13.0", + "@babel/plugin-transform-modules-umd": "^7.14.0", "@babel/plugin-transform-named-capturing-groups-regex": "^7.12.13", "@babel/plugin-transform-new-target": "^7.12.13", "@babel/plugin-transform-object-super": "^7.12.13", - "@babel/plugin-transform-parameters": "^7.13.0", + "@babel/plugin-transform-parameters": "^7.14.2", "@babel/plugin-transform-property-literals": "^7.12.13", - "@babel/plugin-transform-regenerator": "^7.12.13", + "@babel/plugin-transform-regenerator": "^7.13.15", "@babel/plugin-transform-reserved-words": "^7.12.13", "@babel/plugin-transform-shorthand-properties": "^7.12.13", "@babel/plugin-transform-spread": "^7.13.0", @@ -924,10 +984,10 @@ "@babel/plugin-transform-unicode-escapes": "^7.12.13", "@babel/plugin-transform-unicode-regex": "^7.12.13", "@babel/preset-modules": "^0.1.4", - "@babel/types": "^7.13.12", - "babel-plugin-polyfill-corejs2": "^0.1.4", - "babel-plugin-polyfill-corejs3": "^0.1.3", - "babel-plugin-polyfill-regenerator": "^0.1.2", + "@babel/types": "^7.14.2", + "babel-plugin-polyfill-corejs2": "^0.2.0", + "babel-plugin-polyfill-corejs3": "^0.2.0", + "babel-plugin-polyfill-regenerator": "^0.2.0", "core-js-compat": "^3.9.0", "semver": "^6.3.0" } @@ -957,10 +1017,20 @@ "@babel/plugin-transform-react-pure-annotations": "^7.12.1" } }, + "@babel/preset-typescript": { + "version": "7.13.0", + "resolved": "https://registry.npmjs.org/@babel/preset-typescript/-/preset-typescript-7.13.0.tgz", + "integrity": "sha512-LXJwxrHy0N3f6gIJlYbLta1D9BDtHpQeqwzM0LIfjDlr6UE/D5Mc7W4iDiQzaE+ks0sTjT26ArcHWnJVt0QiHw==", + "requires": { + "@babel/helper-plugin-utils": "^7.13.0", + "@babel/helper-validator-option": "^7.12.17", + "@babel/plugin-transform-typescript": "^7.13.0" + } + }, "@babel/runtime": { - "version": "7.13.10", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.13.10.tgz", - "integrity": "sha512-4QPkjJq6Ns3V/RgpEahRk+AGfL0eO6RHHtTWoNNr5mO49G6B5+X6d6THgWEAvTrznU5xYpbAlVKRYcsCgh/Akw==", + "version": "7.14.0", + "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.14.0.tgz", + "integrity": "sha512-JELkvo/DlpNdJ7dlyw/eY7E0suy5i5GQH+Vlxaq1nsNJ+H7f4Vtv3jMeCEgRhZZQFXTjldYfQgv2qmM6M1v5wA==", "requires": { "regenerator-runtime": "^0.13.4" } @@ -976,30 +1046,34 @@ } }, "@babel/traverse": { - "version": "7.13.13", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.13.13.tgz", - "integrity": "sha512-CblEcwmXKR6eP43oQGG++0QMTtCjAsa3frUuzHoiIJWpaIIi8dwMyEFUJoXRLxagGqCK+jALRwIO+o3R9p/uUg==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.14.2.tgz", + "integrity": "sha512-TsdRgvBFHMyHOOzcP9S6QU0QQtjxlRpEYOy3mcCO5RgmC305ki42aSAmfZEMSSYBla2oZ9BMqYlncBaKmD/7iA==", "requires": { "@babel/code-frame": "^7.12.13", - "@babel/generator": "^7.13.9", - "@babel/helper-function-name": "^7.12.13", + "@babel/generator": "^7.14.2", + "@babel/helper-function-name": "^7.14.2", "@babel/helper-split-export-declaration": "^7.12.13", - "@babel/parser": "^7.13.13", - "@babel/types": "^7.13.13", + "@babel/parser": "^7.14.2", + "@babel/types": "^7.14.2", "debug": "^4.1.0", "globals": "^11.1.0" } }, "@babel/types": { - "version": "7.13.14", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.13.14.tgz", - "integrity": "sha512-A2aa3QTkWoyqsZZFl56MLUsfmh7O0gN41IPvXAE/++8ojpbz12SszD7JEGYVdn4f9Kt4amIei07swF1h4AqmmQ==", + "version": "7.14.2", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.14.2.tgz", + "integrity": "sha512-SdjAG/3DikRHpUOjxZgnkbR11xUlyDMUFJdvnIgZEE16mqmY0BINMmc4//JMJglEmn6i7sq6p+mGrFWyZ98EEw==", "requires": { - "@babel/helper-validator-identifier": "^7.12.11", - "lodash": "^4.17.19", + "@babel/helper-validator-identifier": "^7.14.0", "to-fast-properties": "^2.0.0" } }, + "@polka/url": { + "version": "1.0.0-next.15", + "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.15.tgz", + "integrity": "sha512-15spi3V28QdevleWBNXE4pIls3nFZmBbUGrW9IVPwiQczuSb9n76TCB4bsk8TSel+I1OkHEdPhu5QKMfY6rQHA==" + }, "@types/json-schema": { "version": "7.0.7", "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.7.tgz", @@ -1173,9 +1247,14 @@ "integrity": "sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ==" }, "acorn": { - "version": "6.4.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", - "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==" + "version": "8.2.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.2.4.tgz", + "integrity": "sha512-Ibt84YwBDDA890eDiDCEqcbwvHlBvzzDkU2cGBBDDI1QWT12jTiXIOn2CIw5KK4i6N5Z2HUxwYjzriDyqaqqZg==" + }, + "acorn-walk": { + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.1.0.tgz", + "integrity": "sha512-mjmzmv12YIG/G8JQdQuz2MUDShEJ6teYpT5bmWA4q7iwoGen8xtt3twF3OvzIUl+Q06aWIjvnwQUKvQ6TtMRjg==" }, "ajv": { "version": "6.12.6", @@ -1212,9 +1291,9 @@ } }, "anymatch": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", - "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", + "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "optional": true, "requires": { "normalize-path": "^3.0.0", @@ -1324,36 +1403,36 @@ } }, "babel-plugin-polyfill-corejs2": { - "version": "0.1.10", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.1.10.tgz", - "integrity": "sha512-DO95wD4g0A8KRaHKi0D51NdGXzvpqVLnLu5BTvDlpqUEpTmeEtypgC1xqesORaWmiUOQI14UHKlzNd9iZ2G3ZA==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz", + "integrity": "sha512-kISrENsJ0z5dNPq5eRvcctITNHYXWOA4DUZRFYCz3jYCcvTb/A546LIddmoGNMVYg2U38OyFeNosQwI9ENTqIQ==", "requires": { - "@babel/compat-data": "^7.13.0", - "@babel/helper-define-polyfill-provider": "^0.1.5", + "@babel/compat-data": "^7.13.11", + "@babel/helper-define-polyfill-provider": "^0.2.2", "semver": "^6.1.1" } }, "babel-plugin-polyfill-corejs3": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.1.7.tgz", - "integrity": "sha512-u+gbS9bbPhZWEeyy1oR/YaaSpod/KDT07arZHb80aTpl8H5ZBq+uN1nN9/xtX7jQyfLdPfoqI4Rue/MQSWJquw==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.2.tgz", + "integrity": "sha512-l1Cf8PKk12eEk5QP/NQ6TH8A1pee6wWDJ96WjxrMXFLHLOBFzYM4moG80HFgduVhTqAFez4alnZKEhP/bYHg0A==", "requires": { - "@babel/helper-define-polyfill-provider": "^0.1.5", - "core-js-compat": "^3.8.1" + "@babel/helper-define-polyfill-provider": "^0.2.2", + "core-js-compat": "^3.9.1" } }, "babel-plugin-polyfill-regenerator": { - "version": "0.1.6", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.1.6.tgz", - "integrity": "sha512-OUrYG9iKPKz8NxswXbRAdSwF0GhRdIEMTloQATJi4bDuFqrXaXcCUT/VGNrr8pBcjMh1RxZ7Xt9cytVJTJfvMg==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.2.tgz", + "integrity": "sha512-Goy5ghsc21HgPDFtzRkSirpZVW35meGoTmTOb2bxqdl60ghub4xOidgNTHaZfQ2FaxQsKmwvXtOAkcIS4SMBWg==", "requires": { - "@babel/helper-define-polyfill-provider": "^0.1.5" + "@babel/helper-define-polyfill-provider": "^0.2.2" } }, "balanced-match": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", - "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=" + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" }, "base": { "version": "0.11.2", @@ -1557,15 +1636,15 @@ } }, "browserslist": { - "version": "4.16.3", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.3.tgz", - "integrity": "sha512-vIyhWmIkULaq04Gt93txdh+j02yX/JzlyhLYbV3YQCn/zvES3JnY7TifHHvvr1w5hTDluNKMkV05cs4vy8Q7sw==", + "version": "4.16.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.16.6.tgz", + "integrity": "sha512-Wspk/PqO+4W9qp5iUTJsa1B/QrYn1keNCcEP5OvP7WBwT4KaDly0uONYmC6Xa3Z5IqnUgS0KcgLYu1l74x0ZXQ==", "requires": { - "caniuse-lite": "^1.0.30001181", - "colorette": "^1.2.1", - "electron-to-chromium": "^1.3.649", + "caniuse-lite": "^1.0.30001219", + "colorette": "^1.2.2", + "electron-to-chromium": "^1.3.723", "escalade": "^3.1.1", - "node-releases": "^1.1.70" + "node-releases": "^1.1.71" } }, "buffer": { @@ -1646,9 +1725,9 @@ "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==" }, "caniuse-lite": { - "version": "1.0.30001207", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001207.tgz", - "integrity": "sha512-UPQZdmAsyp2qfCTiMU/zqGSWOYaY9F9LL61V8f+8MrubsaDGpaHD9HRV/EWZGULZn0Hxu48SKzI5DgFwTvHuYw==" + "version": "1.0.30001230", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001230.tgz", + "integrity": "sha512-5yBd5nWCBS+jWKTcHOzXwo5xzcj4ePE/yjtkZyUV1BTUmrBaA9MRGC+e7mxnqXSA90CmCA8L3eKLaSUkt099IQ==" }, "chalk": { "version": "2.4.2", @@ -1717,12 +1796,9 @@ "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==" }, "chrome-trace-event": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.2.tgz", - "integrity": "sha512-9e/zx1jw7B4CO+c/RXoCsfg/x1AfUBioy4owYH0bJprEYAx5hRFLRhWBqHAG57D0ZM4H7vxbP7bPe0VwhQRYDQ==", - "requires": { - "tslib": "^1.9.0" - } + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz", + "integrity": "sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg==" }, "cipher-base": { "version": "1.0.4", @@ -1792,9 +1868,9 @@ "integrity": "sha512-MKGMzyfeuutC/ZJ1cba9NqcNpfeqMUcYmyF1ZFY6/Cn7CNSAKx6a+s48sqLqyAiZuaP2TcqMhoo+dlwFnVxT9w==" }, "commander": { - "version": "2.20.3", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", - "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", + "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==" }, "commondir": { "version": "1.0.1", @@ -1859,11 +1935,11 @@ "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=" }, "core-js-compat": { - "version": "3.10.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.10.0.tgz", - "integrity": "sha512-9yVewub2MXNYyGvuLnMHcN1k9RkvB7/ofktpeKTIaASyB88YYqGzUnu0ywMMhJrDHOMiTjSHWGzR+i7Wb9Z1kQ==", + "version": "3.13.0", + "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.13.0.tgz", + "integrity": "sha512-jhbI2zpVskgfDC9mGRaDo1gagd0E0i/kYW0+WvibL/rafEHKAHO653hEXIxJHqRlRLITluXtRH3AGTL5qJmifQ==", "requires": { - "browserslist": "^4.16.3", + "browserslist": "^4.16.6", "semver": "7.0.0" }, "dependencies": { @@ -2061,6 +2137,11 @@ "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==" }, + "duplexer": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/duplexer/-/duplexer-0.1.2.tgz", + "integrity": "sha512-jtD6YG370ZCIi/9GTaJKQxWTZD045+4R4hTk/x1UyoqadyJ9x9CgSi1RlVDQF8U2sxLLSnFkCaMihqljHIWgMg==" + }, "duplexify": { "version": "3.7.1", "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", @@ -2073,9 +2154,9 @@ } }, "electron-to-chromium": { - "version": "1.3.707", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.707.tgz", - "integrity": "sha512-BqddgxNPrcWnbDdJw7SzXVzPmp+oiyjVrc7tkQVaznPGSS9SKZatw6qxoP857M+HbOyyqJQwYQtsuFIMSTNSZA==" + "version": "1.3.741", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.741.tgz", + "integrity": "sha512-4i3T0cwnHo1O4Mnp9JniEco8bZiXoqbm3PhW5hv7uu8YLg35iajYrRnNyKFaN8/8SSTskU2hYqVTeYVPceSpUA==" }, "elliptic": { "version": "6.5.4", @@ -2407,19 +2488,23 @@ "dev": true }, "flarum-webpack-config": { - "version": "0.1.0-beta.10", - "resolved": "https://registry.npmjs.org/flarum-webpack-config/-/flarum-webpack-config-0.1.0-beta.10.tgz", - "integrity": "sha512-Iri/5sGBW4ebUQIZw9thR3LdS/avhdlgqgOxy2so1Abh6IyVNjaHInPgHNJSCMxbvfQJz4K3kcsbIpjwi3YB+g==", + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/flarum-webpack-config/-/flarum-webpack-config-1.0.0.tgz", + "integrity": "sha512-T+olIRaIVetPJMP8xlbMnp7tzT/d/ZWI6Mr7twRBdsKbKO7dpKS2+fjnKL6QqNYgOLElT/TWrRSbTp7EiL1yXA==", "requires": { - "@babel/core": "^7.0.0", - "@babel/plugin-proposal-class-properties": "^7.0.0", - "@babel/plugin-transform-object-assign": "^7.0.0", - "@babel/plugin-transform-react-jsx": "^7.0.0", - "@babel/plugin-transform-runtime": "^7.0.0", - "@babel/preset-env": "^7.0.0", - "@babel/preset-react": "^7.0.0", - "@babel/runtime": "^7.0.0", - "babel-loader": "^8.0.0" + "@babel/core": "^7.14.3", + "@babel/plugin-proposal-class-properties": "^7.13.0", + "@babel/plugin-proposal-private-methods": "^7.13.0", + "@babel/plugin-transform-object-assign": "^7.12.13", + "@babel/plugin-transform-react-jsx": "^7.14.3", + "@babel/plugin-transform-runtime": "^7.14.3", + "@babel/preset-env": "^7.14.2", + "@babel/preset-react": "^7.13.13", + "@babel/preset-typescript": "^7.13.0", + "@babel/runtime": "^7.14.0", + "babel-loader": "^8.2.2", + "typescript": "^4.3.2", + "webpack-bundle-analyzer": "^4.4.2" } }, "flush-write-stream": { @@ -2506,9 +2591,9 @@ "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=" }, "glob": { - "version": "7.1.6", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", - "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "version": "7.1.7", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", + "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", "requires": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", @@ -2569,6 +2654,14 @@ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.6.tgz", "integrity": "sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==" }, + "gzip-size": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-6.0.0.tgz", + "integrity": "sha512-ax7ZYomf6jqPTQ4+XCpUGyXKHk5WweS+e05MBO4/y3WJ5RkmPXNKvX+bx1behVILVwr6JSQvZAku021CHPXG3Q==", + "requires": { + "duplexer": "^0.1.2" + } + }, "has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", @@ -2801,9 +2894,9 @@ "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "is-core-module": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", - "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.4.0.tgz", + "integrity": "sha512-6A2fkfq1rfeQZjxrZJGerpLCTHRNEBiSgnu0+obeJpEPZRUooHgsizvzv0ZjJwOz3iWIHdJtVWJ/tmPr3D21/A==", "requires": { "has": "^1.0.3" } @@ -3077,6 +3170,11 @@ } } }, + "mime": { + "version": "2.5.2", + "resolved": "https://registry.npmjs.org/mime/-/mime-2.5.2.tgz", + "integrity": "sha512-tqkh47FzKeCPD2PUiPB6pkbMzsCasjxAfC62/Wap5qrUWcb+sFasXUC5I3gYM5iBM8v/Qpn4UK0x+j0iHyFPDg==" + }, "minimalistic-assert": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", @@ -3228,9 +3326,9 @@ } }, "node-releases": { - "version": "1.1.71", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.71.tgz", - "integrity": "sha512-zR6HoT6LrLCRBwukmrVbHv0EpEQjksO6GmFcZQQuCAy139BEsoVKPYnf3jongYW83fAa1torLGYwxxky/p28sg==" + "version": "1.1.72", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.72.tgz", + "integrity": "sha512-LLUo+PpH3dU6XizX3iVoubUNheF/owjXCZZ5yACDxNnPtgFuludV1ZL3ayK1kVep42Rmm0+R9/Y60NQbZ2bifw==" }, "normalize-path": { "version": "3.0.0", @@ -3311,6 +3409,11 @@ "wrappy": "1" } }, + "opener": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/opener/-/opener-1.5.2.tgz", + "integrity": "sha512-ur5UIdyw5Y7yEj9wLzhqXiy6GZ3Mwx0yGI+5sMn2r0N0v3cKJvUmFH5yPP+WXh9e0xfyzyJX95D8l088DNFj7A==" + }, "os-browserify": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", @@ -3401,14 +3504,14 @@ "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=" }, "path-parse": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", - "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==" + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", + "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==" }, "pbkdf2": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", - "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.2.tgz", + "integrity": "sha512-iuh7L6jA7JEGu2WxDwtQP1ddOpaJNC4KlDEFfdQajSGgGPNi4OyDc2R7QnbY2bR9QjBVGwgvTdNJZoE7RaxUMA==", "requires": { "create-hash": "^1.1.2", "create-hmac": "^1.1.4", @@ -3418,9 +3521,9 @@ } }, "picomatch": { - "version": "2.2.2", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", - "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", + "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", "optional": true }, "pify": { @@ -3442,9 +3545,9 @@ "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=" }, "prettier": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.2.1.tgz", - "integrity": "sha512-PqyhM2yCjg/oKkFPtTGUojv7gnZAoG80ttl45O6x2Ug/rMJw4wcc9k6aaf2hibP7BGVCCM33gZoGjyvt9mm16Q==", + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/prettier/-/prettier-2.3.0.tgz", + "integrity": "sha512-kXtO4s0Lz/DW/IJ9QdWhAf7/NmPWQXkFr/r/WkR3vyI+0v8amTDxiaQSLzs8NBlytfLWX/7uQUMIW677yLKl4w==", "dev": true }, "process": { @@ -3647,9 +3750,9 @@ "optional": true }, "repeat-element": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", - "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==" + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.4.tgz", + "integrity": "sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==" }, "repeat-string": { "version": "1.6.1", @@ -3838,6 +3941,16 @@ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=" }, + "sirv": { + "version": "1.0.12", + "resolved": "https://registry.npmjs.org/sirv/-/sirv-1.0.12.tgz", + "integrity": "sha512-+jQoCxndz7L2tqQL4ZyzfDhky0W/4ZJip3XoOuxyQWnAwMxindLl3Xv1qT4x1YX/re0leShvTm8Uk0kQspGhBg==", + "requires": { + "@polka/url": "^1.0.0-next.15", + "mime": "^2.3.1", + "totalist": "^1.0.0" + } + }, "snapdragon": { "version": "0.8.2", "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", @@ -4110,6 +4223,11 @@ "source-map-support": "~0.5.12" }, "dependencies": { + "commander": { + "version": "2.20.3", + "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz", + "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==" + }, "source-map": { "version": "0.6.1", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", @@ -4277,10 +4395,10 @@ "repeat-string": "^1.6.1" } }, - "tslib": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", - "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==" + "totalist": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/totalist/-/totalist-1.1.0.tgz", + "integrity": "sha512-gduQwd1rOdDMGxFG1gEvhV88Oirdo2p+KjoYFU7k2g+i7n6AFFbDQ5kMPUsW0pNbfQsB/cwXvT1i4Bue0s9g5g==" }, "tty-browserify": { "version": "0.0.0", @@ -4292,6 +4410,11 @@ "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=" }, + "typescript": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.3.2.tgz", + "integrity": "sha512-zZ4hShnmnoVnAHpVHWpTcxdv7dWP60S2FsydQLV8V5PbS3FifjWFFRiHSWpDJahly88PRyV5teTSLoq4eG7mKw==" + }, "unicode-canonical-property-names-ecmascript": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-1.0.4.tgz", @@ -4595,6 +4718,11 @@ "webpack-sources": "^1.4.1" }, "dependencies": { + "acorn": { + "version": "6.4.2", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-6.4.2.tgz", + "integrity": "sha512-XtGIhXwF8YM8bJhGxG5kXgjkEuNGLTkoYqVE+KMR+aspr4KGYmKYg7yUe3KghyQ9yheNwLnjmzh/7+gfDBmHCQ==" + }, "schema-utils": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/schema-utils/-/schema-utils-1.0.0.tgz", @@ -4607,6 +4735,67 @@ } } }, + "webpack-bundle-analyzer": { + "version": "4.4.2", + "resolved": "https://registry.npmjs.org/webpack-bundle-analyzer/-/webpack-bundle-analyzer-4.4.2.tgz", + "integrity": "sha512-PIagMYhlEzFfhMYOzs5gFT55DkUdkyrJi/SxJp8EF3YMWhS+T9vvs2EoTetpk5qb6VsCq02eXTlRDOydRhDFAQ==", + "requires": { + "acorn": "^8.0.4", + "acorn-walk": "^8.0.0", + "chalk": "^4.1.0", + "commander": "^6.2.0", + "gzip-size": "^6.0.0", + "lodash": "^4.17.20", + "opener": "^1.5.2", + "sirv": "^1.0.7", + "ws": "^7.3.1" + }, + "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "requires": { + "color-convert": "^2.0.1" + } + }, + "chalk": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.1.tgz", + "integrity": "sha512-diHzdDKxcU+bAsUboHLPEDQiw0qEe0qd7SYUn3HgcFlWgbDcfLGswOHYeGrHKzG9z6UYf01d9VFMfZxPM1xZSg==", + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==" + }, + "supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "requires": { + "has-flag": "^4.0.0" + } + } + } + }, "webpack-cli": { "version": "3.3.12", "resolved": "https://registry.npmjs.org/webpack-cli/-/webpack-cli-3.3.12.tgz", @@ -4687,15 +4876,20 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, + "ws": { + "version": "7.4.6", + "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", + "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==" + }, "xtend": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==" }, "y18n": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.1.tgz", - "integrity": "sha512-wNcy4NvjMYL8gogWWYAO7ZFWFfHcbdbE57tZO8e4cbpj8tfUcwrwqSl3ad8HxpYWCdXcJUCeKKZS62Av1affwQ==" + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.3.tgz", + "integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==" }, "yallist": { "version": "3.1.1", diff --git a/js/package.json b/js/package.json index f5e9fb3..ad9172b 100644 --- a/js/package.json +++ b/js/package.json @@ -2,7 +2,7 @@ "name": "@fof/pages", "private": true, "dependencies": { - "flarum-webpack-config": "^0.1.0-beta.10", + "flarum-webpack-config": "^1.0", "webpack": "^4.43.0", "webpack-cli": "^3.3.12" }, @@ -12,7 +12,7 @@ "lint": "prettier --single-quote --trailing-comma es5 --print-width 150 --tab-width 4 --write src" }, "devDependencies": { - "flarum": "0.1.0-beta.16", + "flarum": "^0.1.0-beta.16", "prettier": "^2.2.1" } } diff --git a/js/src/admin/components/PagesListItem.js b/js/src/admin/components/PagesListItem.js index 005a041..37b96c8 100644 --- a/js/src/admin/components/PagesListItem.js +++ b/js/src/admin/components/PagesListItem.js @@ -60,7 +60,7 @@ export default class PagesListItem extends Component { pages_home: page.id(), }) .then(() => { - app.alerts.show({ type: 'success' }, app.translator.trans('core.admin.basics.saved_message')); + app.alerts.show({ type: 'success' }, app.translator.trans('fof-pages.admin.edit_page.set_as_home_page_done')); }) .catch(() => {}) .then(() => { diff --git a/resources/locale/en.yml b/resources/locale/en.yml index 6920b71..05512c6 100755 --- a/resources/locale/en.yml +++ b/resources/locale/en.yml @@ -9,6 +9,7 @@ fof-pages: restricted_label: Restrict access (configure who can access in the Permissions tab) html_label: Enable HTML set_as_home_page_confirmation: "Are you sure you want to set this page as your home page?" + set_as_home_page_done: Home page updated slug_label: => fof-pages.ref.slug slug_placeholder: => fof-pages.ref.slug submit_button: => core.ref.save_changes diff --git a/src/Content/Page.php b/src/Content/Page.php index eddd50c..1b9be6f 100644 --- a/src/Content/Page.php +++ b/src/Content/Page.php @@ -16,8 +16,6 @@ use Flarum\Http\Exception\RouteNotFoundException; use Flarum\Http\UrlGenerator; use Flarum\Settings\SettingsRepositoryInterface; -use Flarum\User\User; -use FoF\Pages\Api\Controller\ShowPageController; use Illuminate\Contracts\View\Factory; use Illuminate\Support\Arr; use Psr\Http\Message\ServerRequestInterface; @@ -44,12 +42,6 @@ class Page */ protected $view; - /** - * @param Client $api - * @param UrlGenerator $url - * @param SettingsRepositoryInterface $settings - * @param Factory $view - */ public function __construct(Client $api, UrlGenerator $url, SettingsRepositoryInterface $settings, Factory $view) { $this->api = $api; @@ -62,30 +54,18 @@ public function __invoke(Document $document, ServerRequestInterface $request) { $queryParams = $request->getQueryParams(); - $params = [ - 'id' => Arr::get($queryParams, 'id') ?? $this->settings->get('pages_home'), - ]; + $id = Arr::get($queryParams, 'id') ?? $this->settings->get('pages_home'); - $apiDocument = $this->getApiDocument($request->getAttribute('actor'), $params); + $apiDocument = $this->getApiDocument($request, $id); $document->content = $this->view->make('fof-pages::content.page', compact('apiDocument')); $document->payload['apiDocument'] = $apiDocument; - - return $document; } - /** - * Get the result of an API request to list discussions. - * - * @param User $actor - * @param array $params - * - * @return object - */ - private function getApiDocument(User $actor, array $params) + private function getApiDocument(ServerRequestInterface $request, $id) { - $response = $this->api->send(ShowPageController::class, $actor, $params); + $response = $this->api->withParentRequest($request)->get('/pages/'.$id); if ($response->getStatusCode() === 404) { throw new RouteNotFoundException(); diff --git a/src/Providers/SearchServiceProvider.php b/src/Providers/SearchServiceProvider.php deleted file mode 100644 index 407d4a7..0000000 --- a/src/Providers/SearchServiceProvider.php +++ /dev/null @@ -1,29 +0,0 @@ -container->extend('flarum.simple_search.fulltext_gambits', function ($oldFulltextGambits) { - $oldFulltextGambits[PageSearcher::class] = NoOpGambit::class; - - return $oldFulltextGambits; - }); - } -}