strapi-plugin-firebase-authentication 1.1.9 → 1.1.11

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.
@@ -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-4s0RQKAx.mjs";
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-CM79I13t.mjs";
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 && /* @__PURE__ */ jsxs(Fragment, { children: [
2385
- /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 1, children: [
2386
- /* @__PURE__ */ jsx(Typography, { variant: "sigma", children: "User account" }),
2387
- /* @__PURE__ */ jsx(Typography, { children: email })
2388
- ] }),
2389
- /* @__PURE__ */ jsxs(Flex, { direction: "column", alignItems: "stretch", gap: 2, children: [
2390
- /* @__PURE__ */ jsx(Typography, { children: "Delete user from:" }),
2391
- /* @__PURE__ */ jsxs(Flex, { direction: "row", alignItems: "center", gap: 4, children: [
2392
- /* @__PURE__ */ jsx(
2393
- Checkbox,
2394
- {
2395
- onCheckedChange: (checked) => setIsStrapiIncluded(checked === true),
2396
- checked: isStrapiIncluded,
2397
- children: "Strapi"
2398
- }
2399
- ),
2400
- /* @__PURE__ */ jsx(
2401
- Checkbox,
2402
- {
2403
- onCheckedChange: (checked) => setIsFirebaseIncluded(checked === true),
2404
- checked: isFirebaseIncluded,
2405
- children: "Firebase"
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
- await onConfirmDeleteAll(selectedArray);
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 = `${PLUGIN_ID}/users`;
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 = `${PLUGIN_ID}/users/${userID}`;
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 = `${PLUGIN_ID}/users/${idToDelete}${destination ? `?destination=${destination}` : ""}`;
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 = `${PLUGIN_ID}/users/${idToUpdate}`;
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 = `${PLUGIN_ID}/users/resetPassword/${idToUpdate}`;
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 = `${PLUGIN_ID}/users/sendResetEmail/${userId}`;
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$1(obj), 8, -1) : protoTag ? "Object" : "";
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$1(obj) === "[object Array]" && canTrustToString(obj);
3003
+ return toStr(obj) === "[object Array]" && canTrustToString(obj);
2995
3004
  }
2996
3005
  function isDate(obj) {
2997
- return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
3006
+ return toStr(obj) === "[object Date]" && canTrustToString(obj);
2998
3007
  }
2999
3008
  function isRegExp$1(obj) {
3000
- return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
3009
+ return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
3001
3010
  }
3002
3011
  function isError(obj) {
3003
- return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
3012
+ return toStr(obj) === "[object Error]" && canTrustToString(obj);
3004
3013
  }
3005
3014
  function isString(obj) {
3006
- return toStr$1(obj) === "[object String]" && canTrustToString(obj);
3015
+ return toStr(obj) === "[object String]" && canTrustToString(obj);
3007
3016
  }
3008
3017
  function isNumber(obj) {
3009
- return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
3018
+ return toStr(obj) === "[object Number]" && canTrustToString(obj);
3010
3019
  }
3011
3020
  function isBoolean(obj) {
3012
- return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
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$1(obj) {
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$2 = Math.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 ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
3487
- var toStr = Object.prototype.toString;
3488
- var max$1 = Math.max;
3489
- var funcType = "[object Function]";
3490
- var concatty = function concatty2(a3, b2) {
3491
- var arr = [];
3492
- for (var i2 = 0; i2 < a3.length; i2 += 1) {
3493
- arr[i2] = a3[i2];
3494
- }
3495
- for (var j = 0; j < b2.length; j += 1) {
3496
- arr[j + a3.length] = b2[j];
3497
- }
3498
- return arr;
3499
- };
3500
- var slicy = function slicy2(arrLike, offset) {
3501
- var arr = [];
3502
- for (var i2 = offset, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
3503
- arr[j] = arrLike[i2];
3504
- }
3505
- return arr;
3506
- };
3507
- var joiny = function(arr, joiner) {
3508
- var str = "";
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
- return str;
3516
- };
3517
- var implementation$1 = function bind(that) {
3518
- var target = this;
3519
- if (typeof target !== "function" || toStr.apply(target) !== funcType) {
3520
- throw new TypeError(ERROR_MESSAGE + target);
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 target.apply(
3536
- that,
3537
- concatty(args, arguments)
3538
- );
3529
+ return str;
3539
3530
  };
3540
- var boundLength = max$1(0, target.length - args.length);
3541
- var boundArgs = [];
3542
- for (var i2 = 0; i2 < boundLength; i2++) {
3543
- boundArgs[i2] = "$" + i2;
3544
- }
3545
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
3546
- if (target.prototype) {
3547
- var Empty = function Empty2() {
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
- Empty.prototype = target.prototype;
3550
- bound.prototype = new Empty();
3551
- Empty.prototype = null;
3552
- }
3553
- return bound;
3554
- };
3555
- var implementation = implementation$1;
3556
- var functionBind = Function.prototype.bind || implementation;
3557
- var functionCall = Function.prototype.call;
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 = functionBind;
3597
+ var bind$2 = requireFunctionBind();
3568
3598
  var $apply$1 = requireFunctionApply();
3569
- var $call$2 = functionCall;
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 = functionBind;
3602
+ var bind$1 = requireFunctionBind();
3573
3603
  var $TypeError$4 = type;
3574
- var $call$1 = functionCall;
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 bind3 = functionBind;
3641
- hasown = bind3.call(call, $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$2;
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 = functionCall;
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 bind2 = functionBind;
3890
+ var bind = requireFunctionBind();
3861
3891
  var hasOwn = requireHasown();
3862
- var $concat = bind2.call($call, Array.prototype.concat);
3863
- var $spliceApply = bind2.call($apply, Array.prototype.splice);
3864
- var $replace = bind2.call($call, String.prototype.replace);
3865
- var $strSlice = bind2.call($call, String.prototype.slice);
3866
- var $exec = bind2.call($call, RegExp.prototype.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, null)));
5168
+ async (idsToDelete, destination = null) => {
5169
+ await Promise.all(idsToDelete.map((id) => deleteUser(id, destination)));
5140
5170
  await fetchData();
5141
5171
  },
5142
5172
  [fetchData]
@@ -5421,16 +5451,17 @@ const StyledPhoneInputWrapper = styled.div`
5421
5451
 
5422
5452
  /* Flag dropdown button styles */
5423
5453
  .flag-dropdown {
5424
- background: transparent;
5454
+ background: transparent !important;
5425
5455
  border: none;
5426
5456
  border-right: none;
5427
5457
 
5428
5458
  &.open {
5459
+ background: transparent !important;
5429
5460
  z-index: 1001;
5430
5461
  }
5431
5462
 
5432
5463
  .selected-flag {
5433
- padding: 0 0 0 0.75rem;
5464
+ padding: 0 0.5rem 0 1rem;
5434
5465
  height: 40px;
5435
5466
  display: flex;
5436
5467
  align-items: center;
@@ -5444,8 +5475,26 @@ const StyledPhoneInputWrapper = styled.div`
5444
5475
  margin-left: 8px;
5445
5476
  }
5446
5477
 
5447
- &.open .arrow {
5448
- border-top-color: ${({ theme }) => theme.colors.neutral800};
5478
+ /* Fix flag background in all interactive states */
5479
+ &:hover,
5480
+ &:focus,
5481
+ &:active,
5482
+ &.open {
5483
+ background: transparent;
5484
+ background-color: transparent;
5485
+
5486
+ .arrow {
5487
+ border-top-color: ${({ theme }) => theme.colors.neutral800};
5488
+ }
5489
+
5490
+ .flag {
5491
+ background-color: transparent;
5492
+ }
5493
+ }
5494
+
5495
+ /* Fix flag background flash on initial load */
5496
+ .flag {
5497
+ background-color: transparent;
5449
5498
  }
5450
5499
  }
5451
5500
  }
@@ -5899,10 +5948,13 @@ const EditUserForm = ({ data }) => {
5899
5948
  setIsLoading(true);
5900
5949
  try {
5901
5950
  const updatedUser = await updateUser(userData.uid, userData);
5902
- if (updatedUser[0]?.status === "rejected") {
5903
- throw new Error("Error updating user");
5951
+ const result = updatedUser[0];
5952
+ if (result?.status === "rejected") {
5953
+ const errorReason = result.reason;
5954
+ const errorMessage = errorReason?.message || (errorReason?.code ? `Firebase error: ${errorReason.code}` : null) || "Error updating user";
5955
+ throw new Error(errorMessage);
5904
5956
  }
5905
- setUserData(updatedUser[0].value);
5957
+ setUserData(result.value);
5906
5958
  setIsLoading(false);
5907
5959
  toggleNotification({
5908
5960
  type: "success",
@@ -5910,9 +5962,10 @@ const EditUserForm = ({ data }) => {
5910
5962
  });
5911
5963
  } catch (error) {
5912
5964
  console.error("Error updating user:", error);
5965
+ const errorMessage = error instanceof Error ? error.message : "An error occurred while updating the user";
5913
5966
  toggleNotification({
5914
5967
  type: "danger",
5915
- message: "An error occurred while updating the user"
5968
+ message: errorMessage
5916
5969
  });
5917
5970
  setIsLoading(false);
5918
5971
  setUserData(data);