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.
@@ -7,20 +7,37 @@ 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-DgfRCyyQ.js");
10
+ const index = require("./index-yE1zATuU.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-BSejy8nn.js");
17
- const PhoneInput = require("react-phone-input-2");
16
+ const api = require("./api-Bw_7tM52.js");
17
+ const PhoneInputModule = require("react-phone-input-2");
18
18
  require("react-phone-input-2/lib/style.css");
19
19
  const validator = require("validator");
20
20
  const _interopDefault = (e2) => e2 && e2.__esModule ? e2 : { default: e2 };
21
+ function _interopNamespace(e2) {
22
+ if (e2 && e2.__esModule) return e2;
23
+ const n = Object.create(null, { [Symbol.toStringTag]: { value: "Module" } });
24
+ if (e2) {
25
+ for (const k2 in e2) {
26
+ if (k2 !== "default") {
27
+ const d3 = Object.getOwnPropertyDescriptor(e2, k2);
28
+ Object.defineProperty(n, k2, d3.get ? d3 : {
29
+ enumerable: true,
30
+ get: () => e2[k2]
31
+ });
32
+ }
33
+ }
34
+ }
35
+ n.default = e2;
36
+ return Object.freeze(n);
37
+ }
21
38
  const React__default = /* @__PURE__ */ _interopDefault(React);
22
39
  const styled__default = /* @__PURE__ */ _interopDefault(styled);
23
- const PhoneInput__default = /* @__PURE__ */ _interopDefault(PhoneInput);
40
+ const PhoneInputModule__namespace = /* @__PURE__ */ _interopNamespace(PhoneInputModule);
24
41
  const validator__default = /* @__PURE__ */ _interopDefault(validator);
25
42
  function arrayPush$1(array, values) {
26
43
  var index2 = -1, length = values.length, offset = array.length;
@@ -2529,11 +2546,11 @@ const FirebaseTable = ({
2529
2546
  });
2530
2547
  };
2531
2548
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2532
- /* @__PURE__ */ jsxRuntime.jsx(BulkActionsBar, { paddingLeft: 0, paddingRight: 0, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "row", alignItems: "center", justifyContent: "space-between", children: [
2533
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "row", alignItems: "center", gap: 4, children: [
2549
+ /* @__PURE__ */ jsxRuntime.jsx(BulkActionsBar, { paddingLeft: 0, paddingRight: 0, children: /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "row", alignItems: "center", justifyContent: "space-between", wrap: "nowrap", children: [
2550
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Flex, { direction: "row", alignItems: "center", gap: 2, wrap: "nowrap", children: [
2534
2551
  action,
2535
2552
  hasSelection && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2536
- /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "omega", fontWeight: "semiBold", children: [
2553
+ /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Typography, { variant: "omega", fontWeight: "semiBold", style: { whiteSpace: "nowrap" }, children: [
2537
2554
  selectedCount,
2538
2555
  " ",
2539
2556
  selectedCount === 1 ? "entry" : "entries",
@@ -2546,10 +2563,20 @@ const FirebaseTable = ({
2546
2563
  startIcon: /* @__PURE__ */ jsxRuntime.jsx(icons.Trash, {}),
2547
2564
  onClick: () => setShowBulkDeleteDialog(true),
2548
2565
  size: "S",
2566
+ style: { whiteSpace: "nowrap" },
2549
2567
  children: "Delete"
2550
2568
  }
2551
2569
  ),
2552
- /* @__PURE__ */ jsxRuntime.jsx(designSystem.Button, { variant: "secondary", onClick: clearSelection, size: "S", children: "Deselect all" })
2570
+ /* @__PURE__ */ jsxRuntime.jsx(
2571
+ designSystem.Button,
2572
+ {
2573
+ variant: "secondary",
2574
+ onClick: clearSelection,
2575
+ size: "S",
2576
+ style: { whiteSpace: "nowrap" },
2577
+ children: "Deselect all"
2578
+ }
2579
+ )
2553
2580
  ] })
2554
2581
  ] }),
2555
2582
  createAction
@@ -2676,7 +2703,7 @@ const sendResetEmail = async (userId) => {
2676
2703
  return result;
2677
2704
  };
2678
2705
  const getFirebaseConfig = async () => {
2679
- const url = `/${index.PLUGIN_ID}/config`;
2706
+ const url = `/api/${index.PLUGIN_ID}/config`;
2680
2707
  try {
2681
2708
  const { get: get2 } = admin.getFetchClient();
2682
2709
  const { data: config } = await get2(url, {
@@ -5358,6 +5385,60 @@ const HomePage = () => {
5358
5385
  ] })
5359
5386
  ] });
5360
5387
  };
5388
+ const PhoneInput = PhoneInputModule__namespace.default || PhoneInputModule__namespace;
5389
+ console.log("🔍 ==================== UserFormFields Debug Start ====================");
5390
+ console.log("📦 Import Inspection:");
5391
+ console.log(" Field:", designSystem.Field);
5392
+ console.log(" Field type:", typeof designSystem.Field);
5393
+ console.log(" Field constructor:", designSystem.Field?.constructor?.name);
5394
+ console.log(" Field.Root:", designSystem.Field.Root);
5395
+ console.log(" Field.Root type:", typeof designSystem.Field.Root);
5396
+ console.log(" Field.Root $$typeof:", designSystem.Field.Root?.$$typeof);
5397
+ console.log(" Field.Root displayName:", designSystem.Field.Root?.displayName);
5398
+ console.log(" Field.Label:", designSystem.Field.Label);
5399
+ console.log(" Field.Label type:", typeof designSystem.Field.Label);
5400
+ console.log(" Field.Label $$typeof:", designSystem.Field.Label?.$$typeof);
5401
+ console.log(" Field.Error:", designSystem.Field.Error);
5402
+ console.log(" Field.Error type:", typeof designSystem.Field.Error);
5403
+ console.log(" Field.Error $$typeof:", designSystem.Field.Error?.$$typeof);
5404
+ console.log(" Field.Hint:", designSystem.Field.Hint);
5405
+ console.log(" Field.Hint type:", typeof designSystem.Field.Hint);
5406
+ console.log(" TextInput:", designSystem.TextInput);
5407
+ console.log(" TextInput type:", typeof designSystem.TextInput);
5408
+ console.log(" TextInput $$typeof:", designSystem.TextInput?.$$typeof);
5409
+ console.log(" Toggle:", designSystem.Toggle);
5410
+ console.log(" Toggle type:", typeof designSystem.Toggle);
5411
+ console.log(" Toggle $$typeof:", designSystem.Toggle?.$$typeof);
5412
+ console.log(" PhoneInput:", PhoneInput);
5413
+ console.log(" PhoneInput type:", typeof PhoneInput);
5414
+ console.log(" PhoneInput $$typeof:", PhoneInput?.$$typeof);
5415
+ console.log(" PhoneInput displayName:", PhoneInput?.displayName);
5416
+ console.log("🧩 Testing React.createElement:");
5417
+ try {
5418
+ const testRoot = React__default.default.createElement(designSystem.Field.Root, { children: "test" });
5419
+ console.log(" ✅ Field.Root createElement succeeded:", testRoot);
5420
+ } catch (e2) {
5421
+ console.error(" ❌ Field.Root createElement FAILED:", e2);
5422
+ }
5423
+ try {
5424
+ const testLabel = React__default.default.createElement(designSystem.Field.Label, { children: "test" });
5425
+ console.log(" ✅ Field.Label createElement succeeded:", testLabel);
5426
+ } catch (e2) {
5427
+ console.error(" ❌ Field.Label createElement FAILED:", e2);
5428
+ }
5429
+ try {
5430
+ const testInput = React__default.default.createElement(designSystem.TextInput, { value: "test" });
5431
+ console.log(" ✅ TextInput createElement succeeded:", testInput);
5432
+ } catch (e2) {
5433
+ console.error(" ❌ TextInput createElement FAILED:", e2);
5434
+ }
5435
+ try {
5436
+ const testToggle = React__default.default.createElement(designSystem.Toggle, { checked: false });
5437
+ console.log(" ✅ Toggle createElement succeeded:", testToggle);
5438
+ } catch (e2) {
5439
+ console.error(" ❌ Toggle createElement FAILED:", e2);
5440
+ }
5441
+ console.log("🔍 ==================== UserFormFields Debug End ====================");
5361
5442
  const StyledPhoneInputWrapper = styled__default.default.div`
5362
5443
  width: 100%;
5363
5444
 
@@ -5512,6 +5593,19 @@ const UserFormFields = ({
5512
5593
  isPasswordRequired = false,
5513
5594
  hasBeenTouched = false
5514
5595
  }) => {
5596
+ console.log("🎨 UserFormFields RENDER START");
5597
+ console.log(" Props received:", {
5598
+ userData,
5599
+ emailError,
5600
+ phoneError,
5601
+ showPasswordHint,
5602
+ isPasswordRequired,
5603
+ hasBeenTouched
5604
+ });
5605
+ console.log(" About to render Field.Root, type:", typeof designSystem.Field.Root);
5606
+ console.log(" About to render TextInput, type:", typeof designSystem.TextInput);
5607
+ console.log(" About to render Toggle, type:", typeof designSystem.Toggle);
5608
+ console.log(" About to render PhoneInput, type:", typeof PhoneInput);
5515
5609
  return /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5516
5610
  /* @__PURE__ */ jsxRuntime.jsxs(
5517
5611
  designSystem.Field.Root,
@@ -5551,7 +5645,7 @@ const UserFormFields = ({
5551
5645
  /* @__PURE__ */ jsxRuntime.jsxs(designSystem.Field.Root, { style: { width: "50%" }, error: phoneError || void 0, children: [
5552
5646
  /* @__PURE__ */ jsxRuntime.jsx(designSystem.Field.Label, { children: "Phone Number" }),
5553
5647
  /* @__PURE__ */ jsxRuntime.jsx(StyledPhoneInputWrapper, { children: /* @__PURE__ */ jsxRuntime.jsx(
5554
- PhoneInput__default.default,
5648
+ PhoneInput,
5555
5649
  {
5556
5650
  value: userData.phoneNumber || "",
5557
5651
  onChange: (phone) => onPhoneChange("+" + phone),
@@ -5741,7 +5835,14 @@ const useUserForm = (initialData = {}) => {
5741
5835
  isSubmitDisabled
5742
5836
  };
5743
5837
  };
5838
+ console.log("🔷 CreateUserForm - Component Imports:");
5839
+ console.log(" UserFormFields:", UserFormFields);
5840
+ console.log(" UserFormFields type:", typeof UserFormFields);
5841
+ console.log(" UserFormFields $$typeof:", UserFormFields?.$$typeof);
5842
+ console.log(" UserFormLayout:", UserFormLayout);
5843
+ console.log(" UserFormLayout type:", typeof UserFormLayout);
5744
5844
  const CreateUserForm = () => {
5845
+ console.log("🔷 CreateUserForm RENDERING");
5745
5846
  const [isLoading, setIsLoading] = React.useState(false);
5746
5847
  const { toggleNotification } = admin.useNotification();
5747
5848
  const navigate = reactRouterDom.useNavigate();
@@ -5785,20 +5886,25 @@ const CreateUserForm = () => {
5785
5886
  isSubmitButtonDisabled: isSubmitDisabled
5786
5887
  }
5787
5888
  ),
5788
- /* @__PURE__ */ jsxRuntime.jsx(admin.Layouts.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(UserFormLayout, { children: /* @__PURE__ */ jsxRuntime.jsx(
5789
- UserFormFields,
5790
- {
5791
- userData,
5792
- onTextInputChange: handlers.onTextInputChange,
5793
- onPhoneChange: handlers.onPhoneChange,
5794
- onToggleInputChange: handlers.onToggleInputChange,
5795
- onEmailBlur: handlers.onEmailBlur,
5796
- emailError,
5797
- phoneError,
5798
- isPasswordRequired: true,
5799
- hasBeenTouched
5800
- }
5801
- ) }) })
5889
+ /* @__PURE__ */ jsxRuntime.jsx(admin.Layouts.Content, { children: /* @__PURE__ */ jsxRuntime.jsx(UserFormLayout, { children: (() => {
5890
+ console.log("🎯 About to render UserFormFields, component:", UserFormFields);
5891
+ console.log("🎯 UserFormFields typeof:", typeof UserFormFields);
5892
+ console.log("🎯 UserFormFields.$$typeof:", UserFormFields?.$$typeof);
5893
+ return /* @__PURE__ */ jsxRuntime.jsx(
5894
+ UserFormFields,
5895
+ {
5896
+ userData,
5897
+ onTextInputChange: handlers.onTextInputChange,
5898
+ onPhoneChange: handlers.onPhoneChange,
5899
+ onToggleInputChange: handlers.onToggleInputChange,
5900
+ onEmailBlur: handlers.onEmailBlur,
5901
+ emailError,
5902
+ phoneError,
5903
+ isPasswordRequired: true,
5904
+ hasBeenTouched
5905
+ }
5906
+ );
5907
+ })() }) })
5802
5908
  ] });
5803
5909
  };
5804
5910
  const PasswordResetButton = ({
@@ -5832,6 +5938,7 @@ const PasswordResetButton = ({
5832
5938
  }
5833
5939
  return button;
5834
5940
  };
5941
+ console.log("🔶 EditUserForm - UserFormFields import:", UserFormFields, "type:", typeof UserFormFields);
5835
5942
  const MetaWrapper = styled__default.default(designSystem.Box)`
5836
5943
  width: 100%;
5837
5944
  display: flex;
@@ -6129,6 +6236,11 @@ const EditUserForm = ({ data }) => {
6129
6236
  )
6130
6237
  ] });
6131
6238
  };
6239
+ console.log("📤 forms/index.ts Re-export Debug:");
6240
+ console.log(" UserFormFields from import:", UserFormFields);
6241
+ console.log(" UserFormFields type:", typeof UserFormFields);
6242
+ console.log(" UserFormLayout from import:", UserFormLayout);
6243
+ console.log(" UserFormLayout type:", typeof UserFormLayout);
6132
6244
  const EditView = () => {
6133
6245
  const { id } = reactRouterDom.useParams();
6134
6246
  const { toggleNotification } = admin.useNotification();
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  const admin = require("@strapi/strapi/admin");
3
- const index = require("./index-DgfRCyyQ.js");
3
+ const index = require("./index-yE1zATuU.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-4hUrKd7Y.mjs";
2
+ import { P as PLUGIN_ID } from "./index-FAW4iPgh.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-BSejy8nn.js");
7
+ const api = require("./api-Bw_7tM52.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-B01IAVEC.mjs";
5
+ import { g as getFirebaseConfig, s as saveFirebaseConfig, d as delFirebaseConfig, a as savePasswordSettings } from "./api-DrAXGM3H.mjs";
6
6
  import { useNavigate } from "react-router-dom";
7
7
  function SettingsPage() {
8
8
  const { toggleNotification } = useNotification();
@@ -738,7 +738,7 @@ const index = {
738
738
  id: `${PLUGIN_ID}.page.title`,
739
739
  defaultMessage: PLUGIN_ID
740
740
  },
741
- Component: () => import("./App-Bl6D4TFu.mjs").then((mod) => ({
741
+ Component: () => import("./App-C49N6om4.mjs").then((mod) => ({
742
742
  default: mod.App
743
743
  })),
744
744
  permissions: PERMISSIONS["menu-link"]
@@ -760,7 +760,7 @@ const index = {
760
760
  id: "settings",
761
761
  to: `/settings/${PLUGIN_ID}`,
762
762
  async Component() {
763
- const component = await import("./index-BqF9RRVF.mjs");
763
+ const component = await import("./index-C9AUBuP7.mjs");
764
764
  return component.default;
765
765
  },
766
766
  permissions: PERMISSIONS["menu-link"]
@@ -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-HfsY_18f.js")).then((mod) => ({
742
+ Component: () => Promise.resolve().then(() => require("./App-CtjmoTFU.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-BbVqBI3M.js"));
764
+ const component = await Promise.resolve().then(() => require("./index-BkQ4pF_p.js"));
765
765
  return component.default;
766
766
  },
767
767
  permissions: PERMISSIONS["menu-link"]
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- const index = require("../_chunks/index-DgfRCyyQ.js");
2
+ const index = require("../_chunks/index-yE1zATuU.js");
3
3
  require("react/jsx-runtime");
4
4
  require("@strapi/strapi/admin");
5
5
  require("@strapi/design-system");
@@ -1,4 +1,4 @@
1
- import { p } from "../_chunks/index-4hUrKd7Y.mjs";
1
+ import { p } from "../_chunks/index-FAW4iPgh.mjs";
2
2
  import "react/jsx-runtime";
3
3
  import "@strapi/strapi/admin";
4
4
  import "@strapi/design-system";
@@ -1,4 +1,6 @@
1
+ import { UserFormFields as UserFormFieldsImport } from "./shared/UserFormFields/UserFormFields";
2
+ import { UserFormLayout as UserFormLayoutImport } from "./shared/UserFormLayout/UserFormLayout";
1
3
  export { default as CreateUserForm } from "./CreateUserForm/CreateUserForm";
2
4
  export { default as EditUserForm } from "./EditUserForm/EditUserForm";
3
- export { UserFormFields } from "./shared/UserFormFields/UserFormFields";
4
- export { UserFormLayout } from "./shared/UserFormLayout/UserFormLayout";
5
+ export { UserFormFieldsImport as UserFormFields };
6
+ export { UserFormLayoutImport as UserFormLayout };