(this.webpackJsonp=this.webpackJsonp||[]).push([[75],{12:function(t,e,i){"use strict";var n=i(0),r=i.n(n);e.a={bind:function(t){r()(t).tooltip({trigger:"hover"})},componentUpdated:function(t){r()(t).tooltip("_fixTitle")},unbind:function(t){r()(t).tooltip("dispose")}}},124:function(t,e,i){"use strict";function n(t,e,i){return e in t?Object.defineProperty(t,e,{value:i,enumerable:!0,configurable:!0,writable:!0}):t[e]=i,t}var r={name:"DeprecatedModal",props:{id:{type:String,required:!1},title:{type:String,required:!1},text:{type:String,required:!1},hideFooter:{type:Boolean,required:!1,default:!1},kind:{type:String,required:!1,default:"primary"},modalDialogClass:{type:String,required:!1,default:""},closeKind:{type:String,required:!1,default:"default"},closeButtonLabel:{type:String,required:!1,default:"Cancel"},primaryButtonLabel:{type:String,required:!1,default:""},secondaryButtonLabel:{type:String,required:!1,default:""},submitDisabled:{type:Boolean,required:!1,default:!1}},computed:{btnKindClass:function(){return n({},"btn-"+this.kind,!0)},btnCancelKindClass:function(){return n({},"btn-"+this.closeKind,!0)}},methods:{emitCancel:function(t){this.$emit("cancel",t)},emitSubmit:function(t){this.$emit("submit",t)}}},a=i(2),o=Object(a.a)(r,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"modal-open"},[i("div",{staticClass:"modal",class:t.id?"":"d-block",attrs:{id:t.id,role:"dialog",tabindex:"-1"}},[i("div",{staticClass:"modal-dialog",class:t.modalDialogClass,attrs:{role:"document"}},[i("div",{staticClass:"modal-content"},[i("div",{staticClass:"modal-header"},[t._t("header",[i("h4",{staticClass:"modal-title float-left"},[t._v("\n "+t._s(t.title)+"\n ")]),t._v(" "),i("button",{staticClass:"close float-right",attrs:{type:"button","data-dismiss":"modal","aria-label":"Close"},on:{click:function(e){t.emitCancel(e)}}},[i("span",{attrs:{"aria-hidden":"true"}},[t._v("×")])])])],2),t._v(" "),i("div",{staticClass:"modal-body"},[t._t("body",[i("p",[t._v(t._s(t.text))])],{text:t.text})],2),t._v(" "),t.hideFooter?t._e():i("div",{staticClass:"modal-footer"},[i("button",{staticClass:"btn",class:t.btnCancelKindClass,attrs:{type:"button","data-dismiss":"modal"},on:{click:function(e){t.emitCancel(e)}}},[t._v("\n "+t._s(t.closeButtonLabel)+"\n ")]),t._v(" "),t.secondaryButtonLabel?t._t("secondary-button",[t.secondaryButtonLabel?i("button",{staticClass:"btn",attrs:{type:"button","data-dismiss":"modal"}},[t._v("\n "+t._s(t.secondaryButtonLabel)+"\n ")]):t._e()]):t._e(),t._v(" "),t.primaryButtonLabel?i("button",{staticClass:"btn js-primary-button",class:t.btnKindClass,attrs:{disabled:t.submitDisabled,type:"button","data-dismiss":"modal"},on:{click:function(e){t.emitSubmit(e)}}},[t._v("\n "+t._s(t.primaryButtonLabel)+"\n ")]):t._e()],2)])])]),t._v(" "),t.id?t._e():i("div",{staticClass:"modal-backdrop fade show"})])},[],!1,null,null,null);e.a=o.exports},139:function(t,e,i){"use strict";var n=i(12),r=i(97),a=(i(40),{directives:{tooltip:n.a},mixins:[r.a],props:{time:{type:String,required:!0},tooltipPlacement:{type:String,required:!1,default:"top"},cssClass:{type:String,required:!1,default:""}}}),o=i(2),s=Object(o.a)(a,function(){var t=this.$createElement;return(this._self._c||t)("time",{directives:[{name:"tooltip",rawName:"v-tooltip"}],class:this.cssClass,attrs:{title:this.tooltipTitle(this.time),"data-placement":this.tooltipPlacement,"data-container":"body"},domProps:{textContent:this._s(this.timeFormated(this.time))}})},[],!1,null,null,null);e.a=s.exports},180:function(t,e,i){"use strict";var n=i(0),r=i.n(n),a=i(3),o=i.n(a),s=i(5),u=function(){function t(t,e){for(var i=0;i3&&void 0!==arguments[3]?arguments[3]:"filter_groups";!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.filterForm=e,this.listFilterElement=i,this.listHolderElement=n,this.filterInputField=r,this.isBusy=!1}return u(t,[{key:"getFilterEndpoint",value:function(){return this.filterForm.getAttribute("action")+"?"+r()(this.filterForm).serialize()}},{key:"getPagePath",value:function(){return this.getFilterEndpoint()}},{key:"initSearch",value:function(){this.debounceFilter=o.a.debounce(this.onFilterInput.bind(this),500),this.unbindEvents(),this.bindEvents()}},{key:"onFilterInput",value:function(){var t={},e=r()(this.filterForm).find('[name="'+this.filterInputField+'"]').val();e&&(t[this.filterInputField]=e),this.filterResults(t),this.setDefaultFilterOption&&this.setDefaultFilterOption()}},{key:"bindEvents",value:function(){this.listFilterElement.addEventListener("input",this.debounceFilter)}},{key:"unbindEvents",value:function(){this.listFilterElement.removeEventListener("input",this.debounceFilter)}},{key:"filterResults",value:function(t){var e=this;return!this.isBusy&&(r()(this.listHolderElement).fadeTo(250,.5),this.isBusy=!0,s.a.get(this.getFilterEndpoint(),{params:t}).then(function(i){e.onFilterSuccess(i,t),e.onFilterComplete()}).catch(function(){return e.onFilterComplete()}))}},{key:"onFilterSuccess",value:function(t,e){t.data.html&&(this.listHolderElement.innerHTML=t.data.html);var i=this.getPagePath(e);return window.history.replaceState({page:i},document.title,i)}},{key:"onFilterComplete",value:function(){this.isBusy=!1,r()(this.listHolderElement).fadeTo(250,1)}}]),t}();e.a=l},19:function(t,e,i){"use strict";var n=[8,12,16,18,24,32,48,72],r={props:{name:{type:String,required:!0},size:{type:Number,required:!1,default:16,validator:function(t){return n.includes(t)}},cssClasses:{type:String,required:!1,default:""},width:{type:Number,required:!1,default:null},height:{type:Number,required:!1,default:null},y:{type:Number,required:!1,default:null},x:{type:Number,required:!1,default:null}},computed:{spriteHref:function(){return gon.sprite_icons+"#"+this.name},iconTestClass:function(){return"ic-"+this.name},iconSizeClass:function(){return this.size?"s"+this.size:""}}},a=i(2),o=Object(a.a)(r,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("svg",{class:[t.iconSizeClass,t.iconTestClass,t.cssClasses],attrs:{width:t.width,height:t.height,x:t.x,y:t.y}},[i("use",t._b({},"use",{"xlink:href":t.spriteHref},!1))])},[],!1,null,null,null);e.a=o.exports},236:function(t,e,i){"use strict";var n=i(1),r=Object(n.e)("Pagination|Prev"),a=Object(n.e)("Pagination|Next"),o=Object(n.e)("Pagination|« First"),s=Object(n.e)("Pagination|Last »"),u={props:{change:{type:Function,required:!0},pageInfo:{type:Object,required:!0}},computed:{prev:function(){return this.pageInfo.previousPage},next:function(){return this.pageInfo.nextPage},getItems:function(){var t=this.pageInfo.totalPages,e=this.pageInfo.page,i=[];e>1&&i.push({title:o,first:!0}),e>1?i.push({title:r,prev:!0}):i.push({title:r,disabled:!0,prev:!0}),e>6&&i.push({title:"...",separator:!0});for(var n=Math.max(e-4,1),u=Math.min(e+4,t),l=n;l<=u;l+=1){var c=l===e;i.push({title:l,active:c,page:!0})}return t-e>4&&i.push({title:"...",separator:!0,page:!0}),e===t?i.push({title:a,disabled:!0,next:!0}):t-e>=1&&i.push({title:a,next:!0}),t-e>=1&&i.push({title:s,last:!0}),i},showPagination:function(){return this.pageInfo.totalPages>1}},methods:{changePage:function(t,e){if(!e){var i=this.pageInfo,n=i.totalPages,u=i.nextPage,l=i.previousPage;switch(t){case"...":break;case s:this.change(n);break;case a:this.change(u);break;case r:this.change(l);break;case o:this.change(1);break;default:this.change(+t)}}},hideOnSmallScreen:function(t){return!(t.first||t.last||t.next||t.prev||t.active)}}},l=i(2),c=Object(l.a)(u,function(){var t=this,e=t.$createElement,i=t._self._c||e;return t.showPagination?i("div",{staticClass:"gl-pagination prepend-top-default"},[i("ul",{staticClass:"pagination justify-content-center"},t._l(t.getItems,function(e,n){return i("li",{key:n,staticClass:"page-item",class:{page:e.page,"js-previous-button":e.prev,"js-next-button":e.next,"js-last-button":e.last,"js-first-button":e.first,"d-none d-md-block":t.hideOnSmallScreen(e),separator:e.separator,active:e.active,disabled:e.disabled||e.separator}},[i("a",{staticClass:"page-link",on:{click:function(i){i.preventDefault(),t.changePage(e.title,e.disabled)}}},[t._v("\n "+t._s(e.title)+"\n ")])])}))]):t._e()},[],!1,null,null,null);e.a=c.exports},382:function(t,e,i){"use strict";var n=i(8),r=i(75),a=i(0),o=i.n(a),s=i(180),u=new n.default,l=i(11),c=function(){function t(t,e){for(var i=0;i0&&void 0!==arguments[0]?arguments[0]:{},e=void 0;if(Object.keys(t).length){var i=Object(l.z)(t);e=Object(l.B)(i)}else e=t;this.state.pageInfo=e}},{key:"getPaginationInfo",value:function(){return this.state.pageInfo}},{key:"formatGroupItem",value:function(t){var e=t.children||[],i=e.length>0||!1,n=this.hideProjects?t.subgroup_count:t.children_count;return{id:t.id,name:t.name,fullName:t.full_name,description:t.markdown_description,visibility:t.visibility,avatarUrl:t.avatar_url,relativePath:t.relative_path,editPath:t.edit_path,leavePath:t.leave_path,canEdit:t.can_edit,canLeave:t.can_leave,type:t.type,permission:t.permission,children:e,isOpen:i,isChildrenLoading:!1,isBeingRemoved:!1,parentId:t.parent_id,childrenCount:n,projectCount:t.project_count,subgroupCount:t.subgroup_count,memberCount:t.number_users_with_delimiter,starCount:t.star_count,updatedAt:t.updated_at}}},{key:"removeGroup",value:function(t,e){var i=e;i.children&&i.children.length?i.children=e.children.filter(function(e){return t.id!==e.id}):this.state.groups=this.state.groups.filter(function(e){return t.id!==e.id})}}]),t}(),f=(i(372),function(){function t(t,e){for(var i=0;i20},moreChildrenStats:function(){return Object(m.d)("One more item","%d more items",this.parentGroup.childrenCount-this.parentGroup.children.length)}}},L=Object(E.a)(I,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("ul",{staticClass:"content-list group-list-tree"},[t._l(t.groups,function(e,n){return i("group-item",{key:n,attrs:{group:e,"parent-group":t.parentGroup}})}),t._v(" "),t.hasMoreChildren?i("li",{staticClass:"group-row"},[i("a",{staticClass:"group-row-contents has-more-items",attrs:{href:t.parentGroup.relativePath}},[i("i",{staticClass:"fa fa-external-link",attrs:{"aria-hidden":"true"}}),t._v("\n "+t._s(t.moreChildrenStats)+"\n ")])]):t._e()],2)},[],!1,null,null,null).exports,F=i(12),x=i(379),q=i(19),B={components:{icon:q.a},props:{isGroupOpen:{type:Boolean,required:!0,default:!1}},computed:{iconClass:function(){return this.isGroupOpen?"angle-down":"angle-right"}}},$=Object(E.a)(B,function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"folder-caret"},[e("icon",{attrs:{size:12,name:this.iconClass}})],1)},[],!1,null,null,null).exports,M={components:{icon:q.a},props:{itemType:{type:String,required:!0},isGroupOpen:{type:Boolean,required:!0,default:!1}},computed:{iconClass:function(){return this.itemType===j?this.isGroupOpen?"folder-open":"folder":"bookmark"}}},A=Object(E.a)(M,function(){var t=this.$createElement,e=this._self._c||t;return e("span",{staticClass:"item-type-icon"},[e("icon",{attrs:{name:this.iconClass}})],1)},[],!1,null,null,null).exports,R=i(139),D={components:{icon:q.a},directives:{tooltip:F.a},props:{title:{type:String,required:!1,default:""},cssClass:{type:String,required:!1,default:""},iconName:{type:String,required:!0},tooltipPlacement:{type:String,required:!1,default:"bottom"},value:{type:[Number,String],required:!1,default:""}},computed:{isValuePresent:function(){return""!==this.value}}},N=Object(E.a)(D,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("span",{directives:[{name:"tooltip",rawName:"v-tooltip"}],class:t.cssClass,attrs:{"data-placement":t.tooltipPlacement,title:t.title,"data-container":"body"}},[i("icon",{attrs:{name:t.iconName}}),t._v(" "),t.isValuePresent?i("span",{staticClass:"stat-value"},[t._v("\n "+t._s(t.value)+"\n ")]):t._e()],1)},[],!1,null,null,null).exports,H={components:{icon:q.a,timeAgoTooltip:R.a,itemStatsValue:N},props:{item:{type:Object,required:!0}},computed:{visibilityIcon:function(){return w[this.item.visibility]},visibilityTooltip:function(){return this.item.type===j?O[this.item.visibility]:P[this.item.visibility]},isProject:function(){return this.item.type===C},isGroup:function(){return this.item.type===j}}},z=Object(E.a)(H,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"stats"},[t.isGroup?i("item-stats-value",{attrs:{title:t.__("Subgroups"),value:t.item.subgroupCount,"css-class":"number-subgroups","icon-name":"folder"}}):t._e(),t._v(" "),t.isGroup?i("item-stats-value",{attrs:{title:t.__("Projects"),value:t.item.projectCount,"css-class":"number-projects","icon-name":"bookmark"}}):t._e(),t._v(" "),t.isGroup?i("item-stats-value",{attrs:{title:t.__("Members"),value:t.item.memberCount,"css-class":"number-users","icon-name":"users"}}):t._e(),t._v(" "),t.isProject?i("item-stats-value",{attrs:{value:t.item.starCount,"css-class":"project-stars","icon-name":"star"}}):t._e(),t._v(" "),i("item-stats-value",{attrs:{"icon-name":t.visibilityIcon,title:t.visibilityTooltip,"css-class":"item-visibility","tooltip-placement":"left"}}),t._v(" "),t.isProject?i("div",{staticClass:"last-updated"},[i("time-ago-tooltip",{attrs:{time:t.item.updatedAt,"tooltip-placement":"bottom"}})],1):t._e()],1)},[],!1,null,null,null).exports,U={components:{icon:q.a},directives:{tooltip:F.a},props:{parentGroup:{type:Object,required:!1,default:function(){return{}}},group:{type:Object,required:!0}},computed:{leaveBtnTitle:function(){return _.LEAVE_BTN_TITLE},editBtnTitle:function(){return _.EDIT_BTN_TITLE}},methods:{onLeaveGroup:function(){u.$emit("showLeaveGroupModal",this.group,this.parentGroup)}}},V=Object(E.a)(U,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("div",{staticClass:"controls"},[t.group.canEdit?i("a",{directives:[{name:"tooltip",rawName:"v-tooltip"}],staticClass:"edit-group btn no-expand",attrs:{href:t.group.editPath,title:t.editBtnTitle,"aria-label":t.editBtnTitle,"data-container":"body","data-placement":"bottom"}},[i("icon",{attrs:{name:"settings"}})],1):t._e(),t._v(" "),t.group.canLeave?i("a",{directives:[{name:"tooltip",rawName:"v-tooltip"}],staticClass:"leave-group btn no-expand",attrs:{href:t.group.leavePath,title:t.leaveBtnTitle,"aria-label":t.leaveBtnTitle,"data-container":"body","data-placement":"bottom"},on:{click:function(e){return e.preventDefault(),t.onLeaveGroup(e)}}},[i("icon",{attrs:{name:"leave"}})],1):t._e()])},[],!1,null,null,null).exports,K={directives:{tooltip:F.a},components:{identicon:x.a,itemCaret:$,itemTypeIcon:A,itemStats:z,itemActions:V},props:{parentGroup:{type:Object,required:!1,default:function(){return{}}},group:{type:Object,required:!0}},computed:{groupDomId:function(){return"group-"+this.group.id},rowClass:function(){return{"is-open":this.group.isOpen,"has-children":this.hasChildren,"has-description":this.group.description,"being-removed":this.group.isBeingRemoved}},hasChildren:function(){return this.group.childrenCount>0},hasAvatar:function(){return null!==this.group.avatarUrl},isGroup:function(){return"group"===this.group.type}},methods:{onClickRowGroup:function(t){t.target.classList.contains("no-expand")||t.target.parentElement.classList.contains("no-expand")||(this.hasChildren?u.$emit("toggleChildren",this.group):Object(y.g)(this.group.relativePath))}}},J=Object(E.a)(K,function(){var t=this,e=t.$createElement,i=t._self._c||e;return i("li",{staticClass:"group-row",class:t.rowClass,attrs:{id:t.groupDomId},on:{click:function(e){return e.stopPropagation(),t.onClickRowGroup(e)}}},[i("div",{staticClass:"group-row-contents",class:{"project-row-contents":!t.isGroup}},[t.isGroup?i("item-actions",{attrs:{group:t.group,"parent-group":t.parentGroup}}):t._e(),t._v(" "),i("item-stats",{attrs:{item:t.group}}),t._v(" "),i("div",{staticClass:"folder-toggle-wrap"},[i("item-caret",{attrs:{"is-group-open":t.group.isOpen}}),t._v(" "),i("item-type-icon",{attrs:{"item-type":t.group.type,"is-group-open":t.group.isOpen}})],1),t._v(" "),i("div",{staticClass:"avatar-container prepend-top-8 prepend-left-5 s24 d-none d-sm-block",class:{"content-loading":t.group.isChildrenLoading}},[i("a",{staticClass:"no-expand",attrs:{href:t.group.relativePath}},[t.hasAvatar?i("img",{staticClass:"avatar s24",attrs:{src:t.group.avatarUrl}}):i("identicon",{attrs:{"entity-id":t.group.id,"entity-name":t.group.name,"size-class":"s24"}})],1)]),t._v(" "),i("div",{staticClass:"title namespace-title"},[i("a",{directives:[{name:"tooltip",rawName:"v-tooltip"}],staticClass:"no-expand",attrs:{href:t.group.relativePath,title:t.group.fullName,"data-placement":"bottom"}},[t._v(t._s(t.group.name))]),t._v(" "),t.group.permission?i("span",{staticClass:"user-access-role"},[t._v("\n "+t._s(t.group.permission)+"\n ")]):t._e()]),t._v(" "),t.group.description?i("div",{staticClass:"description"},[i("span",{domProps:{innerHTML:t._s(t.group.description)}})]):t._e()],1),t._v(" "),t.group.isOpen&&t.hasChildren?i("group-folder",{attrs:{"parent-group":t.group,groups:t.group.children}}):t._e()],1)},[],!1,null,null,null).exports;n.default.use(r.a);e.a=function(){var t=document.getElementById("js-groups-tree");t&&(n.default.component("group-folder",L),n.default.component("group-item",J),new n.default({el:t,components:{groupsApp:S},data:function(){var t=this.$options.el.dataset,e="true"===t.hideProjects;return{store:new h(e),service:new g(t.endpoint),hideProjects:e,loading:!0}},beforeMount:function(){var t=this.$options.el.dataset,e={form:document.querySelector(t.formSel),filter:document.querySelector(t.filterSel),holder:document.querySelector(t.holderSel),filterEndpoint:t.endpoint,pagePath:t.path,dropdownSel:t.dropdownSel,filterInputField:"filter"};new p(e).initSearch()},render:function(t){return t("groups-app",{props:{store:this.store,service:this.service,hideProjects:this.hideProjects}})}}))}},97:function(t,e,i){"use strict";var n=i(40);e.a={methods:{timeFormated:function(t){return Object(n.d)().format(t)},tooltipTitle:function(t){return Object(n.a)(t)}}}}}]); //# sourceMappingURL=commons~pages.dashboard.groups.index~pages.explore.groups~pages.groups.show.70112f9d.chunk.js.map