diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/UsersManager/vue/dist/UsersManager.umd.js | 219 | ||||
-rw-r--r-- | plugins/UsersManager/vue/dist/UsersManager.umd.min.js | 20 |
2 files changed, 133 insertions, 106 deletions
diff --git a/plugins/UsersManager/vue/dist/UsersManager.umd.js b/plugins/UsersManager/vue/dist/UsersManager.umd.js index 0cbea5ff79..46c3073420 100644 --- a/plugins/UsersManager/vue/dist/UsersManager.umd.js +++ b/plugins/UsersManager/vue/dist/UsersManager.umd.js @@ -1449,90 +1449,90 @@ UserPermissionsEditvue_type_script_lang_ts.render = UserPermissionsEditvue_type_ directiveName: 'piwikUserPermissionsEdit', restrict: 'E' })); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/UsersManager/vue/src/UserEditForm/UserEditForm.vue?vue&type=template&id=5529f274 +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/UsersManager/vue/src/UserEditForm/UserEditForm.vue?vue&type=template&id=247f67bc -var UserEditFormvue_type_template_id_5529f274_hoisted_1 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_1 = { class: "row" }; -var UserEditFormvue_type_template_id_5529f274_hoisted_2 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_2 = { key: 0, class: "col m2 entityList" }; -var UserEditFormvue_type_template_id_5529f274_hoisted_3 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_3 = { class: "listCircle" }; -var UserEditFormvue_type_template_id_5529f274_hoisted_4 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_4 = { key: 0, class: "icon-warning" }; -var UserEditFormvue_type_template_id_5529f274_hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { +var UserEditFormvue_type_template_id_247f67bc_hoisted_5 = /*#__PURE__*/Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { class: "save-button-spacer hide-on-small-only" }, null, -1); -var UserEditFormvue_type_template_id_5529f274_hoisted_6 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_6 = { href: "", class: "entityCancelLink" }; -var UserEditFormvue_type_template_id_5529f274_hoisted_7 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_7 = { class: "visibleTab col m10" }; -var UserEditFormvue_type_template_id_5529f274_hoisted_8 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_8 = { key: 0, class: "basic-info-tab" }; -var UserEditFormvue_type_template_id_5529f274_hoisted_9 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_9 = { class: "form-group row", style: { "position": "relative" } }; -var UserEditFormvue_type_template_id_5529f274_hoisted_10 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_10 = { class: "col s12 m6" }; -var UserEditFormvue_type_template_id_5529f274_hoisted_11 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_11 = { class: "col s12 m6" }; -var UserEditFormvue_type_template_id_5529f274_hoisted_12 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_12 = { key: 0, class: "form-help" }; -var UserEditFormvue_type_template_id_5529f274_hoisted_13 = ["innerHTML"]; -var UserEditFormvue_type_template_id_5529f274_hoisted_14 = ["innerHTML"]; -var UserEditFormvue_type_template_id_5529f274_hoisted_15 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_13 = ["innerHTML"]; +var UserEditFormvue_type_template_id_247f67bc_hoisted_14 = ["innerHTML"]; +var UserEditFormvue_type_template_id_247f67bc_hoisted_15 = { key: 0, class: "entityCancel" }; -var UserEditFormvue_type_template_id_5529f274_hoisted_16 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_16 = { key: 1, class: "user-permissions" }; -var UserEditFormvue_type_template_id_5529f274_hoisted_17 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_17 = { key: 0 }; -var UserEditFormvue_type_template_id_5529f274_hoisted_18 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_18 = { key: 1, class: "alert alert-info" }; -var UserEditFormvue_type_template_id_5529f274_hoisted_19 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_19 = { key: 2, class: "superuser-access form-group" }; -var UserEditFormvue_type_template_id_5529f274_hoisted_20 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_20 = { key: 0 }; -var UserEditFormvue_type_template_id_5529f274_hoisted_21 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_21 = { key: 1 }; -var UserEditFormvue_type_template_id_5529f274_hoisted_22 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_22 = { key: 3, class: "twofa-reset form-group" }; -var UserEditFormvue_type_template_id_5529f274_hoisted_23 = { +var UserEditFormvue_type_template_id_247f67bc_hoisted_23 = { class: "resetTwoFa" }; -var UserEditFormvue_type_template_id_5529f274_hoisted_24 = ["innerHTML"]; -function UserEditFormvue_type_template_id_5529f274_render(_ctx, _cache, $props, $setup, $data, $options) { +var UserEditFormvue_type_template_id_247f67bc_hoisted_24 = ["innerHTML"]; +function UserEditFormvue_type_template_id_247f67bc_render(_ctx, _cache, $props, $setup, $data, $options) { var _component_Field = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Field"); var _component_SaveButton = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("SaveButton"); @@ -1552,7 +1552,7 @@ function UserEditFormvue_type_template_id_5529f274_render(_ctx, _cache, $props, "content-title": "".concat(_ctx.formTitle, " ").concat(!_ctx.isAdd ? "'".concat(_ctx.theUser.login, "'") : '') }, { default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { - return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserEditFormvue_type_template_id_5529f274_hoisted_1, [!_ctx.isAdd ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserEditFormvue_type_template_id_5529f274_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", UserEditFormvue_type_template_id_5529f274_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserEditFormvue_type_template_id_247f67bc_hoisted_1, [!_ctx.isAdd ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserEditFormvue_type_template_id_247f67bc_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("ul", UserEditFormvue_type_template_id_247f67bc_hoisted_3, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("li", { class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])([{ active: _ctx.activeTab === 'basic' }, "menuBasicInfo"]) @@ -1573,7 +1573,7 @@ function UserEditFormvue_type_template_id_5529f274_render(_ctx, _cache, $props, style: { "margin-right": "3.5px" } - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_Permissions')), 1), !_ctx.userHasAccess && !_ctx.theUser.superuser_access ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", UserEditFormvue_type_template_id_5529f274_hoisted_4)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2), _ctx.currentUserRole === 'superuser' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_Permissions')), 1), !_ctx.userHasAccess && !_ctx.theUser.superuser_access ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", UserEditFormvue_type_template_id_247f67bc_hoisted_4)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 2), _ctx.currentUserRole === 'superuser' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("li", { key: 0, class: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["normalizeClass"])([{ active: _ctx.activeTab === 'superuser' @@ -1593,12 +1593,12 @@ function UserEditFormvue_type_template_id_5529f274_render(_ctx, _cache, $props, onClick: _cache[3] || (_cache[3] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])(function ($event) { return _ctx.activeTab = '2fa'; }, ["prevent"])) - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_TwoFactorAuthentication')), 1)], 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), UserEditFormvue_type_template_id_5529f274_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_TwoFactorAuthentication')), 1)], 2)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), UserEditFormvue_type_template_id_247f67bc_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", { class: "entityCancel", onClick: _cache[4] || (_cache[4] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])(function ($event) { return _ctx.onDoneEditing(); }, ["prevent"])) - }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", UserEditFormvue_type_template_id_5529f274_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('Mobile_NavigationBack')), 1)])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserEditFormvue_type_template_id_5529f274_hoisted_7, [_ctx.activeTab === 'basic' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserEditFormvue_type_template_id_5529f274_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", UserEditFormvue_type_template_id_247f67bc_hoisted_6, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('Mobile_NavigationBack')), 1)])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserEditFormvue_type_template_id_247f67bc_hoisted_7, [_ctx.activeTab === 'basic' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserEditFormvue_type_template_id_247f67bc_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { modelValue: _ctx.theUser.login, "onUpdate:modelValue": _cache[5] || (_cache[5] = function ($event) { return _ctx.theUser.login = $event; @@ -1644,7 +1644,7 @@ function UserEditFormvue_type_template_id_5529f274_render(_ctx, _cache, $props, }, title: _ctx.translate('UsersManager_FirstWebsitePermission'), "inline-help": _ctx.translate('UsersManager_FirstSiteInlineHelp') - }, null, 8, ["modelValue", "disabled", "title", "inline-help"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserEditFormvue_type_template_id_5529f274_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserEditFormvue_type_template_id_5529f274_hoisted_10, [_ctx.currentUserRole === 'superuser' || _ctx.isAdd ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_SaveButton, { + }, null, 8, ["modelValue", "disabled", "title", "inline-help"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserEditFormvue_type_template_id_247f67bc_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserEditFormvue_type_template_id_247f67bc_hoisted_10, [_ctx.currentUserRole === 'superuser' || _ctx.isAdd ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createBlock"])(_component_SaveButton, { key: 0, value: _ctx.saveButtonLabel, disabled: _ctx.isAdd && (!_ctx.firstSiteAccess || !_ctx.firstSiteAccess.id), @@ -1652,10 +1652,10 @@ function UserEditFormvue_type_template_id_5529f274_render(_ctx, _cache, $props, onConfirm: _cache[9] || (_cache[9] = function ($event) { return _ctx.saveUserInfo(); }) - }, null, 8, ["value", "disabled", "saving"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserEditFormvue_type_template_id_5529f274_hoisted_11, [_ctx.isAdd ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserEditFormvue_type_template_id_5529f274_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { + }, null, 8, ["value", "disabled", "saving"])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserEditFormvue_type_template_id_247f67bc_hoisted_11, [_ctx.isAdd ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserEditFormvue_type_template_id_247f67bc_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("span", { class: "inline-help", innerHTML: _ctx.$sanitize(_ctx.translate('UsersManager_InviteSuccessNotification', [7])) - }, null, 8, UserEditFormvue_type_template_id_5529f274_hoisted_13)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PasswordConfirmation, { + }, null, 8, UserEditFormvue_type_template_id_247f67bc_hoisted_13)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PasswordConfirmation, { modelValue: _ctx.showPasswordConfirmationForInviteUser, "onUpdate:modelValue": _cache[10] || (_cache[10] = function ($event) { return _ctx.showPasswordConfirmationForInviteUser = $event; @@ -1665,16 +1665,16 @@ function UserEditFormvue_type_template_id_5529f274_render(_ctx, _cache, $props, default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", { innerHTML: _ctx.$sanitize(_ctx.inviteUserTitle) - }, null, 8, UserEditFormvue_type_template_id_5529f274_hoisted_14), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_ConfirmWithPassword')), 1)]; + }, null, 8, UserEditFormvue_type_template_id_247f67bc_hoisted_14), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_ConfirmWithPassword')), 1)]; }), _: 1 - }, 8, ["modelValue", "onConfirmed"])]), _ctx.isAdd ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserEditFormvue_type_template_id_5529f274_hoisted_15, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, 8, ["modelValue", "onConfirmed"])]), _ctx.isAdd ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserEditFormvue_type_template_id_247f67bc_hoisted_15, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { href: "", class: "entityCancelLink", onClick: _cache[11] || (_cache[11] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])(function ($event) { return _ctx.onDoneEditing(); }, ["prevent"])) - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Cancel')), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !_ctx.isAdd ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserEditFormvue_type_template_id_5529f274_hoisted_16, [!_ctx.theUser.superuser_access ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserEditFormvue_type_template_id_5529f274_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_UserPermissionsEdit, { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Cancel')), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !_ctx.isAdd ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserEditFormvue_type_template_id_247f67bc_hoisted_16, [!_ctx.theUser.superuser_access ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserEditFormvue_type_template_id_247f67bc_hoisted_17, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_UserPermissionsEdit, { "user-login": _ctx.theUser.login, onUserHasAccessDetected: _cache[12] || (_cache[12] = function ($event) { return _ctx.userHasAccess = $event.hasAccess; @@ -1684,7 +1684,7 @@ function UserEditFormvue_type_template_id_5529f274_render(_ctx, _cache, $props, }), "access-levels": _ctx.accessLevels, "filter-access-levels": _ctx.filterAccessLevels - }, null, 8, ["user-login", "access-levels", "filter-access-levels"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.theUser.superuser_access ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserEditFormvue_type_template_id_5529f274_hoisted_18, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_SuperUsersPermissionsNotice')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 512)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.activeTab === 'permissions']]) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.activeTab === 'superuser' && _ctx.currentUserRole === 'superuser' && !_ctx.isAdd ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserEditFormvue_type_template_id_5529f274_hoisted_19, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_SuperUserIntro1')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("strong", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_SuperUserIntro2')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }, null, 8, ["user-login", "access-levels", "filter-access-levels"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.theUser.superuser_access ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserEditFormvue_type_template_id_247f67bc_hoisted_18, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_SuperUsersPermissionsNotice')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)], 512)), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], _ctx.activeTab === 'permissions']]) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.activeTab === 'superuser' && _ctx.currentUserRole === 'superuser' && !_ctx.isAdd ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserEditFormvue_type_template_id_247f67bc_hoisted_19, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_SuperUserIntro1')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("strong", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_SuperUserIntro2')), 1)]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { modelValue: _ctx.superUserAccessChecked, "onUpdate:modelValue": _cache[14] || (_cache[14] = function ($event) { return _ctx.superUserAccessChecked = $event; @@ -1707,10 +1707,10 @@ function UserEditFormvue_type_template_id_5529f274_render(_ctx, _cache, $props, }) }, { default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { - return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_AreYouSure')), 1), _ctx.theUser.superuser_access ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("p", UserEditFormvue_type_template_id_5529f274_hoisted_20, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_RemoveSuperuserAccessConfirm')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !_ctx.theUser.superuser_access ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("p", UserEditFormvue_type_template_id_5529f274_hoisted_21, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_AddSuperuserAccessConfirm')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]; + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_AreYouSure')), 1), _ctx.theUser.superuser_access ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("p", UserEditFormvue_type_template_id_247f67bc_hoisted_20, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_RemoveSuperuserAccessConfirm')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), !_ctx.theUser.superuser_access ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("p", UserEditFormvue_type_template_id_247f67bc_hoisted_21, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_AddSuperuserAccessConfirm')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]; }), _: 1 - }, 8, ["modelValue", "onConfirmed"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.currentUserRole === 'superuser' && !_ctx.isAdd ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserEditFormvue_type_template_id_5529f274_hoisted_22, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_ResetTwoFactorAuthenticationInfo')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserEditFormvue_type_template_id_5529f274_hoisted_23, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_SaveButton, { + }, 8, ["modelValue", "onConfirmed"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.currentUserRole === 'superuser' && !_ctx.isAdd ? Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UserEditFormvue_type_template_id_247f67bc_hoisted_22, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_ResetTwoFactorAuthenticationInfo')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UserEditFormvue_type_template_id_247f67bc_hoisted_23, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_SaveButton, { saving: _ctx.isResetting2FA, onConfirm: _cache[18] || (_cache[18] = function ($event) { return _ctx.confirmReset2FA(); @@ -1737,7 +1737,7 @@ function UserEditFormvue_type_template_id_5529f274_render(_ctx, _cache, $props, default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", { innerHTML: _ctx.$sanitize(_ctx.changePasswordTitle) - }, null, 8, UserEditFormvue_type_template_id_5529f274_hoisted_24), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_ConfirmWithPassword')), 1)]; + }, null, 8, UserEditFormvue_type_template_id_247f67bc_hoisted_24), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_ConfirmWithPassword')), 1)]; }), _: 1 }, 8, ["modelValue", "onConfirmed"])]; @@ -1745,7 +1745,7 @@ function UserEditFormvue_type_template_id_5529f274_render(_ctx, _cache, $props, _: 1 }, 8, ["class", "content-title"]); } -// CONCATENATED MODULE: ./plugins/UsersManager/vue/src/UserEditForm/UserEditForm.vue?vue&type=template&id=5529f274 +// CONCATENATED MODULE: ./plugins/UsersManager/vue/src/UserEditForm/UserEditForm.vue?vue&type=template&id=247f67bc // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/UsersManager/vue/src/UserEditForm/UserEditForm.vue?vue&type=script&lang=ts @@ -1815,7 +1815,7 @@ var DEFAULT_USER = { isShowingPasswordConfirm: false }; }, - emits: ['done', 'updated'], + emits: ['done', 'updated', 'show-notification'], watch: { user: function user(newVal) { this.onUserChange(newVal); @@ -1880,7 +1880,7 @@ var DEFAULT_USER = { }).catch(function (e) { _this2.isSavingUserInfo = false; throw e; - }).then(function () { + }).then(function (r) { _this2.firstSiteAccess = null; _this2.isSavingUserInfo = false; _this2.isUserModified = true; @@ -1888,11 +1888,11 @@ var DEFAULT_USER = { _this2.resetPasswordVar(); - _this2.showUserCreatedNotification(); - _this2.$emit('updated', { user: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["readonly"])(_this2.theUser) }); + + _this2.$emit('show-notification', r.value); }); }, resetPasswordVar: function resetPasswordVar() { @@ -1908,13 +1908,6 @@ var DEFAULT_USER = { type: 'toast' }); }, - showUserCreatedNotification: function showUserCreatedNotification() { - external_CoreHome_["NotificationsStore"].show({ - message: Object(external_CoreHome_["translate"])('UsersManager_InviteSuccess'), - context: 'success', - type: 'toast' - }); - }, reset2FA: function reset2FA(password) { var _this3 = this; @@ -2005,7 +1998,7 @@ var DEFAULT_USER = { -UserEditFormvue_type_script_lang_ts.render = UserEditFormvue_type_template_id_5529f274_render +UserEditFormvue_type_script_lang_ts.render = UserEditFormvue_type_template_id_247f67bc_render /* harmony default export */ var UserEditForm = (UserEditFormvue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/UsersManager/vue/src/UserEditForm/UserEditForm.adapter.ts @@ -2922,47 +2915,56 @@ PagedUsersListvue_type_script_lang_ts.render = PagedUsersListvue_type_template_i directiveName: 'piwikPagedUsersList', restrict: 'E' })); -// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/UsersManager/vue/src/UsersManager/UsersManager.vue?vue&type=template&id=64097d4c +// CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-babel/node_modules/cache-loader/dist/cjs.js??ref--12-0!./node_modules/@vue/cli-plugin-babel/node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/templateLoader.js??ref--6!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/UsersManager/vue/src/UsersManager/UsersManager.vue?vue&type=template&id=8d37426e -var UsersManagervue_type_template_id_64097d4c_hoisted_1 = { +var UsersManagervue_type_template_id_8d37426e_hoisted_1 = { class: "usersManager" }; -var UsersManagervue_type_template_id_64097d4c_hoisted_2 = { +var UsersManagervue_type_template_id_8d37426e_hoisted_2 = { + key: 0, + class: "notification system notification-success" +}; +var UsersManagervue_type_template_id_8d37426e_hoisted_3 = { + key: 1 +}; +var UsersManagervue_type_template_id_8d37426e_hoisted_4 = { key: 0 }; -var UsersManagervue_type_template_id_64097d4c_hoisted_3 = { +var UsersManagervue_type_template_id_8d37426e_hoisted_5 = { key: 1 }; -var UsersManagervue_type_template_id_64097d4c_hoisted_4 = { +var UsersManagervue_type_template_id_8d37426e_hoisted_6 = { class: "row add-user-container" }; -var UsersManagervue_type_template_id_64097d4c_hoisted_5 = { +var UsersManagervue_type_template_id_8d37426e_hoisted_7 = { class: "col s12" }; -var UsersManagervue_type_template_id_64097d4c_hoisted_6 = { +var UsersManagervue_type_template_id_8d37426e_hoisted_8 = { class: "input-field", style: { "margin-right": "3.5px" } }; -var UsersManagervue_type_template_id_64097d4c_hoisted_7 = { +var UsersManagervue_type_template_id_8d37426e_hoisted_9 = { key: 0, class: "input-field" }; -var UsersManagervue_type_template_id_64097d4c_hoisted_8 = { - key: 0 +var UsersManagervue_type_template_id_8d37426e_hoisted_10 = { + key: 1 }; -var UsersManagervue_type_template_id_64097d4c_hoisted_9 = { +var UsersManagervue_type_template_id_8d37426e_hoisted_11 = { class: "add-existing-user-modal modal", ref: "addExistingUserModal" }; -var UsersManagervue_type_template_id_64097d4c_hoisted_10 = { +var UsersManagervue_type_template_id_8d37426e_hoisted_12 = { class: "modal-content" }; -var UsersManagervue_type_template_id_64097d4c_hoisted_11 = { +var UsersManagervue_type_template_id_8d37426e_hoisted_13 = { class: "modal-footer" }; -function UsersManagervue_type_template_id_64097d4c_render(_ctx, _cache, $props, $setup, $data, $options) { +function UsersManagervue_type_template_id_8d37426e_render(_ctx, _cache, $props, $setup, $data, $options) { + var _component_Notification = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("Notification"); + var _component_EnrichedHeadline = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("EnrichedHeadline"); var _component_PagedUsersList = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveComponent"])("PagedUsersList"); @@ -2975,7 +2977,20 @@ function UsersManagervue_type_template_id_64097d4c_render(_ctx, _cache, $props, var _directive_tooltips = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["resolveDirective"])("tooltips"); - return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UsersManagervue_type_template_id_64097d4c_hoisted_1, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_EnrichedHeadline, { + return Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])((Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UsersManagervue_type_template_id_8d37426e_hoisted_1, [_ctx.showNotification ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UsersManagervue_type_template_id_8d37426e_hoisted_2, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Notification, { + context: "success" + }, { + default: Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withCtx"])(function () { + return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_ResendInviteSuccess')) + " ", 1), !_ctx.copied ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("a", { + key: 0, + href: "#", + onClick: _cache[0] || (_cache[0] = function ($event) { + return _ctx.copyToClipboard(_ctx.token); + }) + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_CopyLink')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.copied ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("span", UsersManagervue_type_template_id_8d37426e_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_Copied')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)]; + }), + _: 1 + })])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withDirectives"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h2", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_EnrichedHeadline, { "help-url": "https://matomo.org/docs/manage-users/", "feature-name": "Users Management" }, { @@ -2983,32 +2998,32 @@ function UsersManagervue_type_template_id_64097d4c_render(_ctx, _cache, $props, return [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createTextVNode"])(Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_ManageUsers')), 1)]; }), _: 1 - })]), _ctx.currentUserRole === 'superuser' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("p", UsersManagervue_type_template_id_64097d4c_hoisted_2, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_ManageUsersDesc')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.currentUserRole === 'admin' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("p", UsersManagervue_type_template_id_64097d4c_hoisted_3, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_ManageUsersAdminDesc')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UsersManagervue_type_template_id_64097d4c_hoisted_4, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UsersManagervue_type_template_id_64097d4c_hoisted_5, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UsersManagervue_type_template_id_64097d4c_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + })]), _ctx.currentUserRole === 'superuser' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("p", UsersManagervue_type_template_id_8d37426e_hoisted_4, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_ManageUsersDesc')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), _ctx.currentUserRole === 'admin' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("p", UsersManagervue_type_template_id_8d37426e_hoisted_5, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_ManageUsersAdminDesc')), 1)) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UsersManagervue_type_template_id_8d37426e_hoisted_6, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UsersManagervue_type_template_id_8d37426e_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UsersManagervue_type_template_id_8d37426e_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "btn add-new-user", - onClick: _cache[0] || (_cache[0] = function ($event) { + onClick: _cache[1] || (_cache[1] = function ($event) { return _ctx.onAddNewUser(); }) - }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_InviteNewUser')), 1)]), _ctx.currentUserRole !== 'superuser' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UsersManagervue_type_template_id_64097d4c_hoisted_7, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_InviteNewUser')), 1)]), _ctx.currentUserRole !== 'superuser' ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UsersManagervue_type_template_id_8d37426e_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { class: "btn add-existing-user", - onClick: _cache[1] || (_cache[1] = function ($event) { + onClick: _cache[2] || (_cache[2] = function ($event) { return _ctx.showAddExistingUserModal(); }) }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_AddExistingUser')), 1)])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true)])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_PagedUsersList, { - onEditUser: _cache[2] || (_cache[2] = function ($event) { + onEditUser: _cache[3] || (_cache[3] = function ($event) { return _ctx.onEditUser($event.user); }), - onChangeUserRole: _cache[3] || (_cache[3] = function ($event) { + onChangeUserRole: _cache[4] || (_cache[4] = function ($event) { return _ctx.onChangeUserRole($event.users, $event.role); }), - onDeleteUser: _cache[4] || (_cache[4] = function ($event) { + onDeleteUser: _cache[5] || (_cache[5] = function ($event) { return _ctx.onDeleteUser($event.users, $event.password); }), - onSearchChange: _cache[5] || (_cache[5] = function ($event) { + onSearchChange: _cache[6] || (_cache[6] = function ($event) { _ctx.searchParams = $event.params; _ctx.fetchUsers(); }), - onResendInvite: _cache[6] || (_cache[6] = function ($event) { + onResendInvite: _cache[7] || (_cache[7] = function ($event) { return _ctx.onResendInvite($event.user); }), "initial-site-id": _ctx.initialSiteId, @@ -3021,8 +3036,8 @@ function UsersManagervue_type_template_id_64097d4c_render(_ctx, _cache, $props, "search-params": _ctx.searchParams, users: _ctx.users, "total-entries": _ctx.totalEntries - }, null, 8, ["initial-site-id", "initial-site-name", "is-loading-users", "current-user-role", "access-levels", "filter-access-levels", "filter-status-levels", "search-params", "users", "total-entries"])], 512), [[_directive_content_intro]])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.isEditing]]), _ctx.isEditing ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UsersManagervue_type_template_id_64097d4c_hoisted_8, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_UserEditForm, { - onDone: _cache[7] || (_cache[7] = function ($event) { + }, null, 8, ["initial-site-id", "initial-site-name", "is-loading-users", "current-user-role", "access-levels", "filter-access-levels", "filter-status-levels", "search-params", "users", "total-entries"])], 512), [[_directive_content_intro]])], 512), [[external_commonjs_vue_commonjs2_vue_root_Vue_["vShow"], !_ctx.isEditing]]), _ctx.isEditing ? (Object(external_commonjs_vue_commonjs2_vue_root_Vue_["openBlock"])(), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementBlock"])("div", UsersManagervue_type_template_id_8d37426e_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_UserEditForm, { + onDone: _cache[8] || (_cache[8] = function ($event) { return _ctx.onDoneEditing($event.isUserModified); }), user: _ctx.userBeingEdited, @@ -3031,20 +3046,21 @@ function UsersManagervue_type_template_id_64097d4c_render(_ctx, _cache, $props, "filter-access-levels": _ctx.filterAccessLevels, "initial-site-id": _ctx.initialSiteId, "initial-site-name": _ctx.initialSiteName, - onUpdated: _cache[8] || (_cache[8] = function ($event) { + onUpdated: _cache[9] || (_cache[9] = function ($event) { return _ctx.userBeingEdited = $event.user; - }) - }, null, 8, ["user", "current-user-role", "access-levels", "filter-access-levels", "initial-site-id", "initial-site-name"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UsersManagervue_type_template_id_64097d4c_hoisted_9, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UsersManagervue_type_template_id_64097d4c_hoisted_10, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h3", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_AddExistingUser')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_EnterUsernameOrEmail')) + ":", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { + }), + onShowNotification: _ctx.showInviteNotification + }, null, 8, ["user", "current-user-role", "access-levels", "filter-access-levels", "initial-site-id", "initial-site-name", "onShowNotification"])])) : Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createCommentVNode"])("", true), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UsersManagervue_type_template_id_8d37426e_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UsersManagervue_type_template_id_8d37426e_hoisted_12, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("h3", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_AddExistingUser')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("p", null, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('UsersManager_EnterUsernameOrEmail')) + ":", 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", null, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createVNode"])(_component_Field, { modelValue: _ctx.addNewUserLoginEmail, - "onUpdate:modelValue": _cache[9] || (_cache[9] = function ($event) { + "onUpdate:modelValue": _cache[10] || (_cache[10] = function ($event) { return _ctx.addNewUserLoginEmail = $event; }), name: "add-existing-user-email", uicontrol: "text" - }, null, 8, ["modelValue"])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UsersManagervue_type_template_id_64097d4c_hoisted_11, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { + }, null, 8, ["modelValue"])])]), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("div", UsersManagervue_type_template_id_8d37426e_hoisted_13, [Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { href: "", class: "modal-action modal-close btn", - onClick: _cache[10] || (_cache[10] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])(function ($event) { + onClick: _cache[11] || (_cache[11] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])(function ($event) { return _ctx.addExistingUser(); }, ["prevent"])), style: { @@ -3053,12 +3069,12 @@ function UsersManagervue_type_template_id_64097d4c_render(_ctx, _cache, $props, }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Add')), 1), Object(external_commonjs_vue_commonjs2_vue_root_Vue_["createElementVNode"])("a", { href: "", class: "modal-action modal-close modal-no", - onClick: _cache[11] || (_cache[11] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])(function ($event) { + onClick: _cache[12] || (_cache[12] = Object(external_commonjs_vue_commonjs2_vue_root_Vue_["withModifiers"])(function ($event) { return _ctx.addNewUserLoginEmail = null; }, ["prevent"])) }, Object(external_commonjs_vue_commonjs2_vue_root_Vue_["toDisplayString"])(_ctx.translate('General_Cancel')), 1)])], 512)], 512)), [[_directive_tooltips]]); } -// CONCATENATED MODULE: ./plugins/UsersManager/vue/src/UsersManager/UsersManager.vue?vue&type=template&id=64097d4c +// CONCATENATED MODULE: ./plugins/UsersManager/vue/src/UsersManager/UsersManager.vue?vue&type=template&id=8d37426e // CONCATENATED MODULE: ./node_modules/@vue/cli-plugin-typescript/node_modules/cache-loader/dist/cjs.js??ref--14-0!./node_modules/babel-loader/lib!./node_modules/@vue/cli-plugin-typescript/node_modules/ts-loader??ref--14-2!./node_modules/@vue/cli-service/node_modules/cache-loader/dist/cjs.js??ref--0-0!./node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist??ref--0-1!./plugins/UsersManager/vue/src/UsersManager/UsersManager.vue?vue&type=script&lang=ts /* eslint-disable newline-per-chained-call */ @@ -3121,6 +3137,9 @@ var UsersManagervue_type_script_lang_ts_window = window, filter_status: '', idSite: this.initialSiteId }, + copied: false, + showNotification: false, + token: null, isLoadingUsers: false, userBeingEdited: null, addNewUserLoginEmail: '' @@ -3130,6 +3149,9 @@ var UsersManagervue_type_script_lang_ts_window = window, this.fetchUsers(); }, watch: { + showNotification: function showNotification(value) { + if (!value) this.copied = false; + }, limit: function limit() { this.fetchUsers(); } @@ -3268,24 +3290,28 @@ var UsersManagervue_type_script_lang_ts_window = window, _this2.fetchUsers(); }); }, + copyToClipboard: function copyToClipboard(value) { + navigator.clipboard.writeText(value); + this.copied = true; + }, onResendInvite: function onResendInvite(user) { var _this3 = this; external_CoreHome_["AjaxHelper"].fetch({ method: 'UsersManager.resendInvite', userLogin: user.login - }).then(function () { + }).then(function (r) { _this3.fetchUsers(); - var id = external_CoreHome_["NotificationsStore"].show({ - message: Object(external_CoreHome_["translate"])('UsersManager_ResendInviteSuccess', user.login), - id: 'resendinvite', - context: 'success', - type: 'transient' - }); - external_CoreHome_["NotificationsStore"].scrollToNotification(id); + if (typeof r.value !== 'undefined') { + _this3.showInviteNotification(r.value); + } }); }, + showInviteNotification: function showInviteNotification(token) { + this.showNotification = true; + this.token = token; + }, fetchUsers: function fetchUsers() { var _this4 = this; @@ -3336,6 +3362,7 @@ var UsersManagervue_type_script_lang_ts_window = window, }); }, onAddNewUser: function onAddNewUser() { + this.showNotification = false; var parameters = { isAllowed: true }; @@ -3356,7 +3383,7 @@ var UsersManagervue_type_script_lang_ts_window = window, -UsersManagervue_type_script_lang_ts.render = UsersManagervue_type_template_id_64097d4c_render +UsersManagervue_type_script_lang_ts.render = UsersManagervue_type_template_id_8d37426e_render /* harmony default export */ var UsersManager = (UsersManagervue_type_script_lang_ts); // CONCATENATED MODULE: ./plugins/UsersManager/vue/src/UsersManager/UsersManager.adapter.ts diff --git a/plugins/UsersManager/vue/dist/UsersManager.umd.min.js b/plugins/UsersManager/vue/dist/UsersManager.umd.min.js index 608c3a1817..40990f672b 100644 --- a/plugins/UsersManager/vue/dist/UsersManager.umd.min.js +++ b/plugins/UsersManager/vue/dist/UsersManager.umd.min.js @@ -1,56 +1,56 @@ -(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["UsersManager"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["UsersManager"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(s){if(t[s])return t[s].exports;var i=t[s]={i:s,l:!1,exports:{}};return e[s].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(s,i,function(t){return e[t]}.bind(null,i));return s},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/UsersManager/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"CapabilitiesEdit",(function(){return V})),n.d(t,"UserPermissionsEdit",(function(){return Fe})),n.d(t,"UserEditForm",(function(){return pt})),n.d(t,"PagedUsersList",(function(){return In})),n.d(t,"UsersManager",(function(){return rs})),n.d(t,"NewsletterSettings",(function(){return ds})),n.d(t,"AnonymousSettings",(function(){return ps})),n.d(t,"PersonalSettings",(function(){return Ss})),"undefined"!==typeof window){var s=window.document.currentScript,i=s&&s.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}var r=n("19dc"),o=n("8bbf"),a=["title"],l=["onClick"],c={key:0,class:"addCapability"},d={class:"ui-confirm confirmCapabilityToggle modal",ref:"confirmCapabilityToggleModal"},u={class:"modal-content"},m=["innerHTML"],b=["innerHTML"],p={class:"modal-footer"};function g(e,t,n,s,i,r){var g=Object(o["resolveComponent"])("Field");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["capabilitiesEdit",{busy:e.isBusy}])},[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.actualCapabilities,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:t.id,class:"chip"},[Object(o["createElementVNode"])("span",{class:"capability-name",title:"".concat(t.description," ").concat(e.isIncludedInRole(t)?"<br/><br/>".concat(e.translate("UsersManager_IncludedInUsersRole")):"")},Object(o["toDisplayString"])(t.category)+": "+Object(o["toDisplayString"])(t.name),9,a),e.isIncludedInRole(t)?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:"icon-close",onClick:function(n){e.capabilityToRemoveId=t.id,e.onToggleCapability(!1)}},null,8,l))])})),128)),e.availableCapabilitiesGrouped.length?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",c,["noaccess"!==e.userRole?(Object(o["openBlock"])(),Object(o["createBlock"])(g,{key:0,"model-value":e.capabilityToAddId,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.capabilityToAddId=t,e.onToggleCapability(!0)}),disabled:e.isBusy,uicontrol:"expandable-select",name:"add_capability","full-width":!0,options:e.availableCapabilitiesGrouped},null,8,["model-value","disabled","options"])):Object(o["createCommentVNode"])("",!0)])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",d,[Object(o["createElementVNode"])("div",u,[e.isAddingCapability?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",{key:0,innerHTML:e.$sanitize(e.confirmAddCapabilityToggleContent)},null,8,m)):Object(o["createCommentVNode"])("",!0),e.isAddingCapability?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",{key:1,innerHTML:e.$sanitize(e.confirmCapabilityToggleContent)},null,8,b))]),Object(o["createElementVNode"])("div",p,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[1]||(t[1]=Object(o["withModifiers"])((function(t){return e.toggleCapability()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[2]||(t[2]=Object(o["withModifiers"])((function(t){e.capabilityToAddOrRemove=null,e.capabilityToAddId=null,e.capabilityToRemoveId=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512)],2)}var h=n("a5a2");function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function O(e,t,n){return t&&j(e.prototype,t),n&&j(e,n),e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} +(function(e,t){"object"===typeof exports&&"object"===typeof module?module.exports=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):"function"===typeof define&&define.amd?define(["CoreHome",,"CorePluginsAdmin"],t):"object"===typeof exports?exports["UsersManager"]=t(require("CoreHome"),require("vue"),require("CorePluginsAdmin")):e["UsersManager"]=t(e["CoreHome"],e["Vue"],e["CorePluginsAdmin"])})("undefined"!==typeof self?self:this,(function(e,t,n){return function(e){var t={};function n(s){if(t[s])return t[s].exports;var i=t[s]={i:s,l:!1,exports:{}};return e[s].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=e,n.c=t,n.d=function(e,t,s){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:s})},n.r=function(e){"undefined"!==typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"===typeof e&&e&&e.__esModule)return e;var s=Object.create(null);if(n.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)n.d(s,i,function(t){return e[t]}.bind(null,i));return s},n.n=function(e){var t=e&&e.__esModule?function(){return e["default"]}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="plugins/UsersManager/vue/dist/",n(n.s="fae3")}({"19dc":function(t,n){t.exports=e},"8bbf":function(e,n){e.exports=t},a5a2:function(e,t){e.exports=n},fae3:function(e,t,n){"use strict";if(n.r(t),n.d(t,"CapabilitiesEdit",(function(){return V})),n.d(t,"UserPermissionsEdit",(function(){return Fe})),n.d(t,"UserEditForm",(function(){return pt})),n.d(t,"PagedUsersList",(function(){return In})),n.d(t,"UsersManager",(function(){return as})),n.d(t,"NewsletterSettings",(function(){return ms})),n.d(t,"AnonymousSettings",(function(){return gs})),n.d(t,"PersonalSettings",(function(){return Us})),"undefined"!==typeof window){var s=window.document.currentScript,i=s&&s.src.match(/(.+\/)[^/]+\.js(\?.*)?$/);i&&(n.p=i[1])}var r=n("19dc"),o=n("8bbf"),a=["title"],l=["onClick"],c={key:0,class:"addCapability"},d={class:"ui-confirm confirmCapabilityToggle modal",ref:"confirmCapabilityToggleModal"},u={class:"modal-content"},m=["innerHTML"],b=["innerHTML"],p={class:"modal-footer"};function h(e,t,n,s,i,r){var h=Object(o["resolveComponent"])("Field");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["capabilitiesEdit",{busy:e.isBusy}])},[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.actualCapabilities,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{key:t.id,class:"chip"},[Object(o["createElementVNode"])("span",{class:"capability-name",title:"".concat(t.description," ").concat(e.isIncludedInRole(t)?"<br/><br/>".concat(e.translate("UsersManager_IncludedInUsersRole")):"")},Object(o["toDisplayString"])(t.category)+": "+Object(o["toDisplayString"])(t.name),9,a),e.isIncludedInRole(t)?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",{key:0,class:"icon-close",onClick:function(n){e.capabilityToRemoveId=t.id,e.onToggleCapability(!1)}},null,8,l))])})),128)),e.availableCapabilitiesGrouped.length?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",c,["noaccess"!==e.userRole?(Object(o["openBlock"])(),Object(o["createBlock"])(h,{key:0,"model-value":e.capabilityToAddId,"onUpdate:modelValue":t[0]||(t[0]=function(t){e.capabilityToAddId=t,e.onToggleCapability(!0)}),disabled:e.isBusy,uicontrol:"expandable-select",name:"add_capability","full-width":!0,options:e.availableCapabilitiesGrouped},null,8,["model-value","disabled","options"])):Object(o["createCommentVNode"])("",!0)])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",d,[Object(o["createElementVNode"])("div",u,[e.isAddingCapability?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",{key:0,innerHTML:e.$sanitize(e.confirmAddCapabilityToggleContent)},null,8,m)):Object(o["createCommentVNode"])("",!0),e.isAddingCapability?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",{key:1,innerHTML:e.$sanitize(e.confirmCapabilityToggleContent)},null,8,b))]),Object(o["createElementVNode"])("div",p,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[1]||(t[1]=Object(o["withModifiers"])((function(t){return e.toggleCapability()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[2]||(t[2]=Object(o["withModifiers"])((function(t){e.capabilityToAddOrRemove=null,e.capabilityToAddId=null,e.capabilityToRemoveId=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512)],2)}var g=n("a5a2");function f(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function j(e,t){for(var n=0;n<t.length;n++){var s=t[n];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(e,s.key,s)}}function O(e,t,n){return t&&j(e.prototype,t),n&&j(e,n),e}function v(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e} /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */var C=function(){function e(){var t=this;f(this,e),v(this,"privateState",Object(o["reactive"])({isLoading:!1,capabilities:[]})),v(this,"state",Object(o["computed"])((function(){return Object(o["readonly"])(t.privateState)}))),v(this,"capabilities",Object(o["computed"])((function(){return t.state.value.capabilities}))),v(this,"isLoading",Object(o["computed"])((function(){return t.state.value.isLoading}))),v(this,"fetchPromise",void 0)}return O(e,[{key:"init",value:function(){return this.fetchCapabilities()}},{key:"fetchCapabilities",value:function(){var e=this;return this.fetchPromise||(this.privateState.isLoading=!0,this.fetchPromise=r["AjaxHelper"].fetch({method:"UsersManager.getAvailableCapabilities"}).then((function(t){return e.privateState.capabilities=t,e.capabilities.value})).finally((function(){e.privateState.isLoading=!1}))),this.fetchPromise}}]),e}(),S=new C,U=window,N=U.$,y=Object(o["defineComponent"])({props:{idsite:[String,Number],siteName:{type:String,required:!0},userLogin:{type:String,required:!0},userRole:{type:String,required:!0},capabilities:Array},components:{Field:h["Field"]},data:function(){return{theCapabilities:this.capabilities||[],isBusy:!1,isAddingCapability:!1,capabilityToAddId:null,capabilityToRemoveId:null,capabilityToAddOrRemove:null}},emits:["change"],watch:{capabilities:function(e){e&&(this.theCapabilities=e)}},created:function(){var e=this;S.init(),this.capabilities?this.theCapabilities=this.capabilities:(this.isBusy=!0,r["AjaxHelper"].fetch({method:"UsersManager.getUsersPlusRole",limit:"1",filter_search:this.userLogin}).then((function(e){return e&&e.capabilities?e.capabilities:[]})).then((function(t){e.theCapabilities=t})).finally((function(){e.isBusy=!1})))},methods:{onToggleCapability:function(e){var t=this;this.isAddingCapability=e;var n=e?this.capabilityToAddId:this.capabilityToRemoveId;this.capabilityToAddOrRemove=null,this.availableCapabilities.forEach((function(e){e.id===n&&(t.capabilityToAddOrRemove=e)})),this.$refs.confirmCapabilityToggleModal&&N(this.$refs.confirmCapabilityToggleModal).modal({dismissible:!1,yes:function(){return null}}).modal("open")},toggleCapability:function(){this.isAddingCapability?this.addCapability(this.capabilityToAddOrRemove):this.removeCapability(this.capabilityToAddOrRemove)},isIncludedInRole:function(e){return-1!==(e.includedInRoles||[]).indexOf(this.userRole)},getCapabilitiesList:function(){var e=this,t=[];return this.availableCapabilities.forEach((function(n){e.isIncludedInRole(n)||e.capabilitiesSet[n.id]&&t.push(n.id)})),t},addCapability:function(e){var t=this;this.isBusy=!0,r["AjaxHelper"].post({method:"UsersManager.addCapabilities"},{userLogin:this.userLogin,capabilities:e.id,idSites:this.idsite}).then((function(){t.$emit("change",t.getCapabilitiesList())})).finally((function(){t.isBusy=!1,t.capabilityToAddOrRemove=null,t.capabilityToAddId=null,t.capabilityToRemoveId=null}))},removeCapability:function(e){var t=this;this.isBusy=!0,r["AjaxHelper"].post({method:"UsersManager.removeCapabilities"},{userLogin:this.userLogin,capabilities:e.id,idSites:this.idsite}).then((function(){t.$emit("change",t.getCapabilitiesList())})).finally((function(){t.isBusy=!1,t.capabilityToAddOrRemove=null,t.capabilityToAddId=null,t.capabilityToRemoveId=null}))}},computed:{availableCapabilities:function(){return S.capabilities.value},confirmAddCapabilityToggleContent:function(){return Object(r["translate"])("UsersManager_AreYouSureAddCapability","<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.capabilityToAddOrRemove?this.capabilityToAddOrRemove.name:"","</strong>"),"<strong>".concat(this.siteNameText,"</strong>"))},confirmCapabilityToggleContent:function(){return Object(r["translate"])("UsersManager_AreYouSureRemoveCapability","<strong>".concat(this.capabilityToAddOrRemove?this.capabilityToAddOrRemove.name:"","</strong>"),"<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.siteNameText,"</strong>"))},siteNameText:function(){return r["Matomo"].helper.htmlEntities(this.siteName)},availableCapabilitiesGrouped:function(){var e=this,t=this.availableCapabilities.filter((function(t){return!e.capabilitiesSet[t.id]})).map((function(e){return{group:e.category,key:e.id,value:e.name,tooltip:e.description}}));return t.sort((function(e,t){return e.group===t.group?e.value===t.value?0:e.value<t.value?-1:1:e.group<t.group?-1:1})),t},capabilitiesSet:function(){var e=this,t={},n=this.theCapabilities;return(n||[]).forEach((function(e){t[e]=!0})),(this.availableCapabilities||[]).forEach((function(n){e.isIncludedInRole(n)&&(t[n.id]=!0)})),t},actualCapabilities:function(){var e=this.capabilitiesSet;return this.availableCapabilities.filter((function(t){return!!e[t.id]}))}}});y.render=g;var V=y,E=(Object(r["createAngularJsAdapter"])({component:V,scope:{idsite:{angularJsBind:"<"},siteName:{angularJsBind:"<"},userLogin:{angularJsBind:"<"},userRole:{angularJsBind:"<"},capabilities:{angularJsBind:"<"},onCapabilitiesChange:{angularJsBind:"&",vue:"change"}},directiveName:"piwikCapabilitiesEdit",restrict:"E",$inject:["$timeout"],events:{change:function(e,t,n,s,i,r,o){o((function(){n.onCapabilitiesChange&&n.onCapabilitiesChange.call({capabilities:e})}))}}}),{key:0,class:"row"}),k={class:"row to-all-websites"},A={class:"col s12"},w={style:{"margin-right":"3.5px"}},T={id:"all-sites-access-select",style:{"margin-right":"3.5px"}},B={style:{"margin-top":"18px"}},M={class:"filters row"},_={class:"col s12 m12 l8"},L={class:"input-field bulk-actions",style:{"margin-right":"3.5px"}},R={id:"user-permissions-edit-bulk-actions",class:"dropdown-content"},D={class:"dropdown-trigger","data-target":"user-permissions-bulk-set-access"},x={id:"user-permissions-bulk-set-access",class:"dropdown-content"},P=["onClick"],F={class:"input-field site-filter",style:{"margin-right":"3.5px"}},H=["value","placeholder"],I={class:"input-field access-filter",style:{"margin-right":"3.5px"}},J={key:0,class:"col s12 m12 l4 sites-for-permission-pagination-container"},q={class:"sites-for-permission-pagination"},$={class:"counter"},z=["textContent"],G={class:"roles-help-notification"},W=["innerHTML"],Y={class:"capabilities-help-notification"},X={id:"sitesForPermission"},K={class:"select-cell"},Q={class:"checkbox-container"},Z=["checked"],ee=Object(o["createElementVNode"])("span",null,null,-1),te={class:"role_header"},ne=["innerHTML"],se=Object(o["createElementVNode"])("span",{class:"icon-help"},null,-1),ie=[se],re={class:"capabilities_header"},oe=["innerHTML"],ae=Object(o["createElementVNode"])("span",{class:"icon-help"},null,-1),le=[ae],ce={key:0,class:"select-all-row"},de={colspan:"4"},ue={key:0},me=["innerHTML"],be=["innerHTML"],pe={key:1},ge=["innerHTML"],he=["innerHTML"],fe={class:"select-cell"},je={class:"checkbox-container"},Oe=["id","onUpdate:modelValue"],ve=Object(o["createElementVNode"])("span",null,null,-1),Ce={class:"role-select"},Se={class:"delete-access-confirm-modal modal",ref:"deleteAccessConfirmModal"},Ue={class:"modal-content"},Ne=["innerHTML"],ye=["innerHTML"],Ve={class:"modal-footer"},Ee={class:"change-access-confirm-modal modal",ref:"changeAccessConfirmModal"},ke={class:"modal-content"},Ae=["innerHTML"],we=["innerHTML"],Te={class:"modal-footer"},Be={class:"confirm-give-access-all-sites modal",ref:"confirmGiveAccessAllSitesModal"},Me={class:"modal-content"},_e=["innerHTML"],Le={class:"modal-footer"}; + */var C=function(){function e(){var t=this;f(this,e),v(this,"privateState",Object(o["reactive"])({isLoading:!1,capabilities:[]})),v(this,"state",Object(o["computed"])((function(){return Object(o["readonly"])(t.privateState)}))),v(this,"capabilities",Object(o["computed"])((function(){return t.state.value.capabilities}))),v(this,"isLoading",Object(o["computed"])((function(){return t.state.value.isLoading}))),v(this,"fetchPromise",void 0)}return O(e,[{key:"init",value:function(){return this.fetchCapabilities()}},{key:"fetchCapabilities",value:function(){var e=this;return this.fetchPromise||(this.privateState.isLoading=!0,this.fetchPromise=r["AjaxHelper"].fetch({method:"UsersManager.getAvailableCapabilities"}).then((function(t){return e.privateState.capabilities=t,e.capabilities.value})).finally((function(){e.privateState.isLoading=!1}))),this.fetchPromise}}]),e}(),N=new C,S=window,U=S.$,y=Object(o["defineComponent"])({props:{idsite:[String,Number],siteName:{type:String,required:!0},userLogin:{type:String,required:!0},userRole:{type:String,required:!0},capabilities:Array},components:{Field:g["Field"]},data:function(){return{theCapabilities:this.capabilities||[],isBusy:!1,isAddingCapability:!1,capabilityToAddId:null,capabilityToRemoveId:null,capabilityToAddOrRemove:null}},emits:["change"],watch:{capabilities:function(e){e&&(this.theCapabilities=e)}},created:function(){var e=this;N.init(),this.capabilities?this.theCapabilities=this.capabilities:(this.isBusy=!0,r["AjaxHelper"].fetch({method:"UsersManager.getUsersPlusRole",limit:"1",filter_search:this.userLogin}).then((function(e){return e&&e.capabilities?e.capabilities:[]})).then((function(t){e.theCapabilities=t})).finally((function(){e.isBusy=!1})))},methods:{onToggleCapability:function(e){var t=this;this.isAddingCapability=e;var n=e?this.capabilityToAddId:this.capabilityToRemoveId;this.capabilityToAddOrRemove=null,this.availableCapabilities.forEach((function(e){e.id===n&&(t.capabilityToAddOrRemove=e)})),this.$refs.confirmCapabilityToggleModal&&U(this.$refs.confirmCapabilityToggleModal).modal({dismissible:!1,yes:function(){return null}}).modal("open")},toggleCapability:function(){this.isAddingCapability?this.addCapability(this.capabilityToAddOrRemove):this.removeCapability(this.capabilityToAddOrRemove)},isIncludedInRole:function(e){return-1!==(e.includedInRoles||[]).indexOf(this.userRole)},getCapabilitiesList:function(){var e=this,t=[];return this.availableCapabilities.forEach((function(n){e.isIncludedInRole(n)||e.capabilitiesSet[n.id]&&t.push(n.id)})),t},addCapability:function(e){var t=this;this.isBusy=!0,r["AjaxHelper"].post({method:"UsersManager.addCapabilities"},{userLogin:this.userLogin,capabilities:e.id,idSites:this.idsite}).then((function(){t.$emit("change",t.getCapabilitiesList())})).finally((function(){t.isBusy=!1,t.capabilityToAddOrRemove=null,t.capabilityToAddId=null,t.capabilityToRemoveId=null}))},removeCapability:function(e){var t=this;this.isBusy=!0,r["AjaxHelper"].post({method:"UsersManager.removeCapabilities"},{userLogin:this.userLogin,capabilities:e.id,idSites:this.idsite}).then((function(){t.$emit("change",t.getCapabilitiesList())})).finally((function(){t.isBusy=!1,t.capabilityToAddOrRemove=null,t.capabilityToAddId=null,t.capabilityToRemoveId=null}))}},computed:{availableCapabilities:function(){return N.capabilities.value},confirmAddCapabilityToggleContent:function(){return Object(r["translate"])("UsersManager_AreYouSureAddCapability","<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.capabilityToAddOrRemove?this.capabilityToAddOrRemove.name:"","</strong>"),"<strong>".concat(this.siteNameText,"</strong>"))},confirmCapabilityToggleContent:function(){return Object(r["translate"])("UsersManager_AreYouSureRemoveCapability","<strong>".concat(this.capabilityToAddOrRemove?this.capabilityToAddOrRemove.name:"","</strong>"),"<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.siteNameText,"</strong>"))},siteNameText:function(){return r["Matomo"].helper.htmlEntities(this.siteName)},availableCapabilitiesGrouped:function(){var e=this,t=this.availableCapabilities.filter((function(t){return!e.capabilitiesSet[t.id]})).map((function(e){return{group:e.category,key:e.id,value:e.name,tooltip:e.description}}));return t.sort((function(e,t){return e.group===t.group?e.value===t.value?0:e.value<t.value?-1:1:e.group<t.group?-1:1})),t},capabilitiesSet:function(){var e=this,t={},n=this.theCapabilities;return(n||[]).forEach((function(e){t[e]=!0})),(this.availableCapabilities||[]).forEach((function(n){e.isIncludedInRole(n)&&(t[n.id]=!0)})),t},actualCapabilities:function(){var e=this.capabilitiesSet;return this.availableCapabilities.filter((function(t){return!!e[t.id]}))}}});y.render=h;var V=y,k=(Object(r["createAngularJsAdapter"])({component:V,scope:{idsite:{angularJsBind:"<"},siteName:{angularJsBind:"<"},userLogin:{angularJsBind:"<"},userRole:{angularJsBind:"<"},capabilities:{angularJsBind:"<"},onCapabilitiesChange:{angularJsBind:"&",vue:"change"}},directiveName:"piwikCapabilitiesEdit",restrict:"E",$inject:["$timeout"],events:{change:function(e,t,n,s,i,r,o){o((function(){n.onCapabilitiesChange&&n.onCapabilitiesChange.call({capabilities:e})}))}}}),{key:0,class:"row"}),E={class:"row to-all-websites"},A={class:"col s12"},w={style:{"margin-right":"3.5px"}},T={id:"all-sites-access-select",style:{"margin-right":"3.5px"}},B={style:{"margin-top":"18px"}},M={class:"filters row"},_={class:"col s12 m12 l8"},L={class:"input-field bulk-actions",style:{"margin-right":"3.5px"}},R={id:"user-permissions-edit-bulk-actions",class:"dropdown-content"},D={class:"dropdown-trigger","data-target":"user-permissions-bulk-set-access"},x={id:"user-permissions-bulk-set-access",class:"dropdown-content"},P=["onClick"],F={class:"input-field site-filter",style:{"margin-right":"3.5px"}},H=["value","placeholder"],I={class:"input-field access-filter",style:{"margin-right":"3.5px"}},J={key:0,class:"col s12 m12 l4 sites-for-permission-pagination-container"},q={class:"sites-for-permission-pagination"},$={class:"counter"},z=["textContent"],G={class:"roles-help-notification"},W=["innerHTML"],Y={class:"capabilities-help-notification"},X={id:"sitesForPermission"},K={class:"select-cell"},Q={class:"checkbox-container"},Z=["checked"],ee=Object(o["createElementVNode"])("span",null,null,-1),te={class:"role_header"},ne=["innerHTML"],se=Object(o["createElementVNode"])("span",{class:"icon-help"},null,-1),ie=[se],re={class:"capabilities_header"},oe=["innerHTML"],ae=Object(o["createElementVNode"])("span",{class:"icon-help"},null,-1),le=[ae],ce={key:0,class:"select-all-row"},de={colspan:"4"},ue={key:0},me=["innerHTML"],be=["innerHTML"],pe={key:1},he=["innerHTML"],ge=["innerHTML"],fe={class:"select-cell"},je={class:"checkbox-container"},Oe=["id","onUpdate:modelValue"],ve=Object(o["createElementVNode"])("span",null,null,-1),Ce={class:"role-select"},Ne={class:"delete-access-confirm-modal modal",ref:"deleteAccessConfirmModal"},Se={class:"modal-content"},Ue=["innerHTML"],ye=["innerHTML"],Ve={class:"modal-footer"},ke={class:"change-access-confirm-modal modal",ref:"changeAccessConfirmModal"},Ee={class:"modal-content"},Ae=["innerHTML"],we=["innerHTML"],Te={class:"modal-footer"},Be={class:"confirm-give-access-all-sites modal",ref:"confirmGiveAccessAllSitesModal"},Me={class:"modal-content"},_e=["innerHTML"],Le={class:"modal-footer"}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function Re(e,t,n,s,i,r){var a=Object(o["resolveComponent"])("Notification"),l=Object(o["resolveComponent"])("Field"),c=Object(o["resolveComponent"])("CapabilitiesEdit"),d=Object(o["resolveDirective"])("dropdown-menu"),u=Object(o["resolveDirective"])("content-table");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["userPermissionsEdit",{loading:e.isLoadingAccess}])},[e.hasAccessToAtLeastOneSite?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",E,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{context:"warning",type:"transient",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("strong",null,Object(o["toDisplayString"])(e.translate("General_Warning"))+":",1),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("UsersManager_NoAccessWarning")),1)]})),_:1})])])),Object(o["createElementVNode"])("div",k,[Object(o["createElementVNode"])("div",A,[Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("span",w,Object(o["toDisplayString"])(e.translate("UsersManager_GiveAccessToAll"))+":",1),Object(o["createElementVNode"])("div",T,[Object(o["createVNode"])(l,{modelValue:e.allWebsitesAccssLevelSet,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.allWebsitesAccssLevelSet=t}),uicontrol:"select",options:e.filteredAccessLevels,"full-width":!0},null,8,["modelValue","options"])]),Object(o["createElementVNode"])("a",{href:"",class:Object(o["normalizeClass"])(["btn",{disabled:e.isGivingAccessToAllSites}]),onClick:t[1]||(t[1]=Object(o["withModifiers"])((function(t){return e.showChangeAccessAllSitesModal()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_Apply")),3)]),Object(o["createElementVNode"])("p",B,Object(o["toDisplayString"])(e.translate("UsersManager_OrManageIndividually"))+":",1)])]),Object(o["createElementVNode"])("div",M,[Object(o["createElementVNode"])("div",_,[Object(o["createElementVNode"])("div",L,[Object(o["withDirectives"])(Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["dropdown-trigger btn",{disabled:e.isBulkActionsDisabled}]),href:"","data-target":"user-permissions-edit-bulk-actions"},[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_BulkActions")),1)],2),[[d,{activates:"#user-permissions-edit-bulk-actions"}]]),Object(o["createElementVNode"])("ul",R,[Object(o["createElementVNode"])("li",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("a",D,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_SetPermission")),1)],512),[[d,{activates:"#user-permissions-bulk-set-access"}]]),Object(o["createElementVNode"])("ul",x,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.filteredAccessLevels,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:t.key},[Object(o["createElementVNode"])("a",{href:"",onClick:Object(o["withModifiers"])((function(n){e.siteAccessToChange=null,e.roleToChangeTo=t.key,e.showChangeAccessConfirm()}),["prevent"])},Object(o["toDisplayString"])(t.value),9,P)])})),128))])]),Object(o["createElementVNode"])("li",null,[Object(o["createElementVNode"])("a",{href:"",onClick:t[2]||(t[2]=Object(o["withModifiers"])((function(t){e.siteAccessToChange=null,e.roleToChangeTo="noaccess",e.showRemoveAccessConfirm()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_RemovePermissions")),1)])])]),Object(o["createElementVNode"])("div",F,[Object(o["createElementVNode"])("input",{type:"text",value:e.siteNameFilter,onKeydown:t[3]||(t[3]=function(t){e.onChangeSiteFilter(t)}),onChange:t[4]||(t[4]=function(t){e.onChangeSiteFilter(t)}),placeholder:e.translate("UsersManager_FilterByWebsite")},null,40,H)]),Object(o["createElementVNode"])("div",I,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(l,{modelValue:e.accessLevelFilter,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.accessLevelFilter=t}),uicontrol:"select",options:e.filteredSelectAccessLevels,"full-width":!0,placeholder:e.translate("UsersManager_FilterByAccess")},null,8,["modelValue","options","placeholder"])])])]),e.totalEntries>e.limit?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",J,[Object(o["createElementVNode"])("div",q,[Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["prev",{disabled:e.offset<=0}])},[Object(o["createElementVNode"])("span",{class:"pointer",onClick:t[6]||(t[6]=function(t){return e.gotoPreviousPage()})},"« "+Object(o["toDisplayString"])(e.translate("General_Previous")),1)],2),Object(o["createElementVNode"])("span",$,[Object(o["createElementVNode"])("span",{textContent:Object(o["toDisplayString"])(e.paginationText)},null,8,z)]),Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["next",{disabled:e.offset+e.limit>=e.totalEntries}])},[Object(o["createElementVNode"])("span",{class:"pointer",onClick:t[7]||(t[7]=function(t){return e.gotoNextPage()})},Object(o["toDisplayString"])(e.translate("General_Next"))+" »",1)],2)])])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",G,[e.isRoleHelpToggled?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,context:"info",type:"persistent",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.rolesHelpText)},null,8,W)]})),_:1})):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",Y,[e.isCapabilitiesHelpToggled?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,context:"info",type:"persistent",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.translate("UsersManager_CapabilitiesHelp")),1)]})),_:1})):Object(o["createCommentVNode"])("",!0)]),Object(o["withDirectives"])(Object(o["createElementVNode"])("table",X,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",K,[Object(o["createElementVNode"])("span",Q,[Object(o["createElementVNode"])("label",null,[Object(o["createElementVNode"])("input",{type:"checkbox",id:"perm_edit_select_all",checked:e.isAllCheckboxSelected,onChange:t[8]||(t[8]=function(t){return e.onAllCheckboxChange(t)})},null,40,Z),ee])])]),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("General_Name")),1),Object(o["createElementVNode"])("th",te,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize("".concat(e.translate("UsersManager_Role")," "))},null,8,ne),Object(o["createElementVNode"])("a",{href:"",class:Object(o["normalizeClass"])(["helpIcon",{sticky:e.isRoleHelpToggled}]),onClick:t[9]||(t[9]=Object(o["withModifiers"])((function(t){return e.isRoleHelpToggled=!e.isRoleHelpToggled}),["prevent"]))},ie,2)]),Object(o["createElementVNode"])("th",re,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize("".concat(e.translate("UsersManager_Capabilities")," "))},null,8,oe),Object(o["createElementVNode"])("a",{href:"",class:Object(o["normalizeClass"])(["helpIcon",{sticky:e.isCapabilitiesHelpToggled}]),onClick:t[10]||(t[10]=Object(o["withModifiers"])((function(t){return e.isCapabilitiesHelpToggled=!e.isCapabilitiesHelpToggled}),["prevent"]))},le,2)])])]),Object(o["createElementVNode"])("tbody",null,[e.isAllCheckboxSelected&&e.siteAccess.length<e.totalEntries?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",ce,[Object(o["createElementVNode"])("td",de,[e.areAllResultsSelected?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ue,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.theDisplayedWebsitesAreSelectedText),style:{"margin-right":"3.5px"}},null,8,me),Object(o["createElementVNode"])("a",{href:"#",onClick:t[11]||(t[11]=Object(o["withModifiers"])((function(t){return e.areAllResultsSelected=!e.areAllResultsSelected}),["prevent"])),innerHTML:e.$sanitize(e.clickToSelectAllText)},null,8,be)])),e.areAllResultsSelected?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",pe,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.allWebsitesAreSelectedText),style:{"margin-right":"3.5px"}},null,8,ge),Object(o["createElementVNode"])("a",{href:"#",onClick:t[12]||(t[12]=Object(o["withModifiers"])((function(t){return e.areAllResultsSelected=!e.areAllResultsSelected}),["prevent"])),innerHTML:e.$sanitize(e.clickToSelectDisplayedWebsitesText)},null,8,he)])):Object(o["createCommentVNode"])("",!0)])])):Object(o["createCommentVNode"])("",!0),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.siteAccess,(function(n,s){return Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{key:n.idsite},[Object(o["createElementVNode"])("td",fe,[Object(o["createElementVNode"])("span",je,[Object(o["createElementVNode"])("label",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"checkbox",id:"perm_edit_select_row".concat(s),"onUpdate:modelValue":function(t){return e.selectedRows[s]=t},onClick:t[13]||(t[13]=function(t){return e.onRowSelected()})},null,8,Oe),[[o["vModelCheckbox"],e.selectedRows[s]]]),ve])])]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(n.site_name),1)]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("div",Ce,[Object(o["createVNode"])(l,{"model-value":n.role,"onUpdate:modelValue":function(t){e.onRoleChange(n,t)},uicontrol:"select",options:e.filteredAccessLevels,"full-width":!0},null,8,["model-value","onUpdate:modelValue","options"])])]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(c,{idsite:n.idsite,"site-name":n.site_name,"user-login":e.userLogin,"user-role":n.role,capabilities:n.capabilities,onChange:t[14]||(t[14]=function(t){return e.fetchAccess()})},null,8,["idsite","site-name","user-login","user-role","capabilities"])])])])})),128))])],512),[[u]]),Object(o["createElementVNode"])("div",Se,[Object(o["createElementVNode"])("div",Ue,[e.siteAccessToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",{key:0,innerHTML:e.$sanitize(e.deletePermConfirmSingleText)},null,8,Ne)):Object(o["createCommentVNode"])("",!0),e.siteAccessToChange?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",{key:1,innerHTML:e.$sanitize(e.deletePermConfirmMultipleText)},null,8,ye))]),Object(o["createElementVNode"])("div",Ve,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[15]||(t[15]=Object(o["withModifiers"])((function(t){return e.changeUserRole()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[16]||(t[16]=Object(o["withModifiers"])((function(t){e.siteAccessToChange=null,e.roleToChangeTo=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512),Object(o["createElementVNode"])("div",Ee,[Object(o["createElementVNode"])("div",ke,[e.siteAccessToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",{key:0,innerHTML:e.$sanitize(e.changePermToSiteConfirmSingleText)},null,8,Ae)):Object(o["createCommentVNode"])("",!0),e.siteAccessToChange?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",{key:1,innerHTML:e.$sanitize(e.changePermToSiteConfirmMultipleText)},null,8,we))]),Object(o["createElementVNode"])("div",Te,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[17]||(t[17]=Object(o["withModifiers"])((function(t){return e.changeUserRole()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[18]||(t[18]=Object(o["withModifiers"])((function(t){e.siteAccessToChange.role=e.previousRole,e.siteAccessToChange=null,e.roleToChangeTo=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512),Object(o["createElementVNode"])("div",Be,[Object(o["createElementVNode"])("div",Me,[Object(o["createElementVNode"])("h3",{innerHTML:e.$sanitize(e.changePermToAllSitesConfirmText)},null,8,_e),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ChangePermToAllSitesConfirm2")),1)]),Object(o["createElementVNode"])("div",Le,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[19]||(t[19]=Object(o["withModifiers"])((function(t){return e.giveAccessToAllSites()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[20]||(t[20]=function(e){return e.preventDefault()})},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512)],2)}var De=window,xe=De.$,Pe=Object(o["defineComponent"])({props:{userLogin:{type:String,required:!0},limit:{type:Number,default:10},accessLevels:{type:Array,required:!0},filterAccessLevels:{type:Array,required:!0}},components:{Notification:r["Notification"],Field:h["Field"],CapabilitiesEdit:V},directives:{DropdownMenu:r["DropdownMenu"],ContentTable:r["ContentTable"]},data:function(){return{siteAccess:[],offset:0,totalEntries:null,accessLevelFilter:"",siteNameFilter:"",isLoadingAccess:!1,allWebsitesAccssLevelSet:"view",isAllCheckboxSelected:!1,selectedRows:{},isBulkActionsDisabled:!0,areAllResultsSelected:!1,previousRole:null,hasAccessToAtLeastOneSite:!0,isRoleHelpToggled:!1,isCapabilitiesHelpToggled:!1,isGivingAccessToAllSites:!1,roleToChangeTo:null,siteAccessToChange:null}},emits:["userHasAccessDetected","accessChanged"],created:function(){var e=this;this.onChangeSiteFilter=Object(r["debounce"])(this.onChangeSiteFilter,300),Object(o["watch"])((function(){return e.allPropsWatch}),(function(){e.limit&&e.fetchAccess()})),this.fetchAccess()},watch:{accessLevelFilter:function(){this.offset=0,this.fetchAccess()}},methods:{onAllCheckboxChange:function(e){var t=this;this.isAllCheckboxSelected=e.target.checked,this.isAllCheckboxSelected?(this.siteAccess.forEach((function(e,n){t.selectedRows[n]=!0})),this.isBulkActionsDisabled=!1):this.clearSelection()},clearSelection:function(){this.selectedRows={},this.areAllResultsSelected=!1,this.isBulkActionsDisabled=!0,this.isAllCheckboxSelected=!1,this.siteAccessToChange=null},onRowSelected:function(){var e=this;setTimeout((function(){var t=e.selectedRowsCount;e.isBulkActionsDisabled=0===t,e.isAllCheckboxSelected=t===e.siteAccess.length}))},fetchAccess:function(){var e=this;return this.isLoadingAccess=!0,r["AjaxHelper"].fetch({method:"UsersManager.getSitesAccessForUser",limit:this.limit,offset:this.offset,filter_search:this.siteNameFilter,filter_access:this.accessLevelFilter,userLogin:this.userLogin},{returnResponseObject:!0}).then((function(t){var n=t.getRequestHandle();e.isLoadingAccess=!1,e.siteAccess=n.responseJSON,e.totalEntries=parseInt(n.getResponseHeader("x-matomo-total-results"),10)||0,e.hasAccessToAtLeastOneSite=!!n.getResponseHeader("x-matomo-has-some"),e.$emit("userHasAccessDetected",{hasAccess:e.hasAccessToAtLeastOneSite}),e.clearSelection()})).catch((function(){e.isLoadingAccess=!1,e.clearSelection()}))},gotoPreviousPage:function(){this.offset=Math.max(0,this.offset-this.limit),this.fetchAccess()},gotoNextPage:function(){var e=this.offset+this.limit;e>=(this.totalEntries||0)||(this.offset=e,this.fetchAccess())},showRemoveAccessConfirm:function(){xe(this.$refs.deleteAccessConfirmModal).modal({dismissible:!1}).modal("open")},changeUserRole:function(){var e=this,t=function(){var t=[];return Object.keys(e.selectedRows).forEach((function(n){e.selectedRows[n]&&e.siteAccess[n]&&t.push(e.siteAccess[n].idsite)})),t},n=function(){return r["AjaxHelper"].fetch({method:"UsersManager.getSitesAccessForUser",filter_search:e.siteNameFilter,filter_access:e.accessLevelFilter,userLogin:e.userLogin,filter_limit:"-1"}).then((function(e){return e.map((function(e){return e.idsite}))}))};return this.isLoadingAccess=!0,Promise.resolve().then((function(){return e.siteAccessToChange?[e.siteAccessToChange.idsite]:e.areAllResultsSelected?n():t()})).then((function(t){return r["AjaxHelper"].post({method:"UsersManager.setUserAccess"},{userLogin:e.userLogin,access:e.roleToChangeTo,idSites:t})})).catch((function(){})).then((function(){return e.$emit("accessChanged"),e.fetchAccess()}))},showChangeAccessConfirm:function(){xe(this.$refs.changeAccessConfirmModal).modal({dismissible:!1}).modal("open")},getRoleDisplay:function(e){var t=null;return this.filteredAccessLevels.forEach((function(n){n.key===e&&(t=n.value)})),t},giveAccessToAllSites:function(){var e=this;this.isGivingAccessToAllSites=!0,r["AjaxHelper"].fetch({method:"SitesManager.getSitesWithAdminAccess",filter_limit:-1}).then((function(t){var n=t.map((function(e){return e.idsite}));return r["AjaxHelper"].post({method:"UsersManager.setUserAccess"},{userLogin:e.userLogin,access:e.allWebsitesAccssLevelSet,idSites:n})})).then((function(){return e.fetchAccess()})).finally((function(){e.isGivingAccessToAllSites=!1}))},showChangeAccessAllSitesModal:function(){xe(this.$refs.confirmGiveAccessAllSitesModal).modal({dismissible:!1}).modal("open")},onChangeSiteFilter:function(e){var t=this;setTimeout((function(){var n=e.target.value;t.siteNameFilter!==n&&(t.siteNameFilter=n,t.offset=0,t.fetchAccess())}))},onRoleChange:function(e,t){this.previousRole=e.role,this.roleToChangeTo=t,this.siteAccessToChange=e,this.showChangeAccessConfirm()}},computed:{rolesHelpText:function(){return Object(r["translate"])("UsersManager_RolesHelp",'<a href="https://matomo.org/faq/general/faq_70/" target="_blank" rel="noreferrer noopener">',"</a>",'<a href="https://matomo.org/faq/general/faq_69/" target="_blank" rel="noreferrer noopener">',"</a>")},theDisplayedWebsitesAreSelectedText:function(){var e=Object(r["translate"])("UsersManager_TheDisplayedWebsitesAreSelected","<strong>".concat(this.siteAccess.length,"</strong>"));return"".concat(e," ")},clickToSelectAllText:function(){return Object(r["translate"])("UsersManager_ClickToSelectAll","<strong>".concat(this.totalEntries,"</strong>"))},allWebsitesAreSelectedText:function(){return Object(r["translate"])("UsersManager_AllWebsitesAreSelected","<strong>".concat(this.totalEntries,"</strong>"))},clickToSelectDisplayedWebsitesText:function(){return Object(r["translate"])("UsersManager_ClickToSelectDisplayedWebsites","<strong>".concat(this.siteAccess.length,"</strong>"))},deletePermConfirmSingleText:function(){return Object(r["translate"])("UsersManager_DeletePermConfirmSingle","<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.siteAccessToChangeName,"</strong>"))},deletePermConfirmMultipleText:function(){return Object(r["translate"])("UsersManager_DeletePermConfirmMultiple","<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.affectedSitesCount,"</strong>"))},changePermToSiteConfirmSingleText:function(){return Object(r["translate"])("UsersManager_ChangePermToSiteConfirmSingle","<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.siteAccessToChangeName,"</strong>"),"<strong>".concat(this.getRoleDisplay(this.roleToChangeTo),"</strong>"))},changePermToSiteConfirmMultipleText:function(){return Object(r["translate"])("UsersManager_ChangePermToSiteConfirmMultiple","<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.affectedSitesCount,"</strong>"),"<strong>".concat(this.getRoleDisplay(this.roleToChangeTo),"</strong>"))},changePermToAllSitesConfirmText:function(){return Object(r["translate"])("UsersManager_ChangePermToAllSitesConfirm","<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.getRoleDisplay(this.allWebsitesAccssLevelSet),"</strong>"))},paginationLowerBound:function(){return this.offset+1},paginationUpperBound:function(){return this.totalEntries?Math.min(this.offset+this.limit,this.totalEntries):"?"},filteredAccessLevels:function(){return this.accessLevels.filter((function(e){return"superuser"!==e.key&&"role"===e.type}))},filteredSelectAccessLevels:function(){return this.filterAccessLevels.filter((function(e){return"superuser"!==e.key}))},selectedRowsCount:function(){var e=0;return Object.values(this.selectedRows).forEach((function(t){t&&(e+=1)})),e},affectedSitesCount:function(){return this.areAllResultsSelected?this.totalEntries:this.selectedRowsCount},allPropsWatch:function(){return this.userLogin,this.limit,this.accessLevels,this.filterAccessLevels,Date.now()},siteAccessToChangeName:function(){return this.siteAccessToChange?r["Matomo"].helper.htmlEntities(this.siteAccessToChange.site_name):""},paginationText:function(){var e=Object(r["translate"])("General_Pagination","".concat(this.paginationLowerBound),"".concat(this.paginationUpperBound),"".concat(this.totalEntries));return" ".concat(e," ")}}});Pe.render=Re;var Fe=Pe,He=(Object(r["createAngularJsAdapter"])({component:Fe,scope:{userLogin:{angularJsBind:"<"},limit:{angularJsBind:"<"},onUserHasAccessDetected:{angularJsBind:"&",vue:"userHasAccessDetected"},onAccessChange:{angularJsBind:"&",vue:"accessChanged"},accessLevels:{angularJsBind:"<"},filterAccessLevels:{angularJsBind:"<"}},directiveName:"piwikUserPermissionsEdit",restrict:"E"}),{class:"row"}),Ie={key:0,class:"col m2 entityList"},Je={class:"listCircle"},qe={key:0,class:"icon-warning"},$e=Object(o["createElementVNode"])("div",{class:"save-button-spacer hide-on-small-only"},null,-1),ze={href:"",class:"entityCancelLink"},Ge={class:"visibleTab col m10"},We={key:0,class:"basic-info-tab"},Ye={class:"form-group row",style:{position:"relative"}},Xe={class:"col s12 m6"},Ke={class:"col s12 m6"},Qe={key:0,class:"form-help"},Ze=["innerHTML"],et=["innerHTML"],tt={key:0,class:"entityCancel"},nt={key:1,class:"user-permissions"},st={key:0},it={key:1,class:"alert alert-info"},rt={key:2,class:"superuser-access form-group"},ot={key:0},at={key:1},lt={key:3,class:"twofa-reset form-group"},ct={class:"resetTwoFa"},dt=["innerHTML"]; + */function Re(e,t,n,s,i,r){var a=Object(o["resolveComponent"])("Notification"),l=Object(o["resolveComponent"])("Field"),c=Object(o["resolveComponent"])("CapabilitiesEdit"),d=Object(o["resolveDirective"])("dropdown-menu"),u=Object(o["resolveDirective"])("content-table");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["userPermissionsEdit",{loading:e.isLoadingAccess}])},[e.hasAccessToAtLeastOneSite?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",k,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{context:"warning",type:"transient",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("strong",null,Object(o["toDisplayString"])(e.translate("General_Warning"))+":",1),Object(o["createTextVNode"])(" "+Object(o["toDisplayString"])(e.translate("UsersManager_NoAccessWarning")),1)]})),_:1})])])),Object(o["createElementVNode"])("div",E,[Object(o["createElementVNode"])("div",A,[Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("span",w,Object(o["toDisplayString"])(e.translate("UsersManager_GiveAccessToAll"))+":",1),Object(o["createElementVNode"])("div",T,[Object(o["createVNode"])(l,{modelValue:e.allWebsitesAccssLevelSet,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.allWebsitesAccssLevelSet=t}),uicontrol:"select",options:e.filteredAccessLevels,"full-width":!0},null,8,["modelValue","options"])]),Object(o["createElementVNode"])("a",{href:"",class:Object(o["normalizeClass"])(["btn",{disabled:e.isGivingAccessToAllSites}]),onClick:t[1]||(t[1]=Object(o["withModifiers"])((function(t){return e.showChangeAccessAllSitesModal()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_Apply")),3)]),Object(o["createElementVNode"])("p",B,Object(o["toDisplayString"])(e.translate("UsersManager_OrManageIndividually"))+":",1)])]),Object(o["createElementVNode"])("div",M,[Object(o["createElementVNode"])("div",_,[Object(o["createElementVNode"])("div",L,[Object(o["withDirectives"])(Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["dropdown-trigger btn",{disabled:e.isBulkActionsDisabled}]),href:"","data-target":"user-permissions-edit-bulk-actions"},[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_BulkActions")),1)],2),[[d,{activates:"#user-permissions-edit-bulk-actions"}]]),Object(o["createElementVNode"])("ul",R,[Object(o["createElementVNode"])("li",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("a",D,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_SetPermission")),1)],512),[[d,{activates:"#user-permissions-bulk-set-access"}]]),Object(o["createElementVNode"])("ul",x,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.filteredAccessLevels,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:t.key},[Object(o["createElementVNode"])("a",{href:"",onClick:Object(o["withModifiers"])((function(n){e.siteAccessToChange=null,e.roleToChangeTo=t.key,e.showChangeAccessConfirm()}),["prevent"])},Object(o["toDisplayString"])(t.value),9,P)])})),128))])]),Object(o["createElementVNode"])("li",null,[Object(o["createElementVNode"])("a",{href:"",onClick:t[2]||(t[2]=Object(o["withModifiers"])((function(t){e.siteAccessToChange=null,e.roleToChangeTo="noaccess",e.showRemoveAccessConfirm()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_RemovePermissions")),1)])])]),Object(o["createElementVNode"])("div",F,[Object(o["createElementVNode"])("input",{type:"text",value:e.siteNameFilter,onKeydown:t[3]||(t[3]=function(t){e.onChangeSiteFilter(t)}),onChange:t[4]||(t[4]=function(t){e.onChangeSiteFilter(t)}),placeholder:e.translate("UsersManager_FilterByWebsite")},null,40,H)]),Object(o["createElementVNode"])("div",I,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(l,{modelValue:e.accessLevelFilter,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.accessLevelFilter=t}),uicontrol:"select",options:e.filteredSelectAccessLevels,"full-width":!0,placeholder:e.translate("UsersManager_FilterByAccess")},null,8,["modelValue","options","placeholder"])])])]),e.totalEntries>e.limit?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",J,[Object(o["createElementVNode"])("div",q,[Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["prev",{disabled:e.offset<=0}])},[Object(o["createElementVNode"])("span",{class:"pointer",onClick:t[6]||(t[6]=function(t){return e.gotoPreviousPage()})},"« "+Object(o["toDisplayString"])(e.translate("General_Previous")),1)],2),Object(o["createElementVNode"])("span",$,[Object(o["createElementVNode"])("span",{textContent:Object(o["toDisplayString"])(e.paginationText)},null,8,z)]),Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["next",{disabled:e.offset+e.limit>=e.totalEntries}])},[Object(o["createElementVNode"])("span",{class:"pointer",onClick:t[7]||(t[7]=function(t){return e.gotoNextPage()})},Object(o["toDisplayString"])(e.translate("General_Next"))+" »",1)],2)])])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",G,[e.isRoleHelpToggled?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,context:"info",type:"persistent",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.rolesHelpText)},null,8,W)]})),_:1})):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",Y,[e.isCapabilitiesHelpToggled?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,context:"info",type:"persistent",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(e.translate("UsersManager_CapabilitiesHelp")),1)]})),_:1})):Object(o["createCommentVNode"])("",!0)]),Object(o["withDirectives"])(Object(o["createElementVNode"])("table",X,[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",K,[Object(o["createElementVNode"])("span",Q,[Object(o["createElementVNode"])("label",null,[Object(o["createElementVNode"])("input",{type:"checkbox",id:"perm_edit_select_all",checked:e.isAllCheckboxSelected,onChange:t[8]||(t[8]=function(t){return e.onAllCheckboxChange(t)})},null,40,Z),ee])])]),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("General_Name")),1),Object(o["createElementVNode"])("th",te,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize("".concat(e.translate("UsersManager_Role")," "))},null,8,ne),Object(o["createElementVNode"])("a",{href:"",class:Object(o["normalizeClass"])(["helpIcon",{sticky:e.isRoleHelpToggled}]),onClick:t[9]||(t[9]=Object(o["withModifiers"])((function(t){return e.isRoleHelpToggled=!e.isRoleHelpToggled}),["prevent"]))},ie,2)]),Object(o["createElementVNode"])("th",re,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize("".concat(e.translate("UsersManager_Capabilities")," "))},null,8,oe),Object(o["createElementVNode"])("a",{href:"",class:Object(o["normalizeClass"])(["helpIcon",{sticky:e.isCapabilitiesHelpToggled}]),onClick:t[10]||(t[10]=Object(o["withModifiers"])((function(t){return e.isCapabilitiesHelpToggled=!e.isCapabilitiesHelpToggled}),["prevent"]))},le,2)])])]),Object(o["createElementVNode"])("tbody",null,[e.isAllCheckboxSelected&&e.siteAccess.length<e.totalEntries?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",ce,[Object(o["createElementVNode"])("td",de,[e.areAllResultsSelected?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ue,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.theDisplayedWebsitesAreSelectedText),style:{"margin-right":"3.5px"}},null,8,me),Object(o["createElementVNode"])("a",{href:"#",onClick:t[11]||(t[11]=Object(o["withModifiers"])((function(t){return e.areAllResultsSelected=!e.areAllResultsSelected}),["prevent"])),innerHTML:e.$sanitize(e.clickToSelectAllText)},null,8,be)])),e.areAllResultsSelected?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",pe,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.allWebsitesAreSelectedText),style:{"margin-right":"3.5px"}},null,8,he),Object(o["createElementVNode"])("a",{href:"#",onClick:t[12]||(t[12]=Object(o["withModifiers"])((function(t){return e.areAllResultsSelected=!e.areAllResultsSelected}),["prevent"])),innerHTML:e.$sanitize(e.clickToSelectDisplayedWebsitesText)},null,8,ge)])):Object(o["createCommentVNode"])("",!0)])])):Object(o["createCommentVNode"])("",!0),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.siteAccess,(function(n,s){return Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{key:n.idsite},[Object(o["createElementVNode"])("td",fe,[Object(o["createElementVNode"])("span",je,[Object(o["createElementVNode"])("label",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"checkbox",id:"perm_edit_select_row".concat(s),"onUpdate:modelValue":function(t){return e.selectedRows[s]=t},onClick:t[13]||(t[13]=function(t){return e.onRowSelected()})},null,8,Oe),[[o["vModelCheckbox"],e.selectedRows[s]]]),ve])])]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("span",null,Object(o["toDisplayString"])(n.site_name),1)]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("div",Ce,[Object(o["createVNode"])(l,{"model-value":n.role,"onUpdate:modelValue":function(t){e.onRoleChange(n,t)},uicontrol:"select",options:e.filteredAccessLevels,"full-width":!0},null,8,["model-value","onUpdate:modelValue","options"])])]),Object(o["createElementVNode"])("td",null,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(c,{idsite:n.idsite,"site-name":n.site_name,"user-login":e.userLogin,"user-role":n.role,capabilities:n.capabilities,onChange:t[14]||(t[14]=function(t){return e.fetchAccess()})},null,8,["idsite","site-name","user-login","user-role","capabilities"])])])])})),128))])],512),[[u]]),Object(o["createElementVNode"])("div",Ne,[Object(o["createElementVNode"])("div",Se,[e.siteAccessToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",{key:0,innerHTML:e.$sanitize(e.deletePermConfirmSingleText)},null,8,Ue)):Object(o["createCommentVNode"])("",!0),e.siteAccessToChange?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",{key:1,innerHTML:e.$sanitize(e.deletePermConfirmMultipleText)},null,8,ye))]),Object(o["createElementVNode"])("div",Ve,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[15]||(t[15]=Object(o["withModifiers"])((function(t){return e.changeUserRole()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[16]||(t[16]=Object(o["withModifiers"])((function(t){e.siteAccessToChange=null,e.roleToChangeTo=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512),Object(o["createElementVNode"])("div",ke,[Object(o["createElementVNode"])("div",Ee,[e.siteAccessToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",{key:0,innerHTML:e.$sanitize(e.changePermToSiteConfirmSingleText)},null,8,Ae)):Object(o["createCommentVNode"])("",!0),e.siteAccessToChange?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",{key:1,innerHTML:e.$sanitize(e.changePermToSiteConfirmMultipleText)},null,8,we))]),Object(o["createElementVNode"])("div",Te,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[17]||(t[17]=Object(o["withModifiers"])((function(t){return e.changeUserRole()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[18]||(t[18]=Object(o["withModifiers"])((function(t){e.siteAccessToChange.role=e.previousRole,e.siteAccessToChange=null,e.roleToChangeTo=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512),Object(o["createElementVNode"])("div",Be,[Object(o["createElementVNode"])("div",Me,[Object(o["createElementVNode"])("h3",{innerHTML:e.$sanitize(e.changePermToAllSitesConfirmText)},null,8,_e),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ChangePermToAllSitesConfirm2")),1)]),Object(o["createElementVNode"])("div",Le,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[19]||(t[19]=Object(o["withModifiers"])((function(t){return e.giveAccessToAllSites()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[20]||(t[20]=function(e){return e.preventDefault()})},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512)],2)}var De=window,xe=De.$,Pe=Object(o["defineComponent"])({props:{userLogin:{type:String,required:!0},limit:{type:Number,default:10},accessLevels:{type:Array,required:!0},filterAccessLevels:{type:Array,required:!0}},components:{Notification:r["Notification"],Field:g["Field"],CapabilitiesEdit:V},directives:{DropdownMenu:r["DropdownMenu"],ContentTable:r["ContentTable"]},data:function(){return{siteAccess:[],offset:0,totalEntries:null,accessLevelFilter:"",siteNameFilter:"",isLoadingAccess:!1,allWebsitesAccssLevelSet:"view",isAllCheckboxSelected:!1,selectedRows:{},isBulkActionsDisabled:!0,areAllResultsSelected:!1,previousRole:null,hasAccessToAtLeastOneSite:!0,isRoleHelpToggled:!1,isCapabilitiesHelpToggled:!1,isGivingAccessToAllSites:!1,roleToChangeTo:null,siteAccessToChange:null}},emits:["userHasAccessDetected","accessChanged"],created:function(){var e=this;this.onChangeSiteFilter=Object(r["debounce"])(this.onChangeSiteFilter,300),Object(o["watch"])((function(){return e.allPropsWatch}),(function(){e.limit&&e.fetchAccess()})),this.fetchAccess()},watch:{accessLevelFilter:function(){this.offset=0,this.fetchAccess()}},methods:{onAllCheckboxChange:function(e){var t=this;this.isAllCheckboxSelected=e.target.checked,this.isAllCheckboxSelected?(this.siteAccess.forEach((function(e,n){t.selectedRows[n]=!0})),this.isBulkActionsDisabled=!1):this.clearSelection()},clearSelection:function(){this.selectedRows={},this.areAllResultsSelected=!1,this.isBulkActionsDisabled=!0,this.isAllCheckboxSelected=!1,this.siteAccessToChange=null},onRowSelected:function(){var e=this;setTimeout((function(){var t=e.selectedRowsCount;e.isBulkActionsDisabled=0===t,e.isAllCheckboxSelected=t===e.siteAccess.length}))},fetchAccess:function(){var e=this;return this.isLoadingAccess=!0,r["AjaxHelper"].fetch({method:"UsersManager.getSitesAccessForUser",limit:this.limit,offset:this.offset,filter_search:this.siteNameFilter,filter_access:this.accessLevelFilter,userLogin:this.userLogin},{returnResponseObject:!0}).then((function(t){var n=t.getRequestHandle();e.isLoadingAccess=!1,e.siteAccess=n.responseJSON,e.totalEntries=parseInt(n.getResponseHeader("x-matomo-total-results"),10)||0,e.hasAccessToAtLeastOneSite=!!n.getResponseHeader("x-matomo-has-some"),e.$emit("userHasAccessDetected",{hasAccess:e.hasAccessToAtLeastOneSite}),e.clearSelection()})).catch((function(){e.isLoadingAccess=!1,e.clearSelection()}))},gotoPreviousPage:function(){this.offset=Math.max(0,this.offset-this.limit),this.fetchAccess()},gotoNextPage:function(){var e=this.offset+this.limit;e>=(this.totalEntries||0)||(this.offset=e,this.fetchAccess())},showRemoveAccessConfirm:function(){xe(this.$refs.deleteAccessConfirmModal).modal({dismissible:!1}).modal("open")},changeUserRole:function(){var e=this,t=function(){var t=[];return Object.keys(e.selectedRows).forEach((function(n){e.selectedRows[n]&&e.siteAccess[n]&&t.push(e.siteAccess[n].idsite)})),t},n=function(){return r["AjaxHelper"].fetch({method:"UsersManager.getSitesAccessForUser",filter_search:e.siteNameFilter,filter_access:e.accessLevelFilter,userLogin:e.userLogin,filter_limit:"-1"}).then((function(e){return e.map((function(e){return e.idsite}))}))};return this.isLoadingAccess=!0,Promise.resolve().then((function(){return e.siteAccessToChange?[e.siteAccessToChange.idsite]:e.areAllResultsSelected?n():t()})).then((function(t){return r["AjaxHelper"].post({method:"UsersManager.setUserAccess"},{userLogin:e.userLogin,access:e.roleToChangeTo,idSites:t})})).catch((function(){})).then((function(){return e.$emit("accessChanged"),e.fetchAccess()}))},showChangeAccessConfirm:function(){xe(this.$refs.changeAccessConfirmModal).modal({dismissible:!1}).modal("open")},getRoleDisplay:function(e){var t=null;return this.filteredAccessLevels.forEach((function(n){n.key===e&&(t=n.value)})),t},giveAccessToAllSites:function(){var e=this;this.isGivingAccessToAllSites=!0,r["AjaxHelper"].fetch({method:"SitesManager.getSitesWithAdminAccess",filter_limit:-1}).then((function(t){var n=t.map((function(e){return e.idsite}));return r["AjaxHelper"].post({method:"UsersManager.setUserAccess"},{userLogin:e.userLogin,access:e.allWebsitesAccssLevelSet,idSites:n})})).then((function(){return e.fetchAccess()})).finally((function(){e.isGivingAccessToAllSites=!1}))},showChangeAccessAllSitesModal:function(){xe(this.$refs.confirmGiveAccessAllSitesModal).modal({dismissible:!1}).modal("open")},onChangeSiteFilter:function(e){var t=this;setTimeout((function(){var n=e.target.value;t.siteNameFilter!==n&&(t.siteNameFilter=n,t.offset=0,t.fetchAccess())}))},onRoleChange:function(e,t){this.previousRole=e.role,this.roleToChangeTo=t,this.siteAccessToChange=e,this.showChangeAccessConfirm()}},computed:{rolesHelpText:function(){return Object(r["translate"])("UsersManager_RolesHelp",'<a href="https://matomo.org/faq/general/faq_70/" target="_blank" rel="noreferrer noopener">',"</a>",'<a href="https://matomo.org/faq/general/faq_69/" target="_blank" rel="noreferrer noopener">',"</a>")},theDisplayedWebsitesAreSelectedText:function(){var e=Object(r["translate"])("UsersManager_TheDisplayedWebsitesAreSelected","<strong>".concat(this.siteAccess.length,"</strong>"));return"".concat(e," ")},clickToSelectAllText:function(){return Object(r["translate"])("UsersManager_ClickToSelectAll","<strong>".concat(this.totalEntries,"</strong>"))},allWebsitesAreSelectedText:function(){return Object(r["translate"])("UsersManager_AllWebsitesAreSelected","<strong>".concat(this.totalEntries,"</strong>"))},clickToSelectDisplayedWebsitesText:function(){return Object(r["translate"])("UsersManager_ClickToSelectDisplayedWebsites","<strong>".concat(this.siteAccess.length,"</strong>"))},deletePermConfirmSingleText:function(){return Object(r["translate"])("UsersManager_DeletePermConfirmSingle","<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.siteAccessToChangeName,"</strong>"))},deletePermConfirmMultipleText:function(){return Object(r["translate"])("UsersManager_DeletePermConfirmMultiple","<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.affectedSitesCount,"</strong>"))},changePermToSiteConfirmSingleText:function(){return Object(r["translate"])("UsersManager_ChangePermToSiteConfirmSingle","<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.siteAccessToChangeName,"</strong>"),"<strong>".concat(this.getRoleDisplay(this.roleToChangeTo),"</strong>"))},changePermToSiteConfirmMultipleText:function(){return Object(r["translate"])("UsersManager_ChangePermToSiteConfirmMultiple","<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.affectedSitesCount,"</strong>"),"<strong>".concat(this.getRoleDisplay(this.roleToChangeTo),"</strong>"))},changePermToAllSitesConfirmText:function(){return Object(r["translate"])("UsersManager_ChangePermToAllSitesConfirm","<strong>".concat(this.userLogin,"</strong>"),"<strong>".concat(this.getRoleDisplay(this.allWebsitesAccssLevelSet),"</strong>"))},paginationLowerBound:function(){return this.offset+1},paginationUpperBound:function(){return this.totalEntries?Math.min(this.offset+this.limit,this.totalEntries):"?"},filteredAccessLevels:function(){return this.accessLevels.filter((function(e){return"superuser"!==e.key&&"role"===e.type}))},filteredSelectAccessLevels:function(){return this.filterAccessLevels.filter((function(e){return"superuser"!==e.key}))},selectedRowsCount:function(){var e=0;return Object.values(this.selectedRows).forEach((function(t){t&&(e+=1)})),e},affectedSitesCount:function(){return this.areAllResultsSelected?this.totalEntries:this.selectedRowsCount},allPropsWatch:function(){return this.userLogin,this.limit,this.accessLevels,this.filterAccessLevels,Date.now()},siteAccessToChangeName:function(){return this.siteAccessToChange?r["Matomo"].helper.htmlEntities(this.siteAccessToChange.site_name):""},paginationText:function(){var e=Object(r["translate"])("General_Pagination","".concat(this.paginationLowerBound),"".concat(this.paginationUpperBound),"".concat(this.totalEntries));return" ".concat(e," ")}}});Pe.render=Re;var Fe=Pe,He=(Object(r["createAngularJsAdapter"])({component:Fe,scope:{userLogin:{angularJsBind:"<"},limit:{angularJsBind:"<"},onUserHasAccessDetected:{angularJsBind:"&",vue:"userHasAccessDetected"},onAccessChange:{angularJsBind:"&",vue:"accessChanged"},accessLevels:{angularJsBind:"<"},filterAccessLevels:{angularJsBind:"<"}},directiveName:"piwikUserPermissionsEdit",restrict:"E"}),{class:"row"}),Ie={key:0,class:"col m2 entityList"},Je={class:"listCircle"},qe={key:0,class:"icon-warning"},$e=Object(o["createElementVNode"])("div",{class:"save-button-spacer hide-on-small-only"},null,-1),ze={href:"",class:"entityCancelLink"},Ge={class:"visibleTab col m10"},We={key:0,class:"basic-info-tab"},Ye={class:"form-group row",style:{position:"relative"}},Xe={class:"col s12 m6"},Ke={class:"col s12 m6"},Qe={key:0,class:"form-help"},Ze=["innerHTML"],et=["innerHTML"],tt={key:0,class:"entityCancel"},nt={key:1,class:"user-permissions"},st={key:0},it={key:1,class:"alert alert-info"},rt={key:2,class:"superuser-access form-group"},ot={key:0},at={key:1},lt={key:3,class:"twofa-reset form-group"},ct={class:"resetTwoFa"},dt=["innerHTML"]; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ut(e,t,n,s,i,r){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SaveButton"),c=Object(o["resolveComponent"])("PasswordConfirmation"),d=Object(o["resolveComponent"])("UserPermissionsEdit"),u=Object(o["resolveComponent"])("ContentBlock"),m=Object(o["resolveDirective"])("form");return Object(o["openBlock"])(),Object(o["createBlock"])(u,{class:Object(o["normalizeClass"])(["userEditForm",{loading:e.isSavingUserInfo}]),"content-title":"".concat(e.formTitle," ").concat(e.isAdd?"":"'".concat(e.theUser.login,"'"))},{default:Object(o["withCtx"])((function(){return[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",He,[e.isAdd?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ie,[Object(o["createElementVNode"])("ul",Je,[Object(o["createElementVNode"])("li",{class:Object(o["normalizeClass"])([{active:"basic"===e.activeTab},"menuBasicInfo"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[0]||(t[0]=Object(o["withModifiers"])((function(t){return e.activeTab="basic"}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_BasicInformation")),1)],2),Object(o["createElementVNode"])("li",{class:Object(o["normalizeClass"])([{active:"permissions"===e.activeTab},"menuPermissions"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[1]||(t[1]=Object(o["withModifiers"])((function(t){return e.activeTab="permissions"}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("UsersManager_Permissions")),1),e.userHasAccess||e.theUser.superuser_access?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",qe))],2),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:0,class:Object(o["normalizeClass"])([{active:"superuser"===e.activeTab},"menuSuperuser"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[2]||(t[2]=Object(o["withModifiers"])((function(t){return e.activeTab="superuser"}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_SuperUserAccess")),1)],2)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole&&e.theUser.uses_2fa&&!e.isAdd?(Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:1,class:Object(o["normalizeClass"])([{active:"2fa"===e.activeTab},"menuUserTwoFa"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[3]||(t[3]=Object(o["withModifiers"])((function(t){return e.activeTab="2fa"}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_TwoFactorAuthentication")),1)],2)):Object(o["createCommentVNode"])("",!0)]),$e,Object(o["createElementVNode"])("div",{class:"entityCancel",onClick:t[4]||(t[4]=Object(o["withModifiers"])((function(t){return e.onDoneEditing()}),["prevent"]))},[Object(o["createElementVNode"])("a",ze,Object(o["toDisplayString"])(e.translate("Mobile_NavigationBack")),1)])])),Object(o["createElementVNode"])("div",Ge,["basic"===e.activeTab?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",We,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{modelValue:e.theUser.login,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.theUser.login=t}),disabled:e.isSavingUserInfo||!e.isAdd||e.isShowingPasswordConfirm,uicontrol:"text",name:"user_login",maxlength:100,title:e.translate("General_Username")},null,8,["modelValue","disabled","title"])]),Object(o["createElementVNode"])("div",null,[e.isPending?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,"model-value":e.theUser.password,disabled:e.isSavingUserInfo||"superuser"!==e.currentUserRole&&!e.isAdd||e.isShowingPasswordConfirm,"onUpdate:modelValue":t[6]||(t[6]=function(t){e.theUser.password=t,e.isPasswordModified=!0}),uicontrol:"password",name:"user_password",title:e.translate("General_Password")},null,8,["model-value","disabled","title"]))]),Object(o["createElementVNode"])("div",null,["superuser"===e.currentUserRole||e.isAdd?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,modelValue:e.theUser.email,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.theUser.email=t}),disabled:e.isSavingUserInfo||"superuser"!==e.currentUserRole&&!e.isAdd||e.isShowingPasswordConfirm,uicontrol:"text",name:"user_email",maxlength:100,title:e.translate("UsersManager_Email")},null,8,["modelValue","disabled","title"])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",null,[e.isAdd?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,modelValue:e.firstSiteAccess,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.firstSiteAccess=t}),disabled:e.isSavingUserInfo,uicontrol:"site",name:"user_site","ui-control-attributes":{onlySitesWithAdminAccess:!0},title:e.translate("UsersManager_FirstWebsitePermission"),"inline-help":e.translate("UsersManager_FirstSiteInlineHelp")},null,8,["modelValue","disabled","title","inline-help"])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("div",Ye,[Object(o["createElementVNode"])("div",Xe,["superuser"===e.currentUserRole||e.isAdd?(Object(o["openBlock"])(),Object(o["createBlock"])(l,{key:0,value:e.saveButtonLabel,disabled:e.isAdd&&(!e.firstSiteAccess||!e.firstSiteAccess.id),saving:e.isSavingUserInfo,onConfirm:t[9]||(t[9]=function(t){return e.saveUserInfo()})},null,8,["value","disabled","saving"])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",Ke,[e.isAdd?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Qe,[Object(o["createElementVNode"])("span",{class:"inline-help",innerHTML:e.$sanitize(e.translate("UsersManager_InviteSuccessNotification",[7]))},null,8,Ze)])):Object(o["createCommentVNode"])("",!0)])]),Object(o["createVNode"])(c,{modelValue:e.showPasswordConfirmationForInviteUser,"onUpdate:modelValue":t[10]||(t[10]=function(t){return e.showPasswordConfirmationForInviteUser=t}),onConfirmed:e.inviteUser},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",{innerHTML:e.$sanitize(e.inviteUserTitle)},null,8,et),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])]),e.isAdd?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",tt,[Object(o["createElementVNode"])("a",{href:"",class:"entityCancelLink",onClick:t[11]||(t[11]=Object(o["withModifiers"])((function(t){return e.onDoneEditing()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_Cancel")),1)])):Object(o["createCommentVNode"])("",!0)])):Object(o["createCommentVNode"])("",!0),e.isAdd?Object(o["createCommentVNode"])("",!0):Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",nt,[e.theUser.superuser_access?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",st,[Object(o["createVNode"])(d,{"user-login":e.theUser.login,onUserHasAccessDetected:t[12]||(t[12]=function(t){return e.userHasAccess=t.hasAccess}),onAccessChanged:t[13]||(t[13]=function(t){return e.isUserModified=!0}),"access-levels":e.accessLevels,"filter-access-levels":e.filterAccessLevels},null,8,["user-login","access-levels","filter-access-levels"])])),e.theUser.superuser_access?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",it,Object(o["toDisplayString"])(e.translate("UsersManager_SuperUsersPermissionsNotice")),1)):Object(o["createCommentVNode"])("",!0)],512)),[[o["vShow"],"permissions"===e.activeTab]]),"superuser"!==e.activeTab||"superuser"!==e.currentUserRole||e.isAdd?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",rt,[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_SuperUserIntro1")),1),Object(o["createElementVNode"])("p",null,[Object(o["createElementVNode"])("strong",null,Object(o["toDisplayString"])(e.translate("UsersManager_SuperUserIntro2")),1)]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{modelValue:e.superUserAccessChecked,"onUpdate:modelValue":t[14]||(t[14]=function(t){return e.superUserAccessChecked=t}),onClick:t[15]||(t[15]=function(t){return e.confirmSuperUserChange()}),disabled:e.isSavingUserInfo,uicontrol:"checkbox",name:"superuser_access",title:e.translate("UsersManager_HasSuperUserAccess")},null,8,["modelValue","disabled","title"])]),Object(o["createVNode"])(c,{modelValue:e.showPasswordConfirmationForSuperUser,"onUpdate:modelValue":t[16]||(t[16]=function(t){return e.showPasswordConfirmationForSuperUser=t}),onConfirmed:e.toggleSuperuserAccess,onAborted:t[17]||(t[17]=function(t){return e.setSuperUserAccessChecked()})},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.translate("UsersManager_AreYouSure")),1),e.theUser.superuser_access?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",ot,Object(o["toDisplayString"])(e.translate("UsersManager_RemoveSuperuserAccessConfirm")),1)):Object(o["createCommentVNode"])("",!0),e.theUser.superuser_access?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",at,Object(o["toDisplayString"])(e.translate("UsersManager_AddSuperuserAccessConfirm")),1))]})),_:1},8,["modelValue","onConfirmed"])])),"superuser"!==e.currentUserRole||e.isAdd?Object(o["createCommentVNode"])("",!0):Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",lt,[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ResetTwoFactorAuthenticationInfo")),1),Object(o["createElementVNode"])("div",ct,[Object(o["createVNode"])(l,{saving:e.isResetting2FA,onConfirm:t[18]||(t[18]=function(t){return e.confirmReset2FA()}),value:e.translate("UsersManager_ResetTwoFactorAuthentication")},null,8,["saving","value"])]),Object(o["createVNode"])(c,{modelValue:e.showPasswordConfirmationFor2FA,"onUpdate:modelValue":t[19]||(t[19]=function(t){return e.showPasswordConfirmationFor2FA=t}),onConfirmed:e.reset2FA},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.translate("UsersManager_AreYouSure")),1),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])],512)),[[o["vShow"],"2fa"===e.activeTab]])])],512),[[m]]),Object(o["createVNode"])(c,{modelValue:e.isShowingPasswordConfirm,"onUpdate:modelValue":t[20]||(t[20]=function(t){return e.isShowingPasswordConfirm=t}),onConfirmed:e.updateUser},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",{innerHTML:e.$sanitize(e.changePasswordTitle)},null,8,dt),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])]})),_:1},8,["class","content-title"])}var mt={login:"",superuser_access:!1,uses_2fa:!1,password:"",email:"",invite_status:""},bt=Object(o["defineComponent"])({props:{user:Object,currentUserRole:{type:String,required:!0},accessLevels:{type:Array,required:!0},filterAccessLevels:{type:Array,required:!0},initialSiteId:{type:[String,Number],required:!0},initialSiteName:{type:String,required:!0}},components:{ContentBlock:r["ContentBlock"],Field:h["Field"],SaveButton:h["SaveButton"],UserPermissionsEdit:Fe,PasswordConfirmation:h["PasswordConfirmation"]},directives:{Form:h["Form"]},data:function(){return{theUser:this.user||Object.assign({},mt),activeTab:"basic",permissionsForIdSite:1,isSavingUserInfo:!1,userHasAccess:!0,firstSiteAccess:{id:this.initialSiteId,name:this.initialSiteName},isUserModified:!1,isPasswordModified:!1,superUserAccessChecked:null,showPasswordConfirmationForSuperUser:!1,showPasswordConfirmationFor2FA:!1,showPasswordConfirmationForInviteUser:!1,isResetting2FA:!1,isShowingPasswordConfirm:!1}},emits:["done","updated"],watch:{user:function(e){this.onUserChange(e)}},created:function(){this.onUserChange(this.user)},methods:{onUserChange:function(e){this.theUser=e||Object.assign({},mt),this.theUser.password||this.resetPasswordVar(),this.setSuperUserAccessChecked()},confirmSuperUserChange:function(){this.showPasswordConfirmationForSuperUser=!0},confirmReset2FA:function(){this.showPasswordConfirmationFor2FA=!0},toggleSuperuserAccess:function(e){var t=this;this.isSavingUserInfo=!0,r["AjaxHelper"].post({method:"UsersManager.setSuperUserAccess"},{userLogin:this.theUser.login,hasSuperUserAccess:this.theUser.superuser_access?"0":"1",passwordConfirmation:e}).then((function(){t.theUser.superuser_access=!t.theUser.superuser_access})).catch((function(){})).then((function(){t.isSavingUserInfo=!1,t.setSuperUserAccessChecked()}))},saveUserInfo:function(){this.isAdd?this.showPasswordConfirmationForInviteUser=!0:this.isShowingPasswordConfirm=!0},inviteUser:function(e){var t=this;return this.isSavingUserInfo=!0,r["AjaxHelper"].post({method:"UsersManager.inviteUser"},{userLogin:this.theUser.login,email:this.theUser.email,initialIdSite:this.firstSiteAccess?this.firstSiteAccess.id:void 0,passwordConfirmation:e}).catch((function(e){throw t.isSavingUserInfo=!1,e})).then((function(){t.firstSiteAccess=null,t.isSavingUserInfo=!1,t.isUserModified=!0,t.theUser.invite_status="pending",t.resetPasswordVar(),t.showUserCreatedNotification(),t.$emit("updated",{user:Object(o["readonly"])(t.theUser)})}))},resetPasswordVar:function(){this.isAdd||(this.theUser.password="XXXXXXXX")},showUserSavedNotification:function(){r["NotificationsStore"].show({message:Object(r["translate"])("General_YourChangesHaveBeenSaved"),context:"success",type:"toast"})},showUserCreatedNotification:function(){r["NotificationsStore"].show({message:Object(r["translate"])("UsersManager_InviteSuccess"),context:"success",type:"toast"})},reset2FA:function(e){var t=this;return this.isResetting2FA=!0,r["AjaxHelper"].post({method:"TwoFactorAuth.resetTwoFactorAuth",userLogin:this.theUser.login,passwordConfirmation:e}).catch((function(e){throw t.isResetting2FA=!1,e})).then((function(){t.isResetting2FA=!1,t.theUser.uses_2fa=!1,t.activeTab="basic",t.showUserSavedNotification()}))},updateUser:function(e){var t=this;return this.isSavingUserInfo=!0,r["AjaxHelper"].post({method:"UsersManager.updateUser"},{userLogin:this.theUser.login,password:this.isPasswordModified&&this.theUser.password?this.theUser.password:void 0,passwordConfirmation:e,email:this.theUser.email}).then((function(){t.isSavingUserInfo=!1,t.isUserModified=!0,t.isPasswordModified=!1,t.resetPasswordVar(),t.showUserSavedNotification(),t.$emit("updated",{user:Object(o["readonly"])(t.theUser)})})).catch((function(){t.isSavingUserInfo=!1}))},setSuperUserAccessChecked:function(){this.superUserAccessChecked=!!this.theUser.superuser_access},onDoneEditing:function(){this.$emit("done",{isUserModified:this.isUserModified})}},computed:{formTitle:function(){return this.isAdd?Object(r["translate"])("UsersManager_InviteNewUser"):Object(r["translate"])("UsersManager_EditUser")},saveButtonLabel:function(){return this.isAdd?Object(r["translate"])("UsersManager_InviteUser"):Object(r["translate"])("UsersManager_SaveBasicInfo")},isPending:function(){return!this.user||!("pending"!==this.user.invite_status&&!Number.isInteger(this.user.invite_status))},isAdd:function(){return!this.user},changePasswordTitle:function(){return Object(r["translate"])("UsersManager_AreYouSureChangeDetails","<strong>".concat(this.theUser.login,"</strong>"))},inviteUserTitle:function(){return Object(r["translate"])("UsersManager_InviteConfirm","<strong>".concat(this.theUser.login,"</strong>"))}}});bt.render=ut;var pt=bt,gt=(Object(r["createAngularJsAdapter"])({component:pt,scope:{user:{angularJsBind:"<"},onDoneEditing:{angularJsBind:"&",vue:"done"},currentUserRole:{angularJsBind:"<"},accessLevels:{angularJsBind:"<"},filterAccessLevels:{angularJsBind:"<"},initialSiteId:{angularJsBind:"<"},initialSiteName:{angularJsBind:"<"},onUpdated:{angularJsBind:"&",vue:"updated"}},directiveName:"piwikUserEditForm",restrict:"E"}),{class:"userListFilters row"}),ht={class:"col s12 m12 l8"},ft={class:"input-field col s12 m3 l3"},jt={id:"user-list-bulk-actions",class:"dropdown-content"},Ot={class:"dropdown-trigger","data-target":"bulk-set-access"},vt={id:"bulk-set-access",class:"dropdown-content"},Ct=["onClick"],St={key:0},Ut={class:"input-field col s12 m3 l3"},Nt={class:"permissions-for-selector"},yt={class:"input-field col s12 m3 l3"},Vt={class:"input-field col s12 m3 l3"},Et={key:0,class:"input-field col s12 m12 l4 users-list-pagination-container"},kt={class:"usersListPagination"},At={class:"pointer"},wt={class:"counter"},Tt={class:"pointer"},Bt={key:0,class:"roles-help-notification"},Mt=["innerHTML"],_t={class:"select-cell"},Lt={class:"checkbox-container"},Rt=Object(o["createElementVNode"])("span",null,null,-1),Dt={class:"first"},xt={class:"role_header"},Pt={style:{"margin-right":"3.5px"}},Ft=Object(o["createElementVNode"])("span",{class:"icon-help"},null,-1),Ht=[Ft],It={key:0},Jt=["title"],qt={key:2},$t={class:"actions-cell-header"},zt={key:0,class:"select-all-row"},Gt={colspan:"8"},Wt={key:0},Yt=["innerHTML"],Xt=["innerHTML"],Kt={key:1},Qt=["innerHTML"],Zt=["innerHTML"],en=["id"],tn={class:"select-cell"},nn={class:"checkbox-container"},sn=["id","onUpdate:modelValue"],rn=Object(o["createElementVNode"])("span",null,null,-1),on={id:"userLogin"},an={class:"access-cell"},ln={key:0,id:"email"},cn={key:1,id:"twofa"},dn={key:0,class:"icon-ok"},un={key:1,class:"icon-close"},mn={key:2,id:"last_seen"},bn={id:"status"},pn=["title"],gn={class:"center actions-cell"},hn=["onClick"],fn=Object(o["createElementVNode"])("span",{class:"icon-email"},null,-1),jn=[fn],On=["onClick"],vn=Object(o["createElementVNode"])("span",{class:"icon-edit"},null,-1),Cn=[vn],Sn=["onClick"],Un=Object(o["createElementVNode"])("span",{class:"icon-delete"},null,-1),Nn=[Un],yn=["innerHTML"],Vn=["innerHTML"],En={class:"change-user-role-confirm-modal modal",ref:"changeUserRoleConfirmModal"},kn={class:"modal-content"},An=["innerHTML"],wn={key:1},Tn=["innerHTML"],Bn=["innerHTML"],Mn={class:"modal-footer"},_n={class:"resend-invite-confirm-modal modal",ref:"resendInviteConfirmModal"},Ln={class:"modal-content"},Rn=["innerHTML"],Dn={class:"modal-footer"}; + */function ut(e,t,n,s,i,r){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SaveButton"),c=Object(o["resolveComponent"])("PasswordConfirmation"),d=Object(o["resolveComponent"])("UserPermissionsEdit"),u=Object(o["resolveComponent"])("ContentBlock"),m=Object(o["resolveDirective"])("form");return Object(o["openBlock"])(),Object(o["createBlock"])(u,{class:Object(o["normalizeClass"])(["userEditForm",{loading:e.isSavingUserInfo}]),"content-title":"".concat(e.formTitle," ").concat(e.isAdd?"":"'".concat(e.theUser.login,"'"))},{default:Object(o["withCtx"])((function(){return[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",He,[e.isAdd?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Ie,[Object(o["createElementVNode"])("ul",Je,[Object(o["createElementVNode"])("li",{class:Object(o["normalizeClass"])([{active:"basic"===e.activeTab},"menuBasicInfo"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[0]||(t[0]=Object(o["withModifiers"])((function(t){return e.activeTab="basic"}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_BasicInformation")),1)],2),Object(o["createElementVNode"])("li",{class:Object(o["normalizeClass"])([{active:"permissions"===e.activeTab},"menuPermissions"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[1]||(t[1]=Object(o["withModifiers"])((function(t){return e.activeTab="permissions"}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("UsersManager_Permissions")),1),e.userHasAccess||e.theUser.superuser_access?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",qe))],2),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:0,class:Object(o["normalizeClass"])([{active:"superuser"===e.activeTab},"menuSuperuser"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[2]||(t[2]=Object(o["withModifiers"])((function(t){return e.activeTab="superuser"}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_SuperUserAccess")),1)],2)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole&&e.theUser.uses_2fa&&!e.isAdd?(Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:1,class:Object(o["normalizeClass"])([{active:"2fa"===e.activeTab},"menuUserTwoFa"])},[Object(o["createElementVNode"])("a",{href:"",onClick:t[3]||(t[3]=Object(o["withModifiers"])((function(t){return e.activeTab="2fa"}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_TwoFactorAuthentication")),1)],2)):Object(o["createCommentVNode"])("",!0)]),$e,Object(o["createElementVNode"])("div",{class:"entityCancel",onClick:t[4]||(t[4]=Object(o["withModifiers"])((function(t){return e.onDoneEditing()}),["prevent"]))},[Object(o["createElementVNode"])("a",ze,Object(o["toDisplayString"])(e.translate("Mobile_NavigationBack")),1)])])),Object(o["createElementVNode"])("div",Ge,["basic"===e.activeTab?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",We,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{modelValue:e.theUser.login,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.theUser.login=t}),disabled:e.isSavingUserInfo||!e.isAdd||e.isShowingPasswordConfirm,uicontrol:"text",name:"user_login",maxlength:100,title:e.translate("General_Username")},null,8,["modelValue","disabled","title"])]),Object(o["createElementVNode"])("div",null,[e.isPending?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,"model-value":e.theUser.password,disabled:e.isSavingUserInfo||"superuser"!==e.currentUserRole&&!e.isAdd||e.isShowingPasswordConfirm,"onUpdate:modelValue":t[6]||(t[6]=function(t){e.theUser.password=t,e.isPasswordModified=!0}),uicontrol:"password",name:"user_password",title:e.translate("General_Password")},null,8,["model-value","disabled","title"]))]),Object(o["createElementVNode"])("div",null,["superuser"===e.currentUserRole||e.isAdd?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,modelValue:e.theUser.email,"onUpdate:modelValue":t[7]||(t[7]=function(t){return e.theUser.email=t}),disabled:e.isSavingUserInfo||"superuser"!==e.currentUserRole&&!e.isAdd||e.isShowingPasswordConfirm,uicontrol:"text",name:"user_email",maxlength:100,title:e.translate("UsersManager_Email")},null,8,["modelValue","disabled","title"])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",null,[e.isAdd?(Object(o["openBlock"])(),Object(o["createBlock"])(a,{key:0,modelValue:e.firstSiteAccess,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.firstSiteAccess=t}),disabled:e.isSavingUserInfo,uicontrol:"site",name:"user_site","ui-control-attributes":{onlySitesWithAdminAccess:!0},title:e.translate("UsersManager_FirstWebsitePermission"),"inline-help":e.translate("UsersManager_FirstSiteInlineHelp")},null,8,["modelValue","disabled","title","inline-help"])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("div",Ye,[Object(o["createElementVNode"])("div",Xe,["superuser"===e.currentUserRole||e.isAdd?(Object(o["openBlock"])(),Object(o["createBlock"])(l,{key:0,value:e.saveButtonLabel,disabled:e.isAdd&&(!e.firstSiteAccess||!e.firstSiteAccess.id),saving:e.isSavingUserInfo,onConfirm:t[9]||(t[9]=function(t){return e.saveUserInfo()})},null,8,["value","disabled","saving"])):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",Ke,[e.isAdd?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Qe,[Object(o["createElementVNode"])("span",{class:"inline-help",innerHTML:e.$sanitize(e.translate("UsersManager_InviteSuccessNotification",[7]))},null,8,Ze)])):Object(o["createCommentVNode"])("",!0)])]),Object(o["createVNode"])(c,{modelValue:e.showPasswordConfirmationForInviteUser,"onUpdate:modelValue":t[10]||(t[10]=function(t){return e.showPasswordConfirmationForInviteUser=t}),onConfirmed:e.inviteUser},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",{innerHTML:e.$sanitize(e.inviteUserTitle)},null,8,et),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])]),e.isAdd?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",tt,[Object(o["createElementVNode"])("a",{href:"",class:"entityCancelLink",onClick:t[11]||(t[11]=Object(o["withModifiers"])((function(t){return e.onDoneEditing()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_Cancel")),1)])):Object(o["createCommentVNode"])("",!0)])):Object(o["createCommentVNode"])("",!0),e.isAdd?Object(o["createCommentVNode"])("",!0):Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",nt,[e.theUser.superuser_access?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",st,[Object(o["createVNode"])(d,{"user-login":e.theUser.login,onUserHasAccessDetected:t[12]||(t[12]=function(t){return e.userHasAccess=t.hasAccess}),onAccessChanged:t[13]||(t[13]=function(t){return e.isUserModified=!0}),"access-levels":e.accessLevels,"filter-access-levels":e.filterAccessLevels},null,8,["user-login","access-levels","filter-access-levels"])])),e.theUser.superuser_access?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",it,Object(o["toDisplayString"])(e.translate("UsersManager_SuperUsersPermissionsNotice")),1)):Object(o["createCommentVNode"])("",!0)],512)),[[o["vShow"],"permissions"===e.activeTab]]),"superuser"!==e.activeTab||"superuser"!==e.currentUserRole||e.isAdd?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",rt,[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_SuperUserIntro1")),1),Object(o["createElementVNode"])("p",null,[Object(o["createElementVNode"])("strong",null,Object(o["toDisplayString"])(e.translate("UsersManager_SuperUserIntro2")),1)]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{modelValue:e.superUserAccessChecked,"onUpdate:modelValue":t[14]||(t[14]=function(t){return e.superUserAccessChecked=t}),onClick:t[15]||(t[15]=function(t){return e.confirmSuperUserChange()}),disabled:e.isSavingUserInfo,uicontrol:"checkbox",name:"superuser_access",title:e.translate("UsersManager_HasSuperUserAccess")},null,8,["modelValue","disabled","title"])]),Object(o["createVNode"])(c,{modelValue:e.showPasswordConfirmationForSuperUser,"onUpdate:modelValue":t[16]||(t[16]=function(t){return e.showPasswordConfirmationForSuperUser=t}),onConfirmed:e.toggleSuperuserAccess,onAborted:t[17]||(t[17]=function(t){return e.setSuperUserAccessChecked()})},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.translate("UsersManager_AreYouSure")),1),e.theUser.superuser_access?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",ot,Object(o["toDisplayString"])(e.translate("UsersManager_RemoveSuperuserAccessConfirm")),1)):Object(o["createCommentVNode"])("",!0),e.theUser.superuser_access?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",at,Object(o["toDisplayString"])(e.translate("UsersManager_AddSuperuserAccessConfirm")),1))]})),_:1},8,["modelValue","onConfirmed"])])),"superuser"!==e.currentUserRole||e.isAdd?Object(o["createCommentVNode"])("",!0):Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",lt,[Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ResetTwoFactorAuthenticationInfo")),1),Object(o["createElementVNode"])("div",ct,[Object(o["createVNode"])(l,{saving:e.isResetting2FA,onConfirm:t[18]||(t[18]=function(t){return e.confirmReset2FA()}),value:e.translate("UsersManager_ResetTwoFactorAuthentication")},null,8,["saving","value"])]),Object(o["createVNode"])(c,{modelValue:e.showPasswordConfirmationFor2FA,"onUpdate:modelValue":t[19]||(t[19]=function(t){return e.showPasswordConfirmationFor2FA=t}),onConfirmed:e.reset2FA},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.translate("UsersManager_AreYouSure")),1),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])],512)),[[o["vShow"],"2fa"===e.activeTab]])])],512),[[m]]),Object(o["createVNode"])(c,{modelValue:e.isShowingPasswordConfirm,"onUpdate:modelValue":t[20]||(t[20]=function(t){return e.isShowingPasswordConfirm=t}),onConfirmed:e.updateUser},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",{innerHTML:e.$sanitize(e.changePasswordTitle)},null,8,dt),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])]})),_:1},8,["class","content-title"])}var mt={login:"",superuser_access:!1,uses_2fa:!1,password:"",email:"",invite_status:""},bt=Object(o["defineComponent"])({props:{user:Object,currentUserRole:{type:String,required:!0},accessLevels:{type:Array,required:!0},filterAccessLevels:{type:Array,required:!0},initialSiteId:{type:[String,Number],required:!0},initialSiteName:{type:String,required:!0}},components:{ContentBlock:r["ContentBlock"],Field:g["Field"],SaveButton:g["SaveButton"],UserPermissionsEdit:Fe,PasswordConfirmation:g["PasswordConfirmation"]},directives:{Form:g["Form"]},data:function(){return{theUser:this.user||Object.assign({},mt),activeTab:"basic",permissionsForIdSite:1,isSavingUserInfo:!1,userHasAccess:!0,firstSiteAccess:{id:this.initialSiteId,name:this.initialSiteName},isUserModified:!1,isPasswordModified:!1,superUserAccessChecked:null,showPasswordConfirmationForSuperUser:!1,showPasswordConfirmationFor2FA:!1,showPasswordConfirmationForInviteUser:!1,isResetting2FA:!1,isShowingPasswordConfirm:!1}},emits:["done","updated","show-notification"],watch:{user:function(e){this.onUserChange(e)}},created:function(){this.onUserChange(this.user)},methods:{onUserChange:function(e){this.theUser=e||Object.assign({},mt),this.theUser.password||this.resetPasswordVar(),this.setSuperUserAccessChecked()},confirmSuperUserChange:function(){this.showPasswordConfirmationForSuperUser=!0},confirmReset2FA:function(){this.showPasswordConfirmationFor2FA=!0},toggleSuperuserAccess:function(e){var t=this;this.isSavingUserInfo=!0,r["AjaxHelper"].post({method:"UsersManager.setSuperUserAccess"},{userLogin:this.theUser.login,hasSuperUserAccess:this.theUser.superuser_access?"0":"1",passwordConfirmation:e}).then((function(){t.theUser.superuser_access=!t.theUser.superuser_access})).catch((function(){})).then((function(){t.isSavingUserInfo=!1,t.setSuperUserAccessChecked()}))},saveUserInfo:function(){this.isAdd?this.showPasswordConfirmationForInviteUser=!0:this.isShowingPasswordConfirm=!0},inviteUser:function(e){var t=this;return this.isSavingUserInfo=!0,r["AjaxHelper"].post({method:"UsersManager.inviteUser"},{userLogin:this.theUser.login,email:this.theUser.email,initialIdSite:this.firstSiteAccess?this.firstSiteAccess.id:void 0,passwordConfirmation:e}).catch((function(e){throw t.isSavingUserInfo=!1,e})).then((function(e){t.firstSiteAccess=null,t.isSavingUserInfo=!1,t.isUserModified=!0,t.theUser.invite_status="pending",t.resetPasswordVar(),t.$emit("updated",{user:Object(o["readonly"])(t.theUser)}),t.$emit("show-notification",e.value)}))},resetPasswordVar:function(){this.isAdd||(this.theUser.password="XXXXXXXX")},showUserSavedNotification:function(){r["NotificationsStore"].show({message:Object(r["translate"])("General_YourChangesHaveBeenSaved"),context:"success",type:"toast"})},reset2FA:function(e){var t=this;return this.isResetting2FA=!0,r["AjaxHelper"].post({method:"TwoFactorAuth.resetTwoFactorAuth",userLogin:this.theUser.login,passwordConfirmation:e}).catch((function(e){throw t.isResetting2FA=!1,e})).then((function(){t.isResetting2FA=!1,t.theUser.uses_2fa=!1,t.activeTab="basic",t.showUserSavedNotification()}))},updateUser:function(e){var t=this;return this.isSavingUserInfo=!0,r["AjaxHelper"].post({method:"UsersManager.updateUser"},{userLogin:this.theUser.login,password:this.isPasswordModified&&this.theUser.password?this.theUser.password:void 0,passwordConfirmation:e,email:this.theUser.email}).then((function(){t.isSavingUserInfo=!1,t.isUserModified=!0,t.isPasswordModified=!1,t.resetPasswordVar(),t.showUserSavedNotification(),t.$emit("updated",{user:Object(o["readonly"])(t.theUser)})})).catch((function(){t.isSavingUserInfo=!1}))},setSuperUserAccessChecked:function(){this.superUserAccessChecked=!!this.theUser.superuser_access},onDoneEditing:function(){this.$emit("done",{isUserModified:this.isUserModified})}},computed:{formTitle:function(){return this.isAdd?Object(r["translate"])("UsersManager_InviteNewUser"):Object(r["translate"])("UsersManager_EditUser")},saveButtonLabel:function(){return this.isAdd?Object(r["translate"])("UsersManager_InviteUser"):Object(r["translate"])("UsersManager_SaveBasicInfo")},isPending:function(){return!this.user||!("pending"!==this.user.invite_status&&!Number.isInteger(this.user.invite_status))},isAdd:function(){return!this.user},changePasswordTitle:function(){return Object(r["translate"])("UsersManager_AreYouSureChangeDetails","<strong>".concat(this.theUser.login,"</strong>"))},inviteUserTitle:function(){return Object(r["translate"])("UsersManager_InviteConfirm","<strong>".concat(this.theUser.login,"</strong>"))}}});bt.render=ut;var pt=bt,ht=(Object(r["createAngularJsAdapter"])({component:pt,scope:{user:{angularJsBind:"<"},onDoneEditing:{angularJsBind:"&",vue:"done"},currentUserRole:{angularJsBind:"<"},accessLevels:{angularJsBind:"<"},filterAccessLevels:{angularJsBind:"<"},initialSiteId:{angularJsBind:"<"},initialSiteName:{angularJsBind:"<"},onUpdated:{angularJsBind:"&",vue:"updated"}},directiveName:"piwikUserEditForm",restrict:"E"}),{class:"userListFilters row"}),gt={class:"col s12 m12 l8"},ft={class:"input-field col s12 m3 l3"},jt={id:"user-list-bulk-actions",class:"dropdown-content"},Ot={class:"dropdown-trigger","data-target":"bulk-set-access"},vt={id:"bulk-set-access",class:"dropdown-content"},Ct=["onClick"],Nt={key:0},St={class:"input-field col s12 m3 l3"},Ut={class:"permissions-for-selector"},yt={class:"input-field col s12 m3 l3"},Vt={class:"input-field col s12 m3 l3"},kt={key:0,class:"input-field col s12 m12 l4 users-list-pagination-container"},Et={class:"usersListPagination"},At={class:"pointer"},wt={class:"counter"},Tt={class:"pointer"},Bt={key:0,class:"roles-help-notification"},Mt=["innerHTML"],_t={class:"select-cell"},Lt={class:"checkbox-container"},Rt=Object(o["createElementVNode"])("span",null,null,-1),Dt={class:"first"},xt={class:"role_header"},Pt={style:{"margin-right":"3.5px"}},Ft=Object(o["createElementVNode"])("span",{class:"icon-help"},null,-1),Ht=[Ft],It={key:0},Jt=["title"],qt={key:2},$t={class:"actions-cell-header"},zt={key:0,class:"select-all-row"},Gt={colspan:"8"},Wt={key:0},Yt=["innerHTML"],Xt=["innerHTML"],Kt={key:1},Qt=["innerHTML"],Zt=["innerHTML"],en=["id"],tn={class:"select-cell"},nn={class:"checkbox-container"},sn=["id","onUpdate:modelValue"],rn=Object(o["createElementVNode"])("span",null,null,-1),on={id:"userLogin"},an={class:"access-cell"},ln={key:0,id:"email"},cn={key:1,id:"twofa"},dn={key:0,class:"icon-ok"},un={key:1,class:"icon-close"},mn={key:2,id:"last_seen"},bn={id:"status"},pn=["title"],hn={class:"center actions-cell"},gn=["onClick"],fn=Object(o["createElementVNode"])("span",{class:"icon-email"},null,-1),jn=[fn],On=["onClick"],vn=Object(o["createElementVNode"])("span",{class:"icon-edit"},null,-1),Cn=[vn],Nn=["onClick"],Sn=Object(o["createElementVNode"])("span",{class:"icon-delete"},null,-1),Un=[Sn],yn=["innerHTML"],Vn=["innerHTML"],kn={class:"change-user-role-confirm-modal modal",ref:"changeUserRoleConfirmModal"},En={class:"modal-content"},An=["innerHTML"],wn={key:1},Tn=["innerHTML"],Bn=["innerHTML"],Mn={class:"modal-footer"},_n={class:"resend-invite-confirm-modal modal",ref:"resendInviteConfirmModal"},Ln={class:"modal-content"},Rn=["innerHTML"],Dn={class:"modal-footer"}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function xn(e,t,n,s,i,r){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("ActivityIndicator"),c=Object(o["resolveComponent"])("Notification"),d=Object(o["resolveComponent"])("ContentBlock"),u=Object(o["resolveComponent"])("PasswordConfirmation"),m=Object(o["resolveDirective"])("dropdown-menu"),b=Object(o["resolveDirective"])("content-table");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["pagedUsersList",{loading:e.isLoadingUsers}])},[Object(o["createElementVNode"])("div",gt,[Object(o["createElementVNode"])("div",ht,[Object(o["createElementVNode"])("div",ft,[Object(o["withDirectives"])(Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["dropdown-trigger btn bulk-actions",{disabled:e.isBulkActionsDisabled}]),href:"","data-target":"user-list-bulk-actions"},[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_BulkActions")),1)],2),[[m]]),Object(o["createElementVNode"])("ul",jt,[Object(o["createElementVNode"])("li",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("a",Ot,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_SetPermission")),1)],512),[[m]]),Object(o["createElementVNode"])("ul",vt,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.bulkActionAccessLevels,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:t.key},[Object(o["createElementVNode"])("a",{href:"",onClick:Object(o["withModifiers"])((function(n){e.userToChange=null,e.roleToChangeTo=t.key,e.showAccessChangeConfirm()}),["prevent"])},Object(o["toDisplayString"])(t.value),9,Ct)])})),128))])]),Object(o["createElementVNode"])("li",null,[Object(o["createElementVNode"])("a",{href:"",onClick:t[0]||(t[0]=Object(o["withModifiers"])((function(t){e.userToChange=null,e.roleToChangeTo="noaccess",e.showAccessChangeConfirm()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_RemovePermissions")),1)]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("li",St,[Object(o["createElementVNode"])("a",{href:"",onClick:t[1]||(t[1]=Object(o["withModifiers"])((function(t){return e.showDeleteConfirm()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_DeleteUsers")),1)])):Object(o["createCommentVNode"])("",!0)])]),Object(o["createElementVNode"])("div",Ut,[Object(o["createElementVNode"])("div",Nt,[Object(o["createVNode"])(a,{"model-value":e.userTextFilter,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.onUserTextFilterChange(t)}),name:"user-text-filter",uicontrol:"text","full-width":!0,placeholder:e.translate("UsersManager_UserSearch")},null,8,["model-value","placeholder"])])]),Object(o["createElementVNode"])("div",yt,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{"model-value":e.accessLevelFilter,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.accessLevelFilter=t,e.changeSearch({filter_access:e.accessLevelFilter,offset:0})}),name:"access-level-filter",uicontrol:"select",options:e.filterAccessLevels,"full-width":!0,placeholder:e.translate("UsersManager_FilterByAccess")},null,8,["model-value","options","placeholder"])])]),Object(o["createElementVNode"])("div",Vt,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{"model-value":e.statusLevelFilter,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.statusLevelFilter=t,e.changeSearch({filter_status:e.statusLevelFilter,offset:0})}),name:"status-level-filter",uicontrol:"select",options:e.filterStatusLevels,"full-width":!0,placeholder:e.translate("UsersManager_FilterByStatus")},null,8,["model-value","options","placeholder"])])])]),e.totalEntries>e.searchParams.limit?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Et,[Object(o["createElementVNode"])("div",kt,[Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["btn prev",{disabled:e.searchParams.offset<=0}]),onClick:t[5]||(t[5]=Object(o["withModifiers"])((function(t){return e.gotoPreviousPage()}),["prevent"]))},[Object(o["createElementVNode"])("span",At,"« "+Object(o["toDisplayString"])(e.translate("General_Previous")),1)],2),Object(o["createElementVNode"])("div",wt,[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])({visibility:e.isLoadingUsers?"hidden":"visible"})},Object(o["toDisplayString"])(e.translate("General_Pagination",e.paginationLowerBound,e.paginationUpperBound,e.totalEntries)),3),Object(o["createVNode"])(l,{loading:e.isLoadingUsers},null,8,["loading"])]),Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["btn next",{disabled:e.searchParams.offset+e.searchParams.limit>=e.totalEntries}]),onClick:t[6]||(t[6]=Object(o["withModifiers"])((function(t){return e.gotoNextPage()}),["prevent"]))},[Object(o["createElementVNode"])("span",Tt,Object(o["toDisplayString"])(e.translate("General_Next"))+" »",1)],2)])])):Object(o["createCommentVNode"])("",!0)]),e.isRoleHelpToggled?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Bt,[Object(o["createVNode"])(c,{context:"info",type:"persistent",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.rolesHelpText)},null,8,Mt)]})),_:1})])):Object(o["createCommentVNode"])("",!0),Object(o["createVNode"])(d,null,{default:Object(o["withCtx"])((function(){return[Object(o["withDirectives"])(Object(o["createElementVNode"])("table",{id:"manageUsersTable",class:Object(o["normalizeClass"])({loading:e.isLoadingUsers})},[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",_t,[Object(o["createElementVNode"])("span",Lt,[Object(o["createElementVNode"])("label",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"checkbox",id:"paged_users_select_all",checked:"checked","onUpdate:modelValue":t[7]||(t[7]=function(t){return e.isAllCheckboxSelected=t}),onChange:t[8]||(t[8]=function(t){return e.onAllCheckboxChange()})},null,544),[[o["vModelCheckbox"],e.isAllCheckboxSelected]]),Rt])])]),Object(o["createElementVNode"])("th",Dt,Object(o["toDisplayString"])(e.translate("UsersManager_Username")),1),Object(o["createElementVNode"])("th",xt,[Object(o["createElementVNode"])("span",Pt,Object(o["toDisplayString"])(e.translate("UsersManager_RoleFor")),1),Object(o["createElementVNode"])("a",{href:"",class:Object(o["normalizeClass"])(["helpIcon",{sticky:e.isRoleHelpToggled}]),onClick:t[9]||(t[9]=Object(o["withModifiers"])((function(t){return e.isRoleHelpToggled=!e.isRoleHelpToggled}),["prevent"]))},Ht,2),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{class:"permissions-for-selector","model-value":e.permissionsForSite,"onUpdate:modelValue":t[10]||(t[10]=function(t){e.onPermissionsForUpdate(t)}),uicontrol:"site","ui-control-attributes":{onlySitesWithAdminAccess:"superuser"!==e.currentUserRole}},null,8,["model-value","ui-control-attributes"])])]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",It,Object(o["toDisplayString"])(e.translate("UsersManager_Email")),1)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",{key:1,title:e.translate("UsersManager_UsesTwoFactorAuthentication")},Object(o["toDisplayString"])(e.translate("UsersManager_2FA")),9,Jt)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",qt,Object(o["toDisplayString"])(e.translate("UsersManager_LastSeen")),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("UsersManager_Status")),1),Object(o["createElementVNode"])("th",$t,[Object(o["createElementVNode"])("div",null,Object(o["toDisplayString"])(e.translate("General_Actions")),1)])])]),Object(o["createElementVNode"])("tbody",null,[e.isAllCheckboxSelected&&e.users.length&&e.users.length<e.totalEntries?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",zt,[Object(o["createElementVNode"])("td",Gt,[e.areAllResultsSelected?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Wt,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("UsersManager_TheDisplayedUsersAreSelected","<strong>".concat(e.users.length,"</strong>"))),style:{"margin-right":"3.5px"}},null,8,Yt),Object(o["createElementVNode"])("a",{class:"toggle-select-all-in-search",href:"#",onClick:t[11]||(t[11]=Object(o["withModifiers"])((function(t){return e.areAllResultsSelected=!e.areAllResultsSelected}),["prevent"])),innerHTML:e.$sanitize(e.translate("UsersManager_ClickToSelectAll","<strong>".concat(e.totalEntries,"</strong>")))},null,8,Xt)])),e.areAllResultsSelected?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Kt,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("UsersManager_AllUsersAreSelected","<strong>".concat(e.totalEntries,"</strong>"))),style:{"margin-right":"3.5px"}},null,8,Qt),Object(o["createElementVNode"])("a",{class:"toggle-select-all-in-search",href:"#",onClick:t[12]||(t[12]=Object(o["withModifiers"])((function(t){return e.areAllResultsSelected=!e.areAllResultsSelected}),["prevent"])),innerHTML:e.$sanitize(e.translate("UsersManager_ClickToSelectDisplayedUsers","<strong>".concat(e.users.length,"</strong>")))},null,8,Zt)])):Object(o["createCommentVNode"])("",!0)])])):Object(o["createCommentVNode"])("",!0),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.users,(function(n,s){return Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{id:"row".concat(s),key:n.login},[Object(o["createElementVNode"])("td",tn,[Object(o["createElementVNode"])("span",nn,[Object(o["createElementVNode"])("label",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"checkbox",id:"paged_users_select_row".concat(s),"onUpdate:modelValue":function(t){return e.selectedRows[s]=t},onClick:t[13]||(t[13]=function(t){return e.onRowSelected()})},null,8,sn),[[o["vModelCheckbox"],e.selectedRows[s]]]),rn])])]),Object(o["createElementVNode"])("td",on,Object(o["toDisplayString"])(n.login),1),Object(o["createElementVNode"])("td",an,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{"model-value":n.role,"onUpdate:modelValue":function(t){e.userToChange=n,e.roleToChangeTo=t,e.showAccessChangeConfirm()},disabled:"superuser"===n.role,uicontrol:"select",options:"anonymous"===n.login?e.anonymousAccessLevels:"noaccess"===n.role?e.onlyRoleAccessLevels:e.accessLevels},null,8,["model-value","onUpdate:modelValue","disabled","options"])])]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",ln,Object(o["toDisplayString"])(n.email),1)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",cn,[n.uses_2fa?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",dn)):Object(o["createCommentVNode"])("",!0),n.uses_2fa?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",un))])):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",mn,Object(o["toDisplayString"])(n.last_seen?"".concat(n.last_seen," ago"):"-"),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("td",bn,[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])(Number.isInteger(n.invite_status)?"pending":n.invite_status),title:"expired"===n.invite_status?e.translate("UsersManager_ExpiredInviteAutomaticallyRemoved","3"):""},Object(o["toDisplayString"])(e.getInviteStatus(n.invite_status)),11,pn)]),Object(o["createElementVNode"])("td",gn,[("superuser"===e.currentUserRole||"admin"===e.currentUserRole&&n.invited_by===e.currentUserLogin)&&"active"!==n.invite_status?(Object(o["openBlock"])(),Object(o["createElementBlock"])("button",{key:0,class:"resend table-action",title:"Resend Invite",onClick:function(t){e.userToChange=n,e.showResendConfirm()}},jn,8,hn)):Object(o["createCommentVNode"])("",!0),"anonymous"!==n.login?(Object(o["openBlock"])(),Object(o["createElementBlock"])("button",{key:1,class:"edituser table-action",title:"Edit",onClick:function(t){return e.$emit("editUser",{user:n})}},Cn,8,On)):Object(o["createCommentVNode"])("",!0),("superuser"===e.currentUserRole||"admin"===e.currentUserRole&&n.invited_by===e.currentUserLogin)&&"anonymous"!==n.login?(Object(o["openBlock"])(),Object(o["createElementBlock"])("button",{key:2,class:"deleteuser table-action",title:"Delete",onClick:function(t){e.userToChange=n,e.showDeleteConfirm()}},Nn,8,Sn)):Object(o["createCommentVNode"])("",!0)])],8,en)})),128))])],2),[[b]])]})),_:1}),Object(o["createVNode"])(u,{modelValue:e.showPasswordConfirmationForUserRemoval,"onUpdate:modelValue":t[14]||(t[14]=function(t){return e.showPasswordConfirmationForUserRemoval=t}),onConfirmed:e.deleteRequestedUsers,onAborted:t[15]||(t[15]=function(t){e.userToChange=null,e.roleToChangeTo=null})},{default:Object(o["withCtx"])((function(){return[e.userToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",{key:0,innerHTML:e.$sanitize(e.translate("UsersManager_DeleteUserConfirmSingle","<strong>".concat(e.userToChange.login,"</strong>")))},null,8,yn)):Object(o["createCommentVNode"])("",!0),e.userToChange?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",{key:1,innerHTML:e.$sanitize(e.translate("UsersManager_DeleteUserConfirmMultiple","<strong>".concat(e.affectedUsersCount,"</strong>")))},null,8,Vn)),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"]),Object(o["createElementVNode"])("div",En,[Object(o["createElementVNode"])("div",kn,[e.userToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",{key:0,innerHTML:e.$sanitize(e.deleteUserPermConfirmSingleText)},null,8,An)):Object(o["createCommentVNode"])("",!0),e.userToChange&&"anonymous"===e.userToChange.login&&"view"===e.roleToChangeTo?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",wn,[Object(o["createElementVNode"])("em",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_Note"))+": ",1),Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("UsersManager_AnonymousUserRoleChangeWarning","anonymous",e.getRoleDisplay(e.roleToChangeTo)))},null,8,Tn)])])):Object(o["createCommentVNode"])("",!0),e.userToChange?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",{key:2,innerHTML:e.$sanitize(e.deleteUserPermConfirmMultipleText)},null,8,Bn))]),Object(o["createElementVNode"])("div",Mn,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[16]||(t[16]=Object(o["withModifiers"])((function(t){return e.changeUserRole()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[17]||(t[17]=Object(o["withModifiers"])((function(t){e.userToChange=null,e.roleToChangeTo=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512),Object(o["createElementVNode"])("div",_n,[Object(o["createElementVNode"])("div",Ln,[e.userToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",{key:0,innerHTML:e.$sanitize(e.translate("UsersManager_ResendInviteConfirmSingle","<strong>".concat(e.userToChange.login,"</strong>")))},null,8,Rn)):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",Dn,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[18]||(t[18]=Object(o["withModifiers"])((function(t){return e.resendRequestedUser()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[19]||(t[19]=Object(o["withModifiers"])((function(t){e.userToChange=null,e.roleToChangeTo=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512)],2)}var Pn=window,Fn=Pn.$,Hn=Object(o["defineComponent"])({props:{initialSiteId:{type:[String,Number],required:!0},initialSiteName:{type:String,required:!0},currentUserRole:String,isLoadingUsers:Boolean,accessLevels:{type:Array,required:!0},filterAccessLevels:{type:Array,required:!0},filterStatusLevels:{type:Array,required:!0},totalEntries:Number,users:{type:Array,required:!0},searchParams:{type:Object,required:!0}},components:{Field:h["Field"],ActivityIndicator:r["ActivityIndicator"],Notification:r["Notification"],ContentBlock:r["ContentBlock"],PasswordConfirmation:h["PasswordConfirmation"]},directives:{DropdownMenu:r["DropdownMenu"],ContentTable:r["ContentTable"]},data:function(){return{areAllResultsSelected:!1,selectedRows:{},isAllCheckboxSelected:!1,isBulkActionsDisabled:!0,userToChange:null,roleToChangeTo:null,accessLevelFilter:null,statusLevelFilter:null,isRoleHelpToggled:!1,userTextFilter:"",permissionsForSite:{id:this.initialSiteId,name:this.initialSiteName},showPasswordConfirmationForUserRemoval:!1}},emits:["editUser","changeUserRole","deleteUser","searchChange","resendInvite"],created:function(){this.onUserTextFilterChange=Object(r["debounce"])(this.onUserTextFilterChange,300)},watch:{users:function(){this.clearSelection()}},methods:{getInviteStatus:function(e){return Number.isInteger(e)?Object(r["translate"])("UsersManager_InviteDayLeft",e):"expired"===e?Object(r["translate"])("UsersManager_Expired"):Object(r["translate"])("UsersManager_Active")},onPermissionsForUpdate:function(e){this.permissionsForSite=e,this.changeSearch({idSite:this.permissionsForSite.id})},clearSelection:function(){this.selectedRows={},this.areAllResultsSelected=!1,this.isBulkActionsDisabled=!0,this.isAllCheckboxSelected=!1,this.userToChange=null},onAllCheckboxChange:function(){if(this.isAllCheckboxSelected){for(var e=0;e!==this.users.length;e+=1)this.selectedRows[e]=!0;this.isBulkActionsDisabled=!1}else this.clearSelection()},changeUserRole:function(){this.$emit("changeUserRole",{users:this.userOperationSubject,role:this.roleToChangeTo})},onRowSelected:function(){var e=this;setTimeout((function(){var t=e.selectedCount;e.isBulkActionsDisabled=0===t,e.isAllCheckboxSelected=t===e.users.length}))},deleteRequestedUsers:function(e){this.$emit("deleteUser",{users:this.userOperationSubject,password:e})},resendRequestedUser:function(){this.$emit("resendInvite",{user:this.userToChange})},showDeleteConfirm:function(){this.showPasswordConfirmationForUserRemoval=!0},showResendConfirm:function(){Fn(this.$refs.resendInviteConfirmModal).modal({dismissible:!1}).modal("open")},showAccessChangeConfirm:function(){Fn(this.$refs.changeUserRoleConfirmModal).modal({dismissible:!1}).modal("open")},getRoleDisplay:function(e){var t=null;return this.accessLevels.forEach((function(n){n.key===e&&(t=n.value)})),t},changeSearch:function(e){var t=Object.assign(Object.assign({},this.searchParams),e);this.$emit("searchChange",{params:t})},gotoPreviousPage:function(){this.changeSearch({offset:Math.max(0,this.searchParams.offset-this.searchParams.limit)})},gotoNextPage:function(){var e=this.searchParams.offset+this.searchParams.limit;e>=this.totalEntries||this.changeSearch({offset:e})},onUserTextFilterChange:function(e){this.userTextFilter=e,this.changeSearch({filter_search:e,offset:0})}},computed:{currentUserLogin:function(){return r["Matomo"].userLogin},paginationLowerBound:function(){return this.searchParams.offset+1},paginationUpperBound:function(){if(null===this.totalEntries)return"?";var e=this.searchParams;return Math.min(e.offset+e.limit,this.totalEntries)},userOperationSubject:function(){return this.userToChange?[this.userToChange]:this.areAllResultsSelected?"all":this.selectedUsers},selectedUsers:function(){var e=this,t=this.users,n=[];return Object.keys(this.selectedRows).forEach((function(s){var i=parseInt(s,10);e.selectedRows[s]&&t[i]&&n.push(t[i])})),n},rolesHelpText:function(){var e="https://matomo.org/faq/general/faq_70/",t="https://matomo.org/faq/general/faq_69/";return Object(r["translate"])("UsersManager_RolesHelp",'<a href="'.concat(e,'" target="_blank" rel="noreferrer noopener">'),"</a>",'<a href="'.concat(t,'" target="_blank" rel="noreferrer noopener">'),"</a>")},affectedUsersCount:function(){return this.areAllResultsSelected?this.totalEntries||0:this.selectedCount},selectedCount:function(){var e=this,t=0;return Object.keys(this.selectedRows).forEach((function(n){e.selectedRows[n]&&(t+=1)})),t},deleteUserPermConfirmSingleText:function(){var e,t;return Object(r["translate"])("UsersManager_DeleteUserPermConfirmSingle","<strong>".concat((null===(e=this.userToChange)||void 0===e?void 0:e.login)||"","</strong>"),"<strong>".concat(this.getRoleDisplay(this.roleToChangeTo),"</strong>"),"<strong>".concat(r["Matomo"].helper.htmlEntities((null===(t=this.permissionsForSite)||void 0===t?void 0:t.name)||""),"</strong>"))},deleteUserPermConfirmMultipleText:function(){var e;return Object(r["translate"])("UsersManager_DeleteUserPermConfirmMultiple","<strong>".concat(this.affectedUsersCount,"</strong>"),"<strong>".concat(this.getRoleDisplay(this.roleToChangeTo),"</strong>"),"<strong>".concat(r["Matomo"].helper.htmlEntities((null===(e=this.permissionsForSite)||void 0===e?void 0:e.name)||""),"</strong>"))},bulkActionAccessLevels:function(){return this.accessLevels.filter((function(e){return"noaccess"!==e.key&&"superuser"!==e.key}))},anonymousAccessLevels:function(){return this.accessLevels.filter((function(e){return"noaccess"===e.key||"view"===e.key}))},onlyRoleAccessLevels:function(){return this.accessLevels.filter((function(e){return"role"===e.type}))}}});Hn.render=xn;var In=Hn,Jn=(Object(r["createAngularJsAdapter"])({component:In,scope:{onEditUser:{angularJsBind:"&",vue:"editUser"},onChangeUserRole:{angularJsBind:"&",vue:"changeUserRole"},onDeleteUser:{angularJsBind:"&",vue:"deleteUser"},onSearchChange:{angularJsBind:"&",vue:"searchChange"},onResendInvite:{angularJsBind:"&",vue:"resendInvite"},initialSiteId:{angularJsBind:"<"},initialSiteName:{angularJsBind:"<"},currentUserRole:{angularJsBind:"<"},isLoadingUsers:{angularJsBind:"<"},accessLevels:{angularJsBind:"<"},filterAccessLevels:{angularJsBind:"<"},totalEntries:{angularJsBind:"<"},users:{angularJsBind:"<"},searchParams:{angularJsBind:"<"}},directiveName:"piwikPagedUsersList",restrict:"E"}),{class:"usersManager"}),qn={key:0},$n={key:1},zn={class:"row add-user-container"},Gn={class:"col s12"},Wn={class:"input-field",style:{"margin-right":"3.5px"}},Yn={key:0,class:"input-field"},Xn={key:0},Kn={class:"add-existing-user-modal modal",ref:"addExistingUserModal"},Qn={class:"modal-content"},Zn={class:"modal-footer"}; + */function xn(e,t,n,s,i,r){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("ActivityIndicator"),c=Object(o["resolveComponent"])("Notification"),d=Object(o["resolveComponent"])("ContentBlock"),u=Object(o["resolveComponent"])("PasswordConfirmation"),m=Object(o["resolveDirective"])("dropdown-menu"),b=Object(o["resolveDirective"])("content-table");return Object(o["openBlock"])(),Object(o["createElementBlock"])("div",{class:Object(o["normalizeClass"])(["pagedUsersList",{loading:e.isLoadingUsers}])},[Object(o["createElementVNode"])("div",ht,[Object(o["createElementVNode"])("div",gt,[Object(o["createElementVNode"])("div",ft,[Object(o["withDirectives"])(Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["dropdown-trigger btn bulk-actions",{disabled:e.isBulkActionsDisabled}]),href:"","data-target":"user-list-bulk-actions"},[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_BulkActions")),1)],2),[[m]]),Object(o["createElementVNode"])("ul",jt,[Object(o["createElementVNode"])("li",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("a",Ot,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_SetPermission")),1)],512),[[m]]),Object(o["createElementVNode"])("ul",vt,[(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.bulkActionAccessLevels,(function(t){return Object(o["openBlock"])(),Object(o["createElementBlock"])("li",{key:t.key},[Object(o["createElementVNode"])("a",{href:"",onClick:Object(o["withModifiers"])((function(n){e.userToChange=null,e.roleToChangeTo=t.key,e.showAccessChangeConfirm()}),["prevent"])},Object(o["toDisplayString"])(t.value),9,Ct)])})),128))])]),Object(o["createElementVNode"])("li",null,[Object(o["createElementVNode"])("a",{href:"",onClick:t[0]||(t[0]=Object(o["withModifiers"])((function(t){e.userToChange=null,e.roleToChangeTo="noaccess",e.showAccessChangeConfirm()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_RemovePermissions")),1)]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("li",Nt,[Object(o["createElementVNode"])("a",{href:"",onClick:t[1]||(t[1]=Object(o["withModifiers"])((function(t){return e.showDeleteConfirm()}),["prevent"]))},Object(o["toDisplayString"])(e.translate("UsersManager_DeleteUsers")),1)])):Object(o["createCommentVNode"])("",!0)])]),Object(o["createElementVNode"])("div",St,[Object(o["createElementVNode"])("div",Ut,[Object(o["createVNode"])(a,{"model-value":e.userTextFilter,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.onUserTextFilterChange(t)}),name:"user-text-filter",uicontrol:"text","full-width":!0,placeholder:e.translate("UsersManager_UserSearch")},null,8,["model-value","placeholder"])])]),Object(o["createElementVNode"])("div",yt,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{"model-value":e.accessLevelFilter,"onUpdate:modelValue":t[3]||(t[3]=function(t){e.accessLevelFilter=t,e.changeSearch({filter_access:e.accessLevelFilter,offset:0})}),name:"access-level-filter",uicontrol:"select",options:e.filterAccessLevels,"full-width":!0,placeholder:e.translate("UsersManager_FilterByAccess")},null,8,["model-value","options","placeholder"])])]),Object(o["createElementVNode"])("div",Vt,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{"model-value":e.statusLevelFilter,"onUpdate:modelValue":t[4]||(t[4]=function(t){e.statusLevelFilter=t,e.changeSearch({filter_status:e.statusLevelFilter,offset:0})}),name:"status-level-filter",uicontrol:"select",options:e.filterStatusLevels,"full-width":!0,placeholder:e.translate("UsersManager_FilterByStatus")},null,8,["model-value","options","placeholder"])])])]),e.totalEntries>e.searchParams.limit?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",kt,[Object(o["createElementVNode"])("div",Et,[Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["btn prev",{disabled:e.searchParams.offset<=0}]),onClick:t[5]||(t[5]=Object(o["withModifiers"])((function(t){return e.gotoPreviousPage()}),["prevent"]))},[Object(o["createElementVNode"])("span",At,"« "+Object(o["toDisplayString"])(e.translate("General_Previous")),1)],2),Object(o["createElementVNode"])("div",wt,[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])({visibility:e.isLoadingUsers?"hidden":"visible"})},Object(o["toDisplayString"])(e.translate("General_Pagination",e.paginationLowerBound,e.paginationUpperBound,e.totalEntries)),3),Object(o["createVNode"])(l,{loading:e.isLoadingUsers},null,8,["loading"])]),Object(o["createElementVNode"])("a",{class:Object(o["normalizeClass"])(["btn next",{disabled:e.searchParams.offset+e.searchParams.limit>=e.totalEntries}]),onClick:t[6]||(t[6]=Object(o["withModifiers"])((function(t){return e.gotoNextPage()}),["prevent"]))},[Object(o["createElementVNode"])("span",Tt,Object(o["toDisplayString"])(e.translate("General_Next"))+" »",1)],2)])])):Object(o["createCommentVNode"])("",!0)]),e.isRoleHelpToggled?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Bt,[Object(o["createVNode"])(c,{context:"info",type:"persistent",noclear:!0},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.rolesHelpText)},null,8,Mt)]})),_:1})])):Object(o["createCommentVNode"])("",!0),Object(o["createVNode"])(d,null,{default:Object(o["withCtx"])((function(){return[Object(o["withDirectives"])(Object(o["createElementVNode"])("table",{id:"manageUsersTable",class:Object(o["normalizeClass"])({loading:e.isLoadingUsers})},[Object(o["createElementVNode"])("thead",null,[Object(o["createElementVNode"])("tr",null,[Object(o["createElementVNode"])("th",_t,[Object(o["createElementVNode"])("span",Lt,[Object(o["createElementVNode"])("label",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"checkbox",id:"paged_users_select_all",checked:"checked","onUpdate:modelValue":t[7]||(t[7]=function(t){return e.isAllCheckboxSelected=t}),onChange:t[8]||(t[8]=function(t){return e.onAllCheckboxChange()})},null,544),[[o["vModelCheckbox"],e.isAllCheckboxSelected]]),Rt])])]),Object(o["createElementVNode"])("th",Dt,Object(o["toDisplayString"])(e.translate("UsersManager_Username")),1),Object(o["createElementVNode"])("th",xt,[Object(o["createElementVNode"])("span",Pt,Object(o["toDisplayString"])(e.translate("UsersManager_RoleFor")),1),Object(o["createElementVNode"])("a",{href:"",class:Object(o["normalizeClass"])(["helpIcon",{sticky:e.isRoleHelpToggled}]),onClick:t[9]||(t[9]=Object(o["withModifiers"])((function(t){return e.isRoleHelpToggled=!e.isRoleHelpToggled}),["prevent"]))},Ht,2),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{class:"permissions-for-selector","model-value":e.permissionsForSite,"onUpdate:modelValue":t[10]||(t[10]=function(t){e.onPermissionsForUpdate(t)}),uicontrol:"site","ui-control-attributes":{onlySitesWithAdminAccess:"superuser"!==e.currentUserRole}},null,8,["model-value","ui-control-attributes"])])]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",It,Object(o["toDisplayString"])(e.translate("UsersManager_Email")),1)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",{key:1,title:e.translate("UsersManager_UsesTwoFactorAuthentication")},Object(o["toDisplayString"])(e.translate("UsersManager_2FA")),9,Jt)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("th",qt,Object(o["toDisplayString"])(e.translate("UsersManager_LastSeen")),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("th",null,Object(o["toDisplayString"])(e.translate("UsersManager_Status")),1),Object(o["createElementVNode"])("th",$t,[Object(o["createElementVNode"])("div",null,Object(o["toDisplayString"])(e.translate("General_Actions")),1)])])]),Object(o["createElementVNode"])("tbody",null,[e.isAllCheckboxSelected&&e.users.length&&e.users.length<e.totalEntries?(Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",zt,[Object(o["createElementVNode"])("td",Gt,[e.areAllResultsSelected?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Wt,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("UsersManager_TheDisplayedUsersAreSelected","<strong>".concat(e.users.length,"</strong>"))),style:{"margin-right":"3.5px"}},null,8,Yt),Object(o["createElementVNode"])("a",{class:"toggle-select-all-in-search",href:"#",onClick:t[11]||(t[11]=Object(o["withModifiers"])((function(t){return e.areAllResultsSelected=!e.areAllResultsSelected}),["prevent"])),innerHTML:e.$sanitize(e.translate("UsersManager_ClickToSelectAll","<strong>".concat(e.totalEntries,"</strong>")))},null,8,Xt)])),e.areAllResultsSelected?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Kt,[Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("UsersManager_AllUsersAreSelected","<strong>".concat(e.totalEntries,"</strong>"))),style:{"margin-right":"3.5px"}},null,8,Qt),Object(o["createElementVNode"])("a",{class:"toggle-select-all-in-search",href:"#",onClick:t[12]||(t[12]=Object(o["withModifiers"])((function(t){return e.areAllResultsSelected=!e.areAllResultsSelected}),["prevent"])),innerHTML:e.$sanitize(e.translate("UsersManager_ClickToSelectDisplayedUsers","<strong>".concat(e.users.length,"</strong>")))},null,8,Zt)])):Object(o["createCommentVNode"])("",!0)])])):Object(o["createCommentVNode"])("",!0),(Object(o["openBlock"])(!0),Object(o["createElementBlock"])(o["Fragment"],null,Object(o["renderList"])(e.users,(function(n,s){return Object(o["openBlock"])(),Object(o["createElementBlock"])("tr",{id:"row".concat(s),key:n.login},[Object(o["createElementVNode"])("td",tn,[Object(o["createElementVNode"])("span",nn,[Object(o["createElementVNode"])("label",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("input",{type:"checkbox",id:"paged_users_select_row".concat(s),"onUpdate:modelValue":function(t){return e.selectedRows[s]=t},onClick:t[13]||(t[13]=function(t){return e.onRowSelected()})},null,8,sn),[[o["vModelCheckbox"],e.selectedRows[s]]]),rn])])]),Object(o["createElementVNode"])("td",on,Object(o["toDisplayString"])(n.login),1),Object(o["createElementVNode"])("td",an,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{"model-value":n.role,"onUpdate:modelValue":function(t){e.userToChange=n,e.roleToChangeTo=t,e.showAccessChangeConfirm()},disabled:"superuser"===n.role,uicontrol:"select",options:"anonymous"===n.login?e.anonymousAccessLevels:"noaccess"===n.role?e.onlyRoleAccessLevels:e.accessLevels},null,8,["model-value","onUpdate:modelValue","disabled","options"])])]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",ln,Object(o["toDisplayString"])(n.email),1)):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",cn,[n.uses_2fa?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",dn)):Object(o["createCommentVNode"])("",!0),n.uses_2fa?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",un))])):Object(o["createCommentVNode"])("",!0),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("td",mn,Object(o["toDisplayString"])(n.last_seen?"".concat(n.last_seen," ago"):"-"),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("td",bn,[Object(o["createElementVNode"])("span",{class:Object(o["normalizeClass"])(Number.isInteger(n.invite_status)?"pending":n.invite_status),title:"expired"===n.invite_status?e.translate("UsersManager_ExpiredInviteAutomaticallyRemoved","3"):""},Object(o["toDisplayString"])(e.getInviteStatus(n.invite_status)),11,pn)]),Object(o["createElementVNode"])("td",hn,[("superuser"===e.currentUserRole||"admin"===e.currentUserRole&&n.invited_by===e.currentUserLogin)&&"active"!==n.invite_status?(Object(o["openBlock"])(),Object(o["createElementBlock"])("button",{key:0,class:"resend table-action",title:"Resend Invite",onClick:function(t){e.userToChange=n,e.showResendConfirm()}},jn,8,gn)):Object(o["createCommentVNode"])("",!0),"anonymous"!==n.login?(Object(o["openBlock"])(),Object(o["createElementBlock"])("button",{key:1,class:"edituser table-action",title:"Edit",onClick:function(t){return e.$emit("editUser",{user:n})}},Cn,8,On)):Object(o["createCommentVNode"])("",!0),("superuser"===e.currentUserRole||"admin"===e.currentUserRole&&n.invited_by===e.currentUserLogin)&&"anonymous"!==n.login?(Object(o["openBlock"])(),Object(o["createElementBlock"])("button",{key:2,class:"deleteuser table-action",title:"Delete",onClick:function(t){e.userToChange=n,e.showDeleteConfirm()}},Un,8,Nn)):Object(o["createCommentVNode"])("",!0)])],8,en)})),128))])],2),[[b]])]})),_:1}),Object(o["createVNode"])(u,{modelValue:e.showPasswordConfirmationForUserRemoval,"onUpdate:modelValue":t[14]||(t[14]=function(t){return e.showPasswordConfirmationForUserRemoval=t}),onConfirmed:e.deleteRequestedUsers,onAborted:t[15]||(t[15]=function(t){e.userToChange=null,e.roleToChangeTo=null})},{default:Object(o["withCtx"])((function(){return[e.userToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",{key:0,innerHTML:e.$sanitize(e.translate("UsersManager_DeleteUserConfirmSingle","<strong>".concat(e.userToChange.login,"</strong>")))},null,8,yn)):Object(o["createCommentVNode"])("",!0),e.userToChange?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("h2",{key:1,innerHTML:e.$sanitize(e.translate("UsersManager_DeleteUserConfirmMultiple","<strong>".concat(e.affectedUsersCount,"</strong>")))},null,8,Vn)),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"]),Object(o["createElementVNode"])("div",kn,[Object(o["createElementVNode"])("div",En,[e.userToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",{key:0,innerHTML:e.$sanitize(e.deleteUserPermConfirmSingleText)},null,8,An)):Object(o["createCommentVNode"])("",!0),e.userToChange&&"anonymous"===e.userToChange.login&&"view"===e.roleToChangeTo?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",wn,[Object(o["createElementVNode"])("em",null,[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("General_Note"))+": ",1),Object(o["createElementVNode"])("span",{innerHTML:e.$sanitize(e.translate("UsersManager_AnonymousUserRoleChangeWarning","anonymous",e.getRoleDisplay(e.roleToChangeTo)))},null,8,Tn)])])):Object(o["createCommentVNode"])("",!0),e.userToChange?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",{key:2,innerHTML:e.$sanitize(e.deleteUserPermConfirmMultipleText)},null,8,Bn))]),Object(o["createElementVNode"])("div",Mn,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[16]||(t[16]=Object(o["withModifiers"])((function(t){return e.changeUserRole()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[17]||(t[17]=Object(o["withModifiers"])((function(t){e.userToChange=null,e.roleToChangeTo=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512),Object(o["createElementVNode"])("div",_n,[Object(o["createElementVNode"])("div",Ln,[e.userToChange?(Object(o["openBlock"])(),Object(o["createElementBlock"])("h3",{key:0,innerHTML:e.$sanitize(e.translate("UsersManager_ResendInviteConfirmSingle","<strong>".concat(e.userToChange.login,"</strong>")))},null,8,Rn)):Object(o["createCommentVNode"])("",!0)]),Object(o["createElementVNode"])("div",Dn,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[18]||(t[18]=Object(o["withModifiers"])((function(t){return e.resendRequestedUser()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Yes")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[19]||(t[19]=Object(o["withModifiers"])((function(t){e.userToChange=null,e.roleToChangeTo=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_No")),1)])],512)],2)}var Pn=window,Fn=Pn.$,Hn=Object(o["defineComponent"])({props:{initialSiteId:{type:[String,Number],required:!0},initialSiteName:{type:String,required:!0},currentUserRole:String,isLoadingUsers:Boolean,accessLevels:{type:Array,required:!0},filterAccessLevels:{type:Array,required:!0},filterStatusLevels:{type:Array,required:!0},totalEntries:Number,users:{type:Array,required:!0},searchParams:{type:Object,required:!0}},components:{Field:g["Field"],ActivityIndicator:r["ActivityIndicator"],Notification:r["Notification"],ContentBlock:r["ContentBlock"],PasswordConfirmation:g["PasswordConfirmation"]},directives:{DropdownMenu:r["DropdownMenu"],ContentTable:r["ContentTable"]},data:function(){return{areAllResultsSelected:!1,selectedRows:{},isAllCheckboxSelected:!1,isBulkActionsDisabled:!0,userToChange:null,roleToChangeTo:null,accessLevelFilter:null,statusLevelFilter:null,isRoleHelpToggled:!1,userTextFilter:"",permissionsForSite:{id:this.initialSiteId,name:this.initialSiteName},showPasswordConfirmationForUserRemoval:!1}},emits:["editUser","changeUserRole","deleteUser","searchChange","resendInvite"],created:function(){this.onUserTextFilterChange=Object(r["debounce"])(this.onUserTextFilterChange,300)},watch:{users:function(){this.clearSelection()}},methods:{getInviteStatus:function(e){return Number.isInteger(e)?Object(r["translate"])("UsersManager_InviteDayLeft",e):"expired"===e?Object(r["translate"])("UsersManager_Expired"):Object(r["translate"])("UsersManager_Active")},onPermissionsForUpdate:function(e){this.permissionsForSite=e,this.changeSearch({idSite:this.permissionsForSite.id})},clearSelection:function(){this.selectedRows={},this.areAllResultsSelected=!1,this.isBulkActionsDisabled=!0,this.isAllCheckboxSelected=!1,this.userToChange=null},onAllCheckboxChange:function(){if(this.isAllCheckboxSelected){for(var e=0;e!==this.users.length;e+=1)this.selectedRows[e]=!0;this.isBulkActionsDisabled=!1}else this.clearSelection()},changeUserRole:function(){this.$emit("changeUserRole",{users:this.userOperationSubject,role:this.roleToChangeTo})},onRowSelected:function(){var e=this;setTimeout((function(){var t=e.selectedCount;e.isBulkActionsDisabled=0===t,e.isAllCheckboxSelected=t===e.users.length}))},deleteRequestedUsers:function(e){this.$emit("deleteUser",{users:this.userOperationSubject,password:e})},resendRequestedUser:function(){this.$emit("resendInvite",{user:this.userToChange})},showDeleteConfirm:function(){this.showPasswordConfirmationForUserRemoval=!0},showResendConfirm:function(){Fn(this.$refs.resendInviteConfirmModal).modal({dismissible:!1}).modal("open")},showAccessChangeConfirm:function(){Fn(this.$refs.changeUserRoleConfirmModal).modal({dismissible:!1}).modal("open")},getRoleDisplay:function(e){var t=null;return this.accessLevels.forEach((function(n){n.key===e&&(t=n.value)})),t},changeSearch:function(e){var t=Object.assign(Object.assign({},this.searchParams),e);this.$emit("searchChange",{params:t})},gotoPreviousPage:function(){this.changeSearch({offset:Math.max(0,this.searchParams.offset-this.searchParams.limit)})},gotoNextPage:function(){var e=this.searchParams.offset+this.searchParams.limit;e>=this.totalEntries||this.changeSearch({offset:e})},onUserTextFilterChange:function(e){this.userTextFilter=e,this.changeSearch({filter_search:e,offset:0})}},computed:{currentUserLogin:function(){return r["Matomo"].userLogin},paginationLowerBound:function(){return this.searchParams.offset+1},paginationUpperBound:function(){if(null===this.totalEntries)return"?";var e=this.searchParams;return Math.min(e.offset+e.limit,this.totalEntries)},userOperationSubject:function(){return this.userToChange?[this.userToChange]:this.areAllResultsSelected?"all":this.selectedUsers},selectedUsers:function(){var e=this,t=this.users,n=[];return Object.keys(this.selectedRows).forEach((function(s){var i=parseInt(s,10);e.selectedRows[s]&&t[i]&&n.push(t[i])})),n},rolesHelpText:function(){var e="https://matomo.org/faq/general/faq_70/",t="https://matomo.org/faq/general/faq_69/";return Object(r["translate"])("UsersManager_RolesHelp",'<a href="'.concat(e,'" target="_blank" rel="noreferrer noopener">'),"</a>",'<a href="'.concat(t,'" target="_blank" rel="noreferrer noopener">'),"</a>")},affectedUsersCount:function(){return this.areAllResultsSelected?this.totalEntries||0:this.selectedCount},selectedCount:function(){var e=this,t=0;return Object.keys(this.selectedRows).forEach((function(n){e.selectedRows[n]&&(t+=1)})),t},deleteUserPermConfirmSingleText:function(){var e,t;return Object(r["translate"])("UsersManager_DeleteUserPermConfirmSingle","<strong>".concat((null===(e=this.userToChange)||void 0===e?void 0:e.login)||"","</strong>"),"<strong>".concat(this.getRoleDisplay(this.roleToChangeTo),"</strong>"),"<strong>".concat(r["Matomo"].helper.htmlEntities((null===(t=this.permissionsForSite)||void 0===t?void 0:t.name)||""),"</strong>"))},deleteUserPermConfirmMultipleText:function(){var e;return Object(r["translate"])("UsersManager_DeleteUserPermConfirmMultiple","<strong>".concat(this.affectedUsersCount,"</strong>"),"<strong>".concat(this.getRoleDisplay(this.roleToChangeTo),"</strong>"),"<strong>".concat(r["Matomo"].helper.htmlEntities((null===(e=this.permissionsForSite)||void 0===e?void 0:e.name)||""),"</strong>"))},bulkActionAccessLevels:function(){return this.accessLevels.filter((function(e){return"noaccess"!==e.key&&"superuser"!==e.key}))},anonymousAccessLevels:function(){return this.accessLevels.filter((function(e){return"noaccess"===e.key||"view"===e.key}))},onlyRoleAccessLevels:function(){return this.accessLevels.filter((function(e){return"role"===e.type}))}}});Hn.render=xn;var In=Hn,Jn=(Object(r["createAngularJsAdapter"])({component:In,scope:{onEditUser:{angularJsBind:"&",vue:"editUser"},onChangeUserRole:{angularJsBind:"&",vue:"changeUserRole"},onDeleteUser:{angularJsBind:"&",vue:"deleteUser"},onSearchChange:{angularJsBind:"&",vue:"searchChange"},onResendInvite:{angularJsBind:"&",vue:"resendInvite"},initialSiteId:{angularJsBind:"<"},initialSiteName:{angularJsBind:"<"},currentUserRole:{angularJsBind:"<"},isLoadingUsers:{angularJsBind:"<"},accessLevels:{angularJsBind:"<"},filterAccessLevels:{angularJsBind:"<"},totalEntries:{angularJsBind:"<"},users:{angularJsBind:"<"},searchParams:{angularJsBind:"<"}},directiveName:"piwikPagedUsersList",restrict:"E"}),{class:"usersManager"}),qn={key:0,class:"notification system notification-success"},$n={key:1},zn={key:0},Gn={key:1},Wn={class:"row add-user-container"},Yn={class:"col s12"},Xn={class:"input-field",style:{"margin-right":"3.5px"}},Kn={key:0,class:"input-field"},Qn={key:1},Zn={class:"add-existing-user-modal modal",ref:"addExistingUserModal"},es={class:"modal-content"},ts={class:"modal-footer"}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function es(e,t,n,s,i,r){var a=Object(o["resolveComponent"])("EnrichedHeadline"),l=Object(o["resolveComponent"])("PagedUsersList"),c=Object(o["resolveComponent"])("UserEditForm"),d=Object(o["resolveComponent"])("Field"),u=Object(o["resolveDirective"])("content-intro"),m=Object(o["resolveDirective"])("tooltips");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Jn,[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("h2",null,[Object(o["createVNode"])(a,{"help-url":"https://matomo.org/docs/manage-users/","feature-name":"Users Management"},{default:Object(o["withCtx"])((function(){return[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_ManageUsers")),1)]})),_:1})]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",qn,Object(o["toDisplayString"])(e.translate("UsersManager_ManageUsersDesc")),1)):Object(o["createCommentVNode"])("",!0),"admin"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",$n,Object(o["toDisplayString"])(e.translate("UsersManager_ManageUsersAdminDesc")),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",zn,[Object(o["createElementVNode"])("div",Gn,[Object(o["createElementVNode"])("div",Wn,[Object(o["createElementVNode"])("a",{class:"btn add-new-user",onClick:t[0]||(t[0]=function(t){return e.onAddNewUser()})},Object(o["toDisplayString"])(e.translate("UsersManager_InviteNewUser")),1)]),"superuser"!==e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Yn,[Object(o["createElementVNode"])("a",{class:"btn add-existing-user",onClick:t[1]||(t[1]=function(t){return e.showAddExistingUserModal()})},Object(o["toDisplayString"])(e.translate("UsersManager_AddExistingUser")),1)])):Object(o["createCommentVNode"])("",!0)])]),Object(o["createVNode"])(l,{onEditUser:t[2]||(t[2]=function(t){return e.onEditUser(t.user)}),onChangeUserRole:t[3]||(t[3]=function(t){return e.onChangeUserRole(t.users,t.role)}),onDeleteUser:t[4]||(t[4]=function(t){return e.onDeleteUser(t.users,t.password)}),onSearchChange:t[5]||(t[5]=function(t){e.searchParams=t.params,e.fetchUsers()}),onResendInvite:t[6]||(t[6]=function(t){return e.onResendInvite(t.user)}),"initial-site-id":e.initialSiteId,"initial-site-name":e.initialSiteName,"is-loading-users":e.isLoadingUsers,"current-user-role":e.currentUserRole,"access-levels":e.accessLevels,"filter-access-levels":e.filterAccessLevels,"filter-status-levels":e.filterStatusLevels,"search-params":e.searchParams,users:e.users,"total-entries":e.totalEntries},null,8,["initial-site-id","initial-site-name","is-loading-users","current-user-role","access-levels","filter-access-levels","filter-status-levels","search-params","users","total-entries"])],512),[[u]])],512),[[o["vShow"],!e.isEditing]]),e.isEditing?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Xn,[Object(o["createVNode"])(c,{onDone:t[7]||(t[7]=function(t){return e.onDoneEditing(t.isUserModified)}),user:e.userBeingEdited,"current-user-role":e.currentUserRole,"access-levels":e.accessLevels,"filter-access-levels":e.filterAccessLevels,"initial-site-id":e.initialSiteId,"initial-site-name":e.initialSiteName,onUpdated:t[8]||(t[8]=function(t){return e.userBeingEdited=t.user})},null,8,["user","current-user-role","access-levels","filter-access-levels","initial-site-id","initial-site-name"])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Kn,[Object(o["createElementVNode"])("div",Qn,[Object(o["createElementVNode"])("h3",null,Object(o["toDisplayString"])(e.translate("UsersManager_AddExistingUser")),1),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_EnterUsernameOrEmail"))+":",1),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(d,{modelValue:e.addNewUserLoginEmail,"onUpdate:modelValue":t[9]||(t[9]=function(t){return e.addNewUserLoginEmail=t}),name:"add-existing-user-email",uicontrol:"text"},null,8,["modelValue"])])]),Object(o["createElementVNode"])("div",Zn,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[10]||(t[10]=Object(o["withModifiers"])((function(t){return e.addExistingUser()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Add")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[11]||(t[11]=Object(o["withModifiers"])((function(t){return e.addNewUserLoginEmail=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_Cancel")),1)])],512)],512)),[[m]])}var ts=20,ns=window,ss=ns.$,is=Object(o["defineComponent"])({props:{currentUserRole:{type:String,required:!0},initialSiteName:{type:String,required:!0},initialSiteId:{type:String,required:!0},accessLevels:{type:Array,required:!0},filterAccessLevels:{type:Array,required:!0},filterStatusLevels:{type:Array,required:!0}},components:{EnrichedHeadline:r["EnrichedHeadline"],PagedUsersList:In,UserEditForm:pt,Field:h["Field"]},directives:{ContentIntro:r["ContentIntro"],Tooltips:r["Tooltips"]},data:function(){return{isEditing:!!r["MatomoUrl"].urlParsed.value.showadduser,isCurrentUserSuperUser:!0,users:[],totalEntries:null,searchParams:{offset:0,limit:ts,filter_search:"",filter_access:"",filter_status:"",idSite:this.initialSiteId},isLoadingUsers:!1,userBeingEdited:null,addNewUserLoginEmail:""}},created:function(){this.fetchUsers()},watch:{limit:function(){this.fetchUsers()}},methods:{onEditUser:function(e){r["Matomo"].helper.lazyScrollToContent(),this.isEditing=!0,this.userBeingEdited=e},onDoneEditing:function(e){this.isEditing=!1,e&&this.fetchUsers()},showAddExistingUserModal:function(){ss(this.$refs.addExistingUserModal).modal({dismissible:!1}).modal("open")},onChangeUserRole:function(e,t){var n=this;this.isLoadingUsers=!0,Promise.resolve().then((function(){return"all"===e?n.getAllUsersInSearch():e})).then((function(e){return e.filter((function(e){return"superuser"!==e.role})).map((function(e){return e.login}))})).then((function(e){var s,i=n.accessLevels.filter((function(e){return e.key===t})).map((function(e){return e.type}));return s=i.length&&"capability"===i[0]?e.map((function(e){return{method:"UsersManager.addCapabilities",userLogin:e,capabilities:t,idSites:n.searchParams.idSite}})):e.map((function(e){return{method:"UsersManager.setUserAccess",userLogin:e,access:t,idSites:n.searchParams.idSite}})),r["AjaxHelper"].fetch(s,{createErrorNotification:!0})})).catch((function(){})).then((function(){return n.fetchUsers()}))},getAllUsersInSearch:function(){return r["AjaxHelper"].fetch({method:"UsersManager.getUsersPlusRole",filter_search:this.searchParams.filter_search,filter_access:this.searchParams.filter_access,filter_status:this.searchParams.filter_status,idSite:this.searchParams.idSite,filter_limit:"-1"})},onDeleteUser:function(e,t){var n=this;this.isLoadingUsers=!0,Promise.resolve().then((function(){return"all"===e?n.getAllUsersInSearch():e})).then((function(e){return e.map((function(e){return e.login}))})).then((function(e){var n=e.map((function(e){return{method:"UsersManager.deleteUser",userLogin:e,passwordConfirmation:t}}));return r["AjaxHelper"].fetch(n,{createErrorNotification:!0})})).then((function(){r["NotificationsStore"].scrollToNotification(r["NotificationsStore"].show({id:"removeUserSuccess",message:Object(r["translate"])("UsersManager_DeleteSuccess"),context:"success",type:"toast"})),n.fetchUsers()}),(function(){"all"!==e&&e.length>1&&r["NotificationsStore"].show({id:"removeUserSuccess",message:Object(r["translate"])("UsersManager_DeleteNotSuccessful"),context:"warning",type:"toast"}),n.fetchUsers()}))},onResendInvite:function(e){var t=this;r["AjaxHelper"].fetch({method:"UsersManager.resendInvite",userLogin:e.login}).then((function(){t.fetchUsers();var n=r["NotificationsStore"].show({message:Object(r["translate"])("UsersManager_ResendInviteSuccess",e.login),id:"resendinvite",context:"success",type:"transient"});r["NotificationsStore"].scrollToNotification(n)}))},fetchUsers:function(){var e=this;return this.isLoadingUsers=!0,r["AjaxHelper"].fetch(Object.assign(Object.assign({},this.searchParams),{},{method:"UsersManager.getUsersPlusRole"}),{returnResponseObject:!0}).then((function(t){var n=t.getRequestHandle();e.totalEntries=parseInt(n.getResponseHeader("x-matomo-total-results")||"0",10),e.users=n.responseJSON,e.isLoadingUsers=!1})).catch((function(){e.isLoadingUsers=!1}))},addExistingUser:function(){var e=this;return this.isLoadingUsers=!0,r["AjaxHelper"].fetch({method:"UsersManager.userExists",userLogin:this.addNewUserLoginEmail}).then((function(t){return t&&t.value?e.addNewUserLoginEmail:r["AjaxHelper"].fetch({method:"UsersManager.getUserLoginFromUserEmail",userEmail:e.addNewUserLoginEmail}).then((function(e){return e.value}))})).then((function(t){return r["AjaxHelper"].post({method:"UsersManager.setUserAccess"},{userLogin:t,access:"view",idSites:e.searchParams.idSite})})).then((function(){return e.fetchUsers()})).catch((function(){e.isLoadingUsers=!1}))},onAddNewUser:function(){var e={isAllowed:!0};r["Matomo"].postEvent("UsersManager.initAddUser",e),e&&!e.isAllowed||(this.isEditing=!0,this.userBeingEdited=null)}}});is.render=es;var rs=is,os=(Object(r["createAngularJsAdapter"])({component:rs,scope:{currentUserRole:{angularJsBind:"<"},initialSiteName:{angularJsBind:"@"},initialSiteId:{angularJsBind:"@"},accessLevels:{angularJsBind:"<"},filterAccessLevels:{angularJsBind:"<"},filterStatusLevels:{angularJsBind:"<"}},directiveName:"piwikUsersManager",restrict:"E"}),{key:0,class:"alert alert-info"}),as={key:1}; + */function ns(e,t,n,s,i,r){var a=Object(o["resolveComponent"])("Notification"),l=Object(o["resolveComponent"])("EnrichedHeadline"),c=Object(o["resolveComponent"])("PagedUsersList"),d=Object(o["resolveComponent"])("UserEditForm"),u=Object(o["resolveComponent"])("Field"),m=Object(o["resolveDirective"])("content-intro"),b=Object(o["resolveDirective"])("tooltips");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Jn,[e.showNotification?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",qn,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{context:"success"},{default:Object(o["withCtx"])((function(){return[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_ResendInviteSuccess"))+" ",1),e.copied?Object(o["createCommentVNode"])("",!0):(Object(o["openBlock"])(),Object(o["createElementBlock"])("a",{key:0,href:"#",onClick:t[0]||(t[0]=function(t){return e.copyToClipboard(e.token)})},Object(o["toDisplayString"])(e.translate("UsersManager_CopyLink")),1)),e.copied?(Object(o["openBlock"])(),Object(o["createElementBlock"])("span",$n,Object(o["toDisplayString"])(e.translate("UsersManager_Copied")),1)):Object(o["createCommentVNode"])("",!0)]})),_:1})])])):Object(o["createCommentVNode"])("",!0),Object(o["withDirectives"])(Object(o["createElementVNode"])("div",null,[Object(o["withDirectives"])(Object(o["createElementVNode"])("div",null,[Object(o["createElementVNode"])("h2",null,[Object(o["createVNode"])(l,{"help-url":"https://matomo.org/docs/manage-users/","feature-name":"Users Management"},{default:Object(o["withCtx"])((function(){return[Object(o["createTextVNode"])(Object(o["toDisplayString"])(e.translate("UsersManager_ManageUsers")),1)]})),_:1})]),"superuser"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",zn,Object(o["toDisplayString"])(e.translate("UsersManager_ManageUsersDesc")),1)):Object(o["createCommentVNode"])("",!0),"admin"===e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("p",Gn,Object(o["toDisplayString"])(e.translate("UsersManager_ManageUsersAdminDesc")),1)):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Wn,[Object(o["createElementVNode"])("div",Yn,[Object(o["createElementVNode"])("div",Xn,[Object(o["createElementVNode"])("a",{class:"btn add-new-user",onClick:t[1]||(t[1]=function(t){return e.onAddNewUser()})},Object(o["toDisplayString"])(e.translate("UsersManager_InviteNewUser")),1)]),"superuser"!==e.currentUserRole?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Kn,[Object(o["createElementVNode"])("a",{class:"btn add-existing-user",onClick:t[2]||(t[2]=function(t){return e.showAddExistingUserModal()})},Object(o["toDisplayString"])(e.translate("UsersManager_AddExistingUser")),1)])):Object(o["createCommentVNode"])("",!0)])]),Object(o["createVNode"])(c,{onEditUser:t[3]||(t[3]=function(t){return e.onEditUser(t.user)}),onChangeUserRole:t[4]||(t[4]=function(t){return e.onChangeUserRole(t.users,t.role)}),onDeleteUser:t[5]||(t[5]=function(t){return e.onDeleteUser(t.users,t.password)}),onSearchChange:t[6]||(t[6]=function(t){e.searchParams=t.params,e.fetchUsers()}),onResendInvite:t[7]||(t[7]=function(t){return e.onResendInvite(t.user)}),"initial-site-id":e.initialSiteId,"initial-site-name":e.initialSiteName,"is-loading-users":e.isLoadingUsers,"current-user-role":e.currentUserRole,"access-levels":e.accessLevels,"filter-access-levels":e.filterAccessLevels,"filter-status-levels":e.filterStatusLevels,"search-params":e.searchParams,users:e.users,"total-entries":e.totalEntries},null,8,["initial-site-id","initial-site-name","is-loading-users","current-user-role","access-levels","filter-access-levels","filter-status-levels","search-params","users","total-entries"])],512),[[m]])],512),[[o["vShow"],!e.isEditing]]),e.isEditing?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",Qn,[Object(o["createVNode"])(d,{onDone:t[8]||(t[8]=function(t){return e.onDoneEditing(t.isUserModified)}),user:e.userBeingEdited,"current-user-role":e.currentUserRole,"access-levels":e.accessLevels,"filter-access-levels":e.filterAccessLevels,"initial-site-id":e.initialSiteId,"initial-site-name":e.initialSiteName,onUpdated:t[9]||(t[9]=function(t){return e.userBeingEdited=t.user}),onShowNotification:e.showInviteNotification},null,8,["user","current-user-role","access-levels","filter-access-levels","initial-site-id","initial-site-name","onShowNotification"])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Zn,[Object(o["createElementVNode"])("div",es,[Object(o["createElementVNode"])("h3",null,Object(o["toDisplayString"])(e.translate("UsersManager_AddExistingUser")),1),Object(o["createElementVNode"])("p",null,Object(o["toDisplayString"])(e.translate("UsersManager_EnterUsernameOrEmail"))+":",1),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(u,{modelValue:e.addNewUserLoginEmail,"onUpdate:modelValue":t[10]||(t[10]=function(t){return e.addNewUserLoginEmail=t}),name:"add-existing-user-email",uicontrol:"text"},null,8,["modelValue"])])]),Object(o["createElementVNode"])("div",ts,[Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close btn",onClick:t[11]||(t[11]=Object(o["withModifiers"])((function(t){return e.addExistingUser()}),["prevent"])),style:{"margin-right":"3.5px"}},Object(o["toDisplayString"])(e.translate("General_Add")),1),Object(o["createElementVNode"])("a",{href:"",class:"modal-action modal-close modal-no",onClick:t[12]||(t[12]=Object(o["withModifiers"])((function(t){return e.addNewUserLoginEmail=null}),["prevent"]))},Object(o["toDisplayString"])(e.translate("General_Cancel")),1)])],512)],512)),[[b]])}var ss=20,is=window,rs=is.$,os=Object(o["defineComponent"])({props:{currentUserRole:{type:String,required:!0},initialSiteName:{type:String,required:!0},initialSiteId:{type:String,required:!0},accessLevels:{type:Array,required:!0},filterAccessLevels:{type:Array,required:!0},filterStatusLevels:{type:Array,required:!0}},components:{EnrichedHeadline:r["EnrichedHeadline"],PagedUsersList:In,UserEditForm:pt,Field:g["Field"]},directives:{ContentIntro:r["ContentIntro"],Tooltips:r["Tooltips"]},data:function(){return{isEditing:!!r["MatomoUrl"].urlParsed.value.showadduser,isCurrentUserSuperUser:!0,users:[],totalEntries:null,searchParams:{offset:0,limit:ss,filter_search:"",filter_access:"",filter_status:"",idSite:this.initialSiteId},copied:!1,showNotification:!1,token:null,isLoadingUsers:!1,userBeingEdited:null,addNewUserLoginEmail:""}},created:function(){this.fetchUsers()},watch:{showNotification:function(e){e||(this.copied=!1)},limit:function(){this.fetchUsers()}},methods:{onEditUser:function(e){r["Matomo"].helper.lazyScrollToContent(),this.isEditing=!0,this.userBeingEdited=e},onDoneEditing:function(e){this.isEditing=!1,e&&this.fetchUsers()},showAddExistingUserModal:function(){rs(this.$refs.addExistingUserModal).modal({dismissible:!1}).modal("open")},onChangeUserRole:function(e,t){var n=this;this.isLoadingUsers=!0,Promise.resolve().then((function(){return"all"===e?n.getAllUsersInSearch():e})).then((function(e){return e.filter((function(e){return"superuser"!==e.role})).map((function(e){return e.login}))})).then((function(e){var s,i=n.accessLevels.filter((function(e){return e.key===t})).map((function(e){return e.type}));return s=i.length&&"capability"===i[0]?e.map((function(e){return{method:"UsersManager.addCapabilities",userLogin:e,capabilities:t,idSites:n.searchParams.idSite}})):e.map((function(e){return{method:"UsersManager.setUserAccess",userLogin:e,access:t,idSites:n.searchParams.idSite}})),r["AjaxHelper"].fetch(s,{createErrorNotification:!0})})).catch((function(){})).then((function(){return n.fetchUsers()}))},getAllUsersInSearch:function(){return r["AjaxHelper"].fetch({method:"UsersManager.getUsersPlusRole",filter_search:this.searchParams.filter_search,filter_access:this.searchParams.filter_access,filter_status:this.searchParams.filter_status,idSite:this.searchParams.idSite,filter_limit:"-1"})},onDeleteUser:function(e,t){var n=this;this.isLoadingUsers=!0,Promise.resolve().then((function(){return"all"===e?n.getAllUsersInSearch():e})).then((function(e){return e.map((function(e){return e.login}))})).then((function(e){var n=e.map((function(e){return{method:"UsersManager.deleteUser",userLogin:e,passwordConfirmation:t}}));return r["AjaxHelper"].fetch(n,{createErrorNotification:!0})})).then((function(){r["NotificationsStore"].scrollToNotification(r["NotificationsStore"].show({id:"removeUserSuccess",message:Object(r["translate"])("UsersManager_DeleteSuccess"),context:"success",type:"toast"})),n.fetchUsers()}),(function(){"all"!==e&&e.length>1&&r["NotificationsStore"].show({id:"removeUserSuccess",message:Object(r["translate"])("UsersManager_DeleteNotSuccessful"),context:"warning",type:"toast"}),n.fetchUsers()}))},copyToClipboard:function(e){navigator.clipboard.writeText(e),this.copied=!0},onResendInvite:function(e){var t=this;r["AjaxHelper"].fetch({method:"UsersManager.resendInvite",userLogin:e.login}).then((function(e){t.fetchUsers(),"undefined"!==typeof e.value&&t.showInviteNotification(e.value)}))},showInviteNotification:function(e){this.showNotification=!0,this.token=e},fetchUsers:function(){var e=this;return this.isLoadingUsers=!0,r["AjaxHelper"].fetch(Object.assign(Object.assign({},this.searchParams),{},{method:"UsersManager.getUsersPlusRole"}),{returnResponseObject:!0}).then((function(t){var n=t.getRequestHandle();e.totalEntries=parseInt(n.getResponseHeader("x-matomo-total-results")||"0",10),e.users=n.responseJSON,e.isLoadingUsers=!1})).catch((function(){e.isLoadingUsers=!1}))},addExistingUser:function(){var e=this;return this.isLoadingUsers=!0,r["AjaxHelper"].fetch({method:"UsersManager.userExists",userLogin:this.addNewUserLoginEmail}).then((function(t){return t&&t.value?e.addNewUserLoginEmail:r["AjaxHelper"].fetch({method:"UsersManager.getUserLoginFromUserEmail",userEmail:e.addNewUserLoginEmail}).then((function(e){return e.value}))})).then((function(t){return r["AjaxHelper"].post({method:"UsersManager.setUserAccess"},{userLogin:t,access:"view",idSites:e.searchParams.idSite})})).then((function(){return e.fetchUsers()})).catch((function(){e.isLoadingUsers=!1}))},onAddNewUser:function(){this.showNotification=!1;var e={isAllowed:!0};r["Matomo"].postEvent("UsersManager.initAddUser",e),e&&!e.isAllowed||(this.isEditing=!0,this.userBeingEdited=null)}}});os.render=ns;var as=os,ls=(Object(r["createAngularJsAdapter"])({component:as,scope:{currentUserRole:{angularJsBind:"<"},initialSiteName:{angularJsBind:"@"},initialSiteId:{angularJsBind:"@"},accessLevels:{angularJsBind:"<"},filterAccessLevels:{angularJsBind:"<"},filterStatusLevels:{angularJsBind:"<"}},directiveName:"piwikUsersManager",restrict:"E"}),{key:0,class:"alert alert-info"}),cs={key:1}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ls(e,t,n,s,i,r){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SaveButton"),c=Object(o["resolveComponent"])("ContentBlock"),d=Object(o["resolveDirective"])("form");return Object(o["openBlock"])(),Object(o["createBlock"])(c,{"content-title":e.title},{default:Object(o["withCtx"])((function(){return[0===e.anonymousSites.length?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",os,Object(o["toDisplayString"])(e.translate("UsersManager_NoteNoAnonymousUserAccessSettingsWontBeUsed2")),1)):Object(o["createCommentVNode"])("",!0),e.anonymousSites.length>0?Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",as,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"anonymousDefaultReport",modelValue:e.defaultReport,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.defaultReport=t}),introduction:e.translate("UsersManager_WhenUsersAreNotLoggedInAndVisitPiwikTheyShouldAccess"),options:e.defaultReportOptions},null,8,["modelValue","introduction","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"select",name:"anonymousDefaultReportWebsite",modelValue:e.defaultReportWebsite,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.defaultReportWebsite=t}),options:e.anonymousSites},null,8,["modelValue","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"anonymousDefaultDate",modelValue:e.defaultDate,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.defaultDate=t}),introduction:e.translate("UsersManager_ForAnonymousUsersReportDateToLoadByDefault"),options:e.availableDefaultDates},null,8,["modelValue","introduction","options"])]),Object(o["createVNode"])(l,{saving:e.loading,onConfirm:t[3]||(t[3]=function(t){return e.save()})},null,8,["saving"])],512)),[[d]]):Object(o["createCommentVNode"])("",!0)]})),_:1},8,["content-title"])}var cs=Object(o["defineComponent"])({props:{title:{type:String,required:!0},anonymousSites:{type:Array,required:!0},anonymousDefaultReport:{type:[String,Number],required:!0},anonymousDefaultSite:{type:String,required:!0},anonymousDefaultDate:{type:String,required:!0},availableDefaultDates:{type:Object,required:!0},defaultReportOptions:{type:Object,required:!0}},components:{ContentBlock:r["ContentBlock"],SaveButton:h["SaveButton"],Field:h["Field"]},directives:{Form:h["Form"]},data:function(){return{loading:!1,defaultReport:"".concat(this.anonymousDefaultReport),defaultReportWebsite:this.anonymousDefaultSite,defaultDate:this.anonymousDefaultDate}},methods:{save:function(){var e=this,t={anonymousDefaultReport:"1"===this.defaultReport?this.defaultReportWebsite:this.defaultReport,anonymousDefaultDate:this.defaultDate};this.loading=!0,r["AjaxHelper"].post({module:"UsersManager",action:"recordAnonymousUserSettings",format:"json"},t,{withTokenInUrl:!0}).then((function(){var e=r["NotificationsStore"].show({message:Object(r["translate"])("CoreAdminHome_SettingsSaveSuccess"),id:"anonymousUserSettings",context:"success",type:"transient"});r["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.loading=!1}))}}});cs.render=ls;var ds=cs,us=(Object(r["createAngularJsAdapter"])({component:ds,scope:{title:{angularJsBind:"<"},anonymousSites:{angularJsBind:"<"},anonymousDefaultReport:{angularJsBind:"<"},anonymousDefaultSite:{angularJsBind:"<"},anonymousDefaultDate:{angularJsBind:"<"},availableDefaultDates:{angularJsBind:"<"},defaultReportOptions:{angularJsBind:"<"}},directiveName:"matomoAnonymousSettings"}),{id:"newsletterSignup"}); + */function ds(e,t,n,s,i,r){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SaveButton"),c=Object(o["resolveComponent"])("ContentBlock"),d=Object(o["resolveDirective"])("form");return Object(o["openBlock"])(),Object(o["createBlock"])(c,{"content-title":e.title},{default:Object(o["withCtx"])((function(){return[0===e.anonymousSites.length?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",ls,Object(o["toDisplayString"])(e.translate("UsersManager_NoteNoAnonymousUserAccessSettingsWontBeUsed2")),1)):Object(o["createCommentVNode"])("",!0),e.anonymousSites.length>0?Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",cs,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"anonymousDefaultReport",modelValue:e.defaultReport,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.defaultReport=t}),introduction:e.translate("UsersManager_WhenUsersAreNotLoggedInAndVisitPiwikTheyShouldAccess"),options:e.defaultReportOptions},null,8,["modelValue","introduction","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"select",name:"anonymousDefaultReportWebsite",modelValue:e.defaultReportWebsite,"onUpdate:modelValue":t[1]||(t[1]=function(t){return e.defaultReportWebsite=t}),options:e.anonymousSites},null,8,["modelValue","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"anonymousDefaultDate",modelValue:e.defaultDate,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.defaultDate=t}),introduction:e.translate("UsersManager_ForAnonymousUsersReportDateToLoadByDefault"),options:e.availableDefaultDates},null,8,["modelValue","introduction","options"])]),Object(o["createVNode"])(l,{saving:e.loading,onConfirm:t[3]||(t[3]=function(t){return e.save()})},null,8,["saving"])],512)),[[d]]):Object(o["createCommentVNode"])("",!0)]})),_:1},8,["content-title"])}var us=Object(o["defineComponent"])({props:{title:{type:String,required:!0},anonymousSites:{type:Array,required:!0},anonymousDefaultReport:{type:[String,Number],required:!0},anonymousDefaultSite:{type:String,required:!0},anonymousDefaultDate:{type:String,required:!0},availableDefaultDates:{type:Object,required:!0},defaultReportOptions:{type:Object,required:!0}},components:{ContentBlock:r["ContentBlock"],SaveButton:g["SaveButton"],Field:g["Field"]},directives:{Form:g["Form"]},data:function(){return{loading:!1,defaultReport:"".concat(this.anonymousDefaultReport),defaultReportWebsite:this.anonymousDefaultSite,defaultDate:this.anonymousDefaultDate}},methods:{save:function(){var e=this,t={anonymousDefaultReport:"1"===this.defaultReport?this.defaultReportWebsite:this.defaultReport,anonymousDefaultDate:this.defaultDate};this.loading=!0,r["AjaxHelper"].post({module:"UsersManager",action:"recordAnonymousUserSettings",format:"json"},t,{withTokenInUrl:!0}).then((function(){var e=r["NotificationsStore"].show({message:Object(r["translate"])("CoreAdminHome_SettingsSaveSuccess"),id:"anonymousUserSettings",context:"success",type:"transient"});r["NotificationsStore"].scrollToNotification(e)})).finally((function(){e.loading=!1}))}}});us.render=ds;var ms=us,bs=(Object(r["createAngularJsAdapter"])({component:ms,scope:{title:{angularJsBind:"<"},anonymousSites:{angularJsBind:"<"},anonymousDefaultReport:{angularJsBind:"<"},anonymousDefaultSite:{angularJsBind:"<"},anonymousDefaultDate:{angularJsBind:"<"},availableDefaultDates:{angularJsBind:"<"},defaultReportOptions:{angularJsBind:"<"}},directiveName:"matomoAnonymousSettings"}),{id:"newsletterSignup"}); /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function ms(e,t,n,s,i,r){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SaveButton"),c=Object(o["resolveComponent"])("ContentBlock");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",us,[Object(o["createVNode"])(c,{"content-title":e.translate("UsersManager_NewsletterSignupTitle")},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"checkbox",name:"newsletterSignupCheckbox",id:"newsletterSignupCheckbox",modelValue:e.newsletterSignupCheckbox,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.newsletterSignupCheckbox=t}),"full-width":!0,title:e.signupTitleText},null,8,["modelValue","title"])]),Object(o["createVNode"])(l,{id:"newsletterSignupBtn",onConfirm:t[1]||(t[1]=function(t){return e.signupForNewsletter()}),disabled:!e.newsletterSignupCheckbox,value:e.newsletterSignupButtonTitle,saving:e.isProcessingNewsletterSignup},null,8,["disabled","value","saving"])]})),_:1},8,["content-title"])],512)),[[o["vShow"],e.showNewsletterSignup]])}var bs=Object(o["defineComponent"])({data:function(){return{showNewsletterSignup:!0,newsletterSignupCheckbox:!1,isProcessingNewsletterSignup:!1,newsletterSignupButtonTitle:Object(r["translate"])("General_Save")}},components:{ContentBlock:r["ContentBlock"],SaveButton:h["SaveButton"],Field:h["Field"]},computed:{signupTitleText:function(){return Object(r["translate"])("UsersManager_NewsletterSignupMessage",'<a href="https://matomo.org/privacy-policy/" target="_blank">',"</a>")}},methods:{signupForNewsletter:function(){var e=this;this.newsletterSignupButtonTitle=Object(r["translate"])("General_Loading"),this.isProcessingNewsletterSignup=!0,r["AjaxHelper"].fetch({module:"API",method:"UsersManager.newsletterSignup"},{withTokenInUrl:!0}).then((function(){e.isProcessingNewsletterSignup=!1,e.showNewsletterSignup=!1;var t=r["NotificationsStore"].show({message:Object(r["translate"])("UsersManager_NewsletterSignupSuccessMessage"),id:"newslettersignup",context:"success",type:"transient"});r["NotificationsStore"].scrollToNotification(t)})).catch((function(){e.isProcessingNewsletterSignup=!1;var t=r["NotificationsStore"].show({message:Object(r["translate"])("UsersManager_NewsletterSignupFailureMessage"),id:"newslettersignup",context:"error",type:"transient"});r["NotificationsStore"].scrollToNotification(t),e.newsletterSignupButtonTitle=Object(r["translate"])("General_PleaseTryAgain")}))}}});bs.render=ms;var ps=bs,gs=(Object(r["createAngularJsAdapter"])({component:ps,scope:{},directiveName:"matomoNewsletterSettings"}),{id:"userSettingsTable"}),hs={key:0},fs={id:"languageHelp",class:"inline-help-node"},js={target:"_blank",rel:"noreferrer noopener",href:"https://matomo.org/translations/"},Os={class:"sites_autocomplete"}; + */function ps(e,t,n,s,i,r){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SaveButton"),c=Object(o["resolveComponent"])("ContentBlock");return Object(o["withDirectives"])((Object(o["openBlock"])(),Object(o["createElementBlock"])("div",bs,[Object(o["createVNode"])(c,{"content-title":e.translate("UsersManager_NewsletterSignupTitle")},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"checkbox",name:"newsletterSignupCheckbox",id:"newsletterSignupCheckbox",modelValue:e.newsletterSignupCheckbox,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.newsletterSignupCheckbox=t}),"full-width":!0,title:e.signupTitleText},null,8,["modelValue","title"])]),Object(o["createVNode"])(l,{id:"newsletterSignupBtn",onConfirm:t[1]||(t[1]=function(t){return e.signupForNewsletter()}),disabled:!e.newsletterSignupCheckbox,value:e.newsletterSignupButtonTitle,saving:e.isProcessingNewsletterSignup},null,8,["disabled","value","saving"])]})),_:1},8,["content-title"])],512)),[[o["vShow"],e.showNewsletterSignup]])}var hs=Object(o["defineComponent"])({data:function(){return{showNewsletterSignup:!0,newsletterSignupCheckbox:!1,isProcessingNewsletterSignup:!1,newsletterSignupButtonTitle:Object(r["translate"])("General_Save")}},components:{ContentBlock:r["ContentBlock"],SaveButton:g["SaveButton"],Field:g["Field"]},computed:{signupTitleText:function(){return Object(r["translate"])("UsersManager_NewsletterSignupMessage",'<a href="https://matomo.org/privacy-policy/" target="_blank">',"</a>")}},methods:{signupForNewsletter:function(){var e=this;this.newsletterSignupButtonTitle=Object(r["translate"])("General_Loading"),this.isProcessingNewsletterSignup=!0,r["AjaxHelper"].fetch({module:"API",method:"UsersManager.newsletterSignup"},{withTokenInUrl:!0}).then((function(){e.isProcessingNewsletterSignup=!1,e.showNewsletterSignup=!1;var t=r["NotificationsStore"].show({message:Object(r["translate"])("UsersManager_NewsletterSignupSuccessMessage"),id:"newslettersignup",context:"success",type:"transient"});r["NotificationsStore"].scrollToNotification(t)})).catch((function(){e.isProcessingNewsletterSignup=!1;var t=r["NotificationsStore"].show({message:Object(r["translate"])("UsersManager_NewsletterSignupFailureMessage"),id:"newslettersignup",context:"error",type:"transient"});r["NotificationsStore"].scrollToNotification(t),e.newsletterSignupButtonTitle=Object(r["translate"])("General_PleaseTryAgain")}))}}});hs.render=ps;var gs=hs,fs=(Object(r["createAngularJsAdapter"])({component:gs,scope:{},directiveName:"matomoNewsletterSettings"}),{id:"userSettingsTable"}),js={key:0},Os={id:"languageHelp",class:"inline-help-node"},vs={target:"_blank",rel:"noreferrer noopener",href:"https://matomo.org/translations/"},Cs={class:"sites_autocomplete"}; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */function vs(e,t,n,s,i,r){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SiteSelector"),c=Object(o["resolveComponent"])("SaveButton"),d=Object(o["resolveComponent"])("PasswordConfirmation"),u=Object(o["resolveComponent"])("ContentBlock"),m=Object(o["resolveDirective"])("form");return Object(o["openBlock"])(),Object(o["createBlock"])(u,{"content-title":e.title,feature:"true"},{default:Object(o["withCtx"])((function(){return[Object(o["withDirectives"])(Object(o["createElementVNode"])("form",gs,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"text",name:"username",title:e.translate("General_Username"),disabled:!0,modelValue:e.username,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.username=t}),"inline-help":e.translate("UsersManager_YourUsernameCannotBeChanged")},null,8,["title","modelValue","inline-help"])]),e.isUsersAdminEnabled?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",hs,[Object(o["createVNode"])(a,{uicontrol:"text",name:"email","model-value":e.email,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.email=t,e.doesRequirePasswordConfirmation=!0}),maxlength:100,title:e.translate("UsersManager_Email")},null,8,["model-value","title"])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",fs,[Object(o["createElementVNode"])("a",js,Object(o["toDisplayString"])(e.translate("LanguagesManager_AboutPiwikTranslations")),1)]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"select",name:"language",modelValue:e.language,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.language=t}),title:e.translate("General_Language"),options:e.languageOptions,"inline-help":"#languageHelp"},null,8,["modelValue","title","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"select",name:"timeformat",modelValue:e.timeformat,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.timeformat=t}),title:e.translate("General_TimeFormat"),options:e.timeFormats},null,8,["modelValue","title","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"defaultReport",modelValue:e.theDefaultReport,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.theDefaultReport=t}),introduction:e.translate("UsersManager_ReportToLoadByDefault"),title:e.translate("General_AllWebsitesDashboard"),options:e.defaultReportOptions},null,8,["modelValue","introduction","title","options"])]),Object(o["createElementVNode"])("div",Os,[Object(o["createVNode"])(l,{modelValue:e.site,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.site=t}),"show-selected-site":!0,"switch-site-on-select":!1,"show-all-sites-item":!1,showselectedsite:!0,id:"defaultReportSiteSelector"},null,8,["modelValue"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"defaultDate",modelValue:e.theDefaultDate,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.theDefaultDate=t}),introduction:e.translate("UsersManager_ReportDateToLoadByDefault"),options:e.availableDefaultDates},null,8,["modelValue","introduction","options"])]),Object(o["createVNode"])(c,{onConfirm:t[7]||(t[7]=function(t){return e.save()}),saving:e.loading},null,8,["saving"]),Object(o["createVNode"])(d,{modelValue:e.showPasswordConfirmation,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.showPasswordConfirmation=t}),onConfirmed:e.doSave},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])],512),[[m]])]})),_:1},8,["content-title"])}var Cs=Object(o["defineComponent"])({props:{isUsersAdminEnabled:{type:Boolean,required:!0},title:{type:String,required:!0},userLogin:{type:String,required:!0},userEmail:{type:String,required:!0},currentLanguageCode:{type:String,required:!0},languageOptions:{type:Object,required:!0},currentTimeformat:{type:Number,required:!0},timeFormats:{type:Object,required:!0},defaultReport:{type:[String,Number],required:!0},defaultReportOptions:{type:Object,required:!0},defaultReportIdSite:{type:[String,Number],required:!0},defaultReportSiteName:{type:String,required:!0},defaultDate:{type:String,required:!0},availableDefaultDates:{type:Object,required:!0}},components:{ContentBlock:r["ContentBlock"],SaveButton:h["SaveButton"],Field:h["Field"],SiteSelector:r["SiteSelector"],PasswordConfirmation:h["PasswordConfirmation"]},directives:{Form:h["Form"]},data:function(){return{doesRequirePasswordConfirmation:!1,username:this.userLogin,email:this.userEmail,language:this.currentLanguageCode,timeformat:this.currentTimeformat,theDefaultReport:this.defaultReport,site:{id:this.defaultReportIdSite,name:r["Matomo"].helper.htmlDecode(this.defaultReportSiteName)},theDefaultDate:this.defaultDate,loading:!1,showPasswordConfirmation:!1}},methods:{save:function(){this.doesRequirePasswordConfirmation?this.showPasswordConfirmation=!0:this.doSave()},doSave:function(e){var t=this,n={email:this.email,defaultReport:"MultiSites"===this.theDefaultReport?this.theDefaultReport:this.site.id,defaultDate:this.theDefaultDate,language:this.language,timeformat:this.timeformat};e&&(n.passwordConfirmation=e),this.loading=!0,r["AjaxHelper"].post({module:"UsersManager",action:"recordUserSettings",format:"json"},n,{withTokenInUrl:!0}).then((function(){var e=r["NotificationsStore"].show({message:Object(r["translate"])("CoreAdminHome_SettingsSaveSuccess"),id:"PersonalSettingsSuccess",context:"success",type:"transient"});r["NotificationsStore"].scrollToNotification(e),t.doesRequirePasswordConfirmation=!1,t.loading=!1})).catch((function(){t.loading=!1}))}}});Cs.render=vs;var Ss=Cs; + */function Ns(e,t,n,s,i,r){var a=Object(o["resolveComponent"])("Field"),l=Object(o["resolveComponent"])("SiteSelector"),c=Object(o["resolveComponent"])("SaveButton"),d=Object(o["resolveComponent"])("PasswordConfirmation"),u=Object(o["resolveComponent"])("ContentBlock"),m=Object(o["resolveDirective"])("form");return Object(o["openBlock"])(),Object(o["createBlock"])(u,{"content-title":e.title,feature:"true"},{default:Object(o["withCtx"])((function(){return[Object(o["withDirectives"])(Object(o["createElementVNode"])("form",fs,[Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"text",name:"username",title:e.translate("General_Username"),disabled:!0,modelValue:e.username,"onUpdate:modelValue":t[0]||(t[0]=function(t){return e.username=t}),"inline-help":e.translate("UsersManager_YourUsernameCannotBeChanged")},null,8,["title","modelValue","inline-help"])]),e.isUsersAdminEnabled?(Object(o["openBlock"])(),Object(o["createElementBlock"])("div",js,[Object(o["createVNode"])(a,{uicontrol:"text",name:"email","model-value":e.email,"onUpdate:modelValue":t[1]||(t[1]=function(t){e.email=t,e.doesRequirePasswordConfirmation=!0}),maxlength:100,title:e.translate("UsersManager_Email")},null,8,["model-value","title"])])):Object(o["createCommentVNode"])("",!0),Object(o["createElementVNode"])("div",Os,[Object(o["createElementVNode"])("a",vs,Object(o["toDisplayString"])(e.translate("LanguagesManager_AboutPiwikTranslations")),1)]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"select",name:"language",modelValue:e.language,"onUpdate:modelValue":t[2]||(t[2]=function(t){return e.language=t}),title:e.translate("General_Language"),options:e.languageOptions,"inline-help":"#languageHelp"},null,8,["modelValue","title","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"select",name:"timeformat",modelValue:e.timeformat,"onUpdate:modelValue":t[3]||(t[3]=function(t){return e.timeformat=t}),title:e.translate("General_TimeFormat"),options:e.timeFormats},null,8,["modelValue","title","options"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"defaultReport",modelValue:e.theDefaultReport,"onUpdate:modelValue":t[4]||(t[4]=function(t){return e.theDefaultReport=t}),introduction:e.translate("UsersManager_ReportToLoadByDefault"),title:e.translate("General_AllWebsitesDashboard"),options:e.defaultReportOptions},null,8,["modelValue","introduction","title","options"])]),Object(o["createElementVNode"])("div",Cs,[Object(o["createVNode"])(l,{modelValue:e.site,"onUpdate:modelValue":t[5]||(t[5]=function(t){return e.site=t}),"show-selected-site":!0,"switch-site-on-select":!1,"show-all-sites-item":!1,showselectedsite:!0,id:"defaultReportSiteSelector"},null,8,["modelValue"])]),Object(o["createElementVNode"])("div",null,[Object(o["createVNode"])(a,{uicontrol:"radio",name:"defaultDate",modelValue:e.theDefaultDate,"onUpdate:modelValue":t[6]||(t[6]=function(t){return e.theDefaultDate=t}),introduction:e.translate("UsersManager_ReportDateToLoadByDefault"),options:e.availableDefaultDates},null,8,["modelValue","introduction","options"])]),Object(o["createVNode"])(c,{onConfirm:t[7]||(t[7]=function(t){return e.save()}),saving:e.loading},null,8,["saving"]),Object(o["createVNode"])(d,{modelValue:e.showPasswordConfirmation,"onUpdate:modelValue":t[8]||(t[8]=function(t){return e.showPasswordConfirmation=t}),onConfirmed:e.doSave},{default:Object(o["withCtx"])((function(){return[Object(o["createElementVNode"])("h2",null,Object(o["toDisplayString"])(e.translate("UsersManager_ConfirmWithPassword")),1)]})),_:1},8,["modelValue","onConfirmed"])],512),[[m]])]})),_:1},8,["content-title"])}var Ss=Object(o["defineComponent"])({props:{isUsersAdminEnabled:{type:Boolean,required:!0},title:{type:String,required:!0},userLogin:{type:String,required:!0},userEmail:{type:String,required:!0},currentLanguageCode:{type:String,required:!0},languageOptions:{type:Object,required:!0},currentTimeformat:{type:Number,required:!0},timeFormats:{type:Object,required:!0},defaultReport:{type:[String,Number],required:!0},defaultReportOptions:{type:Object,required:!0},defaultReportIdSite:{type:[String,Number],required:!0},defaultReportSiteName:{type:String,required:!0},defaultDate:{type:String,required:!0},availableDefaultDates:{type:Object,required:!0}},components:{ContentBlock:r["ContentBlock"],SaveButton:g["SaveButton"],Field:g["Field"],SiteSelector:r["SiteSelector"],PasswordConfirmation:g["PasswordConfirmation"]},directives:{Form:g["Form"]},data:function(){return{doesRequirePasswordConfirmation:!1,username:this.userLogin,email:this.userEmail,language:this.currentLanguageCode,timeformat:this.currentTimeformat,theDefaultReport:this.defaultReport,site:{id:this.defaultReportIdSite,name:r["Matomo"].helper.htmlDecode(this.defaultReportSiteName)},theDefaultDate:this.defaultDate,loading:!1,showPasswordConfirmation:!1}},methods:{save:function(){this.doesRequirePasswordConfirmation?this.showPasswordConfirmation=!0:this.doSave()},doSave:function(e){var t=this,n={email:this.email,defaultReport:"MultiSites"===this.theDefaultReport?this.theDefaultReport:this.site.id,defaultDate:this.theDefaultDate,language:this.language,timeformat:this.timeformat};e&&(n.passwordConfirmation=e),this.loading=!0,r["AjaxHelper"].post({module:"UsersManager",action:"recordUserSettings",format:"json"},n,{withTokenInUrl:!0}).then((function(){var e=r["NotificationsStore"].show({message:Object(r["translate"])("CoreAdminHome_SettingsSaveSuccess"),id:"PersonalSettingsSuccess",context:"success",type:"transient"});r["NotificationsStore"].scrollToNotification(e),t.doesRequirePasswordConfirmation=!1,t.loading=!1})).catch((function(){t.loading=!1}))}}});Ss.render=Ns;var Us=Ss; /*! * Matomo - free/libre analytics platform * * @link https://matomo.org * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later - */Object(r["createAngularJsAdapter"])({component:Ss,scope:{isUsersAdminEnabled:{angularJsBind:"<"},title:{angularJsBind:"<"},userLogin:{angularJsBind:"<"},userEmail:{angularJsBind:"<"},currentLanguageCode:{angularJsBind:"<"},languageOptions:{angularJsBind:"<"},currentTimeformat:{angularJsBind:"<"},timeFormats:{angularJsBind:"<"},defaultReport:{angularJsBind:"<"},defaultReportOptions:{angularJsBind:"<"},defaultReportIdSite:{angularJsBind:"<"},defaultReportSiteName:{angularJsBind:"<"},defaultDate:{angularJsBind:"<"},availableDefaultDates:{angularJsBind:"<"}},directiveName:"matomoPersonalSettings"})}})})); + */Object(r["createAngularJsAdapter"])({component:Us,scope:{isUsersAdminEnabled:{angularJsBind:"<"},title:{angularJsBind:"<"},userLogin:{angularJsBind:"<"},userEmail:{angularJsBind:"<"},currentLanguageCode:{angularJsBind:"<"},languageOptions:{angularJsBind:"<"},currentTimeformat:{angularJsBind:"<"},timeFormats:{angularJsBind:"<"},defaultReport:{angularJsBind:"<"},defaultReportOptions:{angularJsBind:"<"},defaultReportIdSite:{angularJsBind:"<"},defaultReportSiteName:{angularJsBind:"<"},defaultDate:{angularJsBind:"<"},availableDefaultDates:{angularJsBind:"<"}},directiveName:"matomoPersonalSettings"})}})})); //# sourceMappingURL=UsersManager.umd.min.js.map
\ No newline at end of file |