From 20f6c33113c1bb6f142642241250be0ccbf3853a Mon Sep 17 00:00:00 2001 From: flarum-bot Date: Wed, 13 Feb 2019 19:09:47 +0000 Subject: [PATCH] Bundled output for commit 06b2968636581cffb56aa34cafeaf215fcd5c245 [skip ci] --- extensions/tags/js/dist/admin.js | 2 +- extensions/tags/js/dist/admin.js.map | 2 +- extensions/tags/js/dist/forum.js.map | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/tags/js/dist/admin.js b/extensions/tags/js/dist/admin.js index 4d0097f42..377683f6e 100644 --- a/extensions/tags/js/dist/admin.js +++ b/extensions/tags/js/dist/admin.js @@ -1,2 +1,2 @@ -module.exports=function(t){var a={};function n(e){if(a[e])return a[e].exports;var r=a[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,n),r.l=!0,r.exports}return n.m=t,n.c=a,n.d=function(t,a,e){n.o(t,a)||Object.defineProperty(t,a,{enumerable:!0,get:e})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,a){if(1&a&&(t=n(t)),8&a)return t;if(4&a&&"object"==typeof t&&t&&t.__esModule)return t;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:t}),2&a&&"string"!=typeof t)for(var r in t)n.d(e,r,function(a){return t[a]}.bind(null,r));return e},n.n=function(t){var a=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(a,"a",a),a},n.o=function(t,a){return Object.prototype.hasOwnProperty.call(t,a)},n.p="",n(n.s=49)}([function(t,a){t.exports=flarum.core.compat.Model},function(t,a){t.exports=flarum.core.compat.extend},function(t,a,n){"use strict";function e(t){return t.slice(0).sort(function(t,a){var n=t.position(),e=a.position();if(null===n&&null===e)return a.discussionCount()-t.discussionCount();if(null===e)return-1;if(null===n)return 1;var r=t.parent(),s=a.parent();return r===s?n-e:r&&s?r.position()-s.position():r?r===a?1:r.position()-e:s?s===t?-1:n-s.position():0})}n.d(a,"a",function(){return e})},function(t,a,n){"use strict";function e(t,a){t.prototype=Object.create(a.prototype),t.prototype.constructor=t,t.__proto__=a}n.d(a,"a",function(){return e})},function(t,a,n){"use strict";n.d(a,"a",function(){return s});var e=n(11),r=n.n(e);function s(t,a){void 0===a&&(a={}),a.style=a.style||{},a.className="TagLabel "+(a.className||"");var n=r()(a,"link");if(t){var e=t.color();e&&(a.style.backgroundColor=a.style.color=e,a.className+=" colored"),n&&(a.title=t.description()||"",a.href=app.route("tag",{tags:t.slug()}),a.config=m.route)}else a.className+=" untagged";return m(n?"a":"span",a,m("span",{className:"TagLabel-text"},t?t.name():app.translator.trans("flarum-tags.lib.deleted_tag_text")))}},,function(t,a,n){"use strict";function e(t,a){return void 0===a&&(a={}),a.className="icon TagIcon "+(a.className||""),t?(a.style=a.style||{},a.style.backgroundColor=t.color()):a.className+=" untagged",m("span",a)}n.d(a,"a",function(){return e})},function(t,a,n){"use strict";n.d(a,"a",function(){return o});var e=n(11),r=n.n(e),s=n(4),i=n(2);function o(t,a){void 0===a&&(a={});var n=[],e=r()(a,"link");return a.className="TagsLabel "+(a.className||""),t?Object(i.a)(t).forEach(function(a){(a||1===t.length)&&n.push(Object(s.a)(a,{link:e}))}):n.push(Object(s.a)()),m("span",a,n)}},function(t,a){t.exports=flarum.core.compat["components/Button"]},function(t,a,n){"use strict";function e(){return(e=Object.assign||function(t){for(var a=1;a li").map(function(){return{id:$(this).data("id"),children:$(this).find("li").map(function(){return $(this).data("id")}).get()}}).get();e.forEach(function(t,a){var n=app.store.getById("tags",t.id);n.pushData({attributes:{position:a,isChild:!1},relationships:{parent:null}}),t.children.forEach(function(t,a){app.store.getById("tags",t).pushData({attributes:{position:a,isChild:!0},relationships:{parent:n}})})}),app.request({url:app.forum.attribute("apiUrl")+"/tags/order",method:"POST",data:{order:e}}),m.redraw.strategy("all"),m.redraw()})},a}(C.a),B=function(){app.routes.tags={path:"/tags",component:F.component()},app.extensionSettings["flarum-tags"]=function(){return m.route(app.route("tags"))},Object(s.extend)(x.a.prototype,"items",function(t){t.add("tags",T.a.component({href:app.route("tags"),icon:"fas fa-tags",children:app.translator.trans("flarum-tags.admin.nav.tags_button"),description:app.translator.trans("flarum-tags.admin.nav.tags_text")}))})},L=n(46),H=n.n(L),W=function(){Object(s.extend)(H.a.prototype,"homePageItems",function(t){t.add("tags",{path:"/tags",label:app.translator.trans("flarum-tags.admin.basics.tags_label")})})},R=n(47),q=n.n(R),G=function(){Object(s.extend)(o.a.prototype,"startItems",function(t){t.add("allowTagChange",{icon:"fas fa-tag",label:app.translator.trans("flarum-tags.admin.permissions.allow_edit_tags_label"),setting:function(){var t=parseInt(app.data.settings.allow_tag_change,10);return q.a.component({defaultLabel:t?app.translator.transChoice("core.admin.permissions_controls.allow_some_minutes_button",t,{count:t}):app.translator.trans("core.admin.permissions_controls.allow_indefinitely_button"),key:"allow_tag_change",options:[{value:"-1",label:app.translator.trans("core.admin.permissions_controls.allow_indefinitely_button")},{value:"10",label:app.translator.trans("core.admin.permissions_controls.allow_ten_minutes_button")},{value:"reply",label:app.translator.trans("core.admin.permissions_controls.allow_until_reply_button")}]})}},90)})},U=n(19),Y=Object(e.a)(U.a,{"tags/addTagsHomePageOption":W,"tags/addTagChangePermission":G,"tags/addTagsPane":B,"tags/components/TagSettingsModal":S,"tags/components/TagsPage":F,"tags/components/EditTagModal":k,"tags/addTagPermission":_,"tags/addTagsPermissionScope":v}),z=n(20);app.initializers.add("flarum-tags",function(t){t.store.models.tags=r.a,v(),_(),B(),W(),G()}),Object(e.a)(z.compat,Y)},,,,,,,,,,,,,function(t,a){t.exports=flarum.core.compat["components/PermissionDropdown"]},function(t,a){t.exports=flarum.core.compat["components/Dropdown"]},function(t,a){t.exports=flarum.core.compat["components/AdminNav"]},function(t,a){t.exports=flarum.core.compat["components/AdminLinkButton"]},function(t,a){t.exports=flarum.core.compat["utils/ItemList"]},function(t,a){t.exports=flarum.core.compat["utils/string"]},function(t,a){t.exports=flarum.core.compat["components/SettingsModal"]},function(t,a){t.exports=flarum.core.compat["components/BasicsPage"]},function(t,a){t.exports=flarum.core.compat["components/SettingDropdown"]},,function(t,a,n){"use strict";n.r(a);var e=n(14);for(var r in e)"default"!==r&&function(t){n.d(a,t,function(){return e[t]})}(r);n(26)},function(t,a,n){var e,r,s;r=[n(51)],void 0===(s="function"==typeof(e=function(t){"use strict";var a,n,e=t(),r=[],s=function(t){t.off("dragstart.h5s"),t.off("dragend.h5s"),t.off("selectstart.h5s"),t.off("dragover.h5s"),t.off("dragenter.h5s"),t.off("drop.h5s")},i=function(t){t.off("dragover.h5s"),t.off("dragenter.h5s"),t.off("drop.h5s")},o=function(t,a){t.dataTransfer.effectAllowed="move",t.dataTransfer.setData("text",""),t.dataTransfer.setDragImage&&t.dataTransfer.setDragImage(a.item,a.x,a.y)},l=function(t,a){var n=function(t){return{item:t[0],draggedItem:t}}(a);n=function(t,a){return a.x||(a.x=parseInt(t.pageX-a.draggedItem.offset().left)),a.y||(a.y=parseInt(t.pageY-a.draggedItem.offset().top)),a}(t,n),o(t,n)},u=function(t,a){return t[0]===a[0]||void 0!==t.data("connectWith")&&t.data("connectWith")===a.data("connectWith")},c=function(a){var n=a.data("opts"),e=a.children(n.items),r=n.handle?e.find(n.handle):e;a.attr("aria-dropeffect","move"),r.attr("draggable","true"),"function"!=typeof document.createElement("span").dragDrop||n.disableIEFix||r.on("mousedown.h5s",function(){-1!==e.index(this)?this.dragDrop():t(this).parents(n.items)[0].dragDrop()})},d=function(p,m){var g=t(p),f=String(m);return m=t.extend({connectWith:!1,placeholder:null,dragImage:null,disableIEFix:!1,placeholderClass:"sortable-placeholder",draggingClass:"sortable-dragging"},m),g.each(function(){var p=t(this);if(/enable|disable|destroy/.test(f))d[f](p);else{m=function(t,a){return void 0===t?a:t}(p.data("opts"),m),p.data("opts",m),function(t){var a=t.data("opts"),n=t.children(a.items),e=a.handle?n.find(a.handle):n;s(n),e.off("mousedown.h5s"),i(t)}(p);var g,h,b,v=p.children(m.items),_=null===m.placeholder?t("<"+(/^ul|ol$/i.test(this.tagName)?"li":"div")+' class="'+m.placeholderClass+'"/>'):t(m.placeholder).addClass(m.placeholderClass);if(!p.attr("data-sortable-id")){var y=r.length;r[y]=p,p.attr("data-sortable-id",y),v.attr("data-item-sortable-id",y)}p.data("items",m.items),e=e.add(_),m.connectWith&&p.data("connectWith",m.connectWith),c(p),v.attr("role","option"),v.attr("aria-grabbed","false"),v.on("dragstart.h5s",function(e){e.stopImmediatePropagation(),m.dragImage?(o(e.originalEvent,{item:m.dragImage,x:0,y:0}),console.log("WARNING: dragImage option is deprecated and will be removed in the future!")):l(e.originalEvent,t(this),m.dragImage),(a=t(this)).addClass(m.draggingClass),a.attr("aria-grabbed","true"),g=a.index(),n=a.height(),h=t(this).parent(),a.parent().triggerHandler("sortstart",{item:a,startparent:h})}),v.on("dragend.h5s",function(){a&&(a.removeClass(m.draggingClass),a.attr("aria-grabbed","false"),a.show(),e.detach(),b=t(this).parent(),a.parent().triggerHandler("sortstop",{item:a,startparent:h}),g===a.index()&&h.get(0)===b.get(0)||a.parent().triggerHandler("sortupdate",{item:a,index:b.children(b.data("items")).index(a),oldindex:v.index(a),elementIndex:a.index(),oldElementIndex:g,startparent:h,endparent:b}),a=null,n=null)}),t(this).add([_]).on("drop.h5s",function(n){if(u(p,t(a).parent()))return n.stopPropagation(),e.filter(":visible").after(a),a.trigger("dragend.h5s"),!1}),v.add([this,_]).on("dragover.h5s dragenter.h5s",function(r){if(u(p,t(a).parent())){if(r.preventDefault(),r.originalEvent.dataTransfer.dropEffect="move",v.is(this)){var s=t(this).height();if(m.forcePlaceholderSize&&_.height(n),s>n){var i=s-n,o=t(this).offset().top;if(_.index()t(this).index()&&r.originalEvent.pageY>o+s-i)return!1}a.hide(),_.index() li").map(function(){return{id:$(this).data("id"),children:$(this).find("li").map(function(){return $(this).data("id")}).get()}}).get();a.forEach(function(t,e){var n=app.store.getById("tags",t.id);n.pushData({attributes:{position:e,isChild:!1},relationships:{parent:null}}),t.children.forEach(function(t,e){app.store.getById("tags",t).pushData({attributes:{position:e,isChild:!0},relationships:{parent:n}})})}),app.request({url:app.forum.attribute("apiUrl")+"/tags/order",method:"POST",data:{order:a}}),m.redraw.strategy("all"),m.redraw()})},e}(C.a),F=function(){app.routes.tags={path:"/tags",component:H.component()},app.extensionSettings["flarum-tags"]=function(){return m.route(app.route("tags"))},Object(o.extend)(_.a.prototype,"items",function(t){t.add("tags",T.a.component({href:app.route("tags"),icon:"fas fa-tags",children:app.translator.trans("flarum-tags.admin.nav.tags_button"),description:app.translator.trans("flarum-tags.admin.nav.tags_text")}))})},k=n(46),B=n.n(k),Y=function(){Object(o.extend)(B.a.prototype,"homePageItems",function(t){t.add("tags",{path:"/tags",label:app.translator.trans("flarum-tags.admin.basics.tags_label")})})},q=n(47),W=n.n(q),R=function(){Object(o.extend)(s.a.prototype,"startItems",function(t){t.add("allowTagChange",{icon:"fas fa-tag",label:app.translator.trans("flarum-tags.admin.permissions.allow_edit_tags_label"),setting:function(){var t=parseInt(app.data.settings.allow_tag_change,10);return W.a.component({defaultLabel:t?app.translator.transChoice("core.admin.permissions_controls.allow_some_minutes_button",t,{count:t}):app.translator.trans("core.admin.permissions_controls.allow_indefinitely_button"),key:"allow_tag_change",options:[{value:"-1",label:app.translator.trans("core.admin.permissions_controls.allow_indefinitely_button")},{value:"10",label:app.translator.trans("core.admin.permissions_controls.allow_ten_minutes_button")},{value:"reply",label:app.translator.trans("core.admin.permissions_controls.allow_until_reply_button")}]})}},90)})},z=n(19),X=Object(a.a)(z.a,{"tags/addTagsHomePageOption":Y,"tags/addTagChangePermission":R,"tags/addTagsPane":F,"tags/components/TagSettingsModal":S,"tags/components/TagsPage":H,"tags/components/EditTagModal":I,"tags/addTagPermission":y,"tags/addTagsPermissionScope":b}),U=n(20);app.initializers.add("flarum-tags",function(t){t.store.models.tags=r.a,b(),y(),F(),Y(),R()}),Object(a.a)(U.compat,X)},,,,,,,,,,,,,function(t,e){t.exports=flarum.core.compat["components/PermissionDropdown"]},function(t,e){t.exports=flarum.core.compat["components/Dropdown"]},function(t,e){t.exports=flarum.core.compat["components/AdminNav"]},function(t,e){t.exports=flarum.core.compat["components/AdminLinkButton"]},function(t,e){t.exports=flarum.core.compat["utils/ItemList"]},function(t,e){t.exports=flarum.core.compat["utils/string"]},function(t,e){t.exports=flarum.core.compat["components/SettingsModal"]},function(t,e){t.exports=flarum.core.compat["components/BasicsPage"]},function(t,e){t.exports=flarum.core.compat["components/SettingDropdown"]},,function(t,e,n){"use strict";n.r(e);var a=n(14);for(var r in a)"default"!==r&&function(t){n.d(e,t,function(){return a[t]})}(r);n(26)},function(t,e){!function(){"use strict";function t(t,e,n){if(void 0===n)return t&&t.h5s&&t.h5s.data&&t.h5s.data[e];t.h5s=t.h5s||{},t.h5s.data=t.h5s.data||{},t.h5s.data[e]=n}function e(t,e){if(!(t instanceof NodeList||t instanceof HTMLCollection||t instanceof Array))throw new Error("You must provide a nodeList/HTMLCollection/Array of elements to be filtered.");return"string"!=typeof e?Array.from(t):Array.from(t).filter(function(t){return 1===t.nodeType&&t.matches(e)})}var n=new Map,a=function(){function t(){this._config=new Map,this._placeholder=void 0,this._data=new Map}return Object.defineProperty(t.prototype,"config",{get:function(){var t={};return this._config.forEach(function(e,n){t[n]=e}),t},set:function(t){if("object"!=typeof t)throw new Error("You must provide a valid configuration object to the config setter.");var e=Object.assign({},t);this._config=new Map(Object.entries(e))},enumerable:!0,configurable:!0}),t.prototype.setConfig=function(t,e){if(!this._config.has(t))throw new Error("Trying to set invalid configuration item: "+t);this._config.set(t,e)},t.prototype.getConfig=function(t){if(!this._config.has(t))throw new Error("Invalid configuration item requested: "+t);return this._config.get(t)},Object.defineProperty(t.prototype,"placeholder",{get:function(){return this._placeholder},set:function(t){if(!(t instanceof HTMLElement)&&null!==t)throw new Error("A placeholder must be an html element or null.");this._placeholder=t},enumerable:!0,configurable:!0}),t.prototype.setData=function(t,e){if("string"!=typeof t)throw new Error("The key must be a string.");this._data.set(t,e)},t.prototype.getData=function(t){if("string"!=typeof t)throw new Error("The key must be a string.");return this._data.get(t)},t.prototype.deleteData=function(t){if("string"!=typeof t)throw new Error("The key must be a string.");return this._data.delete(t)},t}();function r(t){if(!(t instanceof HTMLElement))throw new Error("Please provide a sortable to the store function.");return n.has(t)||n.set(t,new a),n.get(t)}function o(t,e,n){if(t instanceof Array)for(var a=0;a0&&e.matches(t)}).length>0;if(t===e)return!0;if(void 0!==r(t).getConfig("connectWith")&&null!==r(t).getConfig("connectWith"))return r(t).getConfig("connectWith")===r(e).getConfig("connectWith")}return!1}var y,w,_,E,T,x,N,C={items:null,connectWith:null,disableIEFix:null,acceptFrom:null,copy:!1,placeholder:null,placeholderClass:"sortable-placeholder",draggingClass:"sortable-dragging",hoverClass:!1,debounce:0,throttleTime:100,maxItems:0,itemSerializer:void 0,containerSerializer:void 0,customDragImage:null};function O(t,n){if("string"==typeof r(t).getConfig("hoverClass")){var a=r(t).getConfig("hoverClass").split(" ");!0===n?(o(t,"mousemove",function(t,e){var n=this;if(void 0===e&&(e=250),"function"!=typeof t)throw new Error("You must provide a function as the first argument for throttle.");if("number"!=typeof e)throw new Error("You must provide a number as the second argument for throttle.");var a=null;return function(){for(var r=[],o=0;o=e)&&(a=i,t.apply(n,r))}}(function(n){0===n.buttons&&e(t.children,r(t).getConfig("items")).forEach(function(t){var e,r;t!==n.target?(e=t.classList).remove.apply(e,a):(r=t.classList).add.apply(r,a)})},r(t).getConfig("throttleTime"))),o(t,"mouseleave",function(){e(t.children,r(t).getConfig("items")).forEach(function(t){var e;(e=t.classList).remove.apply(e,a)})})):(i(t,"mousemove"),i(t,"mouseleave"))}}var L=function(t){i(t,"dragstart"),i(t,"dragend"),i(t,"dragover"),i(t,"dragenter"),i(t,"drop"),i(t,"mouseenter"),i(t,"mouseleave")},M=function(t,e){var n=t;return!0===r(e).getConfig("copy")&&(s(n=t.cloneNode(!0),"aria-copied","true"),t.parentElement.appendChild(n),n.style.display="none",n.oldDisplay=t.style.display),n};function D(t){for(;!0!==t.isSortable;)t=t.parentElement;return t}function j(n,a){var r=t(n,"opts"),o=e(n.children,r.items).filter(function(t){return t.contains(a)});return o.length>0?o[0]:a}var I=function(n){var a,r,o=t(n,"opts")||{},s=e(n.children,o.items),c=h(s,o.handle);i(n,"dragover"),i(n,"dragenter"),i(n,"drop"),(r=a=n).h5s&&delete r.h5s.data,l(a,"aria-dropeffect"),i(c,"mousedown"),L(s),function(t){l(t,"aria-grabbed"),l(t,"aria-copied"),l(t,"draggable"),l(t,"role")}(s)},A=function(n){var a=t(n,"opts"),r=e(n.children,a.items),i=h(r,a.handle);(s(n,"aria-dropeffect","move"),t(n,"_disabled","false"),s(i,"draggable","true"),!1===a.disableIEFix)&&("function"==typeof(document||window.document).createElement("span").dragDrop&&o(i,"mousedown",function(){if(-1!==r.indexOf(this))this.dragDrop();else{for(var t=this.parentElement;-1===r.indexOf(t);)t=t.parentElement;t.dragDrop()}}))},S=function(n){var a=t(n,"opts"),r=e(n.children,a.items),o=h(r,a.handle);t(n,"_disabled","false"),L(r),i(o,"mousedown"),i(n,"dragover"),i(n,"dragenter"),i(n,"drop")};function P(a,i){var l=String(i);return i=i||{},"string"==typeof a&&(a=document.querySelectorAll(a)),a instanceof HTMLElement&&(a=[a]),a=Array.prototype.slice.call(a),/serialize/.test(l)?a.map(function(n){var a=t(n,"opts");return function(n,a,r){if(void 0===a&&(a=function(t,e){return t}),void 0===r&&(r=function(t){return t}),!(n instanceof HTMLElement)||1==!n.isSortable)throw new Error("You need to provide a sortableContainer to be serialized.");if("function"!=typeof a||"function"!=typeof r)throw new Error("You need to provide a valid serializer for items and the container.");var o=t(n,"opts").items,i=e(n.children,o),s=i.map(function(t){return{parent:n,node:t,html:t.outerHTML,index:u(t,i)}});return{container:r({node:n,itemCount:s.length}),items:s.map(function(t){return a(t,n)})}}(n,a.itemSerializer,a.containerSerializer)}):(a.forEach(function(a){if(/enable|disable|destroy/.test(l))return P[l](a);["connectWith","disableIEFix"].forEach(function(t){i.hasOwnProperty(t)&&null!==i[t]&&console.warn('HTML5Sortable: You are using the deprecated configuration "'+t+'". This will be removed in an upcoming version, make sure to migrate to the new options when updating.')}),i=Object.assign({},C,r(a).config,i),r(a).config=i,t(a,"opts",i),a.isSortable=!0,S(a);var d,h=e(a.children,i.items);if(null!==i.placeholder&&void 0!==i.placeholder){var L=document.createElement(a.tagName);L.innerHTML=i.placeholder,d=L.children[0]}r(a).placeholder=function(t,e,n){if(void 0===n&&(n="sortable-placeholder"),!(t instanceof HTMLElement))throw new Error("You must provide a valid element as a sortable.");if(!(e instanceof HTMLElement)&&void 0!==e)throw new Error("You must provide a valid element as a placeholder or set ot to undefined.");return void 0===e&&(["UL","OL"].includes(t.tagName)?e=document.createElement("li"):["TABLE","TBODY"].includes(t.tagName)?(e=document.createElement("tr")).innerHTML='':e=document.createElement("div")),"string"==typeof n&&(a=e.classList).add.apply(a,n.split(" ")),e;var a}(a,d,i.placeholderClass),t(a,"items",i.items),i.acceptFrom?t(a,"acceptFrom",i.acceptFrom):i.connectWith&&t(a,"connectWith",i.connectWith),A(a),s(h,"role","option"),s(h,"aria-grabbed","false"),O(a,!0),o(a,"dragstart",function(t){if(!0!==t.target.isSortable&&(t.stopImmediatePropagation(),(!i.handle||t.target.matches(i.handle))&&"false"!==t.target.getAttribute("draggable"))){var n=D(t.target),a=j(n,t.target);x=e(n.children,i.items),E=x.indexOf(a),T=u(a,n.children),_=n,function(t,e,n){if(!(t instanceof Event))throw new Error("setDragImage requires a DragEvent as the first argument.");if(!(e instanceof HTMLElement))throw new Error("setDragImage requires the dragged element as the second argument.");if(n||(n=v),t.dataTransfer&&t.dataTransfer.setDragImage){var a=n(e,c(e),t);if(!(a.element instanceof HTMLElement)||"number"!=typeof a.posX||"number"!=typeof a.posY)throw new Error("The customDragImage function you provided must return and object with the properties element[string], posX[integer], posY[integer].");t.dataTransfer.effectAllowed="copyMove",t.dataTransfer.setData("text/plain",t.target.id),t.dataTransfer.setDragImage(a.element,a.posX,a.posY)}}(t,a,i.customDragImage),w=g(a),a.classList.add(i.draggingClass),s(y=M(a,n),"aria-grabbed","true"),n.dispatchEvent(new CustomEvent("sortstart",{detail:{origin:{elementIndex:T,index:E,container:_},item:y}}))}}),o(a,"dragenter",function(n){if(!0!==n.target.isSortable){var o=D(n.target);N=e(o.children,t(o,"items")).filter(function(t){return t!==r(a).placeholder})}}),o(a,"dragend",function(e){if(y){y.classList.remove(i.draggingClass),s(y,"aria-grabbed","false"),"true"===y.getAttribute("aria-copied")&&"true"!==t(y,"dropped")&&y.remove(),y.style.display=y.oldDisplay,delete y.oldDisplay;var r=Array.from(n.values()).map(function(t){return t.placeholder}).filter(function(t){return t instanceof HTMLElement}).filter(p)[0];r&&r.remove(),a.dispatchEvent(new CustomEvent("sortstop",{detail:{origin:{elementIndex:T,index:E,container:_},item:y}})),y=null,w=null}}),o(a,"drop",function(o){if(b(a,y.parentElement)){o.preventDefault(),o.stopPropagation(),t(y,"dropped","true");var s=Array.from(n.values()).map(function(t){return t.placeholder}).filter(function(t){return t instanceof HTMLElement}).filter(p)[0];f(s,y),s.remove(),a.dispatchEvent(new CustomEvent("sortstop",{detail:{origin:{elementIndex:T,index:E,container:_},item:y}}));var l=r(a).placeholder,c=e(_.children,i.items).filter(function(t){return t!==l}),d=!0===this.isSortable?this:this.parentElement,m=e(d.children,t(d,"items")).filter(function(t){return t!==l}),g=u(y,Array.from(y.parentElement.children).filter(function(t){return t!==l})),h=u(y,m);T===g&&_===d||a.dispatchEvent(new CustomEvent("sortupdate",{detail:{origin:{elementIndex:T,index:E,container:_,itemsBeforeUpdate:x,items:c},destination:{index:h,elementIndex:g,container:d,itemsBeforeUpdate:N,items:m},item:y}}))}});var I,H,F,k=(I=function(t,a,o){if(y)if(i.forcePlaceholderSize&&(r(t).placeholder.style.height=w+"px"),Array.from(t.children).indexOf(a)>-1){var s=g(a),l=u(r(t).placeholder,a.parentElement.children),p=u(a,a.parentElement.children);if(s>w){var d=s-w,h=c(a).top;if(lp&&o>h+s-d)return}void 0===y.oldDisplay&&(y.oldDisplay=y.style.display),"none"!==y.style.display&&(y.style.display="none");var v=!1;try{v=o>=c(a).top+a.offsetHeight/2}catch(t){v=l=parseInt(i.maxItems)&&y.parentElement!==o||(n.preventDefault(),n.stopPropagation(),n.dataTransfer.dropEffect=!0===r(o).getConfig("copy")?"copy":"move",k(o,a,n.pageY))}};o(h.concat(a),"dragover",B),o(h.concat(a),"dragenter",B)}),a)}P.destroy=function(t){I(t)},P.enable=function(t){A(t)},P.disable=function(n){!function(n){var a=t(n,"opts"),r=h(e(n.children,a.items),a.handle);s(n,"aria-dropeffect","none"),t(n,"_disabled","true"),s(r,"draggable","false"),i(r,"mousedown")}(n)}}()}]); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/extensions/tags/js/dist/admin.js.map b/extensions/tags/js/dist/admin.js.map index b24707522..febbf0467 100644 --- a/extensions/tags/js/dist/admin.js.map +++ b/extensions/tags/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack://@flarum/tags/webpack/bootstrap","webpack://@flarum/tags/external \"flarum.core.compat['Model']\"","webpack://@flarum/tags/external \"flarum.core.compat['extend']\"","webpack://@flarum/tags/./src/common/utils/sortTags.js","webpack://@flarum/tags/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@flarum/tags/./src/common/helpers/tagLabel.js","webpack://@flarum/tags/./src/common/helpers/tagIcon.js","webpack://@flarum/tags/./src/common/helpers/tagsLabel.js","webpack://@flarum/tags/external \"flarum.core.compat['components/Button']\"","webpack://@flarum/tags/./node_modules/@babel/runtime/helpers/esm/extends.js","webpack://@flarum/tags/./src/common/models/Tag.js","webpack://@flarum/tags/external \"flarum.core.compat['utils/extract']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/PermissionGrid']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/mixin']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/computed']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Page']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Modal']\"","webpack://@flarum/tags/./src/common/compat.js","webpack://@flarum/tags/external \"flarum.core\"","webpack://@flarum/tags/./src/admin/addTagsPermissionScope.js","webpack://@flarum/tags/./src/admin/addTagPermission.js","webpack://@flarum/tags/./src/admin/components/EditTagModal.js","webpack://@flarum/tags/./src/admin/components/TagSettingsModal.js","webpack://@flarum/tags/./src/admin/components/TagsPage.js","webpack://@flarum/tags/./src/admin/addTagsPane.js","webpack://@flarum/tags/./src/admin/addTagsHomePageOption.js","webpack://@flarum/tags/./src/admin/addTagChangePermission.js","webpack://@flarum/tags/./src/admin/compat.js","webpack://@flarum/tags/./src/admin/index.js","webpack://@flarum/tags/external \"flarum.core.compat['components/PermissionDropdown']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/Dropdown']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/AdminNav']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/AdminLinkButton']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/ItemList']\"","webpack://@flarum/tags/external \"flarum.core.compat['utils/string']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/SettingsModal']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/BasicsPage']\"","webpack://@flarum/tags/external \"flarum.core.compat['components/SettingDropdown']\"","webpack://@flarum/tags/./admin.js","webpack://@flarum/tags/./node_modules/html5sortable/dist/html.sortable.js","webpack://@flarum/tags/external \"jQuery\""],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","flarum","core","compat","sortTags","tags","slice","sort","a","b","aPos","position","bPos","discussionCount","aParent","parent","bParent","__webpack_exports__","_inheritsLoose","subClass","superClass","constructor","__proto__","tagLabel","flarum_utils_extract__WEBPACK_IMPORTED_MODULE_0__","flarum_utils_extract__WEBPACK_IMPORTED_MODULE_0___default","tag","attrs","style","className","link","extract","color","backgroundColor","title","description","href","app","route","slug","config","translator","trans","tagIcon","tagsLabel","_tagLabel__WEBPACK_IMPORTED_MODULE_1__","_utils_sortTags__WEBPACK_IMPORTED_MODULE_2__","children","forEach","length","push","_extends","assign","target","arguments","source","apply","this","Tag","mixin","Model","attribute","backgroundUrl","backgroundMode","hasOne","defaultSort","isChild","isHidden","lastPostedAt","transformDate","lastPostedDiscussion","isRestricted","canStartDiscussion","canAddToDiscussion","isPrimary","computed","_utils_sortTags__WEBPACK_IMPORTED_MODULE_0__","_models_Tag__WEBPACK_IMPORTED_MODULE_1__","_helpers_tagsLabel__WEBPACK_IMPORTED_MODULE_2__","_helpers_tagIcon__WEBPACK_IMPORTED_MODULE_3__","_helpers_tagLabel__WEBPACK_IMPORTED_MODULE_4__","tags/utils/sortTags","tags/models/Tag","tags/helpers/tagsLabel","tags/helpers/tagIcon","tags/helpers/tagLabel","addTagsPermissionScope","override","original","permission","tagPrefix","match","substr","map","required","extend","PermissionGrid","items","store","all","filter","add","id","label","onremove","save","render","item","indexOf","PermissionDropdown","component","allowGuest","Dropdown","buttonClassName","icon","caretIcon","Button","onclick","addTagPermission","EditTagModal","init","_Modal","props","createRecord","prop","content","fields","toArray","_this","ItemList","placeholder","oninput","e","withAttr","type","checked","onchange","loading","exists","delete","submitData","onsubmit","_this2","preventDefault","then","hide","response","handleErrors","_this3","confirm","pushData","attributes","relationships","redraw","Modal","TagSettingsModal","setMinTags","minTags","maxTags","Math","max","form","minPrimaryTags","setting","maxPrimaryTags","minSecondaryTags","maxSecondaryTags","min","bidi","SettingsModal","tagItem","data-id","modal","show","child","TagsPage","view","localeCompare","$","sortable","connectWith","on","ui","startparent","is","endparent","getById","data","order","find","j","request","url","forum","method","strategy","Page","addTagsPane","routes","path","extensionSettings","AdminNav","AdminLinkButton","addTagsHomePageOption","BasicsPage","addTagChangePermission","minutes","parseInt","settings","allow_tag_change","SettingDropdown","defaultLabel","transChoice","count","options","admin_compat","esm_extends","tags/addTagsHomePageOption","tags/addTagChangePermission","tags/addTagsPane","tags/components/TagSettingsModal","tags/components/TagsPage","tags/components/EditTagModal","tags/addTagPermission","tags/addTagsPermissionScope","initializers","models","tagsCompat","_src_common__WEBPACK_IMPORTED_MODULE_0__","__WEBPACK_IMPORT_KEY__","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_ARRAY__","__WEBPACK_AMD_DEFINE_RESULT__","undefined","dragging","draggingHeight","placeholders","sortables","_removeItemEvents","off","_removeSortableEvents","_attachGhost","event","ghost","dataTransfer","effectAllowed","setData","setDragImage","x","y","_getGhost","$draggedItem","draggedItem","_makeGhost","pageX","offset","left","pageY","top","_addGhostPos","_listsConnected","curList","destList","_enableSortable","opts","handles","handle","attr","document","createElement","dragDrop","disableIEFix","index","parents","selector","$sortables","String","dragImage","placeholderClass","draggingClass","each","$sortable","test","soptions","_getOptions","_reloadSortable","startParent","newParent","tagName","addClass","stopImmediatePropagation","originalEvent","console","log","height","triggerHandler","removeClass","detach","oldindex","elementIndex","oldElementIndex","stopPropagation","after","trigger","dropEffect","thisHeight","forcePlaceholderSize","deadZone","offsetTop","before","not","append","destroy","removeData","removeAttr","_removeSortableData","_removeItemData","_destroySortable","enable","disable","_disableSortable","fn","jQuery"],"mappings":"2BACA,IAAAA,EAAA,GAGA,SAAAC,EAAAC,GAGA,GAAAF,EAAAE,GACA,OAAAF,EAAAE,GAAAC,QAGA,IAAAC,EAAAJ,EAAAE,GAAA,CACAG,EAAAH,EACAI,GAAA,EACAH,QAAA,IAUA,OANAI,EAAAL,GAAAM,KAAAJ,EAAAD,QAAAC,IAAAD,QAAAF,GAGAG,EAAAE,GAAA,EAGAF,EAAAD,QA0DA,OArDAF,EAAAQ,EAAAF,EAGAN,EAAAS,EAAAV,EAGAC,EAAAU,EAAA,SAAAR,EAAAS,EAAAC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,SACAtI,EAAAuI,WAAA,mBAkCAC,CAAAxI,GAEAsF,EAAA1B,IAAA,iBACAD,EAAA7I,GA/BA,SAAAA,GACAA,EAAAyN,WAAA,gBACAzN,EAAAyN,WAAA,aACAzN,EAAAyN,WAAA,QA6BAE,CAAA3N,GA2OA4N,CAAA1I,IAGAA,EAAA2I,OAAA,SAAA3I,GACAoF,EAAApF,IAGAA,EAAA4I,QAAA,SAAA5I,IArNA,SAAAA,GACA,IAAAqF,EAAArF,EAAAQ,KAAA,QACA1F,EAAAkF,EAAApI,SAAAyN,EAAAvK,OACAwK,EAAAD,EAAAE,OAAAzK,EAAA4F,KAAA2E,EAAAE,QAAAzK,EACAkF,EAAAwF,KAAA,0BACAF,EAAAE,KAAA,gBACAF,EAAA1B,IAAA,iBAgNAiF,CAAA7I,IAGAD,EAAA+I,GAAA9I,SAAA,SAAAmC,GACA,OAAAnC,EAAA1H,KAAA6J,IAGAnC,IAzZ8BmD,EAAA9K,MAAAzF,EAAAwQ,GAAAD,KAAAtQ,EAAAD,QAAAyQ,kBCF9BxQ,EAAAD,QAAAmW","file":"admin.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 49);\n","module.exports = flarum.core.compat['Model'];","module.exports = flarum.core.compat['extend'];","export default function sortTags(tags) {\n return tags.slice(0).sort((a, b) => {\n const aPos = a.position();\n const bPos = b.position();\n\n // If they're both secondary tags, sort them by their discussions count,\n // descending.\n if (aPos === null && bPos === null)\n return b.discussionCount() - a.discussionCount();\n\n // If just one is a secondary tag, then the primary tag should\n // come first.\n if (bPos === null) return -1;\n if (aPos === null) return 1;\n\n // If we've made it this far, we know they're both primary tags. So we'll\n // need to see if they have parents.\n const aParent = a.parent();\n const bParent = b.parent();\n\n // If they both have the same parent, then their positions are local,\n // so we can compare them directly.\n if (aParent === bParent) return aPos - bPos;\n\n // If they are both child tags, then we will compare the positions of their\n // parents.\n else if (aParent && bParent)\n return aParent.position() - bParent.position();\n\n // If we are comparing a child tag with its parent, then we let the parent\n // come first. If we are comparing an unrelated parent/child, then we\n // compare both of the parents.\n else if (aParent)\n return aParent === b ? 1 : aParent.position() - bPos;\n\n else if (bParent)\n return bParent === a ? -1 : aPos - bParent.position();\n\n return 0;\n });\n}\n","export default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}","import extract from 'flarum/utils/extract';\n\nexport default function tagLabel(tag, attrs = {}) {\n attrs.style = attrs.style || {};\n attrs.className = 'TagLabel ' + (attrs.className || '');\n\n const link = extract(attrs, 'link');\n\n if (tag) {\n const color = tag.color();\n if (color) {\n attrs.style.backgroundColor = attrs.style.color = color;\n attrs.className += ' colored';\n }\n\n if (link) {\n attrs.title = tag.description() || '';\n attrs.href = app.route('tag', {tags: tag.slug()});\n attrs.config = m.route;\n }\n } else {\n attrs.className += ' untagged';\n }\n\n return (\n m((link ? 'a' : 'span'), attrs,\n \n {tag ? tag.name() : app.translator.trans('flarum-tags.lib.deleted_tag_text')}\n \n )\n );\n}\n","export default function tagIcon(tag, attrs = {}) {\n attrs.className = 'icon TagIcon ' + (attrs.className || '');\n\n if (tag) {\n attrs.style = attrs.style || {};\n attrs.style.backgroundColor = tag.color();\n } else {\n attrs.className += ' untagged';\n }\n\n return ;\n}\n","import extract from 'flarum/utils/extract';\nimport tagLabel from './tagLabel';\nimport sortTags from '../utils/sortTags';\n\nexport default function tagsLabel(tags, attrs = {}) {\n const children = [];\n const link = extract(attrs, 'link');\n\n attrs.className = 'TagsLabel ' + (attrs.className || '');\n\n if (tags) {\n sortTags(tags).forEach(tag => {\n if (tag || tags.length === 1) {\n children.push(tagLabel(tag, {link}));\n }\n });\n } else {\n children.push(tagLabel());\n }\n\n return {children};\n}\n","module.exports = flarum.core.compat['components/Button'];","export default function _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}","import Model from 'flarum/Model';\nimport mixin from 'flarum/utils/mixin';\nimport computed from 'flarum/utils/computed';\n\nexport default class Tag extends mixin(Model, {\n name: Model.attribute('name'),\n slug: Model.attribute('slug'),\n description: Model.attribute('description'),\n\n color: Model.attribute('color'),\n backgroundUrl: Model.attribute('backgroundUrl'),\n backgroundMode: Model.attribute('backgroundMode'),\n\n position: Model.attribute('position'),\n parent: Model.hasOne('parent'),\n defaultSort: Model.attribute('defaultSort'),\n isChild: Model.attribute('isChild'),\n isHidden: Model.attribute('isHidden'),\n\n discussionCount: Model.attribute('discussionCount'),\n lastPostedAt: Model.attribute('lastPostedAt', Model.transformDate),\n lastPostedDiscussion: Model.hasOne('lastPostedDiscussion'),\n\n isRestricted: Model.attribute('isRestricted'),\n canStartDiscussion: Model.attribute('canStartDiscussion'),\n canAddToDiscussion: Model.attribute('canAddToDiscussion'),\n\n isPrimary: computed('position', 'parent', (position, parent) => position !== null && parent === false)\n}) {}\n","module.exports = flarum.core.compat['utils/extract'];","module.exports = flarum.core.compat['components/PermissionGrid'];","module.exports = flarum.core.compat['utils/mixin'];","module.exports = flarum.core.compat['utils/computed'];","module.exports = flarum.core.compat['components/Page'];","module.exports = flarum.core.compat['components/Modal'];","import sortTags from './utils/sortTags';\nimport Tag from './models/Tag';\nimport tagsLabel from './helpers/tagsLabel';\nimport tagIcon from './helpers/tagIcon';\nimport tagLabel from './helpers/tagLabel';\n\nexport default {\n 'tags/utils/sortTags': sortTags,\n 'tags/models/Tag': Tag,\n 'tags/helpers/tagsLabel': tagsLabel,\n 'tags/helpers/tagIcon': tagIcon,\n 'tags/helpers/tagLabel': tagLabel\n};\n","module.exports = flarum.core;","import { extend, override } from 'flarum/extend';\nimport PermissionGrid from 'flarum/components/PermissionGrid';\nimport PermissionDropdown from 'flarum/components/PermissionDropdown';\nimport Dropdown from 'flarum/components/Dropdown';\nimport Button from 'flarum/components/Button';\n\nimport tagLabel from '../common/helpers/tagLabel';\nimport tagIcon from '../common/helpers/tagIcon';\nimport sortTags from '../common/utils/sortTags';\n\nexport default function() {\n override(app, 'getRequiredPermissions', (original, permission) => {\n const tagPrefix = permission.match(/^tag\\d+\\./);\n\n if (tagPrefix) {\n const globalPermission = permission.substr(tagPrefix[0].length);\n\n const required = original(globalPermission);\n\n return required.map(required => tagPrefix[0] + required);\n }\n\n return original(permission);\n });\n\n extend(PermissionGrid.prototype, 'scopeItems', items => {\n sortTags(app.store.all('tags'))\n .filter(tag => tag.isRestricted())\n .forEach(tag => items.add('tag' + tag.id(), {\n label: tagLabel(tag),\n onremove: () => tag.save({isRestricted: false}),\n render: item => {\n if (item.permission === 'viewDiscussions'\n || item.permission === 'startDiscussion'\n || (item.permission && item.permission.indexOf('discussion.') === 0)) {\n return PermissionDropdown.component({\n permission: 'tag' + tag.id() + '.' + item.permission,\n allowGuest: item.allowGuest\n });\n }\n\n return '';\n }\n }));\n });\n\n extend(PermissionGrid.prototype, 'scopeControlItems', items => {\n const tags = sortTags(app.store.all('tags').filter(tag => !tag.isRestricted()));\n\n if (tags.length) {\n items.add('tag', Dropdown.component({\n className: 'Dropdown--restrictByTag',\n buttonClassName: 'Button Button--text',\n label: app.translator.trans('flarum-tags.admin.permissions.restrict_by_tag_heading'),\n icon: 'fas fa-plus',\n caretIcon: null,\n children: tags.map(tag => Button.component({\n icon: true,\n children: [tagIcon(tag, {className: 'Button-icon'}), ' ', tag.name()],\n onclick: () => tag.save({isRestricted: true})\n }))\n }));\n }\n });\n}\n","import { extend } from 'flarum/extend';\nimport PermissionGrid from 'flarum/components/PermissionGrid';\n\nexport default function() {\n extend(PermissionGrid.prototype, 'moderateItems', items => {\n items.add('tag', {\n icon: 'fas fa-tag',\n label: app.translator.trans('flarum-tags.admin.permissions.tag_discussions_label'),\n permission: 'discussion.tag'\n }, 95);\n });\n}\n","import Modal from 'flarum/components/Modal';\nimport Button from 'flarum/components/Button';\nimport ItemList from 'flarum/utils/ItemList';\nimport { slug } from 'flarum/utils/string';\n\nimport tagLabel from '../../common/helpers/tagLabel';\n\n/**\n * The `EditTagModal` component shows a modal dialog which allows the user\n * to create or edit a tag.\n */\nexport default class EditTagModal extends Modal {\n init() {\n super.init();\n\n this.tag = this.props.tag || app.store.createRecord('tags');\n\n this.name = m.prop(this.tag.name() || '');\n this.slug = m.prop(this.tag.slug() || '');\n this.description = m.prop(this.tag.description() || '');\n this.color = m.prop(this.tag.color() || '');\n this.isHidden = m.prop(this.tag.isHidden() || false);\n }\n\n className() {\n return 'EditTagModal Modal--small';\n }\n\n title() {\n return this.name()\n ? tagLabel({\n name: this.name,\n color: this.color\n })\n : app.translator.trans('flarum-tags.admin.edit_tag.title');\n }\n\n content() {\n return (\n
\n
\n {this.fields().toArray()}\n
\n
\n );\n }\n\n fields() {\n const items = new ItemList();\n\n items.add('name',
\n \n {\n this.name(e.target.value);\n this.slug(slug(e.target.value));\n }}/>\n
, 50);\n\n items.add('slug',
\n \n \n
, 40);\n\n items.add('description',
\n \n