strapi-plugin-firebase-authentication 1.1.0 → 1.1.7

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/README.md CHANGED
@@ -42,7 +42,7 @@ A production-ready Strapi v5 plugin that seamlessly integrates Firebase Authenti
42
42
  - `POST /api/firebase-authentication` - Exchange Firebase token for Strapi JWT
43
43
  - `POST /api/firebase-authentication/emailLogin` - Direct email/password login
44
44
  - `POST /api/firebase-authentication/forgotPassword` - Request password reset
45
- - `POST /api/firebase-authentication/resetPassword` - Reset with JWT token
45
+ - `POST /api/firebase-authentication/resetPassword` - Authenticated password change (requires JWT)
46
46
  - `POST /api/firebase-authentication/requestMagicLink` - Passwordless login
47
47
  - `GET /api/firebase-authentication/config` - Get public configuration
48
48
 
@@ -284,32 +284,66 @@ module.exports = () => ({
284
284
 
285
285
  ### Public Endpoints
286
286
 
287
- | Method | Endpoint | Purpose |
288
- | ------ | ----------------------------------------------- | -------------------------------------- |
289
- | POST | `/api/firebase-authentication` | Exchange Firebase token for Strapi JWT |
290
- | POST | `/api/firebase-authentication/emailLogin` | Email/password login (no SDK required) |
291
- | POST | `/api/firebase-authentication/forgotPassword` | Request password reset email |
292
- | POST | `/api/firebase-authentication/resetPassword` | Reset password with JWT token |
293
- | POST | `/api/firebase-authentication/requestMagicLink` | Request passwordless login email |
294
- | GET | `/api/firebase-authentication/config` | Get public configuration |
287
+ | Method | Endpoint | Purpose |
288
+ | ------ | ----------------------------------------------- | -------------------------------------------- |
289
+ | POST | `/api/firebase-authentication` | Exchange Firebase token for Strapi JWT |
290
+ | POST | `/api/firebase-authentication/emailLogin` | Email/password login (no SDK required) |
291
+ | POST | `/api/firebase-authentication/forgotPassword` | Request password reset email |
292
+ | POST | `/api/firebase-authentication/resetPassword` | Authenticated password change (requires JWT) |
293
+ | POST | `/api/firebase-authentication/requestMagicLink` | Request passwordless login email |
294
+ | GET | `/api/firebase-authentication/config` | Get public configuration |
295
+
296
+ ### Password Reset Flow
297
+
298
+ There are two distinct password reset approaches in this plugin:
299
+
300
+ #### 1. Forgot Password Flow (Email-Based)
301
+
302
+ **For users who forgot their password:**
303
+
304
+ 1. User requests reset: `POST /api/firebase-authentication/forgotPassword` with `{ "email": "user@example.com" }`
305
+ 2. Firebase sends email with link to Firebase's hosted password reset page
306
+ 3. User clicks link → Opens Firebase's secure hosted UI
307
+ 4. User enters new password on Firebase's page
308
+ 5. After success → Redirects to configured continue URL
309
+ 6. User logs in normally with new password
310
+
311
+ **Configuration:** Set `passwordResetUrl` in Firebase Authentication settings (this is where users land AFTER resetting their password on Firebase's page).
312
+
313
+ #### 2. Authenticated Password Change
314
+
315
+ **For admin-initiated resets or users changing their own password:**
316
+
317
+ - **Endpoint:** `POST /api/firebase-authentication/resetPassword`
318
+ - **Requires:** Valid JWT in `Authorization` header + `{ "password": "newpassword" }` in body
319
+ - **Use cases:**
320
+ - Admin resetting a user's password via admin panel
321
+ - Authenticated user changing their own password
322
+ - **Returns:** Updated user object + fresh JWT for auto-login
323
+
324
+ **Note:** This endpoint is NOT part of the forgot password email flow. Use `forgotPassword` for email-based password reset.
295
325
 
296
326
  ### Admin Endpoints
297
327
 
328
+ Admin endpoints use the admin API type (no `/api` prefix) and require admin authentication.
329
+
298
330
  **User Management:**
299
331
  | Method | Endpoint | Purpose |
300
332
  |--------|----------|---------|
301
- | GET | `/api/firebase-authentication/content-internal-api/users` | List/search users |
302
- | POST | `/api/firebase-authentication/content-internal-api/users` | Create user |
303
- | GET | `/api/firebase-authentication/content-internal-api/users/:id` | Get user |
304
- | PUT | `/api/firebase-authentication/content-internal-api/users/:id` | Update user |
305
- | DELETE | `/api/firebase-authentication/content-internal-api/users/:id` | Delete user |
306
- | PUT | `/api/firebase-authentication/content-internal-api/users/resetPassword/:id` | Reset password |
333
+ | GET | `/firebase-authentication/users` | List/search users |
334
+ | POST | `/firebase-authentication/users` | Create user |
335
+ | GET | `/firebase-authentication/users/:id` | Get user |
336
+ | PUT | `/firebase-authentication/users/:id` | Update user |
337
+ | DELETE | `/firebase-authentication/users/:id` | Delete user |
338
+ | PUT | `/firebase-authentication/users/resetPassword/:id` | Reset password |
307
339
 
308
340
  **Settings Management:**
309
341
  | Method | Endpoint | Purpose |
310
342
  |--------|----------|---------|
311
- | GET/POST/DELETE | `/api/firebase-authentication/settings/firebase-config` | Manage Firebase config |
312
- | POST | `/api/firebase-authentication/settings/password-config` | Update password/magic link settings |
343
+ | GET | `/firebase-authentication/settings/firebase-config` | Get Firebase config |
344
+ | POST | `/firebase-authentication/settings/firebase-config` | Upload Firebase config |
345
+ | DELETE | `/firebase-authentication/settings/firebase-config` | Delete Firebase config |
346
+ | POST | `/firebase-authentication/settings/password-config` | Update password/magic link settings |
313
347
 
314
348
  ---
315
349
 
@@ -5,14 +5,14 @@ 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-4hUrKd7Y.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-FAW4iPgh.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-B01IAVEC.mjs";
15
- import PhoneInput from "react-phone-input-2";
14
+ import { g as getFirebaseConfig$1 } from "./api-DrAXGM3H.mjs";
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";
18
18
  function arrayPush$1(array, values) {
@@ -2522,11 +2522,11 @@ const FirebaseTable = ({
2522
2522
  });
2523
2523
  };
2524
2524
  return /* @__PURE__ */ jsxs(Fragment, { children: [
2525
- /* @__PURE__ */ jsx(BulkActionsBar, { paddingLeft: 0, paddingRight: 0, children: /* @__PURE__ */ jsxs(Flex, { direction: "row", alignItems: "center", justifyContent: "space-between", children: [
2526
- /* @__PURE__ */ jsxs(Flex, { direction: "row", alignItems: "center", gap: 4, children: [
2525
+ /* @__PURE__ */ jsx(BulkActionsBar, { paddingLeft: 0, paddingRight: 0, children: /* @__PURE__ */ jsxs(Flex, { direction: "row", alignItems: "center", justifyContent: "space-between", wrap: "nowrap", children: [
2526
+ /* @__PURE__ */ jsxs(Flex, { direction: "row", alignItems: "center", gap: 2, wrap: "nowrap", children: [
2527
2527
  action,
2528
2528
  hasSelection && /* @__PURE__ */ jsxs(Fragment, { children: [
2529
- /* @__PURE__ */ jsxs(Typography, { variant: "omega", fontWeight: "semiBold", children: [
2529
+ /* @__PURE__ */ jsxs(Typography, { variant: "omega", fontWeight: "semiBold", style: { whiteSpace: "nowrap" }, children: [
2530
2530
  selectedCount,
2531
2531
  " ",
2532
2532
  selectedCount === 1 ? "entry" : "entries",
@@ -2539,10 +2539,20 @@ const FirebaseTable = ({
2539
2539
  startIcon: /* @__PURE__ */ jsx(Trash, {}),
2540
2540
  onClick: () => setShowBulkDeleteDialog(true),
2541
2541
  size: "S",
2542
+ style: { whiteSpace: "nowrap" },
2542
2543
  children: "Delete"
2543
2544
  }
2544
2545
  ),
2545
- /* @__PURE__ */ jsx(Button, { variant: "secondary", onClick: clearSelection, size: "S", children: "Deselect all" })
2546
+ /* @__PURE__ */ jsx(
2547
+ Button,
2548
+ {
2549
+ variant: "secondary",
2550
+ onClick: clearSelection,
2551
+ size: "S",
2552
+ style: { whiteSpace: "nowrap" },
2553
+ children: "Deselect all"
2554
+ }
2555
+ )
2546
2556
  ] })
2547
2557
  ] }),
2548
2558
  createAction
@@ -2669,7 +2679,7 @@ const sendResetEmail = async (userId) => {
2669
2679
  return result;
2670
2680
  };
2671
2681
  const getFirebaseConfig = async () => {
2672
- const url = `/${PLUGIN_ID}/config`;
2682
+ const url = `/api/${PLUGIN_ID}/config`;
2673
2683
  try {
2674
2684
  const { get: get2 } = getFetchClient();
2675
2685
  const { data: config } = await get2(url, {
@@ -2956,7 +2966,7 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
2956
2966
  var ys = arrObjKeys(obj, inspect2);
2957
2967
  var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
2958
2968
  var protoTag = obj instanceof Object ? "" : "null prototype";
2959
- var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? "Object" : "";
2969
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr$1(obj), 8, -1) : protoTag ? "Object" : "";
2960
2970
  var constructorTag = isPlainObject || typeof obj.constructor !== "function" ? "" : obj.constructor.name ? obj.constructor.name + " " : "";
2961
2971
  var tag = constructorTag + (stringTag || protoTag ? "[" + $join.call($concat$1.call([], stringTag || [], protoTag || []), ": ") + "] " : "");
2962
2972
  if (ys.length === 0) {
@@ -2981,25 +2991,25 @@ function canTrustToString(obj) {
2981
2991
  return !toStringTag || !(typeof obj === "object" && (toStringTag in obj || typeof obj[toStringTag] !== "undefined"));
2982
2992
  }
2983
2993
  function isArray$3(obj) {
2984
- return toStr(obj) === "[object Array]" && canTrustToString(obj);
2994
+ return toStr$1(obj) === "[object Array]" && canTrustToString(obj);
2985
2995
  }
2986
2996
  function isDate(obj) {
2987
- return toStr(obj) === "[object Date]" && canTrustToString(obj);
2997
+ return toStr$1(obj) === "[object Date]" && canTrustToString(obj);
2988
2998
  }
2989
2999
  function isRegExp$1(obj) {
2990
- return toStr(obj) === "[object RegExp]" && canTrustToString(obj);
3000
+ return toStr$1(obj) === "[object RegExp]" && canTrustToString(obj);
2991
3001
  }
2992
3002
  function isError(obj) {
2993
- return toStr(obj) === "[object Error]" && canTrustToString(obj);
3003
+ return toStr$1(obj) === "[object Error]" && canTrustToString(obj);
2994
3004
  }
2995
3005
  function isString(obj) {
2996
- return toStr(obj) === "[object String]" && canTrustToString(obj);
3006
+ return toStr$1(obj) === "[object String]" && canTrustToString(obj);
2997
3007
  }
2998
3008
  function isNumber(obj) {
2999
- return toStr(obj) === "[object Number]" && canTrustToString(obj);
3009
+ return toStr$1(obj) === "[object Number]" && canTrustToString(obj);
3000
3010
  }
3001
3011
  function isBoolean(obj) {
3002
- return toStr(obj) === "[object Boolean]" && canTrustToString(obj);
3012
+ return toStr$1(obj) === "[object Boolean]" && canTrustToString(obj);
3003
3013
  }
3004
3014
  function isSymbol(obj) {
3005
3015
  if (hasShammedSymbols) {
@@ -3035,7 +3045,7 @@ var hasOwn$1 = Object.prototype.hasOwnProperty || function(key) {
3035
3045
  function has$3(obj, key) {
3036
3046
  return hasOwn$1.call(obj, key);
3037
3047
  }
3038
- function toStr(obj) {
3048
+ function toStr$1(obj) {
3039
3049
  return objectToString.call(obj);
3040
3050
  }
3041
3051
  function nameOf(f) {
@@ -3344,7 +3354,7 @@ var syntax = SyntaxError;
3344
3354
  var uri = URIError;
3345
3355
  var abs$1 = Math.abs;
3346
3356
  var floor$1 = Math.floor;
3347
- var max$1 = Math.max;
3357
+ var max$2 = Math.max;
3348
3358
  var min$1 = Math.min;
3349
3359
  var pow$1 = Math.pow;
3350
3360
  var round$1 = Math.round;
@@ -3473,99 +3483,78 @@ function requireObject_getPrototypeOf() {
3473
3483
  Object_getPrototypeOf = $Object2.getPrototypeOf || null;
3474
3484
  return Object_getPrototypeOf;
3475
3485
  }
3476
- var implementation;
3477
- var hasRequiredImplementation;
3478
- function requireImplementation() {
3479
- if (hasRequiredImplementation) return implementation;
3480
- hasRequiredImplementation = 1;
3481
- var ERROR_MESSAGE = "Function.prototype.bind called on incompatible ";
3482
- var toStr2 = Object.prototype.toString;
3483
- var max2 = Math.max;
3484
- var funcType = "[object Function]";
3485
- var concatty = function concatty2(a3, b2) {
3486
- var arr = [];
3487
- for (var i2 = 0; i2 < a3.length; i2 += 1) {
3488
- arr[i2] = a3[i2];
3489
- }
3490
- for (var j = 0; j < b2.length; j += 1) {
3491
- arr[j + a3.length] = b2[j];
3492
- }
3493
- return arr;
3494
- };
3495
- var slicy = function slicy2(arrLike, offset) {
3496
- var arr = [];
3497
- for (var i2 = offset, j = 0; i2 < arrLike.length; i2 += 1, j += 1) {
3498
- arr[j] = arrLike[i2];
3499
- }
3500
- return arr;
3501
- };
3502
- var joiny = function(arr, joiner) {
3503
- var str = "";
3504
- for (var i2 = 0; i2 < arr.length; i2 += 1) {
3505
- str += arr[i2];
3506
- if (i2 + 1 < arr.length) {
3507
- str += joiner;
3508
- }
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;
3509
3513
  }
3510
- return str;
3511
- };
3512
- implementation = function bind2(that) {
3513
- var target = this;
3514
- if (typeof target !== "function" || toStr2.apply(target) !== funcType) {
3515
- throw new TypeError(ERROR_MESSAGE + target);
3516
- }
3517
- var args = slicy(arguments, 1);
3518
- var bound;
3519
- var binder = function() {
3520
- if (this instanceof bound) {
3521
- var result = target.apply(
3522
- this,
3523
- concatty(args, arguments)
3524
- );
3525
- if (Object(result) === result) {
3526
- return result;
3527
- }
3528
- return this;
3529
- }
3530
- return target.apply(
3531
- that,
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,
3532
3528
  concatty(args, arguments)
3533
3529
  );
3534
- };
3535
- var boundLength = max2(0, target.length - args.length);
3536
- var boundArgs = [];
3537
- for (var i2 = 0; i2 < boundLength; i2++) {
3538
- boundArgs[i2] = "$" + i2;
3539
- }
3540
- bound = Function("binder", "return function (" + joiny(boundArgs, ",") + "){ return binder.apply(this,arguments); }")(binder);
3541
- if (target.prototype) {
3542
- var Empty = function Empty2() {
3543
- };
3544
- Empty.prototype = target.prototype;
3545
- bound.prototype = new Empty();
3546
- Empty.prototype = null;
3530
+ if (Object(result) === result) {
3531
+ return result;
3532
+ }
3533
+ return this;
3547
3534
  }
3548
- return bound;
3535
+ return target.apply(
3536
+ that,
3537
+ concatty(args, arguments)
3538
+ );
3549
3539
  };
3550
- return implementation;
3551
- }
3552
- var functionBind;
3553
- var hasRequiredFunctionBind;
3554
- function requireFunctionBind() {
3555
- if (hasRequiredFunctionBind) return functionBind;
3556
- hasRequiredFunctionBind = 1;
3557
- var implementation2 = requireImplementation();
3558
- functionBind = Function.prototype.bind || implementation2;
3559
- return functionBind;
3560
- }
3561
- var functionCall;
3562
- var hasRequiredFunctionCall;
3563
- function requireFunctionCall() {
3564
- if (hasRequiredFunctionCall) return functionCall;
3565
- hasRequiredFunctionCall = 1;
3566
- functionCall = Function.prototype.call;
3567
- return functionCall;
3568
- }
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() {
3548
+ };
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;
3569
3558
  var functionApply;
3570
3559
  var hasRequiredFunctionApply;
3571
3560
  function requireFunctionApply() {
@@ -3575,14 +3564,14 @@ function requireFunctionApply() {
3575
3564
  return functionApply;
3576
3565
  }
3577
3566
  var reflectApply = typeof Reflect !== "undefined" && Reflect && Reflect.apply;
3578
- var bind$2 = requireFunctionBind();
3567
+ var bind$2 = functionBind;
3579
3568
  var $apply$1 = requireFunctionApply();
3580
- var $call$2 = requireFunctionCall();
3569
+ var $call$2 = functionCall;
3581
3570
  var $reflectApply = reflectApply;
3582
3571
  var actualApply = $reflectApply || bind$2.call($call$2, $apply$1);
3583
- var bind$1 = requireFunctionBind();
3572
+ var bind$1 = functionBind;
3584
3573
  var $TypeError$4 = type;
3585
- var $call$1 = requireFunctionCall();
3574
+ var $call$1 = functionCall;
3586
3575
  var $actualApply = actualApply;
3587
3576
  var callBindApplyHelpers = function callBindBasic(args) {
3588
3577
  if (args.length < 1 || typeof args[0] !== "function") {
@@ -3648,8 +3637,8 @@ function requireHasown() {
3648
3637
  hasRequiredHasown = 1;
3649
3638
  var call = Function.prototype.call;
3650
3639
  var $hasOwn = Object.prototype.hasOwnProperty;
3651
- var bind2 = requireFunctionBind();
3652
- hasown = bind2.call(call, $hasOwn);
3640
+ var bind3 = functionBind;
3641
+ hasown = bind3.call(call, $hasOwn);
3653
3642
  return hasown;
3654
3643
  }
3655
3644
  var undefined$1;
@@ -3663,7 +3652,7 @@ var $TypeError$3 = type;
3663
3652
  var $URIError = uri;
3664
3653
  var abs = abs$1;
3665
3654
  var floor = floor$1;
3666
- var max = max$1;
3655
+ var max = max$2;
3667
3656
  var min = min$1;
3668
3657
  var pow = pow$1;
3669
3658
  var round = round$1;
@@ -3697,7 +3686,7 @@ var getProto = requireGetProto();
3697
3686
  var $ObjectGPO = requireObject_getPrototypeOf();
3698
3687
  var $ReflectGPO = requireReflect_getPrototypeOf();
3699
3688
  var $apply = requireFunctionApply();
3700
- var $call = requireFunctionCall();
3689
+ var $call = functionCall;
3701
3690
  var needsEval = {};
3702
3691
  var TypedArray = typeof Uint8Array === "undefined" || !getProto ? undefined$1 : getProto(Uint8Array);
3703
3692
  var INTRINSICS = {
@@ -3868,13 +3857,13 @@ var LEGACY_ALIASES = {
3868
3857
  "%WeakMapPrototype%": ["WeakMap", "prototype"],
3869
3858
  "%WeakSetPrototype%": ["WeakSet", "prototype"]
3870
3859
  };
3871
- var bind = requireFunctionBind();
3860
+ var bind2 = functionBind;
3872
3861
  var hasOwn = requireHasown();
3873
- var $concat = bind.call($call, Array.prototype.concat);
3874
- var $spliceApply = bind.call($apply, Array.prototype.splice);
3875
- var $replace = bind.call($call, String.prototype.replace);
3876
- var $strSlice = bind.call($call, String.prototype.slice);
3877
- var $exec = bind.call($call, RegExp.prototype.exec);
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);
3878
3867
  var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
3879
3868
  var reEscapeChar = /\\(\\)?/g;
3880
3869
  var stringToPath = function stringToPath2(string) {
@@ -5372,6 +5361,60 @@ const HomePage = () => {
5372
5361
  ] })
5373
5362
  ] });
5374
5363
  };
5364
+ const PhoneInput = PhoneInputModule.default || PhoneInputModule;
5365
+ console.log("🔍 ==================== UserFormFields Debug Start ====================");
5366
+ console.log("📦 Import Inspection:");
5367
+ console.log(" Field:", Field);
5368
+ console.log(" Field type:", typeof Field);
5369
+ console.log(" Field constructor:", Field?.constructor?.name);
5370
+ console.log(" Field.Root:", Field.Root);
5371
+ console.log(" Field.Root type:", typeof Field.Root);
5372
+ console.log(" Field.Root $$typeof:", Field.Root?.$$typeof);
5373
+ console.log(" Field.Root displayName:", Field.Root?.displayName);
5374
+ console.log(" Field.Label:", Field.Label);
5375
+ console.log(" Field.Label type:", typeof Field.Label);
5376
+ console.log(" Field.Label $$typeof:", Field.Label?.$$typeof);
5377
+ console.log(" Field.Error:", Field.Error);
5378
+ console.log(" Field.Error type:", typeof Field.Error);
5379
+ console.log(" Field.Error $$typeof:", Field.Error?.$$typeof);
5380
+ console.log(" Field.Hint:", Field.Hint);
5381
+ console.log(" Field.Hint type:", typeof Field.Hint);
5382
+ console.log(" TextInput:", TextInput);
5383
+ console.log(" TextInput type:", typeof TextInput);
5384
+ console.log(" TextInput $$typeof:", TextInput?.$$typeof);
5385
+ console.log(" Toggle:", Toggle);
5386
+ console.log(" Toggle type:", typeof Toggle);
5387
+ console.log(" Toggle $$typeof:", Toggle?.$$typeof);
5388
+ console.log(" PhoneInput:", PhoneInput);
5389
+ console.log(" PhoneInput type:", typeof PhoneInput);
5390
+ console.log(" PhoneInput $$typeof:", PhoneInput?.$$typeof);
5391
+ console.log(" PhoneInput displayName:", PhoneInput?.displayName);
5392
+ console.log("🧩 Testing React.createElement:");
5393
+ try {
5394
+ const testRoot = React.createElement(Field.Root, { children: "test" });
5395
+ console.log(" ✅ Field.Root createElement succeeded:", testRoot);
5396
+ } catch (e2) {
5397
+ console.error(" ❌ Field.Root createElement FAILED:", e2);
5398
+ }
5399
+ try {
5400
+ const testLabel = React.createElement(Field.Label, { children: "test" });
5401
+ console.log(" ✅ Field.Label createElement succeeded:", testLabel);
5402
+ } catch (e2) {
5403
+ console.error(" ❌ Field.Label createElement FAILED:", e2);
5404
+ }
5405
+ try {
5406
+ const testInput = React.createElement(TextInput, { value: "test" });
5407
+ console.log(" ✅ TextInput createElement succeeded:", testInput);
5408
+ } catch (e2) {
5409
+ console.error(" ❌ TextInput createElement FAILED:", e2);
5410
+ }
5411
+ try {
5412
+ const testToggle = React.createElement(Toggle, { checked: false });
5413
+ console.log(" ✅ Toggle createElement succeeded:", testToggle);
5414
+ } catch (e2) {
5415
+ console.error(" ❌ Toggle createElement FAILED:", e2);
5416
+ }
5417
+ console.log("🔍 ==================== UserFormFields Debug End ====================");
5375
5418
  const StyledPhoneInputWrapper = styled.div`
5376
5419
  width: 100%;
5377
5420
 
@@ -5526,6 +5569,19 @@ const UserFormFields = ({
5526
5569
  isPasswordRequired = false,
5527
5570
  hasBeenTouched = false
5528
5571
  }) => {
5572
+ console.log("🎨 UserFormFields RENDER START");
5573
+ console.log(" Props received:", {
5574
+ userData,
5575
+ emailError,
5576
+ phoneError,
5577
+ showPasswordHint,
5578
+ isPasswordRequired,
5579
+ hasBeenTouched
5580
+ });
5581
+ console.log(" About to render Field.Root, type:", typeof Field.Root);
5582
+ console.log(" About to render TextInput, type:", typeof TextInput);
5583
+ console.log(" About to render Toggle, type:", typeof Toggle);
5584
+ console.log(" About to render PhoneInput, type:", typeof PhoneInput);
5529
5585
  return /* @__PURE__ */ jsxs(Fragment, { children: [
5530
5586
  /* @__PURE__ */ jsxs(
5531
5587
  Field.Root,
@@ -5755,7 +5811,14 @@ const useUserForm = (initialData = {}) => {
5755
5811
  isSubmitDisabled
5756
5812
  };
5757
5813
  };
5814
+ console.log("🔷 CreateUserForm - Component Imports:");
5815
+ console.log(" UserFormFields:", UserFormFields);
5816
+ console.log(" UserFormFields type:", typeof UserFormFields);
5817
+ console.log(" UserFormFields $$typeof:", UserFormFields?.$$typeof);
5818
+ console.log(" UserFormLayout:", UserFormLayout);
5819
+ console.log(" UserFormLayout type:", typeof UserFormLayout);
5758
5820
  const CreateUserForm = () => {
5821
+ console.log("🔷 CreateUserForm RENDERING");
5759
5822
  const [isLoading, setIsLoading] = useState(false);
5760
5823
  const { toggleNotification } = useNotification();
5761
5824
  const navigate = useNavigate();
@@ -5799,20 +5862,25 @@ const CreateUserForm = () => {
5799
5862
  isSubmitButtonDisabled: isSubmitDisabled
5800
5863
  }
5801
5864
  ),
5802
- /* @__PURE__ */ jsx(Layouts.Content, { children: /* @__PURE__ */ jsx(UserFormLayout, { children: /* @__PURE__ */ jsx(
5803
- UserFormFields,
5804
- {
5805
- userData,
5806
- onTextInputChange: handlers.onTextInputChange,
5807
- onPhoneChange: handlers.onPhoneChange,
5808
- onToggleInputChange: handlers.onToggleInputChange,
5809
- onEmailBlur: handlers.onEmailBlur,
5810
- emailError,
5811
- phoneError,
5812
- isPasswordRequired: true,
5813
- hasBeenTouched
5814
- }
5815
- ) }) })
5865
+ /* @__PURE__ */ jsx(Layouts.Content, { children: /* @__PURE__ */ jsx(UserFormLayout, { children: (() => {
5866
+ console.log("🎯 About to render UserFormFields, component:", UserFormFields);
5867
+ console.log("🎯 UserFormFields typeof:", typeof UserFormFields);
5868
+ console.log("🎯 UserFormFields.$$typeof:", UserFormFields?.$$typeof);
5869
+ return /* @__PURE__ */ jsx(
5870
+ UserFormFields,
5871
+ {
5872
+ userData,
5873
+ onTextInputChange: handlers.onTextInputChange,
5874
+ onPhoneChange: handlers.onPhoneChange,
5875
+ onToggleInputChange: handlers.onToggleInputChange,
5876
+ onEmailBlur: handlers.onEmailBlur,
5877
+ emailError,
5878
+ phoneError,
5879
+ isPasswordRequired: true,
5880
+ hasBeenTouched
5881
+ }
5882
+ );
5883
+ })() }) })
5816
5884
  ] });
5817
5885
  };
5818
5886
  const PasswordResetButton = ({
@@ -5846,6 +5914,7 @@ const PasswordResetButton = ({
5846
5914
  }
5847
5915
  return button;
5848
5916
  };
5917
+ console.log("🔶 EditUserForm - UserFormFields import:", UserFormFields, "type:", typeof UserFormFields);
5849
5918
  const MetaWrapper = styled(Box)`
5850
5919
  width: 100%;
5851
5920
  display: flex;
@@ -6143,6 +6212,11 @@ const EditUserForm = ({ data }) => {
6143
6212
  )
6144
6213
  ] });
6145
6214
  };
6215
+ console.log("📤 forms/index.ts Re-export Debug:");
6216
+ console.log(" UserFormFields from import:", UserFormFields);
6217
+ console.log(" UserFormFields type:", typeof UserFormFields);
6218
+ console.log(" UserFormLayout from import:", UserFormLayout);
6219
+ console.log(" UserFormLayout type:", typeof UserFormLayout);
6146
6220
  const EditView = () => {
6147
6221
  const { id } = useParams();
6148
6222
  const { toggleNotification } = useNotification();