зеркало из https://github.com/nextcloud/activity.git
fix(deps): Fix npm audit
Signed-off-by: GitHub <noreply@github.com>
This commit is contained in:
Родитель
bfd9537f05
Коммит
be3eff4056
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -1,2 +1,2 @@
|
|||
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".activity[data-v-7e59872d]{display:flex;flex-direction:column;overflow:hidden;height:100%}.activity__actions[data-v-7e59872d]{display:flex;flex-direction:column;width:100%}.activity__list[data-v-7e59872d]{flex-grow:1;overflow:scroll}.activity__empty-content[data-v-7e59872d]{height:100%}[data-v-7e59872d] .empty-content__icon span{background-size:64px;width:64px;height:64px}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
||||
import{b as c,d as l,e as u,v}from"./NcCheckboxRadioSwitch-D2GbHtCS-2fCS121m.chunk.mjs";import{d as f,e as p,o as d,b as y,k as g,t as o}from"./index-CL4CgOWu.chunk.mjs";import{a as m,b as h,N as _,c as b}from"./Activity-DhAQUK_2.chunk.mjs";import{g as r,a as I,b as A}from"./api-wy7VpNU4.chunk.mjs";import{l as S}from"./logger-CimJwhmx.chunk.mjs";import{l as P}from"./activity-sidebar.mjs";import"./_commonjsHelpers-D9DevfhH.chunk.mjs";const x=f({__name:"ActivitySidebarPlugin",props:{plugin:null,fileInfo:null},emits:["reload-activities"],setup(t,{emit:i}){const s=t,a=p();return d(()=>{var n;return s.plugin.mount(a.value,{context:(n=y())==null?void 0:n.proxy,fileInfo:s.fileInfo,reload:()=>i("reload-activities")})}),g(()=>s.plugin.unmount()),{__sfc:!0,props:s,emit:i,attachTarget:a}}});var C=function(){var t=this,i=t._self._c;return t._self._setupProxy,i("div",{ref:"attachTarget"})},N=[],w=c(x,C,N,!1,null,null);const k=w.exports,E={name:"ActivityTab",components:{Activity:m,NcEmptyContent:h,NcIconSvgWrapper:_,NcLoadingIcon:l,ActivitySidebarPlugin:k},data(){return{error:"",loading:!0,fileInfo:null,activities:[],lightningBoltSVG:P,sidebarPlugins:[]}},mounted(){this.sidebarPlugins=r()},methods:{async update(t){this.sidebarPlugins=[];let i=r();i.length>0&&this.$nextTick(()=>{this.sidebarPlugins=i}),this.fileInfo=t,this.resetState(),await this.getActivities()},async getActivities(){try{this.loading=!0;const t=await this.processActivities(await this.loadRealActivities()),i=await I({fileInfo:this.fileInfo});this.activities=[...t,...i].sort((s,a)=>a.timestamp-s.timestamp)}catch(t){this.error=o("activity","Unable to load the activity list"),console.error("Error loading the activity list",t)}finally{this.loading=!1}},resetState(){this.loading=!0,this.error="",this.activities=[]},async loadRealActivities(){try{const{data:t}=await u.get(v("apps/activity/api/v2/activity/filter"),{params:{format:"json",object_type:"files",object_id:this.fileInfo.id}});return t.ocs.data}catch(t){if(t.response!==void 0&&t.response.status===304)return[];throw e}},processActivities(t){t=t.map(s=>new b(s)),S.debug("Processed ".concat(t.length," activity(ies)"),{activities:t,fileInfo:this.fileInfo});const i=A();return t.filter(s=>!i||i.every(a=>a(s)))},t:o}};var T=function(){var t=this,i=t._self._c;return i("div",{staticClass:"activity",class:{"icon-loading":t.loading}},[t.error?i("NcEmptyContent",{attrs:{name:t.error},scopedSlots:t._u([{key:"icon",fn:function(){return[i("NcIconSvgWrapper",{attrs:{svg:t.lightningBoltSVG}})]},proxy:!0}],null,!1,63559581)}):[t.sidebarPlugins.length>0?i("div",{staticClass:"activity__actions"},t._l(t.sidebarPlugins,function(s,a){return i("ActivitySidebarPlugin",{key:a,attrs:{plugin:s,"file-info":t.fileInfo},on:{"reload-activities":function(n){return t.getActivities()}}})}),1):t._e(),t.loading?i("NcEmptyContent",{staticClass:"activity__empty-content",attrs:{name:t.t("activity","Loading activities")},scopedSlots:t._u([{key:"icon",fn:function(){return[i("NcLoadingIcon")]},proxy:!0}],null,!1,3085876643)}):t.activities.length===0?i("NcEmptyContent",{staticClass:"activity__empty-content",attrs:{name:t.t("activity","No activity yet")},scopedSlots:t._u([{key:"icon",fn:function(){return[i("span",{staticClass:"icon-activity"})]},proxy:!0}])}):i("ul",{staticClass:"activity__list"},t._l(t.activities,function(s){return i("Activity",{key:s.id,attrs:{activity:s,"show-previews":!1},on:{reload:function(a){return t.getActivities()}}})}),1)]],2)},j=[],L=c(E,T,j,!1,null,"7e59872d");const U=L.exports;export{U as default};
|
||||
import{b as c,e as l,f as u,v}from"./NcCheckboxRadioSwitch-CvMEEI9x-BV2YqD7g.chunk.mjs";import{d as f,r as p,o as d,g as y,f as g,t as o}from"./index-FHDXXk0Q.chunk.mjs";import{a as m,b as h,N as _,c as b}from"./Activity-iWE732P6.chunk.mjs";import{g as r,a as I,b as A}from"./api-Bbja46ws.chunk.mjs";import{l as S}from"./logger-DdfSSqJ9.chunk.mjs";import{l as P}from"./activity-sidebar.mjs";import"./_commonjsHelpers-D9DevfhH.chunk.mjs";const x=f({__name:"ActivitySidebarPlugin",props:{plugin:null,fileInfo:null},emits:["reload-activities"],setup(t,{emit:i}){const s=t,a=p();return d(()=>{var n;return s.plugin.mount(a.value,{context:(n=y())==null?void 0:n.proxy,fileInfo:s.fileInfo,reload:()=>i("reload-activities")})}),g(()=>s.plugin.unmount()),{__sfc:!0,props:s,emit:i,attachTarget:a}}});var C=function(){var t=this,i=t._self._c;return t._self._setupProxy,i("div",{ref:"attachTarget"})},N=[],w=c(x,C,N,!1,null,null);const k=w.exports,E={name:"ActivityTab",components:{Activity:m,NcEmptyContent:h,NcIconSvgWrapper:_,NcLoadingIcon:l,ActivitySidebarPlugin:k},data(){return{error:"",loading:!0,fileInfo:null,activities:[],lightningBoltSVG:P,sidebarPlugins:[]}},mounted(){this.sidebarPlugins=r()},methods:{async update(t){this.sidebarPlugins=[];let i=r();i.length>0&&this.$nextTick(()=>{this.sidebarPlugins=i}),this.fileInfo=t,this.resetState(),await this.getActivities()},async getActivities(){try{this.loading=!0;const t=await this.processActivities(await this.loadRealActivities()),i=await I({fileInfo:this.fileInfo});this.activities=[...t,...i].sort((s,a)=>a.timestamp-s.timestamp)}catch(t){this.error=o("activity","Unable to load the activity list"),console.error("Error loading the activity list",t)}finally{this.loading=!1}},resetState(){this.loading=!0,this.error="",this.activities=[]},async loadRealActivities(){try{const{data:t}=await u.get(v("apps/activity/api/v2/activity/filter"),{params:{format:"json",object_type:"files",object_id:this.fileInfo.id}});return t.ocs.data}catch(t){if(t.response!==void 0&&t.response.status===304)return[];throw e}},processActivities(t){t=t.map(s=>new b(s)),S.debug("Processed ".concat(t.length," activity(ies)"),{activities:t,fileInfo:this.fileInfo});const i=A();return t.filter(s=>!i||i.every(a=>a(s)))},t:o}};var T=function(){var t=this,i=t._self._c;return i("div",{staticClass:"activity",class:{"icon-loading":t.loading}},[t.error?i("NcEmptyContent",{attrs:{name:t.error},scopedSlots:t._u([{key:"icon",fn:function(){return[i("NcIconSvgWrapper",{attrs:{svg:t.lightningBoltSVG}})]},proxy:!0}],null,!1,63559581)}):[t.sidebarPlugins.length>0?i("div",{staticClass:"activity__actions"},t._l(t.sidebarPlugins,function(s,a){return i("ActivitySidebarPlugin",{key:a,attrs:{plugin:s,"file-info":t.fileInfo},on:{"reload-activities":function(n){return t.getActivities()}}})}),1):t._e(),t.loading?i("NcEmptyContent",{staticClass:"activity__empty-content",attrs:{name:t.t("activity","Loading activities")},scopedSlots:t._u([{key:"icon",fn:function(){return[i("NcLoadingIcon")]},proxy:!0}],null,!1,3085876643)}):t.activities.length===0?i("NcEmptyContent",{staticClass:"activity__empty-content",attrs:{name:t.t("activity","No activity yet")},scopedSlots:t._u([{key:"icon",fn:function(){return[i("span",{staticClass:"icon-activity"})]},proxy:!0}])}):i("ul",{staticClass:"activity__list"},t._l(t.activities,function(s){return i("Activity",{key:s.id,attrs:{activity:s,"show-previews":!1},on:{reload:function(a){return t.getActivities()}}})}),1)]],2)},j=[],L=c(E,T,j,!1,null,"7e59872d");const U=L.exports;export{U as default};
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -1 +1 @@
|
|||
import{V as n,t as m,h as d}from"./index-CL4CgOWu.chunk.mjs";import{N as o,m as s,a as c,A as p,V as u,s as a}from"./settings-store-Cq0PlaXw.chunk.mjs";import{w as g,b as l}from"./NcCheckboxRadioSwitch-D2GbHtCS-2fCS121m.chunk.mjs";import"./_commonjsHelpers-D9DevfhH.chunk.mjs";import"./NcNoteCard-BLPU1den-BxHy8O8A.chunk.mjs";import"./logger-CimJwhmx.chunk.mjs";const h={name:"AdminSettings",components:{NcCheckboxRadioSwitch:g,NcSettingsSection:o},computed:{...s({emailEnabled:"emailEnabled"}),settingDescription(){return this.emailEnabled?t("activity","Choose for which activities you want to get an email or push notification."):t("activity","Choose for which activities you want to get a push notification.")}},mounted(){this.setEndpoint({endpoint:"/apps/activity/settings/admin"})},methods:{...c(["setEndpoint","toggleEmailEnabled"])}};var v=function(){var i=this,e=i._self._c;return e("NcSettingsSection",{attrs:{name:i.t("activity","Notification")}},[e("NcCheckboxRadioSwitch",{attrs:{type:"checkbox",checked:i.emailEnabled},on:{"update:checked":function(r){return i.toggleEmailEnabled({emailEnabled:r})}}},[i._v(" "+i._s(i.t("activity","Enable notification emails"))+" ")])],1)},f=[],y=l(h,v,f,!1,null,null);const E=y.exports,b={name:"DefaultActivitySettings",components:{ActivityGrid:p,NcSettingsSection:o},computed:{...s({emailEnabled:"emailEnabled"})},mounted(){this.setEndpoint({endpoint:"/apps/activity/settings/admin"})},methods:{...c(["setEndpoint","toggleEmailEnabled"])}};var S=function(){var i=this,e=i._self._c;return e("NcSettingsSection",{attrs:{name:i.t("activity","Default settings"),description:i.t("activity","Configure the default notification settings for new accounts.")}},[e("ActivityGrid")],1)},w=[],N=l(b,S,w,!1,null,null);const A=N.exports;n.prototype.t=m,n.prototype.n=d,n.use(u),new n({el:"#activity-admin-settings",store:a,name:"ActivityPersonalSettings",render:i=>i(E)}),new n({el:"#activity-default-settings",store:a,name:"ActivityDefaultSettings",render:i=>i(A)});
|
||||
import{V as n,t as m,a as d}from"./index-FHDXXk0Q.chunk.mjs";import{N as o,m as s,a as c,A as p,i as u,s as a}from"./settings-store-Ce8jp8fS.chunk.mjs";import{x as g,b as l}from"./NcCheckboxRadioSwitch-CvMEEI9x-BV2YqD7g.chunk.mjs";import"./_commonjsHelpers-D9DevfhH.chunk.mjs";import"./NcNoteCard-CImn6F9p-B5NIs5kG.chunk.mjs";import"./logger-DdfSSqJ9.chunk.mjs";const h={name:"AdminSettings",components:{NcCheckboxRadioSwitch:g,NcSettingsSection:o},computed:{...s({emailEnabled:"emailEnabled"}),settingDescription(){return this.emailEnabled?t("activity","Choose for which activities you want to get an email or push notification."):t("activity","Choose for which activities you want to get a push notification.")}},mounted(){this.setEndpoint({endpoint:"/apps/activity/settings/admin"})},methods:{...c(["setEndpoint","toggleEmailEnabled"])}};var v=function(){var i=this,e=i._self._c;return e("NcSettingsSection",{attrs:{name:i.t("activity","Notification")}},[e("NcCheckboxRadioSwitch",{attrs:{type:"checkbox",checked:i.emailEnabled},on:{"update:checked":function(r){return i.toggleEmailEnabled({emailEnabled:r})}}},[i._v(" "+i._s(i.t("activity","Enable notification emails"))+" ")])],1)},f=[],y=l(h,v,f,!1,null,null);const E=y.exports,b={name:"DefaultActivitySettings",components:{ActivityGrid:p,NcSettingsSection:o},computed:{...s({emailEnabled:"emailEnabled"})},mounted(){this.setEndpoint({endpoint:"/apps/activity/settings/admin"})},methods:{...c(["setEndpoint","toggleEmailEnabled"])}};var S=function(){var i=this,e=i._self._c;return e("NcSettingsSection",{attrs:{name:i.t("activity","Default settings"),description:i.t("activity","Configure the default notification settings for new accounts.")}},[e("ActivityGrid")],1)},w=[],N=l(b,S,w,!1,null,null);const A=N.exports;n.prototype.t=m,n.prototype.n=d,n.use(u),new n({el:"#activity-admin-settings",store:a,name:"ActivityPersonalSettings",render:i=>i(E)}),new n({el:"#activity-default-settings",store:a,name:"ActivityDefaultSettings",render:i=>i(A)});
|
||||
|
|
|
@ -1 +1 @@
|
|||
import{r as t}from"./api-wy7VpNU4.chunk.mjs";import"./logger-CimJwhmx.chunk.mjs";import"./_commonjsHelpers-D9DevfhH.chunk.mjs";t();
|
||||
import{r as t}from"./api-Bbja46ws.chunk.mjs";import"./logger-DdfSSqJ9.chunk.mjs";import"./_commonjsHelpers-D9DevfhH.chunk.mjs";t();
|
||||
|
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
|
@ -1,2 +1,2 @@
|
|||
(function(){"use strict";try{if(typeof document<"u"){var e=document.createElement("style");e.appendChild(document.createTextNode(".activity-frequency__label[data-v-778e414b]{margin-top:24px;display:inline-block}.notification-frequency__select[data-v-778e414b]{margin-left:calc(var(--default-grid-baseline) * 2)}")),document.head.appendChild(e)}}catch(t){console.error("vite-plugin-css-injected-by-js",t)}})();
|
||||
import{V as a,t as m,h as y}from"./index-CL4CgOWu.chunk.mjs";import{m as s,a as c,N as l,A as E,V as u,s as r}from"./settings-store-Cq0PlaXw.chunk.mjs";import{b as o,w as _}from"./NcCheckboxRadioSwitch-D2GbHtCS-2fCS121m.chunk.mjs";import"./_commonjsHelpers-D9DevfhH.chunk.mjs";import"./NcNoteCard-BLPU1den-BxHy8O8A.chunk.mjs";import"./logger-CimJwhmx.chunk.mjs";const v={EmailFrequency:{EMAIL_SEND_HOURLY:0,EMAIL_SEND_DAILY:1,EMAIL_SEND_WEEKLY:2,EMAIL_SEND_ASAP:3}},d={name:"EmailSettings",data(){return{EmailFrequency:v.EmailFrequency}},computed:{...s(["emailEnabled","isEmailSet","settingBatchtime"])},methods:{...c(["setSettingBatchtime"])}};var g=function(){var e=this,i=e._self._c;return e.emailEnabled?i("div",[e.isEmailSet?e._e():i("p",[i("strong",[e._v(e._s(e.t("activity","You need to set up your email address before you can receive notification emails.")))])]),i("p",[i("label",{staticClass:"activity-frequency__label",attrs:{for:"activity_setting_batchtime"}},[e._v(" "+e._s(e.t("activity","Send activity emails"))+" ")]),i("select",{staticClass:"notification-frequency__select",attrs:{id:"activity_setting_batchtime",name:"activity_setting_batchtime"},on:{change:function(n){return e.setSettingBatchtime({settingBatchtime:n.target.value})}}},[i("option",{domProps:{value:e.EmailFrequency.EMAIL_SEND_ASAP,selected:e.settingBatchtime===e.EmailFrequency.EMAIL_SEND_ASAP}},[e._v(" "+e._s(e.t("activity","As soon as possible"))+" ")]),i("option",{domProps:{value:e.EmailFrequency.EMAIL_SEND_HOURLY,selected:e.settingBatchtime===e.EmailFrequency.EMAIL_SEND_HOURLY}},[e._v(" "+e._s(e.t("activity","Hourly"))+" ")]),i("option",{domProps:{value:e.EmailFrequency.EMAIL_SEND_DAILY,selected:e.settingBatchtime===e.EmailFrequency.EMAIL_SEND_DAILY}},[e._v(" "+e._s(e.t("activity","Daily"))+" ")]),i("option",{domProps:{value:e.EmailFrequency.EMAIL_SEND_WEEKLY,selected:e.settingBatchtime===e.EmailFrequency.EMAIL_SEND_WEEKLY}},[e._v(" "+e._s(e.t("activity","Weekly"))+" ")])])])]):e._e()},p=[],h=o(d,g,p,!1,null,"778e414b");const S=h.exports,A={name:"UserSettings",components:{NcSettingsSection:l,EmailSettings:S,ActivityGrid:E},computed:{...s({emailEnabled:"emailEnabled"}),settingDescription(){return this.emailEnabled?t("activity","Choose for which activities you want to get an email or push notification."):t("activity","Choose for which activities you want to get a push notification.")}},mounted(){this.setEndpoint({endpoint:"/apps/activity/settings"})},methods:{...c(["setEndpoint","toggleEmailEnabled"])}};var D=function(){var e=this,i=e._self._c;return i("NcSettingsSection",{attrs:{name:e.t("activity","Activity"),description:e.settingDescription}},[i("ActivityGrid"),i("EmailSettings")],1)},b=[],f=o(A,D,b,!1,null,null);const L=f.exports,N={name:"DailySummary",components:{NcCheckboxRadioSwitch:_,NcSettingsSection:l},computed:{...s(["activityDigestEnabled"])},mounted(){this.setEndpoint({endpoint:"/apps/activity/settings"})},methods:{...c(["setEndpoint","toggleActivityDigestEnabled"])}};var I=function(){var e=this,i=e._self._c;return i("NcSettingsSection",{attrs:{name:e.t("activity","Daily activity summary")}},[i("NcCheckboxRadioSwitch",{attrs:{"data-cy-checkbox":"",checked:e.activityDigestEnabled},on:{"update:checked":function(n){return e.toggleActivityDigestEnabled({activityDigestEnabled:n})}}},[e._v(" "+e._s(e.t("activity","Send daily activity summary in the morning"))+" ")])],1)},q=[],M=o(N,I,q,!1,null,null);const F=M.exports;a.prototype.t=m,a.prototype.n=y,a.use(u),new a({el:"#activity-user-settings",store:r,name:"ActivityPersonalSettings",render:e=>e(L)}),new a({el:"#activity-digest-user-settings",name:"ActivityDigestPersonalSettings",store:r,render:e=>e(F)});
|
||||
import{V as a,t as m,a as y}from"./index-FHDXXk0Q.chunk.mjs";import{m as s,a as c,N as l,A as E,i as u,s as r}from"./settings-store-Ce8jp8fS.chunk.mjs";import{b as o,x as _}from"./NcCheckboxRadioSwitch-CvMEEI9x-BV2YqD7g.chunk.mjs";import"./_commonjsHelpers-D9DevfhH.chunk.mjs";import"./NcNoteCard-CImn6F9p-B5NIs5kG.chunk.mjs";import"./logger-DdfSSqJ9.chunk.mjs";const v={EmailFrequency:{EMAIL_SEND_HOURLY:0,EMAIL_SEND_DAILY:1,EMAIL_SEND_WEEKLY:2,EMAIL_SEND_ASAP:3}},d={name:"EmailSettings",data(){return{EmailFrequency:v.EmailFrequency}},computed:{...s(["emailEnabled","isEmailSet","settingBatchtime"])},methods:{...c(["setSettingBatchtime"])}};var g=function(){var e=this,i=e._self._c;return e.emailEnabled?i("div",[e.isEmailSet?e._e():i("p",[i("strong",[e._v(e._s(e.t("activity","You need to set up your email address before you can receive notification emails.")))])]),i("p",[i("label",{staticClass:"activity-frequency__label",attrs:{for:"activity_setting_batchtime"}},[e._v(" "+e._s(e.t("activity","Send activity emails"))+" ")]),i("select",{staticClass:"notification-frequency__select",attrs:{id:"activity_setting_batchtime",name:"activity_setting_batchtime"},on:{change:function(n){return e.setSettingBatchtime({settingBatchtime:n.target.value})}}},[i("option",{domProps:{value:e.EmailFrequency.EMAIL_SEND_ASAP,selected:e.settingBatchtime===e.EmailFrequency.EMAIL_SEND_ASAP}},[e._v(" "+e._s(e.t("activity","As soon as possible"))+" ")]),i("option",{domProps:{value:e.EmailFrequency.EMAIL_SEND_HOURLY,selected:e.settingBatchtime===e.EmailFrequency.EMAIL_SEND_HOURLY}},[e._v(" "+e._s(e.t("activity","Hourly"))+" ")]),i("option",{domProps:{value:e.EmailFrequency.EMAIL_SEND_DAILY,selected:e.settingBatchtime===e.EmailFrequency.EMAIL_SEND_DAILY}},[e._v(" "+e._s(e.t("activity","Daily"))+" ")]),i("option",{domProps:{value:e.EmailFrequency.EMAIL_SEND_WEEKLY,selected:e.settingBatchtime===e.EmailFrequency.EMAIL_SEND_WEEKLY}},[e._v(" "+e._s(e.t("activity","Weekly"))+" ")])])])]):e._e()},p=[],S=o(d,g,p,!1,null,"778e414b");const h=S.exports,A={name:"UserSettings",components:{NcSettingsSection:l,EmailSettings:h,ActivityGrid:E},computed:{...s({emailEnabled:"emailEnabled"}),settingDescription(){return this.emailEnabled?t("activity","Choose for which activities you want to get an email or push notification."):t("activity","Choose for which activities you want to get a push notification.")}},mounted(){this.setEndpoint({endpoint:"/apps/activity/settings"})},methods:{...c(["setEndpoint","toggleEmailEnabled"])}};var D=function(){var e=this,i=e._self._c;return i("NcSettingsSection",{attrs:{name:e.t("activity","Activity"),description:e.settingDescription}},[i("ActivityGrid"),i("EmailSettings")],1)},b=[],f=o(A,D,b,!1,null,null);const L=f.exports,N={name:"DailySummary",components:{NcCheckboxRadioSwitch:_,NcSettingsSection:l},computed:{...s(["activityDigestEnabled"])},mounted(){this.setEndpoint({endpoint:"/apps/activity/settings"})},methods:{...c(["setEndpoint","toggleActivityDigestEnabled"])}};var I=function(){var e=this,i=e._self._c;return i("NcSettingsSection",{attrs:{name:e.t("activity","Daily activity summary")}},[i("NcCheckboxRadioSwitch",{attrs:{"data-cy-checkbox":"",checked:e.activityDigestEnabled},on:{"update:checked":function(n){return e.toggleActivityDigestEnabled({activityDigestEnabled:n})}}},[e._v(" "+e._s(e.t("activity","Send daily activity summary in the morning"))+" ")])],1)},q=[],M=o(N,I,q,!1,null,null);const F=M.exports;a.prototype.t=m,a.prototype.n=y,a.use(u),new a({el:"#activity-user-settings",store:r,name:"ActivityPersonalSettings",render:e=>e(L)}),new a({el:"#activity-digest-user-settings",name:"ActivityDigestPersonalSettings",store:r,render:e=>e(F)});
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('activity', '', 'js/ActivityTab-BsQMAymC.chunk.mjs'),window.OC.filePath('activity', '', 'js/NcCheckboxRadioSwitch-D2GbHtCS-2fCS121m.chunk.mjs'),window.OC.filePath('activity', '', 'js/index-CL4CgOWu.chunk.mjs'),window.OC.filePath('activity', '', 'js/_commonjsHelpers-D9DevfhH.chunk.mjs'),window.OC.filePath('activity', '', 'js/logger-CimJwhmx.chunk.mjs'),window.OC.filePath('activity', '', 'js/Activity-DhAQUK_2.chunk.mjs'),window.OC.filePath('activity', '', 'js/api-wy7VpNU4.chunk.mjs')])))=>i.map(i=>d[i]);
|
||||
import{V as m,t as h,h as g}from"./index-CL4CgOWu.chunk.mjs";import"./_commonjsHelpers-D9DevfhH.chunk.mjs";const E="modulepreload",_=function(n,r){return new URL(n,r).href},y={},w=function(n,r,c){let u=Promise.resolve();if(r&&r.length>0){const l=document.getElementsByTagName("link"),e=document.querySelector("meta[property=csp-nonce]"),f=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));u=Promise.all(r.map(o=>{if(o=_(o,c),o in y)return;y[o]=!0;const s=o.endsWith(".css"),v=s?'[rel="stylesheet"]':"";if(c)for(let d=l.length-1;d>=0;d--){const p=l[d];if(p.href===o&&(!s||p.rel==="stylesheet"))return}else if(document.querySelector('link[href="'.concat(o,'"]').concat(v)))return;const i=document.createElement("link");if(i.rel=s?"stylesheet":E,s||(i.as="script",i.crossOrigin=""),i.href=o,f&&i.setAttribute("nonce",f),document.head.appendChild(i),s)return new Promise((d,p)=>{i.addEventListener("load",d),i.addEventListener("error",()=>p(new Error("Unable to preload CSS for ".concat(o))))})}))}return u.then(()=>n()).catch(l=>{const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=l,window.dispatchEvent(e),!e.defaultPrevented)throw l})},b='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-lightning-bolt" viewBox="0 0 24 24"><path d="M11 15H6L13 1V9H18L11 23V15Z" /></svg>';m.prototype.t=h,m.prototype.n=g;let t=null,a=null;const A=new OCA.Files.Sidebar.Tab({id:"activity",name:h("activity","Activity"),iconSvg:b,async mount(n,r,c){if(t===null){const{default:u}=await w(async()=>{const{default:l}=await import("./ActivityTab-BsQMAymC.chunk.mjs");return{default:l}},__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url);t=t!=null?t:m.extend(u)}a&&a.$destroy(),a=new t({parent:c}),a.update(r),a.$mount(n)},update(n){a.update(n)},destroy(){a.$destroy(),a=null}});window.addEventListener("DOMContentLoaded",async function(){if(OCA.Files&&OCA.Files.Sidebar){OCA.Files.Sidebar.registerTab(A);const{default:n}=await w(async()=>{const{default:r}=await import("./ActivityTab-BsQMAymC.chunk.mjs");return{default:r}},__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url);t=t!=null?t:m.extend(n)}});export{b as l};
|
||||
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=[window.OC.filePath('activity', '', 'js/ActivityTab-DcBrUX3x.chunk.mjs'),window.OC.filePath('activity', '', 'js/NcCheckboxRadioSwitch-CvMEEI9x-BV2YqD7g.chunk.mjs'),window.OC.filePath('activity', '', 'js/index-FHDXXk0Q.chunk.mjs'),window.OC.filePath('activity', '', 'js/_commonjsHelpers-D9DevfhH.chunk.mjs'),window.OC.filePath('activity', '', 'js/logger-DdfSSqJ9.chunk.mjs'),window.OC.filePath('activity', '', 'js/Activity-iWE732P6.chunk.mjs'),window.OC.filePath('activity', '', 'js/api-Bbja46ws.chunk.mjs')])))=>i.map(i=>d[i]);
|
||||
import{V as m,t as h,a as E}from"./index-FHDXXk0Q.chunk.mjs";import"./_commonjsHelpers-D9DevfhH.chunk.mjs";const b="modulepreload",_=function(n,r){return new URL(n,r).href},w={},v=function(n,r,c){let u=Promise.resolve();if(r&&r.length>0){const s=document.getElementsByTagName("link"),e=document.querySelector("meta[property=csp-nonce]"),y=(e==null?void 0:e.nonce)||(e==null?void 0:e.getAttribute("nonce"));u=Promise.allSettled(r.map(o=>{if(o=_(o,c),o in w)return;w[o]=!0;const l=o.endsWith(".css"),g=l?'[rel="stylesheet"]':"";if(c)for(let d=s.length-1;d>=0;d--){const p=s[d];if(p.href===o&&(!l||p.rel==="stylesheet"))return}else if(document.querySelector('link[href="'.concat(o,'"]').concat(g)))return;const i=document.createElement("link");if(i.rel=l?"stylesheet":b,l||(i.as="script"),i.crossOrigin="",i.href=o,y&&i.setAttribute("nonce",y),document.head.appendChild(i),l)return new Promise((d,p)=>{i.addEventListener("load",d),i.addEventListener("error",()=>p(new Error("Unable to preload CSS for ".concat(o))))})}))}function f(s){const e=new Event("vite:preloadError",{cancelable:!0});if(e.payload=s,window.dispatchEvent(e),!e.defaultPrevented)throw s}return u.then(s=>{for(const e of s||[])e.status==="rejected"&&f(e.reason);return n().catch(f)})},A='<svg xmlns="http://www.w3.org/2000/svg" id="mdi-lightning-bolt" viewBox="0 0 24 24"><path d="M11 15H6L13 1V9H18L11 23V15Z" /></svg>';m.prototype.t=h,m.prototype.n=E;let t=null,a=null;const L=new OCA.Files.Sidebar.Tab({id:"activity",name:h("activity","Activity"),iconSvg:A,async mount(n,r,c){if(t===null){const{default:u}=await v(async()=>{const{default:f}=await import("./ActivityTab-DcBrUX3x.chunk.mjs");return{default:f}},__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url);t=t!=null?t:m.extend(u)}a&&a.$destroy(),a=new t({parent:c}),a.update(r),a.$mount(n)},update(n){a.update(n)},destroy(){a.$destroy(),a=null}});window.addEventListener("DOMContentLoaded",async function(){if(OCA.Files&&OCA.Files.Sidebar){OCA.Files.Sidebar.registerTab(L);const{default:n}=await v(async()=>{const{default:r}=await import("./ActivityTab-DcBrUX3x.chunk.mjs");return{default:r}},__vite__mapDeps([0,1,2,3,4,5,6]),import.meta.url);t=t!=null?t:m.extend(n)}});export{A as l};
|
||||
|
|
|
@ -1 +1 @@
|
|||
{"version":3,"mappings":";ipCAAeA,EAAA,sICUfC,EAAI,UAAU,EAAIC,EAClBD,EAAI,UAAU,EAAIE,EAGlB,IAAIC,EAAkB,KAClBC,EAAsB,KAC1B,MAAMC,EAAc,IAAI,IAAI,MAAM,QAAQ,IAAI,CAC7C,GAAI,WACJ,KAAMJ,EAAE,WAAY,UAAU,EAC9B,QAASK,EAET,MAAM,MAAMC,EAAIC,EAAUC,EAAS,CAElC,GAAIN,IAAoB,KAAM,CAC7B,KAAM,CAAE,QAASO,CAAa,EAAG,MAAMC,EAAA,wBAAAD,CAAA,eAAO,kCAAyB,EAAC,eAAAA,CAAA,qDACxEP,EAAkBA,UAAmBH,EAAI,OAAOU,CAAW,CAC3D,CAEGN,GACHA,EAAoB,SAAU,EAE/BA,EAAsB,IAAID,EAAgB,CAEzC,OAAQM,CACX,CAAG,EAEDL,EAAoB,OAAOI,CAAQ,EACnCJ,EAAoB,OAAOG,CAAE,CAC7B,EACD,OAAOC,EAAU,CAChBJ,EAAoB,OAAOI,CAAQ,CACnC,EACD,SAAU,CACTJ,EAAoB,SAAU,EAC9BA,EAAsB,IACtB,CACF,CAAC,EAED,OAAO,iBAAiB,mBAAoB,gBAAiB,CAC5D,GAAI,IAAI,OAAS,IAAI,MAAM,QAAS,CACnC,IAAI,MAAM,QAAQ,YAAYC,CAAW,EACzC,KAAM,CAAE,QAASK,CAAa,EAAG,MAAMC,EAAA,wBAAAD,CAAA,eAAO,kCAAyB,EAAC,eAAAA,CAAA,qDACxEP,EAAkBA,UAAmBH,EAAI,OAAOU,CAAW,CAC3D,CACF,CAAC","names":["lightningBoltSVG","Vue","t","n","ActivityTabView","ActivityTabInstance","activityTab","LightningBolt","el","fileInfo","context","ActivityTab","__vitePreload"],"ignoreList":[0],"sources":["../node_modules/@mdi/svg/svg/lightning-bolt.svg?raw","../src/sidebar.js"],"sourcesContent":["export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" id=\\\"mdi-lightning-bolt\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M11 15H6L13 1V9H18L11 23V15Z\\\" /></svg>\"","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport Vue from 'vue'\nimport { translate as t, translatePlural as n } from '@nextcloud/l10n'\n\n// eslint-disable-next-line import/no-unresolved\nimport LightningBolt from '@mdi/svg/svg/lightning-bolt.svg?raw'\n\nVue.prototype.t = t\nVue.prototype.n = n\n\n// Init Activity tab component\nlet ActivityTabView = null\nlet ActivityTabInstance = null\nconst activityTab = new OCA.Files.Sidebar.Tab({\n\tid: 'activity',\n\tname: t('activity', 'Activity'),\n\ticonSvg: LightningBolt,\n\n\tasync mount(el, fileInfo, context) {\n\t\t// only load if needed\n\t\tif (ActivityTabView === null) {\n\t\t\tconst { default: ActivityTab } = await import('./views/ActivityTab.vue')\n\t\t\tActivityTabView = ActivityTabView ?? Vue.extend(ActivityTab)\n\t\t}\n\t\t// destroy previous instance if available\n\t\tif (ActivityTabInstance) {\n\t\t\tActivityTabInstance.$destroy()\n\t\t}\n\t\tActivityTabInstance = new ActivityTabView({\n\t\t\t// Better integration with vue parent component\n\t\t\tparent: context,\n\t\t})\n\t\t// No need to await this, we will show a loading indicator instead\n\t\tActivityTabInstance.update(fileInfo)\n\t\tActivityTabInstance.$mount(el)\n\t},\n\tupdate(fileInfo) {\n\t\tActivityTabInstance.update(fileInfo)\n\t},\n\tdestroy() {\n\t\tActivityTabInstance.$destroy()\n\t\tActivityTabInstance = null\n\t},\n})\n\nwindow.addEventListener('DOMContentLoaded', async function() {\n\tif (OCA.Files && OCA.Files.Sidebar) {\n\t\tOCA.Files.Sidebar.registerTab(activityTab)\n\t\tconst { default: ActivityTab } = await import('./views/ActivityTab.vue')\n\t\tActivityTabView = ActivityTabView ?? Vue.extend(ActivityTab)\n\t}\n})\n"],"file":"js/activity-sidebar.mjs"}
|
||||
{"version":3,"mappings":";muCAAeA,EAAA,sICUfC,EAAI,UAAU,EAAIC,EAClBD,EAAI,UAAU,EAAIE,EAGlB,IAAIC,EAAkB,KAClBC,EAAsB,KAC1B,MAAMC,EAAc,IAAI,IAAI,MAAM,QAAQ,IAAI,CAC7C,GAAI,WACJ,KAAMJ,EAAE,WAAY,UAAU,EAC9B,QAASK,EAET,MAAM,MAAMC,EAAIC,EAAUC,EAAS,CAElC,GAAIN,IAAoB,KAAM,CAC7B,KAAM,CAAE,QAASO,CAAa,EAAG,MAAMC,EAAA,wBAAAD,CAAA,eAAO,kCAAyB,EAAC,eAAAA,CAAA,qDACxEP,EAAkBA,UAAmBH,EAAI,OAAOU,CAAW,CAC3D,CAEGN,GACHA,EAAoB,SAAU,EAE/BA,EAAsB,IAAID,EAAgB,CAEzC,OAAQM,CACX,CAAG,EAEDL,EAAoB,OAAOI,CAAQ,EACnCJ,EAAoB,OAAOG,CAAE,CAC7B,EACD,OAAOC,EAAU,CAChBJ,EAAoB,OAAOI,CAAQ,CACnC,EACD,SAAU,CACTJ,EAAoB,SAAU,EAC9BA,EAAsB,IACtB,CACF,CAAC,EAED,OAAO,iBAAiB,mBAAoB,gBAAiB,CAC5D,GAAI,IAAI,OAAS,IAAI,MAAM,QAAS,CACnC,IAAI,MAAM,QAAQ,YAAYC,CAAW,EACzC,KAAM,CAAE,QAASK,CAAa,EAAG,MAAMC,EAAA,wBAAAD,CAAA,OAAO,0CAAyB,EAAC,eAAAA,CAAA,qDACxEP,EAAkBA,UAAmBH,EAAI,OAAOU,CAAW,CAC3D,CACF,CAAC","names":["lightningBoltSVG","Vue","t","n","ActivityTabView","ActivityTabInstance","activityTab","LightningBolt","el","fileInfo","context","ActivityTab","__vitePreload"],"ignoreList":[0],"sources":["../node_modules/@mdi/svg/svg/lightning-bolt.svg?raw","../src/sidebar.js"],"sourcesContent":["export default \"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" id=\\\"mdi-lightning-bolt\\\" viewBox=\\\"0 0 24 24\\\"><path d=\\\"M11 15H6L13 1V9H18L11 23V15Z\\\" /></svg>\"","/**\n * SPDX-FileCopyrightText: 2021 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\nimport Vue from 'vue'\nimport { translate as t, translatePlural as n } from '@nextcloud/l10n'\n\n// eslint-disable-next-line import/no-unresolved\nimport LightningBolt from '@mdi/svg/svg/lightning-bolt.svg?raw'\n\nVue.prototype.t = t\nVue.prototype.n = n\n\n// Init Activity tab component\nlet ActivityTabView = null\nlet ActivityTabInstance = null\nconst activityTab = new OCA.Files.Sidebar.Tab({\n\tid: 'activity',\n\tname: t('activity', 'Activity'),\n\ticonSvg: LightningBolt,\n\n\tasync mount(el, fileInfo, context) {\n\t\t// only load if needed\n\t\tif (ActivityTabView === null) {\n\t\t\tconst { default: ActivityTab } = await import('./views/ActivityTab.vue')\n\t\t\tActivityTabView = ActivityTabView ?? Vue.extend(ActivityTab)\n\t\t}\n\t\t// destroy previous instance if available\n\t\tif (ActivityTabInstance) {\n\t\t\tActivityTabInstance.$destroy()\n\t\t}\n\t\tActivityTabInstance = new ActivityTabView({\n\t\t\t// Better integration with vue parent component\n\t\t\tparent: context,\n\t\t})\n\t\t// No need to await this, we will show a loading indicator instead\n\t\tActivityTabInstance.update(fileInfo)\n\t\tActivityTabInstance.$mount(el)\n\t},\n\tupdate(fileInfo) {\n\t\tActivityTabInstance.update(fileInfo)\n\t},\n\tdestroy() {\n\t\tActivityTabInstance.$destroy()\n\t\tActivityTabInstance = null\n\t},\n})\n\nwindow.addEventListener('DOMContentLoaded', async function() {\n\tif (OCA.Files && OCA.Files.Sidebar) {\n\t\tOCA.Files.Sidebar.registerTab(activityTab)\n\t\tconst { default: ActivityTab } = await import('./views/ActivityTab.vue')\n\t\tActivityTabView = ActivityTabView ?? Vue.extend(ActivityTab)\n\t}\n})\n"],"file":"js/activity-sidebar.mjs"}
|
|
@ -1 +1 @@
|
|||
import{l as s}from"./logger-CimJwhmx.chunk.mjs";function _(){var e,i,t,r,a,o,d;window.OCA=(e=window.OCA)!=null?e:{},window.OCA.Activity={...window.OCA.Activity,__sidebar_actions:(t=(i=window.OCA.Activity)==null?void 0:i.__sidebar_actions)!=null?t:[],__sidebar_factories:(a=(r=window.OCA.Activity)==null?void 0:r.__sidebar_factories)!=null?a:[],__sidebar_filters:(d=(o=window.OCA.Activity)==null?void 0:o.__sidebar_filters)!=null?d:[],registerSidebarAction(n){window.OCA.Activity.__sidebar_actions.push(n),s.debug("Registered new sidebar action")},registerSidebarEntries(n){window.OCA.Activity.__sidebar_factories.push(n),s.debug("Registered new sidebar actions factory")},registerSidebarFilter(n){window.OCA.Activity.__sidebar_filters.push(n)}},s.info("Activity API registered")}function c(){var e,i,t;return(t=(i=(e=window.OCA)==null?void 0:e.Activity)==null?void 0:i.__sidebar_actions)!=null?t:[]}async function w(e){var i,t;if(((t=(i=window.OCA)==null?void 0:i.Activity)==null?void 0:t.__sidebar_factories)===void 0)return[];const r=window.OCA.Activity.__sidebar_factories.map(async a=>await a(e));return(await Promise.all(r)).flat()}function A(){var e,i,t;return(t=(i=(e=window.OCA)==null?void 0:e.Activity)==null?void 0:i.__sidebar_filters)!=null?t:[]}export{w as a,A as b,c as g,_ as r};
|
||||
import{l as s}from"./logger-DdfSSqJ9.chunk.mjs";function _(){var e,i,t,r,a,o,d;window.OCA=(e=window.OCA)!=null?e:{},window.OCA.Activity={...window.OCA.Activity,__sidebar_actions:(t=(i=window.OCA.Activity)==null?void 0:i.__sidebar_actions)!=null?t:[],__sidebar_factories:(a=(r=window.OCA.Activity)==null?void 0:r.__sidebar_factories)!=null?a:[],__sidebar_filters:(d=(o=window.OCA.Activity)==null?void 0:o.__sidebar_filters)!=null?d:[],registerSidebarAction(n){window.OCA.Activity.__sidebar_actions.push(n),s.debug("Registered new sidebar action")},registerSidebarEntries(n){window.OCA.Activity.__sidebar_factories.push(n),s.debug("Registered new sidebar actions factory")},registerSidebarFilter(n){window.OCA.Activity.__sidebar_filters.push(n)}},s.info("Activity API registered")}function c(){var e,i,t;return(t=(i=(e=window.OCA)==null?void 0:e.Activity)==null?void 0:i.__sidebar_actions)!=null?t:[]}async function w(e){var i,t;if(((t=(i=window.OCA)==null?void 0:i.Activity)==null?void 0:t.__sidebar_factories)===void 0)return[];const r=window.OCA.Activity.__sidebar_factories.map(async a=>await a(e));return(await Promise.all(r)).flat()}function A(){var e,i,t;return(t=(i=(e=window.OCA)==null?void 0:e.Activity)==null?void 0:i.__sidebar_filters)!=null?t:[]}export{w as a,A as b,c as g,_ as r};
|
|
@ -1 +1 @@
|
|||
{"version":3,"file":"api-wy7VpNU4.chunk.mjs","sources":["../src/utils/api.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { ActivityFactoryQueryOptions, IActivityFactory, IActivityFilter, IActivitySidebarAction } from '../models/ActivityAPI'\nimport logger from './logger'\n\ndeclare global {\n\tinterface Window {\n\t\tOCA?: {\n\t\t\tActivity?: {\n\t\t\t\t/**\n\t\t\t\t * Register new actions for a given activity type\n\t\t\t\t */\n\t\t\t\tregisterSidebarEntries: (factory: IActivityFactory) => void\n\t\t\t\t/**\n\t\t\t\t * Register an external action that should be shown in the Activity sidebar panel\n\t\t\t\t */\n\t\t\t\tregisterSidebarAction: (action: IActivitySidebarAction) => void\n\t\t\t\t/**\n\t\t\t\t * Register an filter function to filter out activities on the sidebar, useful together with `registerSidebarEntries`\n\t\t\t\t */\n\t\t\t\tregisterSidebarFilter: (filter: IActivityFilter) => void\n\t\t\t\t__sidebar_actions: IActivitySidebarAction[]\n\t\t\t\t__sidebar_factories: IActivityFactory[]\n\t\t\t\t__sidebar_filters: IActivityFilter[]\n\t\t\t},\n\t\t\tViewer?: {\n\t\t\t\topen(options: { path?: string, fileInfo?: unknown }): void\n\t\t\t\tget mimetypes(): string[]\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Register the global API\n */\nexport function registerGlobalAPI() {\n\twindow.OCA = window.OCA ?? {}\n\twindow.OCA.Activity = {\n\t\t...window.OCA.Activity,\n\t\t__sidebar_actions: window.OCA.Activity?.__sidebar_actions ?? [],\n\t\t__sidebar_factories: window.OCA.Activity?.__sidebar_factories ?? [],\n\t\t__sidebar_filters: window.OCA.Activity?.__sidebar_filters ?? [],\n\n\t\tregisterSidebarAction(action: IActivitySidebarAction) {\n\t\t\twindow.OCA!.Activity!.__sidebar_actions.push(action)\n\t\t\tlogger.debug('Registered new sidebar action')\n\t\t},\n\n\t\tregisterSidebarEntries(factory: IActivityFactory) {\n\t\t\twindow!.OCA!.Activity!.__sidebar_factories.push(factory)\n\t\t\tlogger.debug('Registered new sidebar actions factory')\n\t\t},\n\n\t\tregisterSidebarFilter(filter: IActivityFilter) {\n\t\t\twindow!.OCA!.Activity!.__sidebar_filters.push(filter)\n\t\t},\n\t}\n\n\tlogger.info('Activity API registered')\n}\n\n/**\n * Get all external actions that should be showed in the Activity panel\n */\nexport function getSidebarActions() {\n\treturn window.OCA?.Activity?.__sidebar_actions ?? []\n}\n\n/**\n * Get all additional activity stream entries for a given file object\n * @param options Filter options for the additonal entries\n */\nexport async function getAdditionalEntries(options: ActivityFactoryQueryOptions) {\n\tif (window.OCA?.Activity?.__sidebar_factories === undefined) {\n\t\treturn []\n\t}\n\n\tconst allPromises = window.OCA.Activity.__sidebar_factories.map(async (factory) => await factory(options))\n\treturn (await Promise.all(allPromises)).flat()\n}\n\n/**\n * Get all sidebar entry filters\n */\nexport function getActivityFilters() {\n\treturn window.OCA?.Activity?.__sidebar_filters ?? []\n}\n"],"names":["registerGlobalAPI","_a","_b","_c","_d","_e","_f","_g","action","logger","factory","filter","getSidebarActions","getAdditionalEntries","options","allPromises","getActivityFilters"],"mappings":"gDAuCO,SAASA,GAAoB,CAvCpC,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAwCC,OAAO,KAAMN,EAAA,OAAO,MAAP,KAAAA,EAAc,GAC3B,OAAO,IAAI,SAAW,CACrB,GAAG,OAAO,IAAI,SACd,mBAAmBE,GAAOD,EAAA,OAAA,IAAI,WAAX,KAAqB,OAAAA,EAAA,oBAArB,OAA0C,CAAC,EAC9D,qBAAqBG,GAAOD,EAAA,OAAA,IAAI,WAAX,KAAqB,OAAAA,EAAA,sBAArB,OAA4C,CAAC,EAClE,mBAAmBG,GAAOD,EAAA,OAAA,IAAI,WAAX,KAAqB,OAAAA,EAAA,oBAArB,OAA0C,CAAC,EAE9D,sBAAsBE,EAAgC,CACrD,OAAO,IAAK,SAAU,kBAAkB,KAAKA,CAAM,EACnDC,EAAO,MAAM,+BAA+B,CAC7C,EAEA,uBAAuBC,EAA2B,CACjD,OAAQ,IAAK,SAAU,oBAAoB,KAAKA,CAAO,EACvDD,EAAO,MAAM,wCAAwC,CACtD,EAEA,sBAAsBE,EAAyB,CAC9C,OAAQ,IAAK,SAAU,kBAAkB,KAAKA,CAAM,CACrD,CAAA,EAGDF,EAAO,KAAK,yBAAyB,CACtC,CAKO,SAASG,GAAoB,CApEpC,IAAAX,EAAAC,EAAAC,EAqEC,OAAOA,eAAO,MAAP,KAAA,OAAAF,EAAY,WAAZ,KAAsB,OAAAC,EAAA,oBAAtB,OAA2C,EACnD,CAMA,eAAsBW,EAAqBC,EAAsC,CA5EjF,IAAAb,EAAAC,EA6EC,KAAIA,YAAO,MAAP,KAAA,OAAAD,EAAY,WAAZ,KAAA,OAAAC,EAAsB,uBAAwB,OACjD,MAAO,GAGF,MAAAa,EAAc,OAAO,IAAI,SAAS,oBAAoB,IAAI,MAAOL,GAAY,MAAMA,EAAQI,CAAO,CAAC,EACzG,OAAQ,MAAM,QAAQ,IAAIC,CAAW,GAAG,KAAK,CAC9C,CAKO,SAASC,GAAqB,CAxFrC,IAAAf,EAAAC,EAAAC,EAyFC,OAAOA,eAAO,MAAP,KAAA,OAAAF,EAAY,WAAZ,KAAsB,OAAAC,EAAA,oBAAtB,OAA2C,EACnD"}
|
||||
{"version":3,"file":"api-Bbja46ws.chunk.mjs","sources":["../src/utils/api.ts"],"sourcesContent":["/**\n * SPDX-FileCopyrightText: 2023 Nextcloud GmbH and Nextcloud contributors\n * SPDX-License-Identifier: AGPL-3.0-or-later\n */\n\nimport type { ActivityFactoryQueryOptions, IActivityFactory, IActivityFilter, IActivitySidebarAction } from '../models/ActivityAPI'\nimport logger from './logger'\n\ndeclare global {\n\tinterface Window {\n\t\tOCA?: {\n\t\t\tActivity?: {\n\t\t\t\t/**\n\t\t\t\t * Register new actions for a given activity type\n\t\t\t\t */\n\t\t\t\tregisterSidebarEntries: (factory: IActivityFactory) => void\n\t\t\t\t/**\n\t\t\t\t * Register an external action that should be shown in the Activity sidebar panel\n\t\t\t\t */\n\t\t\t\tregisterSidebarAction: (action: IActivitySidebarAction) => void\n\t\t\t\t/**\n\t\t\t\t * Register an filter function to filter out activities on the sidebar, useful together with `registerSidebarEntries`\n\t\t\t\t */\n\t\t\t\tregisterSidebarFilter: (filter: IActivityFilter) => void\n\t\t\t\t__sidebar_actions: IActivitySidebarAction[]\n\t\t\t\t__sidebar_factories: IActivityFactory[]\n\t\t\t\t__sidebar_filters: IActivityFilter[]\n\t\t\t},\n\t\t\tViewer?: {\n\t\t\t\topen(options: { path?: string, fileInfo?: unknown }): void\n\t\t\t\tget mimetypes(): string[]\n\t\t\t}\n\t\t}\n\t}\n}\n\n/**\n * Register the global API\n */\nexport function registerGlobalAPI() {\n\twindow.OCA = window.OCA ?? {}\n\twindow.OCA.Activity = {\n\t\t...window.OCA.Activity,\n\t\t__sidebar_actions: window.OCA.Activity?.__sidebar_actions ?? [],\n\t\t__sidebar_factories: window.OCA.Activity?.__sidebar_factories ?? [],\n\t\t__sidebar_filters: window.OCA.Activity?.__sidebar_filters ?? [],\n\n\t\tregisterSidebarAction(action: IActivitySidebarAction) {\n\t\t\twindow.OCA!.Activity!.__sidebar_actions.push(action)\n\t\t\tlogger.debug('Registered new sidebar action')\n\t\t},\n\n\t\tregisterSidebarEntries(factory: IActivityFactory) {\n\t\t\twindow!.OCA!.Activity!.__sidebar_factories.push(factory)\n\t\t\tlogger.debug('Registered new sidebar actions factory')\n\t\t},\n\n\t\tregisterSidebarFilter(filter: IActivityFilter) {\n\t\t\twindow!.OCA!.Activity!.__sidebar_filters.push(filter)\n\t\t},\n\t}\n\n\tlogger.info('Activity API registered')\n}\n\n/**\n * Get all external actions that should be showed in the Activity panel\n */\nexport function getSidebarActions() {\n\treturn window.OCA?.Activity?.__sidebar_actions ?? []\n}\n\n/**\n * Get all additional activity stream entries for a given file object\n * @param options Filter options for the additonal entries\n */\nexport async function getAdditionalEntries(options: ActivityFactoryQueryOptions) {\n\tif (window.OCA?.Activity?.__sidebar_factories === undefined) {\n\t\treturn []\n\t}\n\n\tconst allPromises = window.OCA.Activity.__sidebar_factories.map(async (factory) => await factory(options))\n\treturn (await Promise.all(allPromises)).flat()\n}\n\n/**\n * Get all sidebar entry filters\n */\nexport function getActivityFilters() {\n\treturn window.OCA?.Activity?.__sidebar_filters ?? []\n}\n"],"names":["registerGlobalAPI","_a","_b","_c","_d","_e","_f","_g","action","logger","factory","filter","getSidebarActions","getAdditionalEntries","options","allPromises","getActivityFilters"],"mappings":"gDAuCO,SAASA,GAAoB,CAvCpC,IAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAAAC,EAwCC,OAAO,KAAMN,EAAA,OAAO,MAAP,KAAAA,EAAc,GAC3B,OAAO,IAAI,SAAW,CACrB,GAAG,OAAO,IAAI,SACd,mBAAmBE,GAAOD,EAAA,OAAA,IAAI,WAAX,KAAqB,OAAAA,EAAA,oBAArB,OAA0C,CAAC,EAC9D,qBAAqBG,GAAOD,EAAA,OAAA,IAAI,WAAX,KAAqB,OAAAA,EAAA,sBAArB,OAA4C,CAAC,EAClE,mBAAmBG,GAAOD,EAAA,OAAA,IAAI,WAAX,KAAqB,OAAAA,EAAA,oBAArB,OAA0C,CAAC,EAE9D,sBAAsBE,EAAgC,CACrD,OAAO,IAAK,SAAU,kBAAkB,KAAKA,CAAM,EACnDC,EAAO,MAAM,+BAA+B,CAC7C,EAEA,uBAAuBC,EAA2B,CACjD,OAAQ,IAAK,SAAU,oBAAoB,KAAKA,CAAO,EACvDD,EAAO,MAAM,wCAAwC,CACtD,EAEA,sBAAsBE,EAAyB,CAC9C,OAAQ,IAAK,SAAU,kBAAkB,KAAKA,CAAM,CACrD,CAAA,EAGDF,EAAO,KAAK,yBAAyB,CACtC,CAKO,SAASG,GAAoB,CApEpC,IAAAX,EAAAC,EAAAC,EAqEC,OAAOA,eAAO,MAAP,KAAA,OAAAF,EAAY,WAAZ,KAAsB,OAAAC,EAAA,oBAAtB,OAA2C,EACnD,CAMA,eAAsBW,EAAqBC,EAAsC,CA5EjF,IAAAb,EAAAC,EA6EC,KAAIA,YAAO,MAAP,KAAA,OAAAD,EAAY,WAAZ,KAAA,OAAAC,EAAsB,uBAAwB,OACjD,MAAO,GAGF,MAAAa,EAAc,OAAO,IAAI,SAAS,oBAAoB,IAAI,MAAOL,GAAY,MAAMA,EAAQI,CAAO,CAAC,EACzG,OAAQ,MAAM,QAAQ,IAAIC,CAAW,GAAG,KAAK,CAC9C,CAKO,SAASC,GAAqB,CAxFrC,IAAAf,EAAAC,EAAAC,EAyFC,OAAOA,eAAO,MAAP,KAAA,OAAAF,EAAY,WAAZ,KAAsB,OAAAC,EAAA,oBAAtB,OAA2C,EACnD"}
|
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Различия файлов скрыты, потому что одна или несколько строк слишком длинны
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
Загрузка…
Ссылка в новой задаче