strapi-plugin-firebase-authentication 1.1.10 → 1.1.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_chunks/{App-Beg-rhfs.mjs → App-BY1gNGKH.mjs} +157 -127
- package/dist/_chunks/{App-Cd5yIsKz.js → App-BqjE8BHb.js} +45 -36
- package/dist/_chunks/{api-C7A4Ky3o.js → api-DQCdqlCd.js} +1 -1
- package/dist/_chunks/{api-BznQNKgc.mjs → api-D_4cdJU5.mjs} +1 -1
- package/dist/_chunks/{index-d4XkRCYN.js → index-C4t4JZZ_.js} +1 -1
- package/dist/_chunks/{index-C3713gpv.mjs → index-D8pv1Q6h.mjs} +1 -1
- package/dist/_chunks/{index-Dz1nqS7B.js → index-DlPxMuSK.js} +2 -2
- package/dist/_chunks/{index-Dxg4gNu5.mjs → index-DtGfwf9S.mjs} +2 -2
- package/dist/admin/index.js +1 -1
- package/dist/admin/index.mjs +1 -1
- package/dist/admin/src/components/table/FirebaseTable/FirebaseTable.d.ts +1 -1
- package/dist/server/index.js +5644 -2179
- package/dist/server/index.mjs +5641 -2176
- package/dist/server/src/content-types/index.d.ts +7 -0
- package/dist/server/src/controllers/firebaseController.d.ts +9 -0
- package/dist/server/src/controllers/index.d.ts +1 -0
- package/dist/server/src/index.d.ts +28 -1
- package/dist/server/src/services/emailService.d.ts +9 -0
- package/dist/server/src/services/firebaseService.d.ts +3 -2
- package/dist/server/src/services/index.d.ts +20 -1
- package/dist/server/src/services/tokenService.d.ts +28 -0
- package/dist/server/src/services/userService.d.ts +22 -1
- package/dist/server/src/templates/defaults/index.d.ts +1 -0
- package/dist/server/src/templates/defaults/password-changed.d.ts +2 -0
- package/dist/server/src/templates/types.d.ts +4 -2
- package/package.json +1 -1
|
@@ -5,13 +5,13 @@ import { Provider } from "@radix-ui/react-tooltip";
|
|
|
5
5
|
import React, { useState, useCallback, useMemo, useEffect, useRef, useLayoutEffect } from "react";
|
|
6
6
|
import { Link, Flex, Box, Button, Tooltip, Tbody, Tr, Td, Checkbox, Typography, Modal, Table, Thead, Th, SingleSelect, SingleSelectOption, SearchForm, Searchbar, IconButton, Dialog, Tabs, TextInput, Alert, Field, Toggle, Divider } from "@strapi/design-system";
|
|
7
7
|
import { useIntl } from "react-intl";
|
|
8
|
-
import { i as isArguments_1, a as isBufferExports, b as isTypedArray_1, c as isLength_1, d as isFunction_1, _ as _getTag, e as _Stack, f as _equalArrays, g as _equalByTag, h as isObjectLike_1, j as getDefaultExportFromCjs, k as _baseGetTag, l as _MapCache, m as _Symbol, P as PLUGIN_ID, n as getAugmentedNamespace, o as commonjsGlobal } from "./index-
|
|
8
|
+
import { i as isArguments_1, a as isBufferExports, b as isTypedArray_1, c as isLength_1, d as isFunction_1, _ as _getTag, e as _Stack, f as _equalArrays, g as _equalByTag, h as isObjectLike_1, j as getDefaultExportFromCjs, k as _baseGetTag, l as _MapCache, m as _Symbol, P as PLUGIN_ID, n as getAugmentedNamespace, o as commonjsGlobal } from "./index-DtGfwf9S.mjs";
|
|
9
9
|
import { ArrowLeft, Key, Trash, WarningCircle, CaretUp, CaretDown, Search, Plus, Pencil } from "@strapi/icons";
|
|
10
10
|
import styled from "styled-components";
|
|
11
11
|
import { RxCheck, RxCross2 } from "react-icons/rx";
|
|
12
12
|
import { AiOutlineUserAdd, AiFillPhone, AiFillMail, AiFillYahoo, AiFillGithub, AiFillTwitterCircle, AiFillFacebook, AiFillApple, AiFillGoogleCircle } from "react-icons/ai";
|
|
13
13
|
import { MdPassword } from "react-icons/md";
|
|
14
|
-
import { g as getFirebaseConfig$1 } from "./api-
|
|
14
|
+
import { g as getFirebaseConfig$1 } from "./api-D_4cdJU5.mjs";
|
|
15
15
|
import * as PhoneInputModule from "react-phone-input-2";
|
|
16
16
|
import "react-phone-input-2/lib/style.css";
|
|
17
17
|
import validator from "validator";
|
|
@@ -2381,31 +2381,32 @@ const DeleteAccount = ({
|
|
|
2381
2381
|
/* @__PURE__ */ jsx(WarningCircle, { fill: "danger700", width: "20px", height: "20px" }),
|
|
2382
2382
|
/* @__PURE__ */ jsx(Typography, { textColor: "danger700", children: "After you delete an account, it's permanently deleted. Accounts cannot be undeleted." })
|
|
2383
2383
|
] }),
|
|
2384
|
-
isSingleRecord
|
|
2385
|
-
/* @__PURE__ */
|
|
2386
|
-
|
|
2387
|
-
|
|
2388
|
-
|
|
2389
|
-
/* @__PURE__ */
|
|
2390
|
-
|
|
2391
|
-
|
|
2392
|
-
|
|
2393
|
-
|
|
2394
|
-
|
|
2395
|
-
|
|
2396
|
-
|
|
2397
|
-
|
|
2398
|
-
|
|
2399
|
-
|
|
2400
|
-
|
|
2401
|
-
|
|
2402
|
-
|
|
2403
|
-
|
|
2404
|
-
|
|
2405
|
-
|
|
2406
|
-
|
|
2407
|
-
|
|
2408
|
-
|
|
2384
|
+
isSingleRecord ? /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 1, children: [
|
|
2385
|
+
/* @__PURE__ */ jsx(Typography, { variant: "sigma", children: "User account" }),
|
|
2386
|
+
/* @__PURE__ */ jsx(Typography, { children: email })
|
|
2387
|
+
] }) : /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 1, children: [
|
|
2388
|
+
/* @__PURE__ */ jsx(Typography, { variant: "sigma", children: "Bulk delete operation" }),
|
|
2389
|
+
/* @__PURE__ */ jsx(Typography, { children: "You are about to delete multiple user accounts" })
|
|
2390
|
+
] }),
|
|
2391
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
|
|
2392
|
+
/* @__PURE__ */ jsx(Typography, { children: "Delete user from:" }),
|
|
2393
|
+
/* @__PURE__ */ jsxs(Flex, { direction: "row", alignItems: "center", gap: 4, children: [
|
|
2394
|
+
/* @__PURE__ */ jsx(
|
|
2395
|
+
Checkbox,
|
|
2396
|
+
{
|
|
2397
|
+
onCheckedChange: (checked) => setIsStrapiIncluded(checked === true),
|
|
2398
|
+
checked: isStrapiIncluded,
|
|
2399
|
+
children: "Strapi"
|
|
2400
|
+
}
|
|
2401
|
+
),
|
|
2402
|
+
/* @__PURE__ */ jsx(
|
|
2403
|
+
Checkbox,
|
|
2404
|
+
{
|
|
2405
|
+
onCheckedChange: (checked) => setIsFirebaseIncluded(checked === true),
|
|
2406
|
+
checked: isFirebaseIncluded,
|
|
2407
|
+
children: "Firebase"
|
|
2408
|
+
}
|
|
2409
|
+
)
|
|
2409
2410
|
] })
|
|
2410
2411
|
] })
|
|
2411
2412
|
] }) }),
|
|
@@ -2507,7 +2508,15 @@ const FirebaseTable = ({
|
|
|
2507
2508
|
const sort = query?.sort ?? "";
|
|
2508
2509
|
const [sortBy, sortOrder] = sort.split(":");
|
|
2509
2510
|
const handleBulkDelete = async (isStrapiIncluded, isFirebaseIncluded) => {
|
|
2510
|
-
|
|
2511
|
+
let destination = null;
|
|
2512
|
+
if (isStrapiIncluded && isFirebaseIncluded) {
|
|
2513
|
+
destination = null;
|
|
2514
|
+
} else if (isStrapiIncluded) {
|
|
2515
|
+
destination = "strapi";
|
|
2516
|
+
} else if (isFirebaseIncluded) {
|
|
2517
|
+
destination = "firebase";
|
|
2518
|
+
}
|
|
2519
|
+
await onConfirmDeleteAll(selectedArray, destination);
|
|
2511
2520
|
clearSelection();
|
|
2512
2521
|
setShowBulkDeleteDialog(false);
|
|
2513
2522
|
};
|
|
@@ -2631,7 +2640,7 @@ const fetchUsers = async (query = {}) => {
|
|
|
2631
2640
|
return users;
|
|
2632
2641
|
};
|
|
2633
2642
|
const createUser = async (userPayload) => {
|
|
2634
|
-
const url =
|
|
2643
|
+
const url = `/${PLUGIN_ID}/users`;
|
|
2635
2644
|
try {
|
|
2636
2645
|
const { post } = getFetchClient();
|
|
2637
2646
|
const { data: user } = await post(url, userPayload);
|
|
@@ -2641,7 +2650,7 @@ const createUser = async (userPayload) => {
|
|
|
2641
2650
|
}
|
|
2642
2651
|
};
|
|
2643
2652
|
const fetchUserByID = async (userID) => {
|
|
2644
|
-
const url =
|
|
2653
|
+
const url = `/${PLUGIN_ID}/users/${userID}`;
|
|
2645
2654
|
try {
|
|
2646
2655
|
const { get: get2 } = getFetchClient();
|
|
2647
2656
|
const { data: user } = await get2(url);
|
|
@@ -2651,7 +2660,7 @@ const fetchUserByID = async (userID) => {
|
|
|
2651
2660
|
}
|
|
2652
2661
|
};
|
|
2653
2662
|
const deleteUser = async (idToDelete, destination) => {
|
|
2654
|
-
const url =
|
|
2663
|
+
const url = `/${PLUGIN_ID}/users/${idToDelete}${destination ? `?destination=${destination}` : ""}`;
|
|
2655
2664
|
try {
|
|
2656
2665
|
const { del } = getFetchClient();
|
|
2657
2666
|
const { data: users } = await del(url);
|
|
@@ -2661,19 +2670,19 @@ const deleteUser = async (idToDelete, destination) => {
|
|
|
2661
2670
|
}
|
|
2662
2671
|
};
|
|
2663
2672
|
const updateUser = async (idToUpdate, payload) => {
|
|
2664
|
-
const url =
|
|
2673
|
+
const url = `/${PLUGIN_ID}/users/${idToUpdate}`;
|
|
2665
2674
|
const { put } = getFetchClient();
|
|
2666
2675
|
const { data: user } = await put(url, payload);
|
|
2667
2676
|
return user;
|
|
2668
2677
|
};
|
|
2669
2678
|
const resetUserPassword = async (idToUpdate, payload) => {
|
|
2670
|
-
const url =
|
|
2679
|
+
const url = `/${PLUGIN_ID}/users/resetPassword/${idToUpdate}`;
|
|
2671
2680
|
const { put } = getFetchClient();
|
|
2672
2681
|
const { data: user } = await put(url, payload);
|
|
2673
2682
|
return user;
|
|
2674
2683
|
};
|
|
2675
2684
|
const sendResetEmail = async (userId) => {
|
|
2676
|
-
const url =
|
|
2685
|
+
const url = `/${PLUGIN_ID}/users/sendResetEmail/${userId}`;
|
|
2677
2686
|
const { put } = getFetchClient();
|
|
2678
2687
|
const { data: result } = await put(url, {});
|
|
2679
2688
|
return result;
|
|
@@ -2966,7 +2975,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
|
|
|
2966
2975
|
var ys = arrObjKeys(obj, inspect2);
|
|
2967
2976
|
var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
|
|
2968
2977
|
var protoTag = obj instanceof Object ? "" : "null prototype";
|
|
2969
|
-
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr
|
|
2978
|
+
var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
|
|
2970
2979
|
var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
|
|
2971
2980
|
var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat$1.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
|
|
2972
2981
|
if (ys.length === 0) {
|
|
@@ -2991,25 +3000,25 @@ function canTrustToString(obj) {
|
|
|
2991
3000
|
return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
|
|
2992
3001
|
}
|
|
2993
3002
|
function isArray$3(obj) {
|
|
2994
|
-
return toStr
|
|
3003
|
+
return toStr(obj) === "[object Array]" && canTrustToString(obj);
|
|
2995
3004
|
}
|
|
2996
3005
|
function isDate(obj) {
|
|
2997
|
-
return toStr
|
|
3006
|
+
return toStr(obj) === "[object Date]" && canTrustToString(obj);
|
|
2998
3007
|
}
|
|
2999
3008
|
function isRegExp$1(obj) {
|
|
3000
|
-
return toStr
|
|
3009
|
+
return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
|
|
3001
3010
|
}
|
|
3002
3011
|
function isError(obj) {
|
|
3003
|
-
return toStr
|
|
3012
|
+
return toStr(obj) === "[object Error]" && canTrustToString(obj);
|
|
3004
3013
|
}
|
|
3005
3014
|
function isString(obj) {
|
|
3006
|
-
return toStr
|
|
3015
|
+
return toStr(obj) === "[object String]" && canTrustToString(obj);
|
|
3007
3016
|
}
|
|
3008
3017
|
function isNumber(obj) {
|
|
3009
|
-
return toStr
|
|
3018
|
+
return toStr(obj) === "[object Number]" && canTrustToString(obj);
|
|
3010
3019
|
}
|
|
3011
3020
|
function isBoolean(obj) {
|
|
3012
|
-
return toStr
|
|
3021
|
+
return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
|
|
3013
3022
|
}
|
|
3014
3023
|
function isSymbol(obj) {
|
|
3015
3024
|
if (hasShammedSymbols) {
|
|
@@ -3045,7 +3054,7 @@ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
|
|
|
3045
3054
|
function has$3(obj, key) {
|
|
3046
3055
|
return hasOwn$1.call(obj, key);
|
|
3047
3056
|
}
|
|
3048
|
-
function toStr
|
|
3057
|
+
function toStr(obj) {
|
|
3049
3058
|
return objectToString.call(obj);
|
|
3050
3059
|
}
|
|
3051
3060
|
function nameOf(f) {
|
|
@@ -3354,7 +3363,7 @@ var syntax = SyntaxError;
|
|
|
3354
3363
|
var uri = URIError;
|
|
3355
3364
|
var abs$1 = Math.abs;
|
|
3356
3365
|
var floor$1 = Math.floor;
|
|
3357
|
-
var max$
|
|
3366
|
+
var max$1 = Math.max;
|
|
3358
3367
|
var min$1 = Math.min;
|
|
3359
3368
|
var pow$1 = Math.pow;
|
|
3360
3369
|
var round$1 = Math.round;
|
|
@@ -3483,78 +3492,99 @@ function requireObject_getPrototypeOf() {
|
|
|
3483
3492
|
Object_getPrototypeOf = $Object2.getPrototypeOf || null;
|
|
3484
3493
|
return Object_getPrototypeOf;
|
|
3485
3494
|
}
|
|
3486
|
-
var
|
|
3487
|
-
var
|
|
3488
|
-
|
|
3489
|
-
|
|
3490
|
-
|
|
3491
|
-
var
|
|
3492
|
-
|
|
3493
|
-
|
|
3494
|
-
|
|
3495
|
-
|
|
3496
|
-
arr
|
|
3497
|
-
|
|
3498
|
-
|
|
3499
|
-
}
|
|
3500
|
-
var
|
|
3501
|
-
|
|
3502
|
-
|
|
3503
|
-
arr
|
|
3504
|
-
}
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
var
|
|
3508
|
-
|
|
3509
|
-
for (var i2 = 0; i2 < arr.length; i2 += 1) {
|
|
3510
|
-
str += arr[i2];
|
|
3511
|
-
if (i2 + 1 < arr.length) {
|
|
3512
|
-
str += joiner;
|
|
3495
|
+
var implementation;
|
|
3496
|
+
var hasRequiredImplementation;
|
|
3497
|
+
function requireImplementation() {
|
|
3498
|
+
if (hasRequiredImplementation) return implementation;
|
|
3499
|
+
hasRequiredImplementation = 1;
|
|
3500
|
+
var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
|
|
3501
|
+
var toStr2 = Object.prototype.toString;
|
|
3502
|
+
var max2 = Math.max;
|
|
3503
|
+
var funcType = "[object Function]";
|
|
3504
|
+
var concatty = function concatty2(a3, b2) {
|
|
3505
|
+
var arr = [];
|
|
3506
|
+
for (var i2 = 0; i2 < a3.length; i2 += 1) {
|
|
3507
|
+
arr[i2] = a3[i2];
|
|
3508
|
+
}
|
|
3509
|
+
for (var j = 0; j < b2.length; j += 1) {
|
|
3510
|
+
arr[j + a3.length] = b2[j];
|
|
3511
|
+
}
|
|
3512
|
+
return arr;
|
|
3513
|
+
};
|
|
3514
|
+
var slicy = function slicy2(arrLike, offset) {
|
|
3515
|
+
var arr = [];
|
|
3516
|
+
for (var i2 = offset, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
|
|
3517
|
+
arr[j] = arrLike[i2];
|
|
3513
3518
|
}
|
|
3514
|
-
|
|
3515
|
-
|
|
3516
|
-
|
|
3517
|
-
var
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
|
|
3522
|
-
var args = slicy(arguments, 1);
|
|
3523
|
-
var bound;
|
|
3524
|
-
var binder = function() {
|
|
3525
|
-
if (this instanceof bound) {
|
|
3526
|
-
var result = target.apply(
|
|
3527
|
-
this,
|
|
3528
|
-
concatty(args, arguments)
|
|
3529
|
-
);
|
|
3530
|
-
if (Object(result) === result) {
|
|
3531
|
-
return result;
|
|
3519
|
+
return arr;
|
|
3520
|
+
};
|
|
3521
|
+
var joiny = function(arr, joiner) {
|
|
3522
|
+
var str = "";
|
|
3523
|
+
for (var i2 = 0; i2 < arr.length; i2 += 1) {
|
|
3524
|
+
str += arr[i2];
|
|
3525
|
+
if (i2 + 1 < arr.length) {
|
|
3526
|
+
str += joiner;
|
|
3532
3527
|
}
|
|
3533
|
-
return this;
|
|
3534
3528
|
}
|
|
3535
|
-
return
|
|
3536
|
-
that,
|
|
3537
|
-
concatty(args, arguments)
|
|
3538
|
-
);
|
|
3529
|
+
return str;
|
|
3539
3530
|
};
|
|
3540
|
-
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3545
|
-
|
|
3546
|
-
|
|
3547
|
-
var
|
|
3531
|
+
implementation = function bind2(that) {
|
|
3532
|
+
var target = this;
|
|
3533
|
+
if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
|
|
3534
|
+
throw new TypeError(ERROR_MESSAGE + target);
|
|
3535
|
+
}
|
|
3536
|
+
var args = slicy(arguments, 1);
|
|
3537
|
+
var bound;
|
|
3538
|
+
var binder = function() {
|
|
3539
|
+
if (this instanceof bound) {
|
|
3540
|
+
var result = target.apply(
|
|
3541
|
+
this,
|
|
3542
|
+
concatty(args, arguments)
|
|
3543
|
+
);
|
|
3544
|
+
if (Object(result) === result) {
|
|
3545
|
+
return result;
|
|
3546
|
+
}
|
|
3547
|
+
return this;
|
|
3548
|
+
}
|
|
3549
|
+
return target.apply(
|
|
3550
|
+
that,
|
|
3551
|
+
concatty(args, arguments)
|
|
3552
|
+
);
|
|
3548
3553
|
};
|
|
3549
|
-
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
};
|
|
3555
|
-
|
|
3556
|
-
var
|
|
3557
|
-
|
|
3554
|
+
var boundLength = max2(0, target.length - args.length);
|
|
3555
|
+
var boundArgs = [];
|
|
3556
|
+
for (var i2 = 0; i2 < boundLength; i2++) {
|
|
3557
|
+
boundArgs[i2] = "$" + i2;
|
|
3558
|
+
}
|
|
3559
|
+
bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
|
|
3560
|
+
if (target.prototype) {
|
|
3561
|
+
var Empty = function Empty2() {
|
|
3562
|
+
};
|
|
3563
|
+
Empty.prototype = target.prototype;
|
|
3564
|
+
bound.prototype = new Empty();
|
|
3565
|
+
Empty.prototype = null;
|
|
3566
|
+
}
|
|
3567
|
+
return bound;
|
|
3568
|
+
};
|
|
3569
|
+
return implementation;
|
|
3570
|
+
}
|
|
3571
|
+
var functionBind;
|
|
3572
|
+
var hasRequiredFunctionBind;
|
|
3573
|
+
function requireFunctionBind() {
|
|
3574
|
+
if (hasRequiredFunctionBind) return functionBind;
|
|
3575
|
+
hasRequiredFunctionBind = 1;
|
|
3576
|
+
var implementation2 = requireImplementation();
|
|
3577
|
+
functionBind = Function.prototype.bind || implementation2;
|
|
3578
|
+
return functionBind;
|
|
3579
|
+
}
|
|
3580
|
+
var functionCall;
|
|
3581
|
+
var hasRequiredFunctionCall;
|
|
3582
|
+
function requireFunctionCall() {
|
|
3583
|
+
if (hasRequiredFunctionCall) return functionCall;
|
|
3584
|
+
hasRequiredFunctionCall = 1;
|
|
3585
|
+
functionCall = Function.prototype.call;
|
|
3586
|
+
return functionCall;
|
|
3587
|
+
}
|
|
3558
3588
|
var functionApply;
|
|
3559
3589
|
var hasRequiredFunctionApply;
|
|
3560
3590
|
function requireFunctionApply() {
|
|
@@ -3564,14 +3594,14 @@ function requireFunctionApply() {
|
|
|
3564
3594
|
return functionApply;
|
|
3565
3595
|
}
|
|
3566
3596
|
var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
|
|
3567
|
-
var bind$2 =
|
|
3597
|
+
var bind$2 = requireFunctionBind();
|
|
3568
3598
|
var $apply$1 = requireFunctionApply();
|
|
3569
|
-
var $call$2 =
|
|
3599
|
+
var $call$2 = requireFunctionCall();
|
|
3570
3600
|
var $reflectApply = reflectApply;
|
|
3571
3601
|
var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
|
|
3572
|
-
var bind$1 =
|
|
3602
|
+
var bind$1 = requireFunctionBind();
|
|
3573
3603
|
var $TypeError$4 = type;
|
|
3574
|
-
var $call$1 =
|
|
3604
|
+
var $call$1 = requireFunctionCall();
|
|
3575
3605
|
var $actualApply = actualApply;
|
|
3576
3606
|
var callBindApplyHelpers = function callBindBasic(args) {
|
|
3577
3607
|
if (args.length < 1 || typeof args[0] !== "function") {
|
|
@@ -3637,8 +3667,8 @@ function requireHasown() {
|
|
|
3637
3667
|
hasRequiredHasown = 1;
|
|
3638
3668
|
var call = Function.prototype.call;
|
|
3639
3669
|
var $hasOwn = Object.prototype.hasOwnProperty;
|
|
3640
|
-
var
|
|
3641
|
-
hasown =
|
|
3670
|
+
var bind2 = requireFunctionBind();
|
|
3671
|
+
hasown = bind2.call(call, $hasOwn);
|
|
3642
3672
|
return hasown;
|
|
3643
3673
|
}
|
|
3644
3674
|
var undefined$1;
|
|
@@ -3652,7 +3682,7 @@ var $TypeError$3 = type;
|
|
|
3652
3682
|
var $URIError = uri;
|
|
3653
3683
|
var abs = abs$1;
|
|
3654
3684
|
var floor = floor$1;
|
|
3655
|
-
var max = max$
|
|
3685
|
+
var max = max$1;
|
|
3656
3686
|
var min = min$1;
|
|
3657
3687
|
var pow = pow$1;
|
|
3658
3688
|
var round = round$1;
|
|
@@ -3686,7 +3716,7 @@ var getProto = requireGetProto();
|
|
|
3686
3716
|
var $ObjectGPO = requireObject_getPrototypeOf();
|
|
3687
3717
|
var $ReflectGPO = requireReflect_getPrototypeOf();
|
|
3688
3718
|
var $apply = requireFunctionApply();
|
|
3689
|
-
var $call =
|
|
3719
|
+
var $call = requireFunctionCall();
|
|
3690
3720
|
var needsEval = {};
|
|
3691
3721
|
var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
|
|
3692
3722
|
var INTRINSICS = {
|
|
@@ -3857,13 +3887,13 @@ var LEGACY_ALIASES = {
|
|
|
3857
3887
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
3858
3888
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
3859
3889
|
};
|
|
3860
|
-
var
|
|
3890
|
+
var bind = requireFunctionBind();
|
|
3861
3891
|
var hasOwn = requireHasown();
|
|
3862
|
-
var $concat =
|
|
3863
|
-
var $spliceApply =
|
|
3864
|
-
var $replace =
|
|
3865
|
-
var $strSlice =
|
|
3866
|
-
var $exec =
|
|
3892
|
+
var $concat = bind.call($call, Array.prototype.concat);
|
|
3893
|
+
var $spliceApply = bind.call($apply, Array.prototype.splice);
|
|
3894
|
+
var $replace = bind.call($call, String.prototype.replace);
|
|
3895
|
+
var $strSlice = bind.call($call, String.prototype.slice);
|
|
3896
|
+
var $exec = bind.call($call, RegExp.prototype.exec);
|
|
3867
3897
|
var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
|
|
3868
3898
|
var reEscapeChar = /\\(\\)?/g;
|
|
3869
3899
|
var stringToPath = function stringToPath2(string) {
|
|
@@ -5135,8 +5165,8 @@ function ListView({ data, meta }) {
|
|
|
5135
5165
|
}
|
|
5136
5166
|
}, [fetchPaginatedUsers, toggleNotification, formatMessage]);
|
|
5137
5167
|
const handleDeleteAll = useCallback(
|
|
5138
|
-
async (idsToDelete) => {
|
|
5139
|
-
await Promise.all(idsToDelete.map((id) => deleteUser(id,
|
|
5168
|
+
async (idsToDelete, destination = null) => {
|
|
5169
|
+
await Promise.all(idsToDelete.map((id) => deleteUser(id, destination)));
|
|
5140
5170
|
await fetchData();
|
|
5141
5171
|
},
|
|
5142
5172
|
[fetchData]
|
|
@@ -7,13 +7,13 @@ const reactTooltip = require("@radix-ui/react-tooltip");
|
|
|
7
7
|
const React = require("react");
|
|
8
8
|
const designSystem = require("@strapi/design-system");
|
|
9
9
|
const reactIntl = require("react-intl");
|
|
10
|
-
const index = require("./index-
|
|
10
|
+
const index = require("./index-DlPxMuSK.js");
|
|
11
11
|
const icons = require("@strapi/icons");
|
|
12
12
|
const styled = require("styled-components");
|
|
13
13
|
const rx = require("react-icons/rx");
|
|
14
14
|
const ai = require("react-icons/ai");
|
|
15
15
|
const md = require("react-icons/md");
|
|
16
|
-
const api = require("./api-
|
|
16
|
+
const api = require("./api-DQCdqlCd.js");
|
|
17
17
|
const PhoneInputModule = require("react-phone-input-2");
|
|
18
18
|
require("react-phone-input-2/lib/style.css");
|
|
19
19
|
const validator = require("validator");
|
|
@@ -2405,31 +2405,32 @@ const DeleteAccount = ({
|
|
|
2405
2405
|
/* @__PURE__ */ jsxRuntime.jsx(icons.WarningCircle, { fill: "danger700", width: "20px", height: "20px" }),
|
|
2406
2406
|
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { textColor: "danger700", children: "After you delete an account, it's permanently deleted. Accounts cannot be undeleted." })
|
|
2407
2407
|
] }),
|
|
2408
|
-
isSingleRecord
|
|
2409
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2410
|
-
|
|
2411
|
-
|
|
2412
|
-
|
|
2413
|
-
/* @__PURE__ */ jsxRuntime.
|
|
2414
|
-
|
|
2415
|
-
|
|
2416
|
-
|
|
2417
|
-
|
|
2418
|
-
|
|
2419
|
-
|
|
2420
|
-
|
|
2421
|
-
|
|
2422
|
-
|
|
2423
|
-
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2427
|
-
|
|
2428
|
-
|
|
2429
|
-
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2408
|
+
isSingleRecord ? /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 1, children: [
|
|
2409
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: "User account" }),
|
|
2410
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: email })
|
|
2411
|
+
] }) : /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 1, children: [
|
|
2412
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { variant: "sigma", children: "Bulk delete operation" }),
|
|
2413
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: "You are about to delete multiple user accounts" })
|
|
2414
|
+
] }),
|
|
2415
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
|
|
2416
|
+
/* @__PURE__ */ jsxRuntime.jsx(designSystem.Typography, { children: "Delete user from:" }),
|
|
2417
|
+
/* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "row", alignItems: "center", gap: 4, children: [
|
|
2418
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2419
|
+
designSystem.Checkbox,
|
|
2420
|
+
{
|
|
2421
|
+
onCheckedChange: (checked) => setIsStrapiIncluded(checked === true),
|
|
2422
|
+
checked: isStrapiIncluded,
|
|
2423
|
+
children: "Strapi"
|
|
2424
|
+
}
|
|
2425
|
+
),
|
|
2426
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2427
|
+
designSystem.Checkbox,
|
|
2428
|
+
{
|
|
2429
|
+
onCheckedChange: (checked) => setIsFirebaseIncluded(checked === true),
|
|
2430
|
+
checked: isFirebaseIncluded,
|
|
2431
|
+
children: "Firebase"
|
|
2432
|
+
}
|
|
2433
|
+
)
|
|
2433
2434
|
] })
|
|
2434
2435
|
] })
|
|
2435
2436
|
] }) }),
|
|
@@ -2531,7 +2532,15 @@ const FirebaseTable = ({
|
|
|
2531
2532
|
const sort = query?.sort ?? "";
|
|
2532
2533
|
const [sortBy, sortOrder] = sort.split(":");
|
|
2533
2534
|
const handleBulkDelete = async (isStrapiIncluded, isFirebaseIncluded) => {
|
|
2534
|
-
|
|
2535
|
+
let destination = null;
|
|
2536
|
+
if (isStrapiIncluded && isFirebaseIncluded) {
|
|
2537
|
+
destination = null;
|
|
2538
|
+
} else if (isStrapiIncluded) {
|
|
2539
|
+
destination = "strapi";
|
|
2540
|
+
} else if (isFirebaseIncluded) {
|
|
2541
|
+
destination = "firebase";
|
|
2542
|
+
}
|
|
2543
|
+
await onConfirmDeleteAll(selectedArray, destination);
|
|
2535
2544
|
clearSelection();
|
|
2536
2545
|
setShowBulkDeleteDialog(false);
|
|
2537
2546
|
};
|
|
@@ -2655,7 +2664,7 @@ const fetchUsers = async (query = {}) => {
|
|
|
2655
2664
|
return users;
|
|
2656
2665
|
};
|
|
2657
2666
|
const createUser = async (userPayload) => {
|
|
2658
|
-
const url =
|
|
2667
|
+
const url = `/${index.PLUGIN_ID}/users`;
|
|
2659
2668
|
try {
|
|
2660
2669
|
const { post } = admin.getFetchClient();
|
|
2661
2670
|
const { data: user } = await post(url, userPayload);
|
|
@@ -2665,7 +2674,7 @@ const createUser = async (userPayload) => {
|
|
|
2665
2674
|
}
|
|
2666
2675
|
};
|
|
2667
2676
|
const fetchUserByID = async (userID) => {
|
|
2668
|
-
const url =
|
|
2677
|
+
const url = `/${index.PLUGIN_ID}/users/${userID}`;
|
|
2669
2678
|
try {
|
|
2670
2679
|
const { get: get2 } = admin.getFetchClient();
|
|
2671
2680
|
const { data: user } = await get2(url);
|
|
@@ -2675,7 +2684,7 @@ const fetchUserByID = async (userID) => {
|
|
|
2675
2684
|
}
|
|
2676
2685
|
};
|
|
2677
2686
|
const deleteUser = async (idToDelete, destination) => {
|
|
2678
|
-
const url =
|
|
2687
|
+
const url = `/${index.PLUGIN_ID}/users/${idToDelete}${destination ? `?destination=${destination}` : ""}`;
|
|
2679
2688
|
try {
|
|
2680
2689
|
const { del } = admin.getFetchClient();
|
|
2681
2690
|
const { data: users } = await del(url);
|
|
@@ -2685,19 +2694,19 @@ const deleteUser = async (idToDelete, destination) => {
|
|
|
2685
2694
|
}
|
|
2686
2695
|
};
|
|
2687
2696
|
const updateUser = async (idToUpdate, payload) => {
|
|
2688
|
-
const url =
|
|
2697
|
+
const url = `/${index.PLUGIN_ID}/users/${idToUpdate}`;
|
|
2689
2698
|
const { put } = admin.getFetchClient();
|
|
2690
2699
|
const { data: user } = await put(url, payload);
|
|
2691
2700
|
return user;
|
|
2692
2701
|
};
|
|
2693
2702
|
const resetUserPassword = async (idToUpdate, payload) => {
|
|
2694
|
-
const url =
|
|
2703
|
+
const url = `/${index.PLUGIN_ID}/users/resetPassword/${idToUpdate}`;
|
|
2695
2704
|
const { put } = admin.getFetchClient();
|
|
2696
2705
|
const { data: user } = await put(url, payload);
|
|
2697
2706
|
return user;
|
|
2698
2707
|
};
|
|
2699
2708
|
const sendResetEmail = async (userId) => {
|
|
2700
|
-
const url =
|
|
2709
|
+
const url = `/${index.PLUGIN_ID}/users/sendResetEmail/${userId}`;
|
|
2701
2710
|
const { put } = admin.getFetchClient();
|
|
2702
2711
|
const { data: result } = await put(url, {});
|
|
2703
2712
|
return result;
|
|
@@ -5159,8 +5168,8 @@ function ListView({ data, meta }) {
|
|
|
5159
5168
|
}
|
|
5160
5169
|
}, [fetchPaginatedUsers, toggleNotification, formatMessage]);
|
|
5161
5170
|
const handleDeleteAll = React.useCallback(
|
|
5162
|
-
async (idsToDelete) => {
|
|
5163
|
-
await Promise.all(idsToDelete.map((id) => deleteUser(id,
|
|
5171
|
+
async (idsToDelete, destination = null) => {
|
|
5172
|
+
await Promise.all(idsToDelete.map((id) => deleteUser(id, destination)));
|
|
5164
5173
|
await fetchData();
|
|
5165
5174
|
},
|
|
5166
5175
|
[fetchData]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
const admin = require("@strapi/strapi/admin");
|
|
3
|
-
const index = require("./index-
|
|
3
|
+
const index = require("./index-DlPxMuSK.js");
|
|
4
4
|
const saveFirebaseConfig = async (json, firebaseWebApiKey, passwordConfig) => {
|
|
5
5
|
const url = `/${index.PLUGIN_ID}/settings/firebase-config`;
|
|
6
6
|
const { post } = admin.getFetchClient();
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getFetchClient } from "@strapi/strapi/admin";
|
|
2
|
-
import { P as PLUGIN_ID } from "./index-
|
|
2
|
+
import { P as PLUGIN_ID } from "./index-DtGfwf9S.mjs";
|
|
3
3
|
const saveFirebaseConfig = async (json, firebaseWebApiKey, passwordConfig) => {
|
|
4
4
|
const url = `/${PLUGIN_ID}/settings/firebase-config`;
|
|
5
5
|
const { post } = getFetchClient();
|
|
@@ -4,7 +4,7 @@ const jsxRuntime = require("react/jsx-runtime");
|
|
|
4
4
|
const React = require("react");
|
|
5
5
|
const designSystem = require("@strapi/design-system");
|
|
6
6
|
const admin = require("@strapi/strapi/admin");
|
|
7
|
-
const api = require("./api-
|
|
7
|
+
const api = require("./api-DQCdqlCd.js");
|
|
8
8
|
const reactRouterDom = require("react-router-dom");
|
|
9
9
|
function SettingsPage() {
|
|
10
10
|
const { toggleNotification } = admin.useNotification();
|
|
@@ -2,7 +2,7 @@ import { jsx, jsxs, Fragment } from "react/jsx-runtime";
|
|
|
2
2
|
import { useState, useEffect } from "react";
|
|
3
3
|
import { Flex, Box, Typography, JSONInput, Button, TextInput, Badge, Textarea, Toggle, NumberInput, Modal } from "@strapi/design-system";
|
|
4
4
|
import { useNotification, Page } from "@strapi/strapi/admin";
|
|
5
|
-
import { g as getFirebaseConfig, s as saveFirebaseConfig, d as delFirebaseConfig, a as savePasswordSettings } from "./api-
|
|
5
|
+
import { g as getFirebaseConfig, s as saveFirebaseConfig, d as delFirebaseConfig, a as savePasswordSettings } from "./api-D_4cdJU5.mjs";
|
|
6
6
|
import { useNavigate } from "react-router-dom";
|
|
7
7
|
function SettingsPage() {
|
|
8
8
|
const { toggleNotification } = useNotification();
|
|
@@ -739,7 +739,7 @@ const index = {
|
|
|
739
739
|
id: `${PLUGIN_ID}.page.title`,
|
|
740
740
|
defaultMessage: PLUGIN_ID
|
|
741
741
|
},
|
|
742
|
-
Component: () => Promise.resolve().then(() => require("./App-
|
|
742
|
+
Component: () => Promise.resolve().then(() => require("./App-BqjE8BHb.js")).then((mod) => ({
|
|
743
743
|
default: mod.App
|
|
744
744
|
})),
|
|
745
745
|
permissions: PERMISSIONS["menu-link"]
|
|
@@ -761,7 +761,7 @@ const index = {
|
|
|
761
761
|
id: "settings",
|
|
762
762
|
to: `/settings/${PLUGIN_ID}`,
|
|
763
763
|
async Component() {
|
|
764
|
-
const component = await Promise.resolve().then(() => require("./index-
|
|
764
|
+
const component = await Promise.resolve().then(() => require("./index-C4t4JZZ_.js"));
|
|
765
765
|
return component.default;
|
|
766
766
|
},
|
|
767
767
|
permissions: PERMISSIONS["menu-link"]
|