framework/extensions/nicknames/js/dist/forum.js.map
2020-11-24 04:19:04 +00:00

1 line
11 KiB
Plaintext

{"version":3,"sources":["webpack://@flarum/nicknames/webpack/bootstrap","webpack://@flarum/nicknames/external \"flarum.core.compat['extend']\"","webpack://@flarum/nicknames/external \"flarum.core.compat['components/Button']\"","webpack://@flarum/nicknames/external \"flarum.core.compat['utils/Stream']\"","webpack://@flarum/nicknames/external \"flarum.core.compat['components/EditUserModal']\"","webpack://@flarum/nicknames/external \"flarum.core.compat['components/SettingsPage']\"","webpack://@flarum/nicknames/external \"flarum.core.compat['utils/extractText']\"","webpack://@flarum/nicknames/external \"flarum.core.compat['components/Modal']\"","webpack://@flarum/nicknames/./src/forum/components/NicknameModal.js","webpack://@flarum/nicknames/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/nicknames/./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","NicknameModal","subClass","superClass","constructor","__proto__","oninit","vnode","this","nickname","Stream","app","session","user","displayName","className","title","translator","trans","content","type","autocomplete","bidi","disabled","loading","Button","component","onsubmit","e","preventDefault","save","errorHandler","onerror","then","hide","redraw","Modal","initializers","add","extend","SettingsPage","items","onclick","modal","show","NickNameModal","EditUserModal","attrs","placeholder","extractText","data","username"],"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,EAGx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,gBAAgB,SAAU+C,GACvDA,EAAMH,IAAI,iBACR,EAAC,IAAD,CAAQvB,UAAU,SAAS2B,QAAS,kBAAM/B,IAAIgC,MAAMC,KAAKC,KACtDlC,IAAIM,WAAWC,MAAM,+DAK5BqB,iBAAOO,IAAcpD,UAAW,UAAU,WACxCc,KAAKC,SAAWC,IAAOF,KAAKuC,MAAMlC,KAAKC,kBAGzCyB,iBAAOO,IAAcpD,UAAW,UAAU,SAAU+C,GAClDA,EAAMH,IAAI,WACR,SAAKvB,UAAU,cACb,eAAQJ,IAAIM,WAAWC,MAAM,sDAC7B,WAAOH,UAAU,cACViC,YAAaC,IAAYtC,IAAIM,WAAWC,MAAM,mDAC9CI,KAAMd,KAAKC,YACZ,QAGZ8B,iBAAOO,IAAcpD,UAAW,QAAQ,SAAUwD,GACnC1C,KAAKuC,MAAMlC,KACpBL,KAAKC,aAAeD,KAAKuC,MAAMlC,KAAKsC,aACtCD,EAAKzC,SAAWD,KAAKC","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 = 9);\n","module.exports = flarum.core.compat['extend'];","module.exports = flarum.core.compat['components/Button'];","module.exports = flarum.core.compat['utils/Stream'];","module.exports = flarum.core.compat['components/EditUserModal'];","module.exports = flarum.core.compat['components/SettingsPage'];","module.exports = flarum.core.compat['utils/extractText'];","module.exports = flarum.core.compat['components/Modal'];","import Modal from 'flarum/components/Modal';\nimport Button from 'flarum/components/Button';\nimport Stream from 'flarum/utils/Stream';\n\nexport default class NicknameModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n this.nickname = Stream(app.session.user.displayName());\n }\n\n className() {\n return 'NickameModal Modal--small';\n }\n\n title() {\n return app.translator.trans('flarum-nicknames.forum.nickname.change');\n }\n\n content() {\n return (\n <div className=\"Modal-body\">\n <div className=\"Form Form--centered\">\n <div className=\"Form-group\">\n <input\n type=\"text\"\n autocomplete=\"off\"\n name=\"nickname\"\n className=\"FormControl\"\n bidi={this.nickname}\n disabled={this.loading} />\n </div>\n <div className=\"Form-group\">\n {Button.component({\n className: 'Button Button--primary Button--block',\n type: 'submit',\n loading: this.loading,\n }, app.translator.trans('flarum-nicknames.forum.nickname.submit_button'))}\n </div>\n </div>\n </div>\n );\n }\n\n onsubmit(e) {\n e.preventDefault();\n\n if (this.nickname() === app.session.user.displayName()) {\n this.hide();\n return;\n }\n\n this.loading = true;\n\n app.session.user.save({ nickname: this.nickname() }, {\n errorHandler: this.onerror.bind(this),\n })\n .then(this.hide.bind(this))\n .catch(() => {\n this.loading = false;\n m.redraw();\n });\n }\n}\n","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import { extend } from 'flarum/extend';\nimport Button from 'flarum/components/Button';\nimport EditUserModal from 'flarum/components/EditUserModal';\nimport SettingsPage from 'flarum/components/SettingsPage';\nimport extractText from 'flarum/utils/extractText';\nimport Stream from 'flarum/utils/Stream';\nimport NickNameModal from './components/NicknameModal';\n\napp.initializers.add('flarum/nicknames', () => {\n extend(SettingsPage.prototype, 'accountItems', function (items) {\n items.add('changeNickname',\n <Button className=\"Button\" onclick={() => app.modal.show(NickNameModal)}>\n {app.translator.trans('flarum-nicknames.forum.settings.change_nickname_button')}\n </Button>\n );\n });\n\n extend(EditUserModal.prototype, 'oninit', function () {\n this.nickname = Stream(this.attrs.user.displayName());\n });\n\n extend(EditUserModal.prototype, 'fields', function (items) {\n items.add('nickname',\n <div className=\"Form-group\">\n <label>{app.translator.trans('flarum-nicknames.forum.edit_user.password_heading')}</label>\n <input className=\"FormControl\"\n placeholder={extractText(app.translator.trans('flarum-nicknames.forum.edit_user.password_text'))}\n bidi={this.nickname} />\n </div>, 100);\n });\n\n extend(EditUserModal.prototype, 'data', function (data) {\n const user = this.attrs.user;\n if (this.nickname() !== this.attrs.user.username()) {\n data.nickname = this.nickname();\n }\n });\n\n\n});\n"],"sourceRoot":""}