diff --git a/extensions/mentions/js/forum/dist/extension.js b/extensions/mentions/js/forum/dist/extension.js index 22a836ac1..cbcb66b65 100644 --- a/extensions/mentions/js/forum/dist/extension.js +++ b/extensions/mentions/js/forum/dist/extension.js @@ -129,15 +129,10 @@ if (typeof module != 'undefined' && typeof module.exports != 'undefined') { }()); ; -System.register('flarum/mentions/addComposerAutocomplete', ['flarum/extend', 'flarum/components/ComposerBody', 'flarum/helpers/avatar', 'flarum/helpers/username', 'flarum/helpers/highlight', 'flarum/utils/string', 'flarum/mentions/components/AutocompleteDropdown'], function (_export) { - /*global getCaretCoordinates*/ - - 'use strict'; +'use strict'; +System.register('flarum/mentions/addComposerAutocomplete', ['flarum/extend', 'flarum/components/ComposerBody', 'flarum/helpers/avatar', 'flarum/helpers/username', 'flarum/helpers/highlight', 'flarum/utils/string', 'flarum/mentions/components/AutocompleteDropdown'], function (_export, _context) { var extend, ComposerBody, avatar, usernameHelper, highlight, truncate, AutocompleteDropdown; - - _export('default', addComposerAutocomplete); - function addComposerAutocomplete() { extend(ComposerBody.prototype, 'config', function (original, isInitialized) { if (isInitialized) return; @@ -147,9 +142,9 @@ System.register('flarum/mentions/addComposerAutocomplete', ['flarum/extend', 'fl var dropdown = new AutocompleteDropdown({ items: [] }); var $textarea = this.$('textarea').wrap('
'); var searched = []; - var mentionStart = undefined; - var typed = undefined; - var searchTimeout = undefined; + var mentionStart = void 0; + var typed = void 0; + var searchTimeout = void 0; var applySuggestion = function applySuggestion(replacement) { var insert = replacement + ' '; @@ -205,10 +200,10 @@ System.register('flarum/mentions/addComposerAutocomplete', ['flarum/extend', 'fl return m( 'button', { className: 'PostPreview ' + className, - onclick: function () { + onclick: function onclick() { return applySuggestion(replacement); }, - onmouseenter: function () { + onmouseenter: function onmouseenter() { dropdown.setIndex($(this).parent().index()); } }, m( @@ -264,16 +259,16 @@ System.register('flarum/mentions/addComposerAutocomplete', ['flarum/extend', 'fl var coordinates = getCaretCoordinates(_this, mentionStart); var width = dropdown.$().outerWidth(); var height = dropdown.$().outerHeight(); - var _parent = dropdown.$().offsetParent(); + var parent = dropdown.$().offsetParent(); var left = coordinates.left; - var _top = coordinates.top + 15; - if (_top + height > _parent.height()) { - _top = coordinates.top - height - 15; + var top = coordinates.top + 15; + if (top + height > parent.height()) { + top = coordinates.top - height - 15; } - if (left + width > _parent.width()) { - left = _parent.width() - width; + if (left + width > parent.width()) { + left = parent.width() - width; } - dropdown.show(left, _top); + dropdown.show(left, top); } }; @@ -301,32 +296,33 @@ System.register('flarum/mentions/addComposerAutocomplete', ['flarum/extend', 'fl }); } + _export('default', addComposerAutocomplete); + return { setters: [function (_flarumExtend) { + /*global getCaretCoordinates*/ + extend = _flarumExtend.extend; }, function (_flarumComponentsComposerBody) { - ComposerBody = _flarumComponentsComposerBody['default']; + ComposerBody = _flarumComponentsComposerBody.default; }, function (_flarumHelpersAvatar) { - avatar = _flarumHelpersAvatar['default']; + avatar = _flarumHelpersAvatar.default; }, function (_flarumHelpersUsername) { - usernameHelper = _flarumHelpersUsername['default']; + usernameHelper = _flarumHelpersUsername.default; }, function (_flarumHelpersHighlight) { - highlight = _flarumHelpersHighlight['default']; + highlight = _flarumHelpersHighlight.default; }, function (_flarumUtilsString) { truncate = _flarumUtilsString.truncate; }, function (_flarumMentionsComponentsAutocompleteDropdown) { - AutocompleteDropdown = _flarumMentionsComponentsAutocompleteDropdown['default']; + AutocompleteDropdown = _flarumMentionsComponentsAutocompleteDropdown.default; }], execute: function () {} }; });; -System.register('flarum/mentions/addMentionedByList', ['flarum/extend', 'flarum/Model', 'flarum/models/Post', 'flarum/components/CommentPost', 'flarum/components/PostPreview', 'flarum/helpers/punctuateSeries', 'flarum/helpers/username', 'flarum/helpers/icon'], function (_export) { - 'use strict'; +'use strict'; +System.register('flarum/mentions/addMentionedByList', ['flarum/extend', 'flarum/Model', 'flarum/models/Post', 'flarum/components/CommentPost', 'flarum/components/PostPreview', 'flarum/helpers/punctuateSeries', 'flarum/helpers/username', 'flarum/helpers/icon'], function (_export, _context) { var extend, Model, Post, CommentPost, PostPreview, punctuateSeries, username, icon; - - _export('default', addMentionedByList); - function addMentionedByList() { Post.prototype.mentionedBy = Model.hasMany('mentionedBy'); @@ -337,12 +333,12 @@ System.register('flarum/mentions/addMentionedByList', ['flarum/extend', 'flarum/ var replies = post.mentionedBy(); if (replies && replies.length) { - var _ret = (function () { + var _ret = function () { // If there is only one reply, and it's adjacent to this post, we don't // really need to show the list. if (replies.length === 1 && replies[0].number() === post.number() + 1) { return { - v: undefined + v: void 0 }; } @@ -356,7 +352,7 @@ System.register('flarum/mentions/addMentionedByList', ['flarum/extend', 'flarum/ if (isInitialized) return; var $this = $(element); - var timeout = undefined; + var timeout = void 0; var $preview = $('