mirror of
https://github.com/flarum/framework.git
synced 2025-01-10 04:53:53 +08:00
6cbdfb6aa1
Includes transpiled JS/TS, and Typescript declaration files (typings). [skip ci]
1 line
11 KiB
Plaintext
Generated
1 line
11 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,qDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,iBCAtD,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,iC,aCE7C,MAAMW,UAAqC,KACxDC,OACE,MAAO,aACT,CACAC,OACE,MAAMC,EAAeC,KAAKC,MAAMF,aAChC,OAAO,qBAAqBA,EAAaG,UAAWH,EAAaI,UAAUC,WAC7E,CACAD,UACE,OAAO,qBAAqB,yDAA0D,CACpFE,KAAML,KAAKC,MAAMF,aAAaO,YAElC,CACAC,UACE,OAAO,IACT,EAEFb,OAAOC,IAAIa,IAAI,cAAe,gDAAiDZ,GCnB/E,MAAM,EAA+BF,OAAOC,IAAIV,IAAI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AC1B7B,KAAM,cACNmC,QAAShC,KAAKiC,WAAWC,KAAKJ,IAC7B,qBAAqB,yCAAyCV,OAAOU,EAAWL,WAAa,SAAW,OAAQ,aAEvH,IACA,eAAgC,WAC9BzB,KAAKmC,KAAK,CACRV,UAAWzB,KAAKyB,aACfW,MAAK,KACF,oBAAoB,MACtB,gBAAgB,UAAUC,SAE5BX,EAAEY,QAAQ,GAEd,GFbA,IAAAf,QAAO,2CAA4C,qBAAqB,SAAUM,GAChFA,EAAMrB,IAAI,mBAAoB,CAC5B+B,KAAM,mBACN1C,KAAM,cACN+B,MAAO,qBAAqB,8DAEhC,GAAE,G","sources":["webpack://@flarum/lock/webpack/bootstrap","webpack://@flarum/lock/webpack/runtime/compat get default export","webpack://@flarum/lock/webpack/runtime/define property getters","webpack://@flarum/lock/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/lock/webpack/runtime/make namespace object","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/Notification')\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedNotification.js","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/models/Discussion')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/utils/DiscussionControls')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/DiscussionPage')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/lock/external root \"flarum.reg.get('core', 'forum/components/EventPost')\"","webpack://@flarum/lock/./src/forum/components/DiscussionLockedPost.js","webpack://@flarum/lock/./src/common/query/discussions/LockedGambit.ts","webpack://@flarum/lock/./src/common/extend.ts","webpack://@flarum/lock/./src/forum/extend.ts","webpack://@flarum/lock/./src/forum/index.js","webpack://@flarum/lock/./src/forum/addLockBadge.js","webpack://@flarum/lock/./src/forum/addLockControl.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', 'forum/components/Notification');","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nexport default class DiscussionLockedNotification extends Notification {\n icon() {\n return 'fas fa-lock';\n }\n href() {\n const notification = this.attrs.notification;\n return app.route.discussion(notification.subject(), notification.content().postNumber);\n }\n content() {\n return app.translator.trans('flarum-lock.forum.notifications.discussion_locked_text', {\n user: this.attrs.notification.fromUser()\n });\n }\n excerpt() {\n return null;\n }\n}\nflarum.reg.add('flarum-lock', 'forum/components/DiscussionLockedNotification', DiscussionLockedNotification);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/Discussion');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/DiscussionControls');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/DiscussionPage');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/EventPost');","import EventPost from 'flarum/forum/components/EventPost';\nexport default class DiscussionLockedPost extends EventPost {\n icon() {\n return this.attrs.post.content().locked ? 'fas fa-lock' : 'fas fa-unlock';\n }\n descriptionKey() {\n return this.attrs.post.content().locked ? 'flarum-lock.forum.post_stream.discussion_locked_text' : 'flarum-lock.forum.post_stream.discussion_unlocked_text';\n }\n}\nflarum.reg.add('flarum-lock', 'forum/components/DiscussionLockedPost', DiscussionLockedPost);","export default class LockedGambit {\n pattern() {\n return 'is:locked';\n }\n toFilter(_matches, negate) {\n const key = (negate ? '-' : '') + 'locked';\n return {\n [key]: true\n };\n }\n filterKey() {\n return 'locked';\n }\n fromFilter(value, negate) {\n return \"\".concat(negate ? '-' : '', \"is:locked\");\n }\n}\nflarum.reg.add('flarum-lock', 'common/query/discussions/LockedGambit', LockedGambit);","import Extend from 'flarum/common/extenders';\nimport LockedGambit from './query/discussions/LockedGambit';\nexport default [new Extend.Search() //\n.gambit('discussions', LockedGambit)];","import Extend from 'flarum/common/extenders';\nimport Discussion from 'flarum/common/models/Discussion';\nimport DiscussionLockedPost from './components/DiscussionLockedPost';\nimport commonExtend from '../common/extend';\nexport default [...commonExtend, new Extend.PostTypes() //\n.add('discussionLocked', DiscussionLockedPost), new Extend.Model(Discussion) //\n.attribute('isLocked').attribute('canLock')];","import { extend } from 'flarum/common/extend';\nimport app from 'flarum/forum/app';\nimport DiscussionLockedNotification from './components/DiscussionLockedNotification';\nimport addLockBadge from './addLockBadge';\nimport addLockControl from './addLockControl';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-lock', () => {\n app.notificationComponents.discussionLocked = DiscussionLockedNotification;\n addLockBadge();\n addLockControl();\n extend('flarum/forum/components/NotificationGrid', 'notificationTypes', function (items) {\n items.add('discussionLocked', {\n name: 'discussionLocked',\n icon: 'fas fa-lock',\n label: app.translator.trans('flarum-lock.forum.settings.notify_discussion_locked_label')\n });\n });\n});","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Badge from 'flarum/common/components/Badge';\nexport default function addLockBadge() {\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.isLocked()) {\n badges.add('locked', m(Badge, {\n type: \"locked\",\n label: app.translator.trans('flarum-lock.forum.badge.locked_tooltip'),\n icon: \"fas fa-lock\"\n }));\n }\n });\n}","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport DiscussionControls from 'flarum/forum/utils/DiscussionControls';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\nimport Button from 'flarum/common/components/Button';\nexport default function addLockControl() {\n extend(DiscussionControls, 'moderationControls', function (items, discussion) {\n if (discussion.canLock()) {\n items.add('lock', m(Button, {\n icon: \"fas fa-lock\",\n onclick: this.lockAction.bind(discussion)\n }, app.translator.trans(\"flarum-lock.forum.discussion_controls.\".concat(discussion.isLocked() ? 'unlock' : 'lock', \"_button\"))));\n }\n });\n DiscussionControls.lockAction = function () {\n this.save({\n isLocked: !this.isLocked()\n }).then(() => {\n if (app.current.matches(DiscussionPage)) {\n app.current.get('stream').update();\n }\n m.redraw();\n });\n };\n}"],"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","DiscussionLockedNotification","icon","href","notification","this","attrs","subject","content","postNumber","user","fromUser","excerpt","add","DiscussionLockedPost","post","locked","descriptionKey","LockedGambit","pattern","toFilter","_matches","negate","filterKey","fromFilter","concat","gambit","attribute","extend","badges","isLocked","m","type","label","items","discussion","canLock","onclick","lockAction","bind","save","then","update","redraw","name"],"sourceRoot":""} |