forked from potsda.mn/mobilizon
Merge branch 'log-group-activity' into 'master'
Log group activity See merge request framasoft/mobilizon!824
This commit is contained in:
commit
52f07c757e
|
@ -261,7 +261,7 @@ config :mobilizon, :anonymous,
|
|||
config :mobilizon, Oban,
|
||||
repo: Mobilizon.Storage.Repo,
|
||||
log: false,
|
||||
queues: [default: 10, search: 5, mailers: 10, background: 5],
|
||||
queues: [default: 10, search: 5, mailers: 10, background: 5, activity: 5],
|
||||
plugins: [
|
||||
{Oban.Plugins.Cron,
|
||||
crontab: [
|
||||
|
|
119
js/src/components/Activity/DiscussionActivityItem.vue
Normal file
119
js/src/components/Activity/DiscussionActivityItem.vue
Normal file
|
@ -0,0 +1,119 @@
|
|||
<template>
|
||||
<div class="activity-item">
|
||||
<b-icon :icon="'chat'" :type="iconColor" />
|
||||
<div class="subject">
|
||||
<i18n :path="translation" tag="p">
|
||||
<router-link
|
||||
v-if="activity.object"
|
||||
slot="discussion"
|
||||
:to="{
|
||||
name: RouteName.DISCUSSION,
|
||||
params: { slug: subjectParams.discussion_slug },
|
||||
}"
|
||||
>{{ subjectParams.discussion_title }}</router-link
|
||||
>
|
||||
<b v-else slot="discussion">{{ subjectParams.discussion_title }}</b>
|
||||
<router-link
|
||||
v-if="activity.object && subjectParams.old_discussion_title"
|
||||
slot="old_discussion"
|
||||
:to="{
|
||||
name: RouteName.DISCUSSION,
|
||||
params: { slug: subjectParams.discussion_slug },
|
||||
}"
|
||||
>{{ subjectParams.old_discussion_title }}</router-link
|
||||
>
|
||||
<b
|
||||
v-else-if="subjectParams.old_discussion_title"
|
||||
slot="old_discussion"
|
||||
>{{ subjectParams.old_discussion_title }}</b
|
||||
>
|
||||
<popover-actor-card
|
||||
:actor="activity.author"
|
||||
:inline="true"
|
||||
slot="profile"
|
||||
>
|
||||
<b>
|
||||
{{
|
||||
$t("@{username}", {
|
||||
username: usernameWithDomain(activity.author),
|
||||
})
|
||||
}}</b
|
||||
></popover-actor-card
|
||||
></i18n
|
||||
>
|
||||
<small class="has-text-grey activity-date">{{
|
||||
activity.insertedAt | formatTimeString
|
||||
}}</small>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { usernameWithDomain } from "@/types/actor";
|
||||
import { ActivityDiscussionSubject } from "@/types/enums";
|
||||
import { Component } from "vue-property-decorator";
|
||||
import RouteName from "../../router/name";
|
||||
import PopoverActorCard from "../Account/PopoverActorCard.vue";
|
||||
import ActivityMixin from "../../mixins/activity";
|
||||
import { mixins } from "vue-class-component";
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
PopoverActorCard,
|
||||
},
|
||||
})
|
||||
export default class DiscussionActivityItem extends mixins(ActivityMixin) {
|
||||
usernameWithDomain = usernameWithDomain;
|
||||
RouteName = RouteName;
|
||||
ActivityDiscussionSubject = ActivityDiscussionSubject;
|
||||
|
||||
get translation(): string | undefined {
|
||||
switch (this.activity.subject) {
|
||||
case ActivityDiscussionSubject.DISCUSSION_CREATED:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You created the discussion {discussion}.";
|
||||
}
|
||||
return "{profile} created the discussion {discussion}.";
|
||||
case ActivityDiscussionSubject.DISCUSSION_REPLIED:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You replied to the discussion {discussion}.";
|
||||
}
|
||||
return "{profile} replied to the discussion {discussion}.";
|
||||
case ActivityDiscussionSubject.DISCUSSION_RENAMED:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You renamed the discussion from {old_discussion} to {discussion}.";
|
||||
}
|
||||
return "{profile} renamed the discussion from {old_discussion} to {discussion}.";
|
||||
case ActivityDiscussionSubject.DISCUSSION_ARCHIVED:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You archived the discussion {discussion}.";
|
||||
}
|
||||
return "{profile} archived the discussion {discussion}.";
|
||||
case ActivityDiscussionSubject.DISCUSSION_DELETED:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You deleted the discussion {discussion}.";
|
||||
}
|
||||
return "{profile} deleted the discussion {discussion}.";
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
get iconColor(): string | undefined {
|
||||
switch (this.activity.subject) {
|
||||
case ActivityDiscussionSubject.DISCUSSION_CREATED:
|
||||
case ActivityDiscussionSubject.DISCUSSION_REPLIED:
|
||||
return "is-success";
|
||||
case ActivityDiscussionSubject.DISCUSSION_RENAMED:
|
||||
case ActivityDiscussionSubject.DISCUSSION_ARCHIVED:
|
||||
return "is-grey";
|
||||
case ActivityDiscussionSubject.DISCUSSION_DELETED:
|
||||
return "is-danger";
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./activity.scss";
|
||||
</style>
|
93
js/src/components/Activity/EventActivityItem.vue
Normal file
93
js/src/components/Activity/EventActivityItem.vue
Normal file
|
@ -0,0 +1,93 @@
|
|||
<template>
|
||||
<div class="activity-item">
|
||||
<b-icon :icon="'calendar'" :type="iconColor" />
|
||||
<div class="subject">
|
||||
<i18n :path="translation" tag="p">
|
||||
<router-link
|
||||
slot="event"
|
||||
v-if="activity.object"
|
||||
:to="{
|
||||
name: RouteName.EVENT,
|
||||
params: { uuid: subjectParams.event_uuid },
|
||||
}"
|
||||
>{{ subjectParams.event_title }}</router-link
|
||||
>
|
||||
<b v-else slot="event">{{ subjectParams.event_title }}</b>
|
||||
<popover-actor-card
|
||||
:actor="activity.author"
|
||||
:inline="true"
|
||||
slot="profile"
|
||||
>
|
||||
<b>
|
||||
{{
|
||||
$t("@{username}", {
|
||||
username: usernameWithDomain(activity.author),
|
||||
})
|
||||
}}</b
|
||||
></popover-actor-card
|
||||
></i18n
|
||||
>
|
||||
<small class="has-text-grey activity-date">{{
|
||||
activity.insertedAt | formatTimeString
|
||||
}}</small>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { usernameWithDomain } from "@/types/actor";
|
||||
import { ActivityEventSubject } from "@/types/enums";
|
||||
import { mixins } from "vue-class-component";
|
||||
import { Component } from "vue-property-decorator";
|
||||
import RouteName from "../../router/name";
|
||||
import PopoverActorCard from "../Account/PopoverActorCard.vue";
|
||||
import ActivityMixin from "../../mixins/activity";
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
PopoverActorCard,
|
||||
},
|
||||
})
|
||||
export default class EventActivityItem extends mixins(ActivityMixin) {
|
||||
ActivityEventSubject = ActivityEventSubject;
|
||||
usernameWithDomain = usernameWithDomain;
|
||||
RouteName = RouteName;
|
||||
|
||||
get translation(): string | undefined {
|
||||
switch (this.activity.subject) {
|
||||
case ActivityEventSubject.EVENT_CREATED:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You created the event {event}.";
|
||||
}
|
||||
return "The event {event} was created by {profile}.";
|
||||
case ActivityEventSubject.EVENT_UPDATED:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You updated the event {event}.";
|
||||
}
|
||||
return "The event {event} was updated by {profile}.";
|
||||
case ActivityEventSubject.EVENT_DELETED:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You deleted the event {event}.";
|
||||
}
|
||||
return "The event {event} was deleted by {profile}.";
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
get iconColor(): string | undefined {
|
||||
switch (this.activity.subject) {
|
||||
case ActivityEventSubject.EVENT_CREATED:
|
||||
return "is-success";
|
||||
case ActivityEventSubject.EVENT_UPDATED:
|
||||
return "is-grey";
|
||||
case ActivityEventSubject.EVENT_DELETED:
|
||||
return "is-danger";
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./activity.scss";
|
||||
</style>
|
183
js/src/components/Activity/GroupActivityItem.vue
Normal file
183
js/src/components/Activity/GroupActivityItem.vue
Normal file
|
@ -0,0 +1,183 @@
|
|||
<template>
|
||||
<div class="activity-item">
|
||||
<b-icon :icon="'cog'" :type="iconColor" />
|
||||
<div class="subject">
|
||||
<i18n :path="translation" tag="p">
|
||||
<router-link
|
||||
v-if="activity.object"
|
||||
slot="group"
|
||||
:to="{
|
||||
name: RouteName.GROUP,
|
||||
params: { preferredUsername: usernameWithDomain(activity.object) },
|
||||
}"
|
||||
>{{ subjectParams.group_name }}</router-link
|
||||
>
|
||||
<b v-else slot="post">{{ subjectParams.group_name }}</b>
|
||||
<popover-actor-card
|
||||
:actor="activity.author"
|
||||
:inline="true"
|
||||
slot="profile"
|
||||
>
|
||||
<b>
|
||||
{{
|
||||
$t("@{username}", {
|
||||
username: usernameWithDomain(activity.author),
|
||||
})
|
||||
}}</b
|
||||
></popover-actor-card
|
||||
></i18n
|
||||
>
|
||||
<i18n
|
||||
:path="detail"
|
||||
v-for="detail in details"
|
||||
:key="detail"
|
||||
tag="p"
|
||||
class="has-text-grey"
|
||||
>
|
||||
<popover-actor-card
|
||||
:actor="activity.author"
|
||||
:inline="true"
|
||||
slot="profile"
|
||||
>
|
||||
<b>
|
||||
{{
|
||||
$t("@{username}", {
|
||||
username: usernameWithDomain(activity.author),
|
||||
})
|
||||
}}</b
|
||||
></popover-actor-card
|
||||
>
|
||||
<router-link
|
||||
v-if="activity.object"
|
||||
slot="group"
|
||||
:to="{
|
||||
name: RouteName.GROUP,
|
||||
params: { preferredUsername: usernameWithDomain(activity.object) },
|
||||
}"
|
||||
>{{ subjectParams.group_name }}</router-link
|
||||
>
|
||||
<b v-else slot="post">{{ subjectParams.group_name }}</b>
|
||||
<b v-if="subjectParams.old_group_name" slot="old_group_name">{{
|
||||
subjectParams.old_group_name
|
||||
}}</b>
|
||||
</i18n>
|
||||
<small class="has-text-grey activity-date">{{
|
||||
activity.insertedAt | formatTimeString
|
||||
}}</small>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { usernameWithDomain } from "@/types/actor";
|
||||
import { ActivityGroupSubject, GroupVisibility, Openness } from "@/types/enums";
|
||||
import { Component } from "vue-property-decorator";
|
||||
import RouteName from "../../router/name";
|
||||
import PopoverActorCard from "../Account/PopoverActorCard.vue";
|
||||
import ActivityMixin from "../../mixins/activity";
|
||||
import { mixins } from "vue-class-component";
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
PopoverActorCard,
|
||||
},
|
||||
})
|
||||
export default class GroupActivityItem extends mixins(ActivityMixin) {
|
||||
usernameWithDomain = usernameWithDomain;
|
||||
RouteName = RouteName;
|
||||
ActivityGroupSubject = ActivityGroupSubject;
|
||||
|
||||
get translation(): string | undefined {
|
||||
switch (this.activity.subject) {
|
||||
case ActivityGroupSubject.GROUP_CREATED:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You created the group {group}.";
|
||||
}
|
||||
return "{profile} created the group {group}.";
|
||||
case ActivityGroupSubject.GROUP_UPDATED:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You updated the group {group}.";
|
||||
}
|
||||
return "{profile} updated the group {group}.";
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
get iconColor(): string | undefined {
|
||||
switch (this.activity.subject) {
|
||||
case ActivityGroupSubject.GROUP_CREATED:
|
||||
return "is-success";
|
||||
case ActivityGroupSubject.GROUP_UPDATED:
|
||||
return "is-grey";
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
get details(): string[] {
|
||||
let details = [];
|
||||
const changes = this.subjectParams.group_changes.split(",");
|
||||
if (changes.includes("name") && this.subjectParams.old_group_name) {
|
||||
details.push("{old_group_name} was renamed to {group}.");
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
if (changes.includes("visibility") && this.activity.object.visibility) {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
switch (this.activity.object.visibility) {
|
||||
case GroupVisibility.PRIVATE:
|
||||
details.push("Visibility was set to private.");
|
||||
break;
|
||||
case GroupVisibility.PUBLIC:
|
||||
details.push("Visibility was set to public.");
|
||||
break;
|
||||
default:
|
||||
details.push("Visibility was set to an unknown value.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
if (changes.includes("openness") && this.activity.object.openness) {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
switch (this.activity.object.openness) {
|
||||
case Openness.INVITE_ONLY:
|
||||
details.push("The group can now only be joined with an invite.");
|
||||
break;
|
||||
case Openness.OPEN:
|
||||
details.push("The group can now be joined by anyone.");
|
||||
break;
|
||||
default:
|
||||
details.push("Unknown value for the openness setting.");
|
||||
break;
|
||||
}
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
if (changes.includes("address") && this.activity.object.physicalAddress) {
|
||||
details.push("The group's physical address was changed.");
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
if (changes.includes("avatar") && this.activity.object.avatar) {
|
||||
details.push("The group's avatar was changed.");
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
if (changes.includes("banner") && this.activity.object.banner) {
|
||||
details.push("The group's banner was changed.");
|
||||
}
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
if (changes.includes("summary") && this.activity.object.summary) {
|
||||
details.push("The group's short description was changed.");
|
||||
}
|
||||
return details;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./activity.scss";
|
||||
</style>
|
233
js/src/components/Activity/MemberActivityItem.vue
Normal file
233
js/src/components/Activity/MemberActivityItem.vue
Normal file
|
@ -0,0 +1,233 @@
|
|||
<template>
|
||||
<div class="activity-item">
|
||||
<b-icon :icon="icon" :type="iconColor" />
|
||||
<div class="subject">
|
||||
<i18n :path="translation" tag="p">
|
||||
<popover-actor-card
|
||||
v-if="activity.object"
|
||||
:actor="activity.object.actor"
|
||||
:inline="true"
|
||||
slot="member"
|
||||
>
|
||||
<b>
|
||||
{{
|
||||
$t("@{username}", {
|
||||
username: usernameWithDomain(activity.object.actor),
|
||||
})
|
||||
}}</b
|
||||
></popover-actor-card
|
||||
>
|
||||
<b slot="member" v-else>{{
|
||||
subjectParams.member_preferred_username
|
||||
}}</b>
|
||||
<popover-actor-card
|
||||
:actor="activity.author"
|
||||
:inline="true"
|
||||
slot="profile"
|
||||
>
|
||||
<b>
|
||||
{{
|
||||
$t("@{username}", {
|
||||
username: usernameWithDomain(activity.author),
|
||||
})
|
||||
}}</b
|
||||
></popover-actor-card
|
||||
></i18n
|
||||
>
|
||||
<small class="has-text-grey activity-date">{{
|
||||
activity.insertedAt | formatTimeString
|
||||
}}</small>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { usernameWithDomain } from "@/types/actor";
|
||||
import { ActivityMemberSubject, MemberRole } from "@/types/enums";
|
||||
import { Component } from "vue-property-decorator";
|
||||
import RouteName from "../../router/name";
|
||||
import PopoverActorCard from "../Account/PopoverActorCard.vue";
|
||||
import ActivityMixin from "../../mixins/activity";
|
||||
import { mixins } from "vue-class-component";
|
||||
|
||||
export const MEMBER_ROLE_VALUE: Record<string, number> = {
|
||||
[MemberRole.MEMBER]: 20,
|
||||
[MemberRole.MODERATOR]: 50,
|
||||
[MemberRole.ADMINISTRATOR]: 90,
|
||||
[MemberRole.CREATOR]: 100,
|
||||
};
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
PopoverActorCard,
|
||||
},
|
||||
})
|
||||
export default class MemberActivityItem extends mixins(ActivityMixin) {
|
||||
usernameWithDomain = usernameWithDomain;
|
||||
RouteName = RouteName;
|
||||
ActivityMemberSubject = ActivityMemberSubject;
|
||||
|
||||
get translation(): string | undefined {
|
||||
switch (this.activity.subject) {
|
||||
case ActivityMemberSubject.MEMBER_REQUEST:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You requested to join the group.";
|
||||
}
|
||||
return "{member} requested to join the group.";
|
||||
case ActivityMemberSubject.MEMBER_INVITED:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You invited {member}.";
|
||||
}
|
||||
return "{member} was invited by {profile}.";
|
||||
case ActivityMemberSubject.MEMBER_ADDED:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You added the member {member}.";
|
||||
}
|
||||
return "{profile} added the member {member}.";
|
||||
case ActivityMemberSubject.MEMBER_UPDATED:
|
||||
if (this.subjectParams.member_role && this.subjectParams.old_role) {
|
||||
return this.roleUpdate;
|
||||
}
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You updated the member {member}.";
|
||||
}
|
||||
return "{profile} updated the member {member}.";
|
||||
case ActivityMemberSubject.MEMBER_REMOVED:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You excluded member {member}.";
|
||||
}
|
||||
return "{profile} excluded member {member}.";
|
||||
case ActivityMemberSubject.MEMBER_QUIT:
|
||||
return "{profile} quit the group.";
|
||||
case ActivityMemberSubject.MEMBER_REJECTED_INVITATION:
|
||||
return "{member} rejected the invitation to join the group.";
|
||||
case ActivityMemberSubject.MEMBER_ACCEPTED_INVITATION:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You accepted the invitation to join the group.";
|
||||
}
|
||||
return "{member} accepted the invitation to join the group.";
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
get icon(): string {
|
||||
switch (this.activity.subject) {
|
||||
case ActivityMemberSubject.MEMBER_REQUEST:
|
||||
case ActivityMemberSubject.MEMBER_ADDED:
|
||||
case ActivityMemberSubject.MEMBER_INVITED:
|
||||
case ActivityMemberSubject.MEMBER_ACCEPTED_INVITATION:
|
||||
return "account-multiple-plus";
|
||||
case ActivityMemberSubject.MEMBER_REMOVED:
|
||||
case ActivityMemberSubject.MEMBER_REJECTED_INVITATION:
|
||||
case ActivityMemberSubject.MEMBER_QUIT:
|
||||
return "account-multiple-minus";
|
||||
case ActivityMemberSubject.MEMBER_UPDATED:
|
||||
default:
|
||||
return "account-multiple";
|
||||
}
|
||||
}
|
||||
|
||||
get iconColor(): string | undefined {
|
||||
switch (this.activity.subject) {
|
||||
case ActivityMemberSubject.MEMBER_ADDED:
|
||||
case ActivityMemberSubject.MEMBER_INVITED:
|
||||
case ActivityMemberSubject.MEMBER_JOINED:
|
||||
case ActivityMemberSubject.MEMBER_APPROVED:
|
||||
case ActivityMemberSubject.MEMBER_ACCEPTED_INVITATION:
|
||||
return "is-success";
|
||||
case ActivityMemberSubject.MEMBER_REQUEST:
|
||||
case ActivityMemberSubject.MEMBER_UPDATED:
|
||||
return "is-grey";
|
||||
case ActivityMemberSubject.MEMBER_REMOVED:
|
||||
case ActivityMemberSubject.MEMBER_REJECTED_INVITATION:
|
||||
case ActivityMemberSubject.MEMBER_QUIT:
|
||||
return "is-danger";
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
get roleUpdate(): string | undefined {
|
||||
if (
|
||||
Object.keys(MEMBER_ROLE_VALUE).includes(this.subjectParams.member_role) &&
|
||||
Object.keys(MEMBER_ROLE_VALUE).includes(this.subjectParams.old_role)
|
||||
) {
|
||||
if (
|
||||
MEMBER_ROLE_VALUE[this.subjectParams.member_role] >
|
||||
MEMBER_ROLE_VALUE[this.subjectParams.old_role]
|
||||
) {
|
||||
switch (this.subjectParams.member_role) {
|
||||
case MemberRole.MODERATOR:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You promoted {member} to moderator.";
|
||||
}
|
||||
if (this.isObjectMemberCurrentActor) {
|
||||
return "You were promoted to moderator by {profile}.";
|
||||
}
|
||||
return "{profile} promoted {member} to moderator.";
|
||||
case MemberRole.ADMINISTRATOR:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You promoted {member} to administrator.";
|
||||
}
|
||||
if (this.isObjectMemberCurrentActor) {
|
||||
return "You were promoted to administrator by {profile}.";
|
||||
}
|
||||
return "{profile} promoted {member} to administrator.";
|
||||
default:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You promoted the member {member} to an unknown role.";
|
||||
}
|
||||
if (this.isObjectMemberCurrentActor) {
|
||||
return "You were promoted to an unknown role by {profile}.";
|
||||
}
|
||||
return "{profile} promoted {member} to an unknown role.";
|
||||
}
|
||||
} else {
|
||||
switch (this.subjectParams.member_role) {
|
||||
case MemberRole.MODERATOR:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You demoted {member} to moderator.";
|
||||
}
|
||||
if (this.isObjectMemberCurrentActor) {
|
||||
return "You were demoted to moderator by {profile}.";
|
||||
}
|
||||
return "{profile} demoted {member} to moderator.";
|
||||
case MemberRole.MEMBER:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You demoted {member} to simple member.";
|
||||
}
|
||||
if (this.isObjectMemberCurrentActor) {
|
||||
return "You were demoted to simple member by {profile}.";
|
||||
}
|
||||
return "{profile} demoted {member} to simple member.";
|
||||
default:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You demoted the member {member} to an unknown role.";
|
||||
}
|
||||
if (this.isObjectMemberCurrentActor) {
|
||||
return "You were demoted to an unknown role by {profile}.";
|
||||
}
|
||||
return "{profile} demoted {member} to an unknown role.";
|
||||
}
|
||||
}
|
||||
} else {
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You updated the member {member}.";
|
||||
}
|
||||
return "{profile} updated the member {member}";
|
||||
}
|
||||
}
|
||||
|
||||
get isObjectMemberCurrentActor(): boolean {
|
||||
return (
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
this.activity?.object?.actor?.id === this.currentActor?.id &&
|
||||
this.currentActor?.id !== undefined
|
||||
);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./activity.scss";
|
||||
</style>
|
93
js/src/components/Activity/PostActivityItem.vue
Normal file
93
js/src/components/Activity/PostActivityItem.vue
Normal file
|
@ -0,0 +1,93 @@
|
|||
<template>
|
||||
<div class="activity-item">
|
||||
<b-icon :icon="'bullhorn'" :type="iconColor" />
|
||||
<div class="subject">
|
||||
<i18n :path="translation" tag="p">
|
||||
<router-link
|
||||
v-if="activity.object"
|
||||
slot="post"
|
||||
:to="{
|
||||
name: RouteName.POST,
|
||||
params: { slug: subjectParams.post_slug },
|
||||
}"
|
||||
>{{ subjectParams.post_title }}</router-link
|
||||
>
|
||||
<b v-else slot="post">{{ subjectParams.post_title }}</b>
|
||||
<popover-actor-card
|
||||
:actor="activity.author"
|
||||
:inline="true"
|
||||
slot="profile"
|
||||
>
|
||||
<b>
|
||||
{{
|
||||
$t("@{username}", {
|
||||
username: usernameWithDomain(activity.author),
|
||||
})
|
||||
}}</b
|
||||
></popover-actor-card
|
||||
></i18n
|
||||
>
|
||||
<small class="has-text-grey activity-date">{{
|
||||
activity.insertedAt | formatTimeString
|
||||
}}</small>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { usernameWithDomain } from "@/types/actor";
|
||||
import { ActivityPostSubject } from "@/types/enums";
|
||||
import { Component } from "vue-property-decorator";
|
||||
import RouteName from "../../router/name";
|
||||
import PopoverActorCard from "../Account/PopoverActorCard.vue";
|
||||
import ActivityMixin from "../../mixins/activity";
|
||||
import { mixins } from "vue-class-component";
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
PopoverActorCard,
|
||||
},
|
||||
})
|
||||
export default class PostActivityItem extends mixins(ActivityMixin) {
|
||||
usernameWithDomain = usernameWithDomain;
|
||||
RouteName = RouteName;
|
||||
ActivityPostSubject = ActivityPostSubject;
|
||||
|
||||
get translation(): string | undefined {
|
||||
switch (this.activity.subject) {
|
||||
case ActivityPostSubject.POST_CREATED:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You created the post {post}.";
|
||||
}
|
||||
return "The post {post} was created by {profile}.";
|
||||
case ActivityPostSubject.POST_UPDATED:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You updated the post {post}.";
|
||||
}
|
||||
return "The post {post} was updated by {profile}.";
|
||||
case ActivityPostSubject.POST_DELETED:
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You deleted the post {post}.";
|
||||
}
|
||||
return "The post {post} was deleted by {profile}.";
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
get iconColor(): string | undefined {
|
||||
switch (this.activity.subject) {
|
||||
case ActivityPostSubject.POST_CREATED:
|
||||
return "is-success";
|
||||
case ActivityPostSubject.POST_UPDATED:
|
||||
return "is-grey";
|
||||
case ActivityPostSubject.POST_DELETED:
|
||||
return "is-danger";
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./activity.scss";
|
||||
</style>
|
189
js/src/components/Activity/ResourceActivityItem.vue
Normal file
189
js/src/components/Activity/ResourceActivityItem.vue
Normal file
|
@ -0,0 +1,189 @@
|
|||
<template>
|
||||
<div class="activity-item">
|
||||
<b-icon :icon="'link'" :type="iconColor" />
|
||||
<div class="subject">
|
||||
<i18n :path="translation" tag="p">
|
||||
<router-link v-if="activity.object" slot="resource" :to="path">{{
|
||||
subjectParams.resource_title
|
||||
}}</router-link>
|
||||
<b v-else slot="resource">{{ subjectParams.resource_title }}</b>
|
||||
<router-link v-if="activity.object" slot="new_path" :to="path">{{
|
||||
parentDirectory
|
||||
}}</router-link>
|
||||
<b v-else slot="new_path">{{ parentDirectory }}</b>
|
||||
<router-link
|
||||
v-if="activity.object && subjectParams.old_resource_title"
|
||||
slot="old_resource_title"
|
||||
:to="path"
|
||||
>{{ subjectParams.old_resource_title }}</router-link
|
||||
>
|
||||
<b
|
||||
v-else-if="subjectParams.old_resource_title"
|
||||
slot="old_resource_title"
|
||||
>{{ subjectParams.old_resource_title }}</b
|
||||
>
|
||||
|
||||
<popover-actor-card
|
||||
:actor="activity.author"
|
||||
:inline="true"
|
||||
slot="profile"
|
||||
>
|
||||
<b>
|
||||
{{
|
||||
$t("@{username}", {
|
||||
username: usernameWithDomain(activity.author),
|
||||
})
|
||||
}}</b
|
||||
></popover-actor-card
|
||||
></i18n
|
||||
>
|
||||
<small class="has-text-grey activity-date">{{
|
||||
activity.insertedAt | formatTimeString
|
||||
}}</small>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { usernameWithDomain } from "@/types/actor";
|
||||
import { ActivityResourceSubject } from "@/types/enums";
|
||||
import { Component } from "vue-property-decorator";
|
||||
import RouteName from "../../router/name";
|
||||
import PopoverActorCard from "../Account/PopoverActorCard.vue";
|
||||
import ActivityMixin from "../../mixins/activity";
|
||||
import { mixins } from "vue-class-component";
|
||||
import { Location } from "vue-router";
|
||||
|
||||
@Component({
|
||||
components: {
|
||||
PopoverActorCard,
|
||||
},
|
||||
})
|
||||
export default class ResourceActivityItem extends mixins(ActivityMixin) {
|
||||
usernameWithDomain = usernameWithDomain;
|
||||
RouteName = RouteName;
|
||||
|
||||
get translation(): string | undefined {
|
||||
switch (this.activity.subject) {
|
||||
case ActivityResourceSubject.RESOURCE_CREATED:
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
if (this.activity?.object?.type === "folder") {
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You created the folder {resource}.";
|
||||
}
|
||||
return "{profile} created the folder {resource}.";
|
||||
}
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You created the resource {resource}.";
|
||||
}
|
||||
return "{profile} created the resource {resource}.";
|
||||
case ActivityResourceSubject.RESOURCE_MOVED:
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
if (this.activity?.object?.type === "folder") {
|
||||
if (this.parentDirectory === null) {
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You moved the folder {resource} to the root folder.";
|
||||
}
|
||||
return "{profile} moved the folder {resource} to the root folder.";
|
||||
}
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You moved the folder {resource} into {new_path}.";
|
||||
}
|
||||
return "{profile} moved the folder {resource} into {new_path}.";
|
||||
}
|
||||
if (this.parentDirectory === null) {
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You moved the resource {resource} to the root folder.";
|
||||
}
|
||||
return "{profile} moved the resource {resource} to the root folder.";
|
||||
}
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You moved the resource {resource} into {new_path}.";
|
||||
}
|
||||
return "{profile} moved the resource {resource} into {new_path}.";
|
||||
case ActivityResourceSubject.RESOURCE_UPDATED:
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
if (this.activity?.object?.type === "folder") {
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You renamed the folder from {old_resource_title} to {resource}.";
|
||||
}
|
||||
return "{profile} renamed the folder from {old_resource_title} to {resource}.";
|
||||
}
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You renamed the resource from {old_resource_title} to {resource}.";
|
||||
}
|
||||
return "{profile} renamed the resource from {old_resource_title} to {resource}.";
|
||||
case ActivityResourceSubject.RESOURCE_DELETED:
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
if (this.activity?.object?.type === "folder") {
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You deleted the folder {resource}.";
|
||||
}
|
||||
return "{profile} deleted the folder {resource}.";
|
||||
}
|
||||
if (this.isAuthorCurrentActor) {
|
||||
return "You deleted the resource {resource}.";
|
||||
}
|
||||
return "{profile} deleted the resource {resource}.";
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
get iconColor(): string | undefined {
|
||||
switch (this.activity.subject) {
|
||||
case ActivityResourceSubject.RESOURCE_CREATED:
|
||||
return "is-success";
|
||||
case ActivityResourceSubject.RESOURCE_MOVED:
|
||||
case ActivityResourceSubject.RESOURCE_UPDATED:
|
||||
return "is-grey";
|
||||
case ActivityResourceSubject.RESOURCE_DELETED:
|
||||
return "is-danger";
|
||||
default:
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
|
||||
get path(): Location {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
let path = this.parentPath(this.activity?.object?.path);
|
||||
if (path === "") {
|
||||
return {
|
||||
name: RouteName.RESOURCE_FOLDER_ROOT,
|
||||
params: {
|
||||
preferredUsername: usernameWithDomain(this.activity.group),
|
||||
},
|
||||
};
|
||||
}
|
||||
return {
|
||||
name: RouteName.RESOURCE_FOLDER,
|
||||
params: {
|
||||
path,
|
||||
preferredUsername: usernameWithDomain(this.activity.group),
|
||||
},
|
||||
};
|
||||
}
|
||||
|
||||
get parentDirectory(): string | undefined | null {
|
||||
if (this.subjectParams.resource_path) {
|
||||
const parentPath = this.parentPath(this.subjectParams.resource_path);
|
||||
const directory = parentPath.split("/");
|
||||
return directory.pop();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
parentPath(parent: string): string {
|
||||
let path = parent.split("/");
|
||||
path.pop();
|
||||
return path.join("/").replace(/^\//, "");
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
@import "./activity.scss";
|
||||
</style>
|
30
js/src/components/Activity/SkeletonActivityItem.vue
Normal file
30
js/src/components/Activity/SkeletonActivityItem.vue
Normal file
|
@ -0,0 +1,30 @@
|
|||
<template>
|
||||
<div class="activity-item">
|
||||
<span>
|
||||
<b-skeleton circle width="32px" height="32px"></b-skeleton>
|
||||
</span>
|
||||
<div class="subject">
|
||||
<div class="content">
|
||||
<p>
|
||||
<b-skeleton active></b-skeleton>
|
||||
<b-skeleton active class="datetime"></b-skeleton>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
<style lang="scss" scoped>
|
||||
@import "./activity.scss";
|
||||
div.activity-item {
|
||||
flex: 1;
|
||||
|
||||
.subject {
|
||||
flex: 1;
|
||||
max-width: 600px;
|
||||
|
||||
.content p > div:last-child {
|
||||
max-width: 50px;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
21
js/src/components/Activity/activity.scss
Normal file
21
js/src/components/Activity/activity.scss
Normal file
|
@ -0,0 +1,21 @@
|
|||
.activity-item {
|
||||
display: flex;
|
||||
span.icon {
|
||||
width: 2em;
|
||||
height: 2em;
|
||||
box-sizing: border-box;
|
||||
border-radius: 50%;
|
||||
background: #fff;
|
||||
border: 2px solid;
|
||||
z-index: 2;
|
||||
flex-shrink: 0;
|
||||
|
||||
&.has-text-grey {
|
||||
border-color: $grey;
|
||||
}
|
||||
}
|
||||
|
||||
.subject {
|
||||
padding: 0.25rem 0 0 0.5rem;
|
||||
}
|
||||
}
|
|
@ -58,8 +58,14 @@ export default class ResourceItem extends Vue {
|
|||
|
||||
mapServiceTypeToIcon = mapServiceTypeToIcon;
|
||||
|
||||
get urlHostname(): string {
|
||||
return new URL(this.resource.resourceUrl).hostname.replace(/^(www\.)/, "");
|
||||
get urlHostname(): string | undefined {
|
||||
if (this.resource?.resourceUrl) {
|
||||
return new URL(this.resource.resourceUrl).hostname.replace(
|
||||
/^(www\.)/,
|
||||
""
|
||||
);
|
||||
}
|
||||
return undefined;
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
|
|
@ -26,33 +26,35 @@
|
|||
</span>
|
||||
{{ $t("Parent folder") }}
|
||||
</a>
|
||||
<a
|
||||
class="panel-block"
|
||||
v-for="element in resource.children.elements"
|
||||
:class="{
|
||||
clickable:
|
||||
element.type === 'folder' && element.id !== initialResource.id,
|
||||
}"
|
||||
:key="element.id"
|
||||
@click="goDown(element)"
|
||||
>
|
||||
<span class="panel-icon">
|
||||
<b-icon
|
||||
icon="folder"
|
||||
size="is-small"
|
||||
v-if="element.type === 'folder'"
|
||||
/>
|
||||
<b-icon icon="link" size="is-small" v-else />
|
||||
</span>
|
||||
{{ element.title }}
|
||||
<span v-if="element.id === initialResource.id">
|
||||
<em v-if="element.type === 'folder'"> {{ $t("(this folder)") }}</em>
|
||||
<em v-else> {{ $t("(this link)") }}</em>
|
||||
</span>
|
||||
</a>
|
||||
<template v-if="resource.children">
|
||||
<a
|
||||
class="panel-block"
|
||||
v-for="element in resource.children.elements"
|
||||
:class="{
|
||||
clickable:
|
||||
element.type === 'folder' && element.id !== initialResource.id,
|
||||
}"
|
||||
:key="element.id"
|
||||
@click="goDown(element)"
|
||||
>
|
||||
<span class="panel-icon">
|
||||
<b-icon
|
||||
icon="folder"
|
||||
size="is-small"
|
||||
v-if="element.type === 'folder'"
|
||||
/>
|
||||
<b-icon icon="link" size="is-small" v-else />
|
||||
</span>
|
||||
{{ element.title }}
|
||||
<span v-if="element.id === initialResource.id">
|
||||
<em v-if="element.type === 'folder'"> {{ $t("(this folder)") }}</em>
|
||||
<em v-else> {{ $t("(this link)") }}</em>
|
||||
</span>
|
||||
</a>
|
||||
</template>
|
||||
<p
|
||||
class="panel-block content has-text-grey has-text-centered"
|
||||
v-if="resource.children.total === 0"
|
||||
v-if="resource.children && resource.children.total === 0"
|
||||
>
|
||||
{{ $t("No resources in this folder") }}
|
||||
</p>
|
||||
|
|
28
js/src/components/Utils/Observer.vue
Normal file
28
js/src/components/Utils/Observer.vue
Normal file
|
@ -0,0 +1,28 @@
|
|||
<template>
|
||||
<div class="observer" />
|
||||
</template>
|
||||
|
||||
<script lang="ts">
|
||||
import "intersection-observer";
|
||||
import { Component, Prop, Vue } from "vue-property-decorator";
|
||||
|
||||
@Component
|
||||
export default class Observer extends Vue {
|
||||
@Prop({ required: false, default: () => ({}) }) options!: Record<string, any>;
|
||||
|
||||
observer!: IntersectionObserver;
|
||||
mounted(): void {
|
||||
this.observer = new IntersectionObserver(([entry]) => {
|
||||
if (entry && entry.isIntersecting) {
|
||||
this.$emit("intersect");
|
||||
}
|
||||
}, this.options);
|
||||
|
||||
this.observer.observe(this.$el);
|
||||
}
|
||||
|
||||
destroyed(): void {
|
||||
this.observer.disconnect();
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -321,3 +321,98 @@ export const REFRESH_PROFILE = gql`
|
|||
}
|
||||
}
|
||||
`;
|
||||
|
||||
export const GROUP_TIMELINE = gql`
|
||||
query GroupTimeline(
|
||||
$preferredUsername: String!
|
||||
$type: ActivityType
|
||||
$page: Int
|
||||
$limit: Int
|
||||
) {
|
||||
group(preferredUsername: $preferredUsername) {
|
||||
id
|
||||
preferredUsername
|
||||
domain
|
||||
name
|
||||
activity(type: $type, page: $page, limit: $limit) {
|
||||
total
|
||||
elements {
|
||||
id
|
||||
insertedAt
|
||||
subject
|
||||
subjectParams {
|
||||
key
|
||||
value
|
||||
}
|
||||
type
|
||||
author {
|
||||
id
|
||||
preferredUsername
|
||||
name
|
||||
domain
|
||||
avatar {
|
||||
id
|
||||
url
|
||||
}
|
||||
}
|
||||
group {
|
||||
id
|
||||
preferredUsername
|
||||
}
|
||||
object {
|
||||
... on Event {
|
||||
id
|
||||
title
|
||||
}
|
||||
... on Post {
|
||||
id
|
||||
title
|
||||
}
|
||||
... on Member {
|
||||
id
|
||||
actor {
|
||||
id
|
||||
name
|
||||
preferredUsername
|
||||
domain
|
||||
avatar {
|
||||
id
|
||||
url
|
||||
}
|
||||
}
|
||||
}
|
||||
... on Resource {
|
||||
id
|
||||
title
|
||||
path
|
||||
type
|
||||
}
|
||||
... on Discussion {
|
||||
id
|
||||
title
|
||||
slug
|
||||
}
|
||||
... on Group {
|
||||
id
|
||||
preferredUsername
|
||||
domain
|
||||
name
|
||||
summary
|
||||
visibility
|
||||
openness
|
||||
physicalAddress {
|
||||
id
|
||||
}
|
||||
banner {
|
||||
id
|
||||
}
|
||||
avatar {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`;
|
||||
|
|
|
@ -859,5 +859,101 @@
|
|||
"Last published events": "Last published events",
|
||||
"On {instance}": "On {instance}",
|
||||
"Close events": "Close events",
|
||||
"Within {number} kilometers of {place}": "|Within one kilometer of {place}|Within {number} kilometers of {place}"
|
||||
"Within {number} kilometers of {place}": "|Within one kilometer of {place}|Within {number} kilometers of {place}",
|
||||
"@{username}": "@{username}",
|
||||
"Yesterday": "Yesterday",
|
||||
"You created the event {event}.": "You created the event {event}.",
|
||||
"The event {event} was created by {profile}.": "The event {event} was created by {profile}.",
|
||||
"You updated the event {event}.": "You updated the event {event}.",
|
||||
"The event {event} was updated by {profile}.": "The event {event} was updated by {profile}.",
|
||||
"You deleted the event {event}.": "You deleted the event {event}.",
|
||||
"The event {event} was deleted by {profile}.": "The event {event} was deleted by {profile}.",
|
||||
"You created the post {post}.": "You created the post {post}.",
|
||||
"The post {post} was created by {profile}.": "The post {post} was created by {profile}.",
|
||||
"You updated the post {post}.": "You updated the post {post}.",
|
||||
"The post {post} was updated by {profile}.": "The post {post} was updated by {profile}.",
|
||||
"You deleted the post {post}.": "You deleted the post {post}.",
|
||||
"The post {post} was deleted by {profile}.": "The post {post} was deleted by {profile}.",
|
||||
"No more activity to display.": "No more activity to display.",
|
||||
"There is no activity yet. Start doing some things to see activity appear here.": "There is no activity yet. Start doing some things to see activity appear here.",
|
||||
"{group} activity timeline": "{group} activity timeline",
|
||||
"You promoted {member} to moderator.": "You promoted {member} to moderator.",
|
||||
"You promoted {member} to administrator.": "You promoted {member} to administrator.",
|
||||
"You promoted the member {member} to an unknown role.": "You promoted the member {member} to an unknown role.",
|
||||
"You demoted {member} to moderator.": "You demoted {member} to moderator.",
|
||||
"You demoted {member} to simple member.": "You demoted {member} to simple member.",
|
||||
"You demoted the member {member} to an unknown role.": "You demoted the member {member} to an unknown role.",
|
||||
"You updated the member {member}.": "You updated the member {member}.",
|
||||
"{profile} updated the member {member}.": "{profile} updated the member {member}.",
|
||||
"{profile} promoted {member} to moderator.": "{profile} promoted {member} to moderator.",
|
||||
"{profile} promoted {member} to administrator.": "{profile} promoted {member} to administrator.",
|
||||
"{profile} promoted {member} to an unknown role.": "{profile} promoted {member} to an unknown role.",
|
||||
"{profile} demoted {member} to moderator.": "{profile} demoted {member} to moderator.",
|
||||
"{profile} demoted {member} to simple member.": "{profile} demoted {member} to simple member.",
|
||||
"{profile} demoted {member} to an unknown role.": "{profile} demoted {member} to an unknown role.",
|
||||
"You requested to join the group.": "You requested to join the group.",
|
||||
"{member} requested to join the group.": "{member} requested to join the group.",
|
||||
"You invited {member}.": "You invited {member}.",
|
||||
"{member} was invited by {profile}.": "{member} was invited by {profile}.",
|
||||
"You added the member {member}.": "You added the member {member}.",
|
||||
"{profile} added the member {member}.": "{profile} added the member {member}.",
|
||||
"{member} rejected the invitation to join the group.": "{member} rejected the invitation to join the group.",
|
||||
"{member} accepted the invitation to join the group.": "{member} accepted the invitation to join the group.",
|
||||
"You excluded member {member}.": "You excluded member {member}.",
|
||||
"{profile} excluded member {member}.": "{profile} excluded member {member}.",
|
||||
"You accepted the invitation to join the group.": "You accepted the invitation to join the group.",
|
||||
"You were promoted to moderator by {profile}.": "You were promoted to moderator by {profile}.",
|
||||
"You were promoted to administrator by {profile}.": "You were promoted to administrator by {profile}.",
|
||||
"You were promoted to an unknown role by {profile}.": "You were promoted to an unknown role by {profile}.",
|
||||
"You were demoted to moderator by {profile}.": "You were demoted to moderator by {profile}.",
|
||||
"You were demoted to simple member by {profile}.": "You were demoted to simple member by {profile}.",
|
||||
"You were demoted to an unknown role by {profile}.": "You were demoted to an unknown role by {profile}.",
|
||||
"{profile} quit the group.": "{profile} quit the group.",
|
||||
"You created the folder {resource}.": "You created the folder {resource}.",
|
||||
"{profile} created the folder {resource}.": "{profile} created the folder {resource}.",
|
||||
"You created the resource {resource}.": "You created the resource {resource}.",
|
||||
"{profile} created the resource {resource}.": "{profile} created the resource {resource}.",
|
||||
"You moved the folder {resource} to the root folder.": "You moved the folder {resource} to the root folder.",
|
||||
"{profile} moved the folder {resource} to the root folder.": "{profile} moved the folder {resource} to the root folder.",
|
||||
"You moved the folder {resource} into {new_path}.": "You moved the folder {resource} into {new_path}.",
|
||||
"{profile} moved the folder {resource} into {new_path}.": "{profile} moved the folder {resource} into {new_path}.",
|
||||
"You moved the resource {resource} to the root folder.": "You moved the resource {resource} to the root folder.",
|
||||
"{profile} moved the resource {resource} to the root folder.": "{profile} moved the resource {resource} to the root folder.",
|
||||
"You moved the resource {resource} into {new_path}.": "You moved the resource {resource} into {new_path}.",
|
||||
"{profile} moved the resource {resource} into {new_path}.": "{profile} moved the resource {resource} into {new_path}.",
|
||||
"You renamed the folder from {old_resource_title} to {resource}.": "You renamed the folder from {old_resource_title} to {resource}.",
|
||||
"{profile} renamed the folder from {old_resource_title} to {resource}.": "{profile} renamed the folder from {old_resource_title} to {resource}.",
|
||||
"You renamed the resource from {old_resource_title} to {resource}.": "You renamed the resource from {old_resource_title} to {resource}.",
|
||||
"{profile} renamed the resource from {old_resource_title} to {resource}.": "{profile} renamed the resource from {old_resource_title} to {resource}.",
|
||||
"You deleted the folder {resource}.": "You deleted the folder {resource}.",
|
||||
"{profile} deleted the folder {resource}.": "{profile} deleted the folder {resource}.",
|
||||
"You deleted the resource {resource}.": "You deleted the resource {resource}.",
|
||||
"{profile} deleted the resource {resource}.": "{profile} deleted the resource {resource}.",
|
||||
"Activity": "Activity",
|
||||
"Load more activities": "Load more activities",
|
||||
"You created the discussion {discussion}.": "You created the discussion {discussion}.",
|
||||
"{profile} created the discussion {discussion}.": "{profile} created the discussion {discussion}.",
|
||||
"You replied to the discussion {discussion}.": "You replied to the discussion {discussion}.",
|
||||
"{profile} replied to the discussion {discussion}.": "{profile} replied to the discussion {discussion}.",
|
||||
"You renamed the discussion from {old_discussion} to {discussion}.": "You renamed the discussion from {old_discussion} to {discussion}.",
|
||||
"{profile} renamed the discussion from {old_discussion} to {discussion}.": "{profile} renamed the discussion from {old_discussion} to {discussion}.",
|
||||
"You archived the discussion {discussion}.": "You archived the discussion {discussion}.",
|
||||
"{profile} archived the discussion {discussion}.": "{profile} archived the discussion {discussion}.",
|
||||
"You deleted the discussion {discussion}.": "You deleted the discussion {discussion}.",
|
||||
"{profile} deleted the discussion {discussion}.": "{profile} deleted the discussion {discussion}.",
|
||||
"You created the group {group}.": "You created the group {group}.",
|
||||
"{profile} created the group {group}.": "{profile} created the group {group}.",
|
||||
"You updated the group {group}.": "You updated the group {group}.",
|
||||
"{profile} updated the group {group}.": "{profile} updated the group {group}.",
|
||||
"{old_group_name} was renamed to {group}.": "{old_group_name} was renamed to {group}.",
|
||||
"Visibility was set to private.": "Visibility was set to private.",
|
||||
"Visibility was set to public.": "Visibility was set to public.",
|
||||
"Visibility was set to an unknown value.": "Visibility was set to an unknown value.",
|
||||
"The group can now only be joined with an invite.": "The group can now only be joined with an invite.",
|
||||
"The group can now be joined by anyone.": "The group can now be joined by anyone.",
|
||||
"Unknown value for the openness setting.": "Unknown value for the openness setting.",
|
||||
"The group's physical address was changed.": "The group's physical address was changed.",
|
||||
"The group's avatar was changed.": "The group's avatar was changed.",
|
||||
"The group's banner was changed.": "The group's banner was changed.",
|
||||
"The group's short description was changed.": "The group's short description was changed."
|
||||
}
|
||||
|
|
|
@ -954,5 +954,100 @@
|
|||
"Last published events": "Derniers événements publiés",
|
||||
"On {instance}": "Sur {instance}",
|
||||
"Close events": "Événements proches",
|
||||
"Within {number} kilometers of {place}": "|Dans un rayon d'un kilomètre de {place}|Dans un rayon de {number} kilomètres de {place}"
|
||||
"Within {number} kilometers of {place}": "|Dans un rayon d'un kilomètre de {place}|Dans un rayon de {number} kilomètres de {place}",
|
||||
"Yesterday": "Hier",
|
||||
"You created the event {event}.": "Vous avez créé l'événement {event}.",
|
||||
"The event {event} was created by {profile}.": "L'événement {event} a été créé par {profile}.",
|
||||
"You updated the event {event}.": "Vous avez mis à jour l'événement {event}.",
|
||||
"The event {event} was updated by {profile}.": "L'événement {event} à été mis à jour par {profile}.",
|
||||
"You deleted the event {event}.": "Vous avez supprimé l'événement {event}.",
|
||||
"The event {event} was deleted by {profile}.": "L'événement {event} a été supprimé par {profile}.",
|
||||
"You created the post {post}.": "Vous avez créé le billet {post}.",
|
||||
"The post {post} was created by {profile}.": "Le billet {post} a été créé par {profile}.",
|
||||
"You updated the post {post}.": "Vous avez mis à jour le billet {post}.",
|
||||
"The post {post} was updated by {profile}.": "Le billet {post} a été mis à jour par {profile}.",
|
||||
"You deleted the post {post}.": "Vous avez supprimé le billet {post}.",
|
||||
"The post {post} was deleted by {profile}.": "Le billet {post} a été supprimé par {profile}.",
|
||||
"No more activity to display.": "Il n'y a plus d'activités à afficher.",
|
||||
"There is no activity yet. Start doing some things to see activity appear here.": "Il n'y a pas encore d'activité. Commencez par effectuer des actions pour voir des éléments s'afficher ici.",
|
||||
"{group} activity timeline": "Timeline de l'activité de {group}",
|
||||
"You promoted {member} to moderator.": "Vous avez promu {member} en tant que modérateur⋅ice.",
|
||||
"You promoted {member} to administrator.": "Vous avez promu {member} en tant qu'adminstrateur⋅ice.",
|
||||
"You promoted the member {member} to an unknown role.": "Vous avez promu le ou la membre {member} à un role inconnu.",
|
||||
"You demoted {member} to moderator.": "Vous avez rétrogradé {member} en tant que modérateur⋅ice.",
|
||||
"You demoted {member} to simple member.": "Vous avez rétrogradé {member} en tant que simple membre.",
|
||||
"You demoted the member {member} to an unknown role.": "Vous avez rétrogradé le membre {member} à un role inconnu.",
|
||||
"You updated the member {member}.": "Vous avez mis à jour le ou la membre {member}.",
|
||||
"{profile} updated the member {member}.": "{profile} a mis à jour le ou la membre {member}.",
|
||||
"{profile} promoted {member} to moderator.": "{profile} a promu {member} en tant que modérateur⋅ice.",
|
||||
"{profile} promoted {member} to administrator.": "{profile} a promu {member} en tant qu'administrateur⋅ice.",
|
||||
"{profile} promoted {member} to an unknown role.": "{profile} a promu {member} à un role inconnu.",
|
||||
"{profile} demoted {member} to moderator.": "{profile} a rétrogradé {member} en tant que modérateur⋅ice.",
|
||||
"{profile} demoted {member} to simple member.": "{profile} a rétrogradé {member} en tant que simple membre.",
|
||||
"{profile} demoted {member} to an unknown role.": "{profile} a rétrogradé {member} à un role inconnu.",
|
||||
"You requested to join the group.": "Vous avez demandé à rejoindre le groupe.",
|
||||
"{member} requested to join the group.": "{member} a demandé à rejoindre le groupe.",
|
||||
"You invited {member}.": "Vous avez invité {member}.",
|
||||
"{member} was invited by {profile}.": "{member} a été invité⋅e par {profile}.",
|
||||
"You added the member {member}.": "Vous avez ajouté le ou la membre {member}.",
|
||||
"{profile} added the member {member}.": "{profile} a ajouté le ou la membre {member}.",
|
||||
"{member} rejected the invitation to join the group.": "{member} a refusé l'invitation à se joindre au groupe.",
|
||||
"{member} accepted the invitation to join the group.": "{member} a accepté l'invitation à se joindre au groupe.",
|
||||
"You excluded member {member}.": "Vous avez exclu le ou la membre {member}.",
|
||||
"{profile} excluded member {member}.": "{profile} a exclu le ou la membre {member}.",
|
||||
"You accepted the invitation to join the group.": "Vous avez accepté l'invitation à vous joindre au groupe.",
|
||||
"You were promoted to moderator by {profile}.": "Vous avez été promu⋅e modérateur⋅ice par {profile}.",
|
||||
"You were promoted to administrator by {profile}.": "Vous avez été promu⋅e administrateur⋅ice par {profile}.",
|
||||
"You were promoted to an unknown role by {profile}.": "Vous avez été promu⋅e à un role inconnu par {profile}.",
|
||||
"You were demoted to moderator by {profile}.": "Vous avez été rétrogradé⋅e modérateur⋅ice par {profile}.",
|
||||
"You were demoted to simple member by {profile}.": "Vous avez été rétrogradé⋅e simple membre par {profile}.",
|
||||
"You were demoted to an unknown role by {profile}.": "Vous avez été rétrogradé⋅e à un role inconnu par {profile}.",
|
||||
"{profile} quit the group.": "{profile} a quitté le groupe.",
|
||||
"You created the folder {resource}.": "Vous avez créé le dossier {resource}.",
|
||||
"{profile} created the folder {resource}.": "{profile} a créé le dossier {resource}.",
|
||||
"You created the resource {resource}.": "Vous avez créé la ressource {resource}.",
|
||||
"{profile} created the resource {resource}.": "{profile} a créé la ressource {resource}.",
|
||||
"You moved the folder {resource} to the root folder.": "Vous avez déplacé le dossier {resource} dans le dossier racine.",
|
||||
"{profile} moved the folder {resource} to the root folder.": "{profile} a déplacé le dossier {resource} dans le dossier racine.",
|
||||
"You moved the folder {resource} into {new_path}.": "Vous avez déplacé le dossier {resource} dans {new_path}.",
|
||||
"{profile} moved the folder {resource} into {new_path}.": "{profile} a déplacé le dossier {resource} dans {new_path}.",
|
||||
"You moved the resource {resource} to the root folder.": "Vous avez déplacé la ressource {resource} dans le dossier racine.",
|
||||
"{profile} moved the resource {resource} to the root folder.": "{profile} a déplacé la ressource {resource} dans le dossier racine.",
|
||||
"You moved the resource {resource} into {new_path}.": "Vous avez déplacé la ressource {resource} dans {new_path}.",
|
||||
"{profile} moved the resource {resource} into {new_path}.": "{profile} a déplacé la ressource {resource} dans {new_path}.",
|
||||
"You renamed the folder from {old_resource_title} to {resource}.": "Vous avez renommé le dossier {old_resource_title} en {resource}.",
|
||||
"{profile} renamed the folder from {old_resource_title} to {resource}.": "{profile} a renommé le dossier {old_resource_title} en {resource}.",
|
||||
"You renamed the resource from {old_resource_title} to {resource}.": "Vous avez renommé la ressource {old_resource_title} en {resource}.",
|
||||
"{profile} renamed the resource from {old_resource_title} to {resource}.": "{profile} a renommé la ressource {old_resource_title} en {resource}.",
|
||||
"You deleted the folder {resource}.": "Vous avez supprimé le dossier {resource}.",
|
||||
"{profile} deleted the folder {resource}.": "{profile} a supprimé le dossier {resource}.",
|
||||
"You deleted the resource {resource}.": "Vous avez supprimé la ressource {resource}.",
|
||||
"{profile} deleted the resource {resource}.": "{profile} a supprimé la ressource {resource}.",
|
||||
"Activity": "Activité",
|
||||
"Load more activities": "Charger plus d'activités",
|
||||
"You created the discussion {discussion}.": "Vous avez créé la discussion {discussion}.",
|
||||
"{profile} created the discussion {discussion}.": "{profile} a créé la discussion {discussion}.",
|
||||
"You replied to the discussion {discussion}.": "Vous avez répondu à la discussion {discussion}.",
|
||||
"{profile} replied to the discussion {discussion}.": "{profile} a répondu à la discussion {discussion}.",
|
||||
"You renamed the discussion from {old_discussion} to {discussion}.": "Vous avez renommé la discussion {old_discussion} en {discussion}.",
|
||||
"{profile} renamed the discussion from {old_discussion} to {discussion}.": "{profile} a renommé la discussion {old_discussion} en {discussion}.",
|
||||
"You archived the discussion {discussion}.": "Vous avez archivé la discussion {discussion}.",
|
||||
"{profile} archived the discussion {discussion}.": "{profile} a archivé la discussion {discussion}.",
|
||||
"You deleted the discussion {discussion}.": "Vous avez supprimé la discussion {discussion}.",
|
||||
"{profile} deleted the discussion {discussion}.": "{profile} a supprimé la discussion {discussion}.",
|
||||
"You created the group {group}.": "Vous avez créé le groupe {group}.",
|
||||
"{profile} created the group {group}.": "{profile} a créé le groupe {group}.",
|
||||
"You updated the group {group}.": "Vous avez mis à jour le groupe {group}.",
|
||||
"{profile} updated the group {group}.": "{profile} a mis à jour le groupe {group}.",
|
||||
"{old_group_name} was renamed to {group}.": "{old_group_name} a été renommé en {group}.",
|
||||
"Visibility was set to private.": "La visibilité a été définie à privée.",
|
||||
"Visibility was set to public.": "La visibilité a été définie à public.",
|
||||
"Visibility was set to an unknown value.": "La visibilité a été définie à une valeur inconnue.",
|
||||
"The group can now only be joined with an invite.": "Le groupe peut maintenant être rejoint uniquement sur invitation.",
|
||||
"The group can now be joined by anyone.": "Le groupe peut maintenant être rejoint par n'importe qui.",
|
||||
"Unknown value for the openness setting.": "Valeur inconnue pour le paramètre d'ouverture.",
|
||||
"The group's physical address was changed.": "L'adresse physique du groupe a été changée.",
|
||||
"The group's avatar was changed.": "L'avatar du groupe a été changé.",
|
||||
"The group's banner was changed.": "La bannière du groupe a été changée.",
|
||||
"The group's short description was changed.": "La description courte du groupe a été changée."
|
||||
}
|
||||
|
|
31
js/src/mixins/activity.ts
Normal file
31
js/src/mixins/activity.ts
Normal file
|
@ -0,0 +1,31 @@
|
|||
import { CURRENT_ACTOR_CLIENT } from "@/graphql/actor";
|
||||
import { IActivity } from "@/types/activity.model";
|
||||
import { IActor } from "@/types/actor";
|
||||
import { Component, Prop, Vue } from "vue-property-decorator";
|
||||
|
||||
@Component({
|
||||
apollo: {
|
||||
currentActor: CURRENT_ACTOR_CLIENT,
|
||||
},
|
||||
})
|
||||
export default class ActivityMixin extends Vue {
|
||||
@Prop({ required: true, type: Object }) activity!: IActivity;
|
||||
currentActor!: IActor;
|
||||
|
||||
get subjectParams(): Record<string, string> {
|
||||
return this.activity.subjectParams.reduce(
|
||||
(acc: Record<string, string>, { key, value }) => {
|
||||
acc[key] = value;
|
||||
return acc;
|
||||
},
|
||||
{}
|
||||
);
|
||||
}
|
||||
|
||||
get isAuthorCurrentActor(): boolean {
|
||||
return (
|
||||
this.activity.author.id === this.currentActor.id &&
|
||||
this.currentActor.id !== undefined
|
||||
);
|
||||
}
|
||||
}
|
|
@ -18,6 +18,7 @@ export enum GroupsRouteName {
|
|||
POSTS = "POSTS",
|
||||
GROUP_EVENTS = "GROUP_EVENTS",
|
||||
GROUP_JOIN = "GROUP_JOIN",
|
||||
TIMELINE = "TIMELINE",
|
||||
}
|
||||
|
||||
const resourceFolder = (): Promise<EsModuleComponent> =>
|
||||
|
@ -145,4 +146,12 @@ export const groupsRoutes: RouteConfig[] = [
|
|||
name: GroupsRouteName.GROUP_JOIN,
|
||||
meta: { requiredAuth: false },
|
||||
},
|
||||
{
|
||||
path: "/@:preferredUsername/timeline",
|
||||
name: GroupsRouteName.TIMELINE,
|
||||
component: (): Promise<EsModuleComponent> =>
|
||||
import("@/views/Group/Timeline.vue"),
|
||||
props: true,
|
||||
meta: { requiredAuth: true },
|
||||
},
|
||||
];
|
||||
|
|
33
js/src/types/activity.model.ts
Normal file
33
js/src/types/activity.model.ts
Normal file
|
@ -0,0 +1,33 @@
|
|||
import { IActor, IGroup } from "./actor";
|
||||
import { IMember } from "./actor/member.model";
|
||||
import {
|
||||
ActivityDiscussionSubject,
|
||||
ActivityEventSubject,
|
||||
ActivityGroupSubject,
|
||||
ActivityMemberSubject,
|
||||
ActivityPostSubject,
|
||||
ActivityResourceSubject,
|
||||
ActivityType,
|
||||
} from "./enums";
|
||||
import { IEvent } from "./event.model";
|
||||
import { IPost } from "./post.model";
|
||||
import { IResource } from "./resource";
|
||||
|
||||
export type ActivitySubject =
|
||||
| ActivityEventSubject
|
||||
| ActivityPostSubject
|
||||
| ActivityMemberSubject
|
||||
| ActivityResourceSubject
|
||||
| ActivityDiscussionSubject
|
||||
| ActivityGroupSubject;
|
||||
|
||||
export interface IActivity {
|
||||
id: string;
|
||||
type: ActivityType;
|
||||
subject: ActivitySubject;
|
||||
subjectParams: { key: string; value: string }[];
|
||||
author: IActor;
|
||||
group: IGroup;
|
||||
object: IEvent | IPost | IGroup | IMember | IResource;
|
||||
insertedAt: string;
|
||||
}
|
|
@ -10,6 +10,7 @@ import { Address } from "../address.model";
|
|||
import { ActorType, Openness } from "../enums";
|
||||
import type { IMember } from "./member.model";
|
||||
import type { ITodoList } from "../todolist";
|
||||
import { IActivity } from "../activity.model";
|
||||
|
||||
export interface IGroup extends IActor {
|
||||
members: Paginate<IMember>;
|
||||
|
@ -20,6 +21,7 @@ export interface IGroup extends IActor {
|
|||
physicalAddress: IAddress;
|
||||
openness: Openness;
|
||||
manuallyApprovesFollowers: boolean;
|
||||
activity: Paginate<IActivity>;
|
||||
}
|
||||
|
||||
export class Group extends Actor implements IGroup {
|
||||
|
@ -41,6 +43,7 @@ export class Group extends Actor implements IGroup {
|
|||
|
||||
this.patch(hash);
|
||||
}
|
||||
activity: Paginate<IActivity> = { elements: [], total: 0 };
|
||||
|
||||
openness: Openness = Openness.INVITE_ONLY;
|
||||
|
||||
|
|
|
@ -182,3 +182,56 @@ export enum GroupVisibility {
|
|||
export enum AddressSearchType {
|
||||
ADMINISTRATIVE = "ADMINISTRATIVE",
|
||||
}
|
||||
export enum ActivityType {
|
||||
EVENT = "EVENT",
|
||||
POST = "POST",
|
||||
MEMBER = "MEMBER",
|
||||
RESOURCE = "RESOURCE",
|
||||
DISCUSSION = "DISCUSSION",
|
||||
GROUP = "GROUP",
|
||||
}
|
||||
|
||||
export enum ActivityEventSubject {
|
||||
EVENT_CREATED = "event_created",
|
||||
EVENT_UPDATED = "event_updated",
|
||||
EVENT_DELETED = "event_deleted",
|
||||
}
|
||||
|
||||
export enum ActivityPostSubject {
|
||||
POST_CREATED = "post_created",
|
||||
POST_UPDATED = "post_updated",
|
||||
POST_DELETED = "post_deleted",
|
||||
}
|
||||
|
||||
export enum ActivityMemberSubject {
|
||||
MEMBER_REQUEST = "member_request",
|
||||
MEMBER_INVITED = "member_invited",
|
||||
MEMBER_ACCEPTED_INVITATION = "member_accepted_invitation",
|
||||
MEMBER_REJECTED_INVITATION = "member_rejected_invitation",
|
||||
MEMBER_ADDED = "member_added",
|
||||
MEMBER_JOINED = "member_joined",
|
||||
MEMBER_APPROVED = "member_approved",
|
||||
MEMBER_UPDATED = "member_updated",
|
||||
MEMBER_REMOVED = "member_removed",
|
||||
MEMBER_QUIT = "member_quit",
|
||||
}
|
||||
|
||||
export enum ActivityResourceSubject {
|
||||
RESOURCE_CREATED = "resource_created",
|
||||
RESOURCE_UPDATED = "resource_renamed",
|
||||
RESOURCE_MOVED = "resource_moved",
|
||||
RESOURCE_DELETED = "resource_deleted",
|
||||
}
|
||||
|
||||
export enum ActivityDiscussionSubject {
|
||||
DISCUSSION_CREATED = "discussion_created",
|
||||
DISCUSSION_REPLIED = "discussion_replied",
|
||||
DISCUSSION_RENAMED = "discussion_renamed",
|
||||
DISCUSSION_ARCHIVED = "discussion_archived",
|
||||
DISCUSSION_DELETED = "discussion_deleted",
|
||||
}
|
||||
|
||||
export enum ActivityGroupSubject {
|
||||
GROUP_CREATED = "group_created",
|
||||
GROUP_UPDATED = "group_updated",
|
||||
}
|
||||
|
|
|
@ -86,6 +86,10 @@ $colors: map-merge(
|
|||
$link,
|
||||
$link-invert,
|
||||
),
|
||||
"grey": (
|
||||
$grey,
|
||||
findColorInvert($grey),
|
||||
),
|
||||
)
|
||||
);
|
||||
|
||||
|
|
|
@ -497,13 +497,11 @@ const DEFAULT_LIMIT_NUMBER_OF_PLACES = 10;
|
|||
},
|
||||
metaInfo() {
|
||||
return {
|
||||
// if no subcomponents specify a metaInfo.title, this title will be used
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
title: (this.isUpdate
|
||||
? this.$t("Event edition")
|
||||
: this.$t("Event creation")) as string,
|
||||
// all titles will be injected into this template
|
||||
titleTemplate: "%s | Mobilizon",
|
||||
};
|
||||
},
|
||||
|
|
|
@ -737,11 +737,9 @@ import { IParticipant } from "../../types/participant.model";
|
|||
},
|
||||
metaInfo() {
|
||||
return {
|
||||
// if no subcomponents specify a metaInfo.title, this title will be used
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
title: this.eventTitle,
|
||||
// all titles will be injected into this template
|
||||
titleTemplate: "%s | Mobilizon",
|
||||
meta: [
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
|
|
|
@ -186,9 +186,7 @@ import Subtitle from "../../components/Utils/Subtitle.vue";
|
|||
},
|
||||
metaInfo() {
|
||||
return {
|
||||
// if no subcomponents specify a metaInfo.title, this title will be used
|
||||
title: this.$t("My events") as string,
|
||||
// all titles will be injected into this template
|
||||
titleTemplate: "%s | Mobilizon",
|
||||
};
|
||||
},
|
||||
|
|
|
@ -57,14 +57,27 @@
|
|||
<b-skeleton v-else :animated="true" />
|
||||
<br />
|
||||
<div class="buttons">
|
||||
<router-link
|
||||
<b-button
|
||||
outlined
|
||||
icon-left="timeline-text"
|
||||
v-if="isCurrentActorAGroupMember"
|
||||
tag="router-link"
|
||||
:to="{
|
||||
name: RouteName.TIMELINE,
|
||||
params: { preferredUsername: usernameWithDomain(group) },
|
||||
}"
|
||||
>{{ $t("Activity") }}</b-button
|
||||
>
|
||||
<b-button
|
||||
outlined
|
||||
icon-left="cog"
|
||||
v-if="isCurrentActorAGroupAdmin"
|
||||
tag="router-link"
|
||||
:to="{
|
||||
name: RouteName.GROUP_PUBLIC_SETTINGS,
|
||||
params: { preferredUsername: usernameWithDomain(group) },
|
||||
}"
|
||||
class="button is-outlined"
|
||||
>{{ $t("Group settings") }}</router-link
|
||||
>{{ $t("Group settings") }}</b-button
|
||||
>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -506,11 +519,9 @@ import ReportModal from "../../components/Report/ReportModal.vue";
|
|||
},
|
||||
metaInfo() {
|
||||
return {
|
||||
// if no subcomponents specify a metaInfo.title, this title will be used
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
title: this.groupTitle,
|
||||
// all titles will be injected into this template
|
||||
titleTemplate: "%s | Mobilizon",
|
||||
meta: [
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
|
|
|
@ -104,9 +104,7 @@ import RouteName from "../../router/name";
|
|||
},
|
||||
metaInfo() {
|
||||
return {
|
||||
// if no subcomponents specify a metaInfo.title, this title will be used
|
||||
title: this.$t("My groups") as string,
|
||||
// all titles will be injected into this template
|
||||
titleTemplate: "%s | Mobilizon",
|
||||
};
|
||||
},
|
||||
|
|
|
@ -49,4 +49,7 @@ export default class Settings extends mixins(GroupMixin) {
|
|||
aside.section {
|
||||
padding-top: 1rem;
|
||||
}
|
||||
.container.section {
|
||||
background: $white;
|
||||
}
|
||||
</style>
|
||||
|
|
320
js/src/views/Group/Timeline.vue
Normal file
320
js/src/views/Group/Timeline.vue
Normal file
|
@ -0,0 +1,320 @@
|
|||
<template>
|
||||
<div class="container section">
|
||||
<nav class="breadcrumb" aria-label="breadcrumbs">
|
||||
<ul v-if="group">
|
||||
<li>
|
||||
<router-link
|
||||
:to="{
|
||||
name: RouteName.GROUP,
|
||||
params: { preferredUsername: usernameWithDomain(group) },
|
||||
}"
|
||||
>{{ group.name }}</router-link
|
||||
>
|
||||
</li>
|
||||
<li>
|
||||
<router-link
|
||||
:to="{
|
||||
name: RouteName.TIMELINE,
|
||||
params: { preferredUsername: usernameWithDomain(group) },
|
||||
}"
|
||||
>{{ $t("Activity") }}</router-link
|
||||
>
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
<section class="timeline">
|
||||
<transition-group name="timeline-list" tag="div">
|
||||
<div
|
||||
class="day"
|
||||
v-for="[date, activityItems] in Object.entries(activities)"
|
||||
:key="date"
|
||||
>
|
||||
<b-skeleton
|
||||
v-if="date.search(/skeleton/) !== -1"
|
||||
width="300px"
|
||||
height="48px"
|
||||
/>
|
||||
<h2 class="is-size-3 has-text-weight-bold" v-else-if="isToday(date)">
|
||||
<span v-tooltip="$options.filters.formatDateString(date)">
|
||||
{{ $t("Today") }}
|
||||
</span>
|
||||
</h2>
|
||||
<h2
|
||||
class="is-size-3 has-text-weight-bold"
|
||||
v-else-if="isYesterday(date)"
|
||||
>
|
||||
<span v-tooltip="$options.filters.formatDateString(date)">{{
|
||||
$t("Yesterday")
|
||||
}}</span>
|
||||
</h2>
|
||||
<h2 v-else class="is-size-3 has-text-weight-bold">
|
||||
{{ date | formatDateString }}
|
||||
</h2>
|
||||
<ul>
|
||||
<li v-for="activityItem in activityItems" :key="activityItem.id">
|
||||
<skeleton-activity-item v-if="activityItem.skeleton" />
|
||||
<component
|
||||
v-else
|
||||
:is="component(activityItem.type)"
|
||||
:activity="activityItem"
|
||||
/>
|
||||
</li>
|
||||
</ul></div
|
||||
></transition-group>
|
||||
<empty-content
|
||||
icon="timeline-text"
|
||||
v-if="
|
||||
!$apollo.loading &&
|
||||
activity.elements.length > 0 &&
|
||||
activity.elements.length >= activity.total
|
||||
"
|
||||
>
|
||||
{{ $t("No more activity to display.") }}
|
||||
</empty-content>
|
||||
<empty-content
|
||||
v-if="!$apollo.loading && activities.size === 0"
|
||||
icon="timeline-text"
|
||||
>
|
||||
{{
|
||||
$t(
|
||||
"There is no activity yet. Start doing some things to see activity appear here."
|
||||
)
|
||||
}}
|
||||
</empty-content>
|
||||
<observer @intersect="loadMore" />
|
||||
<b-button
|
||||
v-if="activity.elements.length < activity.total"
|
||||
@click="loadMore"
|
||||
>{{ $t("Load more activities") }}</b-button
|
||||
>
|
||||
</section>
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts">
|
||||
import { GROUP_TIMELINE } from "@/graphql/group";
|
||||
import { IGroup, usernameWithDomain } from "@/types/actor";
|
||||
import { ActivityType } from "@/types/enums";
|
||||
import { Paginate } from "@/types/paginate";
|
||||
import { Component, Prop, Vue } from "vue-property-decorator";
|
||||
import { IActivity } from "../../types/activity.model";
|
||||
import Observer from "../../components/Utils/Observer.vue";
|
||||
import SkeletonActivityItem from "../../components/Activity/SkeletonActivityItem.vue";
|
||||
import RouteName from "../../router/name";
|
||||
|
||||
const PAGINATION_LIMIT = 25;
|
||||
const SKELETON_DAY_ITEMS = 2;
|
||||
const SKELETON_ITEMS_PER_DAY = 5;
|
||||
type IActivitySkeleton = IActivity | { skeleton: string };
|
||||
|
||||
@Component({
|
||||
apollo: {
|
||||
group: {
|
||||
query: GROUP_TIMELINE,
|
||||
variables() {
|
||||
return {
|
||||
preferredUsername: this.preferredUsername,
|
||||
page: 1,
|
||||
limit: PAGINATION_LIMIT,
|
||||
};
|
||||
},
|
||||
},
|
||||
},
|
||||
components: {
|
||||
Observer,
|
||||
SkeletonActivityItem,
|
||||
"event-activity-item": () =>
|
||||
import("../../components/Activity/EventActivityItem.vue"),
|
||||
"post-activity-item": () =>
|
||||
import("../../components/Activity/PostActivityItem.vue"),
|
||||
"member-activity-item": () =>
|
||||
import("../../components/Activity/MemberActivityItem.vue"),
|
||||
"resource-activity-item": () =>
|
||||
import("../../components/Activity/ResourceActivityItem.vue"),
|
||||
"discussion-activity-item": () =>
|
||||
import("../../components/Activity/DiscussionActivityItem.vue"),
|
||||
"group-activity-item": () =>
|
||||
import("../../components/Activity/GroupActivityItem.vue"),
|
||||
"empty-content": () => import("../../components/Utils/EmptyContent.vue"),
|
||||
},
|
||||
metaInfo() {
|
||||
return {
|
||||
title: this.$t("{group} activity timeline", {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
group: this.group?.name,
|
||||
}) as string,
|
||||
titleTemplate: "%s | Mobilizon",
|
||||
};
|
||||
},
|
||||
})
|
||||
export default class Timeline extends Vue {
|
||||
@Prop({ required: true, type: String }) preferredUsername!: string;
|
||||
|
||||
group!: IGroup;
|
||||
|
||||
RouteName = RouteName;
|
||||
|
||||
usernameWithDomain = usernameWithDomain;
|
||||
|
||||
get activity(): Paginate<IActivitySkeleton> {
|
||||
if (this.group) {
|
||||
return this.group.activity;
|
||||
}
|
||||
return {
|
||||
total: 0,
|
||||
elements: this.skeletons.map((skeleton) => ({
|
||||
skeleton,
|
||||
})),
|
||||
};
|
||||
}
|
||||
|
||||
page = 1;
|
||||
limit = PAGINATION_LIMIT;
|
||||
|
||||
component(type: ActivityType): string | undefined {
|
||||
switch (type) {
|
||||
case ActivityType.EVENT:
|
||||
return "event-activity-item";
|
||||
case ActivityType.POST:
|
||||
return "post-activity-item";
|
||||
case ActivityType.MEMBER:
|
||||
return "member-activity-item";
|
||||
case ActivityType.RESOURCE:
|
||||
return "resource-activity-item";
|
||||
case ActivityType.DISCUSSION:
|
||||
return "discussion-activity-item";
|
||||
case ActivityType.GROUP:
|
||||
return "group-activity-item";
|
||||
}
|
||||
}
|
||||
|
||||
get skeletons(): string[] {
|
||||
return [...Array(SKELETON_DAY_ITEMS)]
|
||||
.map((_, i) => {
|
||||
return [...Array(SKELETON_ITEMS_PER_DAY)].map((_a, j) => {
|
||||
return `${i}-${j}`;
|
||||
});
|
||||
})
|
||||
.flat();
|
||||
}
|
||||
|
||||
async loadMore(): Promise<void> {
|
||||
if (this.page * PAGINATION_LIMIT >= this.activity.total) {
|
||||
return;
|
||||
}
|
||||
this.page++;
|
||||
try {
|
||||
await this.$apollo.queries.group.fetchMore({
|
||||
variables: {
|
||||
page: this.page,
|
||||
limit: PAGINATION_LIMIT,
|
||||
},
|
||||
updateQuery: (previousResult, { fetchMoreResult }) => {
|
||||
if (!fetchMoreResult) return previousResult;
|
||||
const newActivities = fetchMoreResult.group.activity.elements;
|
||||
const newTotal = fetchMoreResult.group.activity.total;
|
||||
return {
|
||||
group: {
|
||||
...previousResult.group,
|
||||
activity: {
|
||||
__typename: previousResult.group.activity.__typename,
|
||||
total: newTotal,
|
||||
elements: [
|
||||
...previousResult.group.activity.elements,
|
||||
...newActivities,
|
||||
],
|
||||
},
|
||||
},
|
||||
};
|
||||
},
|
||||
});
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
}
|
||||
}
|
||||
|
||||
get activities(): Record<string, IActivitySkeleton[]> {
|
||||
return this.activity.elements.reduce(
|
||||
(acc: Record<string, IActivitySkeleton[]>, elem) => {
|
||||
let key;
|
||||
if (this.isIActivity(elem)) {
|
||||
const insertedAt = new Date(elem.insertedAt);
|
||||
insertedAt.setHours(0);
|
||||
insertedAt.setMinutes(0);
|
||||
insertedAt.setSeconds(0);
|
||||
insertedAt.setMilliseconds(0);
|
||||
key = insertedAt.toISOString();
|
||||
} else {
|
||||
key = `skeleton-${elem.skeleton.split("-")[0]}`;
|
||||
}
|
||||
const existing = acc[key];
|
||||
if (existing) {
|
||||
acc[key] = [...existing, ...[elem]];
|
||||
} else {
|
||||
acc[key] = [elem];
|
||||
}
|
||||
return acc;
|
||||
},
|
||||
{}
|
||||
);
|
||||
}
|
||||
|
||||
isIActivity(object: IActivitySkeleton): object is IActivity {
|
||||
return !("skeleton" in object);
|
||||
}
|
||||
|
||||
getRandomInt(min: number, max: number): number {
|
||||
min = Math.ceil(min);
|
||||
max = Math.floor(max);
|
||||
return Math.floor(Math.random() * (max - min) + min);
|
||||
}
|
||||
|
||||
isToday(dateString: string): boolean {
|
||||
const now = new Date();
|
||||
const date = new Date(dateString);
|
||||
return (
|
||||
now.getFullYear() === date.getFullYear() &&
|
||||
now.getMonth() === date.getMonth() &&
|
||||
now.getDate() === date.getDate()
|
||||
);
|
||||
}
|
||||
|
||||
isYesterday(dateString: string): boolean {
|
||||
const date = new Date(dateString);
|
||||
const yesterday = new Date();
|
||||
yesterday.setDate(yesterday.getDate() - 1);
|
||||
return (
|
||||
yesterday.getFullYear() === date.getFullYear() &&
|
||||
yesterday.getMonth() === date.getMonth() &&
|
||||
yesterday.getDate() === date.getDate()
|
||||
);
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.container.section {
|
||||
background: $white;
|
||||
}
|
||||
|
||||
.timeline {
|
||||
ul {
|
||||
// padding: 0.5rem 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
position: relative;
|
||||
&::before {
|
||||
content: "";
|
||||
height: 100%;
|
||||
width: 1px;
|
||||
background-color: #d9d9d9;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 1rem;
|
||||
}
|
||||
li {
|
||||
display: flex;
|
||||
margin: 0.5rem 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -407,11 +407,9 @@ import Subtitle from "../components/Utils/Subtitle.vue";
|
|||
},
|
||||
metaInfo() {
|
||||
return {
|
||||
// if no subcomponents specify a metaInfo.title, this title will be used
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
title: this.instanceName,
|
||||
// all titles will be injected into this template
|
||||
titleTemplate: "%s | Mobilizon",
|
||||
};
|
||||
},
|
||||
|
|
|
@ -128,11 +128,9 @@ const POSTS_PAGE_LIMIT = 10;
|
|||
},
|
||||
metaInfo() {
|
||||
return {
|
||||
// if no subcomponents specify a metaInfo.title, this title will be used
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
title: this.$t("My groups") as string,
|
||||
// all titles will be injected into this template
|
||||
titleTemplate: "%s | Mobilizon",
|
||||
};
|
||||
},
|
||||
|
|
|
@ -254,9 +254,7 @@ const GROUP_PAGE_LIMIT = 10;
|
|||
},
|
||||
metaInfo() {
|
||||
return {
|
||||
// if no subcomponents specify a metaInfo.title, this title will be used
|
||||
title: this.$t("Explore events") as string,
|
||||
// all titles will be injected into this template
|
||||
titleTemplate: "%s | Mobilizon",
|
||||
};
|
||||
},
|
||||
|
|
|
@ -156,9 +156,7 @@ import AuthProviders from "../../components/User/AuthProviders.vue";
|
|||
},
|
||||
metaInfo() {
|
||||
return {
|
||||
// if no subcomponents specify a metaInfo.title, this title will be used
|
||||
title: this.$t("Login on Mobilizon!") as string,
|
||||
// all titles will be injected into this template
|
||||
titleTemplate: "%s | Mobilizon",
|
||||
};
|
||||
},
|
||||
|
|
|
@ -203,11 +203,9 @@ import AuthProviders from "../../components/User/AuthProviders.vue";
|
|||
components: { Subtitle, AuthProviders },
|
||||
metaInfo() {
|
||||
return {
|
||||
// if no subcomponents specify a metaInfo.title, this title will be used
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
title: this.title,
|
||||
// all titles will be injected into this template
|
||||
titleTemplate: "%s | Mobilizon",
|
||||
};
|
||||
},
|
||||
|
|
459
js/yarn.lock
459
js/yarn.lock
|
@ -28,16 +28,16 @@
|
|||
zen-observable "0.8.11"
|
||||
|
||||
"@apollo/client@^3.0.0":
|
||||
version "3.3.7"
|
||||
resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.3.7.tgz#f15bf961dc0c2bee37a47bf86b8881fdc6183810"
|
||||
integrity sha512-Cb0OqqvlehlRHtHIXRIS/Pe5WYU4hHl1FznXTRSxBAN42WmBUM3zy/Unvw183RdWMyV6Kc2pFKOEuaG1K7JTAQ==
|
||||
version "3.3.10"
|
||||
resolved "https://registry.yarnpkg.com/@apollo/client/-/client-3.3.10.tgz#4fbba049e6b92ac47638cb472db9e653462fa514"
|
||||
integrity sha512-OL5y8q5evSbvsqMAHKZJgfgB/MS9PLGF7f0MtHEkGGCDvmcmA81lsjYwk0xpDm/3XdnrYp/duN2tYUu2LnpJmw==
|
||||
dependencies:
|
||||
"@graphql-typed-document-node/core" "^3.0.0"
|
||||
"@types/zen-observable" "^0.8.0"
|
||||
"@wry/context" "^0.5.2"
|
||||
"@wry/equality" "^0.3.0"
|
||||
fast-json-stable-stringify "^2.0.0"
|
||||
graphql-tag "^2.11.0"
|
||||
graphql-tag "^2.12.0"
|
||||
hoist-non-react-statics "^3.3.2"
|
||||
optimism "^0.14.0"
|
||||
prop-types "^15.7.2"
|
||||
|
@ -46,6 +46,13 @@
|
|||
tslib "^1.10.0"
|
||||
zen-observable "^0.8.14"
|
||||
|
||||
"@babel/code-frame@7.12.11":
|
||||
version "7.12.11"
|
||||
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f"
|
||||
integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw==
|
||||
dependencies:
|
||||
"@babel/highlight" "^7.10.4"
|
||||
|
||||
"@babel/code-frame@^7.0.0", "@babel/code-frame@^7.12.13", "@babel/code-frame@^7.5.5", "@babel/code-frame@^7.8.3":
|
||||
version "7.12.13"
|
||||
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.13.tgz#dcfc826beef65e75c50e21d3837d7d95798dd658"
|
||||
|
@ -59,15 +66,15 @@
|
|||
integrity sha512-U/hshG5R+SIoW7HVWIdmy1cB7s3ki+r3FpyEZiCgpi4tFgPnX/vynY80ZGSASOIrUM6O7VxOgCZgdt7h97bUGg==
|
||||
|
||||
"@babel/core@^7.1.0", "@babel/core@^7.11.0", "@babel/core@^7.8.4":
|
||||
version "7.12.13"
|
||||
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.13.tgz#b73a87a3a3e7d142a66248bf6ad88b9ceb093425"
|
||||
integrity sha512-BQKE9kXkPlXHPeqissfxo0lySWJcYdEP0hdtJOH/iJfDdhOCcgtNCjftCJg3qqauB4h+lz2N6ixM++b9DN1Tcw==
|
||||
version "7.12.16"
|
||||
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.12.16.tgz#8c6ba456b23b680a6493ddcfcd9d3c3ad51cab7c"
|
||||
integrity sha512-t/hHIB504wWceOeaOoONOhu+gX+hpjfeN6YRBT209X/4sibZQfSF1I0HFRRlBe97UZZosGx5XwUg1ZgNbelmNw==
|
||||
dependencies:
|
||||
"@babel/code-frame" "^7.12.13"
|
||||
"@babel/generator" "^7.12.13"
|
||||
"@babel/generator" "^7.12.15"
|
||||
"@babel/helper-module-transforms" "^7.12.13"
|
||||
"@babel/helpers" "^7.12.13"
|
||||
"@babel/parser" "^7.12.13"
|
||||
"@babel/parser" "^7.12.16"
|
||||
"@babel/template" "^7.12.13"
|
||||
"@babel/traverse" "^7.12.13"
|
||||
"@babel/types" "^7.12.13"
|
||||
|
@ -79,10 +86,10 @@
|
|||
semver "^5.4.1"
|
||||
source-map "^0.5.0"
|
||||
|
||||
"@babel/generator@^7.12.13", "@babel/generator@^7.4.0":
|
||||
version "7.12.13"
|
||||
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.13.tgz#5f6ebe6c85db99886db2d7b044409196f872a503"
|
||||
integrity sha512-9qQ8Fgo8HaSvHEt6A5+BATP7XktD/AdAnObUeTRz5/e2y3kbrxZgz32qUJJsdmwUvBJzF4AeV21nGTNwv05Mpw==
|
||||
"@babel/generator@^7.12.13", "@babel/generator@^7.12.15", "@babel/generator@^7.4.0":
|
||||
version "7.12.15"
|
||||
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.15.tgz#4617b5d0b25cc572474cc1aafee1edeaf9b5368f"
|
||||
integrity sha512-6F2xHxBiFXWNSGb7vyCUTBF8RCLY66rS0zEPcP8t/nQyXjha5EuK4z7H5o7fWG8B4M7y6mqVWq1J+1PuwRhecQ==
|
||||
dependencies:
|
||||
"@babel/types" "^7.12.13"
|
||||
jsesc "^2.5.1"
|
||||
|
@ -103,31 +110,31 @@
|
|||
"@babel/helper-explode-assignable-expression" "^7.12.13"
|
||||
"@babel/types" "^7.12.13"
|
||||
|
||||
"@babel/helper-compilation-targets@^7.12.13", "@babel/helper-compilation-targets@^7.9.6":
|
||||
version "7.12.13"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.13.tgz#d689cdef88810aa74e15a7a94186f26a3d773c98"
|
||||
integrity sha512-dXof20y/6wB5HnLOGyLh/gobsMvDNoekcC+8MCV2iaTd5JemhFkPD73QB+tK3iFC9P0xJC73B6MvKkyUfS9cCw==
|
||||
"@babel/helper-compilation-targets@^7.12.16", "@babel/helper-compilation-targets@^7.9.6":
|
||||
version "7.12.16"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.12.16.tgz#6905238b4a5e02ba2d032c1a49dd1820fe8ce61b"
|
||||
integrity sha512-dBHNEEaZx7F3KoUYqagIhRIeqyyuI65xMndMZ3WwGwEBI609I4TleYQHcrS627vbKyNTXqShoN+fvYD9HuQxAg==
|
||||
dependencies:
|
||||
"@babel/compat-data" "^7.12.13"
|
||||
"@babel/helper-validator-option" "^7.12.11"
|
||||
"@babel/helper-validator-option" "^7.12.16"
|
||||
browserslist "^4.14.5"
|
||||
semver "^5.5.0"
|
||||
|
||||
"@babel/helper-create-class-features-plugin@^7.12.13":
|
||||
version "7.12.13"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.13.tgz#0f1707c2eec1a4604f2a22a6fb209854ef2a399a"
|
||||
integrity sha512-Vs/e9wv7rakKYeywsmEBSRC9KtmE7Px+YBlESekLeJOF0zbGUicGfXSNi3o+tfXSNS48U/7K9mIOOCR79Cl3+Q==
|
||||
version "7.12.16"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.12.16.tgz#955d5099fd093e5afb05542190f8022105082c61"
|
||||
integrity sha512-KbSEj8l9zYkMVHpQqM3wJNxS1d9h3U9vm/uE5tpjMbaj3lTp+0noe3KPsV5dSD9jxKnf9jO9Ip9FX5PKNZCKow==
|
||||
dependencies:
|
||||
"@babel/helper-function-name" "^7.12.13"
|
||||
"@babel/helper-member-expression-to-functions" "^7.12.13"
|
||||
"@babel/helper-member-expression-to-functions" "^7.12.16"
|
||||
"@babel/helper-optimise-call-expression" "^7.12.13"
|
||||
"@babel/helper-replace-supers" "^7.12.13"
|
||||
"@babel/helper-split-export-declaration" "^7.12.13"
|
||||
|
||||
"@babel/helper-create-regexp-features-plugin@^7.12.13":
|
||||
version "7.12.13"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.13.tgz#0996d370a92896c612ae41a4215544bd152579c0"
|
||||
integrity sha512-XC+kiA0J3at6E85dL5UnCYfVOcIZ834QcAY0TIpgUVnz0zDzg+0TtvZTnJ4g9L1dPRGe30Qi03XCIS4tYCLtqw==
|
||||
version "7.12.16"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.12.16.tgz#3b31d13f39f930fad975e151163b7df7d4ffe9d3"
|
||||
integrity sha512-jAcQ1biDYZBdaAxB4yg46/XirgX7jBDiMHDbwYQOgtViLBXGxJpZQ24jutmBqAIB/q+AwB6j+NbBXjKxEY8vqg==
|
||||
dependencies:
|
||||
"@babel/helper-annotate-as-pure" "^7.12.13"
|
||||
regexpu-core "^4.7.1"
|
||||
|
@ -162,10 +169,10 @@
|
|||
dependencies:
|
||||
"@babel/types" "^7.12.13"
|
||||
|
||||
"@babel/helper-member-expression-to-functions@^7.12.13":
|
||||
version "7.12.13"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.13.tgz#c5715695b4f8bab32660dbdcdc2341dec7e3df40"
|
||||
integrity sha512-B+7nN0gIL8FZ8SvMcF+EPyB21KnCcZHQZFczCxbiNGV/O0rsrSBlWGLzmtBJ3GMjSVMIm4lpFhR+VdVBuIsUcQ==
|
||||
"@babel/helper-member-expression-to-functions@^7.12.13", "@babel/helper-member-expression-to-functions@^7.12.16":
|
||||
version "7.12.16"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.12.16.tgz#41e0916b99f8d5f43da4f05d85f4930fa3d62b22"
|
||||
integrity sha512-zYoZC1uvebBFmj1wFAlXwt35JLEgecefATtKp20xalwEK8vHAixLBXTGxNrVGEmTT+gzOThUgr8UEdgtalc1BQ==
|
||||
dependencies:
|
||||
"@babel/types" "^7.12.13"
|
||||
|
||||
|
@ -248,10 +255,10 @@
|
|||
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.12.11.tgz#c9a1f021917dcb5ccf0d4e453e399022981fc9ed"
|
||||
integrity sha512-np/lG3uARFybkoHokJUmf1QfEvRVCPbmQeUQpKow5cQ3xWrV9i3rUHodKDJPQfTVX61qKi+UdYk8kik84n7XOw==
|
||||
|
||||
"@babel/helper-validator-option@^7.12.11":
|
||||
version "7.12.11"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.11.tgz#d66cb8b7a3e7fe4c6962b32020a131ecf0847f4f"
|
||||
integrity sha512-TBFCyj939mFSdeX7U7DDj32WtzYY7fDcalgq8v3fBZMNOJQNn7nOYzMaUCiPxPYfCup69mtIpqlKgMZLvQ8Xhw==
|
||||
"@babel/helper-validator-option@^7.12.16":
|
||||
version "7.12.16"
|
||||
resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.16.tgz#f73cbd3bbba51915216c5dea908e9b206bb10051"
|
||||
integrity sha512-uCgsDBPUQDvzr11ePPo4TVEocxj8RXjUVSC/Y8N1YpVAI/XDdUwGJu78xmlGhTxj2ntaWM7n9LQdRtyhOzT2YQ==
|
||||
|
||||
"@babel/helper-wrap-function@^7.12.13":
|
||||
version "7.12.13"
|
||||
|
@ -272,7 +279,7 @@
|
|||
"@babel/traverse" "^7.12.13"
|
||||
"@babel/types" "^7.12.13"
|
||||
|
||||
"@babel/highlight@^7.12.13":
|
||||
"@babel/highlight@^7.10.4", "@babel/highlight@^7.12.13":
|
||||
version "7.12.13"
|
||||
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.12.13.tgz#8ab538393e00370b26271b01fa08f7f27f2e795c"
|
||||
integrity sha512-kocDQvIbgMKlWxXe9fof3TQ+gkIPOUSEYhJjqUjvKMez3krV7vbzYCDq39Oj11UAVK7JqPVGQPlgE85dPNlQww==
|
||||
|
@ -281,10 +288,10 @@
|
|||
chalk "^2.0.0"
|
||||
js-tokens "^4.0.0"
|
||||
|
||||
"@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.4.3":
|
||||
version "7.12.13"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.13.tgz#3ee7be4131fe657ba9143d5c5b3a9f253fdb75e9"
|
||||
integrity sha512-z7n7ybOUzaRc3wwqLpAX8UFIXsrVXUJhtNGBwAnLz6d1KUapqyq7ad2La8gZ6CXhHmGAIL32cop8Tst4/PNWLw==
|
||||
"@babel/parser@^7.1.0", "@babel/parser@^7.12.13", "@babel/parser@^7.12.16", "@babel/parser@^7.4.3":
|
||||
version "7.12.16"
|
||||
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.16.tgz#cc31257419d2c3189d394081635703f549fc1ed4"
|
||||
integrity sha512-c/+u9cqV6F0+4Hpq01jnJO+GLp2DdT63ppz9Xa+6cHaajM9VFzK/iDXiKK65YtpeVwu+ctfS6iqlMqRgQRzeCw==
|
||||
|
||||
"@babel/plugin-proposal-async-generator-functions@^7.12.13":
|
||||
version "7.12.13"
|
||||
|
@ -312,12 +319,12 @@
|
|||
"@babel/helper-plugin-utils" "^7.12.13"
|
||||
"@babel/plugin-syntax-decorators" "^7.12.13"
|
||||
|
||||
"@babel/plugin-proposal-dynamic-import@^7.12.1":
|
||||
version "7.12.1"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.12.1.tgz#43eb5c2a3487ecd98c5c8ea8b5fdb69a2749b2dc"
|
||||
integrity sha512-a4rhUSZFuq5W8/OO8H7BL5zspjnc1FLd9hlOxIK/f7qG4a0qsqk8uvF/ywgBA8/OmjsapjpvaEOYItfGG1qIvQ==
|
||||
"@babel/plugin-proposal-dynamic-import@^7.12.16":
|
||||
version "7.12.16"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.12.16.tgz#b9f33b252e3406d492a15a799c9d45a9a9613473"
|
||||
integrity sha512-yiDkYFapVxNOCcBfLnsb/qdsliroM+vc3LHiZwS4gh7pFjo5Xq3BDhYBNn3H3ao+hWPvqeeTdU+s+FIvokov+w==
|
||||
dependencies:
|
||||
"@babel/helper-plugin-utils" "^7.10.4"
|
||||
"@babel/helper-plugin-utils" "^7.12.13"
|
||||
"@babel/plugin-syntax-dynamic-import" "^7.8.0"
|
||||
|
||||
"@babel/plugin-proposal-export-namespace-from@^7.12.13":
|
||||
|
@ -377,10 +384,10 @@
|
|||
"@babel/helper-plugin-utils" "^7.12.13"
|
||||
"@babel/plugin-syntax-optional-catch-binding" "^7.8.0"
|
||||
|
||||
"@babel/plugin-proposal-optional-chaining@^7.12.13":
|
||||
version "7.12.13"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.13.tgz#63a7d805bc8ce626f3234ee5421a2a7fb23f66d9"
|
||||
integrity sha512-0ZwjGfTcnZqyV3y9DSD1Yk3ebp+sIUpT2YDqP8hovzaNZnQq2Kd7PEqa6iOIUDBXBt7Jl3P7YAcEIL5Pz8u09Q==
|
||||
"@babel/plugin-proposal-optional-chaining@^7.12.16":
|
||||
version "7.12.16"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.12.16.tgz#600c7531f754186b0f2096e495a92da7d88aa139"
|
||||
integrity sha512-O3ohPwOhkwji5Mckb7F/PJpJVJY3DpPsrt/F0Bk40+QMk9QpAIqeGusHWqu/mYqsM8oBa6TziL/2mbERWsUZjg==
|
||||
dependencies:
|
||||
"@babel/helper-plugin-utils" "^7.12.13"
|
||||
"@babel/helper-skip-transparent-expression-wrappers" "^7.12.1"
|
||||
|
@ -698,9 +705,9 @@
|
|||
"@babel/helper-plugin-utils" "^7.12.13"
|
||||
|
||||
"@babel/plugin-transform-runtime@^7.11.0":
|
||||
version "7.12.13"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.12.13.tgz#93a47630c80dab152a2b71011d1e1fd37b31b8e1"
|
||||
integrity sha512-ho1CV2lm8qn2AxD3JdvPgtLVHCYLDaOszlf0gosdHcJAIfgNizag76WI+FoibrvfT+h117fgf8h+wgvo4O2qbA==
|
||||
version "7.12.15"
|
||||
resolved "https://registry.yarnpkg.com/@babel/plugin-transform-runtime/-/plugin-transform-runtime-7.12.15.tgz#4337b2507288007c2b197059301aa0af8d90c085"
|
||||
integrity sha512-OwptMSRnRWJo+tJ9v9wgAf72ydXWfYSXWhnQjZing8nGZSDFqU1MBleKM3+DriKkcbv7RagA8gVeB0A1PNlNow==
|
||||
dependencies:
|
||||
"@babel/helper-module-imports" "^7.12.13"
|
||||
"@babel/helper-plugin-utils" "^7.12.13"
|
||||
|
@ -758,18 +765,18 @@
|
|||
"@babel/helper-plugin-utils" "^7.12.13"
|
||||
|
||||
"@babel/preset-env@^7.11.0", "@babel/preset-env@^7.8.4":
|
||||
version "7.12.13"
|
||||
resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.12.13.tgz#3aa2d09cf7d255177538dff292ac9af29ad46525"
|
||||
integrity sha512-JUVlizG8SoFTz4LmVUL8++aVwzwxcvey3N0j1tRbMAXVEy95uQ/cnEkmEKHN00Bwq4voAV3imQGnQvpkLAxsrw==
|
||||
version "7.12.16"
|
||||
resolved "https://registry.yarnpkg.com/@babel/preset-env/-/preset-env-7.12.16.tgz#16710e3490e37764b2f41886de0a33bc4ae91082"
|
||||
integrity sha512-BXCAXy8RE/TzX416pD2hsVdkWo0G+tYd16pwnRV4Sc0fRwTLRS/Ssv8G5RLXUGQv7g4FG7TXkdDJxCjQ5I+Zjg==
|
||||
dependencies:
|
||||
"@babel/compat-data" "^7.12.13"
|
||||
"@babel/helper-compilation-targets" "^7.12.13"
|
||||
"@babel/helper-compilation-targets" "^7.12.16"
|
||||
"@babel/helper-module-imports" "^7.12.13"
|
||||
"@babel/helper-plugin-utils" "^7.12.13"
|
||||
"@babel/helper-validator-option" "^7.12.11"
|
||||
"@babel/helper-validator-option" "^7.12.16"
|
||||
"@babel/plugin-proposal-async-generator-functions" "^7.12.13"
|
||||
"@babel/plugin-proposal-class-properties" "^7.12.13"
|
||||
"@babel/plugin-proposal-dynamic-import" "^7.12.1"
|
||||
"@babel/plugin-proposal-dynamic-import" "^7.12.16"
|
||||
"@babel/plugin-proposal-export-namespace-from" "^7.12.13"
|
||||
"@babel/plugin-proposal-json-strings" "^7.12.13"
|
||||
"@babel/plugin-proposal-logical-assignment-operators" "^7.12.13"
|
||||
|
@ -777,7 +784,7 @@
|
|||
"@babel/plugin-proposal-numeric-separator" "^7.12.13"
|
||||
"@babel/plugin-proposal-object-rest-spread" "^7.12.13"
|
||||
"@babel/plugin-proposal-optional-catch-binding" "^7.12.13"
|
||||
"@babel/plugin-proposal-optional-chaining" "^7.12.13"
|
||||
"@babel/plugin-proposal-optional-chaining" "^7.12.16"
|
||||
"@babel/plugin-proposal-private-methods" "^7.12.13"
|
||||
"@babel/plugin-proposal-unicode-property-regex" "^7.12.13"
|
||||
"@babel/plugin-syntax-async-generators" "^7.8.0"
|
||||
|
@ -1437,9 +1444,9 @@
|
|||
"@types/leaflet" "*"
|
||||
|
||||
"@types/leaflet@*", "@types/leaflet@^1.5.2":
|
||||
version "1.5.21"
|
||||
resolved "https://registry.yarnpkg.com/@types/leaflet/-/leaflet-1.5.21.tgz#994c44f2bfc45744120f01924c8973c5e960e051"
|
||||
integrity sha512-b+BOkwJDq6DK4m+jFUOHNCFinIkO4CF1MjnOwYgZFX+oElpYpXCCIsxZ3+zQWIRSLVUbRXvaQq2K935jGIyp7A==
|
||||
version "1.5.23"
|
||||
resolved "https://registry.yarnpkg.com/@types/leaflet/-/leaflet-1.5.23.tgz#159823a8c86a50383f0c9d9b9dac2af01fa7603b"
|
||||
integrity sha512-S/xpuwjZuwYMP+4ZzQ10PX0Jy+0XmwPeojtjqhbca9UXaINdoru91Qm/DUUXyh4qYm3CP6Vher06l/UcA9tUKQ==
|
||||
dependencies:
|
||||
"@types/geojson" "*"
|
||||
|
||||
|
@ -1469,9 +1476,9 @@
|
|||
integrity sha512-6nlq2eEh75JegDGUXis9wGTYIJpUvbori4qx++PRKQsV3YRkaqUNPNykzphniqPSZADXCouBuAnyptjUkMkhvw==
|
||||
|
||||
"@types/node@*", "@types/node@>=6":
|
||||
version "14.14.22"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.22.tgz#0d29f382472c4ccf3bd96ff0ce47daf5b7b84b18"
|
||||
integrity sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==
|
||||
version "14.14.28"
|
||||
resolved "https://registry.yarnpkg.com/@types/node/-/node-14.14.28.tgz#cade4b64f8438f588951a6b35843ce536853f25b"
|
||||
integrity sha512-lg55ArB+ZiHHbBBttLpzD07akz0QPrZgUODNakeC09i62dnrywr9mFErHuaPlB6I7z+sEbK+IYmplahvplCj2g==
|
||||
|
||||
"@types/normalize-package-data@^2.4.0":
|
||||
version "2.4.0"
|
||||
|
@ -1497,9 +1504,9 @@
|
|||
"@types/prosemirror-state" "*"
|
||||
|
||||
"@types/prosemirror-model@*", "@types/prosemirror-model@^1.7.2":
|
||||
version "1.11.2"
|
||||
resolved "https://registry.yarnpkg.com/@types/prosemirror-model/-/prosemirror-model-1.11.2.tgz#af7a9571a8d43ad433f0580099628627962cc11b"
|
||||
integrity sha512-mohs15V+gxj10QWJGVooErzSE9ryTo1Wy92lULiQ0BSN5Po9K4vngPzfKmLft0+gAPbEghovTX+I2zQW3bZo1w==
|
||||
version "1.11.3"
|
||||
resolved "https://registry.yarnpkg.com/@types/prosemirror-model/-/prosemirror-model-1.11.3.tgz#22ba40e7f727de830ed9c6724fb8013b2b384768"
|
||||
integrity sha512-tUnOUwwiyIFN18mdXkT9D7xIqCeszu6ePa3s0/uGCgtW009l9AaNRep69L7BORWHGCAvYVaqYB0cybSHXs4MuQ==
|
||||
dependencies:
|
||||
"@types/orderedmap" "*"
|
||||
|
||||
|
@ -1589,9 +1596,9 @@
|
|||
integrity sha512-W+bw9ds02rAQaMvaLYxAbJ6cvguW/iJXNT6lTssS1ps6QdrMKttqEAMEG/b5CR8TZl3/L7/lH0ZV5nNR1LXikA==
|
||||
|
||||
"@types/uglify-js@*":
|
||||
version "3.11.1"
|
||||
resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.11.1.tgz#97ff30e61a0aa6876c270b5f538737e2d6ab8ceb"
|
||||
integrity sha512-7npvPKV+jINLu1SpSYVWG8KvyJBhBa8tmzMMdDoVc2pWUYHN8KIXlPJhjJ4LT97c4dXJA2SHL/q6ADbDriZN+Q==
|
||||
version "3.12.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/uglify-js/-/uglify-js-3.12.0.tgz#2bb061c269441620d46b946350c8f16d52ef37c5"
|
||||
integrity sha512-sYAF+CF9XZ5cvEBkI7RtrG9g2GtMBkviTnBxYYyq+8BWvO4QtXfwwR6a2LFwCi4evMKZfpv6U43ViYvv17Wz3Q==
|
||||
dependencies:
|
||||
source-map "^0.6.1"
|
||||
|
||||
|
@ -1669,12 +1676,12 @@
|
|||
integrity sha512-HrCIVMLjE1MOozVoD86622S7aunluLb2PJdPfb3nYiEtohm8mIB/vyv0Fd37AdeMFrTUQXEunw78YloMA3Qilg==
|
||||
|
||||
"@typescript-eslint/eslint-plugin@^4.14.1":
|
||||
version "4.14.2"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.14.2.tgz#47a15803cfab89580b96933d348c2721f3d2f6fe"
|
||||
integrity sha512-uMGfG7GFYK/nYutK/iqYJv6K/Xuog/vrRRZX9aEP4Zv1jsYXuvFUMDFLhUnc8WFv3D2R5QhNQL3VYKmvLS5zsQ==
|
||||
version "4.15.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.15.0.tgz#13a5a07cf30d0d5781e43480aa2a8d38d308b084"
|
||||
integrity sha512-DJgdGZW+8CFUTz5C/dnn4ONcUm2h2T0itWD85Ob5/V27Ndie8hUoX5HKyGssvR8sUMkAIlUc/AMK67Lqa3kBIQ==
|
||||
dependencies:
|
||||
"@typescript-eslint/experimental-utils" "4.14.2"
|
||||
"@typescript-eslint/scope-manager" "4.14.2"
|
||||
"@typescript-eslint/experimental-utils" "4.15.0"
|
||||
"@typescript-eslint/scope-manager" "4.15.0"
|
||||
debug "^4.1.1"
|
||||
functional-red-black-tree "^1.0.1"
|
||||
lodash "^4.17.15"
|
||||
|
@ -1693,15 +1700,15 @@
|
|||
eslint-scope "^5.0.0"
|
||||
eslint-utils "^2.0.0"
|
||||
|
||||
"@typescript-eslint/experimental-utils@4.14.2":
|
||||
version "4.14.2"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.14.2.tgz#9df35049d1d36b6cbaba534d703648b9e1f05cbb"
|
||||
integrity sha512-mV9pmET4C2y2WlyHmD+Iun8SAEqkLahHGBkGqDVslHkmoj3VnxnGP4ANlwuxxfq1BsKdl/MPieDbohCEQgKrwA==
|
||||
"@typescript-eslint/experimental-utils@4.15.0":
|
||||
version "4.15.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.15.0.tgz#b87c36410a9b23f637689427be85007a2ec1a9c6"
|
||||
integrity sha512-V4vaDWvxA2zgesg4KPgEGiomWEBpJXvY4ZX34Y3qxK8LUm5I87L+qGIOTd9tHZOARXNRt9pLbblSKiYBlGMawg==
|
||||
dependencies:
|
||||
"@types/json-schema" "^7.0.3"
|
||||
"@typescript-eslint/scope-manager" "4.14.2"
|
||||
"@typescript-eslint/types" "4.14.2"
|
||||
"@typescript-eslint/typescript-estree" "4.14.2"
|
||||
"@typescript-eslint/scope-manager" "4.15.0"
|
||||
"@typescript-eslint/types" "4.15.0"
|
||||
"@typescript-eslint/typescript-estree" "4.15.0"
|
||||
eslint-scope "^5.0.0"
|
||||
eslint-utils "^2.0.0"
|
||||
|
||||
|
@ -1717,32 +1724,32 @@
|
|||
eslint-visitor-keys "^1.1.0"
|
||||
|
||||
"@typescript-eslint/parser@^4.14.1":
|
||||
version "4.14.2"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.14.2.tgz#31e216e4baab678a56e539f9db9862e2542c98d0"
|
||||
integrity sha512-ipqSP6EuUsMu3E10EZIApOJgWSpcNXeKZaFeNKQyzqxnQl8eQCbV+TSNsl+s2GViX2d18m1rq3CWgnpOxDPgHg==
|
||||
version "4.15.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.15.0.tgz#8df94365b4b7161f9e8514fe28aef19954810b6b"
|
||||
integrity sha512-L6Dtbq8Bc7g2aZwnIBETpmUa9XDKCMzKVwAArnGp5Mn7PRNFjf3mUzq8UeBjL3K8t311hvevnyqXAMSmxO8Gpg==
|
||||
dependencies:
|
||||
"@typescript-eslint/scope-manager" "4.14.2"
|
||||
"@typescript-eslint/types" "4.14.2"
|
||||
"@typescript-eslint/typescript-estree" "4.14.2"
|
||||
"@typescript-eslint/scope-manager" "4.15.0"
|
||||
"@typescript-eslint/types" "4.15.0"
|
||||
"@typescript-eslint/typescript-estree" "4.15.0"
|
||||
debug "^4.1.1"
|
||||
|
||||
"@typescript-eslint/scope-manager@4.14.2":
|
||||
version "4.14.2"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.14.2.tgz#64cbc9ca64b60069aae0c060b2bf81163243b266"
|
||||
integrity sha512-cuV9wMrzKm6yIuV48aTPfIeqErt5xceTheAgk70N1V4/2Ecj+fhl34iro/vIssJlb7XtzcaD07hWk7Jk0nKghg==
|
||||
"@typescript-eslint/scope-manager@4.15.0":
|
||||
version "4.15.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.15.0.tgz#c42703558ea6daaaba51a9c3a86f2902dbab9432"
|
||||
integrity sha512-CSNBZnCC2jEA/a+pR9Ljh8Y+5TY5qgbPz7ICEk9WCpSEgT6Pi7H2RIjxfrrbUXvotd6ta+i27sssKEH8Azm75g==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "4.14.2"
|
||||
"@typescript-eslint/visitor-keys" "4.14.2"
|
||||
"@typescript-eslint/types" "4.15.0"
|
||||
"@typescript-eslint/visitor-keys" "4.15.0"
|
||||
|
||||
"@typescript-eslint/types@3.10.1":
|
||||
version "3.10.1"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-3.10.1.tgz#1d7463fa7c32d8a23ab508a803ca2fe26e758727"
|
||||
integrity sha512-+3+FCUJIahE9q0lDi1WleYzjCwJs5hIsbugIgnbB+dSCYUxl8L6PwmsyOPFZde2hc1DlTo/xnkOgiTLSyAbHiQ==
|
||||
|
||||
"@typescript-eslint/types@4.14.2":
|
||||
version "4.14.2"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.14.2.tgz#d96da62be22dc9dc6a06647f3633815350fb3174"
|
||||
integrity sha512-LltxawRW6wXy4Gck6ZKlBD05tCHQUj4KLn4iR69IyRiDHX3d3NCAhO+ix5OR2Q+q9bjCrHE/HKt+riZkd1At8Q==
|
||||
"@typescript-eslint/types@4.15.0":
|
||||
version "4.15.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.15.0.tgz#3011ae1ac3299bb9a5ac56bdd297cccf679d3662"
|
||||
integrity sha512-su4RHkJhS+iFwyqyXHcS8EGPlUVoC+XREfy5daivjLur9JP8GhvTmDipuRpcujtGC4M+GYhUOJCPDE3rC5NJrg==
|
||||
|
||||
"@typescript-eslint/typescript-estree@3.10.1":
|
||||
version "3.10.1"
|
||||
|
@ -1758,17 +1765,16 @@
|
|||
semver "^7.3.2"
|
||||
tsutils "^3.17.1"
|
||||
|
||||
"@typescript-eslint/typescript-estree@4.14.2":
|
||||
version "4.14.2"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.14.2.tgz#9c5ebd8cae4d7b014f890acd81e8e17f309c9df9"
|
||||
integrity sha512-ESiFl8afXxt1dNj8ENEZT12p+jl9PqRur+Y19m0Z/SPikGL6rqq4e7Me60SU9a2M28uz48/8yct97VQYaGl0Vg==
|
||||
"@typescript-eslint/typescript-estree@4.15.0":
|
||||
version "4.15.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.15.0.tgz#402c86a7d2111c1f7a2513022f22a38a395b7f93"
|
||||
integrity sha512-jG6xTmcNbi6xzZq0SdWh7wQ9cMb2pqXaUp6bUZOMsIlu5aOlxGxgE/t6L/gPybybQGvdguajXGkZKSndZJpksA==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "4.14.2"
|
||||
"@typescript-eslint/visitor-keys" "4.14.2"
|
||||
"@typescript-eslint/types" "4.15.0"
|
||||
"@typescript-eslint/visitor-keys" "4.15.0"
|
||||
debug "^4.1.1"
|
||||
globby "^11.0.1"
|
||||
is-glob "^4.0.1"
|
||||
lodash "^4.17.15"
|
||||
semver "^7.3.2"
|
||||
tsutils "^3.17.1"
|
||||
|
||||
|
@ -1779,12 +1785,12 @@
|
|||
dependencies:
|
||||
eslint-visitor-keys "^1.1.0"
|
||||
|
||||
"@typescript-eslint/visitor-keys@4.14.2":
|
||||
version "4.14.2"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.14.2.tgz#997cbe2cb0690e1f384a833f64794e98727c70c6"
|
||||
integrity sha512-KBB+xLBxnBdTENs/rUgeUKO0UkPBRs2vD09oMRRIkj5BEN8PX1ToXV532desXfpQnZsYTyLLviS7JrPhdL154w==
|
||||
"@typescript-eslint/visitor-keys@4.15.0":
|
||||
version "4.15.0"
|
||||
resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.15.0.tgz#2a07768df30c8a5673f1bce406338a07fdec38ca"
|
||||
integrity sha512-RnDtJwOwFucWFAMjG3ghCG/ikImFJFEg20DI7mn4pHEx3vC48lIAoyjhffvfHmErRDboUPC7p9Z2il4CLb7qxA==
|
||||
dependencies:
|
||||
"@typescript-eslint/types" "4.14.2"
|
||||
"@typescript-eslint/types" "4.15.0"
|
||||
eslint-visitor-keys "^2.0.0"
|
||||
|
||||
"@ungap/global-this@^0.4.2":
|
||||
|
@ -1803,9 +1809,9 @@
|
|||
integrity sha512-hz4R8tS5jMn8lDq6iD+yWL6XNB699pGIVLk7WSJnn1dbpjaazsjZQkieJoRX6gW5zpYSCFqQ7jUquPNY65tQYA==
|
||||
|
||||
"@vue/babel-plugin-jsx@^1.0.0-0":
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/@vue/babel-plugin-jsx/-/babel-plugin-jsx-1.0.2.tgz#6bfd8e39c48e53391a56705649f81a35fe20b6a1"
|
||||
integrity sha512-1uZlQCLCeuqJgDYLCmg3qfsvTVtOQiXh278ES4bvPTYYbv2Bi/rElLETK6AdjI9xxzyTUf5n1QEiH8Xxz0eZrg==
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/@vue/babel-plugin-jsx/-/babel-plugin-jsx-1.0.3.tgz#ad5ee86ebc9fc40900add9914534e223c719eace"
|
||||
integrity sha512-+52ZQFmrM0yh61dQlgwQlfHZXmYbswbQEL25SOSt9QkjegAdfIGu87oELw0l8H6cuJYazZCiNjPR9eU++ZIbxg==
|
||||
dependencies:
|
||||
"@babel/helper-module-imports" "^7.0.0"
|
||||
"@babel/plugin-syntax-jsx" "^7.0.0"
|
||||
|
@ -2130,18 +2136,18 @@
|
|||
integrity sha512-LIZMuJk38pk9U9Ur4YzHjlIyMuxPlACdBIHH9/nGYVTsaGKOSnSuELiE8vS9wa+dJpIYspYUOqk+L1Q4pgHQHQ==
|
||||
|
||||
"@vue/test-utils@^1.1.0":
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-1.1.2.tgz#fdb487448dceefeaf3d01d465f7c836a3d666dbc"
|
||||
integrity sha512-utbIL7zn9c+SjhybPwh48lpWCiluFCbP1yyRNAy1fQsw/6hiNFioaWy05FoVAFIZXC5WwBf+5r4ypfM1j/nI4A==
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/@vue/test-utils/-/test-utils-1.1.3.tgz#747f5683d8d4633c85a385fe2e02c1bb35bec153"
|
||||
integrity sha512-BAY1Cwe9JpkJseimC295EW3YlAmgIJI9OPkg2FSP62+PHZooB0B+wceDi9TYyU57oqzL0yLbcP73JKFpKiLc9A==
|
||||
dependencies:
|
||||
dom-event-types "^1.0.0"
|
||||
lodash "^4.17.15"
|
||||
pretty "^2.0.0"
|
||||
|
||||
"@vue/web-component-wrapper@^1.2.0":
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/@vue/web-component-wrapper/-/web-component-wrapper-1.2.0.tgz#bb0e46f1585a7e289b4ee6067dcc5a6ae62f1dd1"
|
||||
integrity sha512-Xn/+vdm9CjuC9p3Ae+lTClNutrVhsXpzxvoTXXtoys6kVRX9FkueSUAqSWAyZntmVLlR4DosBV4pH8y5Z/HbUw==
|
||||
version "1.3.0"
|
||||
resolved "https://registry.yarnpkg.com/@vue/web-component-wrapper/-/web-component-wrapper-1.3.0.tgz#b6b40a7625429d2bd7c2281ddba601ed05dc7f1a"
|
||||
integrity sha512-Iu8Tbg3f+emIIMmI2ycSI8QcEuAUgPTgHwesDU1eKMLE4YC/c/sFbGc70QgMq31ijRftV0R7vCm9co6rldCeOA==
|
||||
|
||||
"@webassemblyjs/ast@1.9.0":
|
||||
version "1.9.0"
|
||||
|
@ -2297,9 +2303,9 @@
|
|||
tslib "^1.9.3"
|
||||
|
||||
"@wry/context@^0.5.2":
|
||||
version "0.5.3"
|
||||
resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.5.3.tgz#537db8a5b51f98507dc38f869b3a48c672f48942"
|
||||
integrity sha512-n0uKHiWpf2ArHhmcHcUsKA+Dj0gtye/h56VmsDcoMRuK/ZPFeHKi8ck5L/ftqtF12ZbQR9l8xMPV7y+xybaRDA==
|
||||
version "0.5.4"
|
||||
resolved "https://registry.yarnpkg.com/@wry/context/-/context-0.5.4.tgz#b6c28038872e0a0e1ff14eb40b5bf4cab2ab4e06"
|
||||
integrity sha512-/pktJKHUXDr4D6TJqWgudOPJW2Z+Nb+bqk40jufA3uTkLbnCRKdJPiYDIa/c7mfcPH8Hr6O8zjCERpg5Sq04Zg==
|
||||
dependencies:
|
||||
tslib "^1.14.1"
|
||||
|
||||
|
@ -2311,16 +2317,16 @@
|
|||
tslib "^1.9.3"
|
||||
|
||||
"@wry/equality@^0.3.0":
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.3.1.tgz#81080cdc2e0d8265cd303faa0c64b38a77884e06"
|
||||
integrity sha512-8/Ftr3jUZ4EXhACfSwPIfNsE8V6WKesdjp+Dxi78Bej6qlasAxiz0/F8j0miACRj9CL4vC5Y5FsfwwEYAuhWbg==
|
||||
version "0.3.2"
|
||||
resolved "https://registry.yarnpkg.com/@wry/equality/-/equality-0.3.2.tgz#566a8d05225f1e559fc6589c8b50fa085413c6be"
|
||||
integrity sha512-yi0VRqw+ygqM/WVZUze5meAhe2evOHBFXqK8onNVdNNB+Tyn8/07FZpeDklECBHeT9KN9DY2JpCVGNQY6RCRDg==
|
||||
dependencies:
|
||||
tslib "^1.14.1"
|
||||
|
||||
"@wry/trie@^0.2.1":
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@wry/trie/-/trie-0.2.1.tgz#4191e1d4a85dd77dfede383d65563138ed82fc47"
|
||||
integrity sha512-sYkuXZqArky2MLQCv4tLW6hX3N8AfTZ5ZMBc8jC6Yy35WYr82UYLLtjS7k/uRGHOA0yTSjuNadG6QQ6a5CS5hQ==
|
||||
version "0.2.2"
|
||||
resolved "https://registry.yarnpkg.com/@wry/trie/-/trie-0.2.2.tgz#99f20f0fcbbcda17006069b155c826cbabfc402f"
|
||||
integrity sha512-OxqBB39x6MfHaa2HpMiRMfhuUnQTddD32Ko020eBeJXq87ivX6xnSSnzKHVbA21p7iqBASz8n/07b6W5wW1BVQ==
|
||||
dependencies:
|
||||
tslib "^1.14.1"
|
||||
|
||||
|
@ -2424,9 +2430,9 @@ ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.3, ajv@^6.12.4, ajv
|
|||
uri-js "^4.2.2"
|
||||
|
||||
ajv@^7.0.2:
|
||||
version "7.0.4"
|
||||
resolved "https://registry.yarnpkg.com/ajv/-/ajv-7.0.4.tgz#827e5f5ae32f5e5c1637db61f253a112229b5e2f"
|
||||
integrity sha512-xzzzaqgEQfmuhbhAoqjJ8T/1okb6gAzXn/eQRNpAN1AEUoHJTNF9xCDRTtf/s3SKldtZfa+RJeTs+BQq+eZ/sw==
|
||||
version "7.1.0"
|
||||
resolved "https://registry.yarnpkg.com/ajv/-/ajv-7.1.0.tgz#f982ea7933dc7f1012eae9eec5a86687d805421b"
|
||||
integrity sha512-svS9uILze/cXbH0z2myCK2Brqprx/+JJYK5pHicT/GQiBfzzhUVAIT6MwqJg8y4xV/zoGsUeuPuwtoiKSGE15g==
|
||||
dependencies:
|
||||
fast-deep-equal "^3.1.1"
|
||||
json-schema-traverse "^1.0.0"
|
||||
|
@ -3478,9 +3484,9 @@ caniuse-api@^3.0.0:
|
|||
lodash.uniq "^4.5.0"
|
||||
|
||||
caniuse-lite@^1.0.0, caniuse-lite@^1.0.30001109, caniuse-lite@^1.0.30001181:
|
||||
version "1.0.30001183"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001183.tgz#7a57ba9d6584119bb5f2bc76d3cc47ba9356b3e2"
|
||||
integrity sha512-7JkwTEE1hlRKETbCFd8HDZeLiQIUcl8rC6JgNjvHCNaxOeNmQ9V4LvQXRUsKIV2CC73qKxljwVhToaA3kLRqTw==
|
||||
version "1.0.30001187"
|
||||
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001187.tgz#5706942631f83baa5a0218b7dfa6ced29f845438"
|
||||
integrity sha512-w7/EP1JRZ9552CyrThUnay2RkZ1DXxKe/Q2swTC4+LElLh9RRYrL1Z+27LlakB8kzY0fSmHw9mc7XYDUKAKWMA==
|
||||
|
||||
capture-exit@^2.0.0:
|
||||
version "2.0.0"
|
||||
|
@ -4371,9 +4377,9 @@ date-fns@^1.27.2:
|
|||
integrity sha512-hBSVCvSmWC+QypYObzwGOd9wqdDpOt+0wl0KbU+R+uuZBS1jN8VsD1ss3irQDknRj5NvxiTF6oj/nDRnN/UQNw==
|
||||
|
||||
date-fns@^2.16.0:
|
||||
version "2.16.1"
|
||||
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.16.1.tgz#05775792c3f3331da812af253e1a935851d3834b"
|
||||
integrity sha512-sAJVKx/FqrLYHAQeN7VpJrPhagZc9R4ImZIWYRFZaaohR3KzmuK88touwsSwSVT8Qcbd4zoDsnGfX4GFB4imyQ==
|
||||
version "2.17.0"
|
||||
resolved "https://registry.yarnpkg.com/date-fns/-/date-fns-2.17.0.tgz#afa55daea539239db0a64e236ce716ef3d681ba1"
|
||||
integrity sha512-ZEhqxUtEZeGgg9eHNSOAJ8O9xqSgiJdrL0lzSSfMF54x6KXWJiOH/xntSJ9YomJPrYH/p08t6gWjGWq1SDJlSA==
|
||||
|
||||
de-indent@^1.0.2:
|
||||
version "1.0.2"
|
||||
|
@ -4766,9 +4772,9 @@ ejs@^2.6.1:
|
|||
integrity sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA==
|
||||
|
||||
electron-to-chromium@^1.3.649:
|
||||
version "1.3.652"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.652.tgz#9465d884d609acffd131ba71096de7bfabd63670"
|
||||
integrity sha512-85J5D0Ksxjq2MIHfgwOURRej72UMlexbaa7t+oKTJan3Pa/RBE8vJ4/JzwaQjLCElPvd0XeLWi7+xYTVrq96aA==
|
||||
version "1.3.664"
|
||||
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.3.664.tgz#8fb039e2fa8ef3ab2568308464a28425d4f6e2a3"
|
||||
integrity sha512-yb8LrTQXQnh9yhnaIHLk6CYugF/An50T20+X0h++hjjhVfgSp1DGoMSYycF8/aD5eiqS4QwaNhiduFvK8rifRg==
|
||||
|
||||
elegant-spinner@^1.0.1:
|
||||
version "1.0.1"
|
||||
|
@ -4983,14 +4989,14 @@ eslint-plugin-prettier@^3.1.3:
|
|||
prettier-linter-helpers "^1.0.0"
|
||||
|
||||
eslint-plugin-vue@^7.0.0:
|
||||
version "7.5.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-7.5.0.tgz#cc6d983eb22781fa2440a7573cf39af439bb5725"
|
||||
integrity sha512-QnMMTcyV8PLxBz7QQNAwISSEs6LYk2LJvGlxalXvpCtfKnqo7qcY0aZTIxPe8QOnHd7WCwiMZLOJzg6A03T0Gw==
|
||||
version "7.6.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint-plugin-vue/-/eslint-plugin-vue-7.6.0.tgz#ea616e6dfd45d545adb16cba628c5a992cc31f0b"
|
||||
integrity sha512-qYpKwAvpcQXyUXVcG8Zd+fxHDx9iSgTQuO7dql7Ug/2BCvNNDr6s3I9p8MoUo23JJdO7ZAjW3vSwY/EBf4uBcw==
|
||||
dependencies:
|
||||
eslint-utils "^2.1.0"
|
||||
natural-compare "^1.4.0"
|
||||
semver "^7.3.2"
|
||||
vue-eslint-parser "^7.4.1"
|
||||
vue-eslint-parser "^7.5.0"
|
||||
|
||||
eslint-scope@^4.0.3:
|
||||
version "4.0.3"
|
||||
|
@ -5026,11 +5032,11 @@ eslint-visitor-keys@^2.0.0:
|
|||
integrity sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==
|
||||
|
||||
eslint@^7.7.0, eslint@^7.9.0:
|
||||
version "7.19.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.19.0.tgz#6719621b196b5fad72e43387981314e5d0dc3f41"
|
||||
integrity sha512-CGlMgJY56JZ9ZSYhJuhow61lMPPjUzWmChFya71Z/jilVos7mR/jPgaEfVGgMBY5DshbKdG8Ezb8FDCHcoMEMg==
|
||||
version "7.20.0"
|
||||
resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.20.0.tgz#db07c4ca4eda2e2316e7aa57ac7fc91ec550bdc7"
|
||||
integrity sha512-qGi0CTcOGP2OtCQBgWZlQjcTuP0XkIpYFj25XtRTQSHC+umNnp7UMshr2G8SLsRFYDdAPFeHOsiteadmMH02Yw==
|
||||
dependencies:
|
||||
"@babel/code-frame" "^7.0.0"
|
||||
"@babel/code-frame" "7.12.11"
|
||||
"@eslint/eslintrc" "^0.3.0"
|
||||
ajv "^6.10.0"
|
||||
chalk "^4.0.0"
|
||||
|
@ -5042,7 +5048,7 @@ eslint@^7.7.0, eslint@^7.9.0:
|
|||
eslint-utils "^2.1.0"
|
||||
eslint-visitor-keys "^2.0.0"
|
||||
espree "^7.3.1"
|
||||
esquery "^1.2.0"
|
||||
esquery "^1.4.0"
|
||||
esutils "^2.0.2"
|
||||
file-entry-cache "^6.0.0"
|
||||
functional-red-black-tree "^1.0.1"
|
||||
|
@ -5091,10 +5097,10 @@ esprima@^4.0.0, esprima@^4.0.1:
|
|||
resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71"
|
||||
integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==
|
||||
|
||||
esquery@^1.0.1, esquery@^1.2.0:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.3.1.tgz#b78b5828aa8e214e29fb74c4d5b752e1c033da57"
|
||||
integrity sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==
|
||||
esquery@^1.0.1, esquery@^1.4.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.4.0.tgz#2148ffc38b82e8c7057dfed48425b3e61f0f24a5"
|
||||
integrity sha512-cCDispWt5vHHtwMY2YrAQ4ibFkAL8RbH5YGBnZBc90MolvvfkkQcJro/aZiAQUlQ3qgrYS6D6v8Gc5G5CQsc9w==
|
||||
dependencies:
|
||||
estraverse "^5.1.0"
|
||||
|
||||
|
@ -5815,9 +5821,9 @@ fsevents@^1.2.7:
|
|||
nan "^2.12.1"
|
||||
|
||||
fsevents@~2.3.1:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.1.tgz#b209ab14c61012636c8863507edf7fb68cc54e9f"
|
||||
integrity sha512-YR47Eg4hChJGAB1O3yEAOkGO+rlzutoICGqGo9EZ4lKWokzZRSyIW1QmTzqjtw8MJdj9srP869CuWw/hyzSiBw==
|
||||
version "2.3.2"
|
||||
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
|
||||
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
|
||||
|
||||
function-bind@^1.1.1:
|
||||
version "1.1.1"
|
||||
|
@ -5840,9 +5846,9 @@ get-caller-file@^2.0.1, get-caller-file@^2.0.5:
|
|||
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
|
||||
|
||||
get-intrinsic@^1.0.2:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.0.tgz#892e62931e6938c8a23ea5aaebcfb67bd97da97e"
|
||||
integrity sha512-M11rgtQp5GZMZzDL7jLTNxbDfurpzuau5uqRWDPvlHjfvg3TdScAZo96GLvhMjImrmR8uAt0FS2RLoMrfWGKlg==
|
||||
version "1.1.1"
|
||||
resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.1.1.tgz#15f59f376f855c446963948f0d24cd3637b4abc6"
|
||||
integrity sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==
|
||||
dependencies:
|
||||
function-bind "^1.1.1"
|
||||
has "^1.0.3"
|
||||
|
@ -6038,15 +6044,22 @@ globby@^9.2.0:
|
|||
slash "^2.0.0"
|
||||
|
||||
graceful-fs@^4.1.11, graceful-fs@^4.1.15, graceful-fs@^4.1.2, graceful-fs@^4.1.6, graceful-fs@^4.2.0, graceful-fs@^4.2.2:
|
||||
version "4.2.4"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.4.tgz#2256bde14d3632958c465ebc96dc467ca07a29fb"
|
||||
integrity sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==
|
||||
version "4.2.6"
|
||||
resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee"
|
||||
integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ==
|
||||
|
||||
graphql-tag@^2.10.3, graphql-tag@^2.11.0:
|
||||
graphql-tag@^2.10.3:
|
||||
version "2.11.0"
|
||||
resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.11.0.tgz#1deb53a01c46a7eb401d6cb59dec86fa1cccbffd"
|
||||
integrity sha512-VmsD5pJqWJnQZMUeRwrDhfgoyqcfwEkvtpANqcoUG8/tOLkwNgU9mzub/Mc78OJMhHjx7gfAMTxzdG43VGg3bA==
|
||||
|
||||
graphql-tag@^2.12.0:
|
||||
version "2.12.1"
|
||||
resolved "https://registry.yarnpkg.com/graphql-tag/-/graphql-tag-2.12.1.tgz#b065ef885e4800e4afd0842811b718a205f4aa58"
|
||||
integrity sha512-LPewEE1vzGkHnCO8zdOGogKsHHBdtpGyihow1UuMwp6RnZa0lAS7NcbvltLOuo4pi5diQCPASAXZkQq44ffixA==
|
||||
dependencies:
|
||||
tslib "^1.14.1"
|
||||
|
||||
graphql@14.0.2:
|
||||
version "14.0.2"
|
||||
resolved "https://registry.yarnpkg.com/graphql/-/graphql-14.0.2.tgz#7dded337a4c3fd2d075692323384034b357f5650"
|
||||
|
@ -6192,10 +6205,10 @@ hex-color-regex@^1.1.0:
|
|||
resolved "https://registry.yarnpkg.com/hex-color-regex/-/hex-color-regex-1.1.0.tgz#4c06fccb4602fe2602b3c93df82d7e7dbf1a8a8e"
|
||||
integrity sha512-l9sfDFsuqtOqKDsQdqrMRk0U85RZc0RtOR9yPI7mRVOa4FsR/BVnZ0shmQRM96Ji99kYZP/7hn1cedc1+ApsTQ==
|
||||
|
||||
highlight.js@^10.0.0, highlight.js@~10.5.0:
|
||||
version "10.5.0"
|
||||
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.5.0.tgz#3f09fede6a865757378f2d9ebdcbc15ba268f98f"
|
||||
integrity sha512-xTmvd9HiIHR6L53TMC7TKolEj65zG1XU+Onr8oi86mYa+nLcIbxTTWkpW7CsEwv/vK7u1zb8alZIMLDqqN6KTw==
|
||||
highlight.js@^10.0.0, highlight.js@~10.6.0:
|
||||
version "10.6.0"
|
||||
resolved "https://registry.yarnpkg.com/highlight.js/-/highlight.js-10.6.0.tgz#0073aa71d566906965ba6e1b7be7b2682f5e18b6"
|
||||
integrity sha512-8mlRcn5vk/r4+QcqerapwBYTe+iPL5ih6xrNylxrnBdHQiijDETfXX7VIxC3UiCRiINBJfANBAsPzAvRQj8RpQ==
|
||||
|
||||
hmac-drbg@^1.0.1:
|
||||
version "1.0.1"
|
||||
|
@ -6692,7 +6705,7 @@ is-color-stop@^1.0.0:
|
|||
rgb-regex "^1.0.1"
|
||||
rgba-regex "^1.0.0"
|
||||
|
||||
is-core-module@^2.1.0:
|
||||
is-core-module@^2.2.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.2.0.tgz#97037ef3d52224d85163f5597b2b63d9afed981a"
|
||||
integrity sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==
|
||||
|
@ -7737,9 +7750,9 @@ lazy-ass@1.6.0:
|
|||
integrity sha1-eZllXoZGwX8In90YfRUNMyTVRRM=
|
||||
|
||||
leaflet.locatecontrol@^0.72.0:
|
||||
version "0.72.0"
|
||||
resolved "https://registry.yarnpkg.com/leaflet.locatecontrol/-/leaflet.locatecontrol-0.72.0.tgz#7de5c109a0e10a928bae85e4996e5efa49a3c905"
|
||||
integrity sha512-enAf10UG9Z1bV0siTP/+vG/ZVncDqSA3V8c6iZ3s6KWL5Ngkk4A4mk9Ssefj46ey98I9HSYWqoS+k2Y7EaKjwQ==
|
||||
version "0.72.2"
|
||||
resolved "https://registry.yarnpkg.com/leaflet.locatecontrol/-/leaflet.locatecontrol-0.72.2.tgz#513787f983bce029c100a79aedc9eb98383100e0"
|
||||
integrity sha512-MNi7m+TlQFwiz5jq5W9vcGjwBHsh1PGxjKjONYd0NezuSLdj9dNjRsupLXtF2fNnX+s+tPNzP7V+Nmg6TKvhHA==
|
||||
|
||||
leaflet@^1.4.0:
|
||||
version "1.7.1"
|
||||
|
@ -8017,12 +8030,12 @@ lower-case@^1.1.1:
|
|||
integrity sha1-miyr0bno4K6ZOkv31YdcOcQujqw=
|
||||
|
||||
lowlight@^1.17.0:
|
||||
version "1.18.0"
|
||||
resolved "https://registry.yarnpkg.com/lowlight/-/lowlight-1.18.0.tgz#cfff11cfb125ca66f1c12cb43d27fff68cbeafa9"
|
||||
integrity sha512-Zlc3GqclU71HRw5fTOy00zz5EOlqAdKMYhOFIO8ay4SQEDQgFuhR8JNwDIzAGMLoqTsWxe0elUNmq5o2USRAzw==
|
||||
version "1.19.0"
|
||||
resolved "https://registry.yarnpkg.com/lowlight/-/lowlight-1.19.0.tgz#b8544199cafcf10c5731b21c7458c358f79a2a97"
|
||||
integrity sha512-NIskvQ1d1ovKyUytkMpT8+8Bhq3Ub54os1Xp4RAC9uNbXH1YVRf5NERq7JNzapEe5BzUc1Cj4F0I+eLBBFj6hA==
|
||||
dependencies:
|
||||
fault "^1.0.0"
|
||||
highlight.js "~10.5.0"
|
||||
highlight.js "~10.6.0"
|
||||
|
||||
lru-cache@^4.0.1, lru-cache@^4.1.2, lru-cache@^4.1.5:
|
||||
version "4.1.5"
|
||||
|
@ -8232,11 +8245,16 @@ miller-rabin@^4.0.0:
|
|||
bn.js "^4.0.0"
|
||||
brorand "^1.0.1"
|
||||
|
||||
mime-db@1.45.0, "mime-db@>= 1.43.0 < 2":
|
||||
mime-db@1.45.0:
|
||||
version "1.45.0"
|
||||
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.45.0.tgz#cceeda21ccd7c3a745eba2decd55d4b73e7879ea"
|
||||
integrity sha512-CkqLUxUk15hofLoLyljJSrukZi8mAtgd+yE5uO4tqRZsdsAJKv0O+rFMhVDRJgozy+yG6md5KwuXhD4ocIoP+w==
|
||||
|
||||
"mime-db@>= 1.43.0 < 2":
|
||||
version "1.46.0"
|
||||
resolved "https://registry.yarnpkg.com/mime-db/-/mime-db-1.46.0.tgz#6267748a7f799594de3cbc8cde91def349661cee"
|
||||
integrity sha512-svXaP8UQRZ5K7or+ZmfNhg2xX3yKDMUzqadsSqi4NCH/KomcH75MAMYAGVlvXn4+b/xOPhS3I2uHKRUzvjY7BQ==
|
||||
|
||||
mime-types@^2.1.12, mime-types@~2.1.17, mime-types@~2.1.19, mime-types@~2.1.24:
|
||||
version "2.1.28"
|
||||
resolved "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.28.tgz#1160c4757eab2c5363888e005273ecf79d2a0ecd"
|
||||
|
@ -9805,18 +9823,18 @@ prosemirror-collab@^1.2.2:
|
|||
prosemirror-state "^1.0.0"
|
||||
|
||||
prosemirror-commands@^1.1.4:
|
||||
version "1.1.5"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-commands/-/prosemirror-commands-1.1.5.tgz#3f07a5b13e424ad8728168b6b45e1b17e47c2b81"
|
||||
integrity sha512-4CKAnDxLTtUHpjRZZVEF/LLMUYh7NbS3Ze3mP5UEAgar4WRWQYg3Js01wnp/GMqaZueNHhsp9UVvOrAK+7DWbQ==
|
||||
version "1.1.6"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-commands/-/prosemirror-commands-1.1.6.tgz#727c045eb60e7d61f1b1d0a9411a7f60286bb1de"
|
||||
integrity sha512-oh3DN9qhtYR+4/Yfb9+hAKjiV4pEqPRxsPqUeoVqJP7Dfbk4jQKYZFDKMZgLAdSFi49fMeiVYieN3fpjOLuP0Q==
|
||||
dependencies:
|
||||
prosemirror-model "^1.0.0"
|
||||
prosemirror-state "^1.0.0"
|
||||
prosemirror-transform "^1.0.0"
|
||||
|
||||
prosemirror-dropcursor@^1.3.2:
|
||||
version "1.3.2"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-dropcursor/-/prosemirror-dropcursor-1.3.2.tgz#28738c4ed7102e814d7a8a26d70018523fc7cd6d"
|
||||
integrity sha512-4c94OUGyobGnwcQI70OXyMhE/9T4aTgjU+CHxkd5c7D+jH/J0mKM/lk+jneFVKt7+E4/M0D9HzRPifu8U28Thw==
|
||||
version "1.3.3"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-dropcursor/-/prosemirror-dropcursor-1.3.3.tgz#583d6a82b4960d468132c07c40803cc1d697fda4"
|
||||
integrity sha512-zavE+wh+qkDcP7LaWn+jXVujGyQzBYSmM8E2HSngQ3KaaR+HJYgEBYGs9ynLHqKWLlLCXsxWdVYPV49v4caFyg==
|
||||
dependencies:
|
||||
prosemirror-state "^1.0.0"
|
||||
prosemirror-transform "^1.1.0"
|
||||
|
@ -9858,9 +9876,9 @@ prosemirror-keymap@^1.0.0, prosemirror-keymap@^1.1.2, prosemirror-keymap@^1.1.4:
|
|||
w3c-keyname "^2.2.0"
|
||||
|
||||
prosemirror-model@^1.0.0, prosemirror-model@^1.1.0, prosemirror-model@^1.13.1, prosemirror-model@^1.8.1:
|
||||
version "1.13.1"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-model/-/prosemirror-model-1.13.1.tgz#fa3dc888cf6928bd3968620588ffe6458d201f9f"
|
||||
integrity sha512-PNH+b5bilAJi1B5yJ8QzoNY3ZV+nlD0jKG3XCBk7PmE/YUTJomBkFBS005vfU+3M9yeVR8/6spAEDsfVFUhNeQ==
|
||||
version "1.13.3"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-model/-/prosemirror-model-1.13.3.tgz#3ccfde73b9c9e706933c72bdf7462906509ff1c9"
|
||||
integrity sha512-wujIYYQEcxdkbKmIJiekVjqtylKxuoEcc+w2PnN7Itc58m/75J4rCUz2dibygVQJFi3gZrD2DNFLjOS6LP4w1g==
|
||||
dependencies:
|
||||
orderedmap "^1.1.0"
|
||||
|
||||
|
@ -9892,16 +9910,16 @@ prosemirror-tables@^1.1.1:
|
|||
prosemirror-view "^1.13.3"
|
||||
|
||||
prosemirror-transform@^1.0.0, prosemirror-transform@^1.1.0, prosemirror-transform@^1.2.1, prosemirror-transform@^1.2.8:
|
||||
version "1.2.9"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-transform/-/prosemirror-transform-1.2.9.tgz#dfa048102c12a457deaf4c60ae633ac3eaacc7c9"
|
||||
integrity sha512-oiocfgn7J7Fulvl7luBsyxdAf0CJp96+0FIcqhHSvYVr/R4KqZNxXcU9xESaI9Xw+tTvDUiiS3gedVk3AOic4w==
|
||||
version "1.2.11"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-transform/-/prosemirror-transform-1.2.11.tgz#87fc53b2b1344ca4c2c4cb3f3b61486794b6a0b3"
|
||||
integrity sha512-i4N5bMZcmhZPJw1ULH2Ne6SumqrkWBQpJXo/PN6xwq8kv6q7IZVYDjF7DRe2vp3AiqZ/5KnLucJM7e82875LyQ==
|
||||
dependencies:
|
||||
prosemirror-model "^1.0.0"
|
||||
|
||||
prosemirror-view@^1.0.0, prosemirror-view@^1.1.0, prosemirror-view@^1.13.3, prosemirror-view@^1.16.5:
|
||||
version "1.17.3"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.17.3.tgz#66a51da731e840a83ddcc9531f2e5f2b519ce5ff"
|
||||
integrity sha512-jZiuoLe/5wY4ztFZrLbnpCf2EfCpW0gCBwLNoF07ACSNTWvjcnR8WaHTiSxBK75TbSPvtqr3B8dW4K1bdYUSLg==
|
||||
version "1.17.6"
|
||||
resolved "https://registry.yarnpkg.com/prosemirror-view/-/prosemirror-view-1.17.6.tgz#9c31c84b9b78bd3aa3343d1b90eff36869387a5b"
|
||||
integrity sha512-ZnpIQg8DzrvpeBPLab3UUEjwjA37CwOjQruDyzdHYUf6MA95H48tchIOVrwUdQxFDhETaG5iQOWZlAzYj+olzw==
|
||||
dependencies:
|
||||
prosemirror-model "^1.1.0"
|
||||
prosemirror-state "^1.0.0"
|
||||
|
@ -10025,6 +10043,11 @@ querystringify@^2.1.1:
|
|||
resolved "https://registry.yarnpkg.com/querystringify/-/querystringify-2.2.0.tgz#3345941b4153cb9d082d8eee4cda2016a9aef7f6"
|
||||
integrity sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==
|
||||
|
||||
queue-microtask@^1.2.2:
|
||||
version "1.2.2"
|
||||
resolved "https://registry.yarnpkg.com/queue-microtask/-/queue-microtask-1.2.2.tgz#abf64491e6ecf0f38a6502403d4cda04f372dfd3"
|
||||
integrity sha512-dB15eXv3p2jDlbOiNLyMabYg1/sXvppd8DP2J3EOCQ0AkuSXCW2tP7mnVouVLJKgUMY6yP0kcQDVpLCN13h4Xg==
|
||||
|
||||
ramda@0.24.1:
|
||||
version "0.24.1"
|
||||
resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.24.1.tgz#c3b7755197f35b8dc3502228262c4c91ddb6b857"
|
||||
|
@ -10405,11 +10428,11 @@ resolve@1.1.7:
|
|||
integrity sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=
|
||||
|
||||
resolve@1.x, resolve@^1.10.0, resolve@^1.14.2, resolve@^1.3.2:
|
||||
version "1.19.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c"
|
||||
integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==
|
||||
version "1.20.0"
|
||||
resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975"
|
||||
integrity sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==
|
||||
dependencies:
|
||||
is-core-module "^2.1.0"
|
||||
is-core-module "^2.2.0"
|
||||
path-parse "^1.0.6"
|
||||
|
||||
restore-cursor@^1.0.1:
|
||||
|
@ -10534,9 +10557,11 @@ run-async@^2.4.0:
|
|||
integrity sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==
|
||||
|
||||
run-parallel@^1.1.9:
|
||||
version "1.1.10"
|
||||
resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.1.10.tgz#60a51b2ae836636c81377df16cb107351bcd13ef"
|
||||
integrity sha512-zb/1OuZ6flOlH6tQyMPUrE3x3Ulxjlo9WIVXR4yVYi4H9UXQaeIsPbLn2R3O3vQCnDKkAl2qHiuocKKX4Tz/Sw==
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/run-parallel/-/run-parallel-1.2.0.tgz#66d1368da7bdf921eb9d95bd1a9229e7f21a43ee"
|
||||
integrity sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==
|
||||
dependencies:
|
||||
queue-microtask "^1.2.2"
|
||||
|
||||
run-queue@^1.0.0, run-queue@^1.0.3:
|
||||
version "1.0.3"
|
||||
|
@ -10615,9 +10640,9 @@ sass-loader@^10.0.1:
|
|||
semver "^7.3.2"
|
||||
|
||||
sass@^1.29.0:
|
||||
version "1.32.6"
|
||||
resolved "https://registry.yarnpkg.com/sass/-/sass-1.32.6.tgz#e3646c8325cd97ff75a8a15226007f3ccd221393"
|
||||
integrity sha512-1bcDHDcSqeFtMr0JXI3xc/CXX6c4p0wHHivJdru8W7waM7a1WjKMm4m/Z5sY7CbVw4Whi2Chpcw6DFfSWwGLzQ==
|
||||
version "1.32.7"
|
||||
resolved "https://registry.yarnpkg.com/sass/-/sass-1.32.7.tgz#632a9df2b85dc4b346977fcaf2d5e6f2b7039fd8"
|
||||
integrity sha512-C8Z4bjqGWnsYa11o8hpKAuoyFdRhrSHcYjCr+XAWVPSIQqC8mp2f5Dx4em0dKYehPzg5XSekmCjqJnEZbIls9A==
|
||||
dependencies:
|
||||
chokidar ">=2.0.0 <4.0.0"
|
||||
|
||||
|
@ -11939,14 +11964,14 @@ typedarray@^0.0.6:
|
|||
integrity sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=
|
||||
|
||||
typescript@^3.9.3:
|
||||
version "3.9.7"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.7.tgz#98d600a5ebdc38f40cb277522f12dc800e9e25fa"
|
||||
integrity sha512-BLbiRkiBzAwsjut4x/dsibSTB6yWpwT5qWmC2OfuCg3GgVQCSgMs4vEctYPhsaGtd0AeuuHMkjZ2h2WG8MSzRw==
|
||||
version "3.9.9"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-3.9.9.tgz#e69905c54bc0681d0518bd4d587cc6f2d0b1a674"
|
||||
integrity sha512-kdMjTiekY+z/ubJCATUPlRDl39vXYiMV9iyeMuEuXZh2we6zz80uovNN2WlAxmmdE/Z/YQe+EbOEXB5RHEED3w==
|
||||
|
||||
typescript@~4.1.2:
|
||||
version "4.1.3"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.3.tgz#519d582bd94cba0cf8934c7d8e8467e473f53bb7"
|
||||
integrity sha512-B3ZIOf1IKeH2ixgHhj6la6xdwR9QrLC5d1VKeCSY4tvkqhF2eqd9O7txNlS0PO3GrBAFIdr3L1ndNwteUbZLYg==
|
||||
version "4.1.5"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.1.5.tgz#123a3b214aaff3be32926f0d8f1f6e704eb89a72"
|
||||
integrity sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA==
|
||||
|
||||
uglify-js@3.4.x:
|
||||
version "3.4.10"
|
||||
|
@ -12232,9 +12257,9 @@ vm-browserify@^1.0.1:
|
|||
integrity sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==
|
||||
|
||||
vue-apollo@^3.0.3:
|
||||
version "3.0.5"
|
||||
resolved "https://registry.yarnpkg.com/vue-apollo/-/vue-apollo-3.0.5.tgz#d4c7e8c7f36d76a7eed005fe565621eb0fb20522"
|
||||
integrity sha512-Y9EMf47rEXLUpn8hPVZt4Iu9/KoI+OFmAznAYjL7oVoYvVGbt71jWhZWHQiN9YBriI1SscF5Exy0a2bV7XVA3A==
|
||||
version "3.0.7"
|
||||
resolved "https://registry.yarnpkg.com/vue-apollo/-/vue-apollo-3.0.7.tgz#97a031d45641faa4888a6d5a7f71c40834359704"
|
||||
integrity sha512-EUfIn4cJmoflnDJiSNP8gH4fofIEzd0I2AWnd9nhHB8mddmzIfgSNjIRihDcRB10wypYG1OG0GcU335CFgZRfA==
|
||||
dependencies:
|
||||
chalk "^2.4.2"
|
||||
serialize-javascript "^4.0.0"
|
||||
|
@ -12256,16 +12281,16 @@ vue-cli-plugin-svg@~0.1.3:
|
|||
url-loader "^2.0.0"
|
||||
vue-svg-loader "^0.12.0"
|
||||
|
||||
vue-eslint-parser@^7.0.0, vue-eslint-parser@^7.4.1:
|
||||
version "7.4.1"
|
||||
resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-7.4.1.tgz#e4adcf7876a7379758d9056a72235af18a587f92"
|
||||
integrity sha512-AFvhdxpFvliYq1xt/biNBslTHE/zbEvSnr1qfHA/KxRIpErmEDrQZlQnvEexednRHmLfDNOMuDYwZL5xkLzIXQ==
|
||||
vue-eslint-parser@^7.0.0, vue-eslint-parser@^7.5.0:
|
||||
version "7.5.0"
|
||||
resolved "https://registry.yarnpkg.com/vue-eslint-parser/-/vue-eslint-parser-7.5.0.tgz#b68221c55fee061899afcfb4441ec74c1495285e"
|
||||
integrity sha512-6EHzl00hIpy4yWZo3qSbtvtVw1A1cTKOv1w95QSuAqGgk4113XtRjvNIiEGo49r0YWOPYsrmI4Dl64axL5Agrw==
|
||||
dependencies:
|
||||
debug "^4.1.1"
|
||||
eslint-scope "^5.0.0"
|
||||
eslint-visitor-keys "^1.1.0"
|
||||
espree "^6.2.1"
|
||||
esquery "^1.0.1"
|
||||
esquery "^1.4.0"
|
||||
lodash "^4.17.15"
|
||||
|
||||
vue-eslint-parser@~7.1.0:
|
||||
|
@ -12985,9 +13010,9 @@ yargs-parser@^13.1.2:
|
|||
decamelize "^1.2.0"
|
||||
|
||||
yargs-parser@^20.2.2:
|
||||
version "20.2.4"
|
||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.4.tgz#b42890f14566796f85ae8e3a25290d205f154a54"
|
||||
integrity sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==
|
||||
version "20.2.5"
|
||||
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-20.2.5.tgz#5d37729146d3f894f39fc94b6796f5b239513186"
|
||||
integrity sha512-jYRGS3zWy20NtDtK2kBgo/TlAoy5YUuhD9/LZ7z7W4j1Fdw2cqD0xEEclf8fxc8xjD6X5Qr+qQQwCEsP8iRiYg==
|
||||
|
||||
yargs@^13.3.0, yargs@^13.3.2:
|
||||
version "13.3.2"
|
||||
|
|
|
@ -459,6 +459,7 @@ defmodule Mobilizon.Federation.ActivityPub do
|
|||
Map.get(additional, :force_member_removal, false) ||
|
||||
!Actors.is_only_administrator?(member_id, group_id)},
|
||||
{:delete, {:ok, %Member{} = member}} <- {:delete, Actors.delete_member(member)},
|
||||
Mobilizon.Service.Activity.Member.insert_activity(member, subject: "member_quit"),
|
||||
leave_data <- %{
|
||||
"to" => [group_members_url],
|
||||
"cc" => [group_url],
|
||||
|
@ -477,12 +478,17 @@ defmodule Mobilizon.Federation.ActivityPub do
|
|||
def remove(
|
||||
%Member{} = member,
|
||||
%Actor{type: :Group, url: group_url, members_url: group_members_url},
|
||||
%Actor{url: moderator_url},
|
||||
%Actor{url: moderator_url} = moderator,
|
||||
local,
|
||||
_additional \\ %{}
|
||||
) do
|
||||
with {:ok, %Member{id: member_id}} <- Actors.update_member(member, %{role: :rejected}),
|
||||
%Member{} = member <- Actors.get_member(member_id),
|
||||
{:ok, _} <-
|
||||
Mobilizon.Service.Activity.Member.insert_activity(member,
|
||||
moderator: moderator,
|
||||
subject: "member_removed"
|
||||
),
|
||||
:ok <- Group.send_notification_to_removed_member(member),
|
||||
remove_data <- %{
|
||||
"to" => [group_members_url],
|
||||
|
@ -518,6 +524,11 @@ defmodule Mobilizon.Federation.ActivityPub do
|
|||
invited_by_id: actor_id,
|
||||
url: Map.get(additional, :url)
|
||||
}),
|
||||
{:ok, _} <-
|
||||
Mobilizon.Service.Activity.Member.insert_activity(member,
|
||||
moderator: actor,
|
||||
subject: "member_invited"
|
||||
),
|
||||
invite_data <- %{
|
||||
"type" => "Invite",
|
||||
"attributedTo" => group_url,
|
||||
|
@ -914,6 +925,10 @@ defmodule Mobilizon.Federation.ActivityPub do
|
|||
defp accept_join(%Member{} = member, additional) do
|
||||
with {:ok, %Member{} = member} <-
|
||||
Actors.update_member(member, %{role: :member}),
|
||||
{:ok, _} <-
|
||||
Mobilizon.Service.Activity.Member.insert_activity(member,
|
||||
subject: "member_approved"
|
||||
),
|
||||
_ <-
|
||||
unless(is_nil(member.parent.domain),
|
||||
do: Refresher.fetch_group(member.parent.url, member.actor)
|
||||
|
@ -949,6 +964,10 @@ defmodule Mobilizon.Federation.ActivityPub do
|
|||
%Actor{url: actor_url} <- Actors.get_actor(actor_id),
|
||||
{:ok, %Member{id: member_id} = member} <-
|
||||
Actors.update_member(member, %{role: :member}),
|
||||
{:ok, _} <-
|
||||
Mobilizon.Service.Activity.Member.insert_activity(member,
|
||||
subject: "member_accepted_invitation"
|
||||
),
|
||||
accept_data <- %{
|
||||
"type" => "Accept",
|
||||
"attributedTo" => member.parent.url,
|
||||
|
@ -1029,6 +1048,9 @@ defmodule Mobilizon.Federation.ActivityPub do
|
|||
%Actor{url: actor_url} <- Actors.get_actor(actor_id),
|
||||
{:ok, %Member{url: member_url, id: member_id} = member} <-
|
||||
Actors.delete_member(member),
|
||||
Mobilizon.Service.Activity.Member.insert_activity(member,
|
||||
subject: "member_rejected_invitation"
|
||||
),
|
||||
accept_data <- %{
|
||||
"type" => "Reject",
|
||||
"actor" => actor_url,
|
||||
|
|
|
@ -7,6 +7,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Actors do
|
|||
alias Mobilizon.Federation.ActivityPub.Types.Entity
|
||||
alias Mobilizon.Federation.ActivityStream.Convertible
|
||||
alias Mobilizon.GraphQL.API.Utils, as: APIUtils
|
||||
alias Mobilizon.Service.Activity.Group, as: GroupActivity
|
||||
alias Mobilizon.Service.Formatter.HTML
|
||||
alias Mobilizon.Service.Notifications.Scheduler
|
||||
alias Mobilizon.Web.Email.Follow, as: FollowMailer
|
||||
|
@ -20,6 +21,11 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Actors do
|
|||
def create(args, additional) do
|
||||
with args <- prepare_args_for_actor(args),
|
||||
{:ok, %Actor{} = actor} <- Actors.create_actor(args),
|
||||
{:ok, _} <-
|
||||
GroupActivity.insert_activity(actor,
|
||||
subject: "group_created",
|
||||
actor_id: args.creator_actor_id
|
||||
),
|
||||
actor_as_data <- Convertible.model_to_as(actor),
|
||||
audience <- %{"to" => ["https://www.w3.org/ns/activitystreams#Public"], "cc" => []},
|
||||
create_data <-
|
||||
|
@ -32,6 +38,12 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Actors do
|
|||
@spec update(Actor.t(), map, map) :: {:ok, Actor.t(), Activity.t()} | any
|
||||
def update(%Actor{} = old_actor, args, additional) do
|
||||
with {:ok, %Actor{} = new_actor} <- Actors.update_actor(old_actor, args),
|
||||
{:ok, _} <-
|
||||
GroupActivity.insert_activity(new_actor,
|
||||
subject: "group_updated",
|
||||
old_group: old_actor,
|
||||
updater_actor: Map.get(args, :updater_actor)
|
||||
),
|
||||
actor_as_data <- Convertible.model_to_as(new_actor),
|
||||
{:ok, true} <- Cachex.del(:activity_pub, "actor_#{new_actor.preferred_username}"),
|
||||
audience <-
|
||||
|
@ -112,6 +124,8 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Actors do
|
|||
|> Map.get(:metadata, %{})
|
||||
|> Map.update(:message, nil, &String.trim(HTML.strip_tags(&1)))
|
||||
}),
|
||||
{:ok, _} <-
|
||||
Mobilizon.Service.Activity.Member.insert_activity(member, subject: "member_joined"),
|
||||
Absinthe.Subscription.publish(Endpoint, actor, group_membership_changed: actor.id),
|
||||
join_data <- %{
|
||||
"type" => "Join",
|
||||
|
|
|
@ -7,6 +7,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Discussions do
|
|||
alias Mobilizon.Federation.ActivityPub.Audience
|
||||
alias Mobilizon.Federation.ActivityPub.Types.Entity
|
||||
alias Mobilizon.Federation.ActivityStream.Convertible
|
||||
alias Mobilizon.Service.Activity.Discussion, as: DiscussionActivity
|
||||
alias Mobilizon.Web.Endpoint
|
||||
import Mobilizon.Federation.ActivityPub.Utils, only: [make_create_data: 2, make_update_data: 2]
|
||||
require Logger
|
||||
|
@ -19,6 +20,11 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Discussions do
|
|||
with %Discussion{} = discussion <- Discussions.get_discussion(discussion_id),
|
||||
{:ok, %Discussion{last_comment_id: last_comment_id} = discussion} <-
|
||||
Discussions.reply_to_discussion(discussion, args),
|
||||
{:ok, _} <-
|
||||
DiscussionActivity.insert_activity(discussion,
|
||||
subject: "discussion_replied",
|
||||
actor_id: Map.get(args, :creator_id, args.actor_id)
|
||||
),
|
||||
%Comment{} = last_comment <- Discussions.get_comment_with_preload(last_comment_id),
|
||||
:ok <- maybe_publish_graphql_subscription(discussion),
|
||||
comment_as_data <- Convertible.model_to_as(last_comment),
|
||||
|
@ -35,6 +41,8 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Discussions do
|
|||
def create(args, additional) do
|
||||
with {:ok, %Discussion{} = discussion} <-
|
||||
Discussions.create_discussion(args),
|
||||
{:ok, _} <-
|
||||
DiscussionActivity.insert_activity(discussion, subject: "discussion_created"),
|
||||
discussion_as_data <- Convertible.model_to_as(discussion),
|
||||
audience <-
|
||||
Audience.calculate_to_and_cc_from_mentions(discussion),
|
||||
|
@ -49,6 +57,11 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Discussions do
|
|||
def update(%Discussion{} = old_discussion, args, additional) do
|
||||
with {:ok, %Discussion{} = new_discussion} <-
|
||||
Discussions.update_discussion(old_discussion, args),
|
||||
{:ok, _} <-
|
||||
DiscussionActivity.insert_activity(new_discussion,
|
||||
subject: "discussion_renamed",
|
||||
old_discussion: old_discussion
|
||||
),
|
||||
{:ok, true} <- Cachex.del(:activity_pub, "discussion_#{new_discussion.slug}"),
|
||||
discussion_as_data <- Convertible.model_to_as(new_discussion),
|
||||
audience <-
|
||||
|
@ -71,7 +84,12 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Discussions do
|
|||
_local,
|
||||
_additionnal
|
||||
) do
|
||||
with {:ok, _} <- Discussions.delete_discussion(discussion) do
|
||||
with {:ok, _} <- Discussions.delete_discussion(discussion),
|
||||
{:ok, _} <-
|
||||
DiscussionActivity.insert_activity(discussion,
|
||||
subject: "discussion_deleted",
|
||||
moderator: actor
|
||||
) do
|
||||
# This is just fake
|
||||
activity_data = %{
|
||||
"type" => "Delete",
|
||||
|
|
|
@ -10,6 +10,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Events do
|
|||
alias Mobilizon.Federation.ActivityStream.Converter.Utils, as: ConverterUtils
|
||||
alias Mobilizon.Federation.ActivityStream.Convertible
|
||||
alias Mobilizon.GraphQL.API.Utils, as: APIUtils
|
||||
alias Mobilizon.Service.Activity.Event, as: EventActivity
|
||||
alias Mobilizon.Service.Formatter.HTML
|
||||
alias Mobilizon.Service.Notifications.Scheduler
|
||||
alias Mobilizon.Share
|
||||
|
@ -24,6 +25,8 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Events do
|
|||
def create(args, additional) do
|
||||
with args <- prepare_args_for_event(args),
|
||||
{:ok, %Event{} = event} <- EventsManager.create_event(args),
|
||||
{:ok, _} <-
|
||||
EventActivity.insert_activity(event, subject: "event_created"),
|
||||
event_as_data <- Convertible.model_to_as(event),
|
||||
audience <-
|
||||
Audience.calculate_to_and_cc_from_mentions(event),
|
||||
|
@ -38,6 +41,8 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Events do
|
|||
def update(%Event{} = old_event, args, additional) do
|
||||
with args <- prepare_args_for_event(args),
|
||||
{:ok, %Event{} = new_event} <- EventsManager.update_event(old_event, args),
|
||||
{:ok, _} <-
|
||||
EventActivity.insert_activity(new_event, subject: "event_updated"),
|
||||
{:ok, true} <- Cachex.del(:activity_pub, "event_#{new_event.uuid}"),
|
||||
event_as_data <- Convertible.model_to_as(new_event),
|
||||
audience <-
|
||||
|
@ -66,6 +71,8 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Events do
|
|||
with audience <-
|
||||
Audience.calculate_to_and_cc_from_mentions(event),
|
||||
{:ok, %Event{} = event} <- EventsManager.delete_event(event),
|
||||
{:ok, _} <-
|
||||
EventActivity.insert_activity(event, subject: "event_deleted"),
|
||||
{:ok, true} <- Cachex.del(:activity_pub, "event_#{event.uuid}"),
|
||||
{:ok, %Tombstone{} = _tombstone} <-
|
||||
Tombstone.create_tombstone(%{uri: event.url, actor_id: actor.id}) do
|
||||
|
|
|
@ -4,13 +4,14 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Members do
|
|||
alias Mobilizon.Actors.{Actor, Member}
|
||||
alias Mobilizon.Federation.ActivityPub
|
||||
alias Mobilizon.Federation.ActivityStream.Convertible
|
||||
alias Mobilizon.Service.Activity.Member, as: MemberActivity
|
||||
require Logger
|
||||
import Mobilizon.Federation.ActivityPub.Utils, only: [make_update_data: 2]
|
||||
|
||||
def update(
|
||||
%Member{parent: %Actor{id: group_id}, id: member_id, role: current_role} = member,
|
||||
%Member{parent: %Actor{id: group_id}, id: member_id, role: current_role} = old_member,
|
||||
%{role: updated_role} = args,
|
||||
%{moderator: %Actor{url: moderator_url, id: moderator_id}} = additional
|
||||
%{moderator: %Actor{url: moderator_url, id: moderator_id} = moderator} = additional
|
||||
) do
|
||||
with additional <- Map.delete(additional, :moderator),
|
||||
{:has_rights_to_update_role, {:ok, %Member{role: moderator_role}}}
|
||||
|
@ -19,7 +20,13 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Members do
|
|||
{:is_only_admin, false} <-
|
||||
{:is_only_admin, check_admins_left(member_id, group_id, current_role, updated_role)},
|
||||
{:ok, %Member{} = member} <-
|
||||
Actors.update_member(member, args),
|
||||
Actors.update_member(old_member, args),
|
||||
{:ok, _} <-
|
||||
MemberActivity.insert_activity(member,
|
||||
old_member: old_member,
|
||||
moderator: moderator,
|
||||
subject: "member_updated"
|
||||
),
|
||||
{:ok, true} <- Cachex.del(:activity_pub, "member_#{member_id}"),
|
||||
member_as_data <-
|
||||
Convertible.model_to_as(member),
|
||||
|
|
|
@ -7,6 +7,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Posts do
|
|||
alias Mobilizon.Federation.ActivityStream.Converter.Utils, as: ConverterUtils
|
||||
alias Mobilizon.Federation.ActivityStream.Convertible
|
||||
alias Mobilizon.Posts.Post
|
||||
alias Mobilizon.Service.Activity.Post, as: PostsActivity
|
||||
require Logger
|
||||
import Mobilizon.Federation.ActivityPub.Utils, only: [make_create_data: 2, make_update_data: 2]
|
||||
|
||||
|
@ -19,6 +20,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Posts do
|
|||
with args <- Map.update(args, :tags, [], &ConverterUtils.fetch_tags/1),
|
||||
{:ok, %Post{attributed_to_id: group_id, author_id: creator_id} = post} <-
|
||||
Posts.create_post(args),
|
||||
{:ok, _} <- PostsActivity.insert_activity(post, subject: "post_created"),
|
||||
{:ok, %Actor{} = group} <- Actors.get_group_by_actor_id(group_id),
|
||||
%Actor{} = creator <- Actors.get_actor(creator_id),
|
||||
post_as_data <-
|
||||
|
@ -40,6 +42,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Posts do
|
|||
with args <- Map.update(args, :tags, [], &ConverterUtils.fetch_tags/1),
|
||||
{:ok, %Post{attributed_to_id: group_id, author_id: creator_id} = post} <-
|
||||
Posts.update_post(post, args),
|
||||
{:ok, _} <- PostsActivity.insert_activity(post, subject: "post_updated"),
|
||||
{:ok, true} <- Cachex.del(:activity_pub, "post_#{post.slug}"),
|
||||
{:ok, %Actor{} = group} <- Actors.get_group_by_actor_id(group_id),
|
||||
%Actor{} = creator <- Actors.get_actor(creator_id),
|
||||
|
@ -76,6 +79,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Posts do
|
|||
}
|
||||
|
||||
with {:ok, %Post{} = post} <- Posts.delete_post(post),
|
||||
{:ok, _} <- PostsActivity.insert_activity(post, subject: "post_deleted"),
|
||||
{:ok, true} <- Cachex.del(:activity_pub, "post_#{post.slug}"),
|
||||
{:ok, %Tombstone{} = _tombstone} <-
|
||||
Tombstone.create_tombstone(%{uri: post.url, actor_id: actor.id}) do
|
||||
|
|
|
@ -5,6 +5,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Resources do
|
|||
alias Mobilizon.Federation.ActivityPub.Types.Entity
|
||||
alias Mobilizon.Federation.ActivityStream.Convertible
|
||||
alias Mobilizon.Resources.Resource
|
||||
alias Mobilizon.Service.Activity.Resource, as: ResourceActivity
|
||||
alias Mobilizon.Service.RichMedia.Parser
|
||||
require Logger
|
||||
|
||||
|
@ -33,6 +34,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Resources do
|
|||
with {:ok,
|
||||
%Resource{actor_id: group_id, creator_id: creator_id, parent_id: parent_id} = resource} <-
|
||||
Resources.create_resource(args),
|
||||
{:ok, _} <- ResourceActivity.insert_activity(resource, subject: "resource_created"),
|
||||
{:ok, %Actor{} = group} <- Actors.get_group_by_actor_id(group_id),
|
||||
%Actor{url: creator_url} = creator <- Actors.get_actor(creator_id),
|
||||
resource_as_data <-
|
||||
|
@ -63,7 +65,12 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Resources do
|
|||
end
|
||||
|
||||
@impl Entity
|
||||
def update(%Resource{} = old_resource, %{parent_id: _parent_id} = args, additional) do
|
||||
def update(
|
||||
%Resource{parent_id: old_parent_id} = old_resource,
|
||||
%{parent_id: parent_id} = args,
|
||||
additional
|
||||
)
|
||||
when old_parent_id != parent_id do
|
||||
move(old_resource, args, additional)
|
||||
end
|
||||
|
||||
|
@ -71,6 +78,11 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Resources do
|
|||
def update(%Resource{} = old_resource, %{title: title} = _args, additional) do
|
||||
with {:ok, %Resource{actor_id: group_id, creator_id: creator_id} = resource} <-
|
||||
Resources.update_resource(old_resource, %{title: title}),
|
||||
{:ok, _} <-
|
||||
ResourceActivity.insert_activity(resource,
|
||||
subject: "resource_renamed",
|
||||
old_resource: old_resource
|
||||
),
|
||||
{:ok, %Actor{} = group} <- Actors.get_group_by_actor_id(group_id),
|
||||
%Actor{url: creator_url} <- Actors.get_actor(creator_id),
|
||||
resource_as_data <-
|
||||
|
@ -100,6 +112,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Resources do
|
|||
%Resource{actor_id: group_id, creator_id: creator_id, parent_id: new_parent_id} =
|
||||
resource} <-
|
||||
Resources.update_resource(old_resource, args),
|
||||
{:ok, _} <- ResourceActivity.insert_activity(resource, subject: "resource_moved"),
|
||||
old_parent <- Resources.get_resource(old_parent_id),
|
||||
new_parent <- Resources.get_resource(new_parent_id),
|
||||
{:ok, %Actor{} = group} <- Actors.get_group_by_actor_id(group_id),
|
||||
|
@ -146,6 +159,7 @@ defmodule Mobilizon.Federation.ActivityPub.Types.Resources do
|
|||
}
|
||||
|
||||
with {:ok, _resource} <- Resources.delete_resource(resource),
|
||||
{:ok, _} <- ResourceActivity.insert_activity(resource, subject: "resource_deleted"),
|
||||
{:ok, true} <- Cachex.del(:activity_pub, "resource_#{resource.id}") do
|
||||
{:ok, activity_data, actor, resource}
|
||||
end
|
||||
|
|
85
lib/graphql/resolvers/activity.ex
Normal file
85
lib/graphql/resolvers/activity.ex
Normal file
|
@ -0,0 +1,85 @@
|
|||
defmodule Mobilizon.GraphQL.Resolvers.Activity do
|
||||
@moduledoc """
|
||||
Handles the activity-related GraphQL calls.
|
||||
"""
|
||||
|
||||
import Mobilizon.Users.Guards
|
||||
alias Mobilizon.{Activities, Actors, Discussions, Events, Posts, Resources, Users}
|
||||
alias Mobilizon.Activities.Activity
|
||||
alias Mobilizon.Actors.Actor
|
||||
alias Mobilizon.Events.Event
|
||||
alias Mobilizon.Storage.Page
|
||||
alias Mobilizon.Users.User
|
||||
|
||||
require Logger
|
||||
|
||||
def group_activity(%Actor{type: :Group, id: group_id}, %{page: page, limit: limit}, %{
|
||||
context: %{current_user: %User{role: role} = user}
|
||||
}) do
|
||||
with {:actor, %Actor{id: actor_id} = _actor} <- {:actor, Users.get_actor_for_user(user)},
|
||||
{:member, true} <- {:member, Actors.is_member?(actor_id, group_id) or is_moderator(role)} do
|
||||
%Page{total: total, elements: elements} =
|
||||
Activities.list_activities_for_group(group_id, actor_id, [], page, limit)
|
||||
|
||||
elements =
|
||||
Enum.map(elements, fn %Activity{} = activity ->
|
||||
activity
|
||||
|> Map.update(:subject_params, %{}, &transform_params/1)
|
||||
|> Map.put(:object, get_object(activity))
|
||||
end)
|
||||
|
||||
{:ok, %Page{total: total, elements: elements}}
|
||||
else
|
||||
{:member, false} ->
|
||||
{:error, :unauthorized}
|
||||
end
|
||||
end
|
||||
|
||||
def group_activity(_, _, _) do
|
||||
{:error, :unauthenticated}
|
||||
end
|
||||
|
||||
defp get_object(%Activity{object_type: object_type, object_id: object_id}) do
|
||||
get_object(object_type, object_id)
|
||||
end
|
||||
|
||||
defp get_object(_, nil), do: nil
|
||||
|
||||
defp get_object(:event, event_id) do
|
||||
case Events.get_event(event_id) do
|
||||
{:ok, %Event{} = event} -> event
|
||||
_ -> nil
|
||||
end
|
||||
end
|
||||
|
||||
defp get_object(:post, post_id) do
|
||||
Posts.get_post(post_id)
|
||||
end
|
||||
|
||||
defp get_object(:member, member_id) do
|
||||
Actors.get_member(member_id)
|
||||
end
|
||||
|
||||
defp get_object(:resource, resource_id) do
|
||||
Resources.get_resource(resource_id)
|
||||
end
|
||||
|
||||
defp get_object(:discussion, discussion_id) do
|
||||
Discussions.get_discussion(discussion_id)
|
||||
end
|
||||
|
||||
defp get_object(:group, group_id) do
|
||||
Actors.get_actor(group_id)
|
||||
end
|
||||
|
||||
@spec transform_params(map()) :: list()
|
||||
defp transform_params(params) do
|
||||
Enum.map(params, fn {key, value} -> %{key: key, value: transform_value(value)} end)
|
||||
end
|
||||
|
||||
defp transform_value(value) when is_list(value) do
|
||||
Enum.join(value, ",")
|
||||
end
|
||||
|
||||
defp transform_value(value), do: value
|
||||
end
|
|
@ -29,6 +29,7 @@ defmodule Mobilizon.GraphQL.Schema do
|
|||
import_types(Schema.Custom.UUID)
|
||||
import_types(Schema.Custom.Point)
|
||||
|
||||
import_types(Schema.ActivityType)
|
||||
import_types(Schema.UserType)
|
||||
import_types(Schema.MediaType)
|
||||
import_types(Schema.ActorInterface)
|
||||
|
|
78
lib/graphql/schema/activity.ex
Normal file
78
lib/graphql/schema/activity.ex
Normal file
|
@ -0,0 +1,78 @@
|
|||
defmodule Mobilizon.GraphQL.Schema.ActivityType do
|
||||
@moduledoc """
|
||||
Schema representation for Activity
|
||||
"""
|
||||
use Absinthe.Schema.Notation
|
||||
|
||||
alias Mobilizon.Actors.{Actor, Member}
|
||||
alias Mobilizon.Discussions.Discussion
|
||||
alias Mobilizon.Events.Event
|
||||
alias Mobilizon.Posts.Post
|
||||
alias Mobilizon.Resources.Resource
|
||||
|
||||
enum :activity_type do
|
||||
value(:event, description: "Activities concerning events")
|
||||
value(:post, description: "Activities concerning posts")
|
||||
value(:discussion, description: "Activities concerning discussions")
|
||||
value(:resource, description: "Activities concerning resources")
|
||||
value(:group, description: "Activities concerning group settings")
|
||||
value(:member, description: "Activities concerning members")
|
||||
end
|
||||
|
||||
object :activity_param_item do
|
||||
field(:key, :string)
|
||||
field(:value, :string)
|
||||
end
|
||||
|
||||
interface :activity_object do
|
||||
field(:id, :id)
|
||||
|
||||
resolve_type(fn
|
||||
%Event{}, _ ->
|
||||
:event
|
||||
|
||||
%Post{}, _ ->
|
||||
:post
|
||||
|
||||
%Actor{type: "Group"}, _ ->
|
||||
:group
|
||||
|
||||
%Member{}, _ ->
|
||||
:member
|
||||
|
||||
%Resource{}, _ ->
|
||||
:resource
|
||||
|
||||
%Discussion{}, _ ->
|
||||
:discussion
|
||||
|
||||
%Actor{type: :Group}, _ ->
|
||||
:group
|
||||
|
||||
_, _ ->
|
||||
nil
|
||||
end)
|
||||
end
|
||||
|
||||
@desc """
|
||||
A paginated list of activity items
|
||||
"""
|
||||
object :paginated_activity_list do
|
||||
field(:elements, list_of(:activity), description: "A list of activities")
|
||||
field(:total, :integer, description: "The total number of elements in the list")
|
||||
end
|
||||
|
||||
object :activity do
|
||||
field(:id, :id, description: "The activity item ID")
|
||||
field(:inserted_at, :datetime, description: "When was the activity inserted")
|
||||
field(:priority, :integer)
|
||||
field(:type, :activity_type)
|
||||
field(:subject, :string)
|
||||
field(:subject_params, list_of(:activity_param_item))
|
||||
field(:message, :string)
|
||||
field(:message_params, list_of(:activity_param_item))
|
||||
field(:object, :activity_object)
|
||||
field(:author, :actor)
|
||||
field(:group, :group)
|
||||
end
|
||||
end
|
|
@ -10,6 +10,7 @@ defmodule Mobilizon.GraphQL.Schema.Actors.GroupType do
|
|||
alias Mobilizon.Addresses
|
||||
|
||||
alias Mobilizon.GraphQL.Resolvers.{
|
||||
Activity,
|
||||
Discussion,
|
||||
Followers,
|
||||
Group,
|
||||
|
@ -28,7 +29,7 @@ defmodule Mobilizon.GraphQL.Schema.Actors.GroupType do
|
|||
Represents a group of actors
|
||||
"""
|
||||
object :group do
|
||||
interfaces([:actor, :interactable])
|
||||
interfaces([:actor, :interactable, :activity_object])
|
||||
|
||||
field(:id, :id, description: "Internal ID for this group")
|
||||
field(:url, :string, description: "The ActivityPub actor's URL")
|
||||
|
@ -142,6 +143,19 @@ defmodule Mobilizon.GraphQL.Schema.Actors.GroupType do
|
|||
resolve(&Followers.find_followers_for_group/3)
|
||||
description("A paginated list of the followers this group has")
|
||||
end
|
||||
|
||||
field :activity, :paginated_activity_list do
|
||||
arg(:page, :integer,
|
||||
default_value: 1,
|
||||
description: "The page in the paginated activity items list"
|
||||
)
|
||||
|
||||
arg(:limit, :integer, default_value: 10, description: "The limit of activity items per page")
|
||||
|
||||
arg(:type, :activity_type, description: "Filter by type of activity")
|
||||
resolve(&Activity.group_activity/3)
|
||||
description("The group activity")
|
||||
end
|
||||
end
|
||||
|
||||
@desc """
|
||||
|
|
|
@ -10,6 +10,7 @@ defmodule Mobilizon.GraphQL.Schema.Actors.MemberType do
|
|||
Represents a member of a group
|
||||
"""
|
||||
object :member do
|
||||
interfaces([:activity_object])
|
||||
field(:id, :id, description: "The member's ID")
|
||||
field(:parent, :group, description: "Of which the profile is member")
|
||||
field(:actor, :person, description: "Which profile is member of")
|
||||
|
|
|
@ -11,6 +11,7 @@ defmodule Mobilizon.GraphQL.Schema.Discussions.DiscussionType do
|
|||
|
||||
@desc "A discussion"
|
||||
object :discussion do
|
||||
interfaces([:activity_object])
|
||||
field(:id, :id, description: "Internal ID for this discussion")
|
||||
field(:title, :string, description: "The title for this discussion")
|
||||
field(:slug, :string, description: "The slug for the discussion")
|
||||
|
|
|
@ -17,7 +17,7 @@ defmodule Mobilizon.GraphQL.Schema.EventType do
|
|||
|
||||
@desc "An event"
|
||||
object :event do
|
||||
interfaces([:action_log_object, :interactable])
|
||||
interfaces([:action_log_object, :interactable, :activity_object])
|
||||
field(:id, :id, description: "Internal ID for this event")
|
||||
field(:uuid, :uuid, description: "The Event UUID")
|
||||
field(:url, :string, description: "The ActivityPub Event URL")
|
||||
|
|
|
@ -7,6 +7,7 @@ defmodule Mobilizon.GraphQL.Schema.PostType do
|
|||
|
||||
@desc "A post"
|
||||
object :post do
|
||||
interfaces([:activity_object])
|
||||
field(:id, :id, description: "The post's ID")
|
||||
field(:title, :string, description: "The post's title")
|
||||
field(:slug, :string, description: "The post's slug")
|
||||
|
|
|
@ -9,6 +9,7 @@ defmodule Mobilizon.GraphQL.Schema.ResourceType do
|
|||
|
||||
@desc "A resource"
|
||||
object :resource do
|
||||
interfaces([:activity_object])
|
||||
field(:id, :id, description: "The resource's ID")
|
||||
field(:title, :string, description: "The resource's title")
|
||||
field(:summary, :string, description: "The resource's summary")
|
||||
|
|
148
lib/mobilizon/activities/activities.ex
Normal file
148
lib/mobilizon/activities/activities.ex
Normal file
|
@ -0,0 +1,148 @@
|
|||
defmodule Mobilizon.Activities do
|
||||
@moduledoc """
|
||||
The Activities context.
|
||||
"""
|
||||
|
||||
import Ecto.Query, warn: false
|
||||
import EctoEnum
|
||||
alias Mobilizon.Activities.Activity
|
||||
alias Mobilizon.Actors.Member
|
||||
alias Mobilizon.Storage.{Page, Repo}
|
||||
|
||||
defenum(Priority,
|
||||
very_low: 10,
|
||||
low: 20,
|
||||
medium: 30,
|
||||
high: 40,
|
||||
very_high: 50
|
||||
)
|
||||
|
||||
@activity_types ["event", "post", "discussion", "resource", "group", "member"]
|
||||
@event_activity_subjects ["event_created", "event_updated", "event_deleted", "comment_posted"]
|
||||
@post_activity_subjects ["post_created", "post_updated", "post_deleted"]
|
||||
@discussion_activity_subjects [
|
||||
"discussion_created",
|
||||
"discussion_replied",
|
||||
"discussion_renamed",
|
||||
"discussion_archived",
|
||||
"discussion_deleted"
|
||||
]
|
||||
@resource_activity_subjects [
|
||||
"resource_created",
|
||||
"resource_renamed",
|
||||
"resource_moved",
|
||||
"resource_deleted"
|
||||
]
|
||||
@member_activity_subjects [
|
||||
"member_request",
|
||||
"member_invited",
|
||||
"member_accepted_invitation",
|
||||
"member_rejected_invitation",
|
||||
"member_added",
|
||||
"member_joined",
|
||||
"member_approved",
|
||||
"member_updated",
|
||||
"member_removed",
|
||||
"member_quit"
|
||||
]
|
||||
@settings_activity_subjects ["group_created", "group_updated"]
|
||||
|
||||
@subjects @event_activity_subjects ++
|
||||
@post_activity_subjects ++
|
||||
@discussion_activity_subjects ++
|
||||
@resource_activity_subjects ++
|
||||
@member_activity_subjects ++ @settings_activity_subjects
|
||||
|
||||
@object_type ["event", "actor", "post", "discussion", "resource", "member", "group"]
|
||||
|
||||
defenum(Type, @activity_types)
|
||||
defenum(Subject, @subjects)
|
||||
defenum(ObjectType, @object_type)
|
||||
|
||||
@doc """
|
||||
Returns the list of activities.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> list_activities()
|
||||
[%Activity{}, ...]
|
||||
|
||||
"""
|
||||
def list_activities do
|
||||
Repo.all(Activity)
|
||||
end
|
||||
|
||||
@spec list_activities_for_group(
|
||||
integer() | String.t(),
|
||||
Keyword.t(),
|
||||
integer() | nil,
|
||||
integer() | nil
|
||||
) :: Page.t()
|
||||
def list_activities_for_group(
|
||||
group_id,
|
||||
actor_asking_id,
|
||||
filters \\ [],
|
||||
page \\ nil,
|
||||
limit \\ nil
|
||||
) do
|
||||
Activity
|
||||
|> where([a], a.group_id == ^group_id)
|
||||
|> join(:inner, [a], m in Member,
|
||||
on: m.parent_id == a.group_id and m.actor_id == ^actor_asking_id
|
||||
)
|
||||
|> where([a, m], a.inserted_at >= m.member_since)
|
||||
|> filter_object_type(Keyword.get(filters, :type))
|
||||
|> order_by(desc: :inserted_at)
|
||||
|> preload([:author, :group])
|
||||
|> Page.build_page(page, limit)
|
||||
end
|
||||
|
||||
@doc """
|
||||
Gets a single activity.
|
||||
|
||||
Raises `Ecto.NoResultsError` if the Activity does not exist.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> get_activity!(123)
|
||||
%Activity{}
|
||||
|
||||
iex> get_activity!(456)
|
||||
** (Ecto.NoResultsError)
|
||||
|
||||
"""
|
||||
def get_activity!(id), do: Repo.get!(Activity, id)
|
||||
|
||||
@doc """
|
||||
Creates a activity.
|
||||
|
||||
## Examples
|
||||
|
||||
iex> create_activity(%{field: value})
|
||||
{:ok, %Activity{}}
|
||||
|
||||
iex> create_activity(%{field: bad_value})
|
||||
{:error, %Ecto.Changeset{}}
|
||||
|
||||
"""
|
||||
def create_activity(attrs \\ %{}) do
|
||||
%Activity{}
|
||||
|> Activity.changeset(attrs)
|
||||
|> Repo.insert()
|
||||
end
|
||||
|
||||
def object_types, do: @object_type
|
||||
|
||||
def subjects, do: @subjects
|
||||
|
||||
def activity_types, do: @activity_types
|
||||
|
||||
@spec filter_object_type(Query.t(), atom()) :: Query.t()
|
||||
defp filter_object_type(query, :type) do
|
||||
where(query, [q], q.type == ^:type)
|
||||
end
|
||||
|
||||
defp filter_object_type(query, _) do
|
||||
query
|
||||
end
|
||||
end
|
77
lib/mobilizon/activities/activity.ex
Normal file
77
lib/mobilizon/activities/activity.ex
Normal file
|
@ -0,0 +1,77 @@
|
|||
defmodule Mobilizon.Activities.Activity do
|
||||
@moduledoc """
|
||||
Any activity for users
|
||||
"""
|
||||
|
||||
use Ecto.Schema
|
||||
import Ecto.Changeset
|
||||
alias Mobilizon.Activities.{ObjectType, Priority, Subject, Type}
|
||||
alias Mobilizon.Actors.Actor
|
||||
|
||||
@required_attrs [:type, :subject, :author_id, :group_id, :inserted_at]
|
||||
@optional_attrs [
|
||||
:priority,
|
||||
:subject_params,
|
||||
:message,
|
||||
:message_params,
|
||||
:object_type,
|
||||
:object_id
|
||||
]
|
||||
@attrs @required_attrs ++ @optional_attrs
|
||||
|
||||
@type t :: %__MODULE__{
|
||||
priority: Priority.t(),
|
||||
type: Type.t(),
|
||||
subject: Subject.t(),
|
||||
subject_params: map(),
|
||||
message: String.t(),
|
||||
message_params: map(),
|
||||
object_type: ObjectType.t(),
|
||||
object_id: String.t(),
|
||||
author: Actor.t(),
|
||||
group: Actor.t()
|
||||
}
|
||||
|
||||
schema "activities" do
|
||||
field(:priority, Priority, default: :medium)
|
||||
field(:type, Type)
|
||||
field(:subject, Subject)
|
||||
field(:subject_params, :map, default: %{})
|
||||
field(:message, :string)
|
||||
field(:message_params, :map, default: %{})
|
||||
field(:object_type, ObjectType)
|
||||
field(:object_id, :string)
|
||||
field(:inserted_at, :utc_datetime)
|
||||
belongs_to(:author, Actor)
|
||||
belongs_to(:group, Actor)
|
||||
end
|
||||
|
||||
@doc false
|
||||
def changeset(activity, attrs) do
|
||||
activity
|
||||
|> cast(attrs, @attrs)
|
||||
|> validate_required(@required_attrs)
|
||||
|> stringify_params(:subject_params)
|
||||
|> stringify_params(:message_params)
|
||||
end
|
||||
|
||||
defp stringify_params(changeset, attr) do
|
||||
stringified_params =
|
||||
changeset
|
||||
|> get_change(attr, %{})
|
||||
|> Enum.map(fn {key, value} -> {key, stringify_struct(value)} end)
|
||||
|> Map.new()
|
||||
|
||||
put_change(changeset, attr, stringified_params)
|
||||
end
|
||||
|
||||
defp stringify_struct(%_{} = struct) do
|
||||
association_fields = struct.__struct__.__schema__(:associations)
|
||||
|
||||
struct
|
||||
|> Map.from_struct()
|
||||
|> Map.drop(association_fields ++ [:__meta__])
|
||||
end
|
||||
|
||||
defp stringify_struct(smth), do: smth
|
||||
end
|
|
@ -66,6 +66,7 @@ defmodule Mobilizon.Actors do
|
|||
Gets a single actor.
|
||||
"""
|
||||
@spec get_actor(integer | String.t()) :: Actor.t() | nil
|
||||
def get_actor(nil), do: nil
|
||||
def get_actor(id), do: Repo.get(Actor, id)
|
||||
|
||||
@doc """
|
||||
|
@ -860,7 +861,7 @@ defmodule Mobilizon.Actors do
|
|||
end
|
||||
|
||||
@doc """
|
||||
Returns the list of members for a group.
|
||||
Returns a paginated list of members for a group.
|
||||
"""
|
||||
@spec list_members_for_group(Actor.t(), list(atom()), integer | nil, integer | nil) :: Page.t()
|
||||
def list_members_for_group(
|
||||
|
@ -882,6 +883,13 @@ defmodule Mobilizon.Actors do
|
|||
|> Repo.all()
|
||||
end
|
||||
|
||||
@spec list_internal_actors_members_for_group(Actor.t(), list()) :: list(Actor.t())
|
||||
def list_internal_actors_members_for_group(%Actor{id: group_id, type: :Group}, roles \\ []) do
|
||||
group_id
|
||||
|> group_internal_member_actor_query(roles)
|
||||
|> Repo.all()
|
||||
end
|
||||
|
||||
@doc """
|
||||
Returns a paginated list of administrator members for a group.
|
||||
"""
|
||||
|
@ -1512,6 +1520,16 @@ defmodule Mobilizon.Actors do
|
|||
|> select([m, _a], m)
|
||||
end
|
||||
|
||||
@spec group_internal_member_actor_query(integer(), list()) :: Ecto.Query.t()
|
||||
defp group_internal_member_actor_query(group_id, role) do
|
||||
Member
|
||||
|> where([m], m.parent_id == ^group_id)
|
||||
|> filter_member_role(role)
|
||||
|> join(:inner, [m], a in Actor, on: m.actor_id == a.id)
|
||||
|> where([_m, a], is_nil(a.domain))
|
||||
|> select([_m, a], a)
|
||||
end
|
||||
|
||||
@spec group_internal_member_query(integer()) :: Ecto.Query.t()
|
||||
defp group_internal_member_query(group_id) do
|
||||
Member
|
||||
|
@ -1523,13 +1541,13 @@ defmodule Mobilizon.Actors do
|
|||
end
|
||||
|
||||
@spec filter_member_role(Ecto.Query.t(), list(atom()) | atom()) :: Ecto.Query.t()
|
||||
def filter_member_role(query, []), do: query
|
||||
defp filter_member_role(query, []), do: query
|
||||
|
||||
def filter_member_role(query, roles) when is_list(roles) do
|
||||
defp filter_member_role(query, roles) when is_list(roles) do
|
||||
where(query, [m], m.role in ^roles)
|
||||
end
|
||||
|
||||
def filter_member_role(query, role) when is_atom(role) do
|
||||
defp filter_member_role(query, role) when is_atom(role) do
|
||||
from(m in query, where: m.role == ^role)
|
||||
end
|
||||
|
||||
|
|
|
@ -25,6 +25,7 @@ defmodule Mobilizon.Actors.Member do
|
|||
schema "members" do
|
||||
field(:role, MemberRole, default: :member)
|
||||
field(:url, :string)
|
||||
field(:member_since, :utc_datetime)
|
||||
|
||||
embeds_one :metadata, Metadata, on_replace: :delete do
|
||||
# TODO : Use this space to put notes when someone is invited / requested to join
|
||||
|
@ -64,6 +65,7 @@ defmodule Mobilizon.Actors.Member do
|
|||
|> cast(attrs, @attrs)
|
||||
|> cast_embed(:metadata, with: &metadata_changeset/2)
|
||||
|> ensure_url()
|
||||
|> update_member_since()
|
||||
|> validate_required(@required_attrs)
|
||||
# On both parent_id and actor_id
|
||||
|> unique_constraint(:parent_id, name: :members_actor_parent_unique_index)
|
||||
|
@ -98,4 +100,29 @@ defmodule Mobilizon.Actors.Member do
|
|||
|> put_change(:id, uuid)
|
||||
|> put_change(:url, "#{Endpoint.url()}/member/#{uuid}")
|
||||
end
|
||||
|
||||
@spec update_member_since(Ecto.Changeset.t()) :: Ecto.Changeset.t()
|
||||
defp update_member_since(%Ecto.Changeset{data: data} = changeset) do
|
||||
new_role = get_change(changeset, :role)
|
||||
|
||||
cond do
|
||||
new_role in [
|
||||
:member,
|
||||
:moderator,
|
||||
:administrator,
|
||||
:creator
|
||||
] ->
|
||||
put_change(
|
||||
changeset,
|
||||
:member_since,
|
||||
DateTime.truncate(data.member_since || DateTime.utc_now(), :second)
|
||||
)
|
||||
|
||||
new_role in [:invited, :not_approved, :rejected] ->
|
||||
put_change(changeset, :member_since, nil)
|
||||
|
||||
true ->
|
||||
changeset
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
@ -115,7 +115,10 @@ defmodule Mobilizon.Resources do
|
|||
Multi.new()
|
||||
|> do_find_parent_path(Map.get(attrs, :parent_id))
|
||||
|> Multi.insert(:insert, fn %{find_parent_path: path} ->
|
||||
Resource.changeset(%Resource{}, Map.put(attrs, :path, "#{path}/#{attrs.title}"))
|
||||
Resource.changeset(
|
||||
%Resource{},
|
||||
Map.put(attrs, :path, "#{path}/#{String.replace(attrs.title, "/", "")}")
|
||||
)
|
||||
end)
|
||||
|> Repo.transaction()
|
||||
|> case do
|
||||
|
@ -142,7 +145,11 @@ defmodule Mobilizon.Resources do
|
|||
|> update_children(resource, attrs)
|
||||
|> Multi.update(:update, fn %{find_parent_path: path} ->
|
||||
title = Map.get(attrs, :title, old_title)
|
||||
Resource.changeset(resource, Map.put(attrs, :path, "#{path}/#{title}"))
|
||||
|
||||
Resource.changeset(
|
||||
resource,
|
||||
Map.put(attrs, :path, "#{path}/#{String.replace(title, "/", "")}")
|
||||
)
|
||||
end)
|
||||
|> Repo.transaction()
|
||||
|> case do
|
||||
|
|
7
lib/service/activity/activity.ex
Normal file
7
lib/service/activity/activity.ex
Normal file
|
@ -0,0 +1,7 @@
|
|||
defmodule Mobilizon.Service.Activity do
|
||||
@moduledoc """
|
||||
Behavior for Activity creators
|
||||
"""
|
||||
|
||||
@callback insert_activity(entity :: struct(), options :: map()) :: {:ok, Oban.Job.t()}
|
||||
end
|
51
lib/service/activity/discussion.ex
Normal file
51
lib/service/activity/discussion.ex
Normal file
|
@ -0,0 +1,51 @@
|
|||
defmodule Mobilizon.Service.Activity.Discussion do
|
||||
@moduledoc """
|
||||
Insert a discussion activity
|
||||
"""
|
||||
alias Mobilizon.Actors
|
||||
alias Mobilizon.Discussions.Discussion
|
||||
alias Mobilizon.Service.Activity
|
||||
alias Mobilizon.Service.Workers.ActivityBuilder
|
||||
|
||||
@behaviour Activity
|
||||
|
||||
@impl Activity
|
||||
def insert_activity(discussion, options \\ [])
|
||||
|
||||
def insert_activity(
|
||||
%Discussion{creator_id: creator_id, actor_id: actor_id} = discussion,
|
||||
options
|
||||
)
|
||||
when not is_nil(creator_id) do
|
||||
creator = Actors.get_actor(creator_id)
|
||||
group = Actors.get_actor(actor_id)
|
||||
subject = Keyword.fetch!(options, :subject)
|
||||
author = Keyword.get(options, :moderator, creator)
|
||||
author_id = Keyword.get(options, :actor_id, author.id)
|
||||
old_discussion = Keyword.get(options, :old_discussion)
|
||||
|
||||
ActivityBuilder.enqueue(:build_activity, %{
|
||||
"type" => "discussion",
|
||||
"subject" => subject,
|
||||
"subject_params" => subject_params(discussion, subject, old_discussion),
|
||||
"group_id" => group.id,
|
||||
"author_id" => author_id,
|
||||
"object_type" => "discussion",
|
||||
"object_id" => if(subject != "discussion_deleted", do: to_string(discussion.id), else: nil),
|
||||
"inserted_at" => DateTime.utc_now()
|
||||
})
|
||||
end
|
||||
|
||||
def insert_activity(_, _), do: {:ok, nil}
|
||||
|
||||
@spec subject_params(Discussion.t(), String.t() | nil, Discussion.t() | nil) :: map()
|
||||
defp subject_params(%Discussion{} = discussion, "discussion_renamed", old_discussion) do
|
||||
discussion
|
||||
|> subject_params(nil, nil)
|
||||
|> Map.put(:old_discussion_title, old_discussion.title)
|
||||
end
|
||||
|
||||
defp subject_params(%Discussion{} = discussion, _, _) do
|
||||
%{discussion_slug: discussion.slug, discussion_title: discussion.title}
|
||||
end
|
||||
end
|
39
lib/service/activity/event.ex
Normal file
39
lib/service/activity/event.ex
Normal file
|
@ -0,0 +1,39 @@
|
|||
defmodule Mobilizon.Service.Activity.Event do
|
||||
@moduledoc """
|
||||
Insert an event activity
|
||||
"""
|
||||
alias Mobilizon.Actors
|
||||
alias Mobilizon.Events.Event
|
||||
alias Mobilizon.Service.Activity
|
||||
alias Mobilizon.Service.Workers.ActivityBuilder
|
||||
|
||||
@behaviour Activity
|
||||
|
||||
@impl Activity
|
||||
def insert_activity(event, options \\ [])
|
||||
|
||||
def insert_activity(
|
||||
%Event{attributed_to_id: attributed_to_id, organizer_actor_id: organizer_actor_id} =
|
||||
event,
|
||||
options
|
||||
)
|
||||
when not is_nil(attributed_to_id) do
|
||||
actor = Actors.get_actor(organizer_actor_id)
|
||||
group = Actors.get_actor(attributed_to_id)
|
||||
subject = Keyword.fetch!(options, :subject)
|
||||
|
||||
ActivityBuilder.enqueue(:build_activity, %{
|
||||
"type" => "event",
|
||||
"subject" => subject,
|
||||
"subject_params" => %{event_uuid: event.uuid, event_title: event.title},
|
||||
"group_id" => group.id,
|
||||
"author_id" => actor.id,
|
||||
"object_type" => "event",
|
||||
"object_id" => if(subject != "event_deleted", do: to_string(event.id), else: nil),
|
||||
"inserted_at" => DateTime.utc_now()
|
||||
})
|
||||
end
|
||||
|
||||
@impl Activity
|
||||
def insert_activity(_, _), do: {:ok, nil}
|
||||
end
|
150
lib/service/activity/group.ex
Normal file
150
lib/service/activity/group.ex
Normal file
|
@ -0,0 +1,150 @@
|
|||
defmodule Mobilizon.Service.Activity.Group do
|
||||
@moduledoc """
|
||||
Insert a group setting activity
|
||||
"""
|
||||
alias Mobilizon.Actors
|
||||
alias Mobilizon.Actors.Actor
|
||||
alias Mobilizon.Service.Activity
|
||||
alias Mobilizon.Service.Workers.ActivityBuilder
|
||||
|
||||
@behaviour Activity
|
||||
|
||||
@impl Activity
|
||||
def insert_activity(group, options \\ [])
|
||||
|
||||
def insert_activity(
|
||||
%Actor{type: :Group, id: group_id},
|
||||
options
|
||||
) do
|
||||
with %Actor{type: :Group} = group <- Actors.get_actor(group_id),
|
||||
subject when not is_nil(subject) <- Keyword.get(options, :subject),
|
||||
actor_id <- Keyword.get(options, :actor_id),
|
||||
default_updater_actor <- Actors.get_actor(actor_id),
|
||||
%Actor{id: actor_id} <-
|
||||
Keyword.get(options, :updater_actor, default_updater_actor),
|
||||
old_group <- Keyword.get(options, :old_group) do
|
||||
ActivityBuilder.enqueue(:build_activity, %{
|
||||
"type" => "group",
|
||||
"subject" => subject,
|
||||
"subject_params" => subject_params(group, subject, old_group),
|
||||
"group_id" => group.id,
|
||||
"author_id" => actor_id,
|
||||
"object_type" => "group",
|
||||
"object_id" => to_string(group.id),
|
||||
"inserted_at" => DateTime.utc_now()
|
||||
})
|
||||
else
|
||||
_ -> {:ok, nil}
|
||||
end
|
||||
end
|
||||
|
||||
def insert_activity(_, _), do: {:ok, nil}
|
||||
|
||||
@spec subject_params(Actor.t(), String.t() | nil, Actor.t() | nil) :: map()
|
||||
defp subject_params(%Actor{} = group, "group_updated", %Actor{} = old_group) do
|
||||
group
|
||||
|> subject_params(nil, nil)
|
||||
|> maybe_put_old_name_if_updated(old_group.name, group.name)
|
||||
|> maybe_put_summary_change_if_updated(old_group.summary, group.summary)
|
||||
|> maybe_put_old_visibility_if_updated(old_group.visibility, group.visibility)
|
||||
|> maybe_put_old_openness_if_updated(old_group.openness, group.openness)
|
||||
|> maybe_put_address_change_if_updated(
|
||||
old_group.physical_address_id,
|
||||
group.physical_address_id
|
||||
)
|
||||
|> maybe_put_avatar_change_if_updated(
|
||||
old_group.avatar,
|
||||
group.avatar
|
||||
)
|
||||
|> maybe_put_banner_change_if_updated(
|
||||
old_group.banner,
|
||||
group.banner
|
||||
)
|
||||
|> maybe_put_manually_approves_followers_change_if_updated(
|
||||
old_group.manually_approves_followers,
|
||||
group.manually_approves_followers
|
||||
)
|
||||
end
|
||||
|
||||
defp subject_params(
|
||||
%Actor{preferred_username: preferred_username, domain: domain, name: name},
|
||||
_,
|
||||
_
|
||||
) do
|
||||
%{
|
||||
group_preferred_username: preferred_username,
|
||||
group_name: name,
|
||||
group_domain: domain,
|
||||
group_changes: []
|
||||
}
|
||||
end
|
||||
|
||||
@spec maybe_put_old_name_if_updated(map(), String.t(), String.t()) :: map()
|
||||
defp maybe_put_old_name_if_updated(params, old_group_name, new_group_name)
|
||||
when old_group_name != new_group_name do
|
||||
params
|
||||
|> Map.update(:group_changes, [], fn changes -> changes ++ [:name] end)
|
||||
|> Map.put(:old_group_name, old_group_name)
|
||||
end
|
||||
|
||||
defp maybe_put_old_name_if_updated(params, _, _), do: params
|
||||
|
||||
defp maybe_put_summary_change_if_updated(params, old_summary, new_summary)
|
||||
when old_summary != new_summary do
|
||||
Map.update(params, :group_changes, [], fn changes -> changes ++ [:summary] end)
|
||||
end
|
||||
|
||||
defp maybe_put_summary_change_if_updated(params, _, _), do: params
|
||||
|
||||
defp maybe_put_old_visibility_if_updated(params, old_group_visibility, new_group_visibility)
|
||||
when old_group_visibility != new_group_visibility do
|
||||
params
|
||||
|> Map.update(:group_changes, [], fn changes -> changes ++ [:visibility] end)
|
||||
|> Map.put(:old_group_visibility, old_group_visibility)
|
||||
end
|
||||
|
||||
defp maybe_put_old_visibility_if_updated(params, _, _), do: params
|
||||
|
||||
defp maybe_put_old_openness_if_updated(params, old_group_openness, new_group_openness)
|
||||
when old_group_openness != new_group_openness do
|
||||
params
|
||||
|> Map.update(:group_changes, [], fn changes -> changes ++ [:openness] end)
|
||||
|> Map.put(:old_group_openness, old_group_openness)
|
||||
end
|
||||
|
||||
defp maybe_put_old_openness_if_updated(params, _, _), do: params
|
||||
|
||||
defp maybe_put_address_change_if_updated(params, old_address_id, new_address_id)
|
||||
when old_address_id != new_address_id do
|
||||
Map.update(params, :group_changes, [], fn changes -> changes ++ [:address] end)
|
||||
end
|
||||
|
||||
defp maybe_put_address_change_if_updated(params, _, _), do: params
|
||||
|
||||
defp maybe_put_avatar_change_if_updated(params, old_avatar, new_avatar)
|
||||
when old_avatar != new_avatar do
|
||||
Map.update(params, :group_changes, [], fn changes -> changes ++ [:avatar] end)
|
||||
end
|
||||
|
||||
defp maybe_put_avatar_change_if_updated(params, _, _), do: params
|
||||
|
||||
defp maybe_put_banner_change_if_updated(params, old_banner, new_banner)
|
||||
when old_banner != new_banner do
|
||||
Map.update(params, :group_changes, [], fn changes -> changes ++ [:banner] end)
|
||||
end
|
||||
|
||||
defp maybe_put_banner_change_if_updated(params, _, _), do: params
|
||||
|
||||
defp maybe_put_manually_approves_followers_change_if_updated(
|
||||
params,
|
||||
old_group_manually_approves_followers,
|
||||
new_group_manually_approves_followers
|
||||
)
|
||||
when old_group_manually_approves_followers != new_group_manually_approves_followers do
|
||||
params
|
||||
|> Map.update(:group_changes, [], fn changes -> changes ++ [:manually_approves_followers] end)
|
||||
|> Map.put(:old_group_manually_approves_followers, old_group_manually_approves_followers)
|
||||
end
|
||||
|
||||
defp maybe_put_manually_approves_followers_change_if_updated(params, _, _), do: params
|
||||
end
|
97
lib/service/activity/member.ex
Normal file
97
lib/service/activity/member.ex
Normal file
|
@ -0,0 +1,97 @@
|
|||
defmodule Mobilizon.Service.Activity.Member do
|
||||
@moduledoc """
|
||||
Insert a member activity
|
||||
"""
|
||||
alias Mobilizon.Actors
|
||||
alias Mobilizon.Actors.{Actor, Member}
|
||||
alias Mobilizon.Service.Activity
|
||||
alias Mobilizon.Service.Workers.ActivityBuilder
|
||||
|
||||
@behaviour Activity
|
||||
|
||||
@impl Activity
|
||||
def insert_activity(member, options \\ [])
|
||||
|
||||
def insert_activity(
|
||||
%Member{parent_id: parent_id, id: member_id} = new_member,
|
||||
options
|
||||
) do
|
||||
subject = Keyword.get(options, :subject)
|
||||
|
||||
with author_id <- get_author(new_member, options),
|
||||
object_id <- if(subject == "member_removed", do: nil, else: to_string(member_id)) do
|
||||
ActivityBuilder.enqueue(:build_activity, %{
|
||||
"type" => "member",
|
||||
"subject" => subject,
|
||||
"subject_params" => get_subject_params(new_member, options),
|
||||
"group_id" => parent_id,
|
||||
"author_id" => author_id,
|
||||
"object_type" => "member",
|
||||
"object_id" => object_id,
|
||||
"inserted_at" => DateTime.utc_now()
|
||||
})
|
||||
end
|
||||
end
|
||||
|
||||
def insert_activity(_, _), do: {:ok, nil}
|
||||
|
||||
@spec get_author(Member.t(), Member.t() | nil) :: String.t() | integer()
|
||||
defp get_author(%Member{actor_id: actor_id}, options) do
|
||||
moderator = Keyword.get(options, :moderator)
|
||||
|
||||
if is_nil(moderator) do
|
||||
actor_id
|
||||
else
|
||||
moderator.id
|
||||
end
|
||||
end
|
||||
|
||||
@spec get_subject_params(Member.t(), Keyword.t()) :: map()
|
||||
defp get_subject_params(%Member{actor: actor, role: role, id: member_id}, options) do
|
||||
# We may need to preload the member to make sure the actor exists
|
||||
actor =
|
||||
case actor do
|
||||
%Actor{} = actor ->
|
||||
actor
|
||||
|
||||
_ ->
|
||||
case Actors.get_member(member_id) do
|
||||
%Member{actor: actor} -> actor
|
||||
_ -> nil
|
||||
end
|
||||
end
|
||||
|
||||
moderator = Keyword.get(options, :moderator)
|
||||
old_member = Keyword.get(options, :old_member)
|
||||
|
||||
subject_params = %{
|
||||
member_role: String.upcase(to_string(role))
|
||||
}
|
||||
|
||||
subject_params =
|
||||
if(is_nil(actor),
|
||||
do: subject_params,
|
||||
else:
|
||||
Map.put(
|
||||
subject_params,
|
||||
:member_preferred_username,
|
||||
Actor.preferred_username_and_domain(actor)
|
||||
)
|
||||
)
|
||||
|
||||
subject_params =
|
||||
if(is_nil(old_member),
|
||||
do: subject_params,
|
||||
else: Map.put(subject_params, :old_role, String.upcase(to_string(old_member.role)))
|
||||
)
|
||||
|
||||
if is_nil(moderator),
|
||||
do: subject_params,
|
||||
else:
|
||||
Map.put(
|
||||
subject_params,
|
||||
:moderator_preferred_username,
|
||||
Actor.preferred_username_and_domain(moderator)
|
||||
)
|
||||
end
|
||||
end
|
37
lib/service/activity/posts.ex
Normal file
37
lib/service/activity/posts.ex
Normal file
|
@ -0,0 +1,37 @@
|
|||
defmodule Mobilizon.Service.Activity.Post do
|
||||
@moduledoc """
|
||||
Insert an post activity
|
||||
"""
|
||||
alias Mobilizon.Actors
|
||||
alias Mobilizon.Posts.Post
|
||||
alias Mobilizon.Service.Activity
|
||||
alias Mobilizon.Service.Workers.ActivityBuilder
|
||||
|
||||
@behaviour Activity
|
||||
|
||||
@impl Activity
|
||||
def insert_activity(post, options \\ [])
|
||||
|
||||
def insert_activity(
|
||||
%Post{attributed_to_id: attributed_to_id, author_id: author_id} = post,
|
||||
options
|
||||
)
|
||||
when not is_nil(attributed_to_id) do
|
||||
author = Actors.get_actor(author_id)
|
||||
group = Actors.get_actor(attributed_to_id)
|
||||
subject = Keyword.fetch!(options, :subject)
|
||||
|
||||
ActivityBuilder.enqueue(:build_activity, %{
|
||||
"type" => "post",
|
||||
"subject" => subject,
|
||||
"subject_params" => %{post_slug: post.slug, post_title: post.title},
|
||||
"group_id" => group.id,
|
||||
"author_id" => author.id,
|
||||
"object_type" => "post",
|
||||
"object_id" => if(subject != "post_deleted", do: to_string(post.id), else: nil),
|
||||
"inserted_at" => DateTime.utc_now()
|
||||
})
|
||||
end
|
||||
|
||||
def insert_activity(_, _), do: {:ok, nil}
|
||||
end
|
50
lib/service/activity/resource.ex
Normal file
50
lib/service/activity/resource.ex
Normal file
|
@ -0,0 +1,50 @@
|
|||
defmodule Mobilizon.Service.Activity.Resource do
|
||||
@moduledoc """
|
||||
Insert an resource activity
|
||||
"""
|
||||
alias Mobilizon.Actors
|
||||
alias Mobilizon.Resources.Resource
|
||||
alias Mobilizon.Service.Activity
|
||||
alias Mobilizon.Service.Workers.ActivityBuilder
|
||||
|
||||
@behaviour Activity
|
||||
|
||||
@impl Activity
|
||||
def insert_activity(resource, options \\ [])
|
||||
|
||||
def insert_activity(
|
||||
%Resource{actor_id: actor_id, creator_id: creator_id} = resource,
|
||||
options
|
||||
)
|
||||
when not is_nil(actor_id) do
|
||||
actor = Actors.get_actor(creator_id)
|
||||
group = Actors.get_actor(actor_id)
|
||||
subject = Keyword.fetch!(options, :subject)
|
||||
old_resource = Keyword.get(options, :old_resource)
|
||||
|
||||
ActivityBuilder.enqueue(:build_activity, %{
|
||||
"type" => "resource",
|
||||
"subject" => subject,
|
||||
"subject_params" => subject_params(resource, subject, old_resource),
|
||||
"group_id" => group.id,
|
||||
"author_id" => actor.id,
|
||||
"object_type" => "resource",
|
||||
"object_id" => if(subject != "resource_deleted", do: to_string(resource.id), else: nil),
|
||||
"inserted_at" => DateTime.utc_now()
|
||||
})
|
||||
end
|
||||
|
||||
@impl Activity
|
||||
def insert_activity(_, _), do: {:ok, nil}
|
||||
|
||||
@spec subject_params(Resource.t(), String.t() | nil, Resource.t() | nil) :: map()
|
||||
defp subject_params(%Resource{} = resource, "resource_renamed", old_resource) do
|
||||
resource
|
||||
|> subject_params(nil, nil)
|
||||
|> Map.put(:old_resource_title, old_resource.title)
|
||||
end
|
||||
|
||||
defp subject_params(%Resource{path: path, title: title}, _, _) do
|
||||
%{resource_path: path, resource_title: title}
|
||||
end
|
||||
end
|
22
lib/service/workers/activity_builder.ex
Normal file
22
lib/service/workers/activity_builder.ex
Normal file
|
@ -0,0 +1,22 @@
|
|||
defmodule Mobilizon.Service.Workers.ActivityBuilder do
|
||||
@moduledoc """
|
||||
Worker to insert activity items in users feeds
|
||||
"""
|
||||
|
||||
alias Mobilizon.Activities
|
||||
alias Mobilizon.Activities.Activity
|
||||
|
||||
use Mobilizon.Service.Workers.Helper, queue: "activity"
|
||||
|
||||
@impl Oban.Worker
|
||||
def perform(%Job{args: args}) do
|
||||
with {"build_activity", args} <- Map.pop(args, "op") do
|
||||
build_activity(args)
|
||||
end
|
||||
end
|
||||
|
||||
@spec build_activity(map()) :: {:ok, Activity.t()}
|
||||
def build_activity(args) do
|
||||
Activities.create_activity(args)
|
||||
end
|
||||
end
|
|
@ -10,7 +10,10 @@ defmodule Mobilizon.Web.Endpoint do
|
|||
use Absinthe.Phoenix.Endpoint
|
||||
|
||||
plug(Mobilizon.Web.Plugs.SetLocalePlug)
|
||||
plug(Mobilizon.Web.Plugs.HTTPSecurityPlug)
|
||||
|
||||
if Application.fetch_env!(:mobilizon, :env) !== :dev do
|
||||
plug(Mobilizon.Web.Plugs.HTTPSecurityPlug)
|
||||
end
|
||||
|
||||
# For e2e tests
|
||||
if Application.get_env(:mobilizon, :sql_sandbox) do
|
||||
|
|
10
mix.exs
10
mix.exs
|
@ -104,10 +104,8 @@ defmodule Mobilizon.Mixfile do
|
|||
{:bamboo_smtp, "~> 3.0"},
|
||||
{:geolix, "~> 2.0"},
|
||||
{:geolix_adapter_mmdb2, "~> 0.6.0"},
|
||||
{:absinthe, "~> 1.6"},
|
||||
{:absinthe_phoenix,
|
||||
github: "absinthe-graphql/absinthe_phoenix",
|
||||
ref: "67dc53db5b826ea12f37860bcce4334d4aaad028"},
|
||||
{:absinthe, "~> 1.5.0"},
|
||||
{:absinthe_phoenix, "~> 2.0.1"},
|
||||
{:absinthe_plug, "~> 1.5.0"},
|
||||
{:dataloader, "~> 1.0.6"},
|
||||
{:plug_cowboy, "~> 2.0"},
|
||||
|
@ -122,7 +120,7 @@ defmodule Mobilizon.Mixfile do
|
|||
{:ex_optimizer, "~> 0.1"},
|
||||
{:progress_bar, "~> 2.0"},
|
||||
{:oban, "~> 2.2"},
|
||||
{:floki, "~> 0.29.0"},
|
||||
{:floki, "~> 0.30.0"},
|
||||
{:ip_reserved, "~> 0.1.0"},
|
||||
{:fast_sanitize, "~> 0.1"},
|
||||
{:ueberauth, "~> 0.6"},
|
||||
|
@ -146,7 +144,7 @@ defmodule Mobilizon.Mixfile do
|
|||
# Dev and test dependencies
|
||||
{:phoenix_live_reload, "~> 1.2", only: [:dev, :e2e]},
|
||||
{:ex_machina, "~> 2.3", only: [:dev, :test]},
|
||||
{:excoveralls, "~> 0.13.0", only: :test},
|
||||
{:excoveralls, "~> 0.14.0", only: :test},
|
||||
{:ex_doc, "~> 0.23", only: [:dev, :test], runtime: false},
|
||||
{:mix_test_watch, "~> 1.0", only: :dev, runtime: false},
|
||||
{:ex_unit_notifier, "~> 1.0", only: :test},
|
||||
|
|
33
mix.lock
33
mix.lock
|
@ -1,11 +1,11 @@
|
|||
%{
|
||||
"absinthe": {:hex, :absinthe, "1.6.1", "07bd1636027595c8d00d250a5878e617c24ccb25c84a08e807d8d00cf124696c", [:mix], [{:dataloader, "~> 1.0.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f0105f1de6176ca50789081f2465389cb7afa438d54bf5133aeb3549f8f629f6"},
|
||||
"absinthe_phoenix": {:git, "https://github.com/absinthe-graphql/absinthe_phoenix.git", "67dc53db5b826ea12f37860bcce4334d4aaad028", [ref: "67dc53db5b826ea12f37860bcce4334d4aaad028"]},
|
||||
"absinthe_plug": {:hex, :absinthe_plug, "1.5.4", "daff02d04be7c06d0114ef5b4361865a4dacbe8ddb325ce709b103253d4a014b", [:mix], [{:absinthe, "~> 1.5", [hex: :absinthe, repo: "hexpm", optional: false]}, {:plug, "~> 1.4", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "80360cd8ad541d87c75336f3abc59b894d474458f6a7f8e563781c01148860de"},
|
||||
"absinthe": {:hex, :absinthe, "1.5.5", "22b26228f56dc6a1074c52cea9c64e869a0cb2427403bcf9056c422d36c66292", [:mix], [{:dataloader, "~> 1.0.0", [hex: :dataloader, repo: "hexpm", optional: true]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "41e79ed4bffbab4986493ff4120c948d59871fd08ad5e31195129ce3c01aad58"},
|
||||
"absinthe_phoenix": {:hex, :absinthe_phoenix, "2.0.1", "112cb3468db2748a85bd8bd3f4d6d33f37408a96cb170077026ace96ddb1bab2", [:mix], [{:absinthe, "~> 1.5", [hex: :absinthe, repo: "hexpm", optional: false]}, {:absinthe_plug, "~> 1.5", [hex: :absinthe_plug, repo: "hexpm", optional: false]}, {:decimal, "~> 1.0 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.5", [hex: :phoenix, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.13", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}], "hexpm", "e773adc876fbc84fb05a82e125d9c263f129520b36e5576554ffcb8cf49db445"},
|
||||
"absinthe_plug": {:hex, :absinthe_plug, "1.5.5", "be913e77df1947ffb654a1cf1a90e28d84dc23241f6404053750bae513ccd52b", [:mix], [{:absinthe, "~> 1.5", [hex: :absinthe, repo: "hexpm", optional: false]}, {:plug, "~> 1.4", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "6c366615d9422444774206aff3448bb9cfb4e849e0c9a94a275085097bc67509"},
|
||||
"argon2_elixir": {:hex, :argon2_elixir, "2.4.0", "2a22ea06e979f524c53b42b598fc6ba38cdcbc977a155e33e057732cfb1fb311", [:make, :mix], [{:comeonin, "~> 5.3", [hex: :comeonin, repo: "hexpm", optional: false]}, {:elixir_make, "~> 0.6", [hex: :elixir_make, repo: "hexpm", optional: false]}], "hexpm", "4ea82e183cf8e7f66dab1f767fedcfe6a195e140357ef2b0423146b72e0a551d"},
|
||||
"atomex": {:hex, :atomex, "0.4.1", "7d3910ff7795db91b9af9f8d3e65af7ac69f235adf03484995fc667a36f3edc5", [:mix], [{:xml_builder, "~> 2.1", [hex: :xml_builder, repo: "hexpm", optional: false]}], "hexpm", "f3ac737f7493d42cfddf917f3ac49d60e0a0cf1a35c0712851b07fe8c0a05c7a"},
|
||||
"bamboo": {:hex, :bamboo, "1.6.0", "adfb583bef028923aae6f22deaea6667290561da1246058556ecaeb0fec5a175", [:mix], [{:hackney, ">= 1.13.0", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "454e67feacbc9b6e00553ce1d2fba003c861e0035600d59b09d6159985b17f9b"},
|
||||
"bamboo_smtp": {:hex, :bamboo_smtp, "3.0.0", "b7f0c371af96a1cb7131908918b02abb228f9db234910bf10cf4fb177c083259", [:mix], [{:bamboo, "~> 1.2", [hex: :bamboo, repo: "hexpm", optional: false]}, {:gen_smtp, "~> 0.15.0", [hex: :gen_smtp, repo: "hexpm", optional: false]}], "hexpm", "77cb1fa3076b24109e54df622161fe1e5619376b4ecf86d8b99b46f327acc49f"},
|
||||
"bamboo": {:hex, :bamboo, "1.7.0", "4b102071e615838aa7329b038b01ca5508dfdf872b5e0bc6aab2c47b3df44f08", [:mix], [{:hackney, ">= 1.15.2", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:mime, "~> 1.4", [hex: :mime, repo: "hexpm", optional: false]}, {:phoenix, "~> 1.1", [hex: :phoenix, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "b2ec75cf6e570abcb61f736f62ddf156c5d2d821cbba0d12a57df140169fbb96"},
|
||||
"bamboo_smtp": {:hex, :bamboo_smtp, "3.1.3", "215edc205fe3148fd633d45914a525969cceca4b2d2cc50f165d5360951859d7", [:mix], [{:bamboo, "~> 1.7.0", [hex: :bamboo, repo: "hexpm", optional: false]}, {:gen_smtp, "~> 1.1.0", [hex: :gen_smtp, repo: "hexpm", optional: false]}], "hexpm", "b63eff97205a5bb889931f32356eaa9c5504c3495bf1211a608ab9431cfc5877"},
|
||||
"bunt": {:hex, :bunt, "0.2.0", "951c6e801e8b1d2cbe58ebbd3e616a869061ddadcc4863d0a2182541acae9a38", [:mix], [], "hexpm", "7af5c7e09fe1d40f76c8e4f9dd2be7cebd83909f31fee7cd0e9eadc567da8353"},
|
||||
"cachex": {:hex, :cachex, "3.3.0", "6f2ebb8f27491fe39121bd207c78badc499214d76c695658b19d6079beeca5c2", [:mix], [{:eternal, "~> 1.2", [hex: :eternal, repo: "hexpm", optional: false]}, {:jumper, "~> 1.0", [hex: :jumper, repo: "hexpm", optional: false]}, {:sleeplocks, "~> 1.1", [hex: :sleeplocks, repo: "hexpm", optional: false]}, {:unsafe, "~> 1.0", [hex: :unsafe, repo: "hexpm", optional: false]}], "hexpm", "d90e5ee1dde14cef33f6b187af4335b88748b72b30c038969176cd4e6ccc31a1"},
|
||||
"certifi": {:hex, :certifi, "2.5.3", "70bdd7e7188c804f3a30ee0e7c99655bc35d8ac41c23e12325f36ab449b70651", [:rebar3], [{:parse_trans, "~>3.3", [hex: :parse_trans, repo: "hexpm", optional: false]}], "hexpm", "ed516acb3929b101208a9d700062d520f3953da3b6b918d866106ffa980e1c10"},
|
||||
|
@ -13,18 +13,18 @@
|
|||
"combine": {:hex, :combine, "0.10.0", "eff8224eeb56498a2af13011d142c5e7997a80c8f5b97c499f84c841032e429f", [:mix], [], "hexpm", "1b1dbc1790073076580d0d1d64e42eae2366583e7aecd455d1215b0d16f2451b"},
|
||||
"comeonin": {:hex, :comeonin, "5.3.2", "5c2f893d05c56ae3f5e24c1b983c2d5dfb88c6d979c9287a76a7feb1e1d8d646", [:mix], [], "hexpm", "d0993402844c49539aeadb3fe46a3c9bd190f1ecf86b6f9ebd71957534c95f04"},
|
||||
"connection": {:hex, :connection, "1.1.0", "ff2a49c4b75b6fb3e674bfc5536451607270aac754ffd1bdfe175abe4a6d7a68", [:mix], [], "hexpm", "722c1eb0a418fbe91ba7bd59a47e28008a189d47e37e0e7bb85585a016b2869c"},
|
||||
"cors_plug": {:hex, :cors_plug, "2.0.2", "2b46083af45e4bc79632bd951550509395935d3e7973275b2b743bd63cc942ce", [:mix], [{:plug, "~> 1.8", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "f0d0e13f71c51fd4ef8b2c7e051388e4dfb267522a83a22392c856de7e46465f"},
|
||||
"cors_plug": {:hex, :cors_plug, "2.0.3", "316f806d10316e6d10f09473f19052d20ba0a0ce2a1d910ddf57d663dac402ae", [:mix], [{:plug, "~> 1.8", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "ee4ae1418e6ce117fc42c2ba3e6cbdca4e95ecd2fe59a05ec6884ca16d469aea"},
|
||||
"cowboy": {:hex, :cowboy, "2.8.0", "f3dc62e35797ecd9ac1b50db74611193c29815401e53bac9a5c0577bd7bc667d", [:rebar3], [{:cowlib, "~> 2.9.1", [hex: :cowlib, repo: "hexpm", optional: false]}, {:ranch, "~> 1.7.1", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "4643e4fba74ac96d4d152c75803de6fad0b3fa5df354c71afdd6cbeeb15fac8a"},
|
||||
"cowboy_telemetry": {:hex, :cowboy_telemetry, "0.3.1", "ebd1a1d7aff97f27c66654e78ece187abdc646992714164380d8a041eda16754", [:rebar3], [{:cowboy, "~> 2.7", [hex: :cowboy, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3a6efd3366130eab84ca372cbd4a7d3c3a97bdfcfb4911233b035d117063f0af"},
|
||||
"cowlib": {:hex, :cowlib, "2.9.1", "61a6c7c50cf07fdd24b2f45b89500bb93b6686579b069a89f88cb211e1125c78", [:rebar3], [], "hexpm", "e4175dc240a70d996156160891e1c62238ede1729e45740bdd38064dad476170"},
|
||||
"credo": {:hex, :credo, "1.5.4", "9914180105b438e378e94a844ec3a5088ae5875626fc945b7c1462b41afc3198", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "cf51af45eadc0a3f39ba13b56fdac415c91b34f7b7533a13dc13550277141bc4"},
|
||||
"credo": {:hex, :credo, "1.5.5", "e8f422026f553bc3bebb81c8e8bf1932f498ca03339856c7fec63d3faac8424b", [:mix], [{:bunt, "~> 0.2.0", [hex: :bunt, repo: "hexpm", optional: false]}, {:file_system, "~> 0.2.8", [hex: :file_system, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "dd8623ab7091956a855dc9f3062486add9c52d310dfd62748779c4315d8247de"},
|
||||
"dataloader": {:hex, :dataloader, "1.0.8", "114294362db98a613f231589246aa5b0ce847412e8e75c4c94f31f204d272cbf", [:mix], [{:ecto, ">= 3.4.3 and < 4.0.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "eaf3c2aa2bc9dbd2f1e960561d616b7f593396c4754185b75904f6d66c82a667"},
|
||||
"db_connection": {:hex, :db_connection, "2.3.1", "4c9f3ed1ef37471cbdd2762d6655be11e38193904d9c5c1c9389f1b891a3088e", [:mix], [{:connection, "~> 1.0", [hex: :connection, repo: "hexpm", optional: false]}], "hexpm", "abaab61780dde30301d840417890bd9f74131041afd02174cf4e10635b3a63f5"},
|
||||
"decimal": {:hex, :decimal, "2.0.0", "a78296e617b0f5dd4c6caf57c714431347912ffb1d0842e998e9792b5642d697", [:mix], [], "hexpm", "34666e9c55dea81013e77d9d87370fe6cb6291d1ef32f46a1600230b1d44f577"},
|
||||
"dialyxir": {:hex, :dialyxir, "1.0.0", "6a1fa629f7881a9f5aaf3a78f094b2a51a0357c843871b8bc98824e7342d00a5", [:mix], [{:erlex, ">= 0.2.6", [hex: :erlex, repo: "hexpm", optional: false]}], "hexpm", "aeb06588145fac14ca08d8061a142d52753dbc2cf7f0d00fc1013f53f8654654"},
|
||||
"earmark": {:hex, :earmark, "1.4.13", "2c6ce9768fc9fdbf4046f457e207df6360ee6c91ee1ecb8e9a139f96a4289d91", [:mix], [{:earmark_parser, ">= 1.4.12", [hex: :earmark_parser, repo: "hexpm", optional: false]}], "hexpm", "a0cf3ed88ef2b1964df408889b5ecb886d1a048edde53497fc935ccd15af3403"},
|
||||
"earmark_parser": {:hex, :earmark_parser, "1.4.12", "b245e875ec0a311a342320da0551da407d9d2b65d98f7a9597ae078615af3449", [:mix], [], "hexpm", "711e2cc4d64abb7d566d43f54b78f7dc129308a63bc103fbd88550d2174b3160"},
|
||||
"ecto": {:hex, :ecto, "3.5.6", "29c77e999e471921c7ce7347732bab7bfa3e24c587640a36f17e0744d1474b8e", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "3ae1f3eaecc3e72eeb65ed43239b292bb1eaf335c7e6cea3a7fc27aadb6e93e7"},
|
||||
"ecto": {:hex, :ecto, "3.5.7", "f440a476bf1be361173a43a4a18f04a2fdf4e6fac5b0457f03d8686e55f13f7e", [:mix], [{:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "04c4e69d4f1cc2bb085aa760d50389ba8ae3003f80c112fbde87d57f5ed75d39"},
|
||||
"ecto_autoslug_field": {:hex, :ecto_autoslug_field, "2.0.1", "2177c1c253f6dd3efd4b56d1cb76104d0a6ef044c6b9a7a0ad6d32665c4111e5", [:mix], [{:ecto, ">= 2.1.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:slugger, ">= 0.2.0", [hex: :slugger, repo: "hexpm", optional: false]}], "hexpm", "a3cc73211f2e75b89a03332183812ebe1ac08be2e25a1df5aa3d1422f92c45c3"},
|
||||
"ecto_enum": {:hex, :ecto_enum, "1.4.0", "d14b00e04b974afc69c251632d1e49594d899067ee2b376277efd8233027aec8", [:mix], [{:ecto, ">= 3.0.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:ecto_sql, "> 3.0.0", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:mariaex, ">= 0.0.0", [hex: :mariaex, repo: "hexpm", optional: true]}, {:postgrex, ">= 0.0.0", [hex: :postgrex, repo: "hexpm", optional: true]}], "hexpm", "8fb55c087181c2b15eee406519dc22578fa60dd82c088be376d0010172764ee4"},
|
||||
"ecto_shortuuid": {:hex, :ecto_shortuuid, "0.1.3", "d36aede64edf256e4b769be2ad15a8ad5d9d1ff8ad46befe39e8cb4489abcd05", [:mix], [{:ecto, "~> 2.2 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:shortuuid, "~> 2.1.1", [hex: :shortuuid, repo: "hexpm", optional: false]}], "hexpm", "d215c8ced7125265de94d55abc696125942caef33439cf281fafded9744a4294"},
|
||||
|
@ -33,7 +33,7 @@
|
|||
"elixir_make": {:hex, :elixir_make, "0.6.2", "7dffacd77dec4c37b39af867cedaabb0b59f6a871f89722c25b28fcd4bd70530", [:mix], [], "hexpm", "03e49eadda22526a7e5279d53321d1cced6552f344ba4e03e619063de75348d9"},
|
||||
"erlex": {:hex, :erlex, "0.2.6", "c7987d15e899c7a2f34f5420d2a2ea0d659682c06ac607572df55a43753aa12e", [:mix], [], "hexpm", "2ed2e25711feb44d52b17d2780eabf998452f6efda104877a3881c2f8c0c0c75"},
|
||||
"eternal": {:hex, :eternal, "1.2.2", "d1641c86368de99375b98d183042dd6c2b234262b8d08dfd72b9eeaafc2a1abd", [:mix], [], "hexpm", "2c9fe32b9c3726703ba5e1d43a1d255a4f3f2d8f8f9bc19f094c7cb1a7a9e782"},
|
||||
"ex_cldr": {:hex, :ex_cldr, "2.18.2", "c0557145c234a4d31ff450a0438c5a70e786ccba9449a9f9f895809be20bed7d", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:cldr_utils, "~> 2.12", [hex: :cldr_utils, repo: "hexpm", optional: false]}, {:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:gettext, "~> 0.13", [hex: :gettext, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "ac28055ae6df438b72f98703c842c2c0d969af6bd68662a8f586862a9a0ddc79"},
|
||||
"ex_cldr": {:hex, :ex_cldr, "2.19.0", "61e789016dff00f24a28b26632f6240efe8257ad4f651741e889d8929a0fd075", [:mix], [{:castore, "~> 0.1", [hex: :castore, repo: "hexpm", optional: true]}, {:certifi, "~> 2.5", [hex: :certifi, repo: "hexpm", optional: true]}, {:cldr_utils, "~> 2.12", [hex: :cldr_utils, repo: "hexpm", optional: false]}, {:decimal, "~> 1.6 or ~> 2.0", [hex: :decimal, repo: "hexpm", optional: false]}, {:gettext, "~> 0.13", [hex: :gettext, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}, {:plug, "~> 1.9", [hex: :plug, repo: "hexpm", optional: true]}, {:telemetry, "~> 0.4.0", [hex: :telemetry, repo: "hexpm", optional: true]}], "hexpm", "fccdb406d66da75991e37e4b7b59aa2e1c8242f41822924f9560453610123d84"},
|
||||
"ex_cldr_calendars": {:hex, :ex_cldr_calendars, "1.12.0", "0cf7c804937a93baa9c3b471667ad05c478942865cc457e8397b5d83fc6f2c7a", [:mix], [{:calendar_interval, "~> 0.2", [hex: :calendar_interval, repo: "hexpm", optional: true]}, {:earmark, "~> 1.0", [hex: :earmark, repo: "hexpm", optional: false]}, {:ex_cldr_numbers, "~> 2.16", [hex: :ex_cldr_numbers, repo: "hexpm", optional: false]}, {:ex_cldr_units, "~> 3.3", [hex: :ex_cldr_units, repo: "hexpm", optional: true]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "edcb91ec52ee4e24a928e2bcf6d3354da465eced42887fbdb3f878a7a329963f"},
|
||||
"ex_cldr_currencies": {:hex, :ex_cldr_currencies, "2.8.0", "b2ecc94e9fa4b8ec07614830f4d6e811e5df5e7679c6d2be92f4fe4f31184913", [:mix], [{:ex_cldr, "~> 2.18", [hex: :ex_cldr, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "a39780667b73bfd3d2bd08e61981bca23a97912b86f3236042850ecb062f48eb"},
|
||||
"ex_cldr_dates_times": {:hex, :ex_cldr_dates_times, "2.6.4", "d383e033aaa7295dd4964bca95baff62ee259eca2e32d550cc470495e3d8a012", [:mix], [{:calendar_interval, "~> 0.2", [hex: :calendar_interval, repo: "hexpm", optional: true]}, {:ex_cldr_calendars, "~> 1.11", [hex: :ex_cldr_calendars, repo: "hexpm", optional: false]}, {:ex_cldr_numbers, "~> 2.16", [hex: :ex_cldr_numbers, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "23c6d4cfdd1e00a6cd8c9ffb5ae5da909489e77f0f8d854856087ea5d5f666c5"},
|
||||
|
@ -42,11 +42,11 @@
|
|||
"ex_crypto": {:hex, :ex_crypto, "0.10.0", "af600a89b784b36613a989da6e998c1b200ff1214c3cfbaf8deca4aa2f0a1739", [:mix], [{:poison, ">= 2.0.0", [hex: :poison, repo: "hexpm", optional: false]}], "hexpm", "ccc7472cfe8a0f4565f97dce7e9280119bf15a5ea51c6535e5b65f00660cde1c"},
|
||||
"ex_doc": {:hex, :ex_doc, "0.23.0", "a069bc9b0bf8efe323ecde8c0d62afc13d308b1fa3d228b65bca5cf8703a529d", [:mix], [{:earmark_parser, "~> 1.4.0", [hex: :earmark_parser, repo: "hexpm", optional: false]}, {:makeup_elixir, "~> 0.14", [hex: :makeup_elixir, repo: "hexpm", optional: false]}], "hexpm", "f5e2c4702468b2fd11b10d39416ddadd2fcdd173ba2a0285ebd92c39827a5a16"},
|
||||
"ex_ical": {:hex, :ex_ical, "0.2.0", "4b928b554614704016cc0c9ee226eb854da9327a1cc460457621ceacb1ac29a6", [:mix], [{:timex, "~> 3.1", [hex: :timex, repo: "hexpm", optional: false]}], "hexpm", "db76473b2ae0259e6633c6c479a5a4d8603f09497f55c88f9ef4d53d2b75befb"},
|
||||
"ex_machina": {:hex, :ex_machina, "2.5.0", "8143cd1bf25364f197b089230c0e463941d5909b84c1a8491393ebf97a4b53fa", [:mix], [{:ecto, "~> 2.2 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_sql, "~> 3.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}], "hexpm", "8f24851c32b3f9f8adb11335f1e4801ea76a2e0dfa21d8c4bc40ee0d6156c084"},
|
||||
"ex_machina": {:hex, :ex_machina, "2.6.0", "cda776bc3afab6bce63355394e3398b7da68a0e0db855edf635ddd51513756e0", [:mix], [{:ecto, "~> 2.2 or ~> 3.0", [hex: :ecto, repo: "hexpm", optional: true]}, {:ecto_sql, "~> 3.0", [hex: :ecto_sql, repo: "hexpm", optional: true]}], "hexpm", "5c8fa8b44d710dfb46ef389d8570f7279b6843c6c74ae5bf2ce07fa9719945e7"},
|
||||
"ex_optimizer": {:hex, :ex_optimizer, "0.1.1", "62da37e206fc2233ff7a4e54e40eae365c40f96c81992fcd15b782eb25169b80", [:mix], [{:file_info, "~> 0.0.4", [hex: :file_info, repo: "hexpm", optional: false]}], "hexpm", "e6f5c059bcd58b66be2f6f257fdc4f69b74b0fa5c9ddd669486af012e4b52286"},
|
||||
"ex_unit_notifier": {:hex, :ex_unit_notifier, "1.0.0", "85a95b4666b1300412798c76a33344b69f00fab99519c48839780ce2678dfead", [:mix], [], "hexpm", "ed54c8cf4a4ddb3230ef8a23071dd371e5d64cc4026a2b047532c1db4ca58e6d"},
|
||||
"exactor": {:hex, :exactor, "2.2.4", "5efb4ddeb2c48d9a1d7c9b465a6fffdd82300eb9618ece5d34c3334d5d7245b1", [:mix], [], "hexpm", "1222419f706e01bfa1095aec9acf6421367dcfab798a6f67c54cf784733cd6b5"},
|
||||
"excoveralls": {:hex, :excoveralls, "0.13.4", "7b0baee01fe150ef81153e6ffc0fc68214737f54570dc257b3ca4da8e419b812", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "faae00b3eee35cdf0342c10b669a7c91f942728217d2a7c7f644b24d391e6190"},
|
||||
"excoveralls": {:hex, :excoveralls, "0.14.0", "4b562d2acd87def01a3d1621e40037fdbf99f495ed3a8570dfcf1ab24e15f76d", [:mix], [{:hackney, "~> 1.16", [hex: :hackney, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: false]}], "hexpm", "94f17478b0cca020bcd85ce7eafea82d2856f7ed022be777734a2f864d36091a"},
|
||||
"exgravatar": {:hex, :exgravatar, "2.0.2", "638412896170409da114f98947d3f8d4f38e851b0e329c1cc4cd324d5e2ea081", [:mix], [], "hexpm", "f3deb5baa6fcf354a965d794ee73a956d95f1f79f41bddf69800c713cfb014a1"},
|
||||
"exjsx": {:hex, :exjsx, "4.0.0", "60548841e0212df401e38e63c0078ec57b33e7ea49b032c796ccad8cde794b5c", [:mix], [{:jsx, "~> 2.8.0", [hex: :jsx, repo: "hexpm", optional: false]}], "hexpm", "32e95820a97cffea67830e91514a2ad53b888850442d6d395f53a1ac60c82e07"},
|
||||
"exvcr": {:hex, :exvcr, "0.12.2", "e8fc0beeb62924d3b755b2718a161b13cb4ed53311378e5e587606c15190c8ed", [:mix], [{:exactor, "~> 2.2", [hex: :exactor, repo: "hexpm", optional: false]}, {:exjsx, "~> 4.0", [hex: :exjsx, repo: "hexpm", optional: false]}, {:httpoison, "~> 1.0", [hex: :httpoison, repo: "hexpm", optional: true]}, {:httpotion, "~> 3.1", [hex: :httpotion, repo: "hexpm", optional: true]}, {:ibrowse, "4.4.0", [hex: :ibrowse, repo: "hexpm", optional: true]}, {:meck, "~> 0.8", [hex: :meck, repo: "hexpm", optional: false]}], "hexpm", "63776555a1bd003ff60635aead47461ced1ff985c66427421ad344e317ba983c"},
|
||||
|
@ -54,8 +54,8 @@
|
|||
"fast_sanitize": {:hex, :fast_sanitize, "0.2.2", "3cbbaebaea6043865dfb5b4ecb0f1af066ad410a51470e353714b10c42007b81", [:mix], [{:fast_html, "~> 2.0", [hex: :fast_html, repo: "hexpm", optional: false]}, {:plug, "~> 1.8", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "69f204db9250afa94a0d559d9110139850f57de2b081719fbafa1e9a89e94466"},
|
||||
"file_info": {:hex, :file_info, "0.0.4", "2e0e77f211e833f38ead22cb29ce53761d457d80b3ffe0ffe0eb93880b0963b2", [:mix], [{:mimetype_parser, "~> 0.1.2", [hex: :mimetype_parser, repo: "hexpm", optional: false]}], "hexpm", "50e7ad01c2c8b9339010675fe4dc4a113b8d6ca7eddce24d1d74fd0e762781a5"},
|
||||
"file_system": {:hex, :file_system, "0.2.10", "fb082005a9cd1711c05b5248710f8826b02d7d1784e7c3451f9c1231d4fc162d", [:mix], [], "hexpm", "41195edbfb562a593726eda3b3e8b103a309b733ad25f3d642ba49696bf715dc"},
|
||||
"floki": {:hex, :floki, "0.29.0", "b1710d8c93a2f860dc2d7adc390dd808dc2fb8f78ee562304457b75f4c640881", [:mix], [{:html_entities, "~> 0.5.0", [hex: :html_entities, repo: "hexpm", optional: false]}], "hexpm", "008585ce64b9f74c07d32958ec9866f4b8a124bf4da1e2941b28e41384edaaad"},
|
||||
"gen_smtp": {:hex, :gen_smtp, "0.15.0", "9f51960c17769b26833b50df0b96123605a8024738b62db747fece14eb2fbfcc", [:rebar3], [], "hexpm", "29bd14a88030980849c7ed2447b8db6d6c9278a28b11a44cafe41b791205440f"},
|
||||
"floki": {:hex, :floki, "0.30.0", "22ebbe681a5d3777cdd830ca091b1b806d33c3449c26312eadca7f7be685c0c8", [:mix], [{:html_entities, "~> 0.5.0", [hex: :html_entities, repo: "hexpm", optional: false]}], "hexpm", "a9e128a4ca9bb71f11affa315b6768a9ad326d5996ff1e92acf1d7a01a10076a"},
|
||||
"gen_smtp": {:hex, :gen_smtp, "1.1.0", "b0c92138f69e2f73e1eb791075e93e952efcbc231a536740749b02a1a57155a3", [:rebar3], [{:hut, "1.3.0", [hex: :hut, repo: "hexpm", optional: false]}, {:ranch, ">= 1.7.0", [hex: :ranch, repo: "hexpm", optional: false]}], "hexpm", "e53a13c4bb662331bdf4aa47f00982ef49ce2b4e5c703240542cb7b28f23546a"},
|
||||
"geo": {:hex, :geo, "3.3.7", "d0354e099bdecc4138d1e01ac4d5aee8bccdb7cb8c9f840b6eb7b5ebbc328111", [:mix], [{:jason, "~> 1.2", [hex: :jason, repo: "hexpm", optional: true]}], "hexpm", "ec57118fd9de27c52d4a046e75ee6f0ecb1cdc28cab03642228ed1aa09bb30bc"},
|
||||
"geo_postgis": {:hex, :geo_postgis, "3.3.1", "45bc96b9121d0647341685dc9d44956d61338707482d655c803500676b0413a1", [:mix], [{:geo, "~> 3.3", [hex: :geo, repo: "hexpm", optional: false]}, {:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:poison, "~> 2.2 or ~> 3.0 or ~> 4.0", [hex: :poison, repo: "hexpm", optional: true]}, {:postgrex, "~> 0.14", [hex: :postgrex, repo: "hexpm", optional: false]}], "hexpm", "3c3957d8750e3effd565f068ee658ef0e881f9a07084a23f6c5ef8262d09b8e9"},
|
||||
"geohax": {:hex, :geohax, "0.4.1", "87efd3c4bb00d9dd237cef917004b635417859f51dfe716ba0864b8c61eb7e0e", [:mix], [], "hexpm", "ce6aff24726f3824caf59aa8b903a1be99ac05820b53c23196d5ac36b13a1fa3"},
|
||||
|
@ -70,6 +70,7 @@
|
|||
"http_sign": {:hex, :http_sign, "0.1.1", "b16edb83aa282892f3271f9a048c155e772bf36e15700ab93901484c55f8dd10", [:mix], [{:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "2d4b1c2579d85534035f12c9e1260abdf6d03a9ad4f515b2ee53b50e68c8b787"},
|
||||
"http_signatures": {:hex, :http_signatures, "0.1.0", "4e4b501a936dbf4cb5222597038a89ea10781776770d2e185849fa829686b34c", [:mix], [], "hexpm", "f8a7b3731e3fd17d38fa6e343fcad7b03d6874a3b0a108c8568a71ed9c2cf824"},
|
||||
"httpoison": {:hex, :httpoison, "1.8.0", "6b85dea15820b7804ef607ff78406ab449dd78bed923a49c7160e1886e987a3d", [:mix], [{:hackney, "~> 1.17", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "28089eaa98cf90c66265b6b5ad87c59a3729bea2e74e9d08f9b51eb9729b3c3a"},
|
||||
"hut": {:hex, :hut, "1.3.0", "71f2f054e657c03f959cf1acc43f436ea87580696528ca2a55c8afb1b06c85e7", [:"erlang.mk", :rebar, :rebar3], [], "hexpm", "7e15d28555d8a1f2b5a3a931ec120af0753e4853a4c66053db354f35bf9ab563"},
|
||||
"icalendar": {:git, "https://github.com/tcitworld/icalendar.git", "e16a3a0b74e07ba79044361fbf5014bed344f2da", []},
|
||||
"idna": {:hex, :idna, "6.1.1", "8a63070e9f7d0c62eb9d9fcb360a7de382448200fbbd1b106cc96d3d8099df8d", [:rebar3], [{:unicode_util_compat, "~>0.7.0", [hex: :unicode_util_compat, repo: "hexpm", optional: false]}], "hexpm", "92376eb7894412ed19ac475e4a86f7b413c1b9fbb5bd16dccd57934157944cea"},
|
||||
"inet_cidr": {:hex, :inet_cidr, "1.0.4", "a05744ab7c221ca8e395c926c3919a821eb512e8f36547c062f62c4ca0cf3d6e", [:mix], [], "hexpm", "64a2d30189704ae41ca7dbdd587f5291db5d1dda1414e0774c29ffc81088c1bc"},
|
||||
|
@ -81,7 +82,7 @@
|
|||
"junit_formatter": {:hex, :junit_formatter, "3.1.0", "3f69c61c5413750f9c45e367d77aabbeac9b395acf478d8e70b4ee9d1989c709", [:mix], [], "hexpm", "da52401a93f711fc4f77ffabdda68f9a16fcad5d96f5fce4ae606ab1d73b72f4"},
|
||||
"linkify": {:hex, :linkify, "0.4.1", "f881eb3429ae88010cf736e6fb3eed406c187bcdd544902ec937496636b7c7b3", [:mix], [], "hexpm", "ce98693f54ae9ace59f2f7a8aed3de2ef311381a8ce7794804bd75484c371dda"},
|
||||
"makeup": {:hex, :makeup, "1.0.5", "d5a830bc42c9800ce07dd97fa94669dfb93d3bf5fcf6ea7a0c67b2e0e4a7f26c", [:mix], [{:nimble_parsec, "~> 0.5 or ~> 1.0", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "cfa158c02d3f5c0c665d0af11512fed3fba0144cf1aadee0f2ce17747fba2ca9"},
|
||||
"makeup_elixir": {:hex, :makeup_elixir, "0.15.0", "98312c9f0d3730fde4049985a1105da5155bfe5c11e47bdc7406d88e01e4219b", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "75ffa34ab1056b7e24844c90bfc62aaf6f3a37a15faa76b07bc5eba27e4a8b4a"},
|
||||
"makeup_elixir": {:hex, :makeup_elixir, "0.15.1", "b5888c880d17d1cc3e598f05cdb5b5a91b7b17ac4eaf5f297cb697663a1094dd", [:mix], [{:makeup, "~> 1.0", [hex: :makeup, repo: "hexpm", optional: false]}, {:nimble_parsec, "~> 1.1", [hex: :nimble_parsec, repo: "hexpm", optional: false]}], "hexpm", "db68c173234b07ab2a07f645a5acdc117b9f99d69ebf521821d89690ae6c6ec8"},
|
||||
"meck": {:hex, :meck, "0.8.13", "ffedb39f99b0b99703b8601c6f17c7f76313ee12de6b646e671e3188401f7866", [:rebar3], [], "hexpm", "d34f013c156db51ad57cc556891b9720e6a1c1df5fe2e15af999c84d6cebeb1a"},
|
||||
"metrics": {:hex, :metrics, "1.0.1", "25f094dea2cda98213cecc3aeff09e940299d950904393b2a29d191c346a8486", [:rebar3], [], "hexpm", "69b09adddc4f74a40716ae54d140f93beb0fb8978d8636eaded0c31b6f099f16"},
|
||||
"mime": {:hex, :mime, "1.5.0", "203ef35ef3389aae6d361918bf3f952fa17a09e8e43b5aa592b93eba05d0fb8d", [:mix], [], "hexpm", "55a94c0f552249fc1a3dd9cd2d3ab9de9d3c89b559c2bd01121f824834f24746"},
|
||||
|
@ -96,7 +97,7 @@
|
|||
"nimble_pool": {:hex, :nimble_pool, "0.1.0", "ffa9d5be27eee2b00b0c634eb649aa27f97b39186fec3c493716c2a33e784ec6", [:mix], [], "hexpm", "343a1eaa620ddcf3430a83f39f2af499fe2370390d4f785cd475b4df5acaf3f9"},
|
||||
"oauth2": {:hex, :oauth2, "2.0.0", "338382079fe16c514420fa218b0903f8ad2d4bfc0ad0c9f988867dfa246731b0", [:mix], [{:hackney, "~> 1.13", [hex: :hackney, repo: "hexpm", optional: false]}], "hexpm", "881b8364ac7385f9fddc7949379cbe3f7081da37233a1aa7aab844670a91e7e7"},
|
||||
"oauther": {:hex, :oauther, "1.1.1", "7d8b16167bb587ecbcddd3f8792beb9ec3e7b65c1f8ebd86b8dd25318d535752", [:mix], [], "hexpm", "9374f4302045321874cccdc57eb975893643bd69c3b22bf1312dab5f06e5788e"},
|
||||
"oban": {:hex, :oban, "2.4.2", "865ecb2cd598b6aefd76a816176e99e7d34cffd889e0b06241a6cfa7ac64abe1", [:mix], [{:ecto_sql, ">= 3.4.3", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.14", [hex: :postgrex, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "f56fc0caa682f7e11a9834922bdb6262f217f4d9cc8ee68bfc176e603793dabc"},
|
||||
"oban": {:hex, :oban, "2.4.3", "c0ce48be26598d0d1439e4867ac32fdc89fa7511fb0a7e61c44decafa2e36633", [:mix], [{:ecto_sql, ">= 3.4.3", [hex: :ecto_sql, repo: "hexpm", optional: false]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: false]}, {:postgrex, "~> 0.14", [hex: :postgrex, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "e864ae05d3e70bd173c822e2f177b3e3868fc7190ce33cc720d497b37131212e"},
|
||||
"parse_trans": {:hex, :parse_trans, "3.3.1", "16328ab840cc09919bd10dab29e431da3af9e9e7e7e6f0089dd5a2d2820011d8", [:rebar3], [], "hexpm", "07cd9577885f56362d414e8c4c4e6bdf10d43a8767abb92d24cbe8b24c54888b"},
|
||||
"phoenix": {:hex, :phoenix, "1.5.7", "2923bb3af924f184459fe4fa4b100bd25fa6468e69b2803dfae82698269aa5e0", [:mix], [{:jason, "~> 1.0", [hex: :jason, repo: "hexpm", optional: true]}, {:phoenix_html, "~> 2.13", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:phoenix_pubsub, "~> 2.0", [hex: :phoenix_pubsub, repo: "hexpm", optional: false]}, {:plug, "~> 1.10", [hex: :plug, repo: "hexpm", optional: false]}, {:plug_cowboy, "~> 1.0 or ~> 2.2", [hex: :plug_cowboy, repo: "hexpm", optional: true]}, {:plug_crypto, "~> 1.1.2 or ~> 1.2", [hex: :plug_crypto, repo: "hexpm", optional: false]}, {:telemetry, "~> 0.4", [hex: :telemetry, repo: "hexpm", optional: false]}], "hexpm", "774cd64417c5a3788414fdbb2be2eb9bcd0c048d9e6ad11a0c1fd67b7c0d0978"},
|
||||
"phoenix_ecto": {:hex, :phoenix_ecto, "4.2.1", "13f124cf0a3ce0f1948cf24654c7b9f2347169ff75c1123f44674afee6af3b03", [:mix], [{:ecto, "~> 3.0", [hex: :ecto, repo: "hexpm", optional: false]}, {:phoenix_html, "~> 2.14.2 or ~> 2.15", [hex: :phoenix_html, repo: "hexpm", optional: true]}, {:plug, "~> 1.0", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "478a1bae899cac0a6e02be1deec7e2944b7754c04e7d4107fc5a517f877743c0"},
|
||||
|
@ -112,7 +113,7 @@
|
|||
"ranch": {:hex, :ranch, "1.7.1", "6b1fab51b49196860b733a49c07604465a47bdb78aa10c1c16a3d199f7f8c881", [:rebar3], [], "hexpm", "451d8527787df716d99dc36162fca05934915db0b6141bbdac2ea8d3c7afc7d7"},
|
||||
"remote_ip": {:hex, :remote_ip, "0.2.1", "cd27cd8ea54ecaaf3532776ff4c5e353b3804e710302e88c01eadeaaf42e7e24", [:mix], [{:combine, "~> 0.10", [hex: :combine, repo: "hexpm", optional: false]}, {:inet_cidr, "~> 1.0", [hex: :inet_cidr, repo: "hexpm", optional: false]}, {:plug, "~> 1.5", [hex: :plug, repo: "hexpm", optional: false]}], "hexpm", "2e7ab1a461cc3cd5719f37e116a08f45c8b8493923063631b164315d6b7ee8e0"},
|
||||
"rsa_ex": {:hex, :rsa_ex, "0.4.0", "e28dd7dc5236e156df434af0e4aa822384c8866c928e17b785d4edb7c253b558", [:mix], [], "hexpm", "40e1f08e8401da4be59a6dd0f4da30c42d5bb01703161f0208d839d97db27f4e"},
|
||||
"sentry": {:hex, :sentry, "8.0.4", "6886ea584fa0dfc144dd3d8c4723570a4c0c6387a639077de34fce96b11995e2", [:mix], [{:hackney, "~> 1.8", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.6", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, "~> 2.3", [hex: :plug_cowboy, repo: "hexpm", optional: true]}], "hexpm", "781e4e0a8d4524c015f0f8d82e6bc30e6bf33df622da58d8c89d30c3cb943e67"},
|
||||
"sentry": {:hex, :sentry, "8.0.5", "5ca922b9238a50c7258b52f47364b2d545beda5e436c7a43965b34577f1ef61f", [:mix], [{:hackney, "~> 1.8", [hex: :hackney, repo: "hexpm", optional: true]}, {:jason, "~> 1.1", [hex: :jason, repo: "hexpm", optional: true]}, {:plug, "~> 1.6", [hex: :plug, repo: "hexpm", optional: true]}, {:plug_cowboy, "~> 2.3", [hex: :plug_cowboy, repo: "hexpm", optional: true]}], "hexpm", "4972839fdbf52e886d7b3e694c8adf421f764f2fa79036b88fb4742049bd4b7c"},
|
||||
"shortuuid": {:hex, :shortuuid, "2.1.2", "14dbafdb2f6c7213fdfcc05c7572384b5051a7b1621170018ad4c05504bd96c1", [:mix], [], "hexpm", "d9b0c4f37500ea5199b6275ece872e213e9f45a015caf4aa777cec84f63ad353"},
|
||||
"sitemapper": {:hex, :sitemapper, "0.5.0", "23b0bb7b3888f03d4e4e5bedb7034e6d2979e169366372d960d6f433112b9bdf", [:mix], [{:ex_aws_s3, "~> 2.0", [hex: :ex_aws_s3, repo: "hexpm", optional: true]}, {:xml_builder, "~> 2.1.1", [hex: :xml_builder, repo: "hexpm", optional: false]}], "hexpm", "be7acff8d0245aa7ca125b9c4d0751009bbbca26ef866d888fef4fdf98670e41"},
|
||||
"sleeplocks": {:hex, :sleeplocks, "1.1.1", "3d462a0639a6ef36cc75d6038b7393ae537ab394641beb59830a1b8271faeed3", [:rebar3], [], "hexpm", "84ee37aeff4d0d92b290fff986d6a95ac5eedf9b383fadfd1d88e9b84a1c02e1"},
|
||||
|
|
20
priv/repo/migrations/20210215092515_add_activity_table.exs
Normal file
20
priv/repo/migrations/20210215092515_add_activity_table.exs
Normal file
|
@ -0,0 +1,20 @@
|
|||
defmodule Mobilizon.Storage.Repo.Migrations.AddActivityTable do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:activities) do
|
||||
add(:priority, :integer, null: false)
|
||||
add(:type, :string, null: false)
|
||||
add(:author_id, references(:actors, on_delete: :delete_all), null: false)
|
||||
add(:group_id, references(:actors, on_delete: :delete_all), null: false)
|
||||
add(:subject, :string, null: false)
|
||||
add(:subject_params, :map, null: false)
|
||||
add(:message, :string)
|
||||
add(:message_params, :map)
|
||||
add(:object_type, :string)
|
||||
add(:object_id, :string)
|
||||
|
||||
timestamps(updated_at: false, type: :utc_datetime)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -0,0 +1,34 @@
|
|||
defmodule Mobilizon.Storage.Repo.Migrations.AddMemberSinceToMembers do
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
alter table(:members) do
|
||||
add(:member_since, :utc_datetime)
|
||||
end
|
||||
|
||||
flush()
|
||||
|
||||
%Postgrex.Result{rows: rows} =
|
||||
Ecto.Adapters.SQL.query!(
|
||||
Mobilizon.Storage.Repo,
|
||||
"SELECT id, role FROM members"
|
||||
)
|
||||
|
||||
Enum.each(rows, fn [id, role] ->
|
||||
if role in ["member", "moderator", "administrator", "creator"] do
|
||||
Ecto.Adapters.SQL.query!(
|
||||
Mobilizon.Storage.Repo,
|
||||
"UPDATE members SET member_since = '#{DateTime.to_iso8601(DateTime.utc_now())}' WHERE id = '#{
|
||||
Ecto.UUID.cast!(id)
|
||||
}'"
|
||||
)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
def down do
|
||||
alter table(:members) do
|
||||
remove(:member_since)
|
||||
end
|
||||
end
|
||||
end
|
260
test/graphql/resolvers/activity_test.exs
Normal file
260
test/graphql/resolvers/activity_test.exs
Normal file
|
@ -0,0 +1,260 @@
|
|||
defmodule Mobilizon.GraphQL.Resolvers.ActivityTest do
|
||||
use Mobilizon.Web.ConnCase
|
||||
|
||||
import Mobilizon.Factory
|
||||
|
||||
alias Mobilizon.{Activities, Posts}
|
||||
alias Mobilizon.Activities.Activity
|
||||
alias Mobilizon.Actors.Actor
|
||||
alias Mobilizon.Service.Activity.Event, as: EventActivity
|
||||
alias Mobilizon.Service.Activity.Post, as: PostActivity
|
||||
|
||||
alias Mobilizon.GraphQL.AbsintheHelpers
|
||||
|
||||
setup %{conn: conn} do
|
||||
group = insert(:group)
|
||||
{:ok, conn: conn, group: group}
|
||||
end
|
||||
|
||||
describe "Resolver: List activities for group" do
|
||||
@group_activities_query """
|
||||
query GroupTimeline(
|
||||
$preferredUsername: String!
|
||||
$type: ActivityType
|
||||
$page: Int
|
||||
$limit: Int
|
||||
) {
|
||||
group(preferredUsername: $preferredUsername) {
|
||||
id
|
||||
preferredUsername
|
||||
domain
|
||||
name
|
||||
activity(type: $type, page: $page, limit: $limit) {
|
||||
total
|
||||
elements {
|
||||
id
|
||||
insertedAt
|
||||
subject
|
||||
subjectParams {
|
||||
key
|
||||
value
|
||||
}
|
||||
type
|
||||
author {
|
||||
id
|
||||
preferredUsername
|
||||
name
|
||||
domain
|
||||
avatar {
|
||||
id
|
||||
url
|
||||
}
|
||||
}
|
||||
group {
|
||||
id
|
||||
preferredUsername
|
||||
}
|
||||
object {
|
||||
... on Event {
|
||||
id
|
||||
title
|
||||
}
|
||||
... on Post {
|
||||
id
|
||||
title
|
||||
}
|
||||
... on Member {
|
||||
id
|
||||
actor {
|
||||
id
|
||||
name
|
||||
preferredUsername
|
||||
domain
|
||||
avatar {
|
||||
id
|
||||
url
|
||||
}
|
||||
}
|
||||
}
|
||||
... on Resource {
|
||||
id
|
||||
title
|
||||
path
|
||||
type
|
||||
}
|
||||
... on Discussion {
|
||||
id
|
||||
title
|
||||
slug
|
||||
}
|
||||
... on Group {
|
||||
id
|
||||
preferredUsername
|
||||
domain
|
||||
name
|
||||
summary
|
||||
visibility
|
||||
openness
|
||||
physicalAddress {
|
||||
id
|
||||
}
|
||||
banner {
|
||||
id
|
||||
}
|
||||
avatar {
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
test "without being logged-in", %{
|
||||
conn: conn,
|
||||
group: %Actor{preferred_username: preferred_username}
|
||||
} do
|
||||
res =
|
||||
conn
|
||||
|> AbsintheHelpers.graphql_query(
|
||||
query: @group_activities_query,
|
||||
variables: %{preferredUsername: preferred_username}
|
||||
)
|
||||
|
||||
assert hd(res["errors"])["message"] == "unauthenticated"
|
||||
end
|
||||
|
||||
test "without being a member", %{
|
||||
conn: conn,
|
||||
group: %Actor{preferred_username: preferred_username}
|
||||
} do
|
||||
user = insert(:user)
|
||||
insert(:actor, user: user)
|
||||
|
||||
res =
|
||||
conn
|
||||
|> auth_conn(user)
|
||||
|> AbsintheHelpers.graphql_query(
|
||||
query: @group_activities_query,
|
||||
variables: %{preferredUsername: preferred_username}
|
||||
)
|
||||
|
||||
assert hd(res["errors"])["message"] == "unauthorized"
|
||||
end
|
||||
|
||||
test "without being a validated member", %{
|
||||
conn: conn,
|
||||
group: %Actor{preferred_username: preferred_username} = group
|
||||
} do
|
||||
user = insert(:user)
|
||||
actor = insert(:actor, user: user)
|
||||
insert(:member, parent: group, actor: actor, role: :not_approved)
|
||||
|
||||
res =
|
||||
conn
|
||||
|> auth_conn(user)
|
||||
|> AbsintheHelpers.graphql_query(
|
||||
query: @group_activities_query,
|
||||
variables: %{preferredUsername: preferred_username}
|
||||
)
|
||||
|
||||
assert hd(res["errors"])["message"] == "unauthorized"
|
||||
end
|
||||
|
||||
test "group_activity/3 list group activities", %{
|
||||
conn: conn,
|
||||
group: %Actor{preferred_username: preferred_username, id: group_id} = group
|
||||
} do
|
||||
user = insert(:user)
|
||||
actor = insert(:actor, user: user)
|
||||
|
||||
insert(:member,
|
||||
parent: group,
|
||||
actor: actor,
|
||||
role: :member,
|
||||
member_since: DateTime.truncate(DateTime.utc_now(), :second)
|
||||
)
|
||||
|
||||
event = insert(:event, attributed_to: group, organizer_actor: actor)
|
||||
EventActivity.insert_activity(event, subject: "event_created")
|
||||
assert %{success: 1, failure: 0} == Oban.drain_queue(queue: :activity)
|
||||
assert Activities.list_activities() |> length() == 1
|
||||
|
||||
[%Activity{author_id: author_id, group_id: activity_group_id}] =
|
||||
Activities.list_activities()
|
||||
|
||||
assert author_id == actor.id
|
||||
assert activity_group_id == group_id
|
||||
|
||||
res =
|
||||
conn
|
||||
|> auth_conn(user)
|
||||
|> AbsintheHelpers.graphql_query(
|
||||
query: @group_activities_query,
|
||||
variables: %{preferredUsername: preferred_username}
|
||||
)
|
||||
|
||||
assert res["errors"] == nil
|
||||
assert res["data"]["group"]["id"] == to_string(group_id)
|
||||
assert res["data"]["group"]["activity"]["total"] == 1
|
||||
activity = hd(res["data"]["group"]["activity"]["elements"])
|
||||
assert activity["object"]["id"] == to_string(event.id)
|
||||
assert activity["subject"] == "event_created"
|
||||
|
||||
assert Enum.find(activity["subjectParams"], &(&1["key"] == "event_title"))["value"] ==
|
||||
event.title
|
||||
|
||||
assert Enum.find(activity["subjectParams"], &(&1["key"] == "event_uuid"))["value"] ==
|
||||
event.uuid
|
||||
end
|
||||
|
||||
test "group_activity/3 list group activities from deleted object", %{
|
||||
conn: conn,
|
||||
group: %Actor{preferred_username: preferred_username, id: group_id} = group
|
||||
} do
|
||||
user = insert(:user)
|
||||
actor = insert(:actor, user: user)
|
||||
|
||||
insert(:member,
|
||||
parent: group,
|
||||
actor: actor,
|
||||
role: :member,
|
||||
member_since: DateTime.truncate(DateTime.utc_now(), :second)
|
||||
)
|
||||
|
||||
post = insert(:post, attributed_to: group, author: actor)
|
||||
PostActivity.insert_activity(post, subject: "post_created")
|
||||
Process.sleep(1000)
|
||||
Posts.delete_post(post)
|
||||
PostActivity.insert_activity(post, subject: "post_deleted")
|
||||
assert %{success: 2, failure: 0} == Oban.drain_queue(queue: :activity)
|
||||
assert Activities.list_activities() |> length() == 2
|
||||
|
||||
res =
|
||||
conn
|
||||
|> auth_conn(user)
|
||||
|> AbsintheHelpers.graphql_query(
|
||||
query: @group_activities_query,
|
||||
variables: %{preferredUsername: preferred_username}
|
||||
)
|
||||
|
||||
assert res["errors"] == nil
|
||||
assert res["data"]["group"]["id"] == to_string(group_id)
|
||||
assert res["data"]["group"]["activity"]["total"] == 2
|
||||
[delete_activity, create_activity] = res["data"]["group"]["activity"]["elements"]
|
||||
assert create_activity["object"] == nil
|
||||
assert create_activity["subject"] == "post_created"
|
||||
|
||||
assert Enum.find(create_activity["subjectParams"], &(&1["key"] == "post_title"))["value"] ==
|
||||
post.title
|
||||
|
||||
assert Enum.find(create_activity["subjectParams"], &(&1["key"] == "post_slug"))["value"] ==
|
||||
post.slug
|
||||
|
||||
assert delete_activity["object"] == nil
|
||||
assert delete_activity["subject"] == "post_deleted"
|
||||
end
|
||||
end
|
||||
end
|
91
test/mobilizon/activities_test.exs
Normal file
91
test/mobilizon/activities_test.exs
Normal file
|
@ -0,0 +1,91 @@
|
|||
defmodule Mobilizon.ActivitiesTest do
|
||||
use Mobilizon.DataCase
|
||||
|
||||
alias Mobilizon.Activities
|
||||
import Mobilizon.Factory
|
||||
|
||||
describe "activities" do
|
||||
alias Mobilizon.Activities.Activity
|
||||
|
||||
@valid_attrs %{
|
||||
message: "some message",
|
||||
message_params: %{},
|
||||
type: "event",
|
||||
object_id: "some object_id",
|
||||
subject: "event_created",
|
||||
subject_params: %{}
|
||||
}
|
||||
|
||||
@invalid_attrs %{
|
||||
message: nil,
|
||||
object_id: nil,
|
||||
subject: nil
|
||||
}
|
||||
|
||||
setup do
|
||||
actor = insert(:actor)
|
||||
group = insert(:group)
|
||||
{:ok, actor: actor, group: group}
|
||||
end
|
||||
|
||||
def activity_fixture(attrs \\ %{}) do
|
||||
{:ok, activity} =
|
||||
attrs
|
||||
|> Enum.into(@valid_attrs)
|
||||
|> Activities.create_activity()
|
||||
|
||||
activity
|
||||
end
|
||||
|
||||
test "list_activities/0 returns all activities", %{actor: actor, group: group} do
|
||||
activity =
|
||||
activity_fixture(%{
|
||||
group_id: group.id,
|
||||
author_id: actor.id,
|
||||
inserted_at: DateTime.utc_now()
|
||||
})
|
||||
|
||||
assert Activities.list_activities() == [activity]
|
||||
end
|
||||
|
||||
test "get_activity!/1 returns the activity with given id", %{actor: actor, group: group} do
|
||||
activity =
|
||||
activity_fixture(%{
|
||||
author_id: actor.id,
|
||||
group_id: group.id,
|
||||
inserted_at: DateTime.utc_now()
|
||||
})
|
||||
|
||||
assert Activities.get_activity!(activity.id) == activity
|
||||
end
|
||||
|
||||
test "create_activity/1 with valid data creates a activity", %{actor: actor, group: group} do
|
||||
assert {:ok, %Activity{} = activity} =
|
||||
Activities.create_activity(
|
||||
@valid_attrs
|
||||
|> Map.put(:group_id, group.id)
|
||||
|> Map.put(:author_id, actor.id)
|
||||
|> Map.put(:inserted_at, DateTime.utc_now())
|
||||
)
|
||||
|
||||
assert activity.message == "some message"
|
||||
assert activity.message_params == %{}
|
||||
assert activity.object_id == "some object_id"
|
||||
assert activity.subject == :event_created
|
||||
assert activity.subject_params == %{}
|
||||
end
|
||||
|
||||
test "create_activity/1 with invalid data returns error changeset", %{
|
||||
actor: actor,
|
||||
group: group
|
||||
} do
|
||||
assert {:error, %Ecto.Changeset{}} =
|
||||
Activities.create_activity(
|
||||
@invalid_attrs
|
||||
|> Map.put(:author_id, actor.id)
|
||||
|> Map.put(:group_id, group.id)
|
||||
|> Map.put(:inserted_at, DateTime.utc_now())
|
||||
)
|
||||
end
|
||||
end
|
||||
end
|
|
@ -409,4 +409,20 @@ defmodule Mobilizon.Factory do
|
|||
url: Routes.page_url(Endpoint, :discussion, group.preferred_username, slug)
|
||||
}
|
||||
end
|
||||
|
||||
def mobilizon_activity_factory do
|
||||
group = build(:group)
|
||||
actor = build(:actor)
|
||||
event = build(:event, organizer_actor: actor, attributed_to: group)
|
||||
|
||||
%Mobilizon.Activities.Activity{
|
||||
type: :event,
|
||||
subject: :event_created,
|
||||
subject_params: %{event: event},
|
||||
author: actor,
|
||||
group: group,
|
||||
object_type: :event,
|
||||
object_id: to_string(event.id)
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue