diff --git a/js/dist-typings/@types/shims.d.ts b/js/dist-typings/@types/shims.d.ts new file mode 100644 index 0000000..81591a4 --- /dev/null +++ b/js/dist-typings/@types/shims.d.ts @@ -0,0 +1,31 @@ +import 'flarum/forum/ForumApplication'; +import 'flarum/common/models/User'; +import 'flarum/forum/components/SettingsPage'; + +declare module 'flarum/forum/ForumApplication' { + import ErasureRequestsListState from '../forum/states/ErasureRequestsListState'; + + export default interface ForumApplication { + erasureRequests: ErasureRequestsListState; + } +} + +declare module 'flarum/common/models/User' { + import User from 'flarum/common/models/User'; + import ErasureRequest from '../../common/models/ErasureRequest'; + + export default interface User { + canModerateExports(): boolean; + anonymized(): boolean; + erasureRequest: ErasureRequest; + } +} + +declare module 'flarum/forum/components/SettingsPage' { + import ItemList from 'flarum/common/utils/ItemList'; + import Mithril from 'mithril'; + + export default interface SettingsPage { + dataItems(): ItemList; + } +} diff --git a/js/dist-typings/admin/GdprPage.d.ts b/js/dist-typings/admin/components/GdprPage.d.ts similarity index 91% rename from js/dist-typings/admin/GdprPage.d.ts rename to js/dist-typings/admin/components/GdprPage.d.ts index b352c3c..a7be096 100644 --- a/js/dist-typings/admin/GdprPage.d.ts +++ b/js/dist-typings/admin/components/GdprPage.d.ts @@ -1,7 +1,7 @@ import AdminPage, { AdminHeaderAttrs } from 'flarum/admin/components/AdminPage'; import type { IPageAttrs } from 'flarum/common/components/Page'; import type Mithril from 'mithril'; -import DataType from './models/DataType'; +import DataType from '../models/DataType'; export default class GdprPage extends AdminPage { gdprDataTypes: DataType[]; oninit(vnode: Mithril.Vnode): void; diff --git a/js/dist-typings/admin/extend.d.ts b/js/dist-typings/admin/extend.d.ts index 28e9d3b..1774816 100644 --- a/js/dist-typings/admin/extend.d.ts +++ b/js/dist-typings/admin/extend.d.ts @@ -1,2 +1,2 @@ -declare const _default: (import("flarum/common/extenders/Model").default | import("flarum/common/extenders/Routes").default | import("flarum/common/extenders/Store").default)[]; +declare const _default: (import("flarum/common/extenders/Store").default | import("flarum/common/extenders/Model").default | import("flarum/common/extenders/Routes").default | import("flarum/common/extenders/Admin").default)[]; export default _default; diff --git a/js/dist-typings/common/components/RequestDataExportModal.d.ts b/js/dist-typings/common/components/RequestDataExportModal.d.ts index 022999e..dd0a6a8 100644 --- a/js/dist-typings/common/components/RequestDataExportModal.d.ts +++ b/js/dist-typings/common/components/RequestDataExportModal.d.ts @@ -1,4 +1,3 @@ -/// import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal'; import User from 'flarum/common/models/User'; import type Mithril from 'mithril'; @@ -9,7 +8,7 @@ export default class RequestDataExportModal extends Modal): void; className(): string; - title(): import("@askvortsov/rich-icu-message-formatter").NestedStringArray; + title(): any[]; content(): JSX.Element; requestExport(): void; } diff --git a/js/dist-typings/common/extend.d.ts b/js/dist-typings/common/extend.d.ts index cdea373..7e0f68f 100644 --- a/js/dist-typings/common/extend.d.ts +++ b/js/dist-typings/common/extend.d.ts @@ -1,2 +1,2 @@ -declare const _default: (import("flarum/common/extenders/Model").default | import("flarum/common/extenders/Store").default)[]; +declare const _default: (import("flarum/common/extenders/Store").default | import("flarum/common/extenders/Model").default)[]; export default _default; diff --git a/js/dist-typings/forum/components/DeleteUserModal.d.ts b/js/dist-typings/forum/components/DeleteUserModal.d.ts index 15d9671..542ebef 100644 --- a/js/dist-typings/forum/components/DeleteUserModal.d.ts +++ b/js/dist-typings/forum/components/DeleteUserModal.d.ts @@ -1,4 +1,3 @@ -/// import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal'; import User from 'flarum/common/models/User'; import type Mithril from 'mithril'; @@ -11,7 +10,7 @@ export default class DeleteUserModal extends Modal { loadingDeletion: boolean; oninit(vnode: Mithril.Vnode): void; className(): string; - title(): import("@askvortsov/rich-icu-message-formatter").NestedStringArray; + title(): any[]; content(): JSX.Element; defaultErasure(): void; specificErasure(mode: string): void; diff --git a/js/dist-typings/forum/components/ErasureRequestsDropdown.d.ts b/js/dist-typings/forum/components/ErasureRequestsDropdown.d.ts index 4c6117e..0add5f5 100644 --- a/js/dist-typings/forum/components/ErasureRequestsDropdown.d.ts +++ b/js/dist-typings/forum/components/ErasureRequestsDropdown.d.ts @@ -7,9 +7,9 @@ interface ErasureRequestsDropdownAttrs extends IDropdownAttrs { } export default class ErasureRequestsDropdown extends NotificationsDropdown { static initAttrs(attrs: ErasureRequestsDropdownAttrs): void; - getMenu(): JSX.Element; + getContent(): JSX.Element; goToRoute(): void; - getUnreadCount(): number | undefined; - getNewCount(): number | undefined; + getUnreadCount(): number; + getNewCount(): number; } export {}; diff --git a/js/dist-typings/forum/components/ErasureRequestsList.d.ts b/js/dist-typings/forum/components/ErasureRequestsList.d.ts index d25f019..51d368e 100644 --- a/js/dist-typings/forum/components/ErasureRequestsList.d.ts +++ b/js/dist-typings/forum/components/ErasureRequestsList.d.ts @@ -1,6 +1,14 @@ -export default class ErasureRequestsList extends Component { - constructor(); +/// +import Component, { type ComponentAttrs } from 'flarum/common/Component'; +import ItemList from 'flarum/common/utils/ItemList'; +import type ErasureRequestsListState from '../states/ErasureRequestsListState'; +import type ErasureRequest from '../../common/models/ErasureRequest'; +export interface IErasureRequestsListAttrs extends ComponentAttrs { + state: ErasureRequestsListState; +} +export default class ErasureRequestsList extends Component { view(): JSX.Element; - showModal(request: any): void; + showModal(request: ErasureRequest): void; + controlItems(): ItemList; + content(state: ErasureRequestsListState): JSX.Element[][] | null; } -import Component from "flarum/common/Component"; diff --git a/js/dist-typings/forum/components/ExportAvailableNotification.d.ts b/js/dist-typings/forum/components/ExportAvailableNotification.d.ts index 2eb2932..31b85ff 100644 --- a/js/dist-typings/forum/components/ExportAvailableNotification.d.ts +++ b/js/dist-typings/forum/components/ExportAvailableNotification.d.ts @@ -1,8 +1,7 @@ -/// import Notification from 'flarum/forum/components/Notification'; export default class ExportAvailableNotification extends Notification { icon(): string; href(): string; - content(): import("@askvortsov/rich-icu-message-formatter").NestedStringArray; + content(): any[]; excerpt(): null; } diff --git a/js/dist-typings/forum/components/ProcessErasureRequestModal.d.ts b/js/dist-typings/forum/components/ProcessErasureRequestModal.d.ts index bf602a1..c80b6b9 100644 --- a/js/dist-typings/forum/components/ProcessErasureRequestModal.d.ts +++ b/js/dist-typings/forum/components/ProcessErasureRequestModal.d.ts @@ -1,22 +1,21 @@ -/// -import Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal'; +import type { IInternalModalAttrs } from 'flarum/common/components/Modal'; import ItemList from 'flarum/common/utils/ItemList'; import Stream from 'flarum/common/utils/Stream'; import type Mithril from 'mithril'; import ErasureRequest from 'src/common/models/ErasureRequest'; -interface ProcessErasureRequestModalAttrs extends IInternalModalAttrs { +import FormModal from 'flarum/common/components/FormModal'; +export interface IProcessErasureRequestModalAttrs extends IInternalModalAttrs { request: ErasureRequest; } -export default class ProcessErasureRequestModal extends Modal { +export default class ProcessErasureRequestModal extends FormModal { comments: Stream; loadingAnonymization: boolean; loadingDeletion: boolean; request: ErasureRequest; - oninit(vnode: Mithril.Vnode): void; + oninit(vnode: Mithril.Vnode): void; className(): string; - title(): import("@askvortsov/rich-icu-message-formatter").NestedStringArray; + title(): string | any[]; content(): JSX.Element; fields(): ItemList; process(mode: string): void; } -export {}; diff --git a/js/dist-typings/forum/components/RequestErasureModal.d.ts b/js/dist-typings/forum/components/RequestErasureModal.d.ts index 233e137..c0d70c7 100644 --- a/js/dist-typings/forum/components/RequestErasureModal.d.ts +++ b/js/dist-typings/forum/components/RequestErasureModal.d.ts @@ -1,21 +1,20 @@ -/// -export default class RequestErasureModal extends Modal { - constructor(); - oninit(vnode: any): void; - reason: any; - password: any; - title(): import("@askvortsov/rich-icu-message-formatter").NestedStringArray; +import FormModal from 'flarum/common/components/FormModal'; +import ItemList from 'flarum/common/utils/ItemList'; +import Stream from 'flarum/common/utils/Stream'; +import type Mithril from 'mithril'; +import type User from 'flarum/common/models/User'; +export default class RequestErasureModal extends FormModal { + reason: Stream; + password: Stream; + user: User | null; + oninit(vnode: Mithril.Vnode): void; + className(): string; + title(): string | any[]; content(): JSX.Element; - fields(): ItemList; - oncancel(e: any): void; + fields(): ItemList; + oncancel(e: Event): void; data(): { reason: any; - status: string; - relationships: { - user: import("flarum/common/models/User").default | null; - }; }; - onsubmit(e: any): void; + onsubmit(e: Event): void; } -import Modal from "flarum/common/components/Modal"; -import ItemList from "flarum/common/utils/ItemList"; diff --git a/js/dist-typings/forum/extend.d.ts b/js/dist-typings/forum/extend.d.ts index 28e9d3b..1599830 100644 --- a/js/dist-typings/forum/extend.d.ts +++ b/js/dist-typings/forum/extend.d.ts @@ -1,2 +1,2 @@ -declare const _default: (import("flarum/common/extenders/Model").default | import("flarum/common/extenders/Routes").default | import("flarum/common/extenders/Store").default)[]; +declare const _default: (import("flarum/common/extenders/Store").default | import("flarum/common/extenders/Model").default | import("flarum/common/extenders/Routes").default | import("flarum/common/extenders/Notification").default)[]; export default _default; diff --git a/js/dist-typings/forum/addAnonymousBadges.d.ts b/js/dist-typings/forum/extenders/addAnonymousBadges.d.ts similarity index 100% rename from js/dist-typings/forum/addAnonymousBadges.d.ts rename to js/dist-typings/forum/extenders/addAnonymousBadges.d.ts diff --git a/js/dist-typings/forum/states/ErasureRequestsListState.d.ts b/js/dist-typings/forum/states/ErasureRequestsListState.d.ts index c993faf..26103c1 100644 --- a/js/dist-typings/forum/states/ErasureRequestsListState.d.ts +++ b/js/dist-typings/forum/states/ErasureRequestsListState.d.ts @@ -1,5 +1,11 @@ -export default class ErasureRequestsListState { - loading: boolean; - requestsLoaded: boolean; - load(): void; +import PaginatedListState from 'flarum/common/states/PaginatedListState'; +import type ErasureRequest from '../../common/models/ErasureRequest'; +export default class ErasureRequestsListState extends PaginatedListState { + constructor(); + get type(): string; + /** + * Load flags into the application's cache if they haven't already + * been loaded. + */ + load(): Promise; } diff --git a/js/dist/admin.js b/js/dist/admin.js index 51ceefe..f7fc21d 100644 --- a/js/dist/admin.js +++ b/js/dist/admin.js @@ -1,2 +1,2 @@ -(()=>{var t={n:r=>{var e=r&&r.__esModule?()=>r.default:()=>r;return t.d(e,{a:e}),e},d:(r,e)=>{for(var a in e)t.o(e,a)&&!t.o(r,a)&&Object.defineProperty(r,a,{enumerable:!0,get:e[a]})},o:(t,r)=>Object.prototype.hasOwnProperty.call(t,r),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},r={};(()=>{"use strict";t.r(r),t.d(r,{extend:()=>W});const e=flarum.core.compat["admin/app"];var a=t.n(e);const n=flarum.core.compat["common/extend"],o=flarum.core.compat["admin/components/UserListPage"];var s=t.n(o);const i=flarum.core.compat["common/utils/ItemList"];var l=t.n(i);const d=flarum.core.compat["common/components/Tooltip"];var p=t.n(d);const c=flarum.core.compat["common/components/Button"];var u=t.n(c);const g=flarum.core.compat["common/helpers/username"];var f=t.n(g);function h(t,r){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,r){return t.__proto__=r,t},h(t,r)}function b(t,r){t.prototype=Object.create(r.prototype),t.prototype.constructor=t,h(t,r)}const y=flarum.core.compat["common/app"];var _=t.n(y);const v=flarum.core.compat["common/components/Modal"];var x=t.n(v);const N=flarum.core.compat["common/helpers/avatar"];var D=t.n(N),G=function(t){function r(){for(var r,e=arguments.length,a=new Array(e),n=0;n{var e={n:t=>{var r=t&&t.__esModule?()=>t.default:()=>t;return e.d(r,{a:r}),r},d:(t,r)=>{for(var a in r)e.o(r,a)&&!e.o(t,a)&&Object.defineProperty(t,a,{enumerable:!0,get:r[a]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};(()=>{"use strict";e.r(t),e.d(t,{extend:()=>W});const r=flarum.reg.get("core","admin/app");var a=e.n(r);const n=flarum.reg.get("core","common/extend"),s=flarum.reg.get("core","admin/components/UserListPage");var o=e.n(s);const i=flarum.reg.get("core","common/components/Button");var l=e.n(i);const d=flarum.reg.get("core","common/helpers/username");var p=e.n(d);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function c(e,t,r){return(t=function(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}const g=flarum.reg.get("core","common/components/Form");var f=e.n(g);const h=flarum.reg.get("core","common/app");var y=e.n(h);const _=flarum.reg.get("core","common/components/Modal");var b=e.n(_);const x=flarum.reg.get("core","common/components/Avatar");var v=e.n(x);class N extends(b()){constructor(){super(...arguments),c(this,"user",void 0)}oninit(e){super.oninit(e),this.user=this.attrs.user}className(){return"RequestDataModal Modal--small"}title(){return y().translator.trans("flarum-gdpr.lib.request_data.title",{username:p()(this.user)})}content(){return m("div",{className:"Modal-body"},m(f(),{className:"Form--centered"},m("div",{className:"User"},m(v(),{user:this.user})),m("p",{className:"helpText"},y().translator.trans("flarum-gdpr.lib.request_data.text")),m("div",{className:"Form-group"},m(l(),{className:"Button Button--primary Button--block",onclick:()=>this.requestExport(),loading:this.loading,disabled:this.loading},y().translator.trans("flarum-gdpr.lib.request_data.request_button")))))}requestExport(){this.loading=!0,y().request({method:"POST",url:y().forum.attribute("apiUrl")+"/gdpr-exports",body:{data:{attributes:{userId:this.user.id()}}}}).then(this.hide.bind(this),this.loaded.bind(this))}}flarum.reg.add("flarum-gdpr","common/components/RequestDataExportModal",N);const D=flarum.reg.get("core","admin/components/AdminNav");var G=e.n(D);const w=flarum.reg.get("core","common/components/LinkButton");var T=e.n(w);const A=flarum.reg.get("core","common/extenders");var S=e.n(A);const M=flarum.reg.get("core","common/models/User");var z=e.n(M);const E=flarum.reg.get("core","common/Model");var P=e.n(E);class q extends(P()){status(){return P().attribute("status").call(this)}reason(){return P().attribute("reason").call(this)}createdAt(){return P().attribute("createdAt",P().transformDate).call(this)}userConfirmedAt(){return P().attribute("userConfirmedAt",P().transformDate).call(this)}processedAt(){return P().attribute("processedAt",P().transformDate).call(this)}processorComment(){return P().attribute("processorComment").call(this)}processedMode(){return P().attribute("processedMode").call(this)}user(){return P().hasOne("user").call(this)}processedBy(){return P().hasOne("processedBy").call(this)}}flarum.reg.add("flarum-gdpr","common/models/ErasureRequest",q);class O extends(P()){file(){return P().attribute("file").call(this)}createdAt(){return P().attribute("createdAt",P().transformDate)}destroysAt(){return P().attribute("destroysAt",P().transformDate)}user(){return P().hasOne("user")}actor(){return P().hasOne("actor")}}flarum.reg.add("flarum-gdpr","common/models/Export",O);const B=[(new(S().Store)).add("user-erasure-requests",q).add("gdpr-exports",O),new(S().Model)(z()).attribute("canModerateExports").attribute("anonymized").hasOne("erasureRequest")],j=flarum.reg.get("core","admin/components/AdminPage");var I=e.n(j);const C=flarum.reg.get("core","common/components/LoadingIndicator");var U=e.n(C);const k=flarum.reg.get("core","common/components/Tooltip");var R=e.n(k);const F=flarum.reg.get("core","common/Component");var L=e.n(F);const H=flarum.reg.get("core","common/components/Icon");var J=e.n(H);class K extends(L()){view(){const{extension:e}=this.attrs;return e?m(R(),{text:e.extra["flarum-extension"].title},m(T(),{href:a().route("extension",{id:e.id})},m("span",{className:"ExtensionIcon ExtensionIcon--gdpr",style:e.icon},!!e.icon&&m(J(),{name:e.icon.name})))):null}}flarum.reg.add("flarum-gdpr","admin/components/ExtensionLink",K);class Q extends(I()){constructor(){super(...arguments),c(this,"gdprDataTypes",[])}oninit(e){super.oninit(e),this.loadGdprDataTypes()}headerInfo(){return{className:"GdprPage--header",icon:"fas fa-user-shield",title:a().translator.trans("flarum-gdpr.admin.gdpr_page.heading"),description:a().translator.trans("flarum-gdpr.admin.gdpr_page.description")}}loadGdprDataTypes(){this.loading=!0,a().store.find("gdpr-datatypes").then((e=>{this.gdprDataTypes=e,this.loading=!1,m.redraw()}))}content(){return this.loading?m(U(),null):m("div",{className:"GdprPage"},m("h3",null,a().translator.trans("flarum-gdpr.admin.gdpr_page.settings.heading")),m("p",{className:"helpText"},a().translator.trans("flarum-gdpr.admin.gdpr_page.settings.help_text")),m(T(),{className:"Button",href:a().route("extension",{id:"flarum-gdpr"})},a().translator.trans("flarum-gdpr.admin.gdpr_page.settings.extension_settings_button")),m("hr",null),m("h3",null,a().translator.trans("flarum-gdpr.admin.gdpr_page.data_types.title")),m("p",{className:"helpText"},a().translator.trans("flarum-gdpr.admin.gdpr_page.data_types.help_text")),m("div",{className:"GdprGrid"},m("div",{class:"GdprGrid-row"},m("div",{className:"GdprGrid-header"},a().translator.trans("flarum-gdpr.admin.gdpr_page.data_types.type")),m("div",{className:"GdprGrid-header"},a().translator.trans("flarum-gdpr.admin.gdpr_page.data_types.export_description")),m("div",{className:"GdprGrid-header"},a().translator.trans("flarum-gdpr.admin.gdpr_page.data_types.anonymize_description")),m("div",{className:"GdprGrid-header"},a().translator.trans("flarum-gdpr.admin.gdpr_page.data_types.delete_description")),m("div",{className:"GdprGrid-header"},a().translator.trans("flarum-gdpr.admin.gdpr_page.data_types.extension"))),this.gdprDataTypes.map((e=>m("[",null,m("div",{class:"GdprGrid-row"},m("div",null,m(R(),{text:e.id()},m("span",{className:"helpText"},e.type()))),m("div",{className:"helpText"},e.exportDescription()),m("div",{className:"helpText"},e.anonymizeDescription()),m("div",{className:"helpText"},e.deleteDescription()),m("div",null,m(K,{extension:e.extension()?a().data.extensions[e.extension()]:null}))))))),m("hr",null),m("h3",null,a().translator.trans("flarum-gdpr.admin.gdpr_page.user_table_data.title")),m("p",{className:"helpText"},a().translator.trans("flarum-gdpr.admin.gdpr_page.user_table_data.help_text")),m("div",{className:"GdprUserColumnData"},"Not yet implemented"))}}flarum.reg.add("flarum-gdpr","admin/components/GdprPage",Q);class V extends(P()){type(){return P().attribute("type").call(this)}exportDescription(){return P().attribute("exportDescription").call(this)}anonymizeDescription(){return P().attribute("anonymizeDescription").call(this)}deleteDescription(){return P().attribute("deleteDescription").call(this)}extension(){return P().attribute("extension").call(this)}}flarum.reg.add("flarum-gdpr","admin/models/DataType",V);const W=[...B,(new(S().Routes)).add("gdpr","/gdpr",Q),(new(S().Store)).add("gdpr-datatypes",V),(new(S().Admin)).setting((()=>function(){return m("div",{className:"Form-group"},m("h3",null,a().translator.trans("flarum-gdpr.admin.settings.gdpr_page.title")),m("p",{className:"helpText"},a().translator.trans("flarum-gdpr.admin.settings.gdpr_page.help_text")),m(T(),{href:a().route("gdpr"),icon:"fas fa-user-shield",className:"Button"},a().translator.trans("flarum-gdpr.admin.nav.gdpr_button")))})).setting((()=>({setting:"flarum-gdpr.allow-anonymization",label:a().translator.trans("flarum-gdpr.admin.settings.allow_anonymization"),help:a().translator.trans("flarum-gdpr.admin.settings.allow_anonymization_help"),type:"boolean"}))).setting((()=>({setting:"flarum-gdpr.allow-deletion",label:a().translator.trans("flarum-gdpr.admin.settings.allow_deletion"),help:a().translator.trans("flarum-gdpr.admin.settings.allow_deletion_help"),type:"boolean"}))).setting((()=>({setting:"flarum-gdpr.default-erasure",label:a().translator.trans("flarum-gdpr.admin.settings.default_erasure"),help:a().translator.trans("flarum-gdpr.admin.settings.default_erasure_help"),type:"select",options:{anonymization:a().translator.trans("flarum-gdpr.admin.settings.default_erasure_options.anonymization"),deletion:a().translator.trans("flarum-gdpr.admin.settings.default_erasure_options.deletion")}}))).setting((()=>({setting:"flarum-gdpr.default-anonymous-username",type:"string",label:a().translator.trans("flarum-gdpr.admin.settings.default_anonymous_username"),help:a().translator.trans("flarum-gdpr.admin.settings.default_anonymous_username_help")}))).permission((()=>({icon:"fas fa-user-minus",label:a().translator.trans("flarum-gdpr.admin.permissions.process_erasure"),permission:"processErasure"})),"moderate").permission((()=>({icon:"fas fa-file-export",label:a().translator.trans("flarum-gdpr.admin.permissions.process_export_for_others"),permission:"moderateExport"})),"moderate").permission((()=>({icon:"fas fa-eye",label:a().translator.trans("flarum-gdpr.admin.permissions.see_anonymized_user_badges"),permission:"seeAnonymizedUserBadges",allowGuest:!0})),"view")];a().initializers.add("flarum-gdpr",(()=>{a().registry.for("flarum-gdpr"),(0,n.extend)(o().prototype,"userActionItems",(function(e,t){t.canModerateExports()&&e.add("export-data",m(l(),{className:"Button",icon:"fas fa-file-export",onclick:()=>a().modal.show(N,{user:t})},a().translator.trans("flarum-gdpr.admin.userlist.columns.gdpr_actions.export",{username:p()(t)})))})),(0,n.extend)(G().prototype,"items",(function(e){e.add("gdpr",m(T(),{href:a().route("gdpr"),icon:"fas fa-user-shield",title:a().translator.trans("flarum-gdpr.admin.gdpr.title")},a().translator.trans("flarum-gdpr.admin.nav.gdpr_button")),48)}))}))})(),module.exports=t})(); //# sourceMappingURL=admin.js.map \ No newline at end of file diff --git a/js/dist/admin.js.map b/js/dist/admin.js.map index 86f8e74..225c776 100644 --- a/js/dist/admin.js.map +++ b/js/dist/admin.js.map @@ -1 +1 @@ -{"version":3,"file":"admin.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAA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G,YAAYlG,GAAMmG,UAC9D,GAEF,GAEJ,IAEAH,IAAAA,UAAuBE,YAAc,SAAUlG,GAC7C,IAAMoG,EAAQ,IAAIC,KAWlB,OATIrG,EAAKsG,sBACPF,EAAMpD,IACJ,cACAnC,EAAC0C,IAAO,CAACC,KAAMhD,IAAAA,WAAeC,MAAM,2DAA4D,CAAEC,SAAUA,IAASV,MACnHa,EAACE,IAAM,CAACT,UAAU,sBAAsBuD,KAAK,qBAAqB7C,QAAS,kBAAMR,IAAAA,MAAU+F,KAAKlH,EAAwB,CAAEW,KAAMA,GAAO,MAKtIoG,CACT,GCzCAf,EAAAA,EAAAA,QAAOmB,IAAAA,UAAoB,SAAS,SAAUJ,GAC5CA,EAAMpD,IACJ,OACAnC,EAAC6C,IAAU,CAACC,KAAMnD,IAAAA,MAAU,QAASqD,KAAK,qBAAqBtD,MAAOC,IAAAA,WAAeC,MAAM,mCACxFD,IAAAA,WAAeC,MAAM,wCAExB,GAEJ,GF6DF,G","sources":["webpack://@blomstra/gdpr/webpack/bootstrap","webpack://@blomstra/gdpr/webpack/runtime/compat get default export","webpack://@blomstra/gdpr/webpack/runtime/define property getters","webpack://@blomstra/gdpr/webpack/runtime/hasOwnProperty shorthand","webpack://@blomstra/gdpr/webpack/runtime/make namespace object","webpack://@blomstra/gdpr/external root \"flarum.core.compat['admin/app']\"","webpack://@blomstra/gdpr/external root \"flarum.core.compat['common/extend']\"","webpack://@blomstra/gdpr/external root \"flarum.core.compat['admin/components/UserListPage']\"","webpack://@blomstra/gdpr/external root \"flarum.core.compat['common/utils/ItemList']\"","webpack://@blomstra/gdpr/external root \"flarum.core.compat['common/components/Tooltip']\"","webpack://@blomstra/gdpr/external root \"flarum.core.compat['common/components/Button']\"","webpack://@blomstra/gdpr/external root \"flarum.core.compat['common/helpers/username']\"","webpack://@blomstra/gdpr/./node_modules/@babel/runtime/helpers/esm/setPrototypeOf.js","webpack://@blomstra/gdpr/./node_modules/@babel/runtime/helpers/esm/inheritsLoose.js","webpack://@blomstra/gdpr/external root \"flarum.core.compat['common/app']\"","webpack://@blomstra/gdpr/external root \"flarum.core.compat['common/components/Modal']\"","webpack://@blomstra/gdpr/external root \"flarum.core.compat['common/helpers/avatar']\"","webpack://@blomstra/gdpr/./src/common/components/RequestDataExportModal.tsx","webpack://@blomstra/gdpr/external root \"flarum.core.compat['admin/components/AdminNav']\"","webpack://@blomstra/gdpr/external root \"flarum.core.compat['common/components/LinkButton']\"","webpack://@blomstra/gdpr/external root \"flarum.core.compat['common/extenders']\"","webpack://@blomstra/gdpr/external root \"flarum.core.compat['common/models/User']\"","webpack://@blomstra/gdpr/external root \"flarum.core.compat['common/Model']\"","webpack://@blomstra/gdpr/./src/common/models/ErasureRequest.ts","webpack://@blomstra/gdpr/./src/common/models/Export.ts","webpack://@blomstra/gdpr/./src/common/extend.ts","webpack://@blomstra/gdpr/external root \"flarum.core.compat['admin/components/AdminPage']\"","webpack://@blomstra/gdpr/external root \"flarum.core.compat['common/components/LoadingIndicator']\"","webpack://@blomstra/gdpr/external root \"flarum.core.compat['common/Component']\"","webpack://@blomstra/gdpr/external root \"flarum.core.compat['common/helpers/icon']\"","webpack://@blomstra/gdpr/./src/admin/components/ExtensionLink.tsx","webpack://@blomstra/gdpr/./src/admin/GdprPage.tsx","webpack://@blomstra/gdpr/./src/admin/models/DataType.tsx","webpack://@blomstra/gdpr/./src/admin/extend.ts","webpack://@blomstra/gdpr/./src/admin/index.tsx","webpack://@blomstra/gdpr/./src/admin/extendUserListPage.tsx","webpack://@blomstra/gdpr/./src/admin/extendAdminNav.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extend'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/UserListPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/utils/ItemList'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Tooltip'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Button'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/username'];","export default function _setPrototypeOf(o, p) {\n _setPrototypeOf = Object.setPrototypeOf ? Object.setPrototypeOf.bind() : function _setPrototypeOf(o, p) {\n o.__proto__ = p;\n return o;\n };\n return _setPrototypeOf(o, p);\n}","import setPrototypeOf from \"./setPrototypeOf.js\";\nexport default function _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n setPrototypeOf(subClass, superClass);\n}","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/app'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Modal'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/avatar'];","import app from 'flarum/common/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport username from 'flarum/common/helpers/username';\nimport User from 'flarum/common/models/User';\nimport type Mithril from 'mithril';\nimport avatar from 'flarum/common/helpers/avatar';\n\ninterface RequestDataExportModalAttrs extends IInternalModalAttrs {\n user: User;\n}\n\nexport default class RequestDataExportModal extends Modal {\n user!: User;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.user = this.attrs.user;\n }\n\n className() {\n return 'RequestDataModal Modal--small';\n }\n\n title() {\n return app.translator.trans('blomstra-gdpr.lib.request_data.title', {\n username: username(this.user),\n });\n }\n\n content() {\n return (\n
\n
\n
{avatar(this.user)}
\n

{app.translator.trans('blomstra-gdpr.lib.request_data.text')}

\n
\n this.requestExport()}\n loading={this.loading}\n disabled={this.loading}\n >\n {app.translator.trans('blomstra-gdpr.lib.request_data.request_button')}\n \n
\n
\n
\n );\n }\n\n requestExport() {\n this.loading = true;\n\n app\n .request({\n method: 'POST',\n url: app.forum.attribute('apiUrl') + '/gdpr/export',\n body: {\n data: {\n attributes: {\n userId: this.user.id(),\n },\n },\n },\n })\n .then(this.hide.bind(this), this.loaded.bind(this));\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/AdminNav'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LinkButton'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/User'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","import Model from 'flarum/common/Model';\nimport User from 'flarum/common/models/User';\n\nexport default class ErasureRequest extends Model {\n status() {\n return Model.attribute('status').call(this);\n }\n\n reason() {\n return Model.attribute('reason').call(this);\n }\n\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate).call(this);\n }\n\n userConfirmedAt() {\n return Model.attribute('userConfirmedAt', Model.transformDate).call(this);\n }\n\n processedAt() {\n return Model.attribute('processedAt', Model.transformDate).call(this);\n }\n\n processorComment() {\n return Model.attribute('processorComment').call(this);\n }\n\n processedMode() {\n return Model.attribute('processedMode').call(this);\n }\n\n user() {\n return Model.hasOne('user').call(this);\n }\n\n processedBy() {\n return Model.hasOne('processedBy').call(this);\n }\n}\n","import Model from 'flarum/common/Model';\nimport User from 'flarum/common/models/User';\n\nexport default class Export extends Model {\n file() {\n return Model.attribute('file').call(this);\n }\n\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate);\n }\n\n destroysAt() {\n return Model.attribute('destroysAt', Model.transformDate);\n }\n\n user() {\n return Model.hasOne('user');\n }\n\n actor() {\n return Model.hasOne('actor');\n }\n}\n","import Extend from 'flarum/common/extenders';\nimport User from 'flarum/common/models/User';\nimport ErasureRequest from './models/ErasureRequest';\nimport Export from './models/Export';\n\nexport default [\n new Extend.Store() //\n .add('user-erasure-requests', ErasureRequest)\n .add('exports', Export),\n\n new Extend.Model(User) //\n .attribute('canModerateExports')\n .attribute('anonymized')\n .hasOne('erasureRequest'),\n];\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['admin/components/AdminPage'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","import LinkButton from 'flarum/common/components/LinkButton';\nimport { Extension } from 'flarum/admin/AdminApplication';\nimport app from 'flarum/admin/app';\nimport Component from 'flarum/common/Component';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport icon from 'flarum/common/helpers/icon';\n\nexport interface ExtensionLinkAttrs {\n extension: Extension | null;\n}\n\nexport default class ExtensionLink extends Component {\n view() {\n const { extension } = this.attrs;\n\n if (!extension) {\n return null;\n }\n\n return (\n \n \n \n {!!extension.icon && icon(extension.icon.name)}\n \n \n \n );\n }\n}\n","import app from 'flarum/admin/app';\nimport AdminPage, { AdminHeaderAttrs } from 'flarum/admin/components/AdminPage';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport type { IPageAttrs } from 'flarum/common/components/Page';\nimport type Mithril from 'mithril';\nimport DataType from './models/DataType';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport ExtensionLink from './components/ExtensionLink';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nexport default class GdprPage extends AdminPage {\n gdprDataTypes: DataType[] = [];\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.loadGdprDataTypes();\n }\n\n headerInfo(): AdminHeaderAttrs {\n return {\n className: 'GdprPage--header',\n icon: 'fas fa-user-shield',\n title: app.translator.trans('blomstra-gdpr.admin.gdpr_page.heading'),\n description: app.translator.trans('blomstra-gdpr.admin.gdpr_page.description'),\n };\n }\n\n loadGdprDataTypes() {\n this.loading = true;\n app.store.find('gdpr/datatypes').then((dataTypes) => {\n this.gdprDataTypes = dataTypes;\n this.loading = false;\n m.redraw();\n });\n }\n\n content(): Mithril.Children {\n if (this.loading) {\n return ;\n }\n\n return (\n
\n

{app.translator.trans('blomstra-gdpr.admin.gdpr_page.settings.heading')}

\n

{app.translator.trans('blomstra-gdpr.admin.gdpr_page.settings.help_text')}

\n \n {app.translator.trans('blomstra-gdpr.admin.gdpr_page.settings.extension_settings_button')}\n \n
\n

{app.translator.trans('blomstra-gdpr.admin.gdpr_page.data_types.title')}

\n

{app.translator.trans('blomstra-gdpr.admin.gdpr_page.data_types.help_text')}

\n\n
\n
\n
{app.translator.trans('blomstra-gdpr.admin.gdpr_page.data_types.type')}
\n
{app.translator.trans('blomstra-gdpr.admin.gdpr_page.data_types.export_description')}
\n
{app.translator.trans('blomstra-gdpr.admin.gdpr_page.data_types.anonymize_description')}
\n
{app.translator.trans('blomstra-gdpr.admin.gdpr_page.data_types.delete_description')}
\n
{app.translator.trans('blomstra-gdpr.admin.gdpr_page.data_types.extension')}
\n
\n\n {this.gdprDataTypes.map((dataType) => (\n <>\n
\n
\n \n {dataType.type()}\n \n
\n
{dataType.exportDescription()}
\n
{dataType.anonymizeDescription()}
\n
{dataType.deleteDescription()}
\n
\n \n
\n
\n \n ))}\n
\n
\n

{app.translator.trans('blomstra-gdpr.admin.gdpr_page.user_table_data.title')}

\n

{app.translator.trans('blomstra-gdpr.admin.gdpr_page.user_table_data.help_text')}

\n
Not yet implemented
\n
\n );\n }\n}\n","import Model from 'flarum/common/Model';\n\nexport default class DataType extends Model {\n type() {\n return Model.attribute('type').call(this);\n }\n\n exportDescription() {\n return Model.attribute('exportDescription').call(this);\n }\n\n anonymizeDescription() {\n return Model.attribute('anonymizeDescription').call(this);\n }\n\n deleteDescription() {\n return Model.attribute('deleteDescription').call(this);\n }\n\n extension() {\n return Model.attribute('extension').call(this);\n }\n}\n","import { default as extend } from '../common/extend';\nimport Extend from 'flarum/common/extenders';\nimport GdprPage from './GdprPage';\nimport DataType from './models/DataType';\n\nexport default [\n ...extend,\n\n new Extend.Routes() //\n .add('gdpr', '/gdpr', GdprPage),\n\n new Extend.Store() //\n .add('gdpr-datatypes', DataType),\n];\n","import app from 'flarum/admin/app';\nimport extendUserListPage from './extendUserListPage';\nimport extendAdminNav from './extendAdminNav';\nimport LinkButton from 'flarum/common/components/LinkButton';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('blomstra-gdpr', () => {\n app.extensionData\n .for('blomstra-gdpr')\n .registerSetting(function () {\n return (\n
\n

{app.translator.trans('blomstra-gdpr.admin.settings.gdpr_page.title')}

\n

{app.translator.trans('blomstra-gdpr.admin.settings.gdpr_page.help_text')}

\n \n {app.translator.trans('blomstra-gdpr.admin.nav.gdpr_button')}\n \n
\n );\n })\n .registerSetting({\n setting: 'blomstra-gdpr.allow-anonymization',\n label: app.translator.trans('blomstra-gdpr.admin.settings.allow_anonymization'),\n help: app.translator.trans('blomstra-gdpr.admin.settings.allow_anonymization_help'),\n type: 'boolean',\n })\n .registerSetting({\n setting: 'blomstra-gdpr.allow-deletion',\n label: app.translator.trans('blomstra-gdpr.admin.settings.allow_deletion'),\n help: app.translator.trans('blomstra-gdpr.admin.settings.allow_deletion_help'),\n type: 'boolean',\n })\n .registerSetting({\n setting: 'blomstra-gdpr.default-erasure',\n label: app.translator.trans('blomstra-gdpr.admin.settings.default_erasure'),\n help: app.translator.trans('blomstra-gdpr.admin.settings.default_erasure_help'),\n type: 'select',\n options: {\n anonymization: app.translator.trans('blomstra-gdpr.admin.settings.default_erasure_options.anonymization'),\n deletion: app.translator.trans('blomstra-gdpr.admin.settings.default_erasure_options.deletion'),\n },\n })\n .registerSetting({\n setting: 'blomstra-gdpr.default-anonymous-username',\n type: 'string',\n label: app.translator.trans('blomstra-gdpr.admin.settings.default_anonymous_username'),\n help: app.translator.trans('blomstra-gdpr.admin.settings.default_anonymous_username_help'),\n })\n .registerPermission(\n {\n icon: 'fas fa-user-minus',\n label: app.translator.trans('blomstra-gdpr.admin.permissions.process_erasure'),\n permission: 'processErasure',\n },\n 'moderate'\n )\n .registerPermission(\n {\n icon: 'fas fa-file-export',\n label: app.translator.trans('blomstra-gdpr.admin.permissions.process_export_for_others'),\n permission: 'moderateExport',\n },\n 'moderate'\n )\n .registerPermission(\n {\n icon: 'fas fa-eye',\n label: app.translator.trans('blomstra-gdpr.admin.permissions.see_anonymized_user_badges'),\n permission: 'seeAnonymizedUserBadges',\n allowGuest: true,\n },\n 'view'\n );\n\n extendUserListPage();\n extendAdminNav();\n});\n","import app from 'flarum/admin/app';\nimport { extend } from 'flarum/common/extend';\nimport UserListPage from 'flarum/admin/components/UserListPage';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport User from 'flarum/common/models/User';\nimport Tooltip from 'flarum/common/components/Tooltip';\nimport Button from 'flarum/common/components/Button';\nimport type Mithril from 'mithril';\nimport username from 'flarum/common/helpers/username';\nimport RequestDataExportModal from '../common/components/RequestDataExportModal';\n\ntype ColumnData = {\n /**\n * Column title\n */\n name: Mithril.Children;\n /**\n * Component(s) to show for this column.\n */\n content: (user: User) => Mithril.Children;\n};\n\nexport default function extendUserListPage() {\n extend(UserListPage.prototype, 'columns', function (columns: ItemList) {\n columns.add(\n 'gdpr',\n {\n name: app.translator.trans('blomstra-gdpr.admin.userlist.columns.gdpr_actions.title'),\n content: (user: User) => {\n return
{this.gdprActions(user).toArray()}
;\n },\n },\n 50\n );\n });\n\n UserListPage.prototype.gdprActions = function (user: User): ItemList {\n const items = new ItemList();\n\n if (user.canModerateExports()) {\n items.add(\n 'export-data',\n \n \n \n \n \n );\n }\n\n requestExport() {\n this.loading = true;\n\n app\n .request({\n method: 'POST',\n url: app.forum.attribute('apiUrl') + '/gdpr/export',\n body: {\n data: {\n attributes: {\n userId: this.user.id(),\n },\n },\n },\n })\n .then(this.hide.bind(this), this.loaded.bind(this));\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/HeaderSecondary'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/NotificationsDropdown'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Component'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/LoadingIndicator'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/icon'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/helpers/humanTime'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/components/UserCard'];","import app from 'flarum/forum/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport username from 'flarum/common/helpers/username';\nimport extractText from 'flarum/common/utils/extractText';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nimport type Mithril from 'mithril';\nimport ErasureRequest from 'src/common/models/ErasureRequest';\nimport UserCard from 'flarum/forum/components/UserCard';\n\ninterface ProcessErasureRequestModalAttrs extends IInternalModalAttrs {\n request: ErasureRequest;\n}\n\nexport default class ProcessErasureRequestModal extends Modal {\n comments: Stream;\n loadingAnonymization: boolean = false;\n loadingDeletion: boolean = false;\n request!: ErasureRequest;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.request = this.attrs.request;\n\n this.comments = Stream('');\n }\n\n className() {\n return 'ProcessErasureRequestModal Modal--medium';\n }\n\n title() {\n return app.translator.trans('blomstra-gdpr.forum.process_erasure.title');\n }\n\n content() {\n return (\n
\n
{this.fields().toArray()}
\n
\n );\n }\n\n fields() {\n const items = new ItemList();\n\n const erasureRequest = this.attrs.request;\n\n items.add(\n 'text',\n
\n \n

{app.translator.trans('blomstra-gdpr.forum.process_erasure.text', { name: username(this.request.user()) })}

\n
\n );\n\n erasureRequest?.reason() &&\n items.add(\n 'reason',\n

\n {erasureRequest.reason()}\n

\n );\n\n items.add(\n 'comments',\n
\n \n
\n );\n\n if (app.forum.attribute('erasureAnonymizationAllowed')) {\n items.add(\n 'anonymize',\n
\n {Button.component(\n {\n className: 'Button Button--primary Button--block',\n loading: this.loadingAnonymization,\n onclick: () => this.process('anonymization'),\n },\n app.translator.trans('blomstra-gdpr.forum.process_erasure.anonymization_button')\n )}\n
\n );\n }\n\n if (app.forum.attribute('erasureDeletionAllowed')) {\n items.add(\n 'delete',\n
\n {Button.component(\n {\n className: 'Button Button--danger Button--block',\n loading: this.loadingDeletion,\n onclick: () => this.process('deletion'),\n },\n app.translator.trans('blomstra-gdpr.forum.process_erasure.deletion_button')\n )}\n
\n );\n }\n\n return items;\n }\n\n process(mode: string) {\n if (\n !confirm(\n app.translator.trans('blomstra-gdpr.forum.process_erasure.confirm', {\n name: extractText(username(this.request.user())),\n mode,\n }) as string\n )\n ) {\n return;\n }\n\n if (mode === 'anonymization') {\n this.loadingAnonymization = true;\n } else {\n this.loadingDeletion = true;\n }\n\n m.redraw();\n\n this.request\n .save({ processor_comment: this.comments(), meta: { mode } })\n .then((erasureRequest) => {\n app.store.remove(erasureRequest);\n this.loadingAnonymization = false;\n this.loadingDeletion = false;\n m.redraw();\n this.hide();\n })\n .catch(() => {\n this.loadingAnonymization = false;\n this.loadingDeletion = false;\n m.redraw();\n });\n }\n}\n","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport LoadingIndicator from 'flarum/common/components/LoadingIndicator';\nimport avatar from 'flarum/common/helpers/avatar';\nimport icon from 'flarum/common/helpers/icon';\nimport username from 'flarum/common/helpers/username';\nimport humanTime from 'flarum/common/helpers/humanTime';\n\nimport ProcessErasureRequestModal from './ProcessErasureRequestModal';\n\nexport default class ErasureRequestsList extends Component {\n view() {\n const erasureRequests = app.store.all('user-erasure-requests');\n const state = this.attrs.state;\n\n return (\n
\n
\n

{app.translator.trans('blomstra-gdpr.forum.erasure_requests.title')}

\n
\n
\n \n
\n
\n );\n }\n\n showModal(request) {\n app.modal.show(ProcessErasureRequestModal, { request });\n }\n}\n","import app from 'flarum/forum/app';\nimport NotificationsDropdown from 'flarum/forum/components/NotificationsDropdown';\n\nimport ErasureRequestsList from './ErasureRequestsList';\nimport { IDropdownAttrs } from 'flarum/common/components/Dropdown';\nimport ErasureRequestsListState from '../states/ErasureRequestsListState';\n\ninterface ErasureRequestsDropdownAttrs extends IDropdownAttrs {\n state: ErasureRequestsListState;\n}\n\nexport default class ErasureRequestsDropdown extends NotificationsDropdown {\n static initAttrs(attrs: ErasureRequestsDropdownAttrs) {\n attrs.label = attrs.label || app.translator.trans('blomstra-gdpr.forum.erasure_requests.tooltip');\n attrs.icon = attrs.icon || 'fas fa-user-minus';\n\n super.initAttrs(attrs);\n }\n\n getMenu() {\n return (\n
\n {this.showing ? ErasureRequestsList.component({ state: this.attrs.state }) : ''}\n
\n );\n }\n\n goToRoute() {\n m.route.set(app.route('erasure-requests'));\n }\n\n getUnreadCount(): number | undefined {\n if (!this.attrs.state.requestsLoaded) {\n return app.forum.attribute('erasureRequestCount');\n }\n\n return app.store.all('erasure-requests').length;\n }\n\n getNewCount() {\n return this.getUnreadCount();\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Page'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['forum/utils/UserControls'];","import app from 'flarum/forum/app';\nimport Modal, { IInternalModalAttrs } from 'flarum/common/components/Modal';\nimport User from 'flarum/common/models/User';\nimport type Mithril from 'mithril';\nimport username from 'flarum/common/helpers/username';\nimport Button from 'flarum/common/components/Button';\n\ninterface DeleteUserModalAttrs extends IInternalModalAttrs {\n user: User;\n}\n\nexport default class DeleteUserModal extends Modal {\n user!: User;\n loadingAnonymization: boolean = false;\n loadingDeletion: boolean = false;\n\n oninit(vnode: Mithril.Vnode) {\n super.oninit(vnode);\n\n this.user = this.attrs.user;\n }\n\n className() {\n return 'DeleteUserModal Modal--small';\n }\n\n title() {\n return app.translator.trans('blomstra-gdpr.forum.delete_user.title', {\n username: username(this.user),\n });\n }\n\n content() {\n return (\n
\n
\n

\n {app.translator.trans('blomstra-gdpr.forum.delete_user.text', {\n username: username(this.user),\n })}\n

\n
\n this.defaultErasure()}\n loading={this.loading}\n disabled={this.loading}\n >\n {app.translator.trans('blomstra-gdpr.forum.delete_user.modal_delete_button')}\n \n
\n {app.forum.attribute('erasureAnonymizationAllowed') && app.forum.attribute('erasureDeletionAllowed') && (\n
\n
\n this.specificErasure('anonymization')}\n loading={this.loadingAnonymization}\n disabled={this.loadingAnonymization}\n >\n {app.translator.trans('blomstra-gdpr.forum.process_erasure.anonymization_button')}\n \n
\n
\n this.specificErasure('deletion')}\n loading={this.loadingDeletion}\n disabled={this.loadingDeletion}\n >\n {app.translator.trans('blomstra-gdpr.forum.process_erasure.deletion_button')}\n \n
\n
\n )}\n
\n
\n );\n }\n\n defaultErasure() {\n this.loading = true;\n\n this.user.delete().then(\n () => {\n this.hide();\n this.loading = false;\n m.redraw();\n },\n () => {}\n );\n }\n\n specificErasure(mode: string) {\n if (mode === 'anonymization') {\n this.loadingAnonymization = true;\n } else {\n this.loadingDeletion = true;\n }\n\n app\n .request({\n method: 'DELETE',\n url: app.forum.attribute('apiUrl') + '/users/' + this.user.id() + '/gdpr/' + mode,\n })\n .then(\n () => {\n this.hide();\n this.loadingAnonymization = false;\n this.loadingDeletion = false;\n m.redraw();\n },\n () => []\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/models/User'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/components/Badge'];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/extenders'];","import app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\n\nimport ErasureRequestsList from './ErasureRequestsList';\n\nexport default class ErasureRequestsPage extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n\n app.history.push('erasure-requests');\n\n app.erasureRequests.load();\n\n this.bodyClass = 'App--ErasureRequests';\n }\n\n view() {\n return (\n
\n \n
\n );\n }\n}\n","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.core.compat['common/Model'];","import Model from 'flarum/common/Model';\nimport User from 'flarum/common/models/User';\n\nexport default class ErasureRequest extends Model {\n status() {\n return Model.attribute('status').call(this);\n }\n\n reason() {\n return Model.attribute('reason').call(this);\n }\n\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate).call(this);\n }\n\n userConfirmedAt() {\n return Model.attribute('userConfirmedAt', Model.transformDate).call(this);\n }\n\n processedAt() {\n return Model.attribute('processedAt', Model.transformDate).call(this);\n }\n\n processorComment() {\n return Model.attribute('processorComment').call(this);\n }\n\n processedMode() {\n return Model.attribute('processedMode').call(this);\n }\n\n user() {\n return Model.hasOne('user').call(this);\n }\n\n processedBy() {\n return Model.hasOne('processedBy').call(this);\n }\n}\n","import Model from 'flarum/common/Model';\nimport User from 'flarum/common/models/User';\n\nexport default class Export extends Model {\n file() {\n return Model.attribute('file').call(this);\n }\n\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate);\n }\n\n destroysAt() {\n return Model.attribute('destroysAt', Model.transformDate);\n }\n\n user() {\n return Model.hasOne('user');\n }\n\n actor() {\n return Model.hasOne('actor');\n }\n}\n","import Extend from 'flarum/common/extenders';\nimport User from 'flarum/common/models/User';\nimport ErasureRequest from './models/ErasureRequest';\nimport Export from './models/Export';\n\nexport default [\n new Extend.Store() //\n .add('user-erasure-requests', ErasureRequest)\n .add('exports', Export),\n\n new Extend.Model(User) //\n .attribute('canModerateExports')\n .attribute('anonymized')\n .hasOne('erasureRequest'),\n];\n","import Extend from 'flarum/common/extenders';\nimport ErasureRequestsPage from './components/ErasureRequestsPage';\n\nimport { default as extend } from '../common/extend';\n\nexport default [\n ...extend,\n\n new Extend.Routes() //\n .add('erasure-requests', '/erasure-requests', ErasureRequestsPage),\n];\n","import app from 'flarum/forum/app';\nimport ErasureRequestsListState from './states/ErasureRequestsListState';\nimport ExportAvailableNotification from './components/ExportAvailableNotification';\nimport extendUserSettingsPage from './extenders/extendUserSettingsPage';\nimport extendHeaderSecondary from './extenders/extendHeaderSecondary';\nimport extendPage from './extenders/extendPage';\nimport extendUserControls from './extenders/extendUserControls';\nimport addAnonymousBadges from './addAnonymousBadges';\n\nexport { default as extend } from './extend';\n\napp.initializers.add('blomstra-gdpr', () => {\n app.erasureRequests = new ErasureRequestsListState();\n\n app.notificationComponents.gdprExportAvailable = ExportAvailableNotification;\n\n extendUserSettingsPage();\n extendHeaderSecondary();\n extendPage();\n extendUserControls();\n addAnonymousBadges();\n});\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport SettingsPage from 'flarum/forum/components/SettingsPage';\nimport FieldSet from 'flarum/common/components/FieldSet';\nimport type Mithril from 'mithril';\nimport Button from 'flarum/common/components/Button';\nimport RequestErasureModal from '../components/RequestErasureModal';\nimport RequestDataExportModal from '../../common/components/RequestDataExportModal';\n\nexport default function extendUserSettingsPage() {\n extend(SettingsPage.prototype, 'settingsItems', function (items: ItemList) {\n const user = this.user;\n\n if (!user) {\n return;\n }\n\n items.add(\n 'dataItems',\n
\n {\n /** @ts-ignore **/\n this.dataItems().toArray()\n }\n
,\n 90\n );\n });\n\n /** @ts-ignore */\n SettingsPage.prototype.dataItems = function (): ItemList {\n const items = new ItemList();\n\n items.add(\n 'gdprErasure',\n
\n \n

{app.translator.trans('blomstra-gdpr.forum.settings.request_erasure_help')}

\n
,\n 50\n );\n\n items.add(\n 'gdprExport',\n
\n app.modal.show(RequestDataExportModal, { user: this.user })}\n >\n {app.translator.trans('blomstra-gdpr.forum.settings.export_data_button')}\n \n

{app.translator.trans('blomstra-gdpr.forum.settings.export_data_help')}

\n
,\n 40\n );\n\n return items;\n };\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport HeaderSecondary from 'flarum/forum/components/HeaderSecondary';\nimport ErasureRequestsDropdown from '../components/ErasureRequestsDropdown';\n\nexport default function extendHeaderSecondary() {\n extend(HeaderSecondary.prototype, 'items', function (items) {\n if (app.forum.attribute('erasureRequestCount')) {\n items.add('erasureRequests', , 20);\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Page from 'flarum/common/components/Page';\n\nexport default function extendPage() {\n extend(Page.prototype, 'oninit', function () {\n if (m.route.param('erasureRequestConfirmed')) {\n app.alerts.show({ type: 'success' }, app.translator.trans('blomstra-gdpr.forum.erasure_request_confirmed'));\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport UserControls from 'flarum/forum/utils/UserControls';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport User from 'flarum/common/models/User';\nimport Button from 'flarum/common/components/Button';\nimport RequestDataExportModal from '../../common/components/RequestDataExportModal';\nimport type Mithril from 'mithril';\nimport DeleteUserModal from '../components/DeleteUserModal';\n\nexport default function extendUserControls() {\n extend(UserControls, 'moderationControls', function (items: ItemList, user: User) {\n if (user.canModerateExports()) {\n items.add(\n 'gdpr-export',\n \n );\n }\n });\n\n extend(UserControls, 'destructiveControls', function (items: ItemList, user: User) {\n items.remove('delete');\n\n if (user.canDelete()) {\n items.add(\n 'gdpr-erase',\n \n );\n }\n });\n}\n","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport User from 'flarum/common/models/User';\nimport Badge from 'flarum/common/components/Badge';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport type Mithril from 'mithril';\n\nexport default function () {\n extend(User.prototype, 'badges', function (badges: ItemList) {\n if (this.anonymized()) {\n badges.add(\n 'anonymized',\n \n );\n }\n });\n}\n"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","core","compat","ErasureRequestsListState","loading","requestsLoaded","load","_this","this","m","redraw","app","find","then","_setPrototypeOf","p","setPrototypeOf","bind","__proto__","_inheritsLoose","subClass","superClass","create","constructor","ExportAvailableNotification","_Notification","apply","arguments","_proto","icon","href","exportModel","attrs","notification","subject","attribute","file","content","trans","username","fromUser","excerpt","Notification","RequestErasureModal","_Modal","oninit","vnode","reason","Stream","password","className","title","fields","toArray","items","ItemList","currRequest","user","erasureRequest","add","status","Button","onclick","oncancel","type","bidi","placeholder","extractText","oninput","e","target","_this2","data","relationships","onsubmit","_this3","preventDefault","createRecord","save","meta","pushData","Modal","RequestDataExportModal","_len","length","args","Array","_key","concat","avatar","requestExport","disabled","method","url","body","attributes","userId","id","hide","loaded","ProcessErasureRequestModal","comments","loadingAnonymization","loadingDeletion","request","UserCard","name","process","mode","confirm","processor_comment","remove","ErasureRequestsList","_Component","view","erasureRequests","all","state","map","showModal","humanTime","createdAt","LoadingIndicator","show","Component","ErasureRequestsDropdown","_NotificationsDropdow","initAttrs","label","getMenu","menuClassName","menuClick","showing","component","goToRoute","route","set","getUnreadCount","getNewCount","NotificationsDropdown","DeleteUserModal","defaultErasure","specificErasure","_this4","ErasureRequestsPage","_Page","push","bodyClass","Page","ErasureRequest","_Model","Model","userConfirmedAt","processedAt","processorComment","processedMode","processedBy","Export","destroysAt","actor","Extend","User","hasOne","extend","gdprExportAvailable","SettingsPage","FieldSet","dataItems","HeaderSecondary","param","UserControls","canModerateExports","canDelete","badges","anonymized","Badge"],"sourceRoot":""} \ No newline at end of file +{"version":3,"file":"forum.js","mappings":"MACA,IAAIA,EAAsB,CCA1BA,EAAyBC,IACxB,IAAIC,EAASD,GAAUA,EAAOE,WAC7B,IAAOF,EAAiB,QACxB,IAAM,EAEP,OADAD,EAAoBI,EAAEF,EAAQ,CAAEG,EAAGH,IAC5BA,CAAM,ECLdF,EAAwB,CAACM,EAASC,KACjC,IAAI,IAAIC,KAAOD,EACXP,EAAoBS,EAAEF,EAAYC,KAASR,EAAoBS,EAAEH,EAASE,IAC5EE,OAAOC,eAAeL,EAASE,EAAK,CAAEI,YAAY,EAAMC,IAAKN,EAAWC,IAE1E,ECNDR,EAAwB,CAACc,EAAKC,IAAUL,OAAOM,UAAUC,eAAeC,KAAKJ,EAAKC,GCClFf,EAAyBM,IACH,oBAAXa,QAA0BA,OAAOC,aAC1CV,OAAOC,eAAeL,EAASa,OAAOC,YAAa,CAAEC,MAAO,WAE7DX,OAAOC,eAAeL,EAAS,aAAc,CAAEe,OAAO,GAAO,G,sDCL9D,MAAM,EAA+BC,OAAOC,IAAIV,IAAI,OAAQ,a,aCA5D,MAAM,EAA+BS,OAAOC,IAAIV,IAAI,OAAQ,oC,aCE7C,MAAMW,UAAiC,KACpD,WAAAC,GACEC,MAAM,CAAC,EAAG,EAAG,KACf,CACA,QAAIC,GACF,MAAO,uBACT,CAMA,IAAAC,GACE,IAAIC,EAOJ,OAN8C,OAAzCA,EAAoB,YAAYC,OAAiBD,EAAkBE,UAAU,yBAChFC,KAAKC,MAAQ,GACbD,KAAKE,SAAW,CACdC,KAAM,IAGNH,KAAKC,MAAMG,OAAS,EACfC,QAAQC,UAEVZ,MAAMa,UACf,EAEFjB,OAAOC,IAAIiB,IAAI,cAAe,wCAAyChB,GC5BvE,MAAM,EAA+BF,OAAOC,IAAIV,IAAI,OAAQ,iBCAtD,EAA+BS,OAAOC,IAAIV,IAAI,OA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,KAAKmE,MAAMkF,aAAaC,UAG5C,OAAO,UAAUvJ,UAAU,WAAa,gBAAgByC,OAAO4G,EAAYN,OAC7E,CACA,OAAA/G,GACE,MAAMsH,EAAerJ,KAAKmE,MAAMkF,aAChC,OAAO,eAAevH,MAAM,8CAA+C,CACzEsC,SAAU,IAASiF,EAAaE,aAEpC,CACA,OAAAtC,GACE,OAAO,IACT,EAEF3H,OAAOC,IAAIiB,IAAI,cAAe,+CAAgD0I,ICnB9E,aAAmBrE,IAAQ,IAAI,cAC9BrE,IAAI,mBAAoB,oBAAqB8H,KAAsB,IAAI,oBAAsB9H,IAAI,sBAAuB0I,KCGzH,iBAAiB1I,IAAI,eAAe,KAClC,oBAAsB,IAAIhB,EAC1BoF,IACA+C,IACAC,KACAO,MCRA,IAAAtD,QAAO,eAAgB,UAAU,SAAU2E,GACrCxJ,KAAKyJ,cACPD,EAAOhJ,IAAI,aAAcwB,EAAE,KAAO,CAChC8C,MAAO,eAAehD,MAAM,4CAC5BmD,KAAM,qBACNtF,KAAM,eAGZ,GDCoB,G","sources":["webpack://@flarum/gdpr/webpack/bootstrap","webpack://@flarum/gdpr/webpack/runtime/compat get default export","webpack://@flarum/gdpr/webpack/runtime/define property getters","webpack://@flarum/gdpr/webpack/runtime/hasOwnProperty shorthand","webpack://@flarum/gdpr/webpack/runtime/make namespace object","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'forum/app')\"","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/states/PaginatedListState')\"","webpack://@flarum/gdpr/./src/forum/states/ErasureRequestsListState.ts","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/extend')\"","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/utils/ItemList')\"","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/components/FieldSet')\"","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/components/Button')\"","webpack://@flarum/gdpr/./node_modules/@babel/runtime/helpers/esm/typeof.js","webpack://@flarum/gdpr/./node_modules/@babel/runtime/helpers/esm/defineProperty.js","webpack://@flarum/gdpr/./node_modules/@babel/runtime/helpers/esm/toPropertyKey.js","webpack://@flarum/gdpr/./node_modules/@babel/runtime/helpers/esm/toPrimitive.js","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/components/Form')\"","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/components/FormModal')\"","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/utils/extractText')\"","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/utils/Stream')\"","webpack://@flarum/gdpr/./src/forum/components/RequestErasureModal.tsx","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/app')\"","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/components/Modal')\"","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/helpers/username')\"","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/components/Avatar')\"","webpack://@flarum/gdpr/./src/common/components/RequestDataExportModal.tsx","webpack://@flarum/gdpr/./src/forum/extenders/extendUserSettingsPage.tsx","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'forum/components/HeaderSecondary')\"","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'forum/components/NotificationsDropdown')\"","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/Component')\"","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'forum/components/HeaderList')\"","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'forum/components/HeaderListItem')\"","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'forum/components/UserCard')\"","webpack://@flarum/gdpr/./src/forum/components/ProcessErasureRequestModal.tsx","webpack://@flarum/gdpr/./src/forum/components/ErasureRequestsList.tsx","webpack://@flarum/gdpr/./src/forum/components/ErasureRequestsDropdown.tsx","webpack://@flarum/gdpr/./src/forum/extenders/extendHeaderSecondary.tsx","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/components/Page')\"","webpack://@flarum/gdpr/./src/forum/extenders/extendPage.ts","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'forum/utils/UserControls')\"","webpack://@flarum/gdpr/./src/forum/components/DeleteUserModal.tsx","webpack://@flarum/gdpr/./src/forum/extenders/extendUserControls.tsx","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/models/User')\"","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/components/Badge')\"","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/extenders')\"","webpack://@flarum/gdpr/./src/forum/components/ErasureRequestsPage.js","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'common/Model')\"","webpack://@flarum/gdpr/./src/common/models/ErasureRequest.ts","webpack://@flarum/gdpr/./src/common/models/Export.ts","webpack://@flarum/gdpr/./src/common/extend.ts","webpack://@flarum/gdpr/external root \"flarum.reg.get('core', 'forum/components/Notification')\"","webpack://@flarum/gdpr/./src/forum/components/ExportAvailableNotification.ts","webpack://@flarum/gdpr/./src/forum/extend.ts","webpack://@flarum/gdpr/./src/forum/index.ts","webpack://@flarum/gdpr/./src/forum/extenders/addAnonymousBadges.tsx"],"sourcesContent":["// The require scope\nvar __webpack_require__ = {};\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = (module) => {\n\tvar getter = module && module.__esModule ?\n\t\t() => (module['default']) :\n\t\t() => (module);\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = (exports, definition) => {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))","// define __esModule on exports\n__webpack_require__.r = (exports) => {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/states/PaginatedListState');","import app from 'flarum/forum/app';\nimport PaginatedListState from 'flarum/common/states/PaginatedListState';\nexport default class ErasureRequestsListState extends PaginatedListState {\n constructor() {\n super({}, 1, null);\n }\n get type() {\n return 'user-erasure-requests';\n }\n\n /**\n * Load flags into the application's cache if they haven't already\n * been loaded.\n */\n load() {\n var _app$session$user;\n if ((_app$session$user = app.session.user) != null && _app$session$user.attribute('erasureRequestCount')) {\n this.pages = [];\n this.location = {\n page: 1\n };\n }\n if (this.pages.length > 0) {\n return Promise.resolve();\n }\n return super.loadNext();\n }\n}\nflarum.reg.add('flarum-gdpr', 'forum/states/ErasureRequestsListState', ErasureRequestsListState);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extend');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/ItemList');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/FieldSet');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Button');","function _typeof(o) {\n \"@babel/helpers - typeof\";\n\n return _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function (o) {\n return typeof o;\n } : function (o) {\n return o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n }, _typeof(o);\n}\nexport { _typeof as default };","import toPropertyKey from \"./toPropertyKey.js\";\nfunction _defineProperty(e, r, t) {\n return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n value: t,\n enumerable: !0,\n configurable: !0,\n writable: !0\n }) : e[r] = t, e;\n}\nexport { _defineProperty as default };","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\nfunction toPropertyKey(t) {\n var i = toPrimitive(t, \"string\");\n return \"symbol\" == _typeof(i) ? i : i + \"\";\n}\nexport { toPropertyKey as default };","import _typeof from \"./typeof.js\";\nfunction toPrimitive(t, r) {\n if (\"object\" != _typeof(t) || !t) return t;\n var e = t[Symbol.toPrimitive];\n if (void 0 !== e) {\n var i = e.call(t, r || \"default\");\n if (\"object\" != _typeof(i)) return i;\n throw new TypeError(\"@@toPrimitive must return a primitive value.\");\n }\n return (\"string\" === r ? String : Number)(t);\n}\nexport { toPrimitive as default };","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Form');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/FormModal');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/extractText');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/utils/Stream');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport Form from 'flarum/common/components/Form';\nimport app from 'flarum/forum/app';\nimport FormModal from 'flarum/common/components/FormModal';\nimport Button from 'flarum/common/components/Button';\nimport extractText from 'flarum/common/utils/extractText';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nexport default class RequestErasureModal extends FormModal {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"reason\", void 0);\n _defineProperty(this, \"password\", void 0);\n _defineProperty(this, \"user\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n this.reason = Stream('');\n this.password = Stream('');\n this.user = app.session.user;\n }\n className() {\n return 'RequestErasureModal Modal--small';\n }\n title() {\n return app.translator.trans('flarum-gdpr.forum.request_erasure.title');\n }\n content() {\n return m(\"div\", {\n className: \"Modal-body\"\n }, m(Form, {\n className: \"Form--centered\"\n }, this.fields().toArray()));\n }\n fields() {\n var _this$user;\n const items = new ItemList();\n const currRequest = (_this$user = this.user) == null ? void 0 : _this$user.erasureRequest();\n if (currRequest && currRequest.status() !== 'cancelled') {\n items.add('status', m(\"div\", {\n className: \"Form-group\"\n }, m(\"p\", {\n className: \"helpText\"\n }, app.translator.trans(\"flarum-gdpr.forum.request_erasure.status.\".concat(currRequest.status())))));\n if (currRequest.reason()) {\n items.add('reason', m(\"div\", {\n className: \"Form-group\"\n }, m(\"p\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-gdpr.forum.request_erasure.reason', {\n reason: currRequest.reason()\n }))));\n }\n items.add('cancel', m(\"div\", {\n className: \"Form-group\"\n }, Button.component({\n className: 'Button Button--primary Button--block',\n onclick: this.oncancel.bind(this),\n loading: this.loading\n }, app.translator.trans('flarum-gdpr.forum.request_erasure.cancel_button'))));\n } else {\n items.add('text', m(\"p\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-gdpr.forum.request_erasure.text')));\n if (!app.forum.attribute('passwordlessSignUp')) {\n items.add('password', m(\"div\", {\n className: \"Form-group\"\n }, m(\"input\", {\n type: \"password\",\n className: \"FormControl\",\n bidi: this.password,\n placeholder: extractText(app.translator.trans('flarum-gdpr.forum.request_erasure.password_label'))\n })));\n }\n items.add('reason', m(\"div\", {\n className: \"Form-group\"\n }, m(\"textarea\", {\n className: \"FormControl\",\n value: this.reason(),\n oninput: e => {\n const target = e.target;\n if (target) {\n this.reason(target.value);\n }\n },\n placeholder: extractText(app.translator.trans('flarum-gdpr.forum.request_erasure.reason_label')),\n rows: 6\n })));\n items.add('submit', m(\"div\", {\n className: \"Form-group\"\n }, Button.component({\n className: 'Button Button--primary Button--block',\n type: 'submit',\n loading: this.loading\n }, app.translator.trans('flarum-gdpr.forum.request_erasure.request_button'))));\n }\n return items;\n }\n oncancel(e) {\n this.loading = true;\n m.redraw();\n if (this.user) {\n const request = this.user.erasureRequest();\n app.request({\n method: 'POST',\n url: app.forum.attribute('apiUrl') + '/user-erasure-requests/' + request.id() + '/cancel'\n }).then(() => {\n this.loading = false;\n app.modal.close();\n });\n }\n }\n data() {\n // Status is set so that the proper confirmation message is displayed.\n return {\n reason: this.reason()\n };\n }\n onsubmit(e) {\n e.preventDefault();\n this.loading = true;\n app.store.createRecord('user-erasure-requests').save(this.data(), {\n meta: {\n password: this.password()\n }\n }).then(erasureRequest => {\n if (this.user) {\n this.user.pushData({\n relationships: {\n erasureRequest\n }\n });\n }\n this.loading = false;\n m.redraw();\n }).catch(() => {\n this.loading = false;\n m.redraw();\n });\n }\n}\nflarum.reg.add('flarum-gdpr', 'forum/components/RequestErasureModal', RequestErasureModal);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/app');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Modal');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/helpers/username');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Avatar');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport Form from 'flarum/common/components/Form';\nimport app from 'flarum/common/app';\nimport Modal from 'flarum/common/components/Modal';\nimport Button from 'flarum/common/components/Button';\nimport username from 'flarum/common/helpers/username';\nimport Avatar from 'flarum/common/components/Avatar';\nexport default class RequestDataExportModal extends Modal {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"user\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n this.user = this.attrs.user;\n }\n className() {\n return 'RequestDataModal Modal--small';\n }\n title() {\n return app.translator.trans('flarum-gdpr.lib.request_data.title', {\n username: username(this.user)\n });\n }\n content() {\n return m(\"div\", {\n className: \"Modal-body\"\n }, m(Form, {\n className: \"Form--centered\"\n }, m(\"div\", {\n className: \"User\"\n }, m(Avatar, {\n user: this.user\n })), m(\"p\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-gdpr.lib.request_data.text')), m(\"div\", {\n className: \"Form-group\"\n }, m(Button, {\n className: \"Button Button--primary Button--block\",\n onclick: () => this.requestExport(),\n loading: this.loading,\n disabled: this.loading\n }, app.translator.trans('flarum-gdpr.lib.request_data.request_button')))));\n }\n requestExport() {\n this.loading = true;\n app.request({\n method: 'POST',\n url: app.forum.attribute('apiUrl') + '/gdpr-exports',\n body: {\n data: {\n attributes: {\n userId: this.user.id()\n }\n }\n }\n }).then(this.hide.bind(this), this.loaded.bind(this));\n }\n}\nflarum.reg.add('flarum-gdpr', 'common/components/RequestDataExportModal', RequestDataExportModal);","import app from 'flarum/forum/app';\nimport { extend, override } from 'flarum/common/extend';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport FieldSet from 'flarum/common/components/FieldSet';\nimport Button from 'flarum/common/components/Button';\nimport RequestErasureModal from '../components/RequestErasureModal';\nimport RequestDataExportModal from '../../common/components/RequestDataExportModal';\nexport default function extendUserSettingsPage() {\n extend('flarum/forum/components/SettingsPage', 'settingsItems', function (items) {\n const user = this.user;\n if (!user) {\n return;\n }\n items.add('dataItems', m(FieldSet, {\n className: \"Settings-gdpr FieldSet--form\",\n label: app.translator.trans('flarum-gdpr.forum.settings.data.heading')\n }, this.dataItems().toArray()), -100);\n });\n override('flarum/forum/components/SettingsPage', 'dataItems', function () {\n const items = new ItemList();\n items.add('gdprErasure', m(\"div\", {\n className: \"Form-group gdprErasure-container\"\n }, m(\"p\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-gdpr.forum.settings.request_erasure_help')), m(Button, {\n className: \"Button Button-gdprErasure\",\n icon: \"fas fa-user-minus\",\n onclick: () => app.modal.show(RequestErasureModal)\n }, app.translator.trans('flarum-gdpr.forum.settings.request_erasure_button'))), 50);\n items.add('gdprExport', m(\"div\", {\n className: \"Form-group gdprExport-container\"\n }, m(\"p\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-gdpr.forum.settings.export_data_help')), m(Button, {\n className: \"Button Button-gdprExport\",\n icon: \"fas fa-file-export\",\n onclick: () => app.modal.show(RequestDataExportModal, {\n user: this.user\n })\n }, app.translator.trans('flarum-gdpr.forum.settings.export_data_button'))), 40);\n return items;\n });\n}\nflarum.reg.add('flarum-gdpr', 'forum/extenders/extendUserSettingsPage', extendUserSettingsPage);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/HeaderSecondary');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/NotificationsDropdown');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Component');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/HeaderList');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/HeaderListItem');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/UserCard');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport Form from 'flarum/common/components/Form';\nimport app from 'flarum/forum/app';\nimport Button from 'flarum/common/components/Button';\nimport username from 'flarum/common/helpers/username';\nimport extractText from 'flarum/common/utils/extractText';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport Stream from 'flarum/common/utils/Stream';\nimport UserCard from 'flarum/forum/components/UserCard';\nimport FormModal from 'flarum/common/components/FormModal';\nexport default class ProcessErasureRequestModal extends FormModal {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"comments\", void 0);\n _defineProperty(this, \"loadingAnonymization\", false);\n _defineProperty(this, \"loadingDeletion\", false);\n _defineProperty(this, \"request\", void 0);\n }\n oninit(vnode) {\n super.oninit(vnode);\n this.request = this.attrs.request;\n this.comments = Stream('');\n }\n className() {\n return 'ProcessErasureRequestModal Modal--medium';\n }\n title() {\n return app.translator.trans('flarum-gdpr.forum.process_erasure.title');\n }\n content() {\n return m(\"div\", {\n className: \"Modal-body\"\n }, m(Form, {\n className: \"Form--centered\"\n }, this.fields().toArray()));\n }\n fields() {\n const items = new ItemList();\n const erasureRequest = this.attrs.request;\n items.add('text', m(\"div\", null, m(UserCard, {\n className: \"UserCard--popover UserCard--gdpr\",\n controlsButtonClassName: \"Button\",\n user: this.request.user()\n }), m(\"p\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-gdpr.forum.process_erasure.text', {\n name: username(this.request.user())\n }))));\n (erasureRequest == null ? void 0 : erasureRequest.reason()) && items.add('reason', m(\"p\", {\n className: \"helpText\"\n }, m(\"code\", null, erasureRequest.reason())));\n items.add('comments', m(\"div\", {\n className: \"Form-group\"\n }, m(\"textarea\", {\n className: \"FormControl\",\n value: this.comments(),\n bidi: this.comments,\n placeholder: extractText(app.translator.trans('flarum-gdpr.forum.process_erasure.comments_label'))\n })));\n if (app.forum.attribute('erasureAnonymizationAllowed')) {\n items.add('anonymize', m(\"div\", {\n className: \"Form-group\"\n }, Button.component({\n className: 'Button Button--primary Button--block',\n loading: this.loadingAnonymization,\n onclick: () => this.process('anonymization')\n }, app.translator.trans('flarum-gdpr.forum.process_erasure.anonymization_button'))));\n }\n if (app.forum.attribute('erasureDeletionAllowed')) {\n items.add('delete', m(\"div\", {\n className: \"Form-group\"\n }, Button.component({\n className: 'Button Button--danger Button--block',\n loading: this.loadingDeletion,\n onclick: () => this.process('deletion')\n }, app.translator.trans('flarum-gdpr.forum.process_erasure.deletion_button'))));\n }\n return items;\n }\n process(mode) {\n if (!confirm(app.translator.trans('flarum-gdpr.forum.process_erasure.confirm', {\n name: extractText(username(this.request.user())),\n mode\n }, true))) {\n return;\n }\n if (mode === 'anonymization') {\n this.loadingAnonymization = true;\n } else {\n this.loadingDeletion = true;\n }\n m.redraw();\n this.request.save({\n processedMode: mode,\n processorComment: this.comments()\n }).then(erasureRequest => {\n app.store.remove(erasureRequest);\n this.loadingAnonymization = false;\n this.loadingDeletion = false;\n m.redraw();\n this.hide();\n }).catch(() => {\n this.loadingAnonymization = false;\n this.loadingDeletion = false;\n m.redraw();\n });\n }\n}\nflarum.reg.add('flarum-gdpr', 'forum/components/ProcessErasureRequestModal', ProcessErasureRequestModal);","import app from 'flarum/forum/app';\nimport Component from 'flarum/common/Component';\nimport Avatar from 'flarum/common/components/Avatar';\nimport username from 'flarum/common/helpers/username';\nimport HeaderList from 'flarum/forum/components/HeaderList';\nimport HeaderListItem from 'flarum/forum/components/HeaderListItem';\nimport ItemList from 'flarum/common/utils/ItemList';\nimport ProcessErasureRequestModal from './ProcessErasureRequestModal';\nexport default class ErasureRequestsList extends Component {\n view() {\n const state = this.attrs.state;\n return m(HeaderList, {\n className: \"ErasureRequestsList\",\n title: app.translator.trans('flarum-gdpr.forum.erasure_requests.title'),\n controls: this.controlItems(),\n hasItems: state.hasItems(),\n loading: state.isLoading(),\n emptyText: app.translator.trans('flarum-gdpr.forum.erasure_requests.empty_text'),\n loadMore: () => state.hasNext() && !state.isLoadingNext() && state.loadNext()\n }, m(\"ul\", {\n className: \"HeaderListGroup-content\"\n }, this.content(state)));\n }\n showModal(request) {\n app.modal.show(ProcessErasureRequestModal, {\n request\n });\n }\n controlItems() {\n const items = new ItemList();\n return items;\n }\n content(state) {\n if (!state.isLoading() && state.hasItems()) {\n return state.getPages().map(page => {\n return page.items.map((request, index) => {\n return m(\"li\", null, m(HeaderListItem, {\n key: index,\n className: \"EraseRequest\",\n onclick: this.showModal.bind(this, request),\n avatar: m(Avatar, {\n user: request.user()\n }),\n icon: \"fas fa-user-edit\",\n content: app.translator.trans(\"flarum-gdpr.forum.erasure_requests.item_text\", {\n name: username(request.user())\n }),\n datetime: request.createdAt(),\n excerpt: \"\"\n }));\n });\n });\n }\n return null;\n }\n}\nflarum.reg.add('flarum-gdpr', 'forum/components/ErasureRequestsList', ErasureRequestsList);","import app from 'flarum/forum/app';\nimport NotificationsDropdown from 'flarum/forum/components/NotificationsDropdown';\nimport ErasureRequestsList from './ErasureRequestsList';\nexport default class ErasureRequestsDropdown extends NotificationsDropdown {\n static initAttrs(attrs) {\n attrs.label = attrs.label || app.translator.trans('flarum-gdpr.forum.erasure_requests.tooltip');\n attrs.icon = attrs.icon || 'fas fa-user-minus';\n super.initAttrs(attrs);\n }\n getContent() {\n return m(ErasureRequestsList, {\n state: this.attrs.state\n });\n }\n goToRoute() {\n m.route.set(app.route('erasure-requests'));\n }\n getUnreadCount() {\n if (!this.attrs.state.hasItems()) {\n return app.forum.attribute('erasureRequestCount');\n }\n return app.store.all('erasure-requests').length;\n }\n getNewCount() {\n return this.getUnreadCount();\n }\n}\nflarum.reg.add('flarum-gdpr', 'forum/components/ErasureRequestsDropdown', ErasureRequestsDropdown);","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport HeaderSecondary from 'flarum/forum/components/HeaderSecondary';\nimport ErasureRequestsDropdown from '../components/ErasureRequestsDropdown';\nexport default function extendHeaderSecondary() {\n extend(HeaderSecondary.prototype, 'items', function (items) {\n if (app.forum.attribute('erasureRequestCount')) {\n items.add('erasureRequests', m(ErasureRequestsDropdown, {\n state: app.erasureRequests\n }), 20);\n }\n });\n}\nflarum.reg.add('flarum-gdpr', 'forum/extenders/extendHeaderSecondary', extendHeaderSecondary);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Page');","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport Page from 'flarum/common/components/Page';\nexport default function extendPage() {\n extend(Page.prototype, 'oninit', function () {\n if (m.route.param('erasureRequestConfirmed')) {\n app.alerts.show({\n type: 'success'\n }, app.translator.trans('flarum-gdpr.forum.erasure_request_confirmed'));\n }\n });\n}\nflarum.reg.add('flarum-gdpr', 'forum/extenders/extendPage', extendPage);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/utils/UserControls');","import _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\nimport Form from 'flarum/common/components/Form';\nimport app from 'flarum/forum/app';\nimport Modal from 'flarum/common/components/Modal';\nimport username from 'flarum/common/helpers/username';\nimport Button from 'flarum/common/components/Button';\nexport default class DeleteUserModal extends Modal {\n constructor() {\n super(...arguments);\n _defineProperty(this, \"user\", void 0);\n _defineProperty(this, \"loadingAnonymization\", false);\n _defineProperty(this, \"loadingDeletion\", false);\n }\n oninit(vnode) {\n super.oninit(vnode);\n this.user = this.attrs.user;\n }\n className() {\n return 'DeleteUserModal Modal--small';\n }\n title() {\n return app.translator.trans('flarum-gdpr.forum.delete_user.title', {\n username: username(this.user)\n });\n }\n content() {\n return m(\"div\", {\n className: \"Modal-body\"\n }, m(Form, {\n className: \"Form--centered\"\n }, m(\"p\", {\n className: \"helpText\"\n }, app.translator.trans('flarum-gdpr.forum.delete_user.text', {\n username: username(this.user)\n })), m(\"div\", {\n className: \"Form-group\"\n }, m(Button, {\n className: \"Button Button--primary Button--block\",\n onclick: () => this.defaultErasure(),\n loading: this.loading,\n disabled: this.loading\n }, app.translator.trans('flarum-gdpr.forum.delete_user.modal_delete_button'))), app.forum.attribute('erasureAnonymizationAllowed') && app.forum.attribute('erasureDeletionAllowed') && m(\"div\", null, m(\"div\", {\n className: \"Form-group\"\n }, m(Button, {\n className: \"Button Button--block\",\n onclick: () => this.specificErasure('anonymization'),\n loading: this.loadingAnonymization,\n disabled: this.loadingAnonymization\n }, app.translator.trans('flarum-gdpr.forum.process_erasure.anonymization_button'))), m(\"div\", {\n className: \"Form-group\"\n }, m(Button, {\n className: \"Button Button--danger Button--block\",\n onclick: () => this.specificErasure('deletion'),\n loading: this.loadingDeletion,\n disabled: this.loadingDeletion\n }, app.translator.trans('flarum-gdpr.forum.process_erasure.deletion_button'))))));\n }\n defaultErasure() {\n this.loading = true;\n this.user.delete().then(() => {\n this.hide();\n this.loading = false;\n m.redraw();\n }, () => {});\n }\n specificErasure(mode) {\n if (mode === 'anonymization') {\n this.loadingAnonymization = true;\n } else {\n this.loadingDeletion = true;\n }\n this.user.delete({\n gdprMode: mode\n }).then(() => {\n this.hide();\n this.loadingAnonymization = false;\n this.loadingDeletion = false;\n m.redraw();\n }, () => []);\n }\n}\nflarum.reg.add('flarum-gdpr', 'forum/components/DeleteUserModal', DeleteUserModal);","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport UserControls from 'flarum/forum/utils/UserControls';\nimport Button from 'flarum/common/components/Button';\nimport RequestDataExportModal from '../../common/components/RequestDataExportModal';\nimport DeleteUserModal from '../components/DeleteUserModal';\nexport default function extendUserControls() {\n extend(UserControls, 'moderationControls', function (items, user) {\n if (user.canModerateExports()) {\n items.add('gdpr-export', m(Button, {\n icon: \"fas fa-file-export\",\n onclick: () => app.modal.show(RequestDataExportModal, {\n user\n })\n }, app.translator.trans('flarum-gdpr.forum.settings.export_data_button')));\n }\n });\n extend(UserControls, 'destructiveControls', function (items, user) {\n items.remove('delete');\n if (user.canDelete()) {\n items.add('gdpr-erase', m(Button, {\n icon: \"fas fa-eraser\",\n onclick: () => app.modal.show(DeleteUserModal, {\n user\n })\n }, app.translator.trans('flarum-gdpr.forum.delete_user.delete_button')));\n }\n });\n}\nflarum.reg.add('flarum-gdpr', 'forum/extenders/extendUserControls', extendUserControls);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/models/User');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/components/Badge');","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/extenders');","import app from 'flarum/forum/app';\nimport Page from 'flarum/common/components/Page';\nimport ErasureRequestsList from './ErasureRequestsList';\nexport default class ErasureRequestsPage extends Page {\n oninit(vnode) {\n super.oninit(vnode);\n app.history.push('erasure-requests');\n app.erasureRequests.load();\n this.bodyClass = 'App--ErasureRequests';\n }\n view() {\n return m(\"div\", {\n className: \"ErasureRequestsPage\"\n }, m(ErasureRequestsList, {\n state: app.erasureRequests\n }));\n }\n}\nflarum.reg.add('flarum-gdpr', 'forum/components/ErasureRequestsPage', ErasureRequestsPage);","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'common/Model');","import Model from 'flarum/common/Model';\nexport default class ErasureRequest extends Model {\n status() {\n return Model.attribute('status').call(this);\n }\n reason() {\n return Model.attribute('reason').call(this);\n }\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate).call(this);\n }\n userConfirmedAt() {\n return Model.attribute('userConfirmedAt', Model.transformDate).call(this);\n }\n processedAt() {\n return Model.attribute('processedAt', Model.transformDate).call(this);\n }\n processorComment() {\n return Model.attribute('processorComment').call(this);\n }\n processedMode() {\n return Model.attribute('processedMode').call(this);\n }\n user() {\n return Model.hasOne('user').call(this);\n }\n processedBy() {\n return Model.hasOne('processedBy').call(this);\n }\n}\nflarum.reg.add('flarum-gdpr', 'common/models/ErasureRequest', ErasureRequest);","import Model from 'flarum/common/Model';\nexport default class Export extends Model {\n file() {\n return Model.attribute('file').call(this);\n }\n createdAt() {\n return Model.attribute('createdAt', Model.transformDate);\n }\n destroysAt() {\n return Model.attribute('destroysAt', Model.transformDate);\n }\n user() {\n return Model.hasOne('user');\n }\n actor() {\n return Model.hasOne('actor');\n }\n}\nflarum.reg.add('flarum-gdpr', 'common/models/Export', Export);","import Extend from 'flarum/common/extenders';\nimport User from 'flarum/common/models/User';\nimport ErasureRequest from './models/ErasureRequest';\nimport Export from './models/Export';\nexport default [new Extend.Store() //\n.add('user-erasure-requests', ErasureRequest).add('gdpr-exports', Export), new Extend.Model(User) //\n.attribute('canModerateExports').attribute('anonymized').hasOne('erasureRequest')];","const __WEBPACK_NAMESPACE_OBJECT__ = flarum.reg.get('core', 'forum/components/Notification');","import app from 'flarum/forum/app';\nimport Notification from 'flarum/forum/components/Notification';\nimport username from 'flarum/common/helpers/username';\nexport default class ExportAvailableNotification extends Notification {\n icon() {\n return 'fas fa-file-export';\n }\n href() {\n const exportModel = this.attrs.notification.subject();\n\n // Building the full url scheme so that Mithril treats this as an external link, so the download will work correctly.\n return app.forum.attribute('baseUrl') + \"/gdpr/export/\".concat(exportModel.file());\n }\n content() {\n const notification = this.attrs.notification;\n return app.translator.trans('flarum-gdpr.forum.notification.export-ready', {\n username: username(notification.fromUser())\n });\n }\n excerpt() {\n return null;\n }\n}\nflarum.reg.add('flarum-gdpr', 'forum/components/ExportAvailableNotification', ExportAvailableNotification);","import Extend from 'flarum/common/extenders';\nimport ErasureRequestsPage from './components/ErasureRequestsPage';\nimport { default as extend } from '../common/extend';\nimport ExportAvailableNotification from './components/ExportAvailableNotification';\nexport default [...extend, new Extend.Routes() //\n.add('erasure-requests', '/erasure-requests', ErasureRequestsPage), new Extend.Notification().add('gdprExportAvailable', ExportAvailableNotification)];","import app from 'flarum/forum/app';\nimport ErasureRequestsListState from './states/ErasureRequestsListState';\nimport extendUserSettingsPage from './extenders/extendUserSettingsPage';\nimport extendHeaderSecondary from './extenders/extendHeaderSecondary';\nimport extendPage from './extenders/extendPage';\nimport extendUserControls from './extenders/extendUserControls';\nimport addAnonymousBadges from './extenders/addAnonymousBadges';\nexport { default as extend } from './extend';\napp.initializers.add('flarum-gdpr', () => {\n app.erasureRequests = new ErasureRequestsListState();\n extendUserSettingsPage();\n extendHeaderSecondary();\n extendPage();\n extendUserControls();\n addAnonymousBadges();\n});","import app from 'flarum/forum/app';\nimport { extend } from 'flarum/common/extend';\nimport User from 'flarum/common/models/User';\nimport Badge from 'flarum/common/components/Badge';\nexport default function () {\n extend(User.prototype, 'badges', function (badges) {\n if (this.anonymized()) {\n badges.add('anonymized', m(Badge, {\n label: app.translator.trans('flarum-gdpr.forum.badges.anonymized_user'),\n icon: \"fas fa-user-secret\",\n type: \"anonymized\"\n }));\n }\n });\n}"],"names":["__webpack_require__","module","getter","__esModule","d","a","exports","definition","key","o","Object","defineProperty","enumerable","get","obj","prop","prototype","hasOwnProperty","call","Symbol","toStringTag","value","flarum","reg","ErasureRequestsListState","constructor","super","type","load","_app$session$user","user","attribute","this","pages","location","page","length","Promise","resolve","loadNext","add","_typeof","iterator","_defineProperty","e","r","t","i","toPrimitive","TypeError","String","toPropertyKey","configurable","writable","RequestErasureModal","arguments","oninit","vnode","reason","password","className","title","trans","content","m","fields","toArray","_this$user","items","currRequest","erasureRequest","status","concat","onclick","oncancel","bind","loading","bidi","placeholder","oninput","target","rows","redraw","request","method","url","id","then","close","data","onsubmit","preventDefault","createRecord","save","meta","pushData","relationships","catch","RequestDataExportModal","attrs","username","requestExport","disabled","body","attributes","userId","hide","loaded","extendUserSettingsPage","extend","label","dataItems","override","icon","show","ProcessErasureRequestModal","comments","controlsButtonClassName","name","loadingAnonymization","process","loadingDeletion","mode","confirm","processedMode","processorComment","remove","ErasureRequestsList","view","state","controls","controlItems","hasItems","isLoading","emptyText","loadMore","hasNext","isLoadingNext","showModal","getPages","map","index","avatar","datetime","createdAt","excerpt","ErasureRequestsDropdown","initAttrs","getContent","goToRoute","route","set","getUnreadCount","all","getNewCount","extendHeaderSecondary","extendPage","param","DeleteUserModal","defaultErasure","specificErasure","delete","gdprMode","extendUserControls","canModerateExports","canDelete","ErasureRequestsPage","push","bodyClass","ErasureRequest","userConfirmedAt","processedAt","processedBy","Export","file","destroysAt","actor","hasOne","ExportAvailableNotification","href","exportModel","notification","subject","fromUser","badges","anonymized"],"sourceRoot":""} \ No newline at end of file