mirror of
https://github.com/flarum/framework.git
synced 2024-12-13 23:53:42 +08:00
9feb9dd4eb
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
1 line
8.1 KiB
Plaintext
Generated
1 line
8.1 KiB
Plaintext
Generated
{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,+BCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,iBCAtD,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,4B,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,sB,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,2B,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,uC,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,yB,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,gC,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,4B,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,4B,aCU5D,qBAAqB,mBAAmB,KACtC,yBAAkC,cAAqB,eACvD,IAAAW,QAAO,cAAsB,UAAU,SAAUC,GAC1CC,KAAKC,cAAiBF,EAAMG,IAAI,WACnCH,EAAMI,IAAI,mBAAoBC,EAAE,IAAO,CACrCC,KAAM,mBACNC,KAAM,eACNC,MAAO,qBAAqB,2DAGlC,IACA,yBAA4B,cAAe,cAC3C,yBAA4B,cAAe,eAC3C,IAAAT,QAAO,cAA8B,gBAAgB,SAAUU,GACxDR,KAAKQ,MAAMC,WAAWR,eACzBO,EAAME,WAAa,kCAEvB,KACA,IAAAZ,QAAO,cAAyB,gBAAgB,SAAUU,GACnDR,KAAKQ,MAAMG,KAAKV,eACnBO,EAAME,WAAa,oBAEvB,KACA,IAAAZ,QAAO,cAAuB,eAAe,SAAUC,GAChDC,KAAKQ,MAAMG,KAAKV,cAAiBD,KAAKQ,MAAMG,KAAKC,YACpDb,EAAMI,IAAI,aAAc,qBAAqB,qDAEjD,KACA,IAAAU,UAAS,cAAyB,cAAc,SAAUC,EAAUC,GAClE,MAAoB,aAAhBA,EAAKV,OACA,qBAAqB,qDAEvBS,EAASC,EAClB,KACA,IAAAjB,QAAO,IAAc,uBAAuB,SAAUC,EAAOY,IACtDA,EAAKV,cAAgBU,EAAKK,cAC7BjB,EAAMI,IAAI,UAAWC,EAAE,IAAQ,CAC7BE,KAAM,eACNW,QAAS,uBAAgCN,IACxC,qBAAqB,uDAAwD,GAEpF,IACA,kBAA6B,WAC3BX,KAAKkB,KAAK,CACRjB,YAAY,IAEQ,IAAlBD,KAAKmB,UACPnB,KAAKS,aAAaW,eAAe,CAC/BnB,YAAY,GAGlB,CAAC,IACC,G","sources":["webpack://@flarum/approval/webpack/bootstrap","webpack://@flarum/approval/webpack/runtime/compat get default export","webpack://@flarum/approval/webpack/runtime/define property getters","webpack://@flarum/approval/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/approval/webpack/runtime/make namespace object","webpack://@flarum/approval/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/approval/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/approval/external root \"flarum.reg.get('core', 'common/models/Discussion')\"","webpack://@flarum/approval/external root \"flarum.reg.get('core', 'common/models/Post')\"","webpack://@flarum/approval/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/approval/external root \"flarum.reg.get('core', 'forum/components/DiscussionListItem')\"","webpack://@flarum/approval/external root \"flarum.reg.get('core', 'forum/components/Post')\"","webpack://@flarum/approval/external root \"flarum.reg.get('core', 'forum/components/CommentPost')\"","webpack://@flarum/approval/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/approval/external root \"flarum.reg.get('core', 'forum/utils/PostControls')\"","webpack://@flarum/approval/./src/forum/index.js"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Discussion');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Post');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionListItem');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Post');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/CommentPost');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/PostControls');","import { extend, override } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Post from 'flarum/common/models/Post';\nimport Badge from 'flarum/common/components/Badge';\nimport DiscussionListItem from 'flarum/forum/components/DiscussionListItem';\nimport PostComponent from 'flarum/forum/components/Post';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport Button from 'flarum/common/components/Button';\nimport PostControls from 'flarum/forum/utils/PostControls';\napp.initializers.add('flarum-approval', () => {\n Discussion.prototype.isApproved = Discussion.attribute('isApproved');\n extend(Discussion.prototype, 'badges', function (items) {\n if (!this.isApproved() && !items.has('hidden')) {\n items.add('awaitingApproval', m(Badge, {\n type: \"awaitingApproval\",\n icon: \"fas fa-gavel\",\n label: app.translator.trans('flarum-approval.forum.badge.awaiting_approval_tooltip')\n }));\n }\n });\n Post.prototype.isApproved = Post.attribute('isApproved');\n Post.prototype.canApprove = Post.attribute('canApprove');\n extend(DiscussionListItem.prototype, 'elementAttrs', function (attrs) {\n if (!this.attrs.discussion.isApproved()) {\n attrs.className += ' DiscussionListItem--unapproved';\n }\n });\n extend(PostComponent.prototype, 'elementAttrs', function (attrs) {\n if (!this.attrs.post.isApproved()) {\n attrs.className += ' Post--unapproved';\n }\n });\n extend(CommentPost.prototype, 'headerItems', function (items) {\n if (!this.attrs.post.isApproved() && !this.attrs.post.isHidden()) {\n items.add('unapproved', app.translator.trans('flarum-approval.forum.post.awaiting_approval_text'));\n }\n });\n override(PostComponent.prototype, 'flagReason', function (original, flag) {\n if (flag.type() === 'approval') {\n return app.translator.trans('flarum-approval.forum.post.awaiting_approval_text');\n }\n return original(flag);\n });\n extend(PostControls, 'destructiveControls', function (items, post) {\n if (!post.isApproved() && post.canApprove()) {\n items.add('approve', m(Button, {\n icon: \"fas fa-check\",\n onclick: PostControls.approveAction.bind(post)\n }, app.translator.trans('flarum-approval.forum.post_controls.approve_button')), 10);\n }\n });\n PostControls.approveAction = function () {\n this.save({\n isApproved: true\n });\n if (this.number() === 1) {\n this.discussion().pushAttributes({\n isApproved: true\n });\n }\n };\n}, -10); // set initializer priority to run after reports"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","extend","items","this","isApproved","has","add","m","type","icon","label","attrs","discussion","className","post","isHidden","override","original","flag","canApprove","onclick","save","number","pushAttributes"],"sourceRoot":""} |