@gitee-code/plugin-xtreme 1.0.6 → 1.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/588.10b71307e3730e2215b6.js +1 -0
- package/dist/components/588.eb6e62e44b5b1c185bdf.js +1 -0
- package/dist/components/596.10b71307e3730e2215b6.js +1 -0
- package/dist/components/596.css +3 -0
- package/dist/components/596.eb6e62e44b5b1c185bdf.js +1 -0
- package/dist/components/677.10b71307e3730e2215b6.js +1 -0
- package/dist/components/677.css +10 -0
- package/dist/components/7.10b71307e3730e2215b6.js +1 -0
- package/dist/components/7.eb6e62e44b5b1c185bdf.js +1 -0
- package/dist/components/819.css +7 -0
- package/dist/components/819.eb6e62e44b5b1c185bdf.js +1 -0
- package/dist/images/583df19a86401f3bf2044c2033476fbe.jpg +0 -0
- package/dist/images/65b33c117668fb44a1dfa5fc4fb93836.png +0 -0
- package/dist/repo_search.js +1 -0
- package/dist/search/search.css +17 -0
- package/dist/search/search.js +1 -0
- package/manifest.yml +1 -1
- package/package.json +1 -1
- package/dist/branches.css +0 -90
- package/dist/branches.js +0 -1
- package/dist/conversation_manage.css +0 -31
- package/dist/conversation_manage.js +0 -1
- package/dist/enterprise.js +0 -1
- package/dist/group.js +0 -1
- package/dist/knowledge_base.css +0 -60
- package/dist/knowledge_base.js +0 -1
- package/dist/project.js +0 -1
- package/dist/pull_requests.css +0 -18
- package/dist/pull_requests.js +0 -1
- package/dist/settings.js +0 -1
- package/dist/xtreme.css +0 -2
- package/dist/xtreme.js +0 -1
- package/dist/xtreme_pullrequest.css +0 -4
- package/dist/xtreme_pullrequest.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{var e,r,t={},n={};function a(e){var r=n[e];if(void 0!==r)return r.exports;var i=n[e]={id:e,loaded:!1,exports:{}};return t[e](i,i.exports,a),i.loaded=!0,i.exports}a.m=t,a.n=e=>{var r=e&&e.__esModule?()=>e.default:()=>e;return a.d(r,{a:r}),r},a.d=(e,r)=>{for(var t in r)a.o(r,t)&&!a.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:r[t]})},a.f={},a.e=e=>Promise.all(Object.keys(a.f).reduce(((r,t)=>(a.f[t](e,r),r)),[])),a.u=e=>"components/"+e+"."+a.h()+".js",a.miniCssF=e=>"components/"+e+".css",a.h=()=>"10b71307e3730e2215b6",a.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),a.o=(e,r)=>Object.prototype.hasOwnProperty.call(e,r),e={},r="@gitee-code/plugin-search:",a.l=(t,n,i,o)=>{if(e[t])e[t].push(n);else{var d,c;if(void 0!==i)for(var s=document.getElementsByTagName("script"),l=0;l<s.length;l++){var h=s[l];if(h.getAttribute("src")==t||h.getAttribute("data-webpack")==r+i){d=h;break}}d||(c=!0,(d=document.createElement("script")).charset="utf-8",d.timeout=120,a.nc&&d.setAttribute("nonce",a.nc),d.setAttribute("data-webpack",r+i),d.src=t),e[t]=[n];var u=(r,n)=>{d.onerror=d.onload=null,clearTimeout(g);var a=e[t];if(delete e[t],d.parentNode&&d.parentNode.removeChild(d),a&&a.forEach((e=>e(n))),r)return r(n)},g=setTimeout(u.bind(null,void 0,{type:"timeout",target:d}),12e4);d.onerror=u.bind(null,d.onerror),d.onload=u.bind(null,d.onload),c&&document.head.appendChild(d)}},a.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),a.p="/api/plugin/static/",(()=>{if("undefined"!=typeof document){var e={115:0};a.f.miniCss=(r,t)=>{e[r]?t.push(e[r]):0!==e[r]&&{596:1}[r]&&t.push(e[r]=(e=>new Promise(((r,t)=>{var n=a.miniCssF(e),i=a.p+n;if(((e,r)=>{for(var t=document.getElementsByTagName("link"),n=0;n<t.length;n++){var a=(o=t[n]).getAttribute("data-href")||o.getAttribute("href");if("stylesheet"===o.rel&&(a===e||a===r))return o}var i=document.getElementsByTagName("style");for(n=0;n<i.length;n++){var o;if((a=(o=i[n]).getAttribute("data-href"))===e||a===r)return o}})(n,i))return r();((e,r,t,n,i)=>{var o=document.createElement("link");o.rel="stylesheet",o.type="text/css",a.nc&&(o.nonce=a.nc),o.onerror=o.onload=t=>{if(o.onerror=o.onload=null,"load"===t.type)n();else{var a=t&&t.type,d=t&&t.target&&t.target.href||r,c=new Error("Loading CSS chunk "+e+" failed.\n("+a+": "+d+")");c.name="ChunkLoadError",c.code="CSS_CHUNK_LOAD_FAILED",c.type=a,c.request=d,o.parentNode&&o.parentNode.removeChild(o),i(c)}},o.href=r,document.head.appendChild(o)})(e,i,0,r,t)})))(r).then((()=>{e[r]=0}),(t=>{throw delete e[r],t})))}}})(),(()=>{var e={115:0};a.f.j=(r,t)=>{var n=a.o(e,r)?e[r]:void 0;if(0!==n)if(n)t.push(n[2]);else{var i=new Promise(((t,a)=>n=e[r]=[t,a]));t.push(n[2]=i);var o=a.p+a.u(r),d=new Error;a.l(o,(t=>{if(a.o(e,r)&&(0!==(n=e[r])&&(e[r]=void 0),n)){var i=t&&("load"===t.type?"missing":t.type),o=t&&t.target&&t.target.src;d.message="Loading chunk "+r+" failed.\n("+i+": "+o+")",d.name="ChunkLoadError",d.type=i,d.request=o,n[1](d)}}),"chunk-"+r,r)}};var r=(r,t)=>{var n,i,[o,d,c]=t,s=0;if(o.some((r=>0!==e[r]))){for(n in d)a.o(d,n)&&(a.m[n]=d[n]);c&&c(a)}for(r&&r(t);s<o.length;s++)i=o[s],a.o(e,i)&&e[i]&&e[i][0](),e[i]=0},t=self.webpackChunk_gitee_code_plugin_search=self.webpackChunk_gitee_code_plugin_search||[];t.forEach(r.bind(null,0)),t.push=r.bind(null,t.push.bind(t))})(),GITEE.i18n.mergeI18n("zh-CN",{repo_search:{title:"Gitee Search 设置",enable_repo_search_content:"启用代码内容搜索",enable_repo_search_content_desc:"开启后,将在此代码库中执行索引生成任务",branch_matching_rule:"生成索引分支匹配规则",branch_matching_rule_placeholder:"通过 | 进行分支划分",default_branch_index:"默认分支生成索引",default_branch_index_desc:"开启后,索引生成任务会自动读取代码库默认分支进行索引生成",regenerate_index:"重新生成索引",regenerate_index_desc:"点击右侧按钮将该代码库的索引删除后重新按照规则匹配分支生成索引",regenerate_index_btn:"重新生成",regenerate_index_tips:"确认重新生成索引?",branch_matching_tips:"索引分支匹配规则不能以 | 开头或结尾",regenerate_index_success:"重新生成索引成功",regenerate_index_error:"请先配置分支规则或开启默认分支生成索引"}}),GITEE.i18n.mergeI18n("en-US",{repo_search:{title:"Gitee Search Settings",enable_repo_search_content:"Enable code content search",enable_repo_search_content_desc:"When enabled, the index generation task will be executed in this code base",branch_matching_rule:"Generate index branch matching rules",branch_matching_rule_placeholder:"The branch partition is carried out by |",default_branch_index:"The default branch generates the index",default_branch_index_desc:"When enabled, the index generation task will automatically read the default branch of the codebase for index generation",regenerate_index:"Regenerate the index",regenerate_index_desc:"Click the right button to delete the index of the code base and generate the index again according to the rule matching branch",regenerate_index_btn:"regenerate",regenerate_index_tips:"Sure to regenerate the index?",branch_matching_tips:"Index branch matching rules cannot begin or end with |",regenerate_index_success:"Regenerate the index successfully",regenerate_index_error:"Configure the branching rules or enable the default branching to generate indexes"}}),GITEE.schema.update({REPO_NAVS:[{name:"project#search",title:"Gitee Search",iconClass:"iconsearch",insertAfter:"Gitee Pipe",permission:window.gon.feature_toggles.code_search_enabled}],FORM:{GITEE_SEARCH_SETTINGS:{VISIBLE:null,DISABLED:null,ITEMS:[]}}}),window.GITEE.router.getRouter().addRoutes([{path:window.GITEE.tools.inOneProgramPage()?`/:enterprise/:group_namespace/${window.GITEE.breakingChanges?.URL_FLAG?":flag(gitee|code)":"gitee"}/:_enterprise?/:namespace/:project/search`:`/:enterprise/${window.GITEE.breakingChanges?.URL_FLAG?":flag(_source|_code)":"_source"}/*/-/search`,name:"project#search",component:()=>Promise.all([a.e(588),a.e(596)]).then(a.bind(a,1596)),meta:{title:()=>"Gitee Search",permissions:()=>(window.GITEE.tools.hasEaualOrHigherPermission("Operator")||window.GITEE.STORE.state.project.permissions.can_admin)&&window.gon.feature_toggles.code_search_enabled}}])})();
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
.dashboard_search[data-v-ca909700] .search_input.el-input--suffix .el-input__suffix .el-input__icon{width:auto}.dashboard_search[data-v-ca909700] .search_input .el-input__inner{font-family:inherit;border-left-color:rgba(0,0,0,0);color:rgba(0,0,0,0);background:rgba(0,0,0,0);caret-color:var(--gray-7);border-right:none}.dashboard_search[data-v-ca909700] .search_input .el-input__inner:focus{border-color:var(--borderColor);border-left-color:rgba(0,0,0,0)}.dashboard_search[data-v-ca909700] .search_input .el-input-group__prepend{position:relative;padding:0 10px;background:var(--gray-1)}.dashboard_search[data-v-ca909700] .search_input .el-input-group__prepend::after{position:absolute;right:0;top:50%;margin-top:-10px;width:1px;height:20px;content:"";background:var(--gray-5)}.dashboard_search[data-v-ca909700] .search_input .el-input-group__prepend .iconfont-new{font-size:20px;color:var(--gray-5);cursor:pointer}.dashboard_search[data-v-ca909700] .search_input .el-input-group__append{background:var(--gray-1);border-left:none;padding-left:0;padding-right:5px}.dashboard_search .recently_word[data-v-ca909700]{display:flex;align-items:center;padding-left:24px;line-height:40px}.dashboard_search .recently_word>span[data-v-ca909700]{height:28px;line-height:28px}.dashboard_search .recently_word .recently_word_title[data-v-ca909700]{display:block;min-width:70px;margin-right:20px}.dashboard_search .recently_word .item[data-v-ca909700]{cursor:pointer;color:var(--blue-6);margin-right:20px;display:inline-block;max-width:150px;padding:0 6px;overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.dashboard_search .recently_word .item[data-v-ca909700]:hover{background:var(--gray-4)}.dashboard_search .search_input_wrap[data-v-ca909700]{position:relative}.dashboard_search .search_input_wrap .query-builder-styled-input-content[data-v-ca909700]{font-family:inherit;position:absolute;left:41px;width:calc(100% - 151px);height:34px;line-height:34px;margin-left:16px;margin-right:31px;word-break:break-word;user-select:none;overflow-x:auto;overflow-y:hidden;scrollbar-width:none;white-space:pre}.search_btn[data-v-ca909700]{background:var(--blue-6);color:var(--gray-1);padding:0 15px}.search_btn[data-v-ca909700]:focus{box-shadow:none}.select_link[data-v-ca909700]{display:flex;color:var(--gray-7);padding:10px 16px;cursor:pointer}.select_link .iconsearch[data-v-ca909700]{margin-right:16px}.select_link .iconhuiche[data-v-ca909700]{font-size:14px;line-height:16px;padding:1px 5px;border-radius:3px;margin-left:8px}.select_link .add_item[data-v-ca909700]{color:var(--blue-6)}.select_link[data-v-ca909700]:hover{background:var(--gray-3)}.select_link:hover .iconhuiche[data-v-ca909700]{background:var(--gray-6)}.select_link.active[data-v-ca909700]{position:relative;background:var(--gray-3)}.select_link.active[data-v-ca909700]::after{position:absolute;top:calc(50% - 12px);left:-8px;width:4px;height:24px;content:"";background-color:var(--blue-6);border-radius:6px}h4[data-v-ca909700]{margin:16px;display:flex;justify-content:space-between}.line_keyword[data-v-ca909700]{flex:1}.line_keyword .keyword[data-v-ca909700]{color:blue}.case_switch[data-v-ca909700]{display:inline-flex;cursor:pointer;border:1px solid var(--gray-1);padding:4px;cursor:pointer;border-radius:5px;display:inline-flex;align-items:center;vertical-align:middle}.case_switch.selected[data-v-ca909700]{border-color:var(--blue-6);color:var(--blue-6)}.case_switch.strict_switch[data-v-ca909700]{padding:3px}.search_data_list[data-v-ca909700]{min-height:80px}.search_data_list[data-v-ca909700] .notData_container{margin-top:0;min-height:140px}
|
|
2
|
+
|
|
3
|
+
.line_keyword .CODE_SEARCH_HIGHLIGHT_keyword {
|
|
4
|
+
color: #0C62FF;
|
|
5
|
+
background-color: #E2ECFF;
|
|
6
|
+
border-radius: 3px;
|
|
7
|
+
line-height: 24px;
|
|
8
|
+
}
|
|
9
|
+
.code_global_search_dialog .el-dialog__header,
|
|
10
|
+
.code_global_search_dialog .el-dialog__footer {
|
|
11
|
+
display: none;
|
|
12
|
+
}
|
|
13
|
+
.code_global_search_dialog .el-dialog__body {
|
|
14
|
+
max-height: 80vh;
|
|
15
|
+
padding: 24px;
|
|
16
|
+
}
|
|
17
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
(()=>{"use strict";var e,t,s,i={1900:(e,t,s)=>{function i(e,t,s,i,o,r,n,a){var d,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=s,c._compiled=!0),i&&(c.functional=!0),r&&(c._scopeId="data-v-"+r),n?(d=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(n)},c._ssrRegister=d):o&&(d=a?function(){o.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:o),d)if(c.functional){c._injectStyles=d;var h=c.render;c.render=function(e,t){return d.call(t),h(e,t)}}else{var p=c.beforeCreate;c.beforeCreate=p?[].concat(p,d):[d]}return{exports:e,options:c}}s.d(t,{Z:()=>i})},7376:(e,t,s)=>{s.d(t,{I:()=>i});const i={REFRESH_SEARCH_CODE:"REFRESH_SEARCH_CODE",RESET_SEARCH_INIT:"RESET_SEARCH_INIT"}},696:(e,t,s)=>{s.d(t,{Wv:()=>l,DV:()=>u,tm:()=>h});var i=function(){var e=this,t=e.$createElement,s=e._self._c||t;return s("div",{staticClass:"dashboard_search"},[s("div",{staticClass:"search_input_wrap"},[s("div",{ref:"queryBuilderStyledInputContent",staticClass:"line_keyword query-builder-styled-input-content",domProps:{innerHTML:e._s(e.parsedKeywords.htmlStr)}}),e._v(" "),s("el-input",{ref:"input",staticClass:"search_input",attrs:{clearable:"",spellcheck:!1},on:{input:e.handleKeywordCInput,focus:e.handleFocus,blur:e.handleBlur},model:{value:e.keyword,callback:function(t){e.keyword=t},expression:"keyword"}},[s("i",{staticClass:"iconfont-new iconsearch",attrs:{slot:"prepend"},slot:"prepend"}),e._v(" "),s("template",{slot:"append"},[s("el-tooltip",{attrs:{content:e.$t("dashboard.case_sensitive")}},[s("span",{staticClass:"case_switch",class:{selected:e.isCaseSensitive},on:{click:function(t){e.isCaseSensitive=!e.isCaseSensitive}}},[e._v("\n Aa\n ")])]),e._v(" "),s("el-tooltip",{attrs:{content:e.$t("dashboard.fuzzy_matching")}},[s("span",{staticClass:"case_switch strict_switch",class:{selected:!e.isStrictMatch},on:{click:function(t){e.isStrictMatch=!e.isStrictMatch}}},[s("svg",{staticClass:"icon",attrs:{t:"1739786607075",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"984",width:"20",height:"20"}},[s("path",{attrs:{d:"M382.4 384.4c58.7 0 102.4-21.8 142.7-42 36.9-18.5 72.2-35.2 117.5-35.2 105.7 0 169.5 42 169.5 42 15.1 10.1 36.9 6.7 47-8.4 10.1-15.1 6.7-35.2-8.4-48.7-3.4-1.7-78.9-52-208.1-52-62.1 0-107.4 23.5-147.7 43.6-38.6 18.5-70.5 35.3-112.5 35.3-107.4 0-162.8-60.4-166.2-63.8-11.8-15.1-33.6-15.1-47-3.4-15.1 11.8-15.1 33.6-3.4 47 3.5 3.4 79 85.6 216.6 85.6zM852.4 493.5c-3.4-1.7-78.9-52-208.1-52-62.1 0-107.4 23.5-147.7 43.6-38.6 18.5-70.5 35.2-112.5 35.2-107.4 0-162.8-60.4-166.2-63.8-11.7-15.1-33.6-15.1-47-3.4-15.1 11.8-15.1 33.6-3.4 47 3.4 3.4 77.2 85.6 216.5 83.9 58.7 0 102.4-21.8 142.7-42 36.9-18.5 72.2-35.2 117.5-35.2 105.7 0 169.5 42 169.5 42 15.1 10.1 36.9 6.7 47-8.4 10.1-15 6.8-36.8-8.3-46.9zM850.7 691.6c-3.4-1.7-78.9-52-208.1-52-62.1 0-107.4 23.5-147.7 43.6-38.6 18.5-70.5 35.2-112.5 35.2-107.4 0-162.8-60.4-166.2-63.8-11.8-15.1-33.6-15.1-47-3.4-15.1 11.8-15.1 33.6-3.4 47 3.4 3.4 78.9 85.6 216.5 85.6 58.7 0 102.4-21.8 142.7-42 36.9-18.5 72.2-35.2 117.5-35.2 105.7 0 169.5 42 169.5 42 15.1 10.1 36.9 6.7 47-8.4 10.2-15 6.8-36.9-8.3-48.6z",fill:e.isStrictMatch?"var(--gray-7)":"var(--blue-6)","p-id":"985"}})])])])],1)],2)],1),e._v(" "),s("div",[e.optionTypeText?s("h4",[e._v(e._s(e.optionTypeText))]):e._e(),e._v(" "),e.needSearch?[s("div",{directives:[{name:"loading",rawName:"v-loading",value:e.dataListLoading,expression:"dataListLoading"}],staticClass:"search_data_list"},[e._l(e.dataList,(function(t){return s("div",{key:t.id,staticClass:"select_link",class:{active:e.isActive(t.id)},on:{click:function(){return e.joinKeyword(t)}}},[["repo","group"].includes(e.searchType)?[s("i",{staticClass:"iconfont-new",class:e.getRepoOrGroupIcon(t)})]:e._e(),e._v(" "),s("span",{staticClass:"line_keyword ml-1"},[e._v(e._s(t.label))])],2)})),e._v(" "),e.dataListLoading||e.dataList.length?e._e():s("NoData",{attrs:{content:e.$t("dashboard.no_search_data")}})],2)]:[s("div",e._l(e.searchInputKeyword,(function(t){return s("div",{key:t.id,staticClass:"select_link",class:{active:e.isActive(t.id)},on:{click:function(s){return e.handleSelectKeyword(t)}}},[s("i",{staticClass:"iconfont-new iconfilter-default"}),e._v(" "),s("span",{staticClass:"line_keyword ml-1"},[e._v(e._s(t.id)+" :"+e._s(t.desc))]),e._v(" "),s("span",{staticClass:"add_item"},[e._v(e._s(e.$t("add")))])])})),0)],e._v(" "),e.words.length?s("h4",[s("span",[e._v(e._s(e.$t("dashboard.recent_search")))]),e._v(" "),s("i",{staticClass:"iconfont-new icondelete cursor-pointer",on:{click:e.clearHistory}})]):e._e(),e._v(" "),e._l(e.words,(function(t,i){return s("div",{key:i,staticClass:"select_link",class:{active:e.isActive(t)},on:{click:function(){return e.searchHistoryWord(t)}}},[s("i",{staticClass:"iconfont-new iconsearch"}),e._v(" "),s("span",{staticClass:"line_keyword"},[e._v(e._s(t))])])}))],2)])};i._withStripped=!0;var o=s(8140),r=s(3418),n=s(7376);const a={name:"SearchWord",mixins:[o.Z],data:()=>({words:[],dataList:[],langList:[],dataListLoading:!1,needSearch:!1,searchType:"",keyword:"",activeId:"",isFocus:!1,realInputContent:null,currentSelectionStart:0,segmentOption:{},isComposing:!1,compositionText:"",compositionStart:0,compositionEnd:0,isCaseSensitive:!1,isStrictMatch:!0,searchInputKeyword:[],source:null,validating:!1}),computed:{inputKeyword(){return[{id:"repo",desc:this.$t("dashboard.repo_desc"),title:this.$t("dashboard.related_repos_groups"),permission:!0},{id:"group",desc:this.$t("dashboard.group_desc"),title:this.$t("dashboard.related_repos_groups"),permission:!0},{id:"lang",desc:this.$t("dashboard.lang_desc"),title:this.$t("dashboard.related_repo_lang"),permission:this.FEATURE_TOGGLES.commit_kanban_enabled},{id:"system",desc:this.$t("dashboard.subproject_desc"),title:"",permission:this.FEATURE_TOGGLES.commit_kanban_enabled}].filter((e=>e.permission))},avtiveName(){return this.$store.getters["dashboard/getActiveTab"]},parsedKeywords(){return this.isComposing?this.extractKeyword(this.compositionText):this.extractKeyword(this.keyword)},canSelectedIds(){return this.needSearch?[...this.dataList.map((e=>e.id)),...this.words.map((e=>e))]:[...this.searchInputKeyword.map((e=>e.id)),...this.words.map((e=>e))]},optionTypeText(){const e=this.inputKeyword.find((e=>e.id===this.searchType));return this.searchType&&e?e.title:this.searchInputKeyword.length?this.$t("dashboard.keyword_input"):""},dialogVisible(){return this.$store.state.dialog.props.visible}},watch:{canSelectedIds(){this.activeId&&!this.canSelectedIds.includes(this.activeId)&&(this.activeId="")},dialogVisible:{handler(e){e?(this.$nextTick((()=>{this.focusSearchInput(),this.setKeyword(),this.getRecentWord(),this.isCaseSensitive="false"!==this.$route.query.case&&Boolean(this.$route.query.case);const e=!this.$route.query.hasOwnProperty("strict")||"false"!==this.$route.query.strict&&Boolean(this.$route.query.strict);this.isStrictMatch=e})),window.GITEE.STORE&&window.GITEE.STORE.state.PLUGINS.global_search.preload_permission&&this.api.dashboard.getUserPermission()):(this.setKeyword(),this.reset())},immediate:!0}},mounted(){this.searchInputKeyword=[...this.inputKeyword],this.realInputContent=this.$refs.input.$el.querySelector(".el-input__inner"),this.realInputContent.addEventListener("scroll",this.handleInputScroll),this.realInputContent.addEventListener("keydown",this.handleKeydown),this.realInputContent.addEventListener("compositionstart",this.handleCompositionstart),this.realInputContent.addEventListener("compositionupdate",this.handleCompositionupdate),this.realInputContent.addEventListener("compositionend",this.handleCompositionend)},beforeDestroy(){this.realInputContent.removeEventListener("scroll",this.handleInputScroll),this.realInputContent.removeEventListener("keydown",this.handleKeydown),this.realInputContent.removeEventListener("compositionstart",this.handleCompositionstart),this.realInputContent.removeEventListener("compositionupdate",this.handleCompositionupdate),this.realInputContent.removeEventListener("compositionend",this.handleCompositionend)},methods:{escapeAngleHTML(e){const t={"<":"<",">":">"};return e.replace(/[<>]/g,(e=>t[e]))},extractKeyword(e=""){const t=this.inputKeyword.map((e=>e.id)).join(":|"),s=new RegExp(`(${t}:|branch:)(?:"([^"]*)"|(\\S+))(\\s*)`,"g"),i=[],o=[];let r="";return r=this.escapeAngleHTML(e).replace(s,(function(e,t,s,r,n){const a=window.GITEE.tools.escapeHtml(s||r||"");"repo:"===t?i.push(a):"group:"===t&&o.push(a);const d=void 0!==s?'"':"";return t+'<span class="CODE_SEARCH_HIGHLIGHT_keyword">'+d+a+d+"</span>"+n})),{repos:i,groups:o,keywords:e,htmlStr:r}},transformData:(e="")=>e.replace(/\s+/g," ").split(" ").filter((e=>e.startsWith("group:")||e.startsWith("repo:"))),handleInputScroll(e){this.$refs.queryBuilderStyledInputContent.scrollLeft=e.target.scrollLeft},handleKeydown(e){this.isComposing||this.validating||("ArrowUp"===e.key&&this.handleArrowUp(),"ArrowDown"===e.key&&this.handleArrowDown(),"Enter"===e.key&&this.handleEnter())},getRepoOrGroupIcon:e=>"repo_group"===e.type?"iconcode-folder":"iconcode-house",reset(){this.searchType="",this.needSearch=!1,this.activeId="",this.dataList=[],this.langList=[],this.searchInputKeyword=[...this.inputKeyword]},isActive(e){return this.activeId===e},changeActive(e){const t=this.canSelectedIds.findIndex((e=>e===this.activeId));-1===t?this.activeId="down"===e?this.canSelectedIds[0]:this.canSelectedIds.at(-1):t===this.canSelectedIds.length-1&&"down"===e||0===t&&"up"===e?this.activeId="":this.activeId="down"===e?this.canSelectedIds[t+1]:this.canSelectedIds[t-1]},handleArrowDown(){this.isFocus&&this.changeActive("down")},handleArrowUp(){this.isFocus&&this.changeActive("up")},handleEnter(){if(this.isFocus)if(this.activeId){const e=this.dataList.find((e=>e.id===this.activeId)),t=this.searchInputKeyword.find((e=>e.id===this.activeId));e?this.joinKeyword(e):t?(this.setInputKeyword(),this.handleKeywordCInput()):(this.keyword=this.activeId,this.handleSearch())}else setTimeout((()=>{this.handleSearch()}),0)},focusSearchInput(){this.$refs.input.focus()},setKeyword(){this.keyword=decodeURIComponent(encodeURIComponent(this.$route.query.wd||""))},getRecentWord(){this.api.dashboard.getRecentWord().then((({data:e})=>{this.words=e.slice(0,5)||[]}))},clearHistory(){this.api.dashboard.clearHistory().then((()=>{this.words=[]}))},searchHistoryWord(e){this.keyword=e,this.handleSearch()},async validateKeywordsToRepoOrGroup(){this.keyword=this.keyword.trim();const e=this.keyword.match(/^repo:(\S+)$/),t=this.keyword.match(/^group:(\S+)$/);if(e||t)try{this.validating=!0;const s=e?e[1]:t[1],{data:i}=await this.api[e?"projects":"groups"][e?"isRepo":"isGroup"](s,{no_error_message:!0});return i.id?{type:e?"repo":"group",full_path:s}:{type:404}}catch(e){return{type:404}}finally{this.validating=!1}return{type:"search"}},async handleSearch(){const e=await this.validateKeywordsToRepoOrGroup();if(this.$store.commit("hideDialog"),"search"!==e.type)404!==e.type?this.$router.push({name:"repo"===e.type?"project#code":"group#show",params:{0:e.full_path}}):this.$router.push({name:"error_not_found"});else{if(window.eventHub.$emit(n.I.RESET_SEARCH_INIT),this.keyword===this.$route.query.wd&&String(this.isCaseSensitive)===this.$route.query.case&&String(this.isStrictMatch)===this.$route.query.strict)return void window.eventHub.$emit(n.I.REFRESH_SEARCH_CODE);if(!this.keyword&&this.FEATURE_TOGGLES.commit_kanban_enabled)return void this.$router.push({name:"company#personal_dashboard"});const e=this.FEATURE_TOGGLES.commit_kanban_enabled?"code":this.tabArr[0].code;this.$router.push({name:"company#search",query:{wd:this.keyword,tab:"company#search"===this.$route.name&&this.$route.query.tab||e,case:this.isCaseSensitive,strict:this.isStrictMatch},params:(0,r.e)()})}},handleFocus(){this.isFocus=!0},handleBlur(){this.isFocus=!1},getSegment(e,t){const s=e.substring(0,t),i=e.substring(t),o=s.lastIndexOf(" ")+1;let r=i.indexOf(" ");-1===r&&(r=i.length);const n=s.substring(o)+i.substring(0,r);return{segment:n,start:o,end:o+n.length}},handleKeywordCInput(){this.searchType="",this.currentSelectionStart=this.realInputContent.selectionStart,this.segmentOption=this.getSegment(this.keyword,this.currentSelectionStart),this.updateInputScrollLeft(this.currentSelectionStart),this.handleKeywordChange(this.segmentOption.segment)},handleKeywordChange:window.GITEE.tools.debounce((function(e){this.reset();const t=this.inputKeyword.find((e=>"lang"===e.id)),s=new RegExp(`(repo:|group:${t?"|lang:":""})(["']?)(\\S*?)\\2(\\s*)$`).exec(e);if(!s)return this.needSearch=!1,void(e&&(this.searchInputKeyword=this.inputKeyword.filter((t=>t.id.indexOf(e)>-1))));this.searchType=s[1].replace(":",""),this.needSearch=!0;const i={repo:this.api.dashboard.getInnerSourceProjectsPlugin,group:this.api.groups.getGroupsListPlugin,lang:this.api.groups.getLangList};this.source?.cancel(),this.dataListLoading=!0,this.source=window.GITEE.tools.$http.CancelToken.source(),i[this.searchType]({keywords:s[3],per_page:5},{cancelToken:this.source.token}).then((({data:e})=>{if("lang"===this.searchType)return this.dataList=e.map((e=>({id:e,label:e,value:e}))),void(this.dataListLoading=!1);this.dataList=(e.data.list||[]).map((e=>({...e,value:e.full_path,label:e.name}))),this.dataListLoading=!1})).catch((e=>{window.GITEE.tools.$http.isCancel(e)||(this.dataListLoading=!1)}))}),300),joinKeyword(e){const t=new RegExp(`${this.searchType}:(?:"([^"]*)"|(\\S*))$`),s=e.value.includes(" ");this.segmentOption.segment=this.segmentOption.segment.replace(t,((t,i,o)=>void 0!==i?`${this.searchType}:"${e.value}" `:void 0!==o?s?`${this.searchType}:"${e.value}" `:`${this.searchType}:${e.value} `:t)),this.keyword=this.keyword.substring(0,this.segmentOption.start)+this.segmentOption.segment+this.keyword.substring(this.segmentOption.end),this.$nextTick((()=>{this.searchInputKeyword=[...this.inputKeyword],this.focusSearchInput();const e=this.segmentOption.start+this.segmentOption.segment.length;this.realInputContent.setSelectionRange(e,e),this.updateInputScrollLeft(e)})),this.needSearch=!1},updateInputScrollLeft:window.GITEE.tools.debounce((function(e=0){const t=this.realInputContent.scrollWidth-this.realInputContent.clientWidth;e===this.keyword.length&&this.realInputContent.scrollLeft!==t&&(this.realInputContent.scrollLeft=t)}),200),handleCompositionstart(e){this.compositionStart=e.target.selectionStart,this.compositionEnd=e.target.selectionEnd},handleCompositionupdate(e){this.isComposing||(this.isComposing=!0),this.compositionText=this.keyword.slice(0,this.compositionStart)+e.data+this.keyword.slice(this.compositionEnd)},handleCompositionend(){this.isComposing&&(this.isComposing=!1),this.compositionStart=0,this.compositionEnd=0},handleSelectKeyword(e){this.activeId=e.id,this.setInputKeyword(),this.focusSearchInput(),this.handleKeywordCInput()},setInputKeyword(){const e=this.keyword.lastIndexOf(" ");this.keyword=-1!==e?this.keyword.substring(0,e+1)+this.activeId+":":this.activeId+":"}}},d=(0,s(1900).Z)(a,i,[],!1,null,"ca909700",null).exports,c=(window.GITEE.i18n.$t("group_and_repo_type.fork_repo"),window.GITEE.i18n.$t("group_and_repo_type.personal_private"),window.GITEE.i18n.$t("group_and_repo_type.open_repo"),window.GITEE.i18n.$t("group_and_repo_type.open_repo"),window.GITEE.i18n.$t("group_and_repo_type.group_private_repo"),window.GITEE.i18n.$t("group_and_repo_type.open_group"),window.GITEE.i18n.$t("group_and_repo_type.group_private"),window.GITEE.i18n.$t("group_and_repo_type.group_private"),(e,t)=>e?e.parentNode===document.body||e===document.body?document.body:t(e)?e:c(e.parentNode,t):null);function h(){const e=`${(document.querySelector(".code-app-layout").getBoundingClientRect().top||48)+2}px`;window.GITEE.vuex.store.commit("updateDialog",{props:{width:"1000px",customClass:"code_global_search_dialog",closeOnClickModal:!0,appendToBody:!1,showClose:!1,top:e},slots:{default:{render:e=>e(d)}}});const t=window.GITEE.router.getRoute();("company#search"!==t.name||t.query.hasOwnProperty("wd")&&t.query.wd)&&window.GITEE.vuex.store.commit("showDialog")}let p=!1;function l(){p||(p=!0,document.addEventListener("keydown",(e=>{const{FEATURE_TOGGLES:t}=window.GITEE.information;if(!t.global_search_enabled&&!t.repo_issue_enabled&&!t.code_search_enabled)return;const s=c(e.target,(e=>"true"===e.getAttribute("contenteditable")))===document.body;"/"===e.key&&!["INPUT","TEXTAREA","PRE"].includes(e.target.tagName)&&s&&(e.preventDefault(),h())})))}function u(){window.GITEE.event.on("TRIGGER_GLOBAL_SEARCH",(()=>{h()}))}},8140:(e,t,s)=>{s.d(t,{Z:()=>i});const i={computed:{showIssueTab(){return this.FEATURE_TOGGLES.global_search_enabled&&this.FEATURE_TOGGLES.repo_issue_enabled},showCodeTab(){return this.FEATURE_TOGGLES.code_search_enabled},showRepoTab(){return this.FEATURE_TOGGLES.global_search_enabled},tabArr(){return[{name:this.$t("repo"),code:"project",icon:"iconfont-new iconcode-warehouse",showMove:!1,draging:!1,permission:this.showRepoTab,count:0},{name:this.$t("code.code"),code:"code",icon:"iconfont-new iconcode",showMove:!1,draging:!1,permission:this.showCodeTab,count:0},{name:"Issues",code:"issue",icon:"iconfont-new icontask-second",showMove:!1,draging:!1,permission:this.showIssueTab,count:0}].filter((e=>e.permission))}},methods:{assignParams(e,t){e?(this.params={...e},Object.keys(e).forEach((s=>{const i=t.findIndex((e=>e.paramsKey===s));if(-1===i)return;const o=t[i].type,r=t[i].children;if("select"!==o)if(t[i].multiple)r.forEach(((t,i)=>{this.$set(r[i],"active",e[s].indexOf(t.identity)>-1)}));else{const t=r.findIndex((t=>t.identity===e[s]));t>-1?r.forEach(((e,s)=>{this.$set(r[s],"active",s===t)})):r.forEach(((e,t)=>{this.$set(r[t],"active",!1)}))}}))):this.params={}}}}},3418:(e,t,s)=>{s.d(t,{e:()=>i});const i=()=>window.GITEE.tools.inOneProgramPage()&&window.GITEE.breakingChanges?.URL_FLAG?{flag:"_code"}:{}}},o={};function r(e){var t=o[e];if(void 0!==t)return t.exports;var s=o[e]={exports:{}};return i[e].call(s.exports,s,s.exports,r),s.exports}r.m=i,r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var s in t)r.o(t,s)&&!r.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:t[s]})},r.f={},r.e=e=>Promise.all(Object.keys(r.f).reduce(((t,s)=>(r.f[s](e,t),t)),[])),r.u=e=>"components/"+e+"."+r.h()+".js",r.miniCssF=e=>"components/"+e+".css",r.h=()=>"10b71307e3730e2215b6",r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="@gitee-code/plugin-search:",r.l=(s,i,o,n)=>{if(e[s])e[s].push(i);else{var a,d;if(void 0!==o)for(var c=document.getElementsByTagName("script"),h=0;h<c.length;h++){var p=c[h];if(p.getAttribute("src")==s||p.getAttribute("data-webpack")==t+o){a=p;break}}a||(d=!0,(a=document.createElement("script")).charset="utf-8",a.timeout=120,r.nc&&a.setAttribute("nonce",r.nc),a.setAttribute("data-webpack",t+o),a.src=s),e[s]=[i];var l=(t,i)=>{a.onerror=a.onload=null,clearTimeout(u);var o=e[s];if(delete e[s],a.parentNode&&a.parentNode.removeChild(a),o&&o.forEach((e=>e(i))),t)return t(i)},u=setTimeout(l.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=l.bind(null,a.onerror),a.onload=l.bind(null,a.onload),d&&document.head.appendChild(a)}},r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.p="/api/plugin/static/",(()=>{if("undefined"!=typeof document){var e={628:0};r.f.miniCss=(t,s)=>{e[t]?s.push(e[t]):0!==e[t]&&{677:1}[t]&&s.push(e[t]=(e=>new Promise(((t,s)=>{var i=r.miniCssF(e),o=r.p+i;if(((e,t)=>{for(var s=document.getElementsByTagName("link"),i=0;i<s.length;i++){var o=(n=s[i]).getAttribute("data-href")||n.getAttribute("href");if("stylesheet"===n.rel&&(o===e||o===t))return n}var r=document.getElementsByTagName("style");for(i=0;i<r.length;i++){var n;if((o=(n=r[i]).getAttribute("data-href"))===e||o===t)return n}})(i,o))return t();((e,t,s,i,o)=>{var n=document.createElement("link");n.rel="stylesheet",n.type="text/css",r.nc&&(n.nonce=r.nc),n.onerror=n.onload=s=>{if(n.onerror=n.onload=null,"load"===s.type)i();else{var r=s&&s.type,a=s&&s.target&&s.target.href||t,d=new Error("Loading CSS chunk "+e+" failed.\n("+r+": "+a+")");d.name="ChunkLoadError",d.code="CSS_CHUNK_LOAD_FAILED",d.type=r,d.request=a,n.parentNode&&n.parentNode.removeChild(n),o(d)}},n.href=t,document.head.appendChild(n)})(e,o,0,t,s)})))(t).then((()=>{e[t]=0}),(s=>{throw delete e[t],s})))}}})(),(()=>{var e={628:0};r.f.j=(t,s)=>{var i=r.o(e,t)?e[t]:void 0;if(0!==i)if(i)s.push(i[2]);else{var o=new Promise(((s,o)=>i=e[t]=[s,o]));s.push(i[2]=o);var n=r.p+r.u(t),a=new Error;r.l(n,(s=>{if(r.o(e,t)&&(0!==(i=e[t])&&(e[t]=void 0),i)){var o=s&&("load"===s.type?"missing":s.type),n=s&&s.target&&s.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",a.name="ChunkLoadError",a.type=o,a.request=n,i[1](a)}}),"chunk-"+t,t)}};var t=(t,s)=>{var i,o,[n,a,d]=s,c=0;if(n.some((t=>0!==e[t]))){for(i in a)r.o(a,i)&&(r.m[i]=a[i]);d&&d(r)}for(t&&t(s);c<n.length;c++)o=n[c],r.o(e,o)&&e[o]&&e[o][0](),e[o]=0},s=self.webpackChunk_gitee_code_plugin_search=self.webpackChunk_gitee_code_plugin_search||[];s.forEach(t.bind(null,0)),s.push=t.bind(null,s.push.bind(s))})(),s=r(696),GITEE.i18n.mergeI18n("zh-CN",{dashboard:{case_sensitive:"区分大小写",fuzzy_matching:"高级搜索",repo_desc:"筛选范围锁定在所选择的代码库内,请在关键字后输入代码库的全路径进行搜索",group_desc:"筛选范围锁定在所选择的组织内,请在关键字后输入组织的全路径进行搜索",lang_desc:"筛选范围锁定在所选择的语言,请在关键字后输入语言类型进行搜索",subproject_desc:"筛选范围锁定在所选择的子系统编码,请在关键字后输入子系统编码进行搜索",related_repo_lang:"相关代码库语言",keyword_input:"关键字输入",related_repos_groups:"相关代码库/群组",filter_result:"筛选结果",show_more:"显示更多",no_search_data:"没有查到匹配的结果",no_search_branch:"无所需分支?点击配置"},groups:{search_tree_placeholder:"请输入代码库关键字"},search:{export_result:"结果导出:",export_desc:"导出全量结果",file_name:"文件名称",export_task_suc:"导出任务已创建",search_again:"再次搜索:",change_num_2_2000:"增加最大结果限制至2000条",search_result:"搜索到 {totalCount} 条结果",search_result_desc:"结果超出最大数量限制 · ",search_max_limit:"最大限制:{changedNum}"}}),GITEE.i18n.mergeI18n("en-US",{dashboard:{case_sensitive:"Case sensitive",fuzzy_matching:"Advanced search",repo_desc:"The filter scope is locked in the selected code base, please enter the full path of the code base after the keyword to search",group_desc:"The filter scope is locked within the selected organization, please enter the full path of the organization after the keyword to search",lang_desc:"The filter scope is locked in the selected language, please enter the language type after the keyword to search",subproject_desc:"The filter scope is locked in the selected subsystem code, please enter the subsystem code after the keyword to search",related_repo_lang:"Related codebase languages",keyword_input:"Keyword input",related_repos_groups:"Related repositories/groups",filter_result:"Filter results",show_more:"Show more",no_search_data:"No matching results were found.",no_search_branch:'No required branches? Click "Configure"'},groups:{search_tree_placeholder:"Please enter repository keyword"},search:{export_result:"Result export:",export_desc:"Export full results",file_name:"File name",export_task_suc:"Export task created",search_again:"Search again:",change_num_2_2000:"Increase maximum result limit to 2000",search_result:"Found {totalCount} results",search_result_desc:"Results exceed maximum limit · ",search_max_limit:"Maximum limit: {changedNum}"}}),window.GITEE.router.getRouter().addRoutes([{path:`/:enterprise/${window.GITEE.breakingChanges?.URL_FLAG?":flag(_source|_code)":"_source"}/_/search`,name:"company#search",component:()=>Promise.all([r.e(7),r.e(677)]).then(r.bind(r,928)),meta:{title:()=>"CodeSearch",noPadding:!0}}]),(0,s.Wv)(),(0,s.DV)(),window.GITEE.api.register("projects","removeFavorites",(e=>window.GITEE.tools.$http.delete(`${window.GITEE.api.goApiProjectPrefix(e)}/favorites`))),window.GITEE.api.register("projects","addFavorites",(e=>window.GITEE.tools.$http.post(`${window.GITEE.api.goApiProjectPrefix(e)}/favorites`))),window.GITEE.api.register("dashboard","getGlobalCodes",(e=>window.GITEE.tools.$http.get(`${window.GITEE.api.goComApiPrefix()}/search/global_codes`,e))),window.GITEE.api.register("dashboard","getCodes",(e=>window.GITEE.tools.$http.get(`${window.GITEE.api.goComApiPrefix()}/search/codes`,e))),window.GITEE.api.register("dashboard","getIssues",(e=>window.GITEE.tools.$http.get(`${window.GITEE.api.goComApiPrefix()}/search/issues`,e))),window.GITEE.api.register("dashboard","getProjects",(e=>window.GITEE.tools.$http.get(`${window.GITEE.api.goComApiPrefix()}/search/projects`,e))),window.GITEE.api.register("dashboard","getRecentWord",(e=>window.GITEE.tools.$http.get(`/api/search/enterprises/${window.gon.info.enterprise_uuid}/history`,e))),window.GITEE.api.register("dashboard","clearHistory",(e=>window.GITEE.tools.$http.delete(`/api/search/enterprises/${window.gon.info.enterprise_uuid}/history`,{params:e}))),window.GITEE.api.register("dashboard","getUserPermission",(e=>window.GITEE.tools.$http.get(`/api/search/enterprises/${window.gon.info.enterprise_uuid}/user_permissions`,{params:e}))),window.GITEE.api.register("dashboard","getInnerSourceProjectsPlugin",((e,t)=>window.GITEE.tools.$http.get(`/api/search/enterprises/${window.gon.info.enterprise_uuid}/projects`,{params:e,...t}))),window.GITEE.api.register("projects","isRepo",((e,t)=>window.GITEE.tools.$http.get(`${window.GITEE.api.goFullPathPrefix({path:e})}`,t))),window.GITEE.api.register("groups","isGroup",((e,t)=>window.GITEE.tools.$http.get(`${window.GITEE.api.goGroupFullPathPrefix(e)}`,t))),window.GITEE.api.register("groups","getGroupsListPlugin",((e,t)=>window.GITEE.tools.$http.get(`/api/search/enterprises/${window.gon.info.enterprise_uuid}/groups`,{params:e,...t}))),window.GITEE.api.register("groups","getLangList",((e,t)=>window.GITEE.tools.$http.get(`/api/search/enterprises/${window.gon.info.enterprise_uuid}/languages`,{params:e,...t}))),window.GITEE.api.register("groups","getBranchesList",(e=>window.GITEE.tools.$http.get(`/api/search/enterprises/${window.gon.info.enterprise_uuid}/branches`,{params:e}))),window.GITEE.api.register("dashboard","getCodeSearchExportList",(e=>window.GITEE.tools.$http.get(`/api/search/enterprises/${window.gon.info.enterprise_uuid}/search/csv_export`,{params:e}))),window.GITEE.api.register("dashboard","exportCodeSearch",(e=>window.GITEE.tools.$http.get(`/api/search/enterprises/${window.gon.info.enterprise_uuid}/search/create_csv_export`,{params:e}))),window.GITEE.api.register("dashboard","getCodeSearchExportStatus",((e,t)=>window.GITEE.tools.$http.get(`/api/search/enterprises/${window.gon.info.enterprise_uuid}/search/csv_export_status`,{params:e,...t})))})();
|
package/manifest.yml
CHANGED
package/package.json
CHANGED
package/dist/branches.css
DELETED
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
.plugin.defaultBranch {
|
|
2
|
-
display: inline-flex;
|
|
3
|
-
justify-content: center;
|
|
4
|
-
min-width: 80px;
|
|
5
|
-
}
|
|
6
|
-
.plugin.defaultBranch span {
|
|
7
|
-
padding: 1px 8px;
|
|
8
|
-
background-color: var(--yellow-4);
|
|
9
|
-
border-radius: 12px;
|
|
10
|
-
line-height: 22px;
|
|
11
|
-
}
|
|
12
|
-
.plugin.compare {
|
|
13
|
-
display: flex;
|
|
14
|
-
justify-content: space-between;
|
|
15
|
-
align-items: center;
|
|
16
|
-
color: var(--gray-9);
|
|
17
|
-
}
|
|
18
|
-
.plugin.count {
|
|
19
|
-
display: flex;
|
|
20
|
-
flex: 1;
|
|
21
|
-
position: relative;
|
|
22
|
-
line-height: 24px;
|
|
23
|
-
width: 50px;
|
|
24
|
-
}
|
|
25
|
-
.plugin.detail_count {
|
|
26
|
-
cursor: pointer;
|
|
27
|
-
}
|
|
28
|
-
.plugin.detail_count::before {
|
|
29
|
-
content: '';
|
|
30
|
-
height: 2px;
|
|
31
|
-
width: 100%;
|
|
32
|
-
display: block;
|
|
33
|
-
overflow: hidden;
|
|
34
|
-
}
|
|
35
|
-
.plugin.empty::before {
|
|
36
|
-
width: 0;
|
|
37
|
-
}
|
|
38
|
-
.plugin.count.behind {
|
|
39
|
-
justify-content: flex-end;
|
|
40
|
-
}
|
|
41
|
-
.plugin.count.behind i {
|
|
42
|
-
font-size: 16px;
|
|
43
|
-
display: inline-block;
|
|
44
|
-
margin-top: 6px;
|
|
45
|
-
margin-right: 5px;
|
|
46
|
-
color: var(--yellow-3);
|
|
47
|
-
}
|
|
48
|
-
.plugin.count.ahead {
|
|
49
|
-
justify-content: flex-start;
|
|
50
|
-
}
|
|
51
|
-
.plugin.underlineleft::before {
|
|
52
|
-
border-radius:2px 0px 0px 2px;
|
|
53
|
-
background-color: var(--gray-6);
|
|
54
|
-
}
|
|
55
|
-
.plugin.underlineleft span {
|
|
56
|
-
padding-right: 2px;
|
|
57
|
-
}
|
|
58
|
-
.plugin.underlineright::before {
|
|
59
|
-
background-color: var(--blue-6);
|
|
60
|
-
border-radius: 0px 2px 2px 0px;
|
|
61
|
-
}
|
|
62
|
-
.plugin.underlineright span {
|
|
63
|
-
padding-left: 2px;
|
|
64
|
-
}
|
|
65
|
-
.plugin.ahead {
|
|
66
|
-
text-align: right;
|
|
67
|
-
padding-right:4px;
|
|
68
|
-
position: relative;
|
|
69
|
-
}
|
|
70
|
-
.plugin.line {
|
|
71
|
-
width: 1px;
|
|
72
|
-
height: 26px;
|
|
73
|
-
background-color: var(--gray-6);
|
|
74
|
-
}
|
|
75
|
-
/* 自动删除分支 */
|
|
76
|
-
.auto_delete_branch_head {
|
|
77
|
-
display: flex;
|
|
78
|
-
justify-content: space-between;
|
|
79
|
-
align-items: center;
|
|
80
|
-
}
|
|
81
|
-
.auto_delete_branch_head label {
|
|
82
|
-
font-weight: 700;
|
|
83
|
-
}
|
|
84
|
-
.auto_delete_branch_head .desc{
|
|
85
|
-
display: block;
|
|
86
|
-
color: var(--gray-7);
|
|
87
|
-
}
|
|
88
|
-
.set_time .el-input-number {
|
|
89
|
-
line-height: 32px;
|
|
90
|
-
}
|
package/dist/branches.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";GITEE.i18n.mergeI18n("zh-CN",{branch_settings:{default_branch_update_warn:"默认分支更新预警",default_branch_update_warn_desc:"允许通知仓库成员默认分支更新,及时更新其他分支代码"}}),GITEE.i18n.mergeI18n("en-US",{branch_settings:{default_branch_update_warn:"Default branch update alert",default_branch_update_warn_desc:"Allows repository members to be notified of default branch updates and to update other branch code in a timely manner"}});const e={name:"auto-delete-branch",props:{value:{type:Boolean,default:!1},form:{type:Object,default:()=>({})}},data:()=>({branchNames:[],page:1,total_count:0,total_pages:0,can_load_more:!1,cache:{branchNames:[],done:!1}}),watch:{"form.default_branch":{handler(e){this.$emit("form-change",{excepted_deleted_branches:this.form.excepted_deleted_branches.filter((a=>a!==e))})}}},methods:{branchVisibleChange(e){if(!e)return;this.cache.done?this.branchNames=this.cache.branchNames:this.searchBranch();const a=this.$refs.exceptedBranch.$refs.popper.$el.querySelector(".el-scrollbar__wrap");a.addEventListener("scroll",(()=>{a.scrollTop+a.offsetHeight+28>a.scrollHeight&&this.branchNames.length<this.total_count&&this.can_load_more&&(this.page+=1,this.searchBranch())}))},handleSearch(e){this.branchNames=[],this.searchBranch(e)},searchBranch(e){this.can_load_more=!1,GITEE.tools.$http.get(`${GITEE.api.goApiProjectPrefix()}/branches/names?name=${e||""}&page=${this.page}`).then((({data:a})=>{this.branchNames=[...this.branchNames,...a.data.branch||[]],this.total_count=a.meta.total_count,this.can_load_more=!0,e||(this.cache.branchNames=this.branchNames,this.cache.done=!0)}))}},template:'\n <div>\n <span class="auto_delete_branch_head">\n <span>\n <label>自动删除分支</label>\n <span v-if="value" class="desc">自动删除长时间未更新的只读分支</span>\n </span>\n <el-switch :value="value" @change="(v) => $emit(\'input\', v)" />\n </span>\n <el-alert v-if="!value" type="warning" show-icon title="自动删除分支会删除长时间未更新的只读分支,删除后无法恢复,请谨慎操作!!!!" />\n <div v-if="value" class="ml-2">\n <div class="set_time">设置未更新时长为:\n <el-input-number \n :value="form.branch_delete_days_before" \n controls-position="right"\n :precision="0"\n :min="1" \n :max="1000" \n class="ml-1 mr-1 mt-1"\n @change="v => $emit(\'form-change\', { branch_delete_days_before: v })" \n />天,自动删除分支\n </div>\n <span>排除分支</span>\n <el-popover\n placement="right"\n trigger="hover"\n content="仓库下设置的默认分支不支持自动删除,需手动操作!">\n <i slot="reference" class="el-icon-warning-outline ml-1" />\n </el-popover>\n <el-select\n ref="exceptedBranch"\n :value="form.excepted_deleted_branches" \n is-block\n filterable\n remote\n multiple\n :remote-method="handleSearch"\n @visible-change="branchVisibleChange"\n @change="v => $emit(\'form-change\', { excepted_deleted_branches: v })"\n >\n <el-option\n v-for="branch in branchNames.filter((item) => item !== form.default_branch)"\n :key="branch"\n :label="branch"\n :value="branch"\n />\n </el-select>\n </div>\n </div>\n '};GITEE.schema.update({FORM:{BRANCH_SETTINGS:{ITEMS:[{key:"default_branch_warning_enabled",value:!1,pre_key:"default_branch",customComponent:"FormItemSwitch",meta:{label:GITEE.i18n.$t("branch_settings.default_branch_update_warn"),description:GITEE.i18n.$t("branch_settings.default_branch_update_warn_desc")}},{key:"auto_delete_branch_enabled",value:!1,pre_key:"can_create_branch",extraValue:{excepted_deleted_branches:[],branch_delete_days_before:15},customComponent:e}]}}})})();
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
.node_count[data-v-495d7414]{color:var(--blue-6)}
|
|
2
|
-
.conversation_status[data-v-6a2bde98]{position:relative}.conversation_status[data-v-6a2bde98]:before{position:absolute;top:50%;left:-10px;margin-top:-3px;content:"";width:6px;height:6px;background-color:currentColor}
|
|
3
|
-
|
|
4
|
-
.log_detail_wrap {
|
|
5
|
-
position: relative;
|
|
6
|
-
max-height: 400px;
|
|
7
|
-
overflow: auto;
|
|
8
|
-
background: #1a2638;
|
|
9
|
-
color: #b5bbc6;
|
|
10
|
-
}
|
|
11
|
-
.log_detail {
|
|
12
|
-
height: 100%;
|
|
13
|
-
width: fit-content;
|
|
14
|
-
padding: 10px;
|
|
15
|
-
margin-bottom: 0;
|
|
16
|
-
}
|
|
17
|
-
.el-icon-loading {
|
|
18
|
-
position: absolute;
|
|
19
|
-
left: 50%;
|
|
20
|
-
transform: translateX(-50%);
|
|
21
|
-
}
|
|
22
|
-
.no_data {
|
|
23
|
-
margin-top: 0;
|
|
24
|
-
}
|
|
25
|
-
.footer_wrap {
|
|
26
|
-
text-align: right;
|
|
27
|
-
margin-top: 10px;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
.view_log[data-v-a169622c]{color:var(--blue-6)}.new_knowledge_dialog .el-dialog__footer[data-v-a169622c]{display:none}
|
|
31
|
-
.tabs-container[data-v-27dff7de]{position:relative}.filter_icon[data-v-27dff7de]{position:absolute;top:10px;right:0}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";var t=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("PageTitle",[t._v(t._s(t.$t("conversation_manage.title")))]),t._v(" "),a("div",{staticClass:"tabs-container"},[a("ElTabs",{on:{"tab-click":t.changeTab},model:{value:t.tab,callback:function(e){t.tab=e},expression:"tab"}},[a("ElTabPane",{attrs:{label:t.$t("conversation_manage.code_review_helper_tab"),name:"code_review"}}),t._v(" "),a("ElTabPane",{attrs:{label:t.$t("conversation_manage.unit_test_helper_tab"),name:"unit_test"}})],1),t._v(" "),a("FilterIcon",{staticClass:"filter_icon",attrs:{"show-search-filter":t.showSearchFilter},on:{"update:showSearchFilter":function(e){t.showSearchFilter=e},"update:show-search-filter":function(e){t.showSearchFilter=e}}})],1),t._v(" "),a("CommonList",{attrs:{"table-data":t.tableData,columns:t.columns,loading:t.loading,pending:t.loading&&!!t.tableData.length,pagination:{count:t.totalCount,page:t.page,per_page:t.perPage}},on:{changeSize:t.changeSize,changeCurrent:t.changeCurrent},scopedSlots:t._u([{key:"header",fn:function(){return[a("SearchFilter",{ref:"searchFilter",attrs:{opened:t.showSearchFilter},on:{search:t.handleSearch}})]},proxy:!0}])})],1)};t._withStripped=!0;var e=function(){var t=this,e=t.$createElement;return(t._self._c||e)("span",{staticClass:"node_count cursor-pointer",on:{click:t.showNotes}},[t._v("\n "+t._s(t.noteCount)+"\n")])};e._withStripped=!0;var a=function(){var t=this,e=t.$createElement;return(t._self._c||e)("CommonList",{attrs:{"table-data":t.tableData,columns:t.columns,loading:t.loading,pending:t.loading&&!!t.tableData.length,pagination:{count:t.totalCount,page:t.page,per_page:t.perPage},disableMinHeight:!0},on:{changeSize:t.changeSize,changeCurrent:t.changeCurrent}})};function o(t,e,a,o,i,s,n,r){var l,c="function"==typeof t?t.options:t;if(e&&(c.render=e,c.staticRenderFns=a,c._compiled=!0),o&&(c.functional=!0),s&&(c._scopeId="data-v-"+s),n?(l=function(t){(t=t||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(t=__VUE_SSR_CONTEXT__),i&&i.call(this,t),t&&t._registeredComponents&&t._registeredComponents.add(n)},c._ssrRegister=l):i&&(l=r?function(){i.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:i),l)if(c.functional){c._injectStyles=l;var p=c.render;c.render=function(t,e){return l.call(e),p(t,e)}}else{var h=c.beforeCreate;c.beforeCreate=h?[].concat(h,l):[l]}return{exports:t,options:c}}a._withStripped=!0;const i=o({name:"NoteList",props:{rowData:{type:Object}},data:()=>({tableData:[],loading:!1,totalCount:0,page:1,perPage:10}),computed:{columns(){return[{label:this.$t("conversation_manage.file_path"),prop:"file","show-overflow-tooltip":!0},{label:this.$t("conversation_manage.location"),prop:"location",width:100,"show-overflow-tooltip":!0},{label:this.$t("conversation_manage.content"),prop:"content","show-overflow-tooltip":!0},{label:this.$t("conversation_manage.isAdopted"),prop:"is_adopted",width:100,formatter:t=>t.is_adopted?this.$t("site.yes"):this.$t("site.no")}]}},mounted(){this.getList()},methods:{changeCurrent(t){this.page=t,this.getList()},changeSize(t){this.perPage=t,this.page=1,this.getList()},getList(){this.loading=!0,this.api.conversationManage.getNoteList(this.rowData.id,{page:this.page,per_page:this.perPage}).then((({data:t})=>{this.totalCount=t.meta.total_count,this.tableData=t.data||[]})).finally((()=>{this.loading=!1}))}}},a,[],!1,null,null,null).exports,s=o({name:"NoteCount",props:{rowData:{type:Object,required:!0}},computed:{noteCount(){return this.rowData.comment_count||0}},methods:{showNotes(){this.$store.commit("updateDialog",{props:{title:this.$t("conversation_manage.view_report"),width:"60%",customClass:"conversation_note_dialog"},slots:{default:{render:t=>t(i,{props:{rowData:this.rowData}})},footer:{render:t=>t(null)}}}),this.$store.commit("showDialog")}}},e,[],!1,null,"495d7414",null).exports;var n=function(){var t=this,e=t.$createElement;return(t._self._c||e)("div",{staticClass:"conversation_status",class:t.conversationStatus.class},[t._v("\n "+t._s(t.conversationStatus.text)+"\n")])};n._withStripped=!0;const r=o({name:"ConversationStatus",props:{rowData:{type:Object}},computed:{conversationStatus(){const t=this.rowData.status;return{text:t,class:{RUNNING:"iconrunning",SUCCESS:"text-green",FAIL:"text-red",INIT:"warn",STOP:"text-muted"}[t]||""}}}},n,[],!1,null,"6a2bde98",null).exports;var l=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[a("span",{staticClass:"view_log cursor-pointer",on:{click:t.showLogs}},[t._v(t._s(t.$t("conversation_manage.view_detail")))])])};l._withStripped=!0;var c=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("div",[t.execLog||t.loading?a("div",{ref:"logDetail",staticClass:"log_detail_wrap"},[a("pre",{staticClass:"log_detail"},[t._v(t._s(t.execLog))]),t._v(" "),t.loading?a("i",{staticClass:"el-icon-loading"}):t._e()]):a("NoData",{staticClass:"no_data"}),t._v(" "),a("div",{staticClass:"footer_wrap"},[a("el-button",{attrs:{type:"primary"},on:{click:t.handleRefresh}},[t._v("\n "+t._s(t.$t("conversation_manage.refresh"))+"\n ")])],1)],1)};c._withStripped=!0;const p=o({name:"LogDialog",props:{rowData:{type:Object}},data:()=>({loading:!0,execLog:"",timer:null}),computed:{isCodeReview(){return"code_review"===this.rowData.tab}},mounted(){this.getExecLog()},beforeDestroy(){this.stopGetDetail()},methods:{stopGetDetail(){this.timer&&clearTimeout(this.timer)},getExecLog(){this.toBottom();let t=null;t=this.isCodeReview?this.api.conversationManage.logDetail(this.rowData.id):this.api.conversationManage.unitTestLogDetail(this.rowData.uuid),t.then((({data:t})=>{this.isCodeReview?this.execLog=t.logs.map((t=>`[${moment(t.timestamp).format("YYYY-MM-DD HH:mm:ss")}] ${t.step} ${t.message} ${t.duration?`${this.$t("conversation_manage.use_time")}(${t.duration})`:""}`)).join("\n"):this.execLog=t.logs.join("\n"),this.$emit("update:rowData",{...t}),this.toBottom(),["INIT","RUNNING"].includes(this.rowData.status)&&["INIT","RUNNING"].includes(t.status)&&(this.timer=setTimeout((()=>{this.getExecLog()}),5e3)),["INIT","RUNNING"].includes(t.status)||(this.loading=!1)}))},toBottom(){this.$nextTick((()=>{this.$refs.logDetail&&(this.$refs.logDetail.scrollTop=this.$refs.logDetail.scrollHeight)}))},handleRefresh(){this.stopGetDetail(),this.getExecLog()}}},c,[],!1,null,null,null).exports,h=o({name:"LogDetail",props:{rowData:{type:Object,required:!0}},data:()=>({loading:!1,row:null}),methods:{showLogs(){this.$store.commit("updateDialog",{props:{title:this.$t("conversation_manage.view_logs"),width:"40%",customClass:"conversation_note_dialog"},slots:{default:{render:t=>t(p,{ref:"logDialog",props:{rowData:this.rowData},on:{"update:rowData":t=>{this.row=t}}})},footer:{render:t=>t(null)}},events:{close:this.handleCancel}}),this.$store.commit("showDialog")},handleCancel(){this.$emit("action","updateRow",{...this.rowData,...this.row}),this.$store.commit("hideDialog")}}},l,[],!1,null,"a169622c",null).exports;var d=function(){var t=this,e=t.$createElement;return(t._self._c||e)("MoreActions",{attrs:{menu:t.actions,width:"80"}})};d._withStripped=!0;const g=o({name:"LabelColumnAction",components:{MoreActions:window.comps.MoreActions},props:{rowData:Object},computed:{actions(){return[{label:this.$t("conversation_manage.restart_run"),prop:"restart",action:this.reStart,visible:!["RUNNING"].includes(this.rowData.status)},{label:this.$t("conversation_manage.stop_task"),prop:"stop",action:this.delete,visible:["INIT","RUNNING"].includes(this.rowData.status)}].filter((t=>t.visible))}},methods:{reStart(){this.$emit("action","restartTask",this.rowData)},delete(){this.$emit("action","stopTask",this.rowData)}}},d,[],!1,null,null,null).exports;var m=function(){var t=this,e=t.$createElement,a=t._self._c||e;return a("CommonListFilter",{attrs:{"clear-disabled":t.clearDisabled,opened:t.opened,placeholder:t.$t_join("please_enter","conversation_manage.repo_name")},on:{search:t.handleSearch,clearFilter:t.clearFilter},scopedSlots:t._u([{key:"filterRight",fn:function(){return[a("DropDown",{attrs:{label:t.$t("conversation_manage.conversation_status"),options:t.types,value:t.status},on:{input:t.handleCommand}})]},proxy:!0}]),model:{value:t.keywords,callback:function(e){t.keywords=e},expression:"keywords"}})};m._withStripped=!0;const u=o({name:"SearchFilter",components:{DropDown:window.comps.DropDown,CommonListFilter:window.comps.CommonListFilter},props:{opened:Boolean},data:()=>({keywords:"",status:null}),computed:{clearDisabled(){return!this.keywords&&!this.status},types:()=>[{label:"RUNNING",value:"RUNNING"},{label:"SUCCESS",value:"SUCCESS"},{label:"FAIL",value:"FAIL"},{label:"INIT",value:"INIT"},{label:"STOP",value:"STOP"}]},methods:{handleSearch(){this.$emit("search",{keywords:this.keywords,status:this.status})},handleCommand(t){this.status=t,this.handleSearch()},clearFilter(){this.clearSearchData(),this.handleSearch()},clearSearchData(){this.keywords="",this.status=null}}},m,[],!1,null,null,null).exports,_=o({name:"ConversationManage",components:{FilterIcon:window.comps.FilterIcon,SearchFilter:u},data:()=>({tab:"code_review",tableData:[],totalCount:0,page:1,perPage:20,loading:!1,showSearchFilter:!0,params:null}),computed:{codeReviewColumns(){return[{label:this.$t("conversation_manage.conversation_id"),prop:"id","show-overflow-tooltip":!0},{label:this.$t("conversation_manage.belong_pr"),prop:"pr_title","show-overflow-tooltip":!0,formatter:t=>`!${t.pr_iid} ${t.pr_title}`},{label:this.$t("conversation_manage.repo"),prop:"project_name","show-overflow-tooltip":!0},{label:this.$t("conversation_manage.conversation_status"),prop:"status","show-overflow-tooltip":!0,component:r},{label:this.$t("conversation_manage.create_at"),prop:"created_at","show-overflow-tooltip":!0,formatter:t=>t.created_at?moment(t.created_at).format("YYYY-MM-DD HH:mm:ss"):""},{label:this.$t("conversation_manage.ent_time"),prop:"finished_at","show-overflow-tooltip":!0,formatter:t=>t.finished_at?moment(t.finished_at).format("YYYY-MM-DD HH:mm:ss"):""},{label:this.$t("conversation_manage.note_count"),prop:"comment_count",component:s,"show-overflow-tooltip":!0},{label:this.$t("conversation_manage.exec_log"),prop:"exec_log","show-overflow-tooltip":!0,component:h,action:this.handleRowAction},{label:this.$t("action"),prop:"action",width:100,component:g,action:this.handleRowAction}]},unitTestColumns(){return[{label:this.$t("conversation_manage.conversation_id"),prop:"id","show-overflow-tooltip":!0},{label:this.$t("conversation_manage.belong_branch"),prop:"target_branch","show-overflow-tooltip":!0},{label:this.$t("conversation_manage.change_count"),prop:"commit_interval","show-overflow-tooltip":!0},{label:this.$t("conversation_manage.repo"),prop:"project_name","show-overflow-tooltip":!0},{label:this.$t("conversation_manage.conversation_status"),prop:"status","show-overflow-tooltip":!0,component:r},{label:this.$t("conversation_manage.create_at"),prop:"created_at","show-overflow-tooltip":!0,formatter:t=>t.created_at?moment(t.created_at).format("YYYY-MM-DD HH:mm:ss"):""},{label:this.$t("conversation_manage.ent_time"),prop:"finished_at","show-overflow-tooltip":!0,formatter:t=>t.finished_at?moment(t.finished_at).format("YYYY-MM-DD HH:mm:ss"):""},{label:this.$t("conversation_manage.exec_log"),prop:"exec_log","show-overflow-tooltip":!0,component:h},{label:this.$t("conversation_manage.adoption_status"),prop:"is_adopted",formatter:t=>t.is_adopted?this.$t("conversation_manage.adoption_yes"):this.$t("conversation_manage.adoption_no"),action:this.handleRowAction},{label:this.$t("action"),prop:"action",width:100,component:g,action:this.handleRowAction}]},isCodeReview(){return"code_review"===this.tab},columns(){return this.isCodeReview?this.codeReviewColumns:this.unitTestColumns}},mounted(){this.getList()},methods:{changeSize(t){this.perPage=t,this.page=1,this.getList()},changeCurrent(t){this.page=t,this.getList()},changeTab(){this.$refs.searchFilter.clearFilter(),this.params=null,this.page=1,this.tableData=[],this.totalCount=0,this.getList()},getList(){this.loading=!0,this.api.conversationManage[this.isCodeReview?"getCodeReviewList":"getUnitTestList"]({page:this.page,per_page:this.perPage,...this.params}).then((({data:t})=>{this.totalCount=t.meta.total_count,this.tableData=(t.data||[]).map((t=>({...t,tab:this.tab})))||[]})).finally((()=>{this.loading=!1}))},restartTask(t){this.$confirm(this.$t("conversation_manage.restart_task_tips"),this.$t("tips"),{dangerouslyUseHTMLString:!0,beforeClose:(e,a,o)=>{if("confirm"===e){a.confirmButtonLoading=!0;let e=null;e=this.isCodeReview?this.api.conversationManage.reStartTask(t.id):this.api.conversationManage.reStartUnitTestTask(t.uuid),e.then((()=>{this.getList(),o()})).finally((()=>{a.confirmButtonLoading=!1}))}else o()}})},stopTask(t){this.$confirm(this.$t("conversation_manage.stop_task_tips"),this.$t("tips"),{dangerouslyUseHTMLString:!0,beforeClose:(e,a,o)=>{if("confirm"===e){a.confirmButtonLoading=!0;let e=null;e=this.isCodeReview?this.api.conversationManage.stopTask(t.id):this.api.conversationManage.stopUnitTestTask(t.uuid),e.then((()=>{this.getList(),o()})).finally((()=>{a.confirmButtonLoading=!1}))}else o()}})},handleSearch(t){this.params=t,this.page=1,this.getList()},updateRow(t){const e=this.tableData.findIndex((e=>e.id===t.id));this.$set(this.tableData,e,{...t})}}},t,[],!1,null,"27dff7de",null).exports;window.GITEE.router.getRouter().addRoutes([{path:`/:enterprise/${window.GITEE.breakingChanges?.URL_FLAG?":flag(_source|_code)":"_source"}/_/conversation_manage`,name:"company#search",component:_,meta:{title:()=>"会话管理"}}]),window.GITEE.api.register("conversationManage","getCodeReviewList",(t=>window.GITEE.tools.$http.get("/api/xtreme/api/review_tasks",{params:t}))),window.GITEE.api.register("conversationManage","getUnitTestList",(t=>window.GITEE.tools.$http.get("/api/xtreme/api/unit_test_tasks",{params:t}))),window.GITEE.api.register("conversationManage","getNoteList",((t,e)=>window.GITEE.tools.$http.get(`/api/xtreme/api/review_tasks/${t}/notes`,{params:e}))),window.GITEE.api.register("conversationManage","reStartTask",(t=>window.GITEE.tools.$http.get(`/api/xtreme/api/review_tasks/${t}/retry`))),window.GITEE.api.register("conversationManage","stopTask",(t=>window.GITEE.tools.$http.get(`/api/xtreme/api/review_tasks/${t}/break`))),window.GITEE.api.register("conversationManage","logDetail",(t=>window.GITEE.tools.$http.get(`/api/xtreme/api/review_tasks/${t}/logs`))),window.GITEE.api.register("conversationManage","stopUnitTestTask",(t=>window.GITEE.tools.$http.delete(`/api/xtreme/api/unit_test_tasks/${t}/cancel`))),window.GITEE.api.register("conversationManage","reStartUnitTestTask",(t=>window.GITEE.tools.$http.post(`/api/xtreme/api/unit_test_tasks/${t}/retry`))),window.GITEE.api.register("conversationManage","unitTestLogDetail",(t=>window.GITEE.tools.$http.get(`/api/xtreme/api/unit_test_tasks/${t}/logs`)))})();
|
package/dist/enterprise.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{GITEE.i18n.mergeI18n("zh-CN",{company_settings:{code_review_question_types:"代码评审问题类型"}}),GITEE.i18n.mergeI18n("en-US",{company_settings:{code_review_question_types:"Code review question types"}});const e={name:"problemTypeTab",data:()=>({problemTypeList:[],tableLoading:!1,page:1,totalCount:0,editId:0,dialogVisible:!1,submitting:!1,detailLoading:!1,form:{name:"",description:""},rules:{name:[{required:!0}],description:[{required:!0}]},detailData:{}}),computed:{loading(){return!this.problemTypeList.length&&this.tableLoading},pending(){return!!this.problemTypeList.length&&this.tableLoading},columns(){return[{label:"问题类型",prop:"name",showOverflowTooltip:!0},{label:"问题描述",prop:"description",showOverflowTooltip:!0},{label:"操作",component:{props:["rowData"],template:'\n <more-actions\n :menu="actions"\n width="68"\n align="center"\n />\n ',data(){return{actions:[{label:"编辑",action:()=>{this.$emit("action","handleEdit",this.rowData)}},{label:"删除",action:()=>{this.$emit("action","handleDelete",this.rowData)}}]}}},action:this.handleRowAction,width:"76"}]},title(){return(this.editId?"修改":"新建")+"问题类型"}},created(){this.getList()},methods:{getList(){this.tableLoading=!0;const e={page:this.page,per_page:20};GITEE.tools.$http.get(`${GITEE.api.goComApiPrefix()}/pull_request_problem_types`,{params:e}).then((({data:e})=>{this.problemTypeList=e.data,this.totalCount=e.meta.total_count})).finally((()=>{this.tableLoading=!1}))},getDetail(){this.detailLoading=!0,GITEE.tools.$http.get(`${GITEE.api.goComApiPrefix()}/pull_request_problem_types/${this.editId}`).then((({data:e})=>{this.detailData=e,Object.keys(this.form).forEach((e=>{this.form[e]=this.detailData[e]}))})).finally((()=>{this.detailLoading=!1}))},handleRowAction(e,...t){const i=this[e];i&&i(...t)},handleEdit(e){this.dialogVisible=!0,this.editId=e.id,this.getDetail()},handleDelete(e){this.$confirm("确定要删除该问题类型吗?","删除",{beforeClose:(t,i,n)=>{"confirm"===t?(i.confirmButtonLoading=!0,GITEE.tools.$http.delete(`${GITEE.api.goComApiPrefix()}/pull_request_problem_types/${e.id}`).then((()=>{this.$message.success(GITEE.i18n.$t("company_settings.delete_success")),this.page=1,this.getList(),n()})).finally((()=>{i.confirmButtonLoading=!1}))):n()}})},handleCreateNew(){this.dialogVisible=!0},handleDialogClose(){this.editId=0,this.detailData={},this.dialogVisible=!1,this.$refs.form.resetFields()},handleSubmit(){this.$refs.form.validate((e=>{e&&((this.editId?GITEE.tools.$http.put(`${GITEE.api.goComApiPrefix()}/pull_request_problem_types/${this.detailData.id}`,{...this.form}):GITEE.tools.$http.post(`${GITEE.api.goComApiPrefix()}/pull_request_problem_types`,{...this.form})).then((({data:e})=>{this.getList(),this.$message.success(e.message)})),this.handleDialogClose(),this.page=1)}))},changeCurrent(e){this.page=e,this.getList()}},template:'\n <div>\n <page-title>\n <span>代码评审问题类型</span>\n <el-button type="osc" @click="handleCreateNew"><i class="iconfont-new iconadd-code" /> 新建问题类型</el-button>\n </page-title>\n <common-list\n ref="table"\n :table-data="problemTypeList"\n :columns="columns"\n :loading="loading"\n :pending="pending"\n :pagination="{\n count: totalCount,\n page: page,\n per_page: 20,\n layout: \'prev, pager, next\'\n }"\n @changeCurrent="changeCurrent"\n />\n <el-dialog\n :title="title"\n :visible.sync="dialogVisible"\n width="40%"\n :on-ok="handleSubmit"\n :on-cancel="handleDialogClose"\n :confirm-loading="submitting"\n @closed="handleDialogClose"\n >\n <el-form ref="form" v-loading="detailLoading" :model="form" :rules="rules" class="w100">\n <el-form-item label="问题类型" prop="name">\n <el-input v-model.trim="form.name" maxlength="50" placeholder="请输入问题类型" />\n </el-form-item>\n <el-form-item label="问题描述" prop="description">\n <el-input v-model.trim="form.description" maxlength="200" placeholder="请输入问题描述" />\n </el-form-item>\n </el-form>\n </el-dialog>\n </div>\n '};GITEE.event.REGISTER_EVENT(window.CODE_EVENTS_NAME.AFTER_INFORMATION,(t=>{const{feature_toggles:i}=t;GITEE.schema.update({TAB_PANES:{ENTERPRISE_STANDARD:{PANE:[{name:"branchPrefix",visible:i.branch_prefix_enabled},{name:"repoGlobalSetting",visible:i.repo_global_setting_enabled},{name:"problemType",label:GITEE.i18n.$t("company_settings.code_review_question_types"),component:e}]},COMPANY_ACTION_LOG:{PANE:[{name:"server_hook_logs",visible:!1}]}}})})),GITEE.schema.update({FORM:{PUSH_SETTINGS_ENTERPRISE_SETTINGS:{ITEMS:[{key:"gpg_verify_enabled",visible:!1}]},ENTERPRISE_SETTINGS:{ITEMS:[{key:"fork_enabled",visible:!1},{key:"file_access_enabled",visible:GITEE.information.FEATURE_TOGGLES.file_access_enabled},{key:"issue_enabled",visible:GITEE.information.FEATURE_TOGGLES.repo_issue_enabled},{key:"wiki_enabled",visible:GITEE.information.FEATURE_TOGGLES.wiki_enabled}]}}})})();
|
package/dist/group.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
GITEE.event.REGISTER_EVENT(window.CODE_EVENTS_NAME.AFTER_INFORMATION,(e=>{const{feature_toggles:i}=e;GITEE.schema.update({FORM:{GROUP_BASIC_SETTINGS:{ITEMS:[{key:"name",meta:{disabled:!i.edit_group_name_enabled}},{key:"description",meta:{disabled:!i.edit_group_description_enabled}}]},REPO_GROUP_SETTINGS:{ITEMS:[{key:"permission_group",visible:i.create_subgroup_enabled}]},NEW_REPO_FROM:{ITEMS:[{key:"enterprise_branch_plan_id",visible:i.branch_specification_enabled}]},ENTERPRISE_SPACE_SETTINGS:{ITEMS:[{key:"maximum_space",visible:i.create_individual_repo_enabled},{key:"personal_projects_limit",visible:i.create_individual_repo_enabled}]}}})})),GITEE.schema.update({GROUP_NAVS:()=>[{name:"group#statistics",title:GITEE.i18n.$t("code.statistics"),permission:!1},{name:"group#template_settings",title:GITEE.i18n.$t("groups.nav.group_template_manger"),permission:!1},{name:"group#label_settings",title:GITEE.i18n.$t("settings.pr_labels_settings"),permission:!1}]});
|
package/dist/knowledge_base.css
DELETED
|
@@ -1,60 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
.knowledge_card_item {
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
padding: 14px;
|
|
6
|
-
flex: 0 0 calc(25% - 15px);
|
|
7
|
-
border-radius: 6px;
|
|
8
|
-
height: 120px;
|
|
9
|
-
border: 2px solid var(--gray-1);
|
|
10
|
-
box-shadow: 0px 1px 1px 0px rgba(9, 30, 66, 0.25), 0px 0px 1px 0px rgba(9, 30, 66, 0.31);
|
|
11
|
-
}
|
|
12
|
-
@media (max-width: 1024px) {
|
|
13
|
-
.knowledge_card_item {
|
|
14
|
-
flex: 0 0 calc(33.333% - 13.333px);
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
@media (max-width: 768px) {
|
|
18
|
-
.knowledge_card_item {
|
|
19
|
-
flex: 0 0 calc(50% - 10px);
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
@media (max-width: 480px) {
|
|
23
|
-
.knowledge_card_item {
|
|
24
|
-
flex: 0 0 100%;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
.knowledge_card_item_header {
|
|
28
|
-
display: flex;
|
|
29
|
-
gap: 12px;
|
|
30
|
-
flex: 1;
|
|
31
|
-
}
|
|
32
|
-
.knowledge_card_content {
|
|
33
|
-
flex: 1;
|
|
34
|
-
width: 0;
|
|
35
|
-
}
|
|
36
|
-
.knowledge_card_action {
|
|
37
|
-
display: flex;
|
|
38
|
-
justify-content: flex-end;
|
|
39
|
-
}
|
|
40
|
-
.knowledge_card_content_name {
|
|
41
|
-
overflow: hidden;
|
|
42
|
-
text-overflow: ellipsis;
|
|
43
|
-
white-space: nowrap;
|
|
44
|
-
}
|
|
45
|
-
.knowledge_card_content_desc {
|
|
46
|
-
overflow: hidden;
|
|
47
|
-
text-overflow: ellipsis;
|
|
48
|
-
display: -webkit-box;
|
|
49
|
-
-webkit-line-clamp: 2;
|
|
50
|
-
-webkit-box-orient: vertical;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
[data-v-09891ff9].el-form .el-form-item__content{display:flex;flex-wrap:wrap;justify-content:space-between}.dialog-footer[data-v-09891ff9]{display:flex;justify-content:flex-end;padding:16px 0 24px 0}
|
|
54
|
-
.knowledge-list[data-v-0336bef9]{display:flex;justify-content:flex-start;flex-wrap:wrap;gap:20px;margin-bottom:20px}
|
|
55
|
-
.new_knowledge_dialog .el-dialog__footer{display:none}
|
|
56
|
-
.file-upload-box[data-v-3386e3a6] .el-upload{width:100%}.file-upload-box[data-v-3386e3a6] .el-upload .el-upload-dragger{width:inherit;height:inherit;border:2px dashed var(--gray-3)}.file-upload-box[data-v-3386e3a6] .el-upload .el-upload-dragger .dropzone-message{padding:1rem;text-align:center;position:relative}.file-upload-box[data-v-3386e3a6] .el-upload .el-upload-dragger .dropzone-message .el-icon-upload{color:inherit;margin:auto}.file-upload-box[data-v-3386e3a6] .el-upload .el-upload-dragger:hover{border-color:var(--blue-6)}.file-upload-box[data-v-3386e3a6] .el-upload:focus{color:inherit}.file-upload-box[data-v-3386e3a6] .el-upload-list__item:first-child{margin-top:0}
|
|
57
|
-
.knowledge_import_file_wrap[data-v-e060f3e6] .files .el-form-item{margin-bottom:0px}.dialog-footer[data-v-e060f3e6]{display:flex;justify-content:flex-end;padding:16px 0 24px 0}.knowledge_support_file[data-v-e060f3e6]{margin-top:5px}
|
|
58
|
-
[data-v-f1ddd7ce].el-form .el-form-item__content{display:flex;flex-wrap:wrap;justify-content:space-between}.dialog-footer[data-v-f1ddd7ce]{display:flex;justify-content:flex-end;padding:16px 0 24px 0}
|
|
59
|
-
.document_status[data-v-3d36e0c4]{position:relative}.document_status[data-v-3d36e0c4]:before{position:absolute;top:50%;left:-10px;margin-top:-3px;content:"";width:6px;height:6px;background-color:currentColor;border-radius:50%}
|
|
60
|
-
.knowledge_import_file_dialog .el-dialog__footer,.rename_doc_dialog .el-dialog__footer{display:none}.knowledge_name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;flex:1}.page-title-breadcrumb{margin-right:20px;flex:1;width:0;display:flex;align-items:center;gap:5px}
|
package/dist/knowledge_base.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{var e={1989:(e,t,o)=>{var r=o(1789),n=o(401),i=o(7667),s=o(1327),a=o(1866);function l(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=n,l.prototype.get=i,l.prototype.has=s,l.prototype.set=a,e.exports=l},8407:(e,t,o)=>{var r=o(7040),n=o(4125),i=o(2117),s=o(7518),a=o(4705);function l(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=n,l.prototype.get=i,l.prototype.has=s,l.prototype.set=a,e.exports=l},7071:(e,t,o)=>{var r=o(852)(o(5639),"Map");e.exports=r},3369:(e,t,o)=>{var r=o(4785),n=o(1285),i=o(6e3),s=o(9916),a=o(5265);function l(e){var t=-1,o=null==e?0:e.length;for(this.clear();++t<o;){var r=e[t];this.set(r[0],r[1])}}l.prototype.clear=r,l.prototype.delete=n,l.prototype.get=i,l.prototype.has=s,l.prototype.set=a,e.exports=l},6384:(e,t,o)=>{var r=o(8407),n=o(7465),i=o(3779),s=o(7599),a=o(4758),l=o(4309);function c(e){var t=this.__data__=new r(e);this.size=t.size}c.prototype.clear=n,c.prototype.delete=i,c.prototype.get=s,c.prototype.has=a,c.prototype.set=l,e.exports=c},2705:(e,t,o)=>{var r=o(5639).Symbol;e.exports=r},1149:(e,t,o)=>{var r=o(5639).Uint8Array;e.exports=r},6874:e=>{e.exports=function(e,t,o){switch(o.length){case 0:return e.call(t);case 1:return e.call(t,o[0]);case 2:return e.call(t,o[0],o[1]);case 3:return e.call(t,o[0],o[1],o[2])}return e.apply(t,o)}},4636:(e,t,o)=>{var r=o(2545),n=o(5694),i=o(1469),s=o(4144),a=o(5776),l=o(6719),c=Object.prototype.hasOwnProperty;e.exports=function(e,t){var o=i(e),p=!o&&n(e),d=!o&&!p&&s(e),u=!o&&!p&&!d&&l(e),h=o||p||d||u,m=h?r(e.length,String):[],f=m.length;for(var g in e)!t&&!c.call(e,g)||h&&("length"==g||d&&("offset"==g||"parent"==g)||u&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||a(g,f))||m.push(g);return m}},6556:(e,t,o)=>{var r=o(9465),n=o(7813);e.exports=function(e,t,o){(void 0!==o&&!n(e[t],o)||void 0===o&&!(t in e))&&r(e,t,o)}},4865:(e,t,o)=>{var r=o(9465),n=o(7813),i=Object.prototype.hasOwnProperty;e.exports=function(e,t,o){var s=e[t];i.call(e,t)&&n(s,o)&&(void 0!==o||t in e)||r(e,t,o)}},8470:(e,t,o)=>{var r=o(7813);e.exports=function(e,t){for(var o=e.length;o--;)if(r(e[o][0],t))return o;return-1}},9465:(e,t,o)=>{var r=o(8777);e.exports=function(e,t,o){"__proto__"==t&&r?r(e,t,{configurable:!0,enumerable:!0,value:o,writable:!0}):e[t]=o}},3118:(e,t,o)=>{var r=o(3218),n=Object.create,i=function(){function e(){}return function(t){if(!r(t))return{};if(n)return n(t);e.prototype=t;var o=new e;return e.prototype=void 0,o}}();e.exports=i},8483:(e,t,o)=>{var r=o(5063)();e.exports=r},4239:(e,t,o)=>{var r=o(2705),n=o(9607),i=o(2333),s=r?r.toStringTag:void 0;e.exports=function(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":s&&s in Object(e)?n(e):i(e)}},9454:(e,t,o)=>{var r=o(4239),n=o(7005);e.exports=function(e){return n(e)&&"[object Arguments]"==r(e)}},8458:(e,t,o)=>{var r=o(3560),n=o(5346),i=o(3218),s=o(346),a=/^\[object .+?Constructor\]$/,l=Function.prototype,c=Object.prototype,p=l.toString,d=c.hasOwnProperty,u=RegExp("^"+p.call(d).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(e){return!(!i(e)||n(e))&&(r(e)?u:a).test(s(e))}},8749:(e,t,o)=>{var r=o(4239),n=o(1780),i=o(7005),s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s["[object Arguments]"]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s["[object Map]"]=s["[object Number]"]=s["[object Object]"]=s["[object RegExp]"]=s["[object Set]"]=s["[object String]"]=s["[object WeakMap]"]=!1,e.exports=function(e){return i(e)&&n(e.length)&&!!s[r(e)]}},313:(e,t,o)=>{var r=o(3218),n=o(5726),i=o(3498),s=Object.prototype.hasOwnProperty;e.exports=function(e){if(!r(e))return i(e);var t=n(e),o=[];for(var a in e)("constructor"!=a||!t&&s.call(e,a))&&o.push(a);return o}},2980:(e,t,o)=>{var r=o(6384),n=o(6556),i=o(8483),s=o(9783),a=o(3218),l=o(1704),c=o(6390);e.exports=function e(t,o,p,d,u){t!==o&&i(o,(function(i,l){if(u||(u=new r),a(i))s(t,o,l,p,e,d,u);else{var h=d?d(c(t,l),i,l+"",t,o,u):void 0;void 0===h&&(h=i),n(t,l,h)}}),l)}},9783:(e,t,o)=>{var r=o(6556),n=o(4626),i=o(7133),s=o(278),a=o(8517),l=o(5694),c=o(1469),p=o(9246),d=o(4144),u=o(3560),h=o(3218),m=o(8630),f=o(6719),g=o(6390),_=o(9881);e.exports=function(e,t,o,v,w,b,y){var x=g(e,o),$=g(t,o),E=y.get($);if(E)r(e,o,E);else{var k=b?b(x,$,o+"",e,t,y):void 0,C=void 0===k;if(C){var j=c($),O=!j&&d($),D=!j&&!O&&f($);k=$,j||O||D?c(x)?k=x:p(x)?k=s(x):O?(C=!1,k=n($,!0)):D?(C=!1,k=i($,!0)):k=[]:m($)||l($)?(k=x,l(x)?k=_(x):h(x)&&!u(x)||(k=a($))):C=!1}C&&(y.set($,k),w(k,$,v,b,y),y.delete($)),r(e,o,k)}}},5976:(e,t,o)=>{var r=o(6557),n=o(5357),i=o(61);e.exports=function(e,t){return i(n(e,t,r),e+"")}},6560:(e,t,o)=>{var r=o(5703),n=o(8777),i=o(6557),s=n?function(e,t){return n(e,"toString",{configurable:!0,enumerable:!1,value:r(t),writable:!0})}:i;e.exports=s},2545:e=>{e.exports=function(e,t){for(var o=-1,r=Array(e);++o<e;)r[o]=t(o);return r}},1717:e=>{e.exports=function(e){return function(t){return e(t)}}},4318:(e,t,o)=>{var r=o(1149);e.exports=function(e){var t=new e.constructor(e.byteLength);return new r(t).set(new r(e)),t}},4626:(e,t,o)=>{e=o.nmd(e);var r=o(5639),n=t&&!t.nodeType&&t,i=n&&e&&!e.nodeType&&e,s=i&&i.exports===n?r.Buffer:void 0,a=s?s.allocUnsafe:void 0;e.exports=function(e,t){if(t)return e.slice();var o=e.length,r=a?a(o):new e.constructor(o);return e.copy(r),r}},7133:(e,t,o)=>{var r=o(4318);e.exports=function(e,t){var o=t?r(e.buffer):e.buffer;return new e.constructor(o,e.byteOffset,e.length)}},278:e=>{e.exports=function(e,t){var o=-1,r=e.length;for(t||(t=Array(r));++o<r;)t[o]=e[o];return t}},8363:(e,t,o)=>{var r=o(4865),n=o(9465);e.exports=function(e,t,o,i){var s=!o;o||(o={});for(var a=-1,l=t.length;++a<l;){var c=t[a],p=i?i(o[c],e[c],c,o,e):void 0;void 0===p&&(p=e[c]),s?n(o,c,p):r(o,c,p)}return o}},4429:(e,t,o)=>{var r=o(5639)["__core-js_shared__"];e.exports=r},1463:(e,t,o)=>{var r=o(5976),n=o(6612);e.exports=function(e){return r((function(t,o){var r=-1,i=o.length,s=i>1?o[i-1]:void 0,a=i>2?o[2]:void 0;for(s=e.length>3&&"function"==typeof s?(i--,s):void 0,a&&n(o[0],o[1],a)&&(s=i<3?void 0:s,i=1),t=Object(t);++r<i;){var l=o[r];l&&e(t,l,r,s)}return t}))}},5063:e=>{e.exports=function(e){return function(t,o,r){for(var n=-1,i=Object(t),s=r(t),a=s.length;a--;){var l=s[e?a:++n];if(!1===o(i[l],l,i))break}return t}}},8777:(e,t,o)=>{var r=o(852),n=function(){try{var e=r(Object,"defineProperty");return e({},"",{}),e}catch(e){}}();e.exports=n},1957:(e,t,o)=>{var r="object"==typeof o.g&&o.g&&o.g.Object===Object&&o.g;e.exports=r},5050:(e,t,o)=>{var r=o(7019);e.exports=function(e,t){var o=e.__data__;return r(t)?o["string"==typeof t?"string":"hash"]:o.map}},852:(e,t,o)=>{var r=o(8458),n=o(7801);e.exports=function(e,t){var o=n(e,t);return r(o)?o:void 0}},5924:(e,t,o)=>{var r=o(5569)(Object.getPrototypeOf,Object);e.exports=r},9607:(e,t,o)=>{var r=o(2705),n=Object.prototype,i=n.hasOwnProperty,s=n.toString,a=r?r.toStringTag:void 0;e.exports=function(e){var t=i.call(e,a),o=e[a];try{e[a]=void 0;var r=!0}catch(e){}var n=s.call(e);return r&&(t?e[a]=o:delete e[a]),n}},7801:e=>{e.exports=function(e,t){return null==e?void 0:e[t]}},1789:(e,t,o)=>{var r=o(4536);e.exports=function(){this.__data__=r?r(null):{},this.size=0}},401:e=>{e.exports=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t}},7667:(e,t,o)=>{var r=o(4536),n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;if(r){var o=t[e];return"__lodash_hash_undefined__"===o?void 0:o}return n.call(t,e)?t[e]:void 0}},1327:(e,t,o)=>{var r=o(4536),n=Object.prototype.hasOwnProperty;e.exports=function(e){var t=this.__data__;return r?void 0!==t[e]:n.call(t,e)}},1866:(e,t,o)=>{var r=o(4536);e.exports=function(e,t){var o=this.__data__;return this.size+=this.has(e)?0:1,o[e]=r&&void 0===t?"__lodash_hash_undefined__":t,this}},8517:(e,t,o)=>{var r=o(3118),n=o(5924),i=o(5726);e.exports=function(e){return"function"!=typeof e.constructor||i(e)?{}:r(n(e))}},5776:e=>{var t=/^(?:0|[1-9]\d*)$/;e.exports=function(e,o){var r=typeof e;return!!(o=null==o?9007199254740991:o)&&("number"==r||"symbol"!=r&&t.test(e))&&e>-1&&e%1==0&&e<o}},6612:(e,t,o)=>{var r=o(7813),n=o(8612),i=o(5776),s=o(3218);e.exports=function(e,t,o){if(!s(o))return!1;var a=typeof t;return!!("number"==a?n(o)&&i(t,o.length):"string"==a&&t in o)&&r(o[t],e)}},7019:e=>{e.exports=function(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}},5346:(e,t,o)=>{var r,n=o(4429),i=(r=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";e.exports=function(e){return!!i&&i in e}},5726:e=>{var t=Object.prototype;e.exports=function(e){var o=e&&e.constructor;return e===("function"==typeof o&&o.prototype||t)}},7040:e=>{e.exports=function(){this.__data__=[],this.size=0}},4125:(e,t,o)=>{var r=o(8470),n=Array.prototype.splice;e.exports=function(e){var t=this.__data__,o=r(t,e);return!(o<0||(o==t.length-1?t.pop():n.call(t,o,1),--this.size,0))}},2117:(e,t,o)=>{var r=o(8470);e.exports=function(e){var t=this.__data__,o=r(t,e);return o<0?void 0:t[o][1]}},7518:(e,t,o)=>{var r=o(8470);e.exports=function(e){return r(this.__data__,e)>-1}},4705:(e,t,o)=>{var r=o(8470);e.exports=function(e,t){var o=this.__data__,n=r(o,e);return n<0?(++this.size,o.push([e,t])):o[n][1]=t,this}},4785:(e,t,o)=>{var r=o(1989),n=o(8407),i=o(7071);e.exports=function(){this.size=0,this.__data__={hash:new r,map:new(i||n),string:new r}}},1285:(e,t,o)=>{var r=o(5050);e.exports=function(e){var t=r(this,e).delete(e);return this.size-=t?1:0,t}},6e3:(e,t,o)=>{var r=o(5050);e.exports=function(e){return r(this,e).get(e)}},9916:(e,t,o)=>{var r=o(5050);e.exports=function(e){return r(this,e).has(e)}},5265:(e,t,o)=>{var r=o(5050);e.exports=function(e,t){var o=r(this,e),n=o.size;return o.set(e,t),this.size+=o.size==n?0:1,this}},4536:(e,t,o)=>{var r=o(852)(Object,"create");e.exports=r},3498:e=>{e.exports=function(e){var t=[];if(null!=e)for(var o in Object(e))t.push(o);return t}},1167:(e,t,o)=>{e=o.nmd(e);var r=o(1957),n=t&&!t.nodeType&&t,i=n&&e&&!e.nodeType&&e,s=i&&i.exports===n&&r.process,a=function(){try{return i&&i.require&&i.require("util").types||s&&s.binding&&s.binding("util")}catch(e){}}();e.exports=a},2333:e=>{var t=Object.prototype.toString;e.exports=function(e){return t.call(e)}},5569:e=>{e.exports=function(e,t){return function(o){return e(t(o))}}},5357:(e,t,o)=>{var r=o(6874),n=Math.max;e.exports=function(e,t,o){return t=n(void 0===t?e.length-1:t,0),function(){for(var i=arguments,s=-1,a=n(i.length-t,0),l=Array(a);++s<a;)l[s]=i[t+s];s=-1;for(var c=Array(t+1);++s<t;)c[s]=i[s];return c[t]=o(l),r(e,this,c)}}},5639:(e,t,o)=>{var r=o(1957),n="object"==typeof self&&self&&self.Object===Object&&self,i=r||n||Function("return this")();e.exports=i},6390:e=>{e.exports=function(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}},61:(e,t,o)=>{var r=o(6560),n=o(1275)(r);e.exports=n},1275:e=>{var t=Date.now;e.exports=function(e){var o=0,r=0;return function(){var n=t(),i=16-(n-r);if(r=n,i>0){if(++o>=800)return arguments[0]}else o=0;return e.apply(void 0,arguments)}}},7465:(e,t,o)=>{var r=o(8407);e.exports=function(){this.__data__=new r,this.size=0}},3779:e=>{e.exports=function(e){var t=this.__data__,o=t.delete(e);return this.size=t.size,o}},7599:e=>{e.exports=function(e){return this.__data__.get(e)}},4758:e=>{e.exports=function(e){return this.__data__.has(e)}},4309:(e,t,o)=>{var r=o(8407),n=o(7071),i=o(3369);e.exports=function(e,t){var o=this.__data__;if(o instanceof r){var s=o.__data__;if(!n||s.length<199)return s.push([e,t]),this.size=++o.size,this;o=this.__data__=new i(s)}return o.set(e,t),this.size=o.size,this}},346:e=>{var t=Function.prototype.toString;e.exports=function(e){if(null!=e){try{return t.call(e)}catch(e){}try{return e+""}catch(e){}}return""}},5703:e=>{e.exports=function(e){return function(){return e}}},7813:e=>{e.exports=function(e,t){return e===t||e!=e&&t!=t}},6557:e=>{e.exports=function(e){return e}},5694:(e,t,o)=>{var r=o(9454),n=o(7005),i=Object.prototype,s=i.hasOwnProperty,a=i.propertyIsEnumerable,l=r(function(){return arguments}())?r:function(e){return n(e)&&s.call(e,"callee")&&!a.call(e,"callee")};e.exports=l},1469:e=>{var t=Array.isArray;e.exports=t},8612:(e,t,o)=>{var r=o(3560),n=o(1780);e.exports=function(e){return null!=e&&n(e.length)&&!r(e)}},9246:(e,t,o)=>{var r=o(8612),n=o(7005);e.exports=function(e){return n(e)&&r(e)}},4144:(e,t,o)=>{e=o.nmd(e);var r=o(5639),n=o(5062),i=t&&!t.nodeType&&t,s=i&&e&&!e.nodeType&&e,a=s&&s.exports===i?r.Buffer:void 0,l=(a?a.isBuffer:void 0)||n;e.exports=l},3560:(e,t,o)=>{var r=o(4239),n=o(3218);e.exports=function(e){if(!n(e))return!1;var t=r(e);return"[object Function]"==t||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t}},1780:e=>{e.exports=function(e){return"number"==typeof e&&e>-1&&e%1==0&&e<=9007199254740991}},3218:e=>{e.exports=function(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}},7005:e=>{e.exports=function(e){return null!=e&&"object"==typeof e}},8630:(e,t,o)=>{var r=o(4239),n=o(5924),i=o(7005),s=Function.prototype,a=Object.prototype,l=s.toString,c=a.hasOwnProperty,p=l.call(Object);e.exports=function(e){if(!i(e)||"[object Object]"!=r(e))return!1;var t=n(e);if(null===t)return!0;var o=c.call(t,"constructor")&&t.constructor;return"function"==typeof o&&o instanceof o&&l.call(o)==p}},6719:(e,t,o)=>{var r=o(8749),n=o(1717),i=o(1167),s=i&&i.isTypedArray,a=s?n(s):r;e.exports=a},1704:(e,t,o)=>{var r=o(4636),n=o(313),i=o(8612);e.exports=function(e){return i(e)?r(e,!0):n(e)}},2492:(e,t,o)=>{var r=o(2980),n=o(1463)((function(e,t,o){r(e,t,o)}));e.exports=n},5062:e=>{e.exports=function(){return!1}},9881:(e,t,o)=>{var r=o(8363),n=o(1704);e.exports=function(e){return r(e,n(e))}}},t={};function o(r){var n=t[r];if(void 0!==n)return n.exports;var i=t[r]={id:r,loaded:!1,exports:{}};return e[r](i,i.exports,o),i.loaded=!0,i.exports}o.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return o.d(t,{a:t}),t},o.d=(e,t)=>{for(var r in t)o.o(t,r)&&!o.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),o.nmd=e=>(e.paths=[],e.children||(e.children=[]),e),(()=>{"use strict";var e=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("PageTitle",[e._v("\n "+e._s(e.$t("knowledge.knowledge"))+"\n "),o("ElButton",{attrs:{type:"osc"},on:{click:e.handleNewKnowledge}},[o("i",{staticClass:"iconfont-new iconadd-code"}),e._v("\n "+e._s(e.$t_join("create","knowledge.knowledge"))+"\n ")])],1),e._v(" "),e.knowledgeList.length||e.loading?[o("div",{directives:[{name:"loading",rawName:"v-loading",value:e.loading,expression:"loading"}],staticClass:"knowledge-list"},e._l(e.knowledgeList,(function(t,r){return o("KnowledgeCard",{key:r,attrs:{item:t},on:{update:function(o){return e.handleUpdate(t)},delete:function(o){return e.handleDelete(t)}}})})),1),e._v(" "),e.loading?e._e():o("ElPagination",{attrs:{"current-page":e.page,"page-size":e.perPage,"page-sizes":[10,20,30,40],layout:"prev, adaption, next, jumper, sizes",total:e.totalCount,background:""},on:{"current-change":e.handleCurrentChange,"size-change":e.handleSizeChange}})]:o("NoData")],2)};e._withStripped=!0;var t=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"knowledge_card_item cursor-pointer",on:{click:e.handleclick}},[o("div",{staticClass:"knowledge_card_item_header"},[o("svg",{staticClass:"icon",attrs:{t:"1757991239604",viewBox:"0 0 1024 1024",version:"1.1",xmlns:"http://www.w3.org/2000/svg","p-id":"6796",width:"40",height:"40"}},[o("path",{attrs:{d:"M0 0m307.2 0l409.6 0q307.2 0 307.2 307.2l0 409.6q0 307.2-307.2 307.2l-409.6 0q-307.2 0-307.2-307.2l0-409.6q0-307.2 307.2-307.2Z",fill:"#1389FF","p-id":"6797"}}),e._v(" "),o("path",{attrs:{d:"M716.8 215.296H307.2a307.2 307.2 0 0 0-307.2 307.2v201.728a307.2 307.2 0 0 1 307.2-307.2h409.6a307.2 307.2 0 0 1 307.2 307.2v-201.728a307.2 307.2 0 0 0-307.2-307.2z",fill:"#2993FF",opacity:".5","p-id":"6798"}}),e._v(" "),o("path",{attrs:{d:"M716.8 417.024H307.2A307.2 307.2 0 0 0 0 720.384a298.752 298.752 0 0 0 18.432 100.864A307.2 307.2 0 0 1 307.2 618.752h409.6a307.2 307.2 0 0 1 288.512 202.496 298.752 298.752 0 0 0 18.688-100.864 307.2 307.2 0 0 0-307.2-303.36z",fill:"#42A1FF",opacity:".5","p-id":"6799"}}),e._v(" "),o("path",{attrs:{d:"M1007.104 821.76a307.2 307.2 0 0 0-288.512-202.752h-409.6c-136.448 0-252.16 75.008-292.096 192.768a304.64 304.64 0 0 0 55.04 100.352 304.896 304.896 0 0 1 237.056-112.896h409.6a305.664 305.664 0 0 1 237.312 112.896 311.552 311.552 0 0 0 51.2-90.368z",fill:"#5AACFF",opacity:".5","p-id":"6800"}}),e._v(" "),o("path",{attrs:{d:"M716.8 799.232H307.2a304.896 304.896 0 0 0-237.056 112.896A307.2 307.2 0 0 0 307.2 1024h409.6a307.2 307.2 0 0 0 237.056-111.872A304.896 304.896 0 0 0 716.8 799.232z",fill:"#76BBFF",opacity:".5","p-id":"6801"}}),o("path",{attrs:{d:"M715.264 225.28v163.584L632.576 307.2l-80.896 82.688V225.28h-204.8v573.44H716.8a82.688 82.688 0 0 0 82.688-81.92V307.2a85.248 85.248 0 0 0-84.224-81.92z m0 409.6h-286.72v-40.192h286.72z m0-123.136h-286.72v-40.192h286.72zM224.512 307.2v409.6A82.432 82.432 0 0 0 307.2 798.72V225.28A82.688 82.688 0 0 0 224.512 307.2z",fill:"#FFFFFF","p-id":"6802"}})]),e._v(" "),o("div",{staticClass:"knowledge_card_content"},[o("ElTooltip",{attrs:{content:e.item.name,"show-overflow-tooltip":""}},[o("div",{staticClass:"knowledge_card_content_name"},[e._v(e._s(e.item.name))])]),e._v(" "),o("ElTooltip",{attrs:{content:e.item.description}},[o("div",{staticClass:"knowledge_card_content_desc"},[e._v(e._s(e.item.description))])])],1)]),e._v(" "),o("div",{staticClass:"knowledge_card_action"},[o("GiteePopover",{attrs:{"popper-class":"code-popover-wrap"}},[o("ul",{staticClass:"action-menu-container",attrs:{slot:"popover"},slot:"popover"},e._l(e.menu,(function(t){return o("li",{key:t.prop,staticClass:"action-item",on:{click:t.action}},[o("div",{staticClass:"item"},[e._v("\n "+e._s(t.label)+"\n ")])])})),0),e._v(" "),o("i",{staticClass:"el-icon-more",attrs:{slot:"reference"},slot:"reference"})])],1)])};function r(e,t,o,r,n,i,s,a){var l,c="function"==typeof e?e.options:e;if(t&&(c.render=t,c.staticRenderFns=o,c._compiled=!0),r&&(c.functional=!0),i&&(c._scopeId="data-v-"+i),s?(l=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),n&&n.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(s)},c._ssrRegister=l):n&&(l=a?function(){n.call(this,(c.functional?this.parent:this).$root.$options.shadowRoot)}:n),l)if(c.functional){c._injectStyles=l;var p=c.render;c.render=function(e,t){return l.call(t),p(e,t)}}else{var d=c.beforeCreate;c.beforeCreate=d?[].concat(d,l):[l]}return{exports:e,options:c}}t._withStripped=!0;const n=r({name:"KnowledgeCard",components:{GiteePopover:window.comps.GiteePopover},props:{item:{type:Object,default:()=>({})}},data(){return{menu:[{label:this.$t("edit"),prop:"edit",action:this.edit},{label:this.$t("delete"),prop:"delete",action:this.delete}]}},methods:{edit(){this.$emit("update",this.item)},delete(){this.$emit("delete",this.item)},handleclick(){this.$router.push({name:"company#knowledge_base_detail",query:{id:this.item.id}})}}},t,[],!1,null,null,null).exports;var i=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("FormCommon",{ref:"form",staticClass:"w100",attrs:{"form-items":e.formItems,form:e.form,rules:e.rules,"form-key":"KUNOWLEDGE_SETTINGS"},on:{"form-change":e.handleFormChange}}),e._v(" "),o("div",{staticClass:"dialog-footer"},[o("ElButton",{on:{click:e.closeDialog}},[e._v(e._s(e.$t("cancel")))]),e._v(" "),o("ElButton",{attrs:{type:"primary",disabled:e.loading},on:{click:e.handleOk}},[e._v("\n "+e._s(this.isDetail?this.$t("save"):this.$t("create"))+"\n ")])],1)],1)};i._withStripped=!0;var s=o(2492),a=o.n(s);const l={methods:{getDotObj(e){return e.split(".").reduce(((e,t)=>e[t]),this)},setForm(e,t){const o=this.getDotObj(e),r=this.getDotObj(t);o.forEach((e=>{e.key_not_in_form||this.$set(r,e.key,e.value),e.extraValue&&Object.keys(e.extraValue).forEach((t=>{this.$set(r,t,e.extraValue[t])}))}))},setRule(e,t){const o=this.getDotObj(e);let r=this.getDotObj(t);o.forEach((e=>{r=a()(r,e.rule)}))},getParams(e,t){const o=this.getDotObj(e),r=this.getDotObj(t);return o.reduce(((e,t)=>(Object.hasOwnProperty.call(t,"visible")&&!t.visible||(t.extraValue&&Object.keys(t.extraValue).forEach((t=>{e[t]=r[t]})),t.key_not_in_form||(e[t.key]=r[t.key])),e)),{})},handleFormChange(e,t="form"){const o=this.getDotObj(t);Object.keys(e).forEach((t=>{o[t]=e[t]}))}}},c=r({name:"NewKnowledge",components:{FormCommon:window.comps.FormCommon},mixins:[l],props:{model:{type:Object,default:()=>({})}},data:()=>({loading:!1,form:{},rules:{}}),computed:{formItems(){return[{key:"name",value:"",label:this.$t("name"),visible:!0,customComponent:"ElInput",meta:{maxlength:"100",placeholder:this.$t_join("please_enter","name")},rule:{name:[{required:!0,trigger:"blur",message:this.$t_join("please_enter","name")}]}},{key:"description",value:"",label:this.$t("description"),visible:!0,customComponent:"ElInput",meta:{type:"textarea",maxlength:"255",autosize:{minRows:3,maxRows:5},placeholder:this.$t_join("please_enter","description")}}]},isDetail(){return this.model&&this.model.id}},watch:{model:{handler(){this.form={...this.model}}}},created(){this.setForm("formItems","form"),this.setRule("formItems","rules"),this.model&&(this.form={...this.model})},methods:{closeDialog(){this.SCHEMA.FORM_MAPS.KUNOWLEDGE_SETTINGS.clearValidate(),this.$store.commit("hideDialog")},saveLabel(){this.loading=!0;let e=null;if(this.isDetail){const t={name:this.form.name,description:this.form.description};e=this.api.knowledge.updateKnowledge(this.model.id,t)}else e=this.api.knowledge.newKnowledge(this.form);e.then((e=>{this.closeDialog(),this.$emit("submit"),this.$message.success(this.$t("company_settings.save_success"))})).finally((()=>{this.loading=!1}))},handleOk(){this.form.name&&(this.form.name=this.form.name.trim()),this.SCHEMA.FORM_MAPS.KUNOWLEDGE_SETTINGS.validate((e=>{e&&this.saveLabel()}))}}},i,[],!1,null,"09891ff9",null).exports,p=r({name:"KnowledgeBase",components:{KnowledgeCard:n},data:()=>({knowledgeList:[],page:1,perPage:20,totalCount:0,model:null,loading:!1}),computed:{isDetail(){return this.model&&this.model.id}},created(){this.getListData()},methods:{getListData(){this.loading=!0,this.api.knowledge.getKnowledgeList({page:this.page,per_page:this.perPage}).then((({data:e})=>{this.totalCount=e.meta.total_count,this.knowledgeList=e.data||[]})).finally((()=>{this.loading=!1}))},handleNewKnowledge(){this.model=null,this.toEditKnowloege()},handleUpdate(e){this.model=e,this.toEditKnowloege()},toEditKnowloege(){this.$store.commit("updateDialog",{props:{title:this.isDetail?this.$t_join("edit","knowledge.knowledge"):this.$t_join("create","knowledge.knowledge"),width:"600px",customClass:"new_knowledge_dialog"},slots:{default:{render:e=>e(c,{props:{model:this.model},on:{submit:this.newLabelCallBack}})},footer:{render:e=>e(null)}}}),this.$store.commit("showDialog")},handleDelete(e){this.$confirm(this.$t("knowledge.delete_knowledge_tips"),this.$t("tips"),{dangerouslyUseHTMLString:!0,beforeClose:(t,o,r)=>{"confirm"===t?(o.confirmButtonLoading=!0,this.api.knowledge.deleteKnowledge(e.id).then((()=>{this.$message.success(this.$t("delete_success")),this.getListData(),r()})).finally((()=>{o.confirmButtonLoading=!1}))):r()}})},newLabelCallBack(){!this.isDetail&&(this.page=1),this.getListData()},handleSizeChange(e){this.perPage=e,this.page=1,this.getListData()},handleCurrentChange(e){this.page=e,this.getListData()}}},e,[],!1,null,"0336bef9",null).exports;var d=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("PageTitle",[o("div",{staticClass:"page-title-breadcrumb"},[o("RouterLink",{attrs:{to:{name:"company#knowledge_base"}}},[e._v("\n "+e._s(""+e.$t("knowledge.knowledge"))+"\n ")]),e._v(" "),o("span",[e._v(e._s(">"))]),e._v(" "),o("ElTooltip",{attrs:{content:e.knowledgeName,"show-overflow-tooltip":""}},[o("span",{staticClass:"knowledge_name"},[e._v(e._s(e.knowledgeName))])])],1),e._v(" "),o("ElButton",{attrs:{type:"osc"},on:{click:e.handleNewFile}},[o("i",{staticClass:"iconfont-new iconadd-code"}),e._v("\n "+e._s(e.$t("knowledge.add_file"))+"\n ")])],1),e._v(" "),o("CommonList",{attrs:{"table-data":e.tableData,columns:e.columns,loading:e.loading,pending:e.loading&&!!e.tableData.length,pagination:{count:e.totalCount,page:e.page,per_page:e.perPage}},on:{changeSize:e.changeSize,changeCurrent:e.changeCurrent}})],1)};d._withStripped=!0;var u=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",{staticClass:"knowledge_import_file_wrap"},[o("FormCommon",{ref:"formCommon",staticClass:"w100",attrs:{"form-items":e.formItems,form:e.form,rules:e.rules,"form-key":"KUNOWLEDGE_FILE"},on:{"form-change":e.handleFormChange}}),e._v(" "),o("div",{staticClass:"dialog-footer"},[o("ElButton",{on:{click:e.handleClose}},[e._v(e._s(e.$t("cancel")))]),e._v(" "),o("ElButton",{attrs:{type:"primary",disabled:e.form.files&&0===e.form.files.length||e.uploading},on:{click:e.handleSubmit}},[e._v("\n "+e._s(e.$t("save"))+"\n ")])],1)],1)};u._withStripped=!0;var h=function(){var e=this,t=e.$createElement,o=e._self._c||t;return e.disabledUpload?o("ElUpload",{ref:"fileUploader",staticClass:"file-upload-box",attrs:{drag:"",action:e.action,accept:e.accept.map((function(e){return"."+e})).join(","),"on-progress":e.onProgress,"on-success":e.onSuccess,"on-error":e.onError,"before-upload":e.beforeUpload,"file-list":e.files,"auto-upload":e.autoUpload,"on-change":e.handleChange,limit:e.limit}},[o("div",{staticClass:"dropzone-message"},[o("i",{staticClass:"el-icon-upload",staticStyle:{"font-size":"32px"}}),e._v(" "),o("div",[e._v(e._s(e.$t("code.new.drag_drop_upload_files")))])]),e._v(" "),e._t("tip")],2):e._e()};h._withStripped=!0;const m=r({name:"FileUploader",props:{action:{type:String,required:!0},value:{type:Array,default:()=>[]},path:{type:String,default:""},uploading:Boolean,type:{type:String,required:!0},disabledUpload:{type:Boolean,default:!0},accept:{type:Array,default:()=>[]},autoUpload:{type:Boolean,default:!1},limit:{type:Number,default:1}},data:()=>({files:[]}),computed:{maxSize:()=>200},watch:{value:{immediate:!0,handler(e){this.files=e.slice()}}},methods:{onProgress(e,t){},onSuccess(e,t){this.$emit("success",e)},onError(e,t){this.showError(e)},beforeUpload(e){if(this.accept.length){const t=e.name.split(".").pop().toLowerCase();if(!this.accept.includes(t))return this.$message.error(this.$t("knowledge.not_support_file")),!1}return this.files.some((t=>t.name===e.name))?(this.$message.error(this.$t("lfs.file_already")),!1):e.size>1024*this.maxSize*1024?(this.$message.error(`${this.$t("lfs.file_size")} ${window.GITEE.tools.fileSizeFilter(e.size)} ${this.$t("lfs.has_exceeded")} ${this.maxSize}M ${this.$t("lfs.limit")}`),!1):void this.$emit("update:uploading",!0)},showError(e){e.message?this.$message.error(JSON.parse(e.message).message):this.$message.error(this.$t("lfs.upload_failed"))},handleChange(e){if(!this.autoUpload&&this.accept.length){const t=e.name.split(".").pop().toLowerCase();if(!this.accept.includes(t))return this.$message.error(this.$t("knowledge.not_support_file")),void this.$refs.fileUploader.clearFiles()}}}},h,[],!1,null,"3386e3a6",null).exports,f=r({name:"KnowlegeImportFile",components:{FormCommon:window.comps.FormCommon},mixins:[l],data:()=>({loading:!1,form:{},rules:{},acceptFile:["md","csv"],uploading:!1}),computed:{formItems(){return[{key:"files",visible:!0,ref:"uploadFile",customComponent:m,extraComponent:{template:`<div class="knowledge_support_file">${this.$t("knowledge.support_file")}</div>`},meta:{action:this.attachFilePath,limit:1,type:"import_knowledge",accept:this.acceptFile,autoUpload:!1},listeners:{progress:this.onProgress,success:this.fileUploadSuccess}}]},attachFilePath(){return this.api.knowledge.uploadKnowlegeFile(this.$route.query.id)}},created(){this.setForm("formItems","form"),this.setRule("formItems","rules")},methods:{onProgress(e){this.uploading=100!==e},handleClose(){this.$store.commit("hideDialog")},handleSubmit(){this.$refs.formCommon.$refs.uploadFile[0].$refs.fileUploader.submit()},fileUploadSuccess(){this.handleClose(),this.$emit("success")}}},u,[],!1,null,"e060f3e6",null).exports;var g=function(){var e=this,t=e.$createElement;return(e._self._c||t)("MoreActions",{attrs:{menu:e.actions,width:"80"}})};g._withStripped=!0;const _=r({name:"LabelColumnAction",components:{MoreActions:window.comps.MoreActions},props:{rowData:Object},computed:{actions(){return[{label:this.$t("wiki.tree.rename"),prop:"rename",action:this.rename},{label:this.$t("delete"),prop:"delete",action:this.delete}]}},methods:{rename(){this.$emit("action","renameDocument",this.rowData)},delete(){this.$emit("action","deleteDocument",this.rowData)}}},g,[],!1,null,null,null).exports;var v=function(){var e=this,t=e.$createElement,o=e._self._c||t;return o("div",[o("FormCommon",{ref:"form",staticClass:"w100",attrs:{"form-items":e.formItems,form:e.form,rules:e.rules,"form-key":"RENAME_KNOW_FILE"},on:{"form-change":e.handleFormChange}}),e._v(" "),o("div",{staticClass:"dialog-footer"},[o("ElButton",{on:{click:e.closeDialog}},[e._v(e._s(e.$t("cancel")))]),e._v(" "),o("ElButton",{attrs:{type:"primary",disabled:e.loading},on:{click:e.handleOk}},[e._v("\n "+e._s(this.$t("save"))+"\n ")])],1)],1)};v._withStripped=!0;const w=r({name:"RenameDoc",components:{FormCommon:window.comps.FormCommon},mixins:[l],props:{model:{type:Object,default:()=>({})}},data:()=>({loading:!1,form:{},rules:{}}),computed:{formItems(){return[{key:"document_name",value:"",label:this.$t("wiki.tree.rename"),visible:!0,customComponent:"ElInput",meta:{maxlength:"100",placeholder:this.$t_join("please_enter","name")},rule:{name:[{required:!0,trigger:"blur",message:this.$t_join("please_enter","name")}]}}]},isDetail(){return this.model&&this.model.id}},watch:{model:{handler(){this.form.document_name=this.model.document_name}}},created(){this.setForm("formItems","form"),this.setRule("formItems","rules"),this.model&&(this.form.document_name=this.model.document_name)},methods:{closeDialog(){this.SCHEMA.FORM_MAPS.RENAME_KNOW_FILE.clearValidate(),this.$store.commit("hideDialog")},saveLabel(){this.loading=!0,this.api.knowledge.updateknowledgeFileName(this.$route.query.id,this.model.id,{document_name:this.form.document_name}).then((e=>{this.closeDialog(),this.$emit("submit"),this.$message.success(this.$t("company_settings.save_success"))})).finally((()=>{this.loading=!1}))},handleOk(){this.form.name&&(this.form.name=this.form.name.trim()),this.SCHEMA.FORM_MAPS.RENAME_KNOW_FILE.validate((e=>{e&&this.saveLabel()}))}}},v,[],!1,null,"f1ddd7ce",null).exports;var b=function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"document_status",class:e.documentStatus.class},[e._v("\n "+e._s(e.documentStatus.text)+"\n")])};b._withStripped=!0;const y=r({name:"DocumentStatus",props:{rowData:{type:Object}},computed:{documentStatus(){const e=this.rowData.index_status;return{text:e,class:{索引中:"text-muted",可用:"text-green"}[e]||""}}}},b,[],!1,null,"3d36e0c4",null).exports,x=r({name:"KnowledgeDetail",components:{KnowlegeImportFile:f},data:()=>({tableData:[],totalCount:0,page:1,perPage:20,loading:!1,visible:!1,knowledgeName:""}),computed:{columns(){return[{label:"ID",prop:"id"},{label:this.$t("name"),prop:"document_name","show-overflow-tooltip":!0},{label:this.$t("knowledge.chart_total"),prop:"char_total","show-overflow-tooltip":!0},{label:this.$t("knowledge.upload_at"),prop:"created_at","show-overflow-tooltip":!0,formatter:e=>moment(e.created_at).format("YYYY-MM-DD HH:mm:ss")},{label:this.$t("status"),prop:"index_status","show-overflow-tooltip":!0,component:y},{label:this.$t("action"),prop:"action",width:80,component:_,action:this.handleRowAction}]}},mounted(){this.getKnowlegeDetail(),this.getList()},methods:{getKnowlegeDetail(){this.api.knowledge.getKnowledgeDetail(this.$route.query.id).then((({data:e})=>{this.knowledgeName=e.name}))},changeSize(e){this.perPage=e,this.page=1,this.getList()},changeCurrent(e){this.page=e,this.getList()},changeTab(){this.page=1,this.tableData=[],this.totalCount=0,this.getList()},getList(){this.loading=!0,this.api.knowledge.knowledgeDetailList(this.$route.query.id,{page:this.page,per_page:this.perPage}).then((({data:e})=>{this.totalCount=e.meta.total_count,this.tableData=e.data||[]})).finally((()=>{this.loading=!1}))},handleNewFile(){this.$store.commit("updateDialog",{props:{title:this.$t("knowledge.upload_doc"),width:"600px",customClass:"knowledge_import_file_dialog"},slots:{default:{render:e=>e(f,{on:{success:this.uploadSuccess}})},footer:{render:()=>null}}}),this.$store.commit("showDialog"),this.visible=!0},renameDocument(e){this.$store.commit("updateDialog",{props:{title:this.$t("wiki.tree.rename"),width:"600px",customClass:"rename_doc_dialog"},slots:{default:{render:t=>t(w,{props:{model:e},on:{submit:this.getList}})},footer:{render:e=>e(null)}}}),this.$store.commit("showDialog")},deleteDocument(e){this.$confirm(this.$t("knowledge.delete_document_tips"),this.$t("tips"),{dangerouslyUseHTMLString:!0,beforeClose:(t,o,r)=>{"confirm"===t?(o.confirmButtonLoading=!0,this.api.knowledge.deleteknowledgeFile(this.$route.query.id,e.id).then((()=>{this.$message.success(this.$t("delete_success")),this.getList(),r()})).finally((()=>{o.confirmButtonLoading=!1}))):r()}})},uploadSuccess(){this.page=1,this.getList()}}},d,[],!1,null,null,null).exports;window.GITEE.router.getRouter().addRoutes([{path:`/:enterprise/${window.GITEE.breakingChanges?.URL_FLAG?":flag(_source|_code)":"_source"}/_/knowledge_base`,name:"company#knowledge_base",component:p,meta:{title:()=>"知识库"}},{path:`/:enterprise/${window.GITEE.breakingChanges?.URL_FLAG?":flag(_source|_code)":"_source"}/_/knowledge_base/detail`,name:"company#knowledge_base_detail",component:x,meta:{title:()=>"知识库"}}]),GITEE.schema.update({FORM:{KUNOWLEDGE_SETTINGS:{VISIBLE:null,DISABLED:null,ITEMS:[]},KUNOWLEDGE_FILE:{VISIBLE:null,DISABLED:null,ITEMS:[]},RENAME_KNOW_FILE:{VISIBLE:null,DISABLED:null,ITEMS:[]}}}),window.GITEE.api.register("knowledge","getKnowledgeList",(e=>window.GITEE.tools.$http.get("/api/xtreme/api/knowledge_bases",{params:e}))),window.GITEE.api.register("knowledge","newKnowledge",(e=>window.GITEE.tools.$http.post("/api/xtreme/api/knowledge_bases",e))),window.GITEE.api.register("knowledge","deleteKnowledge",(e=>window.GITEE.tools.$http.delete(`/api/xtreme/api/knowledge_bases/${e}`))),window.GITEE.api.register("knowledge","updateKnowledge",((e,t)=>window.GITEE.tools.$http.put(`/api/xtreme/api/knowledge_bases/${e}`,t))),window.GITEE.api.register("knowledge","getKnowledgeDetail",(e=>window.GITEE.tools.$http.get(`/api/xtreme/api/knowledge_bases/${e}`))),window.GITEE.api.register("knowledge","knowledgeDetailList",((e,t)=>window.GITEE.tools.$http.get(`/api/xtreme/api/knowledge_bases/${e}/documents`,{params:t}))),window.GITEE.api.register("knowledge","uploadKnowlegeFile",(e=>`/api/xtreme/api/knowledge_bases/${e}/documents`)),window.GITEE.api.register("knowledge","knowledgeModels",(()=>window.GITEE.tools.$http.get("/api/xtreme/api/index_models"))),window.GITEE.api.register("knowledge","updateknowledgeFileName",((e,t,o)=>window.GITEE.tools.$http.put(`/api/xtreme/api/knowledge_bases/${e}/documents/${t}`,o))),window.GITEE.api.register("knowledge","deleteknowledgeFile",((e,t)=>window.GITEE.tools.$http.delete(`/api/xtreme/api/knowledge_bases/${e}/documents/${t}`)))})()})();
|
package/dist/project.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";function e(){if(!(this instanceof e))return new e;this.size=0,this.uid=0,this.selectors=[],this.selectorObjects={},this.indexes=Object.create(this.indexes),this.activeIndexes=[]}var t=window.document.documentElement,r=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.oMatchesSelector||t.msMatchesSelector;e.prototype.matchesSelector=function(e,t){return r.call(e,t)},e.prototype.querySelectorAll=function(e,t){return t.querySelectorAll(e)},e.prototype.indexes=[];var n=/^#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;e.prototype.indexes.push({name:"ID",selector:function(e){var t;if(t=e.match(n))return t[0].slice(1)},element:function(e){if(e.id)return[e.id]}});var o=/^\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;e.prototype.indexes.push({name:"CLASS",selector:function(e){var t;if(t=e.match(o))return t[0].slice(1)},element:function(e){var t=e.className;if(t){if("string"==typeof t)return t.split(/\s/);if("object"==typeof t&&"baseVal"in t)return t.baseVal.split(/\s/)}}});var i,s=/^((?:[\w\u00c0-\uFFFF\-]|\\.)+)/g;e.prototype.indexes.push({name:"TAG",selector:function(e){var t;if(t=e.match(s))return t[0].toUpperCase()},element:function(e){return[e.nodeName.toUpperCase()]}}),e.prototype.indexes.default={name:"UNIVERSAL",selector:function(){return!0},element:function(){return[!0]}},i="function"==typeof window.Map?window.Map:function(){function e(){this.map={}}return e.prototype.get=function(e){return this.map[e+" "]},e.prototype.set=function(e,t){this.map[e+" "]=t},e}();var a=/((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g;function c(e,t){var r,n,o,i,s,c,l=(e=e.slice(0).concat(e.default)).length,u=t,d=[];do{if(a.exec(""),(o=a.exec(u))&&(u=o[3],o[2]||!u))for(r=0;r<l;r++)if(s=(c=e[r]).selector(o[1])){for(n=d.length,i=!1;n--;)if(d[n].index===c&&d[n].key===s){i=!0;break}i||d.push({index:c,key:s});break}}while(o);return d}function l(e,t){var r,n,o;for(r=0,n=e.length;r<n;r++)if(o=e[r],t.isPrototypeOf(o))return o}function u(e,t){return e.id-t.id}e.prototype.logDefaultIndexUsed=function(){},e.prototype.add=function(e,t){var r,n,o,s,a,u,d,f,h=this.activeIndexes,p=this.selectors,v=this.selectorObjects;if("string"==typeof e){for(v[(r={id:this.uid++,selector:e,data:t}).id]=r,d=c(this.indexes,e),n=0;n<d.length;n++)s=(f=d[n]).key,(a=l(h,o=f.index))||((a=Object.create(o)).map=new i,h.push(a)),o===this.indexes.default&&this.logDefaultIndexUsed(r),(u=a.map.get(s))||(u=[],a.map.set(s,u)),u.push(r);this.size++,p.push(e)}},e.prototype.remove=function(e,t){if("string"==typeof e){var r,n,o,i,s,a,l,u,d=this.activeIndexes,f=this.selectors=[],h=this.selectorObjects,p={},v=1===arguments.length;for(r=c(this.indexes,e),o=0;o<r.length;o++)for(n=r[o],i=d.length;i--;)if(a=d[i],n.index.isPrototypeOf(a)){if(l=a.map.get(n.key))for(s=l.length;s--;)(u=l[s]).selector!==e||!v&&u.data!==t||(l.splice(s,1),p[u.id]=!0);break}for(o in p)delete h[o],this.size--;for(o in h)f.push(h[o].selector)}},e.prototype.queryAll=function(e){if(!this.selectors.length)return[];var t,r,n,o,i,s,a,c,l={},d=[],f=this.querySelectorAll(this.selectors.join(", "),e);for(t=0,n=f.length;t<n;t++)for(i=f[t],r=0,o=(s=this.matches(i)).length;r<o;r++)l[(c=s[r]).id]?a=l[c.id]:(a={id:c.id,selector:c.selector,data:c.data,elements:[]},l[c.id]=a,d.push(a)),a.elements.push(i);return d.sort(u)},e.prototype.matches=function(e){if(!e)return[];var t,r,n,o,i,s,a,c,l,d,f,h=this.activeIndexes,p={},v=[];for(t=0,o=h.length;t<o;t++)if(c=(a=h[t]).element(e))for(r=0,i=c.length;r<i;r++)if(l=a.map.get(c[r]))for(n=0,s=l.length;n<s;n++)!p[f=(d=l[n]).id]&&this.matchesSelector(e,d.selector)&&(p[f]=!0,v.push(d));return v.sort(u)};var d=null,f=null,h=[];function p(e,t){var r=[];function n(){var e=r;r=[],t(e)}return function(){for(var t=arguments.length,o=Array(t),i=0;i<t;i++)o[i]=arguments[i];r.push(o),1===r.length&&v(e,n)}}function v(e,t){f||(f=new MutationObserver(m)),d||(d=e.createElement("div"),f.observe(d,{attributes:!0})),h.push(t),d.setAttribute("data-twiddle",""+Date.now())}function m(){var e=h;h=[];for(var t=0;t<e.length;t++)try{e[t]()}catch(e){setTimeout((function(){throw e}),0)}}var b=new WeakMap,g=new WeakMap,y=new WeakMap,S=new WeakMap;function w(e,t){for(var r=0;r<t.length;r++){var n=t[r],o=n[0],i=n[1],s=n[2];o===N?(_(s,i),x(s,i)):o===k?O(s,i):o===C&&A(e.observers,i)}}function _(e,t){if(t instanceof e.elementConstructor){var r=b.get(t);if(r||(r=[],b.set(t,r)),-1===r.indexOf(e.id)){var n=void 0;if(e.initialize&&(n=e.initialize.call(void 0,t)),n){var o=g.get(t);o||(o={},g.set(t,o)),o[""+e.id]=n}r.push(e.id)}}}function x(e,t){if(t instanceof e.elementConstructor){var r=S.get(t);if(r||(r=[],S.set(t,r)),-1===r.indexOf(e.id)){e.elements.push(t);var n=g.get(t),o=n?n[""+e.id]:null;if(o&&o.add&&o.add.call(void 0,t),e.subscribe){var i=e.subscribe.call(void 0,t);if(i){var s=y.get(t);s||(s={},y.set(t,s)),s[""+e.id]=i}}e.add&&e.add.call(void 0,t),r.push(e.id)}}}function O(e,t){if(t instanceof e.elementConstructor){var r=S.get(t);if(r){var n=e.elements.indexOf(t);if(-1!==n&&e.elements.splice(n,1),-1!==(n=r.indexOf(e.id))){var o=g.get(t),i=o?o[""+e.id]:null;if(i&&i.remove&&i.remove.call(void 0,t),e.subscribe){var s=y.get(t),a=s?s[""+e.id]:null;a&&a.unsubscribe&&a.unsubscribe()}e.remove&&e.remove.call(void 0,t),r.splice(n,1)}0===r.length&&S.delete(t)}}}function A(e,t){var r=S.get(t);if(r){for(var n=r.slice(0),o=0;o<n.length;o++){var i=e[n[o]];if(i){var s=i.elements.indexOf(t);-1!==s&&i.elements.splice(s,1);var a=g.get(t),c=a?a[""+i.id]:null;c&&c.remove&&c.remove.call(void 0,t);var l=y.get(t),u=l?l[""+i.id]:null;u&&u.unsubscribe&&u.unsubscribe(),i.remove&&i.remove.call(void 0,t)}}S.delete(t)}}var E=null;function M(e){return"matches"in e||"webkitMatchesSelector"in e||"mozMatchesSelector"in e||"oMatchesSelector"in e||"msMatchesSelector"in e}var N=1,k=2,C=3;function I(e,t,r){for(var n=0;n<r.length;n++){var o=r[n];if(M(o))for(var i=e.selectorSet.matches(o),s=0;s<i.length;s++){var a=i[s].data;t.push([N,o,a])}if("querySelectorAll"in o)for(var c=e.selectorSet.queryAll(o),l=0;l<c.length;l++)for(var u=c[l],d=u.data,f=u.elements,h=0;h<f.length;h++)t.push([N,f[h],d])}}function T(e,t,r){for(var n=0;n<r.length;n++){var o=r[n];if("querySelectorAll"in o){t.push([C,o]);for(var i=o.querySelectorAll("*"),s=0;s<i.length;s++)t.push([C,i[s]])}}}function F(e,t,r){if(M(r))for(var n=e.selectorSet.matches(r),o=0;o<n.length;o++){var i=n[o].data;t.push([N,r,i])}if("querySelectorAll"in r){var s=S.get(r);if(s)for(var a=0;a<s.length;a++){var c=e.observers[s[a]];c&&(e.selectorSet.matchesSelector(r,c.selector)||t.push([k,r,c]))}}}var q="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},D=0;function j(t){var r,n,o;this.rootNode=9===t.nodeType?t.documentElement:t,this.ownerDocument=9===t.nodeType?t:t.ownerDocument,this.observers=[],this.selectorSet=new e,this.mutationObserver=new MutationObserver(R.bind(this,this)),this._scheduleAddRootNodes=p(this.ownerDocument,L.bind(this,this)),this._handleThrottledChangedTargets=p(this.ownerDocument,G.bind(this,this)),this.rootNode.addEventListener("change",P.bind(this,this),!1),r=this.ownerDocument,n=z.bind(this,this),"interactive"===(o=r.readyState)||"complete"===o?v(r,n):r.addEventListener("DOMContentLoaded",v(r,n))}function z(e){e.mutationObserver.observe(e.rootNode,{childList:!0,attributes:!0,subtree:!0}),e._scheduleAddRootNodes()}function L(e){var t=[];I(e,t,[e.rootNode]),w(e,t)}function R(e,t){var r=[];(function(e,t,r){for(var n=0;n<r.length;n++){var o=r[n];"childList"===o.type?(I(e,t,o.addedNodes),T(0,t,o.removedNodes)):"attributes"===o.type&&F(e,t,o.target)}(function(e){if(null===E){var t=e.createElement("div"),r=e.createElement("div"),n=e.createElement("div");t.appendChild(r),r.appendChild(n),t.innerHTML="",E=n.parentNode!==r}return E})(e.ownerDocument)&&function(e,t){for(var r=0;r<e.observers.length;r++){var n=e.observers[r];if(n)for(var o=n.elements,i=0;i<o.length;i++){var s=o[i];s.parentNode||t.push([C,s])}}}(e,t)})(e,r,t),w(e,r)}function P(e,t){e._handleThrottledChangedTargets(t.target)}function G(e,t){var r=[];!function(e,t,r){for(var n=0;n<r.length;n++)for(var o=r[n],i=o.form?o.form.elements:e.rootNode.querySelectorAll("input"),s=0;s<i.length;s++)F(e,t,i[s])}(e,r,t),w(e,r)}j.prototype.disconnect=function(){this.mutationObserver.disconnect()},j.prototype.observe=function(e,t){var r=void 0;"function"==typeof t?r={selector:e,initialize:t}:"object"===(void 0===t?"undefined":q(t))?(r=t).selector=e:r=e;var n=this,o={id:D++,selector:r.selector,initialize:r.initialize,add:r.add,remove:r.remove,subscribe:r.subscribe,elements:[],elementConstructor:r.hasOwnProperty("constructor")?r.constructor:this.ownerDocument.defaultView.Element,abort:function(){n._abortObserving(o)}};return this.selectorSet.add(o.selector,o),this.observers[o.id]=o,this._scheduleAddRootNodes(),o},j.prototype._abortObserving=function(e){for(var t=e.elements,r=0;r<t.length;r++)O(e,t[r]);this.selectorSet.remove(e.selector,e),delete this.observers[e.id]},j.prototype.triggerObservers=function(e){var t=[];!function(e,t,r){if("querySelectorAll"in r){F(e,t,r);for(var n=r.querySelectorAll("*"),o=0;o<n.length;o++)F(e,t,n[o])}}(this,t,e),w(this,t)};var U=void 0;function V(){var e;return(U||(U=new j(window.document)),e=U).observe.apply(e,arguments)}GITEE.schema.update({ACTION_KEYS:{PROJECTS_LIST:[{prop:"fork_repo",permission:!1}]},REPO_NAVS:[{name:"project#repository_images",title:GITEE.i18n.$t("router.repository_images"),permission:!1}]}),V(".bread_crumbs_nav .right-action .el-button-group",{add(e){e.querySelector(".iconfork")&&(e.style.display="none")}}),V(".code-project-list .common-nav #tab-forked",{add(e){e.style.display="none"}}),GITEE.tools.registerNamedMixin("Avatar",{computed:{avatarComponent:()=>"span"}}),GITEE.tools.registerNamedMixin("RepoPermissionConfigSettings",{computed:{extraBranchSettingsFormItems(){return[{key:"protected_branch_rule_enabled",value:!1,visible:!0,customComponent:"FormItemSwitch",meta:{label:this.$t("branch_manage.rule.title"),description:this.$t("company_settings.repo_global_init_text.repo_fun_permission_desc",{label:this.$t("branch_manage.rule.title")})}},{key:"enterprise_branch_plan_enabled",value:!1,visible:!0,customComponent:"FormItemSwitch",meta:{label:this.$t("branch_specification.use_enterprise_branch_specification"),description:this.repoSettingsLabelDesc("branch_specification.use_enterprise_branch_specification")}}]}}})})();
|
package/dist/pull_requests.css
DELETED
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
.problem-type {
|
|
2
|
-
margin-top: -8px;
|
|
3
|
-
margin-left: 22px;
|
|
4
|
-
}
|
|
5
|
-
.comment_rejected--more--message {
|
|
6
|
-
width: 100%;
|
|
7
|
-
display: inline-block;
|
|
8
|
-
text-overflow: ellipsis;
|
|
9
|
-
overflow: hidden;
|
|
10
|
-
white-space: nowrap;
|
|
11
|
-
margin-left: 5px;
|
|
12
|
-
}
|
|
13
|
-
.problem-type-loading-text {
|
|
14
|
-
text-align: center;
|
|
15
|
-
}
|
|
16
|
-
.problem_type_filter {
|
|
17
|
-
margin: 0;
|
|
18
|
-
}
|
package/dist/pull_requests.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{"use strict";var e=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("div",{staticStyle:{width:"50%"}},[a("el-checkbox",{attrs:{value:e.value},on:{change:function(t){return e.$emit("input",t)}}},[e._v(e._s(e.$t("pulls.automatic.desc")))]),e._v(" "),e.value?a("el-form-item",{attrs:{prop:"tag_type",label:e.$t("pulls.automatic.tag_type")}},[a("el-select",{attrs:{placeholder:e.$t_join("please_select","pulls.automatic.tag_type")},on:{change:e.tagTypeChange},model:{value:e.form.tag_type,callback:function(t){e.$set(e.form,"tag_type",t)},expression:"form.tag_type"}},e._l(e.tagType,(function(e){return a("el-option",{key:e.value,attrs:{value:e.value,label:e.label}})})),1)],1):e._e(),e._v(" "),e.value?a("el-form-item",{attrs:{prop:e.value?"tag_name":""},scopedSlots:e._u([{key:"label",fn:function(){return[a("span",[e._v(e._s("custom_tag"===e.form.tag_type?e.$t_join("please_enter","pulls.automatic.version"):e.$t_join("please_select","pulls.automatic.version")))]),e._v(" "),a("el-tooltip",{attrs:{placement:"right",content:e.$t("pulls.automatic.tooltip")}},[a("i",{staticClass:"iconfont-new iconremark"})])]},proxy:!0}],null,!1,2997091695)},[e._v(" "),"custom_tag"===e.form.tag_type?[a("el-input",{attrs:{maxlength:"128",placeholder:e.$t_join("please_enter","pulls.automatic.version")},model:{value:e.form.tag_name,callback:function(t){e.$set(e.form,"tag_name",t)},expression:"form.tag_name"}})]:[a("el-select",{attrs:{value:e.form.tag_name,placeholder:e.$t_join("please_select","pulls.automatic.version"),"is-block":"",filterable:"","remote-method":e.getTagList},on:{"visible-change":e.handleVisibleChange,change:function(t){return e.$emit("form-change",{tag_name:t})}}},e._l(e.list,(function(e){return a("el-option",{key:e,attrs:{value:e,label:e}})})),1)]],2):e._e()],1)};function t(e,t,a,s,o,r,n,l){var i,p="function"==typeof e?e.options:e;if(t&&(p.render=t,p.staticRenderFns=a,p._compiled=!0),s&&(p.functional=!0),r&&(p._scopeId="data-v-"+r),n?(i=function(e){(e=e||this.$vnode&&this.$vnode.ssrContext||this.parent&&this.parent.$vnode&&this.parent.$vnode.ssrContext)||"undefined"==typeof __VUE_SSR_CONTEXT__||(e=__VUE_SSR_CONTEXT__),o&&o.call(this,e),e&&e._registeredComponents&&e._registeredComponents.add(n)},p._ssrRegister=i):o&&(i=l?function(){o.call(this,(p.functional?this.parent:this).$root.$options.shadowRoot)}:o),i)if(p.functional){p._injectStyles=i;var _=p.render;p.render=function(e,t){return i.call(t),_(e,t)}}else{var c=p.beforeCreate;p.beforeCreate=c?[].concat(c,i):[i]}return{exports:e,options:p}}e._withStripped=!0;const a=t({name:"autoCreateTag",props:{form:{type:Object,default:()=>({})},value:{type:Boolean,default:!1},sourceBranch:{type:String,default:""}},data(){return{list:[],caches:{done:!1,list:[]},tagType:[{label:this.$t("pulls.automatic.custom_tag_name"),value:"custom_tag"},{label:this.$t("pulls.automatic.integrated_delivery"),value:"integrated_delivery"}]}},methods:{tagTypeChange(){this.form.tag_name=""},handleVisibleChange(e){e&&(this.caches.done?this.list=this.caches.list:this.getTagList())},getTagList(e=""){GITEE.tools.$http.get(`${GITEE.api.goApiProjectPrefix()}/pull_requests/auto_tags?keyword=${e}&source_branch=${this.sourceBranch}`).then((({data:t})=>{this.list=t.data,e||(this.caches.list=t.data,this.caches.done=!0)}))}}},e,[],!1,null,null,null).exports;var s=function(){var e=this,t=e.$createElement,a=e._self._c||t;return["enable_create_tag","edit_tag_name","disable_create_tag"].includes(e.item.action)?a("span",[e._v("\n "+e._s(e.item.desc)+"\n "),a("span",[e._v(e._s(e.item.data||""))])]):e._e()};s._withStripped=!0;const o=t({name:"createTagActionDesc",props:{item:{type:Object,default:()=>({})}}},s,[],!1,null,null,null).exports;var r=function(){var e=this,t=e.$createElement,a=e._self._c||t;return e.prProblemTypeEnabled?a("el-form-item",{staticClass:"problem-type",attrs:{prop:"problem_type_ids"}},[a("div",[e._v("选择评审问题类型")]),e._v(" "),a("el-select",{attrs:{multiple:"",filterable:"",remote:"",clearable:"",placeholder:"请选择","remote-method":e.remoteMethods,"infinite-scroll":"","infinite-scroll-load":e.loadMore,"is-block":""},on:{change:function(t){return e.$emit("form-change",{problem_type_ids:t})},"visible-change":e.handleVisibleChange},model:{value:e.problem_type_ids,callback:function(t){e.problem_type_ids=t},expression:"problem_type_ids"}},[e._l(e.problemList,(function(e){return a("el-tooltip",{key:e.id,attrs:{content:e.name,"show-overflow-tooltip":""}},[a("el-option",{attrs:{label:e.name,value:e.id}})],1)})),e._v(" "),e.loading?a("div",{staticClass:"problem-type-loading-text"},[a("i",{staticClass:"el-icon-loading"})]):e._e()],2)],1):e._e()};r._withStripped=!0;const n=t({name:"prCommentproblemType",props:{form:{type:Object,default:()=>({})}},data:()=>({problemList:[],problem_type_ids:[],meta:{current_page:1,total_count:0,total_pages:0},loading:!1,keywords:""}),computed:{prProblemTypeEnabled(){return"rejected"===this.form.state&&GITEE.vuex.store.state.project.pr_problem_type_enabled}},watch:{"form.state":{handler(){this.problem_type_ids=[]}}},methods:{getList(){this.loading=!0;const e={page:this.meta.current_page,per_page:20,keywords:this.keywords};GITEE.tools.$http.get(`${GITEE.api.goComApiPrefix()}/pull_request_problem_types`,{params:e}).then((({data:e})=>{this.problemList=[...this.problemList,...e.data],this.meta=e.meta})).finally((()=>{this.loading=!1}))},loadMore(){!this.loading&&this.meta.current_page<this.meta.total_pages&&(this.meta.current_page+=1,this.getList())},remoteMethods(e){this.meta.current_page=1,this.problemList=[],this.keywords=e,this.getList()},handleVisibleChange(e){this.keywords="",e&&(this.meta.current_page=1,this.problemList=[],this.getList())}}},r,[],!1,null,null,null).exports;var l=function(){var e=this,t=e.$createElement,a=e._self._c||t;return"rejected"===e.data.data.state&&e.data.data.problem_type_refs.length?a("el-tooltip",{attrs:{content:e.moreMessage,"show-overflow-tooltip":""}},[a("span",{staticClass:"comment_rejected--more--message"},[e._v(e._s(e.moreMessage))])]):e._e()};l._withStripped=!0;const i=t({name:"commentMoreMessage",props:{data:{type:Object,default:()=>({})}},computed:{moreMessage(){return"评审问题类型: "+this.data.data.problem_type_refs?.map((e=>e.name)).join(",")}}},l,[],!1,null,null,null).exports;var p=function(){var e=this,t=e.$createElement,a=e._self._c||t;return"rejected"===e.data.approve_status?a("el-tooltip",{attrs:{content:e.moreMessage,"show-overflow-tooltip":""}},[a("span",{staticClass:"comment_rejected--more--message"},[e._v(e._s(e.moreMessage))])]):e._e()};p._withStripped=!0;const _=t({name:"reviewerCommentReason",props:{data:{type:Object,default:()=>({})}},computed:{moreMessage(){return this.data.problem_type_refs.map((e=>e.name)).join(",")}}},p,[],!1,null,null,null).exports;var c=function(){var e=this,t=e.$createElement,a=e._self._c||t;return a("common-dropdown",{attrs:{"default-name":"问题类型",width:"300",filterable:"",remote:"",multiple:"","rencent-options":e.problemList,"selected-options":e.selectedOptions,loading:e.loading,border:!1,scroll:""},on:{"update:selectedOptions":function(t){e.selectedOptions=t},"update:selected-options":function(t){e.selectedOptions=t},show:e.handleShow,search:e.handleSearch,hide:e.handleHide,scroll:e.loadMore},scopedSlots:e._u([{key:"item",fn:function(t){return[a("el-tooltip",{attrs:{content:t.item.name,"show-overflow-tooltip":""}},[a("span",{staticClass:"comment_rejected--more--message problem_type_filter"},[e._v(e._s(t.item.name))])])]}}])})};c._withStripped=!0;const m=t({name:"problemTypeFilter",props:{clear:{type:Boolean,default:!1}},data:()=>({loading:!1,problemList:[],selectedOptions:[],meta:{current_page:1,total_count:0,total_pages:0},keywords:""}),watch:{clear:{handler(e){e&&(this.selectedOptions=[])}}},methods:{getList(e=""){this.loading=!0;const t={page:this.meta.current_page,per_page:20,keywords:e};GITEE.tools.$http.get(`${GITEE.api.goComApiPrefix()}/pull_request_problem_types`,{params:t}).then((({data:e})=>{const t=[...this.problemList,...e.data];t.forEach((e=>e.value=e.id)),this.problemList=t,this.meta=e.meta})).finally((()=>{this.loading=!1}))},handleSearch(e){this.meta.current_page=1,this.keywords=e,this.problemList=[],this.getList(e)},handleHide(){this.$emit("input",this.selectedOptions.map((e=>e.id)))},loadMore(){!this.loading&&this.meta.current_page<this.meta.total_pages&&(this.meta.current_page+=1,this.getList())},handleShow(){this.meta.current_page=1,this.problemList=[],this.getList()}}},c,[],!1,null,null,null).exports;GITEE.i18n.mergeI18n("zh-CN",{pulls:{question_type:"问题类型",review_question_type:"请选择评审问题类型",automatic:{desc:"合并后自动创建tag",tag_type:"选择创建方式",custom_tag_name:"自定义版本号",integrated_delivery:"下拉选择集成交付版本号",version:"版本号",tooltip:"仅能包含字母、数字、'-'、'_'、'/'、'.',只能以字母、数字为开头和结尾,长度为1-128字符",tag_name_erorr:"版本号不能为空",tag_name_erorr_tip:"当前版本不符合tag正则表达式({err_message}),请重新选择版本或者手动创建tag"}}}),GITEE.i18n.mergeI18n("en-US",{pulls:{question_type:"Question type",review_question_type:"Please select the type of review question",automatic:{desc:"Automatically create tags after merging",tag_type:"Select creation method",custom_tag_name:"Custom version number",integrated_delivery:"Pull down to select the integrated delivery version number",version:"VERSION",tooltip:"Can only contain letters, numbers, '-', '_', '/', '.', Can only start and end with letters and numbers, with a length of 1-128 characters",tag_name_erorr:"Version number cannot be empty",tag_name_erorr_tip:"The current version does not comply with tag regular expressions ({err_message}) Please select a new version or manually create a tag"}}}),GITEE.event.REGISTER_EVENT("QUERY_PULL_REQUEST_READY",(e=>{GITEE.schema.update({payload:{FORM:{PULL_REQUEST:{ITEMS:[{key:"create_tag_enabled",pre_key:"prune_branch",value:!1,extraValue:{tag_name:"",tag_type:"custom_tag"},rule:{tag_name:[{required:!0,validator:(t,a,s)=>{if(a){const t={tag_name:a};GITEE.tools.$http.get(`${GITEE.api.goApiProjectPrefix()}/tags/check_name`,{params:t,no_error_message:!0}).then((()=>{e&&s()}),(e=>{s(new Error(`${GITEE.i18n.$t("pulls.automatic.tag_name_erorr_tip",{err_message:e.response.data.message})}`))}))}else a?s():s(new Error(GITEE.i18n.$t("pulls.automatic.tag_name_erorr")))},trigger:["change","blur"]}]},visible:e.target_is_default_branch,customComponent:a,meta:{sourceBranch:e.source_branch||e.pull_request.source_branch}}]}}},need_update:!0})})),GITEE.schema.update({PULL_REQUEST:{TIME_LINE_LOG:{ACTIONS:["enable_create_tag","edit_tag_name","disable_create_tag"],ACTION_ICONS:{enable_create_tag:"icontag",edit_tag_name:"icontag",disable_create_tag:"icontag"},ACTION_DESC_COMPONENT:o},COMMENT_MORE_MESSAGE_COMPONENT:i,REVIEWER_COMMENT_REASON_COMPONENT:_,MORE_FILTERS:[{label:GITEE.i18n.$t("pulls.question_type"),key:"problem_type_ids",defalut_value:[],config_key:"pr_problem_type",component:m}]},FORM:{PR_COMMENT:{ITEMS:[{key:"state",rule:{problem_type_ids:[{required:!0,message:GITEE.i18n.$t("pulls.review_question_type"),trigger:"blur"}]},extraValue:{problem_type_ids:[]},extraComponent:n}]}}})})();
|
package/dist/settings.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
(()=>{const e={name:"CheckCardDirectorAndStatus",props:{form:{type:Object,default:()=>({})}},data:()=>({statuses:[],selected_statuses:[],valid_card_statuses:{},need_card_director:!1}),watch:{"form.card_enable":{handler(e){e&&(this.need_card_director=GITEE.vuex.store.state.project.need_card_director,this.valid_card_statuses=GITEE.vuex.store.state.project.valid_card_statuses,GITEE.tools.$http.get(`${GITEE.api.goComApiPrefix()}/programs/${GITEE.vuex.store.state.project.program_uuid}/cards/card_statuses_list`).then((({data:e})=>{this.statuses=e;const t=Object.keys(this.valid_card_statuses);this.selected_statuses=e.filter((e=>t.includes(e.id)))})))},immediate:!0}},methods:{handleChange(){this.valid_card_statuses=this.selected_statuses.reduce(((e,t)=>(e[t.id]=t.name,e)),{}),this.$emit("form-change",{valid_card_statuses:this.valid_card_statuses,need_card_director:this.need_card_director})}},template:'\n <div v-if="form.card_enable" class="ml-2 mb-1">\n <el-checkbox v-model="need_card_director" @change="handleChange">代码提交人必须为卡片负责人</el-checkbox>\n <div class="mb-1">设置允许提交代码的卡片状态</div>\n <el-select v-model="selected_statuses" value-key="id" filterable multiple is-block @change="handleChange">\n <el-option v-for="item in statuses" :key="item.id" :label="item.name" :value="item" />\n </el-select>\n </div>\n '},t=(e=!0)=>({key:"team_id",value:"",label:"选择关联系统",customComponent:{template:'\n <el-select \n v-model="associatedSystem" \n value-key="id"\n is-block\n filterable\n remote\n clearable\n :remote-method="remoteMethods" \n infinite-scroll\n :infinite-scroll-load="loadMore"\n @change="handleChange"\n @visible-change="(v) => v && remoteMethods(\'\')"\n >\n <el-option v-for="item in optionsList" :key="item.id" :label="item.application_name" :value="item">\n {{ item.application_id + \'_\' + item.application_name }}\n </el-option>\n <div v-if="loading" class="problem-type-loading-text">\n <i class="el-icon-loading" />\n </div>\n </el-select>\n ',props:{form:{type:Object,default:()=>({})}},data:()=>({optionsList:[],associatedSystem:{},loading:!1,keywords:"",meta:{current_page:1,total_count:0,total_pages:0}}),watch:{form:{handler(t){e||t.team_id||t.system_code||this.handleChange(this.associatedSystem)},immediate:!0,deep:!0},"form.namespace_id"(){this.associatedSystem={},this.handleChange(this.associatedSystem)}},computed:{beNotRepoSettings:()=>!e&&GITEE.vuex.store.state.project.team_info,resetOptionsList(){return this.beNotRepoSettings&&!this.keywords}},created(){this.beNotRepoSettings&&(this.associatedSystem=GITEE.vuex.store.state.project.team_info,this.optionsList=[GITEE.vuex.store.state.project.team_info])},methods:{getList(){this.loading=!0;const t=e?{namespace_id:this.form.namespace_id}:{program_uuid:GITEE.vuex.store.state.project.program_uuid},s={page:this.meta.current_page,per_page:20,keywords:this.keywords,...t};GITEE.tools.$http.get(`${GITEE.api.goComApiPrefix()}/project_team_refs`,{params:s}).then((({data:e})=>{const t=this.resetOptionsList?e.data.filter((e=>e.id!==GITEE.vuex.store.state.project.team_info.id)):e.data;this.optionsList=[...this.optionsList,...t],this.meta=e.meta})).finally((()=>{this.loading=!1}))},loadMore(){!this.loading&&this.meta.current_page<this.meta.total_pages&&(this.meta.current_page+=1,this.getList())},remoteMethods(e){this.meta.current_page=1,this.optionsList=this.resetOptionsList?[GITEE.vuex.store.state.project.team_info]:[],this.keywords=e,this.getList()},handleChange(e){this.$emit("form-change",{system_code:e?.application_id||"",team_id:e?.id||""})}}}}),s={pre_key:"team_id",key:"system_code",value:"",label:"系统编号",customComponent:"el-input",meta:{class:"w100",disabled:!0}},a=(e,a=!0)=>[{pre_key:e,...t(a)},s];GITEE.schema.update({FORM:{PUSH_SETTINGS:{ITEMS:[{key:"card_enable",extraValue:{valid_card_statuses:{},need_card_director:!1},extraComponent:e},{key:"gpg_verify_enabled",visible:!1}]},BASIC_SETTINGS:{ITEMS:[{key:"tag_ids",visible:!1},...a("status",!1)]},NEW_REPO_FROM:{ITEMS:a("ignore")},IMPORT_REPO:{ITEMS:a("tags")},NEW_REPO_FROM_TEMPLATE:{ITEMS:a("tags")},REPO_SETTINGS:{ITEMS:[{key:"fork_enabled",visible:!1}]}}}),GITEE.event.REGISTER_EVENT("PROJECT_STORE_UPDATED",(e=>{GITEE.schema.update({FORM:{REPO_SETTINGS:{ITEMS:[{key:"pr_problem_type_enabled",value:!1,customComponent:"FormItemSwitch",meta:{disabled:e.pr_problem_type_readonly_enabled,label:"Pull Resquest问题类型",description:"启用问题类型"}}]}}})}))})();
|
package/dist/xtreme.css
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
.ai-reviewer-md-editor[data-v-8dc8a020]{background:#fff;max-height:500px;overflow:auto;min-height:unset}.ai-reviewer-md-editor [id][data-v-8dc8a020]:before,.ai-reviewer-md-editor .actions[data-v-8dc8a020]{display:none}.footer_actions[data-v-8dc8a020]{padding:8px 12px}
|
|
2
|
-
.branch_match[data-v-5a765c5e]{display:block}.rule_wrap[data-v-5a765c5e]{display:flex;gap:20px}.rule_wrap .el-input[data-v-5a765c5e]{flex:1}
|