From 7c2f83042ce4a3a75be5846f9b1c256f5d7fea8a Mon Sep 17 00:00:00 2001 From: Simon Hiller Date: Thu, 8 Feb 2024 16:56:42 +0100 Subject: [PATCH] - update poll detail view - enhance poll list view --- js/dist/forum.js | 602 +++++++++++++++--- js/dist/forum.js.map | 2 +- js/src/forum/addNavItem.ts | 2 +- js/src/forum/components/ComposePollHero.tsx | 4 +- js/src/forum/components/Poll.tsx | 122 +++- js/src/forum/components/Poll/PollList.js | 4 +- js/src/forum/components/Poll/PollListItem.tsx | 72 ++- js/src/forum/components/Poll/PollOption.tsx | 14 +- .../components/Poll/PollOptionDescription.tsx | 16 - .../forum/components/Poll/PollOptionInput.tsx | 2 + js/src/forum/components/Poll/PollOptions.tsx | 24 +- js/src/forum/components/PollsDirectory.tsx | 4 +- js/src/forum/components/PollsPage.tsx | 10 +- js/src/forum/extend.ts | 5 +- js/src/forum/states/PollState.ts | 123 ++++ js/src/forum/utils/PollControls.tsx | 125 ++++ src/Access/ScopePollVisibility.php | 1 - 17 files changed, 960 insertions(+), 172 deletions(-) delete mode 100644 js/src/forum/components/Poll/PollOptionDescription.tsx create mode 100644 js/src/forum/states/PollState.ts create mode 100644 js/src/forum/utils/PollControls.tsx diff --git a/js/dist/forum.js b/js/dist/forum.js index 6722109f..54063ee4 100644 --- a/js/dist/forum.js +++ b/js/dist/forum.js @@ -178,7 +178,7 @@ __webpack_require__.r(__webpack_exports__); function addNavItem() { (0,flarum_common_extend__WEBPACK_IMPORTED_MODULE_1__.extend)((flarum_forum_components_IndexPage__WEBPACK_IMPORTED_MODULE_2___default().prototype), 'navItems', function (items) { items.add('fof-polls-directory', flarum_common_components_LinkButton__WEBPACK_IMPORTED_MODULE_3___default().component({ - href: flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default().route('fof_polls_directory'), + href: flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default().route('fof_polls_list'), icon: 'fas fa-poll' }, flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default().translator.trans('fof-polls.forum.page.nav')), 35); }); @@ -395,12 +395,12 @@ var ComposePollHero = /*#__PURE__*/function (_Component) { icon: "far fa-edit", className: "Button Button--primary IndexPage-newDiscussion GoodiesManagerLink", itemClassName: "App-primaryControl", - href: flarum_forum_app__WEBPACK_IMPORTED_MODULE_1___default().route('fof_polls_directory') + href: flarum_forum_app__WEBPACK_IMPORTED_MODULE_1___default().route('fof_polls_list') }, t(prfx + ".polls_manager")), poll.exists && m((flarum_common_components_LinkButton__WEBPACK_IMPORTED_MODULE_4___default()), { icon: "far fa-arrow-up-right-from-square", className: "Button Button--primary IndexPage-newDiscussion GoodiePreviewLink", itemClassName: "App-primaryControl", - href: flarum_forum_app__WEBPACK_IMPORTED_MODULE_1___default().route('fof_polls_directory', { + href: flarum_forum_app__WEBPACK_IMPORTED_MODULE_1___default().route('fof_polls_list', { id: poll.id() }), external: true, @@ -692,47 +692,143 @@ var ListVotersModal = /*#__PURE__*/function (_Modal) { "use strict"; __webpack_require__.r(__webpack_exports__); /* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ IndexPolls) +/* harmony export */ "default": () => (/* binding */ Poll) /* harmony export */ }); /* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js"); /* harmony import */ var flarum_common_Component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! flarum/common/Component */ "flarum/common/Component"); /* harmony import */ var flarum_common_Component__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(flarum_common_Component__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var _Poll_PollTitle__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./Poll/PollTitle */ "./src/forum/components/Poll/PollTitle.tsx"); -/* harmony import */ var _Poll_PollOptions__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Poll/PollOptions */ "./src/forum/components/Poll/PollOptions.tsx"); -/* harmony import */ var _Poll_PollSubmitButton__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Poll/PollSubmitButton */ "./src/forum/components/Poll/PollSubmitButton.tsx"); +/* harmony import */ var flarum_forum_app__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! flarum/forum/app */ "flarum/forum/app"); +/* harmony import */ var flarum_forum_app__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(flarum_forum_app__WEBPACK_IMPORTED_MODULE_2__); +/* harmony import */ var _Poll_PollTitle__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./Poll/PollTitle */ "./src/forum/components/Poll/PollTitle.tsx"); +/* harmony import */ var _Poll_PollOptions__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! ./Poll/PollOptions */ "./src/forum/components/Poll/PollOptions.tsx"); /* harmony import */ var _Poll_PollImage__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! ./Poll/PollImage */ "./src/forum/components/Poll/PollImage.tsx"); +/* harmony import */ var _Poll_PollDescription__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! ./Poll/PollDescription */ "./src/forum/components/Poll/PollDescription.tsx"); +/* harmony import */ var _states_PollState__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! ../states/PollState */ "./src/forum/states/PollState.ts"); +/* harmony import */ var flarum_common_components_Tooltip__WEBPACK_IMPORTED_MODULE_8__ = __webpack_require__(/*! flarum/common/components/Tooltip */ "flarum/common/components/Tooltip"); +/* harmony import */ var flarum_common_components_Tooltip__WEBPACK_IMPORTED_MODULE_8___default = /*#__PURE__*/__webpack_require__.n(flarum_common_components_Tooltip__WEBPACK_IMPORTED_MODULE_8__); +/* harmony import */ var flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_9__ = __webpack_require__(/*! flarum/common/components/Button */ "flarum/common/components/Button"); +/* harmony import */ var flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_9___default = /*#__PURE__*/__webpack_require__.n(flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_9__); +/* harmony import */ var flarum_common_utils_ItemList__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! flarum/common/utils/ItemList */ "flarum/common/utils/ItemList"); +/* harmony import */ var flarum_common_utils_ItemList__WEBPACK_IMPORTED_MODULE_10___default = /*#__PURE__*/__webpack_require__.n(flarum_common_utils_ItemList__WEBPACK_IMPORTED_MODULE_10__); +/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! ../../common */ "./src/common/index.js"); +/* harmony import */ var _utils_PollControls__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../utils/PollControls */ "./src/forum/utils/PollControls.tsx"); + + + + + -var IndexPolls = /*#__PURE__*/function (_Component) { - (0,_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(IndexPolls, _Component); - function IndexPolls() { + + + +// Make translation calls shorter +var t = flarum_forum_app__WEBPACK_IMPORTED_MODULE_2___default().translator.trans.bind((flarum_forum_app__WEBPACK_IMPORTED_MODULE_2___default().translator)); +var prfx = _common__WEBPACK_IMPORTED_MODULE_11__.slug + ".forum.poll"; +var Poll = /*#__PURE__*/function (_Component) { + (0,_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(Poll, _Component); + function Poll() { return _Component.apply(this, arguments) || this; } - var _proto = IndexPolls.prototype; + var _proto = Poll.prototype; + _proto.oninit = function oninit(vnode) { + _Component.prototype.oninit.call(this, vnode); + this.state = new _states_PollState__WEBPACK_IMPORTED_MODULE_7__["default"](this.attrs.poll); + }; _proto.view = function view() { - /* @type Poll */ var poll = this.attrs.poll; + var infoItems = this.infoItems(poll.maxVotes()); + var state = this.state; return m("div", { - className: "Poll" + className: "Poll", + "data-id": poll.id() }, m("div", { + className: "PollHeading" + }, m("h3", { + className: "PollHeading-title" + }, poll.question()), poll.canSeeVoters() && m((flarum_common_components_Tooltip__WEBPACK_IMPORTED_MODULE_8___default()), { + text: t('fof-polls.forum.public_poll') + }, m((flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_9___default()), { + className: "Button PollHeading-voters", + onclick: state.showVoters, + icon: "fas fa-poll" + })), poll.canEdit() && m((flarum_common_components_Tooltip__WEBPACK_IMPORTED_MODULE_8___default()), { + text: t('fof-polls.forum.moderation.edit') + }, m((flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_9___default()), { + className: "Button PollHeading-edit", + onclick: this.editPoll.bind(this), + icon: "fas fa-pen" + })), poll.canDelete() && m((flarum_common_components_Tooltip__WEBPACK_IMPORTED_MODULE_8___default()), { + text: t('fof-polls.forum.moderation.delete') + }, m((flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_9___default()), { + className: "Button PollHeading-delete", + onclick: this.deletePoll.bind(this), + icon: "fas fa-trash" + }))), m("div", { className: "Poll-image" }, m(_Poll_PollImage__WEBPACK_IMPORTED_MODULE_5__["default"], { image: poll.image })), m("div", { className: "Poll-wrapper" - }, m(_Poll_PollTitle__WEBPACK_IMPORTED_MODULE_2__["default"], { + }, m(_Poll_PollTitle__WEBPACK_IMPORTED_MODULE_3__["default"], { text: poll.question() + }), m(_Poll_PollDescription__WEBPACK_IMPORTED_MODULE_6__["default"], { + text: "Ihre Meinung ist uns wichtig! Welche SBB-Entscheidungen m\xF6chten Sie mehr einbezogen sehen? Teilen Sie uns mit, welche Themen f\xFCr Sie besonders relevant sind. Vielen Dank f\xFCr Ihre Teilnahme!" }), m("form", null, m("fieldset", null, m("legend", { className: "sr-only" - }, "Antworten"), m(_Poll_PollOptions__WEBPACK_IMPORTED_MODULE_3__["default"], { - options: poll.options() - }), m(_Poll_PollSubmitButton__WEBPACK_IMPORTED_MODULE_4__["default"], null))))); + }, "Antworten"), m(_Poll_PollOptions__WEBPACK_IMPORTED_MODULE_4__["default"], { + options: poll.options(), + state: state + })), m("div", { + className: "Poll-sticky" + }, !infoItems.isEmpty() && m("div", { + className: "helpText PollInfoText" + }, infoItems.toArray()), state.showButton() && m((flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_9___default()), { + className: "Button Button--primary Poll-submit", + loading: state.loadingOptions, + onclick: state.onsubmit.bind(this) + }, t('fof-polls.forum.poll.submit_button')))))); + }; + _proto.deletePoll = function deletePoll() { + _utils_PollControls__WEBPACK_IMPORTED_MODULE_12__["default"].deleteAction(this.attrs.poll); }; - return IndexPolls; + _proto.editPoll = function editPoll() { + _utils_PollControls__WEBPACK_IMPORTED_MODULE_12__["default"].editAction(this.attrs.poll); + }; + _proto.infoItems = function infoItems(maxVotes) { + var items = new (flarum_common_utils_ItemList__WEBPACK_IMPORTED_MODULE_10___default())(); + var poll = this.attrs.poll; + if ((flarum_forum_app__WEBPACK_IMPORTED_MODULE_2___default().session).user && !poll.canVote() && !poll.hasEnded()) { + items.add('no-permission', m("span", null, m("i", { + className: "icon fas fa-times-circle fa-fw" + }), t('fof-polls.forum.no_permission'))); + } + if (poll.endDate()) { + items.add('end-date', m("span", null, m("i", { + "class": "icon fas fa-clock fa-fw" + }), poll.hasEnded() ? t('fof-polls.forum.poll_ended') : t('fof-polls.forum.days_remaining', { + time: dayjs(poll.endDate()).fromNow() + }))); + } + if (poll.canVote()) { + items.add('max-votes', m("span", null, m("i", { + className: "icon fas fa-poll fa-fw" + }), t('fof-polls.forum.max_votes_allowed', { + max: maxVotes + }))); + if (!poll.canChangeVote()) { + items.add('cannot-change-vote', m("span", null, m("i", { + className: "icon fas fa-" + (this.state.hasVoted() ? 'times' : 'exclamation') + "-circle fa-fw" + }), t('fof-polls.forum.poll.cannot_change_vote'))); + } + } + return items; + }; + return Poll; }((flarum_common_Component__WEBPACK_IMPORTED_MODULE_1___default())); @@ -1128,6 +1224,39 @@ var PollForm = /*#__PURE__*/function (_Component) { }((flarum_common_Component__WEBPACK_IMPORTED_MODULE_4___default())); +/***/ }), + +/***/ "./src/forum/components/Poll/PollDescription.tsx": +/*!*******************************************************!*\ + !*** ./src/forum/components/Poll/PollDescription.tsx ***! + \*******************************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ PollDescription) +/* harmony export */ }); +/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js"); +/* harmony import */ var flarum_common_Component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! flarum/common/Component */ "flarum/common/Component"); +/* harmony import */ var flarum_common_Component__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(flarum_common_Component__WEBPACK_IMPORTED_MODULE_1__); + + +var PollDescription = /*#__PURE__*/function (_Component) { + (0,_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(PollDescription, _Component); + function PollDescription() { + return _Component.apply(this, arguments) || this; + } + var _proto = PollDescription.prototype; + _proto.view = function view() { + return m("p", { + className: "Poll-description" + }, this.attrs.text); + }; + return PollDescription; +}((flarum_common_Component__WEBPACK_IMPORTED_MODULE_1___default())); + + /***/ }), /***/ "./src/forum/components/Poll/PollImage.tsx": @@ -1230,12 +1359,12 @@ var PollList = /*#__PURE__*/function (_Component) { } var pageSize = state.pageSize; return m("div", { - className: flarum_common_utils_classList__WEBPACK_IMPORTED_MODULE_7___default()('PollList', { + className: flarum_common_utils_classList__WEBPACK_IMPORTED_MODULE_7___default()('PollList UserDirectoryList', { 'PollList--searchResults': state.isSearchResults() }) }, m("ul", { "aria-busy": isLoading, - className: "PollList-polls" + className: "PollList-polls UserDirectoryList-users" }, state.getPages().map(function (pg) { return pg.items.map(function (poll) { return m("li", { @@ -1289,6 +1418,14 @@ __webpack_require__.r(__webpack_exports__); /* harmony import */ var _PollPage__WEBPACK_IMPORTED_MODULE_10__ = __webpack_require__(/*! ./PollPage */ "./src/forum/components/Poll/PollPage.tsx"); /* harmony import */ var flarum_common_utils_abbreviateNumber__WEBPACK_IMPORTED_MODULE_11__ = __webpack_require__(/*! flarum/common/utils/abbreviateNumber */ "flarum/common/utils/abbreviateNumber"); /* harmony import */ var flarum_common_utils_abbreviateNumber__WEBPACK_IMPORTED_MODULE_11___default = /*#__PURE__*/__webpack_require__.n(flarum_common_utils_abbreviateNumber__WEBPACK_IMPORTED_MODULE_11__); +/* harmony import */ var _utils_PollControls__WEBPACK_IMPORTED_MODULE_12__ = __webpack_require__(/*! ../../utils/PollControls */ "./src/forum/utils/PollControls.tsx"); +/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_13__ = __webpack_require__(/*! ../../../common */ "./src/common/index.js"); +/* harmony import */ var flarum_common_utils_ItemList__WEBPACK_IMPORTED_MODULE_14__ = __webpack_require__(/*! flarum/common/utils/ItemList */ "flarum/common/utils/ItemList"); +/* harmony import */ var flarum_common_utils_ItemList__WEBPACK_IMPORTED_MODULE_14___default = /*#__PURE__*/__webpack_require__.n(flarum_common_utils_ItemList__WEBPACK_IMPORTED_MODULE_14__); +/* harmony import */ var flarum_common_helpers_listItems__WEBPACK_IMPORTED_MODULE_15__ = __webpack_require__(/*! flarum/common/helpers/listItems */ "flarum/common/helpers/listItems"); +/* harmony import */ var flarum_common_helpers_listItems__WEBPACK_IMPORTED_MODULE_15___default = /*#__PURE__*/__webpack_require__.n(flarum_common_helpers_listItems__WEBPACK_IMPORTED_MODULE_15__); + + @@ -1301,6 +1438,12 @@ __webpack_require__.r(__webpack_exports__); + + + +// Make translation calls shorter +var t = flarum_forum_app__WEBPACK_IMPORTED_MODULE_1___default().translator.trans.bind((flarum_forum_app__WEBPACK_IMPORTED_MODULE_1___default().translator)); +var prfx = _common__WEBPACK_IMPORTED_MODULE_13__.slug + ".forum.list"; /** * The `PollListItem` component shows a single poll in the * poll list. @@ -1336,7 +1479,7 @@ var PollListItem = /*#__PURE__*/function (_Component) { }; _proto.elementAttrs = function elementAttrs() { return { - className: flarum_common_utils_classList__WEBPACK_IMPORTED_MODULE_4___default()('PollListItem', { + className: flarum_common_utils_classList__WEBPACK_IMPORTED_MODULE_4___default()('PollListItem User', { active: this.active(), 'PollListItem--hidden': this.attrs.poll.isHidden(), Slidable: 'ontouchstart' in window @@ -1345,18 +1488,17 @@ var PollListItem = /*#__PURE__*/function (_Component) { }; _proto.view = function view() { var poll = this.attrs.poll; - - // TODO IMPLEMENT POLLCONTROLS - //const controls = PollControls.controls(poll, this).toArray(); + var controls = _utils_PollControls__WEBPACK_IMPORTED_MODULE_12__["default"].controls(poll, this).toArray(); var attrs = this.elementAttrs(); - return m("div", attrs, this.contentView(), this.slidableUnderneathView()); + return m("div", attrs, this.controlsView(controls), this.contentView(), this.slidableUnderneathView()); }; _proto.controlsView = function controlsView(controls) { return !!controls.length && m((flarum_common_components_Dropdown__WEBPACK_IMPORTED_MODULE_5___default()), { icon: "fas fa-ellipsis-v", - className: "PollListItem-controls", + className: "UserCard-controls App-primaryControl PollListItem-controls", + menuClassName: "Dropdown-menu--right", buttonClassName: "Button Button--icon Button--flat", - accessibleToggleLabel: flarum_forum_app__WEBPACK_IMPORTED_MODULE_1___default().translator.trans('fof-polls.forum.poll_controls.toggle_dropdown_accessible_label') + accessibleToggleLabel: t('fof-polls.forum.poll_controls.toggle_dropdown_accessible_label') }, controls); }; _proto.slidableUnderneathView = function slidableUnderneathView() { @@ -1378,13 +1520,13 @@ var PollListItem = /*#__PURE__*/function (_Component) { //
m("div", { className: flarum_common_utils_classList__WEBPACK_IMPORTED_MODULE_4___default()('PollListItem-content') - }, this.mainView(), this.voteCountItem()) + }, this.mainView(), this.infoView()) ); }; _proto.mainView = function mainView() { var poll = this.attrs.poll; return m((flarum_common_components_Link__WEBPACK_IMPORTED_MODULE_6___default()), { - href: flarum_forum_app__WEBPACK_IMPORTED_MODULE_1___default().route('fof_polls_compose', { + href: flarum_forum_app__WEBPACK_IMPORTED_MODULE_1___default().route('fof_polls_list', { id: poll.id() }), className: "PollListItem-main" @@ -1392,6 +1534,11 @@ var PollListItem = /*#__PURE__*/function (_Component) { className: "PollListItem-title" }, flarum_common_helpers_highlight__WEBPACK_IMPORTED_MODULE_7___default()(poll.question(), this.highlightRegExp))); }; + _proto.infoView = function infoView() { + return m("ul", { + className: "UserCard-info" + }, flarum_common_helpers_listItems__WEBPACK_IMPORTED_MODULE_15___default()(this.infoItems().toArray())); + }; _proto.oncreate = function oncreate(vnode) { _Component.prototype.oncreate.call(this, vnode); @@ -1431,17 +1578,24 @@ var PollListItem = /*#__PURE__*/function (_Component) { m.redraw(); } }; - _proto.voteCountItem = function voteCountItem() { + _proto.infoItems = function infoItems() { var poll = this.attrs.poll; - return m("span", { - className: "PollListItem-count" - }, m("span", { - "aria-hidden": "true" - }, flarum_common_utils_abbreviateNumber__WEBPACK_IMPORTED_MODULE_11___default()(poll.voteCount())), m("span", { - className: "visually-hidden" - }, flarum_forum_app__WEBPACK_IMPORTED_MODULE_1___default().translator.trans('fof-polls.forum.poll_list.total_votes_a11y_label', { - count: poll.voteCount() - }))); + var items = new (flarum_common_utils_ItemList__WEBPACK_IMPORTED_MODULE_14___default())(); + var active = !poll.hasEnded(); + var activeView = poll.endDate() ? [flarum_common_helpers_icon__WEBPACK_IMPORTED_MODULE_9___default()('fas fa-clock'), ' ', active ? t('fof-polls.forum.days_remaining', { + time: dayjs(poll.endDate()).fromNow() + }) : t('fof-polls.forum.poll_ended')] : flarum_common_helpers_icon__WEBPACK_IMPORTED_MODULE_9___default()('fas fa-om'); + items.add('active', m("span", { + className: flarum_common_utils_classList__WEBPACK_IMPORTED_MODULE_4___default()('UserCard-lastSeen', { + active: active + }) + }, activeView)); + items.add('discussion-count', m("div", { + className: "userStat" + }, flarum_common_helpers_icon__WEBPACK_IMPORTED_MODULE_9___default()('fas fa-poll fa-fw'), [' ', t('fof-user-directory.forum.page.usercard.discussion-count', { + count: flarum_common_utils_abbreviateNumber__WEBPACK_IMPORTED_MODULE_11___default()(poll.voteCount()) + })]), 70); + return items; }; return PollListItem; }((flarum_common_Component__WEBPACK_IMPORTED_MODULE_2___default())); @@ -1483,7 +1637,8 @@ var PollOption = /*#__PURE__*/function (_Component) { id: option.id(), isResult: false, name: "vote", - value: "Vote for this option" + value: "Vote for this option", + onchange: this.attrs.onchange }), m("span", { className: "PollOption-information" }, m(_PollOptionLabel__WEBPACK_IMPORTED_MODULE_2__["default"], { @@ -1530,7 +1685,8 @@ var PollOptionInput = /*#__PURE__*/function (_Component) { }, className: "PollOption-input", "aria-labelledby": this.attrs.name + "-" + this.attrs.id + "-label", - "aria-describedby": this.attrs.name + "-" + this.attrs.id + "-description" + "aria-describedby": this.attrs.name + "-" + this.attrs.id + "-description", + onchange: this.attrs.onchange }); }; return PollOptionInput; @@ -1608,13 +1764,24 @@ var PollOptions = /*#__PURE__*/function (_Component) { }, this.pollOptions().toArray()); }; _proto.pollOptions = function pollOptions() { + var _this = this; var items = new (flarum_common_utils_ItemList__WEBPACK_IMPORTED_MODULE_4___default())(); - this.attrs.options.forEach(function (option) { - items.add('option' + option.id(), m(_PollOption__WEBPACK_IMPORTED_MODULE_2__["default"], { - option: option - })); - }); - items.add('test5', m(_PollResult__WEBPACK_IMPORTED_MODULE_3__["default"], null)); + var state = this.attrs.state; + if (state.showCheckMarks) { + this.attrs.options.forEach(function (option) { + items.add('option' + option.id(), m(_PollOption__WEBPACK_IMPORTED_MODULE_2__["default"], { + option: option, + onchange: state.changeVote.bind(state, option) + })); + }); + } else { + this.attrs.options.forEach(function (option) { + items.add('result' + option.id(), m(_PollResult__WEBPACK_IMPORTED_MODULE_3__["default"], { + option: option, + state: _this.attrs.state.hasVoted() + })); + }); + } return items; }; return PollOptions; @@ -1744,53 +1911,6 @@ var PollResultsNumber = /*#__PURE__*/function (_Component) { }((flarum_common_Component__WEBPACK_IMPORTED_MODULE_1___default())); -/***/ }), - -/***/ "./src/forum/components/Poll/PollSubmitButton.tsx": -/*!********************************************************!*\ - !*** ./src/forum/components/Poll/PollSubmitButton.tsx ***! - \********************************************************/ -/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { - -"use strict"; -__webpack_require__.r(__webpack_exports__); -/* harmony export */ __webpack_require__.d(__webpack_exports__, { -/* harmony export */ "default": () => (/* binding */ PollSubmitButton) -/* harmony export */ }); -/* harmony import */ var _babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/esm/inheritsLoose */ "./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js"); -/* harmony import */ var flarum_common_Component__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! flarum/common/Component */ "flarum/common/Component"); -/* harmony import */ var flarum_common_Component__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(flarum_common_Component__WEBPACK_IMPORTED_MODULE_1__); -/* harmony import */ var flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! flarum/common/components/Button */ "flarum/common/components/Button"); -/* harmony import */ var flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_2__); - - - -var PollSubmitButton = /*#__PURE__*/function (_Component) { - (0,_babel_runtime_helpers_esm_inheritsLoose__WEBPACK_IMPORTED_MODULE_0__["default"])(PollSubmitButton, _Component); - function PollSubmitButton() { - return _Component.apply(this, arguments) || this; - } - var _proto = PollSubmitButton.prototype; - _proto.view = function view() { - var _this = this; - return m((flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_2___default()), { - className: "Button", - onclick: function onclick() { - return _this.pollButtonSubmit(); - } - }, "Submit"); - } - - /** - * Event handler for submit button being clicked - */; - _proto.pollButtonSubmit = function pollButtonSubmit() { - console.log('submitted'); - }; - return PollSubmitButton; -}((flarum_common_Component__WEBPACK_IMPORTED_MODULE_1___default())); - - /***/ }), /***/ "./src/forum/components/Poll/PollTitle.tsx": @@ -2387,9 +2507,7 @@ __webpack_require__.r(__webpack_exports__); -/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ([new (flarum_common_extenders__WEBPACK_IMPORTED_MODULE_0___default().Routes)() // -// .add('fof_polls_directory', '/polls', PollsDirectory), -.add('fof_polls_directory', '/polls', _components_PollsPage__WEBPACK_IMPORTED_MODULE_7__["default"]).add('fof_polls_compose', '/polls/composer', _components_ComposePollPage__WEBPACK_IMPORTED_MODULE_8__["default"]), new (flarum_common_extenders__WEBPACK_IMPORTED_MODULE_0___default().Store)() // +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ([new (flarum_common_extenders__WEBPACK_IMPORTED_MODULE_0___default().Routes)().add('fof_polls_list', '/polls', _components_PollsPage__WEBPACK_IMPORTED_MODULE_7__["default"]).add('fof_polls_compose', '/polls/composer', _components_ComposePollPage__WEBPACK_IMPORTED_MODULE_8__["default"]), new (flarum_common_extenders__WEBPACK_IMPORTED_MODULE_0___default().Store)() // .add('polls', _models_Poll__WEBPACK_IMPORTED_MODULE_4__["default"]).add('poll_options', _models_PollOption__WEBPACK_IMPORTED_MODULE_5__["default"]).add('poll_votes', _models_PollVote__WEBPACK_IMPORTED_MODULE_6__["default"]), new (flarum_common_extenders__WEBPACK_IMPORTED_MODULE_0___default().Model)((flarum_common_models_Post__WEBPACK_IMPORTED_MODULE_1___default())) // .hasMany('polls').attribute('canStartPoll'), new (flarum_common_extenders__WEBPACK_IMPORTED_MODULE_0___default().Model)((flarum_common_models_Forum__WEBPACK_IMPORTED_MODULE_2___default())) // .attribute('canStartPolls'), new (flarum_common_extenders__WEBPACK_IMPORTED_MODULE_0___default().Model)((flarum_common_models_Discussion__WEBPACK_IMPORTED_MODULE_3___default())) // @@ -2916,6 +3034,285 @@ var PollListState = /*#__PURE__*/function (_PaginatedListState) { }((flarum_common_states_PaginatedListState__WEBPACK_IMPORTED_MODULE_4___default())); +/***/ }), + +/***/ "./src/forum/states/PollState.ts": +/*!***************************************!*\ + !*** ./src/forum/states/PollState.ts ***! + \***************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (/* binding */ PollState) +/* harmony export */ }); +/* harmony import */ var flarum_forum_app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flarum/forum/app */ "flarum/forum/app"); +/* harmony import */ var flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(flarum_forum_app__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var flarum_forum_components_LogInModal__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! flarum/forum/components/LogInModal */ "flarum/forum/components/LogInModal"); +/* harmony import */ var flarum_forum_components_LogInModal__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(flarum_forum_components_LogInModal__WEBPACK_IMPORTED_MODULE_1__); +/* harmony import */ var _components_ListVotersModal__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/ListVotersModal */ "./src/forum/components/ListVotersModal.js"); + + + +var PollState = /*#__PURE__*/function () { + function PollState(poll) { + var _this = this, + _this$poll, + _this$poll2; + this.poll = void 0; + this.pendingSubmit = void 0; + this.pendingOptions = void 0; + this.loadingOptions = void 0; + this.useSubmitUI = void 0; + this.showCheckMarks = void 0; + this.boundChangeVote = void 0; + this.showVoters = function () { + // Load all the votes only when opening the votes list + flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default().modal.show(_components_ListVotersModal__WEBPACK_IMPORTED_MODULE_2__["default"], { + poll: _this.poll + }); + }; + /** + * Alert before navigating away using browser's 'beforeunload' event + */ + this.preventClose = function (e) { + if (_this.pendingOptions) { + e.preventDefault(); + return true; + } + }; + this.poll = poll; + this.pendingSubmit = false; + this.pendingOptions = null; + this.loadingOptions = false; + this.useSubmitUI = !((_this$poll = this.poll) != null && _this$poll.canChangeVote()) && ((_this$poll2 = this.poll) == null ? void 0 : _this$poll2.allowMultipleVotes()); + this.showCheckMarks = !(flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default().session).user || !poll.hasEnded() && poll.canVote() && (!this.hasVoted() || poll.canChangeVote()); + } + var _proto = PollState.prototype; + _proto.hasVoted = function hasVoted() { + return this.poll.myVotes().length > 0; + }; + _proto.showButton = function showButton() { + return this.useSubmitUI && this.pendingSubmit; + }; + _proto.changeVote = function changeVote(option, evt) { + var _this$poll$myVotes$ma, _this$poll$myVotes; + if (!(flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default().session).user) { + flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default().modal.show((flarum_forum_components_LogInModal__WEBPACK_IMPORTED_MODULE_1___default())); + evt.target.checked = false; + return; + } + var optionIds = this.pendingOptions || new Set((_this$poll$myVotes$ma = (_this$poll$myVotes = this.poll.myVotes()).map) == null ? void 0 : _this$poll$myVotes$ma.call(_this$poll$myVotes, function (v) { + return v.option().id(); + })); + var isUnvoting = optionIds["delete"](option.id()); + var allowsMultiple = this.poll.allowMultipleVotes(); + if (!allowsMultiple) { + optionIds.clear(); + } + if (!isUnvoting) { + optionIds.add(option.id()); + } + if (this.useSubmitUI) { + this.pendingOptions = optionIds.size ? optionIds : null; + this.pendingSubmit = !!this.pendingOptions; + return; + } + return this.submit(optionIds, null, function () { + return evt.target.checked = isUnvoting; + }); + }; + _proto.onsubmit = function onsubmit() { + var _this2 = this; + return this.submit(this.pendingOptions, function () { + _this2.pendingOptions = null; + _this2.pendingSubmit = false; + }); + }; + _proto.submit = function submit(optionIds, cb, onerror) { + var _this3 = this; + if (onerror === void 0) { + onerror = null; + } + this.loadingOptions = true; + m.redraw(); + return flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default().request({ + method: 'PATCH', + url: flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default().forum.attribute('apiUrl') + "/fof/polls/" + this.poll.id() + "/votes", + body: { + data: { + optionIds: Array.from(optionIds) + } + } + }).then(function (res) { + flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default().store.pushPayload(res); + cb == null || cb(); + })["catch"](function (err) { + onerror == null || onerror(err); + })["finally"](function () { + _this3.loadingOptions = false; + m.redraw(); + }); + }; + /** + * Attempting to use the `tooltipVisible` attr on the Tooltip component set to 'false' when no vote count + * caused the tooltip to break on click. This is a workaround to hide the tooltip when no vote count is available, + * called on 'onremove' of the Tooltip component. It doesn't always work as intended either, but it does the job. + */ + _proto.hideOptionTooltip = function hideOptionTooltip(vnode) { + vnode.attrs.tooltipVisible = false; + vnode.state.updateVisibility(); + }; + return PollState; +}(); + + +/***/ }), + +/***/ "./src/forum/utils/PollControls.tsx": +/*!******************************************!*\ + !*** ./src/forum/utils/PollControls.tsx ***! + \******************************************/ +/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => { + +"use strict"; +__webpack_require__.r(__webpack_exports__); +/* harmony export */ __webpack_require__.d(__webpack_exports__, { +/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__) +/* harmony export */ }); +/* harmony import */ var flarum_forum_app__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! flarum/forum/app */ "flarum/forum/app"); +/* harmony import */ var flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(flarum_forum_app__WEBPACK_IMPORTED_MODULE_0__); +/* harmony import */ var _common__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ../../common */ "./src/common/index.js"); +/* harmony import */ var _components_ComposePollPage__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ../components/ComposePollPage */ "./src/forum/components/ComposePollPage.tsx"); +/* harmony import */ var _components_PollsPage__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ../components/PollsPage */ "./src/forum/components/PollsPage.tsx"); +/* harmony import */ var flarum_common_utils_ItemList__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(/*! flarum/common/utils/ItemList */ "flarum/common/utils/ItemList"); +/* harmony import */ var flarum_common_utils_ItemList__WEBPACK_IMPORTED_MODULE_4___default = /*#__PURE__*/__webpack_require__.n(flarum_common_utils_ItemList__WEBPACK_IMPORTED_MODULE_4__); +/* harmony import */ var flarum_common_components_Separator__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(/*! flarum/common/components/Separator */ "flarum/common/components/Separator"); +/* harmony import */ var flarum_common_components_Separator__WEBPACK_IMPORTED_MODULE_5___default = /*#__PURE__*/__webpack_require__.n(flarum_common_components_Separator__WEBPACK_IMPORTED_MODULE_5__); +/* harmony import */ var flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(/*! flarum/common/components/Button */ "flarum/common/components/Button"); +/* harmony import */ var flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_6___default = /*#__PURE__*/__webpack_require__.n(flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_6__); +/* harmony import */ var flarum_common_components_Link__WEBPACK_IMPORTED_MODULE_7__ = __webpack_require__(/*! flarum/common/components/Link */ "flarum/common/components/Link"); +/* harmony import */ var flarum_common_components_Link__WEBPACK_IMPORTED_MODULE_7___default = /*#__PURE__*/__webpack_require__.n(flarum_common_components_Link__WEBPACK_IMPORTED_MODULE_7__); + + + + + + + + +var t = flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default().translator.trans.bind((flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default().translator)); +var prfx = _common__WEBPACK_IMPORTED_MODULE_1__.slug + ".forum.poll_controls"; + +/** + * The `UserControls` utility constructs a list of buttons for a user which + * perform actions on it. + */ +/* harmony default export */ const __WEBPACK_DEFAULT_EXPORT__ = ({ + /** + * Get a list of controls for a user. + */ + controls: function controls(poll, context) { + var _this = this; + var items = new (flarum_common_utils_ItemList__WEBPACK_IMPORTED_MODULE_4___default())(); + ['poll', 'moderation', 'destructive'].forEach(function (section) { + var controls = _this[section + 'Controls'](poll, context).toArray(); + if (controls.length) { + controls.forEach(function (item) { + return items.add(item.itemName, item); + }); + items.add(section + 'Separator', m((flarum_common_components_Separator__WEBPACK_IMPORTED_MODULE_5___default()), null)); + } + }); + return items; + }, + /** + * Get controls for direkt modifcation actions on polls (e.g. vote, view voters). + */ + pollControls: function pollControls(poll, context) { + var items = new (flarum_common_utils_ItemList__WEBPACK_IMPORTED_MODULE_4___default())(); + items.add('view', m((flarum_common_components_Link__WEBPACK_IMPORTED_MODULE_7___default()), { + href: flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default().route('fof_polls_list', { + id: poll.id() + }) + }, t(prfx + ".view_label"))); + return items; + }, + /** + * Get controls for a user pertaining to moderation (e.g. suspend, edit). + */ + moderationControls: function moderationControls(poll, context) { + var items = new (flarum_common_utils_ItemList__WEBPACK_IMPORTED_MODULE_4___default())(); + if (poll.canEdit()) { + items.add('edit', m((flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_6___default()), { + icon: "fas fa-pen", + onclick: this.editAction.bind(this, poll) + }, t(prfx + ".edit_label"))); + } + return items; + }, + /** + * Get controls for a user which are destructive (e.g. delete). + * @protected + */ + destructiveControls: function destructiveControls(poll, context) { + var items = new (flarum_common_utils_ItemList__WEBPACK_IMPORTED_MODULE_4___default())(); + if (poll.canDelete()) { + items.add('delete', m((flarum_common_components_Button__WEBPACK_IMPORTED_MODULE_6___default()), { + icon: "fas fa-times", + onclick: this.deleteAction.bind(this, poll) + }, t(prfx + ".delete_label"))); + } + return items; + }, + /** + * Delete the user. + */ + deleteAction: function deleteAction(poll) { + var _this2 = this; + if (!confirm(t(prfx + ".delete_confirmation"))) { + return; + } + poll["delete"]().then(function () { + _this2.showDeletionAlert(poll, 'success'); + if (flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default().current.matches(_components_ComposePollPage__WEBPACK_IMPORTED_MODULE_2__["default"], { + id: poll.id() + }) || flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default().current.matches(_components_PollsPage__WEBPACK_IMPORTED_MODULE_3__["default"], { + id: poll.id() + })) { + flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default().history.back(); + } else { + window.location.reload(); + } + })["catch"](function () { + return _this2.showDeletionAlert(poll, 'error'); + }); + }, + /** + * Show deletion alert of poll + */ + showDeletionAlert: function showDeletionAlert(poll, type) { + var message = { + success: prfx + ".delete_success_message", + error: prfx + ".delete_error_message" + }[type]; + flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default().alerts.show({ + type: type + }, t(message, { + poll: poll + })); + }, + /** + * Edit the poll. + */ + editAction: function editAction(poll) { + m.route.set(flarum_forum_app__WEBPACK_IMPORTED_MODULE_0___default().route('fof_polls_compose', { + id: poll.id() + })); + } +}); + /***/ }), /***/ "flarum/common/Component": @@ -3050,6 +3447,17 @@ module.exports = flarum.core.compat['common/components/SelectDropdown']; /***/ }), +/***/ "flarum/common/components/Separator": +/*!********************************************************************!*\ + !*** external "flarum.core.compat['common/components/Separator']" ***! + \********************************************************************/ +/***/ ((module) => { + +"use strict"; +module.exports = flarum.core.compat['common/components/Separator']; + +/***/ }), + /***/ "flarum/common/components/Switch": /*!*****************************************************************!*\ !*** external "flarum.core.compat['common/components/Switch']" ***! diff --git a/js/dist/forum.js.map b/js/dist/forum.js.map index 966df05d..fbfdb23b 100644 --- a/js/dist/forum.js.map +++ b/js/dist/forum.js.map @@ -1 +1 @@ -{"version":3,"file":"forum.js","mappings":";;;;;;;;;;;;;;IAAqBA,GAAG;EAAA,SAAAA,IAAA;EAAAA,GAAA,CACfC,cAAc,GAArB,SAAAA,eAAA,EAAiC;IAC/B,OAAO,IAAI;EACb,CAAC;EAAAD,GAAA,CAEME,YAAY,GAAnB,SAAAA,aAAA,EAA+B;IAC7B,OAAO,IAAI;I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GAAG,CAAC0b,KAAK,EAAEG,OAAO,CAAC;IAC5B;IACA,SAASA,OAAOA,CAAA,EAAG;MACjB,OAAOzB,yDAAS,CAACsB,KAAK,EAAEld,SAAS,EAAEiY,8DAAc,CAAC,IAAI,CAAC,CAAC2B,WAAW,CAAC;IACtE;IACAyD,OAAO,CAAC7jB,SAAS,GAAGqM,MAAM,CAACsR,MAAM,CAAC+F,KAAK,CAAC1jB,SAAS,EAAE;MACjDogB,WAAW,EAAE;QACX/c,KAAK,EAAEwgB,OAAO;QACdtG,UAAU,EAAE,KAAK;QACjBE,QAAQ,EAAE,IAAI;QACdD,YAAY,EAAE;MAChB;IACF,CAAC,CAAC;IACF,OAAO6C,8DAAc,CAACwD,OAAO,EAAEH,KAAK,CAAC;EACvC,CAAC;EACD,OAAOnL,gBAAgB,CAACmL,KAAK,CAAC;AAChC;;;;;;UC7BA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D","sources":["webpack://@fof/polls/./src/common/Acl.tsx","webpack://@fof/polls/./src/common/index.js","webpack://@fof/polls/./src/forum/addComposerItems.js","webpack://@fof/polls/./src/forum/addDiscussionBadge.js","webpack://@fof/polls/./src/forum/addNavItem.ts","webpack://@fof/polls/./src/forum/addPollsToPost.js","webpack://@fof/polls/./src/forum/addPostControls.js","webpack://@fof/polls/./src/forum/components/ComposePollHero.tsx","webpack://@fof/polls/./src/forum/components/ComposePollPage.tsx","webpack://@fof/polls/./src/forum/components/CreatePollModal.js","webpack://@fof/polls/./src/forum/components/EditPollModal.js","webpack://@fof/polls/./src/forum/components/ListVotersModal.js","webpack://@fof/polls/./src/forum/components/Poll.tsx","webpack://@fof/polls/./src/forum/components/PollForm.js","webpack://@fof/polls/./src/forum/components/Poll/PollImage.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollList.js","webpack://@fof/polls/./src/forum/components/Poll/PollListItem.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOption.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOptionInput.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOptionLabel.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOptions.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollPage.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollResult.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollResultNumber.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollSubmitButton.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollTitle.tsx","webpack://@fof/polls/./src/forum/components/PollsPage.tsx","webpack://@fof/polls/./src/forum/components/PostPoll.js","webpack://@fof/polls/./src/forum/components/form/FormError.js","webpack://@fof/polls/./src/forum/components/index.ts","webpack://@fof/polls/./src/forum/extend.ts","webpack://@fof/polls/./src/forum/index.ts","webpack://@fof/polls/./src/forum/models/Poll.ts","webpack://@fof/polls/./src/forum/models/PollOption.ts","webpack://@fof/polls/./src/forum/models/PollVote.ts","webpack://@fof/polls/./src/forum/models/index.ts","webpack://@fof/polls/./src/forum/states/PollFormState.js","webpack://@fof/polls/./src/forum/states/PollListState.ts","webpack://@fof/polls/external root \"flarum.core.compat['common/Component']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/Model']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Button']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Link']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Page']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Placeholder']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/SelectDropdown']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Switch']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/extend']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/extenders']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/highlight']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/models/Forum']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/models/Post']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/states/PaginatedListState']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/EventEmitter']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/SubtreeRetainer']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/abbreviateNumber']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/computed']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/app']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/DiscussionComposer']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/DiscussionList']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/LogInModal']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/ReplyComposer']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/utils/slidable']\"","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/typeof.js","webpack://@fof/polls/./node_modules/@babel/runtime/regenerator/index.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/construct.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","webpack://@fof/polls/webpack/bootstrap","webpack://@fof/polls/webpack/runtime/compat get default export","webpack://@fof/polls/webpack/runtime/define property getters","webpack://@fof/polls/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/polls/webpack/runtime/make namespace object"],"sourcesContent":["export default class Acl {\n static canManagePools(): boolean {\n return true;\n }\n\n static canStartPoll(): boolean {\n return true;\n //app.forum.attribute('canStartPoll') || !app.session.user;\n }\n}\n","export const slug = 'fof-polls';\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport classList from 'flarum/common/utils/classList';\nimport DiscussionComposer from 'flarum/forum/components/DiscussionComposer';\nimport ReplyComposer from 'flarum/forum/components/ReplyComposer';\n\nimport CreatePollModal from './components/CreatePollModal';\n\nexport const addToComposer = (composer) => {\n composer.prototype.addPoll = function () {\n app.modal.show(CreatePollModal, {\n poll: this.composer.fields.poll,\n onsubmit: (poll) => (this.composer.fields.poll = poll),\n });\n };\n\n // Add button to DiscussionComposer header\n extend(composer.prototype, 'headerItems', function (items) {\n const discussion = this.composer.body?.attrs?.discussion;\n const canStartPoll = discussion?.canStartPoll() ?? app.forum.canStartPolls();\n\n if (canStartPoll) {\n items.add(\n 'polls',\n \n \n {app.translator.trans(`fof-polls.forum.composer_discussion.${this.composer.fields.poll ? 'edit' : 'add'}_poll`)}\n \n ,\n 1\n );\n }\n });\n\n extend(composer.prototype, 'data', function (data) {\n if (this.composer.fields.poll) {\n data.poll = this.composer.fields.poll;\n }\n });\n};\n\nexport default () => {\n addToComposer(DiscussionComposer);\n addToComposer(ReplyComposer);\n};\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport Badge from 'flarum/common/components/Badge';\nimport DiscussionList from 'flarum/forum/components/DiscussionList';\nimport Discussion from 'flarum/common/models/Discussion';\n\nexport default () => {\n extend(DiscussionList.prototype, 'requestParams', (params) => {\n params.include.push('poll');\n });\n\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.hasPoll()) {\n badges.add(\n 'poll',\n Badge.component({\n type: 'poll',\n label: app.translator.trans('fof-polls.forum.tooltip.badge'),\n icon: 'fas fa-signal',\n }),\n 5\n );\n }\n });\n};\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nexport default function addNavItem() {\n extend(IndexPage.prototype, 'navItems', (items) => {\n items.add(\n 'fof-polls-directory',\n LinkButton.component(\n {\n href: app.route('fof_polls_directory'),\n icon: 'fas fa-poll',\n },\n app.translator.trans('fof-polls.forum.page.nav')\n ),\n 35\n );\n });\n}\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport PostPoll from './components/PostPoll';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\n\nexport default () => {\n extend(CommentPost.prototype, 'content', function (content) {\n const post = this.attrs.post;\n\n if ((!post.isHidden() || this.revealContent) && post.polls()) {\n for (const poll of post.polls()) {\n if (poll) {\n content.push();\n }\n }\n }\n });\n\n extend(CommentPost.prototype, 'oninit', function () {\n this.subtree.check(() => {\n const polls = this.attrs.post.polls();\n\n const checks = polls?.map?.(\n (poll) =>\n poll && [\n poll.data?.attributes,\n poll.options().map?.((option) => option?.data?.attributes),\n poll.myVotes().map?.((vote) => vote.option()?.id()),\n ]\n );\n\n return JSON.stringify(checks);\n });\n });\n\n extend(DiscussionPage.prototype, 'oncreate', function () {\n if (app.pusher) {\n app.pusher.then((binding) => {\n // We will listen for updates to all polls and options\n // Even if that model is not in the current discussion, it doesn't really matter\n binding.channels.main.bind('updatedPollOptions', (data) => {\n const poll = app.store.getById('polls', data['pollId']);\n\n if (poll) {\n poll.pushAttributes({\n voteCount: data['pollVoteCount'],\n });\n\n // Not redrawing here, as the option below should trigger the redraw already\n }\n\n const changedOptions = data['options'];\n\n for (const optionId in changedOptions) {\n const option = app.store.getById('poll_options', optionId);\n\n if (option && option.voteCount() !== undefined) {\n option.pushAttributes({\n voteCount: changedOptions[optionId],\n });\n }\n }\n\n m.redraw();\n });\n });\n }\n });\n\n extend(DiscussionPage.prototype, 'onremove', function () {\n if (app.pusher) {\n app.pusher.then((binding) => {\n binding.channels.main.unbind('updatedPollOptions');\n });\n }\n });\n};\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport CreatePollModal from './components/CreatePollModal';\nimport Button from 'flarum/common/components/Button';\n\nexport default () => {\n const createPoll = (post) =>\n app.modal.show(CreatePollModal, {\n onsubmit: (data) =>\n app.store\n .createRecord('polls')\n .save(\n {\n ...data,\n relationships: {\n post,\n },\n },\n {\n data: {\n include: 'options,myVotes,myVotes.option',\n },\n }\n )\n .then((poll) => {\n post.rawRelationship('polls')?.push?.({ type: 'polls', id: poll.id() });\n\n return poll;\n }),\n });\n\n extend(PostControls, 'moderationControls', function (items, post) {\n if (!post.isHidden() && post.canStartPoll()) {\n items.add(\n 'addPoll',\n \n );\n }\n });\n};\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport { slug } from '../../common';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.compose`;\n\nexport default class ComposePollHero extends Component {\n view(): Mithril.Children {\n const { poll } = this.attrs;\n\n return (\n
\n
\n
\n

{t(`${prfx}.${!!poll.id() ? 'edit' : 'add'}_title`)}

\n
\n \n {t(`${prfx}.polls_manager`)}\n \n {poll.exists && (\n \n {t(`${prfx}.polls_preview`)}\n \n )}\n
\n
\n
\n
\n );\n }\n}\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\nimport Poll from './Poll';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport PollForm from './PollForm';\nimport Acl from '../../common/Acl';\nimport PollFormState from '../states/PollFormState';\nimport { slug } from '../../common';\nimport ComposePollHero from './ComposePollHero';\n\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.compose`;\n\nexport default class ComposePollPage extends Page {\n poll: Poll | null = null;\n\n loading: boolean = false;\n\n oninit(vnode) {\n super.oninit(vnode);\n\n // If user not allowed to manage goodie collections, redirect to home\n if (!Acl.canManagePools()) {\n m.route.set(app.route('home'));\n }\n\n // Get the `edit` parameter from the URL\n const editId = m.route.param('id');\n if (editId) {\n this.poll = app.store.getById('poll', editId);\n\n if (!this.poll) {\n this.loading = true;\n\n app.store.find('fof/polls', editId).then((item) => {\n this.poll = item;\n this.loading = false;\n app.setTitle(t(`${prfx}.${!!this.poll?.id() ? 'edit' : 'add'}_title`));\n m.redraw();\n });\n }\n } else {\n this.poll = PollFormState.createNewPoll();\n }\n\n app.history.push('compose-goodie-collection');\n this.bodyClass = 'App--compose-goodie-collection';\n app.setTitle(t(`${prfx}.${!!this.poll?.id() ? 'edit' : 'add'}_title`));\n }\n\n view(): Mithril.Children {\n if (this.loading) {\n return ;\n }\n\n return (\n
\n \n
\n \n
\n
\n );\n }\n}\n","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport PollForm from './PollForm';\n\nexport default class CreatePollModal extends Modal {\n title() {\n return app.translator.trans('fof-polls.forum.modal.add_title');\n }\n\n className() {\n return 'PollDiscussionModal Modal--medium';\n }\n\n content() {\n //@todo check if bind is needed for onsubmit\n return [\n
\n \n
,\n ];\n }\n\n onsubmit(poll) {\n this.hide();\n this.attrs.onsubmit(poll);\n }\n}\n","import app from 'flarum/forum/app';\nimport CreatePollModal from './CreatePollModal';\n\nexport default class EditPollModal extends CreatePollModal {\n title() {\n return app.translator.trans('fof-polls.forum.modal.edit_title');\n }\n}\n","import app from 'flarum/forum/app';\n\nimport Modal from 'flarum/common/components/Modal';\nimport avatar from 'flarum/common/helpers/avatar';\nimport username from 'flarum/common/helpers/username';\nimport Link from 'flarum/common/components/Link';\nimport Stream from 'flarum/common/utils/Stream';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\n\nexport default class ListVotersModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.loading = Stream(true);\n\n app.store\n .find('fof/polls', this.attrs.poll.id(), {\n include: 'votes,votes.user,votes.option',\n })\n .then(() => this.loading(false))\n .finally(() => m.redraw());\n }\n\n className() {\n return 'Modal--medium VotesModal';\n }\n\n title() {\n return app.translator.trans('fof-polls.forum.votes_modal.title');\n }\n\n content() {\n return
{this.loading() ? : this.attrs.poll.options().map(this.optionContent.bind(this))}
;\n }\n\n optionContent(opt) {\n const votes = (this.attrs.poll.votes() || []).filter((v) => opt.id() === v.option().id());\n\n return (\n
\n

{opt.answer() + ':'}

\n\n {votes.length ? (\n
{votes.map(this.voteContent.bind(this))}
\n ) : (\n

{app.translator.trans('fof-polls.forum.modal.no_voters')}

\n )}\n
\n );\n }\n\n voteContent(vote) {\n const user = vote.user();\n const attrs = user && { href: app.route.user(user) };\n\n return (\n \n {avatar(user)} {username(user)}\n \n );\n }\n}\n","import * as Mithril from 'mithril';\nimport Component from 'flarum/common/Component';\n\nimport PollTitle from './Poll/PollTitle';\nimport PollOptions from './Poll/PollOptions';\nimport PollSubmitButton from './Poll/PollSubmitButton';\nimport PollImage from './Poll/PollImage';\n\nexport default class IndexPolls extends Component {\n view(): Mithril.Children {\n /* @type Poll */\n const poll = this.attrs.poll;\n\n return (\n
\n
\n \n
\n
\n \n
\n
\n Antworten\n \n \n
\n
\n
\n
\n );\n }\n}\n","import { slug } from '../../common';\nimport Component from 'flarum/common/Component';\nimport app from 'flarum/forum/app';\nimport Button from 'flarum/common/components/Button';\nimport Switch from 'flarum/common/components/Switch';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nimport extractText from 'flarum/common/utils/extractText';\nimport FormError from './form/FormError';\nimport PollFormState from '../states/PollFormState';\n\n// Make translation calls shorter\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.poll_form`;\n\nexport default class PollForm extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n this.state = new PollFormState(this.attrs.poll);\n\n // state handles poll initialization\n const poll = this.state.poll;\n\n //@todo way the options are destructured into options (answers) and optionImageUrls\n this.options = poll.options();\n this.optionAnswers = this.options.map((o) => Stream(o.answer()));\n this.optionImageUrls = this.options.map((o) => Stream(o.imageUrl()));\n\n this.question = Stream(poll.question());\n this.endDate = Stream(this.formatDate(poll.endDate()));\n this.publicPoll = Stream(poll.publicPoll());\n this.allowMultipleVotes = Stream(poll.allowMultipleVotes());\n this.hideVotes = Stream(poll.hideVotes());\n this.allowChangeVote = Stream(poll.allowChangeVote());\n this.maxVotes = Stream(poll.maxVotes() || 0);\n\n this.datepickerMinDate = this.formatDate(undefined);\n\n // Replace minimum of 'today' for poll end date only if the poll is not already closed\n if (this.endDate() && dayjs(poll.endDate).isAfter(dayjs())) {\n this.datepickerMinDate = this.formatDate(poll.endDate);\n }\n }\n\n view() {\n return (\n
\n
{this.fields().toArray()}
\n
\n );\n }\n\n fields() {\n const items = new ItemList();\n\n items.add(\n 'question',\n
\n \n\n \n
,\n 100\n );\n\n items.add(\n 'answers',\n
\n \n\n {this.displayOptions()}\n
,\n 80\n );\n\n items.add(\n 'date',\n
\n \n\n
\n \n {Button.component({\n className: 'Button PollModal--button',\n icon: 'fas fa-times',\n onclick: this.endDate.bind(this, null),\n })}\n
\n\n {this.endDate() && (\n

\n \n  \n {dayjs(this.endDate()).isBefore(dayjs())\n ? app.translator.trans('fof-polls.forum.poll_ended')\n : app.translator.trans('fof-polls.forum.days_remaining', { time: dayjs(this.endDate()).fromNow() })}\n

\n )}\n
,\n 40\n );\n\n items.add(\n 'public',\n
\n {Switch.component(\n {\n state: this.publicPoll() || false,\n onchange: this.publicPoll,\n },\n app.translator.trans('fof-polls.forum.modal.public_poll_label')\n )}\n
,\n 20\n );\n\n items.add(\n 'hide-votes',\n
\n \n {app.translator.trans('fof-polls.forum.modal.hide_votes_label')}\n \n
,\n 20\n );\n\n items.add(\n 'allow-change-vote',\n
\n \n {app.translator.trans('fof-polls.forum.modal.allow_change_vote_label')}\n \n
,\n 20\n );\n\n items.add(\n 'allow-multiple-votes',\n
\n {Switch.component(\n {\n state: this.allowMultipleVotes() || false,\n onchange: this.allowMultipleVotes,\n },\n app.translator.trans('fof-polls.forum.modal.allow_multiple_votes_label')\n )}\n
,\n 15\n );\n\n if (this.allowMultipleVotes()) {\n items.add(\n 'max-votes',\n
\n \n\n \n\n

{app.translator.trans('fof-polls.forum.modal.max_votes_help')}

\n
,\n 15\n );\n }\n\n items.add(\n 'submit',\n
\n \n {this.state.poll.exists && (\n \n )}\n
,\n -10\n );\n\n return items;\n }\n\n displayOptions() {\n return Object.keys(this.options).map((option, i) => (\n
\n
\n \n {app.forum.attribute('allowPollOptionImage') ? (\n \n ) : null}\n
\n {i >= 2\n ? Button.component({\n type: 'button',\n className: 'Button Button--warning PollModal--button',\n icon: 'fas fa-minus',\n onclick: i >= 2 ? this.removeOption.bind(this, i) : '',\n })\n : ''}\n
\n ));\n }\n\n addOption() {\n const max = Math.max(app.forum.attribute('pollMaxOptions'), 2);\n\n if (this.options.length < max) {\n this.options.push(app.store.createRecord('poll_options'));\n this.optionAnswers.push(Stream(''));\n this.optionImageUrls.push(Stream(''));\n } else {\n alert(extractText(app.translator.trans('fof-polls.forum.modal.max', { max })));\n }\n }\n\n removeOption(i) {\n this.options.splice(i, 1);\n this.optionAnswers.splice(i, 1);\n this.optionImageUrls.splice(i, 1);\n }\n\n data() {\n const options = this.options.map((o, i) => {\n if (!o.data.attributes) o.data.attributes = {};\n\n o.data.attributes.answer = this.optionAnswers[i]();\n o.data.attributes.imageUrl = this.optionImageUrls[i]();\n\n return o.data;\n });\n\n if (this.question() === '') {\n throw new FormError(app.translator.trans('fof-polls.forum.modal.include_question'));\n }\n\n if (options.length < 2) {\n throw new FormError(app.translator.trans('fof-polls.forum.modal.min'));\n }\n\n return {\n question: this.question(),\n endDate: this.dateToTimestamp(this.endDate()),\n publicPoll: this.publicPoll(),\n hideVotes: this.hideVotes(),\n allowChangeVote: this.allowChangeVote(),\n allowMultipleVotes: this.allowMultipleVotes(),\n maxVotes: this.maxVotes(),\n options,\n };\n }\n\n async onsubmit(e) {\n e.preventDefault();\n\n try {\n await this.state.save(this.data());\n\n // Show success alert\n const alertId = app.alerts.show(\n {\n type: 'success',\n controls: [\n \n m.route.set(\n app.route('compose-poll', {\n edit: this.state.collection.id(),\n })\n )\n }\n >\n {t(`${prfx}.continue_editing`)}\n ,\n ],\n },\n t(`${prfx}.success`)\n );\n\n // Hide alert after 10 seconds\n setTimeout(() => app.alerts.dismiss(alertId), 10000);\n\n // Check if we need to call a custom onsubmit callback\n if (this.attrs.onsubmit) {\n this.attrs.onsubmit(this.state.poll);\n } else {\n // Otherwise redirect to pools list\n m.route.set(app.route('polls-manager'));\n }\n } catch (e) {\n if (e instanceof FormError) {\n app.alerts.show({ type: 'error' }, e.message);\n } else {\n // Show error alert\n app.alerts.show({ type: 'error' }, t(`${prfx}.error`));\n }\n } finally {\n this.state.loading = false;\n m.redraw();\n }\n }\n\n async delete() {\n if (!confirm(t(`${prfx}.delete_confirm`))) {\n return;\n }\n\n try {\n await this.state.delete();\n // Show success alert\n const alertId = app.alerts.show({ type: 'success' }, t(`${prfx}.delete_success`));\n\n // Hide alert after 10 seconds\n setTimeout(() => app.alerts.dismiss(alertId), 10000);\n\n // Redirect to polls list\n m.route.set(app.route('polls-manager'));\n } catch (e) {\n // Show error alert\n app.alerts.show({ type: 'error' }, t(`${prfx}.delete_error`));\n }\n }\n\n formatDate(date, def = false) {\n const dayjsDate = dayjs(date);\n\n if (date === false || !dayjsDate.isValid()) return def !== false ? this.formatDate(def) : null;\n\n return dayjsDate.format('YYYY-MM-DDTHH:mm');\n }\n\n dateToTimestamp(date) {\n const dayjsDate = dayjs(date);\n\n if (!date || !dayjsDate.isValid()) return false;\n\n return dayjsDate.format();\n }\n}\n","import * as Mithril from 'mithril';\nimport Component from 'flarum/common/Component';\n\nexport default class PollImage extends Component {\n view(): Mithril.Children {\n return;\n }\n}\n","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport PollListItem from './PollListItem';\nimport Button from 'flarum/common/components/Button';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Placeholder from 'flarum/common/components/Placeholder';\nimport classList from 'flarum/common/utils/classList';\n\n/**\n * The `PollList` component displays a list of polls.\n */\nexport default class PollList extends Component {\n view() {\n /**\n * @type {import('../../states/PollListState').default}\n */\n const state = this.attrs.state;\n const params = state.getParams();\n const isLoading = state.isInitialLoading() || state.isLoadingNext();\n\n let loading;\n\n if (isLoading) {\n loading = ;\n } else if (state.hasNext()) {\n loading = (\n \n );\n }\n\n if (state.isEmpty()) {\n const text = app.translator.trans('fof-polls.forum.polls_list.empty_text');\n return (\n
\n \n
\n );\n }\n\n const pageSize = state.pageSize;\n\n return (\n
\n
    \n {state.getPages().map((pg) => {\n return pg.items.map((poll) => (\n
  • \n \n
  • \n ));\n })}\n
\n
{loading}
\n
\n );\n }\n}\n","import * as Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport type Poll from '../../../common/models/Poll';\nimport type { PollListParams } from '../../states/PollListState';\nimport SubtreeRetainer from 'flarum/common/utils/SubtreeRetainer';\nimport classList from 'flarum/common/utils/classList';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Link from 'flarum/common/components/Link';\nimport highlight from 'flarum/common/helpers/highlight';\nimport slidable from 'flarum/forum/utils/slidable';\nimport icon from 'flarum/common/helpers/icon';\nimport PollPage from './PollPage';\nimport abbreviateNumber from 'flarum/common/utils/abbreviateNumber';\n\nexport interface IPollListItemAttrs extends ComponentAttrs {\n poll: Poll;\n params: PollListParams;\n}\n\n/**\n * The `PollListItem` component shows a single poll in the\n * poll list.\n */\nexport default class PollListItem extends Component {\n /**\n * Ensures that the poll will not be redrawn\n * unless new data comes in.\n */\n subtree!: SubtreeRetainer;\n\n highlightRegExp?: RegExp;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.subtree = new SubtreeRetainer(\n () => this.attrs.poll.freshness,\n () => {\n const time = app.session.user && app.session.user.markedAllAsReadAt();\n return time && time.getTime();\n },\n () => this.active()\n );\n }\n\n elementAttrs() {\n return {\n className: classList('PollListItem', {\n active: this.active(),\n 'PollListItem--hidden': this.attrs.poll.isHidden(),\n Slidable: 'ontouchstart' in window,\n }),\n };\n }\n\n view() {\n const poll = this.attrs.poll;\n\n // TODO IMPLEMENT POLLCONTROLS\n //const controls = PollControls.controls(poll, this).toArray();\n const attrs = this.elementAttrs();\n\n return (\n
\n {/* {this.controlsView(controls)} */}\n {this.contentView()}\n {this.slidableUnderneathView()}\n
\n );\n }\n\n controlsView(controls: Mithril.ChildArray): Mithril.Children {\n return (\n !!controls.length && (\n \n {controls}\n \n )\n );\n }\n\n slidableUnderneathView(): Mithril.Children {\n const poll = this.attrs.poll;\n const isUnread = poll.isUnread();\n\n return (\n \n {icon('fas fa-check')}\n \n );\n }\n\n contentView(): Mithril.Children {\n const poll = this.attrs.poll;\n // const isUnread = poll.isUnread();\n // const isRead = poll.isRead();\n\n return (\n //
\n
\n {/* {this.authorAvatarView()}\n {this.badgesView()} */}\n {this.mainView()}\n {this.voteCountItem()}\n
\n );\n }\n\n mainView(): Mithril.Children {\n const poll = this.attrs.poll;\n\n return (\n \n

{highlight(poll.question(), this.highlightRegExp)}

\n {/*
    {listItems(this.infoItems().toArray())}
*/}\n \n );\n }\n\n oncreate(vnode: Mithril.VnodeDOM) {\n super.oncreate(vnode);\n\n // If we're on a touch device, set up the discussion row to be slidable.\n // This allows the user to drag the row to either side of the screen to\n // reveal controls.\n if ('ontouchstart' in window) {\n const slidableInstance = slidable(this.element);\n\n this.$('.PollListItem-controls').on('hidden.bs.dropdown', () => slidableInstance.reset());\n }\n }\n\n onbeforeupdate(vnode: Mithril.VnodeDOM) {\n super.onbeforeupdate(vnode);\n\n return this.subtree.needsRebuild();\n }\n\n /**\n * Determine whether or not the discussion is currently being viewed.\n */\n active() {\n return app.current.matches(PollPage, { poll: this.attrs.poll });\n }\n\n /**\n * Mark the poll as read.\n */\n markAsRead() {\n const poll = this.attrs.poll;\n\n if (poll.isUnread()) {\n poll.save({ lastVotedNumber: poll.voteCount() });\n m.redraw();\n }\n }\n\n voteCountItem() {\n const poll = this.attrs.poll;\n\n return (\n \n {abbreviateNumber(poll.voteCount())}\n\n \n {app.translator.trans('fof-polls.forum.poll_list.total_votes_a11y_label', { count: poll.voteCount() })}\n \n \n );\n }\n}\n","import * as Mithril from 'mithril';\nimport Component from 'flarum/common/Component';\nimport PollOptionLabel from './PollOptionLabel';\nimport PollOptionInput from './PollOptionInput';\n\nexport default class PollOption extends Component {\n view(): Mithril.Children {\n const option = this.attrs.option;\n return (\n \n );\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollOptionInputAttrs extends ComponentAttrs {\n id: Number; // for example 1\n name: String; // for example privacy-setting\n value: String; // for example Private to Project Members\n isResult?: Boolean;\n}\n\nexport default class PollOptionInput extends Component {\n view(): Mithril.Children {\n const { isResult } = this.attrs;\n return (\n \n );\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollOptionLabelAttrs extends ComponentAttrs {\n text: String;\n id: Number;\n}\n\nexport default class PollOptionLabel extends Component {\n view(): Mithril.Children {\n return (\n \n {this.attrs.text}\n \n );\n }\n}\n","import Mithril from 'mithril';\nimport Component from 'flarum/common/Component';\nimport PollOption from './PollOption';\nimport PollOptionModel from '../../models/PollOption';\nimport PollResult from './PollResult';\nimport ItemList from 'flarum/common/utils/ItemList';\n\nexport default class PollOptions extends Component {\n view(): Mithril.Children {\n return
{this.pollOptions().toArray()}
;\n }\n\n pollOptions(): ItemList {\n const items = new ItemList();\n this.attrs.options.forEach((option: PollOptionModel): void => {\n items.add('option' + option.id(), );\n });\n\n items.add('test5', );\n\n return items;\n }\n}\n","import * as Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\n\nexport default class PollPage extends Page {\n view(): Mithril.Children {\n return

PollPage

;\n }\n}\n","import * as Mithril from 'mithril';\nimport Component from 'flarum/common/Component';\nimport PollOptionLabel from './PollOptionLabel';\nimport PollResultsNumber from './PollResultNumber';\nimport PollOptionInput from './PollOptionInput';\n\nexport default class PollResults extends Component {\n view(): Mithril.Children {\n return (\n \n );\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollResultsNumberAttrs extends ComponentAttrs {\n number: Number;\n}\n\nexport default class PollResultsNumber extends Component {\n view(): Mithril.Children {\n return {this.attrs.number} %;\n }\n}\n","import * as Mithril from 'mithril';\nimport Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\n\nexport default class PollSubmitButton extends Component {\n view(): Mithril.Children {\n return (\n \n );\n }\n\n /**\n * Event handler for submit button being clicked\n */\n\n pollButtonSubmit() {\n console.log('submitted');\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollTitleAttrs extends ComponentAttrs {\n text: String;\n}\n\nexport default class PollTitle extends Component {\n view(): Mithril.Children {\n return

{this.attrs.text}

;\n }\n}\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport listItems from 'flarum/common/helpers/listItems';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Page, { IPageAttrs } from 'flarum/common/components/Page';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport PollList from './Poll/PollList';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport extractText from 'flarum/common/utils/extractText';\nimport PollListState from '../states/PollListState';\nimport Button from 'flarum/common/components/Button';\nimport SelectDropdown from 'flarum/common/components/SelectDropdown';\nimport Acl from '../../common/Acl';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Poll from '../models/Poll';\nimport IndexPolls from './Poll';\n\nexport default class PollsPage extends Page {\n loading: boolean = false;\n poll: Poll | null = null;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n const editId = m.route.param('id');\n if (editId) {\n this.poll = app.store.getById('poll', editId);\n\n if (!this.poll) {\n this.loading = true;\n\n app.store.find('fof/polls', editId).then((item) => {\n this.poll = item;\n this.loading = false;\n app.setTitle(extractText(app.translator.trans('fof-polls.forum.page.poll_detail')));\n m.redraw();\n });\n }\n } else {\n this.initListView();\n }\n }\n\n initListView() {\n this.state = new PollListState({\n sort: m.route.param('sort'),\n filter: m.route.param('filter'),\n });\n\n this.state.refresh();\n\n app.setTitle(extractText(app.translator.trans('fof-polls.forum.page.nav')));\n }\n\n oncreate(vnode: Mithril.Vnode) {\n super.oncreate(vnode);\n }\n\n view(): Mithril.Children {\n if (this.loading) {\n return ;\n }\n\n if (this.poll) {\n return (\n
\n
\n \n
\n
\n );\n }\n\n return (\n
\n {IndexPage.prototype.hero()}\n
\n
\n \n
\n
\n
    {listItems(this.viewItems().toArray())}
\n
    {listItems(this.actionItems().toArray())}
\n
\n \n
\n
\n
\n
\n );\n }\n\n sidebarItems() {\n const items = new ItemList();\n const canStartPoll = Acl.canStartPoll();\n\n items.add(\n 'newGlobalPoll',\n {\n this.newPollAction();\n }}\n disabled={!canStartPoll}\n >\n {app.translator.trans(`fof-polls.forum.poll.${canStartPoll ? 'start_poll_button' : 'cannot_start_poll_button'}`)}\n \n );\n\n items.add(\n 'nav',\n \n {this.navItems().toArray()}\n \n );\n\n return items;\n }\n\n actionItems(): ItemList {\n const items = new ItemList();\n\n items.add(\n 'refresh',\n Button.component({\n title: app.translator.trans('fof-polls.forum.page.refresh_tooltip'),\n icon: 'fas fa-sync',\n className: 'Button Button--icon',\n onclick: () => {\n this.state.refresh();\n },\n })\n );\n\n return items;\n }\n\n viewItems() {\n return IndexPage.prototype.viewItems();\n }\n navItems() {\n return IndexPage.prototype.navItems();\n }\n\n /**\n * Change to create new poll page\n */\n newPollAction(): void {\n if (!app.session.user) {\n app.modal.show(LogInModal);\n return;\n }\n\n m.route.set(app.route('fof_polls_compose'));\n }\n}\n","import app from 'flarum/forum/app';\n\nimport Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport ListVotersModal from './ListVotersModal';\nimport classList from 'flarum/common/utils/classList';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport icon from 'flarum/common/helpers/icon';\nimport EditPollModal from './EditPollModal';\n\nexport default class PostPoll extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.loadingOptions = false;\n\n this.useSubmitUI = !this.attrs.poll?.canChangeVote() && this.attrs.poll?.allowMultipleVotes();\n this.pendingSubmit = false;\n this.pendingOptions = null;\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n this.preventClose = this.preventClose.bind(this);\n window.addEventListener('beforeunload', this.preventClose);\n }\n\n onremove(vnode) {\n super.onremove(vnode);\n\n window.removeEventListener('beforeunload', this.preventClose);\n }\n\n view() {\n const poll = this.attrs.poll;\n const options = poll.options() || [];\n let maxVotes = poll.allowMultipleVotes() ? poll.maxVotes() : 1;\n\n if (maxVotes === 0) maxVotes = options.length;\n\n const infoItems = this.infoItems(maxVotes);\n\n return (\n
\n
\n

{poll.question()}

\n\n {poll.canSeeVoters() && (\n \n
\n\n
\n
{options.map(this.viewOption.bind(this))}
\n\n
\n {!infoItems.isEmpty() &&
{infoItems.toArray()}
}\n\n {this.useSubmitUI && this.pendingSubmit && (\n \n )}\n
\n
\n
\n );\n }\n\n infoItems(maxVotes) {\n const items = new ItemList();\n const poll = this.attrs.poll;\n const hasVoted = poll.myVotes()?.length > 0;\n\n if (app.session.user && !poll.canVote() && !poll.hasEnded()) {\n items.add(\n 'no-permission',\n \n \n {app.translator.trans('fof-polls.forum.no_permission')}\n \n );\n }\n\n if (poll.endDate()) {\n items.add(\n 'end-date',\n \n \n {poll.hasEnded()\n ? app.translator.trans('fof-polls.forum.poll_ended')\n : app.translator.trans('fof-polls.forum.days_remaining', { time: dayjs(poll.endDate()).fromNow() })}\n \n );\n }\n\n if (poll.canVote()) {\n items.add(\n 'max-votes',\n \n \n {app.translator.trans('fof-polls.forum.max_votes_allowed', { max: maxVotes })}\n \n );\n\n if (!poll.canChangeVote()) {\n items.add(\n 'cannot-change-vote',\n \n \n {app.translator.trans('fof-polls.forum.poll.cannot_change_vote')}\n \n );\n }\n }\n\n return items;\n }\n\n viewOption(opt) {\n const poll = this.attrs.poll;\n const hasVoted = poll.myVotes()?.length > 0;\n const totalVotes = poll.voteCount();\n\n const voted = this.pendingOptions ? this.pendingOptions.has(opt.id()) : poll.myVotes()?.some?.((vote) => vote.option() === opt);\n const votes = opt.voteCount();\n const percent = totalVotes > 0 ? Math.round((votes / totalVotes) * 100) : 0;\n\n // isNaN(null) is false, so we have to check type directly now that API always returns the field\n const canSeeVoteCount = typeof votes === 'number';\n const isDisabled = this.loadingOptions || (hasVoted && !poll.canChangeVote());\n const width = canSeeVoteCount ? percent : (Number(voted) / (poll.myVotes()?.length || 1)) * 100;\n\n const showCheckmark = !app.session.user || (!poll.hasEnded() && poll.canVote() && (!hasVoted || poll.canChangeVote()));\n\n const bar = (\n
\n {showCheckmark && (\n \n )}\n\n
\n {opt.answer()}\n {voted && !showCheckmark && icon('fas fa-check-circle', { className: 'PollAnswer-check' })}\n {canSeeVoteCount && {percent}%}\n
\n\n {opt.imageUrl() ? {opt.answer()} : null}\n
\n );\n\n return (\n \n {canSeeVoteCount ? (\n \n {bar}\n \n ) : (\n bar\n )}\n
\n );\n }\n\n changeVote(option, evt) {\n if (!app.session.user) {\n app.modal.show(LogInModal);\n evt.target.checked = false;\n return;\n }\n\n const optionIds = this.pendingOptions || new Set(this.attrs.poll.myVotes().map?.((v) => v.option().id()));\n const isUnvoting = optionIds.delete(option.id());\n const allowsMultiple = this.attrs.poll.allowMultipleVotes();\n\n if (!allowsMultiple) {\n optionIds.clear();\n }\n\n if (!isUnvoting) {\n optionIds.add(option.id());\n }\n\n if (this.useSubmitUI) {\n this.pendingOptions = optionIds.size ? optionIds : null;\n this.pendingSubmit = !!this.pendingOptions;\n return;\n }\n\n return this.submit(optionIds, null, () => (evt.target.checked = isUnvoting));\n }\n\n onsubmit() {\n return this.submit(this.pendingOptions, () => {\n this.pendingOptions = null;\n this.pendingSubmit = false;\n });\n }\n\n submit(optionIds, cb, onerror) {\n this.loadingOptions = true;\n m.redraw();\n\n return app\n .request({\n method: 'PATCH',\n url: `${app.forum.attribute('apiUrl')}/fof/polls/${this.attrs.poll.id()}/votes`,\n body: {\n data: {\n optionIds: Array.from(optionIds),\n },\n },\n })\n .then((res) => {\n app.store.pushPayload(res);\n cb?.();\n })\n .catch((err) => {\n onerror?.(err);\n })\n .finally(() => {\n this.loadingOptions = false;\n\n m.redraw();\n });\n }\n\n showVoters() {\n // Load all the votes only when opening the votes list\n app.modal.show(ListVotersModal, {\n poll: this.attrs.poll,\n post: this.attrs.post,\n });\n }\n\n deletePoll() {\n if (confirm(app.translator.trans('fof-polls.forum.moderation.delete_confirm'))) {\n this.attrs.poll.delete().then(() => {\n m.redraw.sync();\n });\n }\n }\n\n /**\n * Attempting to use the `tooltipVisible` attr on the Tooltip component set to 'false' when no vote count\n * caused the tooltip to break on click. This is a workaround to hide the tooltip when no vote count is available,\n * called on 'onremove' of the Tooltip component. It doesn't always work as intended either, but it does the job.\n */\n hideOptionTooltip(vnode) {\n vnode.attrs.tooltipVisible = false;\n vnode.state.updateVisibility();\n }\n\n /**\n * Alert before navigating away using browser's 'beforeunload' event\n */\n preventClose(e) {\n if (this.pendingOptions) {\n e.preventDefault();\n return true;\n }\n }\n}\n","export default class FormError extends Error {}\n","import CreatePollModal from './CreatePollModal';\nimport PostPoll from './PostPoll';\nimport EditPollModal from './EditPollModal';\nimport ListVotersModal from './ListVotersModal';\nimport PollForm from './PollForm';\n\nexport const components = {\n CreatePollModal,\n PostPoll,\n EditPollModal,\n ListVotersModal,\n PollForm,\n};\n","import Extend from 'flarum/common/extenders';\nimport Post from 'flarum/common/models/Post';\nimport Forum from 'flarum/common/models/Forum';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Poll from './models/Poll';\nimport PollOption from './models/PollOption';\nimport PollVote from './models/PollVote';\nimport PollsPage from './components/PollsPage';\nimport ComposePollPage from './components/ComposePollPage';\n\nexport default [\n new Extend.Routes() //\n // .add('fof_polls_directory', '/polls', PollsDirectory),\n .add('fof_polls_directory', '/polls', PollsPage)\n .add('fof_polls_compose', '/polls/composer', ComposePollPage),\n\n new Extend.Store() //\n .add('polls', Poll)\n .add('poll_options', PollOption)\n .add('poll_votes', PollVote),\n\n new Extend.Model(Post) //\n .hasMany('polls')\n .attribute('canStartPoll'),\n\n new Extend.Model(Forum) //\n .attribute('canStartPolls'),\n\n new Extend.Model(Discussion) //\n .attribute('hasPoll')\n .attribute('canStartPoll'),\n];\n","import app from 'flarum/forum/app';\n\nimport addDiscussionBadge from './addDiscussionBadge';\nimport addComposerItems from './addComposerItems';\nimport addPollsToPost from './addPollsToPost';\nimport addPostControls from './addPostControls';\nimport addNavItem from './addNavItem';\n\nexport * from './components';\nexport * from './models';\n\nimport PollsPage from './components/PollsPage';\n\napp.initializers.add('fof/polls', () => {\n addDiscussionBadge();\n addComposerItems();\n addPollsToPost();\n addPostControls();\n addNavItem();\n});\n\nexport { default as extend } from './extend';\n","import Model from 'flarum/common/Model';\nimport PollOption from './PollOption';\nimport PollVote from './PollVote';\nimport computed from 'flarum/common/utils/computed';\n\nexport default class Poll extends Model {\n question() {\n return Model.attribute('question').call(this);\n }\n\n hasEnded() {\n return Model.attribute('hasEnded').call(this);\n }\n\n endDate() {\n return Model.attribute('endDate', Model.transformDate).call(this);\n }\n\n publicPoll() {\n return Model.attribute('publicPoll').call(this);\n }\n\n hideVotes() {\n return Model.attribute('hideVotes').call(this);\n }\n\n allowChangeVote() {\n return Model.attribute('allowChangeVote').call(this);\n }\n\n allowMultipleVotes() {\n return Model.attribute('allowMultipleVotes').call(this);\n }\n\n maxVotes() {\n return Model.attribute('maxVotes').call(this);\n }\n\n voteCount() {\n return Model.attribute('voteCount').call(this);\n }\n\n canVote() {\n return Model.attribute('canVote').call(this);\n }\n\n canEdit() {\n return Model.attribute('canEdit').call(this);\n }\n\n canDelete() {\n return Model.attribute('canDelete').call(this);\n }\n\n canSeeVoters() {\n return Model.attribute('canSeeVoters').call(this);\n }\n\n canChangeVote() {\n return Model.attribute('canChangeVote').call(this);\n }\n\n options() {\n return Model.hasMany('options').call(this);\n }\n\n votes() {\n return Model.hasMany('votes').call(this);\n }\n\n myVotes() {\n return Model.hasMany('myVotes').call(this);\n }\n\n isGlobal() {\n return Model.attribute('isGlobal').call(this);\n }\n\n isHidden() {\n return computed('hiddenAt', (hiddenAt) => !!hiddenAt).call(this);\n }\n\n // TODO: These two don't make sense as of now\n isUnread() {\n return false;\n }\n\n apiEndpoint() {\n /** @ts-ignore */\n return `/fof/polls${this.exists ? `/${this.data.id}` : ''}`;\n }\n}\n","import Model from 'flarum/common/Model';\nimport Poll from './Poll';\nimport PollVote from './PollVote';\n\nexport default class PollOption extends Model {\n answer() {\n return Model.attribute('answer').call(this);\n }\n\n imageUrl() {\n return Model.attribute('imageUrl').call(this);\n }\n\n voteCount() {\n return Model.attribute('voteCount').call(this);\n }\n\n poll() {\n return Model.hasOne('polls').call(this);\n }\n\n votes() {\n return Model.hasMany('votes').call(this);\n }\n\n apiEndpoint() {\n /** @ts-ignore */\n return `/fof/polls/answers${this.exists ? `/${this.data.id}` : ''}`;\n }\n}\n","import Model from 'flarum/common/Model';\nimport Poll from './Poll';\nimport PollOption from './PollOption';\nimport User from 'flarum/common/models/User';\n\nexport default class PollVote extends Model {\n poll() {\n return Model.hasOne('poll').call(this);\n }\n\n option() {\n return Model.hasOne('option').call(this);\n }\n\n user() {\n return Model.hasOne('user').call(this);\n }\n\n pollId() {\n return Model.attribute('pollId').call(this);\n }\n\n optionId() {\n return Model.attribute('optionId').call(this);\n }\n\n apiEndpoint() {\n return `/fof/polls/${this.pollId()}/vote`;\n }\n}\n","import Poll from './Poll';\nimport PollOption from './PollOption';\nimport PollVote from './PollVote';\n\nexport const models = {\n Poll,\n PollOption,\n PollVote,\n};\n","import app from 'flarum/forum/app';\n\nexport default class PollFormState {\n static createNewPoll() {\n const poll = app.store.createRecord('polls');\n poll.pushAttributes({\n question: '',\n endDate: '',\n publicPoll: false,\n allowMultipleVotes: false,\n hideVotes: false,\n allowChangeVote: false,\n maxVotes: 0,\n });\n poll.pushData({ relationships: { options: [] } });\n return poll;\n }\n\n constructor(poll) {\n if (!poll) {\n poll = PollFormState.createNewPoll();\n }\n\n this.loading = false;\n this.deleting = false;\n this.poll = poll;\n this.expandedGroup = 'setup';\n }\n\n isExpanded(groupKey) {\n return this.expandedGroup === groupKey;\n }\n\n expand(groupKey) {\n this.expandedGroup = groupKey;\n m.redraw();\n }\n\n async save(data) {\n this.loading = true;\n m.redraw();\n\n try {\n this.poll = await this.poll.save(data);\n } finally {\n this.loading = false;\n m.redraw();\n }\n }\n\n async delete() {\n this.loading = true;\n m.redraw();\n\n try {\n await this.poll.delete();\n this.deleting = true;\n } finally {\n this.loading = false;\n m.redraw();\n }\n }\n}\n","import app from 'flarum/forum/app';\nimport PaginatedListState, { Page, PaginatedListParams, PaginatedListRequestParams } from 'flarum/common/states/PaginatedListState';\nimport Poll from '../models/Poll';\nimport { ApiResponsePlural } from 'flarum/common/Store';\nimport EventEmitter from 'flarum/common/utils/EventEmitter';\n\nexport interface PollListParams extends PaginatedListParams {\n sort?: string;\n}\n\nconst globalEventEmitter = new EventEmitter();\n\nexport default class PollListState

extends PaginatedListState {\n protected extraPolls: Poll[] = [];\n protected eventEmitter: EventEmitter;\n\n constructor(params: P, page: number = 1) {\n super(params, page, 20);\n\n this.eventEmitter = globalEventEmitter.on('poll.deleted', this.deletePoll.bind(this));\n }\n\n get type(): string {\n return 'fof/polls';\n }\n\n requestParams(): PaginatedListRequestParams {\n const params = {\n include: ['options', 'votes'],\n filter: this.params.filter || {},\n sort: this.sortMap()[this.params.sort ?? ''],\n };\n\n if (this.params.q) {\n params.filter.q = this.params.q;\n }\n\n return params;\n }\n\n protected loadPage(page: number = 1): Promise> {\n const preloadedPolls = app.preloadedApiDocument();\n\n if (preloadedPolls) {\n this.initialLoading = false;\n\n return Promise.resolve(preloadedPolls);\n }\n\n return super.loadPage(page);\n }\n\n clear(): void {\n super.clear();\n\n this.extraPolls = [];\n }\n\n /**\n * Get a map of sort keys (which appear in the URL, and are used for\n * translation) to the API sort value that they represent.\n */\n sortMap() {\n const map: any = {};\n\n if (this.params.q) {\n map.relevance = '';\n }\n map.newest = '-createdAt';\n map.oldest = 'createdAt';\n\n return map;\n }\n\n /**\n * In the last request, has the user searched for a poll?\n */\n isSearchResults(): boolean {\n return !!this.params.q;\n }\n\n removePoll(poll: Poll): void {\n this.eventEmitter.emit('poll.deleted', poll);\n }\n\n deletePoll(poll: Poll): void {\n for (const page of this.pages) {\n const index = page.items.indexOf(poll);\n\n if (index !== -1) {\n page.items.splice(index, 1);\n break;\n }\n }\n\n const index = this.extraPolls.indexOf(poll);\n\n if (index !== -1) {\n this.extraPolls.splice(index);\n }\n\n m.redraw();\n }\n\n /**\n * Add a poll to the top of the list.\n */\n addPoll(poll: Poll): void {\n this.removePoll(poll);\n this.extraPolls.unshift(poll);\n\n m.redraw();\n }\n\n protected getAllItems(): Poll[] {\n return this.extraPolls.concat(super.getAllItems());\n }\n\n public getPages(): Page[] {\n const pages = super.getPages();\n\n if (this.extraPolls.length) {\n return [\n {\n number: -1,\n items: this.extraPolls,\n },\n ...pages,\n ];\n }\n\n return pages;\n }\n}\n","module.exports = flarum.core.compat['common/Component'];","module.exports = flarum.core.compat['common/Model'];","module.exports = flarum.core.compat['common/components/Badge'];","module.exports = flarum.core.compat['common/components/Button'];","module.exports = flarum.core.compat['common/components/Dropdown'];","module.exports = flarum.core.compat['common/components/Link'];","module.exports = flarum.core.compat['common/components/LinkButton'];","module.exports = flarum.core.compat['common/components/LoadingIndicator'];","module.exports = flarum.core.compat['common/components/Modal'];","module.exports = flarum.core.compat['common/components/Page'];","module.exports = flarum.core.compat['common/components/Placeholder'];","module.exports = flarum.core.compat['common/components/SelectDropdown'];","module.exports = flarum.core.compat['common/components/Switch'];","module.exports = flarum.core.compat['common/components/Tooltip'];","module.exports = flarum.core.compat['common/extend'];","module.exports = flarum.core.compat['common/extenders'];","module.exports = flarum.core.compat['common/helpers/avatar'];","module.exports = flarum.core.compat['common/helpers/highlight'];","module.exports = flarum.core.compat['common/helpers/icon'];","module.exports = flarum.core.compat['common/helpers/listItems'];","module.exports = flarum.core.compat['common/helpers/username'];","module.exports = flarum.core.compat['common/models/Discussion'];","module.exports = flarum.core.compat['common/models/Forum'];","module.exports = flarum.core.compat['common/models/Post'];","module.exports = flarum.core.compat['common/states/PaginatedListState'];","module.exports = flarum.core.compat['common/utils/EventEmitter'];","module.exports = flarum.core.compat['common/utils/ItemList'];","module.exports = flarum.core.compat['common/utils/Stream'];","module.exports = flarum.core.compat['common/utils/SubtreeRetainer'];","module.exports = flarum.core.compat['common/utils/abbreviateNumber'];","module.exports = flarum.core.compat['common/utils/classList'];","module.exports = flarum.core.compat['common/utils/computed'];","module.exports = flarum.core.compat['common/utils/extractText'];","module.exports = flarum.core.compat['forum/app'];","module.exports = flarum.core.compat['forum/components/CommentPost'];","module.exports = flarum.core.compat['forum/components/DiscussionComposer'];","module.exports = flarum.core.compat['forum/components/DiscussionList'];","module.exports = flarum.core.compat['forum/components/DiscussionPage'];","module.exports = flarum.core.compat['forum/components/IndexPage'];","module.exports = flarum.core.compat['forum/components/LogInModal'];","module.exports = flarum.core.compat['forum/components/ReplyComposer'];","module.exports = flarum.core.compat['forum/utils/PostControls'];","module.exports = flarum.core.compat['forum/utils/slidable'];","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(t, e, r) {\n if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);\n var o = [null];\n o.push.apply(o, e);\n var p = new (t.bind.apply(t, o))();\n return r && setPrototypeOf(p, r.prototype), p;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\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}","export default function _isNativeFunction(fn) {\n try {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n } catch (e) {\n return typeof fn === \"function\";\n }\n}","export default function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {\n return !!t;\n })();\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : String(i);\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\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};"],"names":["Acl","canManagePools","canStartPoll","default","slug","app","extend","classList","DiscussionComposer","ReplyComposer","CreatePollModal","addToComposer","composer","prototype","addPoll","_this","modal","show","poll","fields","onsubmit","items","_this$composer$body","_discussion$canStartP","discussion","body","attrs","forum","canStartPolls","add","m","className","onclick","bind","translator","trans","data","Badge","DiscussionList","Discussion","params","include","push","badges","hasPoll","component","type","label","icon","IndexPage","LinkButton","addNavItem","href","route","CommentPost","PostPoll","DiscussionPage","content","post","isHidden","revealContent","polls","_iterator","_createForOfIteratorHelperLoose","_step","done","value","subtree","check","checks","map","_poll$data","_poll$options$map","_poll$options","_poll$myVotes$map","_poll$myVotes","attributes","options","call","option","_option$data","myVotes","vote","_vote$option","id","JSON","stringify","pusher","then","binding","channels","main","store","getById","pushAttributes","voteCount","changedOptions","optionId","undefined","redraw","unbind","PostControls","Button","createPoll","createRecord","save","_extends","relationships","_post$rawRelationship","rawRelationship","Component","t","prfx","ComposePollHero","_Component","_inheritsLoose","apply","arguments","_proto","view","itemClassName","exists","external","target","Page","LoadingIndicator","PollForm","PollFormState","ComposePollPage","_Page","_len","length","args","Array","_key","concat","loading","oninit","vnode","_this2","_this$poll","set","editId","param","find","item","_this2$poll","setTitle","createNewPoll","history","bodyClass","Modal","_Modal","title","hide","EditPollModal","_CreatePollModal","avatar","username","Link","Stream","ListVotersModal","optionContent","opt","votes","filter","v","answer","voteContent","user","PollTitle","PollOptions","PollSubmitButton","PollImage","IndexPolls","image","text","question","Switch","ItemList","extractText","FormError","state","optionAnswers","o","optionImageUrls","imageUrl","endDate","formatDate","publicPoll","allowMultipleVotes","hideVotes","allowChangeVote","maxVotes","datepickerMinDate","dayjs","isAfter","toArray","name","bidi","addOption","displayOptions","min","max","isBefore","time","fromNow","onchange","disabled","deleting","Object","keys","i","placeholder","attribute","removeOption","Math","alert","splice","dateToTimestamp","_onsubmit","_asyncToGenerator","_regeneratorRuntime","mark","_callee","e","_this3","alertId","wrap","_callee$","_context","prev","next","preventDefault","alerts","controls","edit","collection","setTimeout","dismiss","t0","message","finish","stop","_x","_delete2","_callee2","_callee2$","_context2","confirm","abrupt","_delete","date","def","dayjsDate","isValid","format","PollListItem","Placeholder","PollList","getParams","isLoading","isInitialLoading","isLoadingNext","hasNext","loadNext","isEmpty","pageSize","isSearchResults","getPages","pg","key","SubtreeRetainer","Dropdown","highlight","slidable","PollPage","abbreviateNumber","highlightRegExp","freshness","session","markedAllAsReadAt","getTime","active","elementAttrs","Slidable","window","contentView","slidableUnderneathView","controlsView","buttonClassName","accessibleToggleLabel","isUnread","markAsRead","mainView","voteCountItem","oncreate","slidableInstance","element","$","on","reset","onbeforeupdate","needsRebuild","current","matches","lastVotedNumber","count","PollOptionLabel","PollOptionInput","PollOption","isResult","style","opacity","PollResult","pollOptions","forEach","PollResultsNumber","PollResults","number","step","pollButtonSubmit","console","log","listItems","LogInModal","PollListState","SelectDropdown","PollsPage","initListView","sort","refresh","hero","sidebarItems","viewItems","actionItems","newPollAction","navItems","_this4","Tooltip","_this$attrs$poll","_this$attrs$poll2","loadingOptions","useSubmitUI","canChangeVote","pendingSubmit","pendingOptions","preventClose","addEventListener","onremove","removeEventListener","infoItems","canSeeVoters","showVoters","canEdit","canDelete","deletePoll","viewOption","hasVoted","canVote","hasEnded","_poll$myVotes2","_poll$myVotes3","_poll$myVotes4","totalVotes","voted","has","some","percent","round","canSeeVoteCount","isDisabled","width","Number","showCheckmark","bar","changeVote","checked","src","alt","hideOptionTooltip","evt","_this$attrs$poll$myVo","_this$attrs$poll$myVo2","optionIds","Set","isUnvoting","allowsMultiple","clear","size","submit","cb","onerror","request","method","url","from","res","pushPayload","err","sync","tooltipVisible","updateVisibility","_Error","_wrapNativeSuper","Error","components","Extend","Post","Forum","Poll","PollVote","Routes","Store","Model","hasMany","addDiscussionBadge","addComposerItems","addPollsToPost","addPostControls","initializers","computed","_Model","transformDate","isGlobal","hiddenAt","apiEndpoint","hasOne","pollId","models","pushData","expandedGroup","isExpanded","groupKey","expand","_save","sent","PaginatedListState","EventEmitter","globalEventEmitter","_PaginatedListState","page","extraPolls","eventEmitter","_assertThisInitialized","requestParams","_this$params$sort","sortMap","q","loadPage","preloadedPolls","preloadedApiDocument","initialLoading","Promise","resolve","relevance","newest","oldest","removePoll","emit","pages","index","indexOf","unshift","getAllItems","_createClass","get","_typeof","require","module","exports","__esModule","r","n","hasOwnProperty","defineProperty","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","Generator","create","Context","makeInvokeMethod","tryCatch","arg","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","values","g","defineIteratorMethods","_invoke","AsyncIterator","invoke","__await","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","_sent","dispatchException","TypeError","resultName","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","isNaN","displayName","isGeneratorFunction","constructor","setPrototypeOf","__proto__","awrap","async","reverse","pop","charAt","slice","rval","handle","complete","_catch","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","self","ReferenceError","asyncGeneratorStep","gen","reject","_next","_throw","info","error","fn","isNativeReflectConstruct","_construct","Reflect","construct","toPropertyKey","_defineProperties","props","descriptor","Constructor","protoProps","staticProps","assign","source","_getPrototypeOf","subClass","superClass","_isNativeFunction","toString","_isNativeReflectConstruct","Boolean","valueOf","_setPrototypeOf","toPrimitive","String","isNativeFunction","Class","_cache","Map","Wrapper"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":";;;;;;;;;;;;;;IAAqBA,GAAG;EAAA,SAAAA,IAAA;EAAAA,GAAA,CACfC,cAAc,GAArB,SAAAA,eAAA,EAAiC;IAC/B,OAAO,IAAI;EACb,CAAC;EAAAD,GAAA,CAEME,YAAY,GAAnB,SAAAA,aAAA,EAA+B;IAC7B,OAAO,IAAI;IACX;EACF,CAAC;EAAA,OAAAF,GAAA;AAAA;;;;;;;;;;;;;;;;ACRI,IAAMI,IAAI,GAAG,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;ACAI;AAEW;AACQ;AACsB;AACV;AAEP;AAEpD,IAAMO,aAAa,GAAG,SAAhBA,aAAaA,CAAIC,QAAQ,EAAK;EACzCA,QAAQ,CAACC,SAAS,CAACC,OAAO,GAAG,YAAY;IAAA,IAAAC,KAAA;IACvCV,6DAAS,CAACY,IAAI,CAACP,mEAAe,EAAE;MAC9BQ,IAAI,EAAE,IAAI,CAACN,QAAQ,CAACO,MAAM,CAACD,IAAI;MAC/BE,QAAQ,EAAE,SAAAA,SAACF,IAAI;QAAA,OAAMH,KAAI,CAACH,QAAQ,CAACO,MAAM,CAACD,IAAI,GAAGA,IAAI;MAAA;IACvD,CAAC,CAAC;EACJ,CAAC;;EAED;EACAZ,4DAAM,CAACM,QAAQ,CAACC,SAAS,EAAE,aAAa,EAAE,UAAUQ,KAAK,EAAE;IAAA,IAAAC,mBAAA,EAAAC,qBAAA;IACzD,IAAMC,UAAU,IAAAF,mBAAA,GAAG,IAAI,CAACV,QAAQ,CAACa,IAAI,cAAAH,mBAAA,GAAlBA,mBAAA,CAAoBI,KAAK,qBAAzBJ,mBAAA,CAA2BE,UAAU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AC,CAAC2B,WAAW,CAAC;IACtE;IACAwD,OAAO,CAACllB,SAAS,GAAGyN,MAAM,CAACwR,MAAM,CAAC8F,KAAK,CAAC/kB,SAAS,EAAE;MACjD0hB,WAAW,EAAE;QACXre,KAAK,EAAE6hB,OAAO;QACdrG,UAAU,EAAE,KAAK;QACjBE,QAAQ,EAAE,IAAI;QACdD,YAAY,EAAE;MAChB;IACF,CAAC,CAAC;IACF,OAAO6C,8DAAc,CAACuD,OAAO,EAAEH,KAAK,CAAC;EACvC,CAAC;EACD,OAAOlM,gBAAgB,CAACkM,KAAK,CAAC;AAChC;;;;;;UC7BA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA;WACA;WACA,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;;;;;WCAA;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D","sources":["webpack://@fof/polls/./src/common/Acl.tsx","webpack://@fof/polls/./src/common/index.js","webpack://@fof/polls/./src/forum/addComposerItems.js","webpack://@fof/polls/./src/forum/addDiscussionBadge.js","webpack://@fof/polls/./src/forum/addNavItem.ts","webpack://@fof/polls/./src/forum/addPollsToPost.js","webpack://@fof/polls/./src/forum/addPostControls.js","webpack://@fof/polls/./src/forum/components/ComposePollHero.tsx","webpack://@fof/polls/./src/forum/components/ComposePollPage.tsx","webpack://@fof/polls/./src/forum/components/CreatePollModal.js","webpack://@fof/polls/./src/forum/components/EditPollModal.js","webpack://@fof/polls/./src/forum/components/ListVotersModal.js","webpack://@fof/polls/./src/forum/components/Poll.tsx","webpack://@fof/polls/./src/forum/components/PollForm.js","webpack://@fof/polls/./src/forum/components/Poll/PollDescription.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollImage.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollList.js","webpack://@fof/polls/./src/forum/components/Poll/PollListItem.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOption.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOptionInput.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOptionLabel.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollOptions.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollPage.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollResult.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollResultNumber.tsx","webpack://@fof/polls/./src/forum/components/Poll/PollTitle.tsx","webpack://@fof/polls/./src/forum/components/PollsPage.tsx","webpack://@fof/polls/./src/forum/components/PostPoll.js","webpack://@fof/polls/./src/forum/components/form/FormError.js","webpack://@fof/polls/./src/forum/components/index.ts","webpack://@fof/polls/./src/forum/extend.ts","webpack://@fof/polls/./src/forum/index.ts","webpack://@fof/polls/./src/forum/models/Poll.ts","webpack://@fof/polls/./src/forum/models/PollOption.ts","webpack://@fof/polls/./src/forum/models/PollVote.ts","webpack://@fof/polls/./src/forum/models/index.ts","webpack://@fof/polls/./src/forum/states/PollFormState.js","webpack://@fof/polls/./src/forum/states/PollListState.ts","webpack://@fof/polls/./src/forum/states/PollState.ts","webpack://@fof/polls/./src/forum/utils/PollControls.tsx","webpack://@fof/polls/external root \"flarum.core.compat['common/Component']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/Model']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Badge']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Button']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Dropdown']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Link']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Page']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Placeholder']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/SelectDropdown']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Separator']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Switch']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/extend']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/extenders']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/highlight']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/listItems']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/models/Discussion']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/models/Forum']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/models/Post']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/states/PaginatedListState']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/EventEmitter']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/Stream']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/SubtreeRetainer']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/abbreviateNumber']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/classList']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/computed']\"","webpack://@fof/polls/external root \"flarum.core.compat['common/utils/extractText']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/app']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/CommentPost']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/DiscussionComposer']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/DiscussionList']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/DiscussionPage']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/IndexPage']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/LogInModal']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/components/ReplyComposer']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/utils/PostControls']\"","webpack://@fof/polls/external root \"flarum.core.compat['forum/utils/slidable']\"","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/regeneratorRuntime.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/typeof.js","webpack://@fof/polls/./node_modules/@babel/runtime/regenerator/index.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/assertThisInitialized.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/asyncToGenerator.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/construct.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/createClass.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/getPrototypeOf.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/isNativeFunction.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/isNativeReflectConstruct.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@fof/polls/./node_modules/@babel/runtime/helpers/esm/wrapNativeSuper.js","webpack://@fof/polls/webpack/bootstrap","webpack://@fof/polls/webpack/runtime/compat get default export","webpack://@fof/polls/webpack/runtime/define property getters","webpack://@fof/polls/webpack/runtime/hasOwnProperty shorthand","webpack://@fof/polls/webpack/runtime/make namespace object"],"sourcesContent":["export default class Acl {\n static canManagePools(): boolean {\n return true;\n }\n\n static canStartPoll(): boolean {\n return true;\n //app.forum.attribute('canStartPoll') || !app.session.user;\n }\n}\n","export const slug = 'fof-polls';\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport classList from 'flarum/common/utils/classList';\nimport DiscussionComposer from 'flarum/forum/components/DiscussionComposer';\nimport ReplyComposer from 'flarum/forum/components/ReplyComposer';\n\nimport CreatePollModal from './components/CreatePollModal';\n\nexport const addToComposer = (composer) => {\n composer.prototype.addPoll = function () {\n app.modal.show(CreatePollModal, {\n poll: this.composer.fields.poll,\n onsubmit: (poll) => (this.composer.fields.poll = poll),\n });\n };\n\n // Add button to DiscussionComposer header\n extend(composer.prototype, 'headerItems', function (items) {\n const discussion = this.composer.body?.attrs?.discussion;\n const canStartPoll = discussion?.canStartPoll() ?? app.forum.canStartPolls();\n\n if (canStartPoll) {\n items.add(\n 'polls',\n \n \n {app.translator.trans(`fof-polls.forum.composer_discussion.${this.composer.fields.poll ? 'edit' : 'add'}_poll`)}\n \n ,\n 1\n );\n }\n });\n\n extend(composer.prototype, 'data', function (data) {\n if (this.composer.fields.poll) {\n data.poll = this.composer.fields.poll;\n }\n });\n};\n\nexport default () => {\n addToComposer(DiscussionComposer);\n addToComposer(ReplyComposer);\n};\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport Badge from 'flarum/common/components/Badge';\nimport DiscussionList from 'flarum/forum/components/DiscussionList';\nimport Discussion from 'flarum/common/models/Discussion';\n\nexport default () => {\n extend(DiscussionList.prototype, 'requestParams', (params) => {\n params.include.push('poll');\n });\n\n extend(Discussion.prototype, 'badges', function (badges) {\n if (this.hasPoll()) {\n badges.add(\n 'poll',\n Badge.component({\n type: 'poll',\n label: app.translator.trans('fof-polls.forum.tooltip.badge'),\n icon: 'fas fa-signal',\n }),\n 5\n );\n }\n });\n};\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nexport default function addNavItem() {\n extend(IndexPage.prototype, 'navItems', (items) => {\n items.add(\n 'fof-polls-directory',\n LinkButton.component(\n {\n href: app.route('fof_polls_list'),\n icon: 'fas fa-poll',\n },\n app.translator.trans('fof-polls.forum.page.nav')\n ),\n 35\n );\n });\n}\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport CommentPost from 'flarum/forum/components/CommentPost';\nimport PostPoll from './components/PostPoll';\nimport DiscussionPage from 'flarum/forum/components/DiscussionPage';\n\nexport default () => {\n extend(CommentPost.prototype, 'content', function (content) {\n const post = this.attrs.post;\n\n if ((!post.isHidden() || this.revealContent) && post.polls()) {\n for (const poll of post.polls()) {\n if (poll) {\n content.push();\n }\n }\n }\n });\n\n extend(CommentPost.prototype, 'oninit', function () {\n this.subtree.check(() => {\n const polls = this.attrs.post.polls();\n\n const checks = polls?.map?.(\n (poll) =>\n poll && [\n poll.data?.attributes,\n poll.options().map?.((option) => option?.data?.attributes),\n poll.myVotes().map?.((vote) => vote.option()?.id()),\n ]\n );\n\n return JSON.stringify(checks);\n });\n });\n\n extend(DiscussionPage.prototype, 'oncreate', function () {\n if (app.pusher) {\n app.pusher.then((binding) => {\n // We will listen for updates to all polls and options\n // Even if that model is not in the current discussion, it doesn't really matter\n binding.channels.main.bind('updatedPollOptions', (data) => {\n const poll = app.store.getById('polls', data['pollId']);\n\n if (poll) {\n poll.pushAttributes({\n voteCount: data['pollVoteCount'],\n });\n\n // Not redrawing here, as the option below should trigger the redraw already\n }\n\n const changedOptions = data['options'];\n\n for (const optionId in changedOptions) {\n const option = app.store.getById('poll_options', optionId);\n\n if (option && option.voteCount() !== undefined) {\n option.pushAttributes({\n voteCount: changedOptions[optionId],\n });\n }\n }\n\n m.redraw();\n });\n });\n }\n });\n\n extend(DiscussionPage.prototype, 'onremove', function () {\n if (app.pusher) {\n app.pusher.then((binding) => {\n binding.channels.main.unbind('updatedPollOptions');\n });\n }\n });\n};\n","import app from 'flarum/forum/app';\n\nimport { extend } from 'flarum/common/extend';\nimport PostControls from 'flarum/forum/utils/PostControls';\nimport CreatePollModal from './components/CreatePollModal';\nimport Button from 'flarum/common/components/Button';\n\nexport default () => {\n const createPoll = (post) =>\n app.modal.show(CreatePollModal, {\n onsubmit: (data) =>\n app.store\n .createRecord('polls')\n .save(\n {\n ...data,\n relationships: {\n post,\n },\n },\n {\n data: {\n include: 'options,myVotes,myVotes.option',\n },\n }\n )\n .then((poll) => {\n post.rawRelationship('polls')?.push?.({ type: 'polls', id: poll.id() });\n\n return poll;\n }),\n });\n\n extend(PostControls, 'moderationControls', function (items, post) {\n if (!post.isHidden() && post.canStartPoll()) {\n items.add(\n 'addPoll',\n \n );\n }\n });\n};\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport { slug } from '../../common';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.compose`;\n\nexport default class ComposePollHero extends Component {\n view(): Mithril.Children {\n const { poll } = this.attrs;\n\n return (\n

\n
\n
\n

{t(`${prfx}.${!!poll.id() ? 'edit' : 'add'}_title`)}

\n
\n \n {t(`${prfx}.polls_manager`)}\n \n {poll.exists && (\n \n {t(`${prfx}.polls_preview`)}\n \n )}\n
\n
\n
\n
\n );\n }\n}\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\nimport Poll from './Poll';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport PollForm from './PollForm';\nimport Acl from '../../common/Acl';\nimport PollFormState from '../states/PollFormState';\nimport { slug } from '../../common';\nimport ComposePollHero from './ComposePollHero';\n\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.compose`;\n\nexport default class ComposePollPage extends Page {\n poll: Poll | null = null;\n\n loading: boolean = false;\n\n oninit(vnode) {\n super.oninit(vnode);\n\n // If user not allowed to manage goodie collections, redirect to home\n if (!Acl.canManagePools()) {\n m.route.set(app.route('home'));\n }\n\n // Get the `edit` parameter from the URL\n const editId = m.route.param('id');\n if (editId) {\n this.poll = app.store.getById('poll', editId);\n\n if (!this.poll) {\n this.loading = true;\n\n app.store.find('fof/polls', editId).then((item) => {\n this.poll = item;\n this.loading = false;\n app.setTitle(t(`${prfx}.${!!this.poll?.id() ? 'edit' : 'add'}_title`));\n m.redraw();\n });\n }\n } else {\n this.poll = PollFormState.createNewPoll();\n }\n\n app.history.push('compose-goodie-collection');\n this.bodyClass = 'App--compose-goodie-collection';\n app.setTitle(t(`${prfx}.${!!this.poll?.id() ? 'edit' : 'add'}_title`));\n }\n\n view(): Mithril.Children {\n if (this.loading) {\n return ;\n }\n\n return (\n
\n \n
\n \n
\n
\n );\n }\n}\n","import app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport PollForm from './PollForm';\n\nexport default class CreatePollModal extends Modal {\n title() {\n return app.translator.trans('fof-polls.forum.modal.add_title');\n }\n\n className() {\n return 'PollDiscussionModal Modal--medium';\n }\n\n content() {\n //@todo check if bind is needed for onsubmit\n return [\n
\n \n
,\n ];\n }\n\n onsubmit(poll) {\n this.hide();\n this.attrs.onsubmit(poll);\n }\n}\n","import app from 'flarum/forum/app';\nimport CreatePollModal from './CreatePollModal';\n\nexport default class EditPollModal extends CreatePollModal {\n title() {\n return app.translator.trans('fof-polls.forum.modal.edit_title');\n }\n}\n","import app from 'flarum/forum/app';\n\nimport Modal from 'flarum/common/components/Modal';\nimport avatar from 'flarum/common/helpers/avatar';\nimport username from 'flarum/common/helpers/username';\nimport Link from 'flarum/common/components/Link';\nimport Stream from 'flarum/common/utils/Stream';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\n\nexport default class ListVotersModal extends Modal {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.loading = Stream(true);\n\n app.store\n .find('fof/polls', this.attrs.poll.id(), {\n include: 'votes,votes.user,votes.option',\n })\n .then(() => this.loading(false))\n .finally(() => m.redraw());\n }\n\n className() {\n return 'Modal--medium VotesModal';\n }\n\n title() {\n return app.translator.trans('fof-polls.forum.votes_modal.title');\n }\n\n content() {\n return
{this.loading() ? : this.attrs.poll.options().map(this.optionContent.bind(this))}
;\n }\n\n optionContent(opt) {\n const votes = (this.attrs.poll.votes() || []).filter((v) => opt.id() === v.option().id());\n\n return (\n
\n

{opt.answer() + ':'}

\n\n {votes.length ? (\n
{votes.map(this.voteContent.bind(this))}
\n ) : (\n

{app.translator.trans('fof-polls.forum.modal.no_voters')}

\n )}\n
\n );\n }\n\n voteContent(vote) {\n const user = vote.user();\n const attrs = user && { href: app.route.user(user) };\n\n return (\n \n {avatar(user)} {username(user)}\n \n );\n }\n}\n","import Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport app from 'flarum/forum/app';\nimport PollTitle from './Poll/PollTitle';\nimport PollOptions from './Poll/PollOptions';\nimport PollImage from './Poll/PollImage';\nimport PollDescription from './Poll/PollDescription';\nimport PollModel from '../models/Poll';\nimport PollState from '../states/PollState';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport Button from 'flarum/common/components/Button';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport { slug } from '../../common';\nimport PollControls from '../utils/PollControls';\n\n// Make translation calls shorter\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.poll`;\n\ninterface PollAttrs extends ComponentAttrs {\n poll: PollModel;\n}\n\nexport default class Poll extends Component {\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n this.state = new PollState(this.attrs.poll);\n }\n\n view(): Mithril.Children {\n const poll = this.attrs.poll;\n const infoItems = this.infoItems(poll.maxVotes());\n const state = this.state;\n\n return (\n
\n
\n

{poll.question()}

\n {poll.canSeeVoters() && (\n \n
\n
\n \n
\n
\n \n \n
\n
\n Antworten\n \n
\n
\n {!infoItems.isEmpty() &&
{infoItems.toArray()}
}\n\n {state.showButton() && (\n \n )}\n
\n
\n
\n
\n );\n }\n\n deletePoll(): void {\n PollControls.deleteAction(this.attrs.poll);\n }\n\n editPoll(): void {\n PollControls.editAction(this.attrs.poll);\n }\n\n infoItems(maxVotes: number) {\n const items = new ItemList();\n const poll = this.attrs.poll;\n\n if (app.session.user && !poll.canVote() && !poll.hasEnded()) {\n items.add(\n 'no-permission',\n \n \n {t('fof-polls.forum.no_permission')}\n \n );\n }\n\n if (poll.endDate()) {\n items.add(\n 'end-date',\n \n \n {poll.hasEnded() ? t('fof-polls.forum.poll_ended') : t('fof-polls.forum.days_remaining', { time: dayjs(poll.endDate()).fromNow() })}\n \n );\n }\n\n if (poll.canVote()) {\n items.add(\n 'max-votes',\n \n \n {t('fof-polls.forum.max_votes_allowed', { max: maxVotes })}\n \n );\n\n if (!poll.canChangeVote()) {\n items.add(\n 'cannot-change-vote',\n \n \n {t('fof-polls.forum.poll.cannot_change_vote')}\n \n );\n }\n }\n\n return items;\n }\n}\n","import { slug } from '../../common';\nimport Component from 'flarum/common/Component';\nimport app from 'flarum/forum/app';\nimport Button from 'flarum/common/components/Button';\nimport Switch from 'flarum/common/components/Switch';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nimport extractText from 'flarum/common/utils/extractText';\nimport FormError from './form/FormError';\nimport PollFormState from '../states/PollFormState';\n\n// Make translation calls shorter\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.poll_form`;\n\nexport default class PollForm extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n this.state = new PollFormState(this.attrs.poll);\n\n // state handles poll initialization\n const poll = this.state.poll;\n\n //@todo way the options are destructured into options (answers) and optionImageUrls\n this.options = poll.options();\n this.optionAnswers = this.options.map((o) => Stream(o.answer()));\n this.optionImageUrls = this.options.map((o) => Stream(o.imageUrl()));\n\n this.question = Stream(poll.question());\n this.endDate = Stream(this.formatDate(poll.endDate()));\n this.publicPoll = Stream(poll.publicPoll());\n this.allowMultipleVotes = Stream(poll.allowMultipleVotes());\n this.hideVotes = Stream(poll.hideVotes());\n this.allowChangeVote = Stream(poll.allowChangeVote());\n this.maxVotes = Stream(poll.maxVotes() || 0);\n\n this.datepickerMinDate = this.formatDate(undefined);\n\n // Replace minimum of 'today' for poll end date only if the poll is not already closed\n if (this.endDate() && dayjs(poll.endDate).isAfter(dayjs())) {\n this.datepickerMinDate = this.formatDate(poll.endDate);\n }\n }\n\n view() {\n return (\n
\n
{this.fields().toArray()}
\n
\n );\n }\n\n fields() {\n const items = new ItemList();\n\n items.add(\n 'question',\n
\n \n\n \n
,\n 100\n );\n\n items.add(\n 'answers',\n
\n \n\n {this.displayOptions()}\n
,\n 80\n );\n\n items.add(\n 'date',\n
\n \n\n
\n \n {Button.component({\n className: 'Button PollModal--button',\n icon: 'fas fa-times',\n onclick: this.endDate.bind(this, null),\n })}\n
\n\n {this.endDate() && (\n

\n \n  \n {dayjs(this.endDate()).isBefore(dayjs())\n ? app.translator.trans('fof-polls.forum.poll_ended')\n : app.translator.trans('fof-polls.forum.days_remaining', { time: dayjs(this.endDate()).fromNow() })}\n

\n )}\n
,\n 40\n );\n\n items.add(\n 'public',\n
\n {Switch.component(\n {\n state: this.publicPoll() || false,\n onchange: this.publicPoll,\n },\n app.translator.trans('fof-polls.forum.modal.public_poll_label')\n )}\n
,\n 20\n );\n\n items.add(\n 'hide-votes',\n
\n \n {app.translator.trans('fof-polls.forum.modal.hide_votes_label')}\n \n
,\n 20\n );\n\n items.add(\n 'allow-change-vote',\n
\n \n {app.translator.trans('fof-polls.forum.modal.allow_change_vote_label')}\n \n
,\n 20\n );\n\n items.add(\n 'allow-multiple-votes',\n
\n {Switch.component(\n {\n state: this.allowMultipleVotes() || false,\n onchange: this.allowMultipleVotes,\n },\n app.translator.trans('fof-polls.forum.modal.allow_multiple_votes_label')\n )}\n
,\n 15\n );\n\n if (this.allowMultipleVotes()) {\n items.add(\n 'max-votes',\n
\n \n\n \n\n

{app.translator.trans('fof-polls.forum.modal.max_votes_help')}

\n
,\n 15\n );\n }\n\n items.add(\n 'submit',\n
\n \n {this.state.poll.exists && (\n \n )}\n
,\n -10\n );\n\n return items;\n }\n\n displayOptions() {\n return Object.keys(this.options).map((option, i) => (\n
\n
\n \n {app.forum.attribute('allowPollOptionImage') ? (\n \n ) : null}\n
\n {i >= 2\n ? Button.component({\n type: 'button',\n className: 'Button Button--warning PollModal--button',\n icon: 'fas fa-minus',\n onclick: i >= 2 ? this.removeOption.bind(this, i) : '',\n })\n : ''}\n
\n ));\n }\n\n addOption() {\n const max = Math.max(app.forum.attribute('pollMaxOptions'), 2);\n\n if (this.options.length < max) {\n this.options.push(app.store.createRecord('poll_options'));\n this.optionAnswers.push(Stream(''));\n this.optionImageUrls.push(Stream(''));\n } else {\n alert(extractText(app.translator.trans('fof-polls.forum.modal.max', { max })));\n }\n }\n\n removeOption(i) {\n this.options.splice(i, 1);\n this.optionAnswers.splice(i, 1);\n this.optionImageUrls.splice(i, 1);\n }\n\n data() {\n const options = this.options.map((o, i) => {\n if (!o.data.attributes) o.data.attributes = {};\n\n o.data.attributes.answer = this.optionAnswers[i]();\n o.data.attributes.imageUrl = this.optionImageUrls[i]();\n\n return o.data;\n });\n\n if (this.question() === '') {\n throw new FormError(app.translator.trans('fof-polls.forum.modal.include_question'));\n }\n\n if (options.length < 2) {\n throw new FormError(app.translator.trans('fof-polls.forum.modal.min'));\n }\n\n return {\n question: this.question(),\n endDate: this.dateToTimestamp(this.endDate()),\n publicPoll: this.publicPoll(),\n hideVotes: this.hideVotes(),\n allowChangeVote: this.allowChangeVote(),\n allowMultipleVotes: this.allowMultipleVotes(),\n maxVotes: this.maxVotes(),\n options,\n };\n }\n\n async onsubmit(e) {\n e.preventDefault();\n\n try {\n await this.state.save(this.data());\n\n // Show success alert\n const alertId = app.alerts.show(\n {\n type: 'success',\n controls: [\n \n m.route.set(\n app.route('compose-poll', {\n edit: this.state.collection.id(),\n })\n )\n }\n >\n {t(`${prfx}.continue_editing`)}\n ,\n ],\n },\n t(`${prfx}.success`)\n );\n\n // Hide alert after 10 seconds\n setTimeout(() => app.alerts.dismiss(alertId), 10000);\n\n // Check if we need to call a custom onsubmit callback\n if (this.attrs.onsubmit) {\n this.attrs.onsubmit(this.state.poll);\n } else {\n // Otherwise redirect to pools list\n m.route.set(app.route('polls-manager'));\n }\n } catch (e) {\n if (e instanceof FormError) {\n app.alerts.show({ type: 'error' }, e.message);\n } else {\n // Show error alert\n app.alerts.show({ type: 'error' }, t(`${prfx}.error`));\n }\n } finally {\n this.state.loading = false;\n m.redraw();\n }\n }\n\n async delete() {\n if (!confirm(t(`${prfx}.delete_confirm`))) {\n return;\n }\n\n try {\n await this.state.delete();\n // Show success alert\n const alertId = app.alerts.show({ type: 'success' }, t(`${prfx}.delete_success`));\n\n // Hide alert after 10 seconds\n setTimeout(() => app.alerts.dismiss(alertId), 10000);\n\n // Redirect to polls list\n m.route.set(app.route('polls-manager'));\n } catch (e) {\n // Show error alert\n app.alerts.show({ type: 'error' }, t(`${prfx}.delete_error`));\n }\n }\n\n formatDate(date, def = false) {\n const dayjsDate = dayjs(date);\n\n if (date === false || !dayjsDate.isValid()) return def !== false ? this.formatDate(def) : null;\n\n return dayjsDate.format('YYYY-MM-DDTHH:mm');\n }\n\n dateToTimestamp(date) {\n const dayjsDate = dayjs(date);\n\n if (!date || !dayjsDate.isValid()) return false;\n\n return dayjsDate.format();\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollDescriptionAttrs extends ComponentAttrs {\n text: String;\n}\n\nexport default class PollDescription extends Component {\n view(): Mithril.Children {\n return

{this.attrs.text}

;\n }\n}\n","import * as Mithril from 'mithril';\nimport Component from 'flarum/common/Component';\n\nexport default class PollImage extends Component {\n view(): Mithril.Children {\n return;\n }\n}\n","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport PollListItem from './PollListItem';\nimport Button from 'flarum/common/components/Button';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport Placeholder from 'flarum/common/components/Placeholder';\nimport classList from 'flarum/common/utils/classList';\n\n/**\n * The `PollList` component displays a list of polls.\n */\nexport default class PollList extends Component {\n view() {\n /**\n * @type {import('../../states/PollListState').default}\n */\n const state = this.attrs.state;\n const params = state.getParams();\n const isLoading = state.isInitialLoading() || state.isLoadingNext();\n\n let loading;\n\n if (isLoading) {\n loading = ;\n } else if (state.hasNext()) {\n loading = (\n \n );\n }\n\n if (state.isEmpty()) {\n const text = app.translator.trans('fof-polls.forum.polls_list.empty_text');\n return (\n
\n \n
\n );\n }\n\n const pageSize = state.pageSize;\n\n return (\n
\n
    \n {state.getPages().map((pg) => {\n return pg.items.map((poll) => (\n
  • \n \n
  • \n ));\n })}\n
\n
{loading}
\n
\n );\n }\n}\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport type { PollListParams } from '../../states/PollListState';\nimport SubtreeRetainer from 'flarum/common/utils/SubtreeRetainer';\nimport classList from 'flarum/common/utils/classList';\nimport Dropdown from 'flarum/common/components/Dropdown';\nimport Link from 'flarum/common/components/Link';\nimport highlight from 'flarum/common/helpers/highlight';\nimport slidable from 'flarum/forum/utils/slidable';\nimport icon from 'flarum/common/helpers/icon';\nimport PollPage from './PollPage';\nimport abbreviateNumber from 'flarum/common/utils/abbreviateNumber';\nimport Poll from '../../models/Poll';\nimport PollControls from '../../utils/PollControls';\nimport { slug } from '../../../common';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport listItems from 'flarum/common/helpers/listItems';\n\n// Make translation calls shorter\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.list`;\n\nexport interface IPollListItemAttrs extends ComponentAttrs {\n poll: Poll;\n params: PollListParams;\n}\n\n/**\n * The `PollListItem` component shows a single poll in the\n * poll list.\n */\nexport default class PollListItem extends Component {\n /**\n * Ensures that the poll will not be redrawn\n * unless new data comes in.\n */\n subtree!: SubtreeRetainer;\n\n highlightRegExp?: RegExp;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.subtree = new SubtreeRetainer(\n () => this.attrs.poll.freshness,\n () => {\n const time = app.session.user && app.session.user.markedAllAsReadAt();\n return time && time.getTime();\n },\n () => this.active()\n );\n }\n\n elementAttrs() {\n return {\n className: classList('PollListItem User', {\n active: this.active(),\n 'PollListItem--hidden': this.attrs.poll.isHidden(),\n Slidable: 'ontouchstart' in window,\n }),\n };\n }\n\n view() {\n const poll = this.attrs.poll;\n\n const controls = PollControls.controls(poll, this).toArray();\n const attrs = this.elementAttrs();\n\n return (\n
\n {this.controlsView(controls)}\n {this.contentView()}\n {this.slidableUnderneathView()}\n
\n );\n }\n\n controlsView(controls: Mithril.ChildArray): Mithril.Children {\n return (\n !!controls.length && (\n \n {controls}\n \n )\n );\n }\n\n slidableUnderneathView(): Mithril.Children {\n const poll = this.attrs.poll;\n const isUnread = poll.isUnread();\n\n return (\n \n {icon('fas fa-check')}\n \n );\n }\n\n contentView(): Mithril.Children {\n const poll = this.attrs.poll;\n // const isUnread = poll.isUnread();\n // const isRead = poll.isRead();\n\n return (\n //
\n
\n {this.mainView()}\n {this.infoView()}\n
\n );\n }\n\n mainView(): Mithril.Children {\n const poll = this.attrs.poll;\n\n return (\n \n

{highlight(poll.question(), this.highlightRegExp)}

\n \n );\n }\n\n infoView() {\n return
    {listItems(this.infoItems().toArray())}
;\n }\n\n oncreate(vnode: Mithril.VnodeDOM) {\n super.oncreate(vnode);\n\n // If we're on a touch device, set up the discussion row to be slidable.\n // This allows the user to drag the row to either side of the screen to\n // reveal controls.\n if ('ontouchstart' in window) {\n const slidableInstance = slidable(this.element);\n\n this.$('.PollListItem-controls').on('hidden.bs.dropdown', () => slidableInstance.reset());\n }\n }\n\n onbeforeupdate(vnode: Mithril.VnodeDOM) {\n super.onbeforeupdate(vnode);\n\n return this.subtree.needsRebuild();\n }\n\n /**\n * Determine whether or not the discussion is currently being viewed.\n */\n active() {\n return app.current.matches(PollPage, { poll: this.attrs.poll });\n }\n\n /**\n * Mark the poll as read.\n */\n markAsRead() {\n const poll = this.attrs.poll;\n\n if (poll.isUnread()) {\n poll.save({ lastVotedNumber: poll.voteCount() });\n m.redraw();\n }\n }\n\n infoItems(): ItemList {\n const poll = this.attrs.poll;\n const items = new ItemList();\n const active = !poll.hasEnded();\n const activeView = poll.endDate()\n ? [\n icon('fas fa-clock'),\n ' ',\n active ? t('fof-polls.forum.days_remaining', { time: dayjs(poll.endDate()).fromNow() }) : t('fof-polls.forum.poll_ended'),\n ]\n : icon('fas fa-om');\n\n items.add('active', {activeView});\n\n items.add(\n 'discussion-count',\n
\n {icon('fas fa-poll fa-fw')}\n {[\n ' ',\n t('fof-user-directory.forum.page.usercard.discussion-count', {\n count: abbreviateNumber(poll.voteCount()),\n }),\n ]}\n
,\n 70\n );\n\n return items;\n }\n}\n","import Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport PollOptionLabel from './PollOptionLabel';\nimport PollOptionInput from './PollOptionInput';\nimport PollOptionModel from '../../models/PollOption';\n\ninterface PollOptionAttrs extends ComponentAttrs {\n option: PollOptionModel;\n onchange: (e: Event) => void;\n}\n\nexport default class PollOption extends Component {\n view(): Mithril.Children {\n const option = this.attrs.option;\n return (\n \n );\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollOptionInputAttrs extends ComponentAttrs {\n id: Number; // for example 1\n name: String; // for example privacy-setting\n value: String; // for example Private to Project Members\n isResult?: Boolean;\n onchange: (e: Event) => void;\n}\n\nexport default class PollOptionInput extends Component {\n view(): Mithril.Children {\n const { isResult } = this.attrs;\n return (\n \n );\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollOptionLabelAttrs extends ComponentAttrs {\n text: String;\n id: Number;\n}\n\nexport default class PollOptionLabel extends Component {\n view(): Mithril.Children {\n return (\n \n {this.attrs.text}\n \n );\n }\n}\n","import Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\nimport PollOption from './PollOption';\nimport PollOptionModel from '../../models/PollOption';\nimport PollResult from './PollResult';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport PollState from '../../states/PollState';\n\ninterface PollOptionsAttrs extends ComponentAttrs {\n options: PollOptionModel[];\n state: PollState;\n}\n\nexport default class PollOptions extends Component {\n view(): Mithril.Children {\n return
{this.pollOptions().toArray()}
;\n }\n\n pollOptions(): ItemList {\n const items = new ItemList();\n const state = this.attrs.state;\n\n if (state.showCheckMarks) {\n this.attrs.options.forEach((option: PollOptionModel): void => {\n items.add('option' + option.id(), );\n });\n } else {\n this.attrs.options.forEach((option: PollOptionModel): void => {\n items.add('result' + option.id(), );\n });\n }\n\n return items;\n }\n}\n","import * as Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\n\nexport default class PollPage extends Page {\n view(): Mithril.Children {\n return

PollPage

;\n }\n}\n","import * as Mithril from 'mithril';\nimport Component from 'flarum/common/Component';\nimport PollOptionLabel from './PollOptionLabel';\nimport PollResultsNumber from './PollResultNumber';\nimport PollOptionInput from './PollOptionInput';\n\nexport default class PollResults extends Component {\n view(): Mithril.Children {\n return (\n \n );\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollResultsNumberAttrs extends ComponentAttrs {\n number: Number;\n}\n\nexport default class PollResultsNumber extends Component {\n view(): Mithril.Children {\n return {this.attrs.number} %;\n }\n}\n","import * as Mithril from 'mithril';\nimport Component, { ComponentAttrs } from 'flarum/common/Component';\n\ninterface PollTitleAttrs extends ComponentAttrs {\n text: String;\n}\n\nexport default class PollTitle extends Component {\n view(): Mithril.Children {\n return

{this.attrs.text}

;\n }\n}\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport listItems from 'flarum/common/helpers/listItems';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Page, { IPageAttrs } from 'flarum/common/components/Page';\nimport IndexPage from 'flarum/forum/components/IndexPage';\nimport PollList from './Poll/PollList';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport extractText from 'flarum/common/utils/extractText';\nimport PollListState from '../states/PollListState';\nimport Button from 'flarum/common/components/Button';\nimport SelectDropdown from 'flarum/common/components/SelectDropdown';\nimport Acl from '../../common/Acl';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport PollModel from '../models/Poll';\nimport Poll from './Poll';\n\nexport default class PollsPage extends Page {\n loading: boolean = false;\n poll: PollModel | null = null;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n const editId = m.route.param('id');\n if (editId) {\n this.poll = app.store.getById('poll', editId) as PollModel;\n\n if (!this.poll) {\n this.loading = true;\n\n app.store.find('fof/polls', editId).then((item) => {\n this.poll = item;\n this.loading = false;\n app.setTitle(extractText(app.translator.trans('fof-polls.forum.page.poll_detail')));\n m.redraw();\n });\n }\n } else {\n this.initListView();\n }\n }\n\n initListView() {\n this.state = new PollListState({\n sort: m.route.param('sort'),\n filter: m.route.param('filter'),\n });\n\n this.state.refresh();\n\n app.setTitle(extractText(app.translator.trans('fof-polls.forum.page.nav')));\n }\n\n oncreate(vnode: Mithril.Vnode) {\n super.oncreate(vnode);\n }\n\n view(): Mithril.Children {\n if (this.loading) {\n return ;\n }\n\n if (this.poll) {\n return (\n
\n
\n \n
\n
\n );\n }\n\n return (\n
\n {IndexPage.prototype.hero()}\n
\n
\n \n
\n
\n
    {listItems(this.viewItems().toArray())}
\n
    {listItems(this.actionItems().toArray())}
\n
\n \n
\n
\n
\n
\n );\n }\n\n sidebarItems() {\n const items = new ItemList();\n const canStartPoll = Acl.canStartPoll();\n\n items.add(\n 'newGlobalPoll',\n {\n this.newPollAction();\n }}\n disabled={!canStartPoll}\n >\n {app.translator.trans(`fof-polls.forum.poll.${canStartPoll ? 'start_poll_button' : 'cannot_start_poll_button'}`)}\n \n );\n\n items.add(\n 'nav',\n \n {this.navItems().toArray()}\n \n );\n\n return items;\n }\n\n actionItems(): ItemList {\n const items = new ItemList();\n\n items.add(\n 'refresh',\n Button.component({\n title: app.translator.trans('fof-polls.forum.page.refresh_tooltip'),\n icon: 'fas fa-sync',\n className: 'Button Button--icon',\n onclick: () => {\n this.state.refresh();\n },\n })\n );\n\n return items;\n }\n\n viewItems() {\n return IndexPage.prototype.viewItems();\n }\n navItems() {\n return IndexPage.prototype.navItems();\n }\n\n /**\n * Change to create new poll page\n */\n newPollAction(): void {\n if (!app.session.user) {\n app.modal.show(LogInModal);\n return;\n }\n\n m.route.set(app.route('fof_polls_compose'));\n }\n}\n","import app from 'flarum/forum/app';\n\nimport Component from 'flarum/common/Component';\nimport Button from 'flarum/common/components/Button';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport ListVotersModal from './ListVotersModal';\nimport classList from 'flarum/common/utils/classList';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport icon from 'flarum/common/helpers/icon';\nimport EditPollModal from './EditPollModal';\n\nexport default class PostPoll extends Component {\n oninit(vnode) {\n super.oninit(vnode);\n\n this.loadingOptions = false;\n\n this.useSubmitUI = !this.attrs.poll?.canChangeVote() && this.attrs.poll?.allowMultipleVotes();\n this.pendingSubmit = false;\n this.pendingOptions = null;\n }\n\n oncreate(vnode) {\n super.oncreate(vnode);\n\n this.preventClose = this.preventClose.bind(this);\n window.addEventListener('beforeunload', this.preventClose);\n }\n\n onremove(vnode) {\n super.onremove(vnode);\n\n window.removeEventListener('beforeunload', this.preventClose);\n }\n\n view() {\n const poll = this.attrs.poll;\n const options = poll.options() || [];\n let maxVotes = poll.allowMultipleVotes() ? poll.maxVotes() : 1;\n\n if (maxVotes === 0) maxVotes = options.length;\n\n const infoItems = this.infoItems(maxVotes);\n\n return (\n
\n
\n

{poll.question()}

\n\n {poll.canSeeVoters() && (\n \n
\n\n
\n
{options.map(this.viewOption.bind(this))}
\n\n
\n {!infoItems.isEmpty() &&
{infoItems.toArray()}
}\n\n {this.useSubmitUI && this.pendingSubmit && (\n \n )}\n
\n
\n
\n );\n }\n\n infoItems(maxVotes) {\n const items = new ItemList();\n const poll = this.attrs.poll;\n const hasVoted = poll.myVotes()?.length > 0;\n\n if (app.session.user && !poll.canVote() && !poll.hasEnded()) {\n items.add(\n 'no-permission',\n \n \n {app.translator.trans('fof-polls.forum.no_permission')}\n \n );\n }\n\n if (poll.endDate()) {\n items.add(\n 'end-date',\n \n \n {poll.hasEnded()\n ? app.translator.trans('fof-polls.forum.poll_ended')\n : app.translator.trans('fof-polls.forum.days_remaining', { time: dayjs(poll.endDate()).fromNow() })}\n \n );\n }\n\n if (poll.canVote()) {\n items.add(\n 'max-votes',\n \n \n {app.translator.trans('fof-polls.forum.max_votes_allowed', { max: maxVotes })}\n \n );\n\n if (!poll.canChangeVote()) {\n items.add(\n 'cannot-change-vote',\n \n \n {app.translator.trans('fof-polls.forum.poll.cannot_change_vote')}\n \n );\n }\n }\n\n return items;\n }\n\n viewOption(opt) {\n const poll = this.attrs.poll;\n const hasVoted = poll.myVotes()?.length > 0;\n const totalVotes = poll.voteCount();\n\n const voted = this.pendingOptions ? this.pendingOptions.has(opt.id()) : poll.myVotes()?.some?.((vote) => vote.option() === opt);\n const votes = opt.voteCount();\n const percent = totalVotes > 0 ? Math.round((votes / totalVotes) * 100) : 0;\n\n // isNaN(null) is false, so we have to check type directly now that API always returns the field\n const canSeeVoteCount = typeof votes === 'number';\n const isDisabled = this.loadingOptions || (hasVoted && !poll.canChangeVote());\n const width = canSeeVoteCount ? percent : (Number(voted) / (poll.myVotes()?.length || 1)) * 100;\n\n const showCheckmark = !app.session.user || (!poll.hasEnded() && poll.canVote() && (!hasVoted || poll.canChangeVote()));\n\n const bar = (\n
\n {showCheckmark && (\n \n )}\n\n
\n {opt.answer()}\n {voted && !showCheckmark && icon('fas fa-check-circle', { className: 'PollAnswer-check' })}\n {canSeeVoteCount && {percent}%}\n
\n\n {opt.imageUrl() ? {opt.answer()} : null}\n
\n );\n\n return (\n \n {canSeeVoteCount ? (\n \n {bar}\n \n ) : (\n bar\n )}\n
\n );\n }\n\n changeVote(option, evt) {\n if (!app.session.user) {\n app.modal.show(LogInModal);\n evt.target.checked = false;\n return;\n }\n\n const optionIds = this.pendingOptions || new Set(this.attrs.poll.myVotes().map?.((v) => v.option().id()));\n const isUnvoting = optionIds.delete(option.id());\n const allowsMultiple = this.attrs.poll.allowMultipleVotes();\n\n if (!allowsMultiple) {\n optionIds.clear();\n }\n\n if (!isUnvoting) {\n optionIds.add(option.id());\n }\n\n if (this.useSubmitUI) {\n this.pendingOptions = optionIds.size ? optionIds : null;\n this.pendingSubmit = !!this.pendingOptions;\n return;\n }\n\n return this.submit(optionIds, null, () => (evt.target.checked = isUnvoting));\n }\n\n onsubmit() {\n return this.submit(this.pendingOptions, () => {\n this.pendingOptions = null;\n this.pendingSubmit = false;\n });\n }\n\n submit(optionIds, cb, onerror) {\n this.loadingOptions = true;\n m.redraw();\n\n return app\n .request({\n method: 'PATCH',\n url: `${app.forum.attribute('apiUrl')}/fof/polls/${this.attrs.poll.id()}/votes`,\n body: {\n data: {\n optionIds: Array.from(optionIds),\n },\n },\n })\n .then((res) => {\n app.store.pushPayload(res);\n cb?.();\n })\n .catch((err) => {\n onerror?.(err);\n })\n .finally(() => {\n this.loadingOptions = false;\n\n m.redraw();\n });\n }\n\n showVoters() {\n // Load all the votes only when opening the votes list\n app.modal.show(ListVotersModal, {\n poll: this.attrs.poll,\n post: this.attrs.post,\n });\n }\n\n deletePoll() {\n if (confirm(app.translator.trans('fof-polls.forum.moderation.delete_confirm'))) {\n this.attrs.poll.delete().then(() => {\n m.redraw.sync();\n });\n }\n }\n\n /**\n * Attempting to use the `tooltipVisible` attr on the Tooltip component set to 'false' when no vote count\n * caused the tooltip to break on click. This is a workaround to hide the tooltip when no vote count is available,\n * called on 'onremove' of the Tooltip component. It doesn't always work as intended either, but it does the job.\n */\n hideOptionTooltip(vnode) {\n vnode.attrs.tooltipVisible = false;\n vnode.state.updateVisibility();\n }\n\n /**\n * Alert before navigating away using browser's 'beforeunload' event\n */\n preventClose(e) {\n if (this.pendingOptions) {\n e.preventDefault();\n return true;\n }\n }\n}\n","export default class FormError extends Error {}\n","import CreatePollModal from './CreatePollModal';\nimport PostPoll from './PostPoll';\nimport EditPollModal from './EditPollModal';\nimport ListVotersModal from './ListVotersModal';\nimport PollForm from './PollForm';\n\nexport const components = {\n CreatePollModal,\n PostPoll,\n EditPollModal,\n ListVotersModal,\n PollForm,\n};\n","import Extend from 'flarum/common/extenders';\nimport Post from 'flarum/common/models/Post';\nimport Forum from 'flarum/common/models/Forum';\nimport Discussion from 'flarum/common/models/Discussion';\nimport Poll from './models/Poll';\nimport PollOption from './models/PollOption';\nimport PollVote from './models/PollVote';\nimport PollsPage from './components/PollsPage';\nimport ComposePollPage from './components/ComposePollPage';\n\nexport default [\n new Extend.Routes()\n .add('fof_polls_list', '/polls', PollsPage)\n .add('fof_polls_compose', '/polls/composer', ComposePollPage),\n\n new Extend.Store() //\n .add('polls', Poll)\n .add('poll_options', PollOption)\n .add('poll_votes', PollVote),\n\n new Extend.Model(Post) //\n .hasMany('polls')\n .attribute('canStartPoll'),\n\n new Extend.Model(Forum) //\n .attribute('canStartPolls'),\n\n new Extend.Model(Discussion) //\n .attribute('hasPoll')\n .attribute('canStartPoll'),\n];\n","import app from 'flarum/forum/app';\n\nimport addDiscussionBadge from './addDiscussionBadge';\nimport addComposerItems from './addComposerItems';\nimport addPollsToPost from './addPollsToPost';\nimport addPostControls from './addPostControls';\nimport addNavItem from './addNavItem';\n\nexport * from './components';\nexport * from './models';\n\nimport PollsPage from './components/PollsPage';\n\napp.initializers.add('fof/polls', () => {\n addDiscussionBadge();\n addComposerItems();\n addPollsToPost();\n addPostControls();\n addNavItem();\n});\n\nexport { default as extend } from './extend';\n","import Model from 'flarum/common/Model';\nimport PollOption from './PollOption';\nimport PollVote from './PollVote';\nimport computed from 'flarum/common/utils/computed';\n\nexport default class Poll extends Model {\n question() {\n return Model.attribute('question').call(this);\n }\n\n hasEnded() {\n return Model.attribute('hasEnded').call(this);\n }\n\n endDate() {\n return Model.attribute('endDate', Model.transformDate).call(this);\n }\n\n publicPoll() {\n return Model.attribute('publicPoll').call(this);\n }\n\n hideVotes() {\n return Model.attribute('hideVotes').call(this);\n }\n\n allowChangeVote() {\n return Model.attribute('allowChangeVote').call(this);\n }\n\n allowMultipleVotes() {\n return Model.attribute('allowMultipleVotes').call(this);\n }\n\n maxVotes() {\n return Model.attribute('maxVotes').call(this);\n }\n\n voteCount() {\n return Model.attribute('voteCount').call(this);\n }\n\n canVote() {\n return Model.attribute('canVote').call(this);\n }\n\n canEdit() {\n return Model.attribute('canEdit').call(this);\n }\n\n canDelete() {\n return Model.attribute('canDelete').call(this);\n }\n\n canSeeVoters() {\n return Model.attribute('canSeeVoters').call(this);\n }\n\n canChangeVote() {\n return Model.attribute('canChangeVote').call(this);\n }\n\n options() {\n return Model.hasMany('options').call(this);\n }\n\n votes() {\n return Model.hasMany('votes').call(this);\n }\n\n myVotes() {\n return Model.hasMany('myVotes').call(this);\n }\n\n isGlobal() {\n return Model.attribute('isGlobal').call(this);\n }\n\n isHidden() {\n return computed('hiddenAt', (hiddenAt) => !!hiddenAt).call(this);\n }\n\n // TODO: These two don't make sense as of now\n isUnread() {\n return false;\n }\n\n apiEndpoint() {\n /** @ts-ignore */\n return `/fof/polls${this.exists ? `/${this.data.id}` : ''}`;\n }\n}\n","import Model from 'flarum/common/Model';\nimport Poll from './Poll';\nimport PollVote from './PollVote';\n\nexport default class PollOption extends Model {\n answer() {\n return Model.attribute('answer').call(this);\n }\n\n imageUrl() {\n return Model.attribute('imageUrl').call(this);\n }\n\n voteCount() {\n return Model.attribute('voteCount').call(this);\n }\n\n poll() {\n return Model.hasOne('polls').call(this);\n }\n\n votes() {\n return Model.hasMany('votes').call(this);\n }\n\n apiEndpoint() {\n /** @ts-ignore */\n return `/fof/polls/answers${this.exists ? `/${this.data.id}` : ''}`;\n }\n}\n","import Model from 'flarum/common/Model';\nimport Poll from './Poll';\nimport PollOption from './PollOption';\nimport User from 'flarum/common/models/User';\n\nexport default class PollVote extends Model {\n poll() {\n return Model.hasOne('poll').call(this);\n }\n\n option() {\n return Model.hasOne('option').call(this);\n }\n\n user() {\n return Model.hasOne('user').call(this);\n }\n\n pollId() {\n return Model.attribute('pollId').call(this);\n }\n\n optionId() {\n return Model.attribute('optionId').call(this);\n }\n\n apiEndpoint() {\n return `/fof/polls/${this.pollId()}/vote`;\n }\n}\n","import Poll from './Poll';\nimport PollOption from './PollOption';\nimport PollVote from './PollVote';\n\nexport const models = {\n Poll,\n PollOption,\n PollVote,\n};\n","import app from 'flarum/forum/app';\n\nexport default class PollFormState {\n static createNewPoll() {\n const poll = app.store.createRecord('polls');\n poll.pushAttributes({\n question: '',\n endDate: '',\n publicPoll: false,\n allowMultipleVotes: false,\n hideVotes: false,\n allowChangeVote: false,\n maxVotes: 0,\n });\n poll.pushData({ relationships: { options: [] } });\n return poll;\n }\n\n constructor(poll) {\n if (!poll) {\n poll = PollFormState.createNewPoll();\n }\n\n this.loading = false;\n this.deleting = false;\n this.poll = poll;\n this.expandedGroup = 'setup';\n }\n\n isExpanded(groupKey) {\n return this.expandedGroup === groupKey;\n }\n\n expand(groupKey) {\n this.expandedGroup = groupKey;\n m.redraw();\n }\n\n async save(data) {\n this.loading = true;\n m.redraw();\n\n try {\n this.poll = await this.poll.save(data);\n } finally {\n this.loading = false;\n m.redraw();\n }\n }\n\n async delete() {\n this.loading = true;\n m.redraw();\n\n try {\n await this.poll.delete();\n this.deleting = true;\n } finally {\n this.loading = false;\n m.redraw();\n }\n }\n}\n","import app from 'flarum/forum/app';\nimport PaginatedListState, { Page, PaginatedListParams, PaginatedListRequestParams } from 'flarum/common/states/PaginatedListState';\nimport Poll from '../models/Poll';\nimport { ApiResponsePlural } from 'flarum/common/Store';\nimport EventEmitter from 'flarum/common/utils/EventEmitter';\n\nexport interface PollListParams extends PaginatedListParams {\n sort?: string;\n}\n\nconst globalEventEmitter = new EventEmitter();\n\nexport default class PollListState

extends PaginatedListState {\n protected extraPolls: Poll[] = [];\n protected eventEmitter: EventEmitter;\n\n constructor(params: P, page: number = 1) {\n super(params, page, 20);\n\n this.eventEmitter = globalEventEmitter.on('poll.deleted', this.deletePoll.bind(this));\n }\n\n get type(): string {\n return 'fof/polls';\n }\n\n requestParams(): PaginatedListRequestParams {\n const params = {\n include: ['options', 'votes'],\n filter: this.params.filter || {},\n sort: this.sortMap()[this.params.sort ?? ''],\n };\n\n if (this.params.q) {\n params.filter.q = this.params.q;\n }\n\n return params;\n }\n\n protected loadPage(page: number = 1): Promise> {\n const preloadedPolls = app.preloadedApiDocument();\n\n if (preloadedPolls) {\n this.initialLoading = false;\n\n return Promise.resolve(preloadedPolls);\n }\n\n return super.loadPage(page);\n }\n\n clear(): void {\n super.clear();\n\n this.extraPolls = [];\n }\n\n /**\n * Get a map of sort keys (which appear in the URL, and are used for\n * translation) to the API sort value that they represent.\n */\n sortMap() {\n const map: any = {};\n\n if (this.params.q) {\n map.relevance = '';\n }\n map.newest = '-createdAt';\n map.oldest = 'createdAt';\n\n return map;\n }\n\n /**\n * In the last request, has the user searched for a poll?\n */\n isSearchResults(): boolean {\n return !!this.params.q;\n }\n\n removePoll(poll: Poll): void {\n this.eventEmitter.emit('poll.deleted', poll);\n }\n\n deletePoll(poll: Poll): void {\n for (const page of this.pages) {\n const index = page.items.indexOf(poll);\n\n if (index !== -1) {\n page.items.splice(index, 1);\n break;\n }\n }\n\n const index = this.extraPolls.indexOf(poll);\n\n if (index !== -1) {\n this.extraPolls.splice(index);\n }\n\n m.redraw();\n }\n\n /**\n * Add a poll to the top of the list.\n */\n addPoll(poll: Poll): void {\n this.removePoll(poll);\n this.extraPolls.unshift(poll);\n\n m.redraw();\n }\n\n protected getAllItems(): Poll[] {\n return this.extraPolls.concat(super.getAllItems());\n }\n\n public getPages(): Page[] {\n const pages = super.getPages();\n\n if (this.extraPolls.length) {\n return [\n {\n number: -1,\n items: this.extraPolls,\n },\n ...pages,\n ];\n }\n\n return pages;\n }\n}\n","import app from 'flarum/forum/app';\nimport Poll from '../models/Poll';\nimport LogInModal from 'flarum/forum/components/LogInModal';\nimport PollOption from '../models/PollOption';\nimport PollVote from '../models/PollVote';\nimport ListVotersModal from '../components/ListVotersModal';\n\nexport default class PollState {\n protected poll: Poll;\n protected pendingSubmit: boolean;\n protected pendingOptions: Set | null;\n public loadingOptions: boolean;\n public useSubmitUI: boolean;\n public showCheckMarks: boolean;\n public boundChangeVote: (option: PollOption, evt: Event) => void;\n\n constructor(poll: Poll) {\n this.poll = poll;\n this.pendingSubmit = false;\n this.pendingOptions = null;\n this.loadingOptions = false;\n this.useSubmitUI = !this.poll?.canChangeVote() && this.poll?.allowMultipleVotes();\n this.showCheckMarks = !app.session.user || (!poll.hasEnded() && poll.canVote() && (!this.hasVoted() || poll.canChangeVote()));\n }\n\n hasVoted() {\n return this.poll.myVotes().length > 0;\n }\n\n showButton() {\n return this.useSubmitUI && this.pendingSubmit;\n }\n\n changeVote(option: PollOption, evt) {\n if (!app.session.user) {\n app.modal.show(LogInModal);\n evt.target.checked = false;\n return;\n }\n\n const optionIds = this.pendingOptions || new Set(this.poll.myVotes().map?.((v: PollVote) => v.option().id()));\n const isUnvoting = optionIds.delete(option.id());\n const allowsMultiple = this.poll.allowMultipleVotes();\n\n if (!allowsMultiple) {\n optionIds.clear();\n }\n\n if (!isUnvoting) {\n optionIds.add(option.id()!);\n }\n\n if (this.useSubmitUI) {\n this.pendingOptions = optionIds.size ? optionIds : null;\n this.pendingSubmit = !!this.pendingOptions;\n return;\n }\n\n return this.submit(optionIds, null, () => (evt.target.checked = isUnvoting));\n }\n\n onsubmit() {\n return this.submit(this.pendingOptions!, () => {\n this.pendingOptions = null;\n this.pendingSubmit = false;\n });\n }\n\n submit(optionIds: Set, cb: Function | null, onerror: Function | null = null) {\n this.loadingOptions = true;\n m.redraw();\n\n return app\n .request({\n method: 'PATCH',\n url: `${app.forum.attribute('apiUrl')}/fof/polls/${this.poll.id()}/votes`,\n body: {\n data: {\n optionIds: Array.from(optionIds),\n },\n },\n })\n .then((res) => {\n app.store.pushPayload(res);\n cb?.();\n })\n .catch((err) => {\n onerror?.(err);\n })\n .finally(() => {\n this.loadingOptions = false;\n\n m.redraw();\n });\n }\n\n showVoters = () => {\n // Load all the votes only when opening the votes list\n app.modal.show(ListVotersModal, {\n poll: this.poll,\n });\n };\n\n /**\n * Attempting to use the `tooltipVisible` attr on the Tooltip component set to 'false' when no vote count\n * caused the tooltip to break on click. This is a workaround to hide the tooltip when no vote count is available,\n * called on 'onremove' of the Tooltip component. It doesn't always work as intended either, but it does the job.\n */\n hideOptionTooltip(vnode) {\n vnode.attrs.tooltipVisible = false;\n vnode.state.updateVisibility();\n }\n\n /**\n * Alert before navigating away using browser's 'beforeunload' event\n */\n preventClose = (e: Event): boolean | void => {\n if (this.pendingOptions) {\n e.preventDefault();\n return true;\n }\n };\n}\n","import Mithril from 'mithril';\nimport app from 'flarum/forum/app';\nimport Poll from '../models/Poll';\nimport Component from 'flarum/common/Component';\nimport { slug } from '../../common';\nimport ComposePollPage from '../components/ComposePollPage';\nimport PollsPage from '../components/PollsPage';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Separator from 'flarum/common/components/Separator';\nimport Button from 'flarum/common/components/Button';\nimport Link from 'flarum/common/components/Link';\n\nconst t = app.translator.trans.bind(app.translator);\nconst prfx = `${slug}.forum.poll_controls`;\n\n/**\n * The `UserControls` utility constructs a list of buttons for a user which\n * perform actions on it.\n */\nexport default {\n /**\n * Get a list of controls for a user.\n */\n controls(poll: Poll, context: Component): ItemList {\n const items = new ItemList();\n\n ['poll', 'moderation', 'destructive'].forEach((section) => {\n const controls: Mithril.Children[] = this[section + 'Controls'](poll, context).toArray();\n if (controls.length) {\n controls.forEach((item) => items.add(item.itemName, item));\n items.add(section + 'Separator', );\n }\n });\n\n return items;\n },\n\n /**\n * Get controls for direkt modifcation actions on polls (e.g. vote, view voters).\n */\n pollControls(poll: Poll, context: Component): ItemList {\n const items = new ItemList();\n\n items.add('view', {t(`${prfx}.view_label`)});\n\n return items;\n },\n\n /**\n * Get controls for a user pertaining to moderation (e.g. suspend, edit).\n */\n moderationControls(poll: Poll, context: Component): ItemList {\n const items = new ItemList();\n\n if (poll.canEdit()) {\n items.add(\n 'edit',\n \n );\n }\n\n return items;\n },\n\n /**\n * Get controls for a user which are destructive (e.g. delete).\n * @protected\n */\n destructiveControls(poll: Poll, context: Component): ItemList {\n const items = new ItemList();\n\n if (poll.canDelete()) {\n items.add(\n 'delete',\n \n );\n }\n\n return items;\n },\n\n /**\n * Delete the user.\n */\n deleteAction(poll: Poll): void {\n if (!confirm(t(`${prfx}.delete_confirmation`))) {\n return;\n }\n\n poll\n .delete()\n .then(() => {\n this.showDeletionAlert(poll, 'success');\n if (app.current.matches(ComposePollPage, { id: poll.id() }) || app.current.matches(PollsPage, { id: poll.id() })) {\n app.history.back();\n } else {\n window.location.reload();\n }\n })\n .catch(() => this.showDeletionAlert(poll, 'error'));\n },\n\n /**\n * Show deletion alert of poll\n */\n showDeletionAlert(poll: Poll, type: string): void {\n const message = {\n success: `${prfx}.delete_success_message`,\n error: `${prfx}.delete_error_message`,\n }[type]!;\n\n app.alerts.show({ type }, t(message, { poll: poll }));\n },\n\n /**\n * Edit the poll.\n */\n editAction(poll: Poll): void {\n m.route.set(app.route('fof_polls_compose', { id: poll.id() }));\n },\n};\n","module.exports = flarum.core.compat['common/Component'];","module.exports = flarum.core.compat['common/Model'];","module.exports = flarum.core.compat['common/components/Badge'];","module.exports = flarum.core.compat['common/components/Button'];","module.exports = flarum.core.compat['common/components/Dropdown'];","module.exports = flarum.core.compat['common/components/Link'];","module.exports = flarum.core.compat['common/components/LinkButton'];","module.exports = flarum.core.compat['common/components/LoadingIndicator'];","module.exports = flarum.core.compat['common/components/Modal'];","module.exports = flarum.core.compat['common/components/Page'];","module.exports = flarum.core.compat['common/components/Placeholder'];","module.exports = flarum.core.compat['common/components/SelectDropdown'];","module.exports = flarum.core.compat['common/components/Separator'];","module.exports = flarum.core.compat['common/components/Switch'];","module.exports = flarum.core.compat['common/components/Tooltip'];","module.exports = flarum.core.compat['common/extend'];","module.exports = flarum.core.compat['common/extenders'];","module.exports = flarum.core.compat['common/helpers/avatar'];","module.exports = flarum.core.compat['common/helpers/highlight'];","module.exports = flarum.core.compat['common/helpers/icon'];","module.exports = flarum.core.compat['common/helpers/listItems'];","module.exports = flarum.core.compat['common/helpers/username'];","module.exports = flarum.core.compat['common/models/Discussion'];","module.exports = flarum.core.compat['common/models/Forum'];","module.exports = flarum.core.compat['common/models/Post'];","module.exports = flarum.core.compat['common/states/PaginatedListState'];","module.exports = flarum.core.compat['common/utils/EventEmitter'];","module.exports = flarum.core.compat['common/utils/ItemList'];","module.exports = flarum.core.compat['common/utils/Stream'];","module.exports = flarum.core.compat['common/utils/SubtreeRetainer'];","module.exports = flarum.core.compat['common/utils/abbreviateNumber'];","module.exports = flarum.core.compat['common/utils/classList'];","module.exports = flarum.core.compat['common/utils/computed'];","module.exports = flarum.core.compat['common/utils/extractText'];","module.exports = flarum.core.compat['forum/app'];","module.exports = flarum.core.compat['forum/components/CommentPost'];","module.exports = flarum.core.compat['forum/components/DiscussionComposer'];","module.exports = flarum.core.compat['forum/components/DiscussionList'];","module.exports = flarum.core.compat['forum/components/DiscussionPage'];","module.exports = flarum.core.compat['forum/components/IndexPage'];","module.exports = flarum.core.compat['forum/components/LogInModal'];","module.exports = flarum.core.compat['forum/components/ReplyComposer'];","module.exports = flarum.core.compat['forum/utils/PostControls'];","module.exports = flarum.core.compat['forum/utils/slidable'];","var _typeof = require(\"./typeof.js\")[\"default\"];\nfunction _regeneratorRuntime() {\n \"use strict\"; /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */\n module.exports = _regeneratorRuntime = function _regeneratorRuntime() {\n return e;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;\n var t,\n e = {},\n r = Object.prototype,\n n = r.hasOwnProperty,\n o = Object.defineProperty || function (t, e, r) {\n t[e] = r.value;\n },\n i = \"function\" == typeof Symbol ? Symbol : {},\n a = i.iterator || \"@@iterator\",\n c = i.asyncIterator || \"@@asyncIterator\",\n u = i.toStringTag || \"@@toStringTag\";\n function define(t, e, r) {\n return Object.defineProperty(t, e, {\n value: r,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }), t[e];\n }\n try {\n define({}, \"\");\n } catch (t) {\n define = function define(t, e, r) {\n return t[e] = r;\n };\n }\n function wrap(t, e, r, n) {\n var i = e && e.prototype instanceof Generator ? e : Generator,\n a = Object.create(i.prototype),\n c = new Context(n || []);\n return o(a, \"_invoke\", {\n value: makeInvokeMethod(t, r, c)\n }), a;\n }\n function tryCatch(t, e, r) {\n try {\n return {\n type: \"normal\",\n arg: t.call(e, r)\n };\n } catch (t) {\n return {\n type: \"throw\",\n arg: t\n };\n }\n }\n e.wrap = wrap;\n var h = \"suspendedStart\",\n l = \"suspendedYield\",\n f = \"executing\",\n s = \"completed\",\n y = {};\n function Generator() {}\n function GeneratorFunction() {}\n function GeneratorFunctionPrototype() {}\n var p = {};\n define(p, a, function () {\n return this;\n });\n var d = Object.getPrototypeOf,\n v = d && d(d(values([])));\n v && v !== r && n.call(v, a) && (p = v);\n var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);\n function defineIteratorMethods(t) {\n [\"next\", \"throw\", \"return\"].forEach(function (e) {\n define(t, e, function (t) {\n return this._invoke(e, t);\n });\n });\n }\n function AsyncIterator(t, e) {\n function invoke(r, o, i, a) {\n var c = tryCatch(t[r], t, o);\n if (\"throw\" !== c.type) {\n var u = c.arg,\n h = u.value;\n return h && \"object\" == _typeof(h) && n.call(h, \"__await\") ? e.resolve(h.__await).then(function (t) {\n invoke(\"next\", t, i, a);\n }, function (t) {\n invoke(\"throw\", t, i, a);\n }) : e.resolve(h).then(function (t) {\n u.value = t, i(u);\n }, function (t) {\n return invoke(\"throw\", t, i, a);\n });\n }\n a(c.arg);\n }\n var r;\n o(this, \"_invoke\", {\n value: function value(t, n) {\n function callInvokeWithMethodAndArg() {\n return new e(function (e, r) {\n invoke(t, n, e, r);\n });\n }\n return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();\n }\n });\n }\n function makeInvokeMethod(e, r, n) {\n var o = h;\n return function (i, a) {\n if (o === f) throw new Error(\"Generator is already running\");\n if (o === s) {\n if (\"throw\" === i) throw a;\n return {\n value: t,\n done: !0\n };\n }\n for (n.method = i, n.arg = a;;) {\n var c = n.delegate;\n if (c) {\n var u = maybeInvokeDelegate(c, n);\n if (u) {\n if (u === y) continue;\n return u;\n }\n }\n if (\"next\" === n.method) n.sent = n._sent = n.arg;else if (\"throw\" === n.method) {\n if (o === h) throw o = s, n.arg;\n n.dispatchException(n.arg);\n } else \"return\" === n.method && n.abrupt(\"return\", n.arg);\n o = f;\n var p = tryCatch(e, r, n);\n if (\"normal\" === p.type) {\n if (o = n.done ? s : l, p.arg === y) continue;\n return {\n value: p.arg,\n done: n.done\n };\n }\n \"throw\" === p.type && (o = s, n.method = \"throw\", n.arg = p.arg);\n }\n };\n }\n function maybeInvokeDelegate(e, r) {\n var n = r.method,\n o = e.iterator[n];\n if (o === t) return r.delegate = null, \"throw\" === n && e.iterator[\"return\"] && (r.method = \"return\", r.arg = t, maybeInvokeDelegate(e, r), \"throw\" === r.method) || \"return\" !== n && (r.method = \"throw\", r.arg = new TypeError(\"The iterator does not provide a '\" + n + \"' method\")), y;\n var i = tryCatch(o, e.iterator, r.arg);\n if (\"throw\" === i.type) return r.method = \"throw\", r.arg = i.arg, r.delegate = null, y;\n var a = i.arg;\n return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, \"return\" !== r.method && (r.method = \"next\", r.arg = t), r.delegate = null, y) : a : (r.method = \"throw\", r.arg = new TypeError(\"iterator result is not an object\"), r.delegate = null, y);\n }\n function pushTryEntry(t) {\n var e = {\n tryLoc: t[0]\n };\n 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);\n }\n function resetTryEntry(t) {\n var e = t.completion || {};\n e.type = \"normal\", delete e.arg, t.completion = e;\n }\n function Context(t) {\n this.tryEntries = [{\n tryLoc: \"root\"\n }], t.forEach(pushTryEntry, this), this.reset(!0);\n }\n function values(e) {\n if (e || \"\" === e) {\n var r = e[a];\n if (r) return r.call(e);\n if (\"function\" == typeof e.next) return e;\n if (!isNaN(e.length)) {\n var o = -1,\n i = function next() {\n for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;\n return next.value = t, next.done = !0, next;\n };\n return i.next = i;\n }\n }\n throw new TypeError(_typeof(e) + \" is not iterable\");\n }\n return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, \"constructor\", {\n value: GeneratorFunctionPrototype,\n configurable: !0\n }), o(GeneratorFunctionPrototype, \"constructor\", {\n value: GeneratorFunction,\n configurable: !0\n }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, \"GeneratorFunction\"), e.isGeneratorFunction = function (t) {\n var e = \"function\" == typeof t && t.constructor;\n return !!e && (e === GeneratorFunction || \"GeneratorFunction\" === (e.displayName || e.name));\n }, e.mark = function (t) {\n return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, \"GeneratorFunction\")), t.prototype = Object.create(g), t;\n }, e.awrap = function (t) {\n return {\n __await: t\n };\n }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {\n return this;\n }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {\n void 0 === i && (i = Promise);\n var a = new AsyncIterator(wrap(t, r, n, o), i);\n return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {\n return t.done ? t.value : a.next();\n });\n }, defineIteratorMethods(g), define(g, u, \"Generator\"), define(g, a, function () {\n return this;\n }), define(g, \"toString\", function () {\n return \"[object Generator]\";\n }), e.keys = function (t) {\n var e = Object(t),\n r = [];\n for (var n in e) r.push(n);\n return r.reverse(), function next() {\n for (; r.length;) {\n var t = r.pop();\n if (t in e) return next.value = t, next.done = !1, next;\n }\n return next.done = !0, next;\n };\n }, e.values = values, Context.prototype = {\n constructor: Context,\n reset: function reset(e) {\n if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = \"next\", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) \"t\" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);\n },\n stop: function stop() {\n this.done = !0;\n var t = this.tryEntries[0].completion;\n if (\"throw\" === t.type) throw t.arg;\n return this.rval;\n },\n dispatchException: function dispatchException(e) {\n if (this.done) throw e;\n var r = this;\n function handle(n, o) {\n return a.type = \"throw\", a.arg = e, r.next = n, o && (r.method = \"next\", r.arg = t), !!o;\n }\n for (var o = this.tryEntries.length - 1; o >= 0; --o) {\n var i = this.tryEntries[o],\n a = i.completion;\n if (\"root\" === i.tryLoc) return handle(\"end\");\n if (i.tryLoc <= this.prev) {\n var c = n.call(i, \"catchLoc\"),\n u = n.call(i, \"finallyLoc\");\n if (c && u) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n } else if (c) {\n if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);\n } else {\n if (!u) throw new Error(\"try statement without catch or finally\");\n if (this.prev < i.finallyLoc) return handle(i.finallyLoc);\n }\n }\n }\n },\n abrupt: function abrupt(t, e) {\n for (var r = this.tryEntries.length - 1; r >= 0; --r) {\n var o = this.tryEntries[r];\n if (o.tryLoc <= this.prev && n.call(o, \"finallyLoc\") && this.prev < o.finallyLoc) {\n var i = o;\n break;\n }\n }\n i && (\"break\" === t || \"continue\" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);\n var a = i ? i.completion : {};\n return a.type = t, a.arg = e, i ? (this.method = \"next\", this.next = i.finallyLoc, y) : this.complete(a);\n },\n complete: function complete(t, e) {\n if (\"throw\" === t.type) throw t.arg;\n return \"break\" === t.type || \"continue\" === t.type ? this.next = t.arg : \"return\" === t.type ? (this.rval = this.arg = t.arg, this.method = \"return\", this.next = \"end\") : \"normal\" === t.type && e && (this.next = e), y;\n },\n finish: function finish(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;\n }\n },\n \"catch\": function _catch(t) {\n for (var e = this.tryEntries.length - 1; e >= 0; --e) {\n var r = this.tryEntries[e];\n if (r.tryLoc === t) {\n var n = r.completion;\n if (\"throw\" === n.type) {\n var o = n.arg;\n resetTryEntry(r);\n }\n return o;\n }\n }\n throw new Error(\"illegal catch attempt\");\n },\n delegateYield: function delegateYield(e, r, n) {\n return this.delegate = {\n iterator: values(e),\n resultName: r,\n nextLoc: n\n }, \"next\" === this.method && (this.arg = t), y;\n }\n }, e;\n}\nmodule.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return (module.exports = _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, module.exports.__esModule = true, module.exports[\"default\"] = module.exports), _typeof(o);\n}\nmodule.exports = _typeof, module.exports.__esModule = true, module.exports[\"default\"] = module.exports;","// TODO(Babel 8): Remove this file.\n\nvar runtime = require(\"../helpers/regeneratorRuntime\")();\nmodule.exports = runtime;\n\n// Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=\ntry {\n regeneratorRuntime = runtime;\n} catch (accidentalStrictMode) {\n if (typeof globalThis === \"object\") {\n globalThis.regeneratorRuntime = runtime;\n } else {\n Function(\"r\", \"regeneratorRuntime = r\")(runtime);\n }\n}\n","export default function _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n return self;\n}","function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n}\nexport default function _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n function _next(value) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"next\", value);\n }\n function _throw(err) {\n asyncGeneratorStep(gen, resolve, reject, _next, _throw, \"throw\", err);\n }\n _next(undefined);\n });\n };\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeReflectConstruct from \"./isNativeReflectConstruct.js\";\nexport default function _construct(t, e, r) {\n if (isNativeReflectConstruct()) return Reflect.construct.apply(null, arguments);\n var o = [null];\n o.push.apply(o, e);\n var p = new (t.bind.apply(t, o))();\n return r && setPrototypeOf(p, r.prototype), p;\n}","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, toPropertyKey(descriptor.key), descriptor);\n }\n}\nexport default function _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n Object.defineProperty(Constructor, \"prototype\", {\n writable: false\n });\n return Constructor;\n}","export default function _extends() {\n _extends = Object.assign ? Object.assign.bind() : function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n return target;\n };\n return _extends.apply(this, arguments);\n}","export default function _getPrototypeOf(o) {\n _getPrototypeOf = Object.setPrototypeOf ? Object.getPrototypeOf.bind() : function _getPrototypeOf(o) {\n return o.__proto__ || Object.getPrototypeOf(o);\n };\n return _getPrototypeOf(o);\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}","export default function _isNativeFunction(fn) {\n try {\n return Function.toString.call(fn).indexOf(\"[native code]\") !== -1;\n } catch (e) {\n return typeof fn === \"function\";\n }\n}","export default function _isNativeReflectConstruct() {\n try {\n var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {}));\n } catch (t) {}\n return (_isNativeReflectConstruct = function _isNativeReflectConstruct() {\n return !!t;\n })();\n}","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import _typeof from \"./typeof.js\";\nexport default function toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nexport default function toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : String(i);\n}","export default function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}","import getPrototypeOf from \"./getPrototypeOf.js\";\nimport setPrototypeOf from \"./setPrototypeOf.js\";\nimport isNativeFunction from \"./isNativeFunction.js\";\nimport construct from \"./construct.js\";\nexport default function _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (Class === null || !isNativeFunction(Class)) return Class;\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n _cache.set(Class, Wrapper);\n }\n function Wrapper() {\n return construct(Class, arguments, getPrototypeOf(this).constructor);\n }\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return setPrototypeOf(Wrapper, Class);\n };\n return _wrapNativeSuper(Class);\n}","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\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};"],"names":["Acl","canManagePools","canStartPoll","default","slug","app","extend","classList","DiscussionComposer","ReplyComposer","CreatePollModal","addToComposer","composer","prototype","addPoll","_this","modal","show","poll","fields","onsubmit","items","_this$composer$body","_discussion$canStartP","discussion","body","attrs","forum","canStartPolls","add","m","className","onclick","bind","translator","trans","data","Badge","DiscussionList","Discussion","params","include","push","badges","hasPoll","component","type","label","icon","IndexPage","LinkButton","addNavItem","href","route","CommentPost","PostPoll","DiscussionPage","content","post","isHidden","revealContent","polls","_iterator","_createForOfIteratorHelperLoose","_step","done","value","subtree","check","checks","map","_poll$data","_poll$options$map","_poll$options","_poll$myVotes$map","_poll$myVotes","attributes","options","call","option","_option$data","myVotes","vote","_vote$option","id","JSON","stringify","pusher","then","binding","channels","main","store","getById","pushAttributes","voteCount","changedOptions","optionId","undefined","redraw","unbind","PostControls","Button","createPoll","createRecord","save","_extends","relationships","_post$rawRelationship","rawRelationship","Component","t","prfx","ComposePollHero","_Component","_inheritsLoose","apply","arguments","_proto","view","itemClassName","exists","external","target","Page","LoadingIndicator","PollForm","PollFormState","ComposePollPage","_Page","_len","length","args","Array","_key","concat","loading","oninit","vnode","_this2","_this$poll","set","editId","param","find","item","_this2$poll","setTitle","createNewPoll","history","bodyClass","Modal","_Modal","title","hide","EditPollModal","_CreatePollModal","avatar","username","Link","Stream","ListVotersModal","optionContent","opt","votes","filter","v","answer","voteContent","user","PollTitle","PollOptions","PollImage","PollDescription","PollState","Tooltip","ItemList","PollControls","Poll","state","infoItems","maxVotes","question","canSeeVoters","text","showVoters","canEdit","editPoll","canDelete","deletePoll","image","isEmpty","toArray","showButton","loadingOptions","deleteAction","editAction","session","canVote","hasEnded","endDate","time","dayjs","fromNow","max","canChangeVote","hasVoted","Switch","extractText","FormError","optionAnswers","o","optionImageUrls","imageUrl","formatDate","publicPoll","allowMultipleVotes","hideVotes","allowChangeVote","datepickerMinDate","isAfter","name","bidi","addOption","displayOptions","min","isBefore","onchange","disabled","deleting","Object","keys","i","placeholder","attribute","removeOption","Math","alert","splice","dateToTimestamp","_onsubmit","_asyncToGenerator","_regeneratorRuntime","mark","_callee","e","_this3","alertId","wrap","_callee$","_context","prev","next","preventDefault","alerts","controls","edit","collection","setTimeout","dismiss","t0","message","finish","stop","_x","_delete2","_callee2","_callee2$","_context2","confirm","abrupt","_delete","date","def","dayjsDate","isValid","format","PollListItem","Placeholder","PollList","getParams","isLoading","isInitialLoading","isLoadingNext","hasNext","loadNext","pageSize","isSearchResults","getPages","pg","key","SubtreeRetainer","Dropdown","highlight","slidable","PollPage","abbreviateNumber","listItems","highlightRegExp","freshness","markedAllAsReadAt","getTime","active","elementAttrs","Slidable","window","controlsView","contentView","slidableUnderneathView","menuClassName","buttonClassName","accessibleToggleLabel","isUnread","markAsRead","mainView","infoView","oncreate","slidableInstance","element","$","on","reset","onbeforeupdate","needsRebuild","current","matches","lastVotedNumber","activeView","count","PollOptionLabel","PollOptionInput","PollOption","isResult","style","opacity","PollResult","pollOptions","showCheckMarks","forEach","changeVote","PollResultsNumber","PollResults","number","step","LogInModal","PollListState","SelectDropdown","PollsPage","initListView","sort","refresh","hero","sidebarItems","viewItems","actionItems","newPollAction","navItems","_this4","_this$attrs$poll","_this$attrs$poll2","useSubmitUI","pendingSubmit","pendingOptions","preventClose","addEventListener","onremove","removeEventListener","viewOption","_poll$myVotes2","_poll$myVotes3","_poll$myVotes4","totalVotes","voted","has","some","percent","round","canSeeVoteCount","isDisabled","width","Number","showCheckmark","bar","checked","src","alt","hideOptionTooltip","evt","_this$attrs$poll$myVo","_this$attrs$poll$myVo2","optionIds","Set","isUnvoting","allowsMultiple","clear","size","submit","cb","onerror","request","method","url","from","res","pushPayload","err","sync","tooltipVisible","updateVisibility","_Error","_wrapNativeSuper","Error","components","Extend","Post","Forum","PollVote","Routes","Store","Model","hasMany","addDiscussionBadge","addComposerItems","addPollsToPost","addPostControls","initializers","computed","_Model","transformDate","isGlobal","hiddenAt","apiEndpoint","hasOne","pollId","models","pushData","expandedGroup","isExpanded","groupKey","expand","_save","sent","PaginatedListState","EventEmitter","globalEventEmitter","_PaginatedListState","page","extraPolls","eventEmitter","_assertThisInitialized","requestParams","_this$params$sort","sortMap","q","loadPage","preloadedPolls","preloadedApiDocument","initialLoading","Promise","resolve","relevance","newest","oldest","removePoll","emit","pages","index","indexOf","unshift","getAllItems","_createClass","get","_this$poll2","boundChangeVote","_this$poll$myVotes$ma","_this$poll$myVotes","Separator","context","section","itemName","pollControls","moderationControls","destructiveControls","showDeletionAlert","back","location","reload","success","error","_typeof","require","module","exports","__esModule","r","n","hasOwnProperty","defineProperty","Symbol","a","iterator","c","asyncIterator","u","toStringTag","define","enumerable","configurable","writable","Generator","create","Context","makeInvokeMethod","tryCatch","arg","h","l","f","s","y","GeneratorFunction","GeneratorFunctionPrototype","p","d","getPrototypeOf","values","g","defineIteratorMethods","_invoke","AsyncIterator","invoke","__await","callInvokeWithMethodAndArg","delegate","maybeInvokeDelegate","_sent","dispatchException","TypeError","resultName","nextLoc","pushTryEntry","tryLoc","catchLoc","finallyLoc","afterLoc","tryEntries","resetTryEntry","completion","isNaN","displayName","isGeneratorFunction","constructor","setPrototypeOf","__proto__","awrap","async","reverse","pop","charAt","slice","rval","handle","complete","_catch","delegateYield","runtime","regeneratorRuntime","accidentalStrictMode","globalThis","Function","self","ReferenceError","asyncGeneratorStep","gen","reject","_next","_throw","info","fn","isNativeReflectConstruct","_construct","Reflect","construct","toPropertyKey","_defineProperties","props","descriptor","Constructor","protoProps","staticProps","assign","source","_getPrototypeOf","subClass","superClass","_isNativeFunction","toString","_isNativeReflectConstruct","Boolean","valueOf","_setPrototypeOf","toPrimitive","String","isNativeFunction","Class","_cache","Map","Wrapper"],"sourceRoot":""} \ No newline at end of file diff --git a/js/src/forum/addNavItem.ts b/js/src/forum/addNavItem.ts index c9bebe74..56e7b0ad 100644 --- a/js/src/forum/addNavItem.ts +++ b/js/src/forum/addNavItem.ts @@ -9,7 +9,7 @@ export default function addNavItem() { 'fof-polls-directory', LinkButton.component( { - href: app.route('fof_polls_directory'), + href: app.route('fof_polls_list'), icon: 'fas fa-poll', }, app.translator.trans('fof-polls.forum.page.nav') diff --git a/js/src/forum/components/ComposePollHero.tsx b/js/src/forum/components/ComposePollHero.tsx index 0e6b37c4..9dbf8291 100644 --- a/js/src/forum/components/ComposePollHero.tsx +++ b/js/src/forum/components/ComposePollHero.tsx @@ -21,7 +21,7 @@ export default class ComposePollHero extends Component { icon="far fa-edit" className="Button Button--primary IndexPage-newDiscussion GoodiesManagerLink" itemClassName="App-primaryControl" - href={app.route('fof_polls_directory')} + href={app.route('fof_polls_list')} > {t(`${prfx}.polls_manager`)} @@ -30,7 +30,7 @@ export default class ComposePollHero extends Component { icon="far fa-arrow-up-right-from-square" className="Button Button--primary IndexPage-newDiscussion GoodiePreviewLink" itemClassName="App-primaryControl" - href={app.route('fof_polls_directory', { id: poll.id() })} + href={app.route('fof_polls_list', { id: poll.id() })} external={true} target="_blank" > diff --git a/js/src/forum/components/Poll.tsx b/js/src/forum/components/Poll.tsx index 5faeeca6..9b4e2a4f 100644 --- a/js/src/forum/components/Poll.tsx +++ b/js/src/forum/components/Poll.tsx @@ -1,32 +1,136 @@ -import * as Mithril from 'mithril'; -import Component from 'flarum/common/Component'; - +import Mithril from 'mithril'; +import Component, { ComponentAttrs } from 'flarum/common/Component'; +import app from 'flarum/forum/app'; import PollTitle from './Poll/PollTitle'; import PollOptions from './Poll/PollOptions'; -import PollSubmitButton from './Poll/PollSubmitButton'; import PollImage from './Poll/PollImage'; +import PollDescription from './Poll/PollDescription'; +import PollModel from '../models/Poll'; +import PollState from '../states/PollState'; +import Tooltip from 'flarum/common/components/Tooltip'; +import Button from 'flarum/common/components/Button'; +import ItemList from 'flarum/common/utils/ItemList'; +import { slug } from '../../common'; +import PollControls from '../utils/PollControls'; + +// Make translation calls shorter +const t = app.translator.trans.bind(app.translator); +const prfx = `${slug}.forum.poll`; + +interface PollAttrs extends ComponentAttrs { + poll: PollModel; +} + +export default class Poll extends Component { + oninit(vnode: Mithril.Vnode) { + super.oninit(vnode); + this.state = new PollState(this.attrs.poll); + } -export default class IndexPolls extends Component { view(): Mithril.Children { - /* @type Poll */ const poll = this.attrs.poll; + const infoItems = this.infoItems(poll.maxVotes()); + const state = this.state; return ( -

+
+
+

{poll.question()}

+ {poll.canSeeVoters() && ( + +
+
Antworten - - +
+
+ {!infoItems.isEmpty() &&
{infoItems.toArray()}
} + + {state.showButton() && ( + + )} +
); } + + deletePoll(): void { + PollControls.deleteAction(this.attrs.poll); + } + + editPoll(): void { + PollControls.editAction(this.attrs.poll); + } + + infoItems(maxVotes: number) { + const items = new ItemList(); + const poll = this.attrs.poll; + + if (app.session.user && !poll.canVote() && !poll.hasEnded()) { + items.add( + 'no-permission', + + + {t('fof-polls.forum.no_permission')} + + ); + } + + if (poll.endDate()) { + items.add( + 'end-date', + + + {poll.hasEnded() ? t('fof-polls.forum.poll_ended') : t('fof-polls.forum.days_remaining', { time: dayjs(poll.endDate()).fromNow() })} + + ); + } + + if (poll.canVote()) { + items.add( + 'max-votes', + + + {t('fof-polls.forum.max_votes_allowed', { max: maxVotes })} + + ); + + if (!poll.canChangeVote()) { + items.add( + 'cannot-change-vote', + + + {t('fof-polls.forum.poll.cannot_change_vote')} + + ); + } + } + + return items; + } } diff --git a/js/src/forum/components/Poll/PollList.js b/js/src/forum/components/Poll/PollList.js index 3b36e45b..ac879011 100644 --- a/js/src/forum/components/Poll/PollList.js +++ b/js/src/forum/components/Poll/PollList.js @@ -42,8 +42,8 @@ export default class PollList extends Component { const pageSize = state.pageSize; return ( -
-
    +
    +
      {state.getPages().map((pg) => { return pg.items.map((poll) => (
    • diff --git a/js/src/forum/components/Poll/PollListItem.tsx b/js/src/forum/components/Poll/PollListItem.tsx index d5b839b8..ea97b986 100644 --- a/js/src/forum/components/Poll/PollListItem.tsx +++ b/js/src/forum/components/Poll/PollListItem.tsx @@ -1,7 +1,6 @@ -import * as Mithril from 'mithril'; +import Mithril from 'mithril'; import app from 'flarum/forum/app'; import Component, { ComponentAttrs } from 'flarum/common/Component'; -import type Poll from '../../../common/models/Poll'; import type { PollListParams } from '../../states/PollListState'; import SubtreeRetainer from 'flarum/common/utils/SubtreeRetainer'; import classList from 'flarum/common/utils/classList'; @@ -12,6 +11,15 @@ import slidable from 'flarum/forum/utils/slidable'; import icon from 'flarum/common/helpers/icon'; import PollPage from './PollPage'; import abbreviateNumber from 'flarum/common/utils/abbreviateNumber'; +import Poll from '../../models/Poll'; +import PollControls from '../../utils/PollControls'; +import { slug } from '../../../common'; +import ItemList from 'flarum/common/utils/ItemList'; +import listItems from 'flarum/common/helpers/listItems'; + +// Make translation calls shorter +const t = app.translator.trans.bind(app.translator); +const prfx = `${slug}.forum.list`; export interface IPollListItemAttrs extends ComponentAttrs { poll: Poll; @@ -46,7 +54,7 @@ export default class PollListItem - {/* {this.controlsView(controls)} */} + {this.controlsView(controls)} {this.contentView()} {this.slidableUnderneathView()}
    @@ -75,9 +82,10 @@ export default class PollListItem {controls} @@ -107,10 +115,8 @@ export default class PollListItem
    - {/* {this.authorAvatarView()} - {this.badgesView()} */} {this.mainView()} - {this.voteCountItem()} + {this.infoView()}
    ); } @@ -119,13 +125,16 @@ export default class PollListItem +

    {highlight(poll.question(), this.highlightRegExp)}

    - {/*
      {listItems(this.infoItems().toArray())}
    */} ); } + infoView() { + return
      {listItems(this.infoItems().toArray())}
    ; + } + oncreate(vnode: Mithril.VnodeDOM) { super.oncreate(vnode); @@ -164,17 +173,34 @@ export default class PollListItem { const poll = this.attrs.poll; - - return ( - - - - - {app.translator.trans('fof-polls.forum.poll_list.total_votes_a11y_label', { count: poll.voteCount() })} - - + const items = new ItemList(); + const active = !poll.hasEnded(); + const activeView = poll.endDate() + ? [ + icon('fas fa-clock'), + ' ', + active ? t('fof-polls.forum.days_remaining', { time: dayjs(poll.endDate()).fromNow() }) : t('fof-polls.forum.poll_ended'), + ] + : icon('fas fa-om'); + + items.add('active', {activeView}); + + items.add( + 'discussion-count', +
    + {icon('fas fa-poll fa-fw')} + {[ + ' ', + t('fof-user-directory.forum.page.usercard.discussion-count', { + count: abbreviateNumber(poll.voteCount()), + }), + ]} +
    , + 70 ); + + return items; } } diff --git a/js/src/forum/components/Poll/PollOption.tsx b/js/src/forum/components/Poll/PollOption.tsx index 4e3a3257..4ab3c97a 100644 --- a/js/src/forum/components/Poll/PollOption.tsx +++ b/js/src/forum/components/Poll/PollOption.tsx @@ -1,14 +1,20 @@ -import * as Mithril from 'mithril'; -import Component from 'flarum/common/Component'; +import Mithril from 'mithril'; +import Component, { ComponentAttrs } from 'flarum/common/Component'; import PollOptionLabel from './PollOptionLabel'; import PollOptionInput from './PollOptionInput'; +import PollOptionModel from '../../models/PollOption'; -export default class PollOption extends Component { +interface PollOptionAttrs extends ComponentAttrs { + option: PollOptionModel; + onchange: (e: Event) => void; +} + +export default class PollOption extends Component { view(): Mithril.Children { const option = this.attrs.option; return (