@fluid-app/portal-sdk 0.1.73 → 0.1.75
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/{ContactsScreen-DspTqMml.mjs → ContactsScreen-CzvfANNV.mjs} +3 -8
- package/dist/{ContactsScreen-DspTqMml.mjs.map → ContactsScreen-CzvfANNV.mjs.map} +1 -1
- package/dist/{ContactsScreen-BbCjj8vV.cjs → ContactsScreen-fNFKA1nn.cjs} +2 -7
- package/dist/ContactsScreen-fNFKA1nn.cjs.map +1 -0
- package/dist/{ContactsScreen-CSWZMv-W.cjs → ContactsScreen-pCkw9htG.cjs} +1 -1
- package/dist/{MessagingScreen-Dam7Z2Rw.mjs → MessagingScreen-BHulaY7A.mjs} +1 -2
- package/dist/{MessagingScreen-Dam7Z2Rw.mjs.map → MessagingScreen-BHulaY7A.mjs.map} +1 -1
- package/dist/{MessagingScreen-T_9j-cSr.mjs → MessagingScreen-Bp5t4STI.mjs} +1 -2
- package/dist/{MessagingScreen-Bc93rUBN.cjs → MessagingScreen-DGttFuoB.cjs} +1 -2
- package/dist/{MessagingScreen-Bc93rUBN.cjs.map → MessagingScreen-DGttFuoB.cjs.map} +1 -1
- package/dist/{MessagingScreen-D7W9By7b.cjs → MessagingScreen-ms1wGWHQ.cjs} +1 -1
- package/dist/{ProductsScreen-xjbHMcvT.cjs → ProductsScreen-D1hLP4qn.cjs} +2 -2
- package/dist/{ProductsScreen-xjbHMcvT.cjs.map → ProductsScreen-D1hLP4qn.cjs.map} +1 -1
- package/dist/{ProductsScreen-BvpKx6qj.cjs → ProductsScreen-DD07WW44.cjs} +2 -2
- package/dist/{ProductsScreen-hvPMLQ9W.mjs → ProductsScreen-KLajmCLk.mjs} +2 -2
- package/dist/{ProductsScreen-hvPMLQ9W.mjs.map → ProductsScreen-KLajmCLk.mjs.map} +1 -1
- package/dist/{ProductsScreen-BeFw6FoS.mjs → ProductsScreen-SExV06P8.mjs} +2 -6
- package/dist/{ProfileScreen--vA-Hnyb.cjs → ProfileScreen-D6ie-eDm.cjs} +44 -57
- package/dist/ProfileScreen-D6ie-eDm.cjs.map +1 -0
- package/dist/{ProfileScreen-brLpQhbW.cjs → ProfileScreen-VBlfOlav.cjs} +1 -1
- package/dist/{ProfileScreen-BrdvqFgQ.mjs → ProfileScreen-Y5zQgZL0.mjs} +46 -59
- package/dist/ProfileScreen-Y5zQgZL0.mjs.map +1 -0
- package/dist/{ShareablesScreen-DdwtbkpR.cjs → ShareablesScreen-BKidUZz_.cjs} +2 -2
- package/dist/{ShareablesScreen-Cvo2ujdv.cjs → ShareablesScreen-CA8sm7n_.cjs} +2 -2
- package/dist/{ShareablesScreen-Cvo2ujdv.cjs.map → ShareablesScreen-CA8sm7n_.cjs.map} +1 -1
- package/dist/{ShareablesScreen-Bry6-PII.mjs → ShareablesScreen-CTruUco1.mjs} +2 -2
- package/dist/{ShareablesScreen-Bry6-PII.mjs.map → ShareablesScreen-CTruUco1.mjs.map} +1 -1
- package/dist/{ShareablesScreen-B5HDyfiT.mjs → ShareablesScreen-C_aJXryA.mjs} +2 -6
- package/dist/index.cjs +16 -16
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +16 -16
- package/dist/src-77nf0QPD.mjs.map +1 -1
- package/dist/{src-2yiesCJi.cjs → src-B-aQFEbA.cjs} +17 -5
- package/dist/src-B-aQFEbA.cjs.map +1 -0
- package/dist/{src-CghkSQGd.mjs → src-CvQ9ezCI.mjs} +17 -5
- package/dist/src-CvQ9ezCI.mjs.map +1 -0
- package/dist/src-DGjAAfmN.cjs.map +1 -1
- package/package.json +14 -14
- package/dist/ContactsScreen-BbCjj8vV.cjs.map +0 -1
- package/dist/ProfileScreen--vA-Hnyb.cjs.map +0 -1
- package/dist/ProfileScreen-BrdvqFgQ.mjs.map +0 -1
- package/dist/src-2yiesCJi.cjs.map +0 -1
- package/dist/src-CghkSQGd.mjs.map +0 -1
|
@@ -33,7 +33,7 @@ require("./SpacerWidget-BDsHZD_8.cjs");
|
|
|
33
33
|
require("./TableWidget-CYhIcl2j.cjs");
|
|
34
34
|
require("./ToDoWidget-eGB9cfou.cjs");
|
|
35
35
|
require("./VideoWidget-C22_tAkf.cjs");
|
|
36
|
-
const require_MessagingScreen = require("./MessagingScreen-
|
|
36
|
+
const require_MessagingScreen = require("./MessagingScreen-DGttFuoB.cjs");
|
|
37
37
|
require("./dist-BbS_7TvS.cjs");
|
|
38
38
|
require("./es-BSkb3AZk.cjs");
|
|
39
39
|
exports.MessagingScreen = require_MessagingScreen.MessagingScreen;
|
|
@@ -2,7 +2,7 @@ require("./chunk-9hOWP6kD.cjs");
|
|
|
2
2
|
const require_use_account_clients = require("./use-account-clients-8yvdvTIC.cjs");
|
|
3
3
|
const require_use_current_user = require("./use-current-user-CWnlXU8G.cjs");
|
|
4
4
|
const require_AppNavigationContext = require("./AppNavigationContext-Agp0UkCQ.cjs");
|
|
5
|
-
const require_src = require("./src-
|
|
5
|
+
const require_src = require("./src-B-aQFEbA.cjs");
|
|
6
6
|
let react = require("react");
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
8
8
|
//#region src/screens/ProductsScreen.tsx
|
|
@@ -77,4 +77,4 @@ Object.defineProperty(exports, "productsScreenPropertySchema", {
|
|
|
77
77
|
}
|
|
78
78
|
});
|
|
79
79
|
|
|
80
|
-
//# sourceMappingURL=ProductsScreen-
|
|
80
|
+
//# sourceMappingURL=ProductsScreen-D1hLP4qn.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductsScreen-
|
|
1
|
+
{"version":3,"file":"ProductsScreen-D1hLP4qn.cjs","names":["useSdkClient","useCurrentUser","useAppNavigation","ShareablesCoreProvider","ShareablesUIProvider","ProductsApp"],"sources":["../src/screens/ProductsScreen.tsx"],"sourcesContent":["import { useCallback, useMemo, type ComponentProps } from \"react\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n ColorOptions,\n PaddingOptions,\n} from \"../types\";\nimport type { WidgetPropertySchema } from \"../registries/property-schema-types\";\nimport { ShareablesCoreProvider } from \"@fluid-app/shareables-core\";\nimport { ShareablesUIProvider, ProductsApp } from \"@fluid-app/shareables-ui\";\nimport { useCurrentUser } from \"../hooks/use-current-user\";\nimport { useAppNavigation } from \"../shell/AppNavigationContext\";\nimport { useSdkClient } from \"../account/use-account-clients\";\n\ntype ProductsScreenProps = ComponentProps<\"div\"> & {\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n};\n\nexport function ProductsScreen({\n /* eslint-disable @typescript-eslint/no-unused-vars -- destructured to exclude from divProps spread */\n background,\n textColor,\n accentColor,\n padding,\n borderRadius,\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ...divProps\n}: ProductsScreenProps): React.JSX.Element {\n const domainClient = useSdkClient();\n const { data: userData } = useCurrentUser();\n const { currentSlug, navigate } = useAppNavigation();\n\n // Extract product ID from slug: \"products/123\" → \"123\"\n const productId = useMemo(() => {\n const match = currentSlug.match(/^products\\/(.+)/);\n return match?.[1] ?? null;\n }, [currentSlug]);\n\n const handleSelectProduct = useCallback(\n (id: string) => {\n navigate(`products/${id}`);\n },\n [navigate],\n );\n\n const handleBack = useCallback(() => {\n navigate(\"products\");\n }, [navigate]);\n\n const coreConfig = useMemo(\n () => ({\n client: domainClient,\n user: userData ? { id: userData.id } : null,\n }),\n [domainClient, userData],\n );\n\n const uiConfig = useMemo(\n () => ({\n user: userData\n ? {\n id: userData.id,\n company: userData.company\n ? { logo_url: userData.company.logo_url }\n : null,\n }\n : undefined,\n basePath: \"\",\n navigate: (path: string) => {\n navigate(path);\n },\n showToast: (opts: {\n title: string;\n type: \"success\" | \"error\" | \"warning\";\n }) => {\n console.log(`[Products] ${opts.type}: ${opts.title}`);\n },\n }),\n [userData, navigate],\n );\n\n return (\n <div {...divProps} className={`h-full ${divProps.className ?? \"\"}`}>\n <ShareablesCoreProvider config={coreConfig}>\n <ShareablesUIProvider config={uiConfig}>\n <ProductsApp\n countryCode={userData?.country?.iso}\n companyLogoUrl={userData?.company?.logo_url}\n productId={productId}\n onSelectProduct={handleSelectProduct}\n onBack={handleBack}\n />\n </ShareablesUIProvider>\n </ShareablesCoreProvider>\n </div>\n );\n}\n\nexport const productsScreenPropertySchema: WidgetPropertySchema = {\n widgetType: \"ProductsScreen\",\n displayName: \"Products Screen\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;AAsBA,SAAgB,eAAe,EAE7B,YACA,WACA,aACA,SACA,cAEA,GAAG,YACsC;CACzC,MAAM,eAAeA,4BAAAA,cAAc;CACnC,MAAM,EAAE,MAAM,aAAaC,yBAAAA,gBAAgB;CAC3C,MAAM,EAAE,aAAa,aAAaC,6BAAAA,kBAAkB;CAGpD,MAAM,aAAA,GAAA,MAAA,eAA0B;AAE9B,SADc,YAAY,MAAM,kBAAkB,GACnC,MAAM;IACpB,CAAC,YAAY,CAAC;CAEjB,MAAM,uBAAA,GAAA,MAAA,cACH,OAAe;AACd,WAAS,YAAY,KAAK;IAE5B,CAAC,SAAS,CACX;CAED,MAAM,cAAA,GAAA,MAAA,mBAA+B;AACnC,WAAS,WAAW;IACnB,CAAC,SAAS,CAAC;CAEd,MAAM,cAAA,GAAA,MAAA,gBACG;EACL,QAAQ;EACR,MAAM,WAAW,EAAE,IAAI,SAAS,IAAI,GAAG;EACxC,GACD,CAAC,cAAc,SAAS,CACzB;CAED,MAAM,YAAA,GAAA,MAAA,gBACG;EACL,MAAM,WACF;GACE,IAAI,SAAS;GACb,SAAS,SAAS,UACd,EAAE,UAAU,SAAS,QAAQ,UAAU,GACvC;GACL,GACD,KAAA;EACJ,UAAU;EACV,WAAW,SAAiB;AAC1B,YAAS,KAAK;;EAEhB,YAAY,SAGN;AACJ,WAAQ,IAAI,cAAc,KAAK,KAAK,IAAI,KAAK,QAAQ;;EAExD,GACD,CAAC,UAAU,SAAS,CACrB;AAED,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EAAK,GAAI;EAAU,WAAW,UAAU,SAAS,aAAa;YAC5D,iBAAA,GAAA,kBAAA,KAACC,YAAAA,wBAAD;GAAwB,QAAQ;aAC9B,iBAAA,GAAA,kBAAA,KAACC,YAAAA,sBAAD;IAAsB,QAAQ;cAC5B,iBAAA,GAAA,kBAAA,KAACC,YAAAA,aAAD;KACE,aAAa,UAAU,SAAS;KAChC,gBAAgB,UAAU,SAAS;KACxB;KACX,iBAAiB;KACjB,QAAQ;KACR,CAAA;IACmB,CAAA;GACA,CAAA;EACrB,CAAA;;AAIV,MAAa,+BAAqD;CAChE,YAAY;CACZ,aAAa;CACb,YAAY,CAAC;EAAE,IAAI;EAAW,OAAO;EAAW,CAAC;CACjD,QAAQ,EAAE;CACX"}
|
|
@@ -37,8 +37,8 @@ require("./ScreenHeaderContext-wrJlkhgN.cjs");
|
|
|
37
37
|
require("./dist-BbS_7TvS.cjs");
|
|
38
38
|
require("./es-BSkb3AZk.cjs");
|
|
39
39
|
require("./dist-B4Ke7bHH.cjs");
|
|
40
|
-
require("./src-
|
|
40
|
+
require("./src-B-aQFEbA.cjs");
|
|
41
41
|
require("./dist-lO2OG0T5.cjs");
|
|
42
|
-
const require_ProductsScreen = require("./ProductsScreen-
|
|
42
|
+
const require_ProductsScreen = require("./ProductsScreen-D1hLP4qn.cjs");
|
|
43
43
|
exports.ProductsScreen = require_ProductsScreen.ProductsScreen;
|
|
44
44
|
exports.productsScreenPropertySchema = require_ProductsScreen.productsScreenPropertySchema;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { i as useSdkClient } from "./use-account-clients-G3DvbvPH.mjs";
|
|
2
2
|
import { n as useCurrentUser } from "./use-current-user-DJW-ZwIi.mjs";
|
|
3
3
|
import { n as useAppNavigation } from "./AppNavigationContext-Du3Qq0yc.mjs";
|
|
4
|
-
import { i as ShareablesCoreProvider, r as ShareablesUIProvider, t as ProductsApp } from "./src-
|
|
4
|
+
import { i as ShareablesCoreProvider, r as ShareablesUIProvider, t as ProductsApp } from "./src-CvQ9ezCI.mjs";
|
|
5
5
|
import { useCallback, useMemo } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
7
7
|
//#region src/screens/ProductsScreen.tsx
|
|
@@ -65,4 +65,4 @@ const productsScreenPropertySchema = {
|
|
|
65
65
|
//#endregion
|
|
66
66
|
export { productsScreenPropertySchema as n, ProductsScreen as t };
|
|
67
67
|
|
|
68
|
-
//# sourceMappingURL=ProductsScreen-
|
|
68
|
+
//# sourceMappingURL=ProductsScreen-KLajmCLk.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductsScreen-
|
|
1
|
+
{"version":3,"file":"ProductsScreen-KLajmCLk.mjs","names":[],"sources":["../src/screens/ProductsScreen.tsx"],"sourcesContent":["import { useCallback, useMemo, type ComponentProps } from \"react\";\nimport type {\n BackgroundValue,\n BorderRadiusOptions,\n ColorOptions,\n PaddingOptions,\n} from \"../types\";\nimport type { WidgetPropertySchema } from \"../registries/property-schema-types\";\nimport { ShareablesCoreProvider } from \"@fluid-app/shareables-core\";\nimport { ShareablesUIProvider, ProductsApp } from \"@fluid-app/shareables-ui\";\nimport { useCurrentUser } from \"../hooks/use-current-user\";\nimport { useAppNavigation } from \"../shell/AppNavigationContext\";\nimport { useSdkClient } from \"../account/use-account-clients\";\n\ntype ProductsScreenProps = ComponentProps<\"div\"> & {\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n};\n\nexport function ProductsScreen({\n /* eslint-disable @typescript-eslint/no-unused-vars -- destructured to exclude from divProps spread */\n background,\n textColor,\n accentColor,\n padding,\n borderRadius,\n /* eslint-enable @typescript-eslint/no-unused-vars */\n ...divProps\n}: ProductsScreenProps): React.JSX.Element {\n const domainClient = useSdkClient();\n const { data: userData } = useCurrentUser();\n const { currentSlug, navigate } = useAppNavigation();\n\n // Extract product ID from slug: \"products/123\" → \"123\"\n const productId = useMemo(() => {\n const match = currentSlug.match(/^products\\/(.+)/);\n return match?.[1] ?? null;\n }, [currentSlug]);\n\n const handleSelectProduct = useCallback(\n (id: string) => {\n navigate(`products/${id}`);\n },\n [navigate],\n );\n\n const handleBack = useCallback(() => {\n navigate(\"products\");\n }, [navigate]);\n\n const coreConfig = useMemo(\n () => ({\n client: domainClient,\n user: userData ? { id: userData.id } : null,\n }),\n [domainClient, userData],\n );\n\n const uiConfig = useMemo(\n () => ({\n user: userData\n ? {\n id: userData.id,\n company: userData.company\n ? { logo_url: userData.company.logo_url }\n : null,\n }\n : undefined,\n basePath: \"\",\n navigate: (path: string) => {\n navigate(path);\n },\n showToast: (opts: {\n title: string;\n type: \"success\" | \"error\" | \"warning\";\n }) => {\n console.log(`[Products] ${opts.type}: ${opts.title}`);\n },\n }),\n [userData, navigate],\n );\n\n return (\n <div {...divProps} className={`h-full ${divProps.className ?? \"\"}`}>\n <ShareablesCoreProvider config={coreConfig}>\n <ShareablesUIProvider config={uiConfig}>\n <ProductsApp\n countryCode={userData?.country?.iso}\n companyLogoUrl={userData?.company?.logo_url}\n productId={productId}\n onSelectProduct={handleSelectProduct}\n onBack={handleBack}\n />\n </ShareablesUIProvider>\n </ShareablesCoreProvider>\n </div>\n );\n}\n\nexport const productsScreenPropertySchema: WidgetPropertySchema = {\n widgetType: \"ProductsScreen\",\n displayName: \"Products Screen\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;AAsBA,SAAgB,eAAe,EAE7B,YACA,WACA,aACA,SACA,cAEA,GAAG,YACsC;CACzC,MAAM,eAAe,cAAc;CACnC,MAAM,EAAE,MAAM,aAAa,gBAAgB;CAC3C,MAAM,EAAE,aAAa,aAAa,kBAAkB;CAGpD,MAAM,YAAY,cAAc;AAE9B,SADc,YAAY,MAAM,kBAAkB,GACnC,MAAM;IACpB,CAAC,YAAY,CAAC;CAEjB,MAAM,sBAAsB,aACzB,OAAe;AACd,WAAS,YAAY,KAAK;IAE5B,CAAC,SAAS,CACX;CAED,MAAM,aAAa,kBAAkB;AACnC,WAAS,WAAW;IACnB,CAAC,SAAS,CAAC;CAEd,MAAM,aAAa,eACV;EACL,QAAQ;EACR,MAAM,WAAW,EAAE,IAAI,SAAS,IAAI,GAAG;EACxC,GACD,CAAC,cAAc,SAAS,CACzB;CAED,MAAM,WAAW,eACR;EACL,MAAM,WACF;GACE,IAAI,SAAS;GACb,SAAS,SAAS,UACd,EAAE,UAAU,SAAS,QAAQ,UAAU,GACvC;GACL,GACD,KAAA;EACJ,UAAU;EACV,WAAW,SAAiB;AAC1B,YAAS,KAAK;;EAEhB,YAAY,SAGN;AACJ,WAAQ,IAAI,cAAc,KAAK,KAAK,IAAI,KAAK,QAAQ;;EAExD,GACD,CAAC,UAAU,SAAS,CACrB;AAED,QACE,oBAAC,OAAD;EAAK,GAAI;EAAU,WAAW,UAAU,SAAS,aAAa;YAC5D,oBAAC,wBAAD;GAAwB,QAAQ;aAC9B,oBAAC,sBAAD;IAAsB,QAAQ;cAC5B,oBAAC,aAAD;KACE,aAAa,UAAU,SAAS;KAChC,gBAAgB,UAAU,SAAS;KACxB;KACX,iBAAiB;KACjB,QAAQ;KACR,CAAA;IACmB,CAAA;GACA,CAAA;EACrB,CAAA;;AAIV,MAAa,+BAAqD;CAChE,YAAY;CACZ,aAAa;CACb,YAAY,CAAC;EAAE,IAAI;EAAW,OAAO;EAAW,CAAC;CACjD,QAAQ,EAAE;CACX"}
|
|
@@ -32,15 +32,11 @@ import "./SpacerWidget-CX7bjjNF.mjs";
|
|
|
32
32
|
import "./TableWidget-BDUXriyw.mjs";
|
|
33
33
|
import "./ToDoWidget-D52-GT7f.mjs";
|
|
34
34
|
import "./VideoWidget-ZMSFyE1Y.mjs";
|
|
35
|
-
import "./use-account-clients-G3DvbvPH.mjs";
|
|
36
35
|
import "./ScreenHeaderContext-NdrJ58Mg.mjs";
|
|
37
|
-
import "./use-fluid-api-YzLdiq5t.mjs";
|
|
38
|
-
import "./use-current-user-DJW-ZwIi.mjs";
|
|
39
|
-
import "./AppNavigationContext-Du3Qq0yc.mjs";
|
|
40
36
|
import "./dist-CMGXkSgZ.mjs";
|
|
41
37
|
import "./es-1KItbbYg.mjs";
|
|
42
38
|
import "./dist-Cl4FsM3V.mjs";
|
|
43
|
-
import "./src-
|
|
39
|
+
import "./src-CvQ9ezCI.mjs";
|
|
44
40
|
import "./sortable.esm-CzzU6kIR.mjs";
|
|
45
|
-
import { n as productsScreenPropertySchema, t as ProductsScreen } from "./ProductsScreen-
|
|
41
|
+
import { n as productsScreenPropertySchema, t as ProductsScreen } from "./ProductsScreen-KLajmCLk.mjs";
|
|
46
42
|
export { ProductsScreen, productsScreenPropertySchema };
|
|
@@ -9,7 +9,6 @@ let _tanstack_react_query = require("@tanstack/react-query");
|
|
|
9
9
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
10
10
|
let zod = require("zod");
|
|
11
11
|
let lucide_react = require("lucide-react");
|
|
12
|
-
let _hookform_resolvers_zod = require("@hookform/resolvers/zod");
|
|
13
12
|
let react_hook_form = require("react-hook-form");
|
|
14
13
|
//#region ../../fluid-pay/api-client/src/namespaces/addresses.ts
|
|
15
14
|
/**
|
|
@@ -720,19 +719,16 @@ function CustomerInfo({ customerAccount, languages, onUpdateCustomer, isUpdating
|
|
|
720
719
|
name: language.name,
|
|
721
720
|
value: language.name
|
|
722
721
|
}));
|
|
723
|
-
const { control, handleSubmit, reset } = (0,
|
|
724
|
-
|
|
725
|
-
|
|
726
|
-
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
language: customerLanguage || "English"
|
|
734
|
-
}
|
|
735
|
-
});
|
|
722
|
+
const { control, handleSubmit, reset } = require_src.useZodForm((0, react.useMemo)(() => createUserInfoSchema({
|
|
723
|
+
firstNameRequired: t("first_name_is_required"),
|
|
724
|
+
lastNameRequired: t("last_name_is_required"),
|
|
725
|
+
languageRequired: t("language_is_required")
|
|
726
|
+
}), [t]), { defaultValues: {
|
|
727
|
+
first_name: customerAccount.customer.first_name || "",
|
|
728
|
+
last_name: derivedLastName,
|
|
729
|
+
phone_number: customerAccount.customer.phone || "",
|
|
730
|
+
language: customerLanguage || "English"
|
|
731
|
+
} });
|
|
736
732
|
const handleOpenEditDialog = () => {
|
|
737
733
|
reset({
|
|
738
734
|
first_name: customerAccount.customer.first_name || "",
|
|
@@ -1216,21 +1212,18 @@ const editPaymentMethodFormSchema = zod.z.object({
|
|
|
1216
1212
|
});
|
|
1217
1213
|
function EditPaymentMethodDialog({ isOpen, paymentMethod, billingAddress, onClose, onSubmit, isSubmitting, error, countries = [] }) {
|
|
1218
1214
|
const { t } = useProfileUI();
|
|
1219
|
-
const { control, handleSubmit, reset, setValue } = (
|
|
1220
|
-
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
set_as_default: false
|
|
1232
|
-
}
|
|
1233
|
-
});
|
|
1215
|
+
const { control, handleSubmit, reset, setValue } = require_src.useZodForm(editPaymentMethodFormSchema, { defaultValues: {
|
|
1216
|
+
billing_address: {
|
|
1217
|
+
name: "",
|
|
1218
|
+
address1: "",
|
|
1219
|
+
address2: "",
|
|
1220
|
+
city: "",
|
|
1221
|
+
state: "",
|
|
1222
|
+
zip: "",
|
|
1223
|
+
country_code: "US"
|
|
1224
|
+
},
|
|
1225
|
+
set_as_default: false
|
|
1226
|
+
} });
|
|
1234
1227
|
const billingCountry = (0, react_hook_form.useWatch)({
|
|
1235
1228
|
control,
|
|
1236
1229
|
name: "billing_address.country_code"
|
|
@@ -1659,20 +1652,17 @@ const addressFormSchema = zod.z.object({
|
|
|
1659
1652
|
default: zod.z.boolean()
|
|
1660
1653
|
});
|
|
1661
1654
|
function AddressFormDialog({ isOpen, onClose, selectedAddress, onSubmit, isSubmitting, countries = [], error, renderAddressAutocomplete, t }) {
|
|
1662
|
-
const { control, handleSubmit, reset, setValue } = (
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
default: false
|
|
1674
|
-
}
|
|
1675
|
-
});
|
|
1655
|
+
const { control, handleSubmit, reset, setValue } = require_src.useZodForm(addressFormSchema, { defaultValues: {
|
|
1656
|
+
first_name: "",
|
|
1657
|
+
last_name: "",
|
|
1658
|
+
address1: "",
|
|
1659
|
+
address2: "",
|
|
1660
|
+
city: "",
|
|
1661
|
+
state: "",
|
|
1662
|
+
postal_code: "",
|
|
1663
|
+
country_code: "US",
|
|
1664
|
+
default: false
|
|
1665
|
+
} });
|
|
1676
1666
|
const selectedCountryCode = (0, react_hook_form.useWatch)({
|
|
1677
1667
|
control,
|
|
1678
1668
|
name: "country_code"
|
|
@@ -2142,19 +2132,16 @@ function CreditCardFormDialog({ isOpen, onClose, onSubmit, isSubmitting, countri
|
|
|
2142
2132
|
const [cardError, setCardError] = (0, react.useState)(void 0);
|
|
2143
2133
|
const [isVgsSubmitting, setIsVgsSubmitting] = (0, react.useState)(false);
|
|
2144
2134
|
const { isFormReady, isLoading: isVgsLoading, isScriptLoaded, initializeForm, submitCard, vgsFieldState, resetVgs, onSuccessRef, onErrorRef } = useVgsCollect();
|
|
2145
|
-
const { control, handleSubmit, reset, setValue } = (
|
|
2146
|
-
|
|
2147
|
-
|
|
2148
|
-
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
2155
|
-
set_as_default: false
|
|
2156
|
-
}
|
|
2157
|
-
});
|
|
2135
|
+
const { control, handleSubmit, reset, setValue } = require_src.useZodForm(billingAddressSchema, { defaultValues: {
|
|
2136
|
+
name: "",
|
|
2137
|
+
address1: "",
|
|
2138
|
+
address2: "",
|
|
2139
|
+
city: "",
|
|
2140
|
+
state: "",
|
|
2141
|
+
zip: "",
|
|
2142
|
+
country_code: "US",
|
|
2143
|
+
set_as_default: false
|
|
2144
|
+
} });
|
|
2158
2145
|
const billingCountry = (0, react_hook_form.useWatch)({
|
|
2159
2146
|
control,
|
|
2160
2147
|
name: "country_code"
|
|
@@ -2777,4 +2764,4 @@ Object.defineProperty(exports, "profileScreenPropertySchema", {
|
|
|
2777
2764
|
}
|
|
2778
2765
|
});
|
|
2779
2766
|
|
|
2780
|
-
//# sourceMappingURL=ProfileScreen
|
|
2767
|
+
//# sourceMappingURL=ProfileScreen-D6ie-eDm.cjs.map
|