@fluid-app/portal-sdk 0.1.166 → 0.1.167
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/{PortalContentApiProvider-Di5emtYd.cjs → PortalContentApiProvider-BMflGLYQ.cjs} +10 -1
- package/dist/{PortalContentApiProvider-Di5emtYd.cjs.map → PortalContentApiProvider-BMflGLYQ.cjs.map} +1 -1
- package/dist/{PortalContentApiProvider-CW0ADhPi.mjs → PortalContentApiProvider-CBm0adwh.mjs} +10 -1
- package/dist/{PortalContentApiProvider-CW0ADhPi.mjs.map → PortalContentApiProvider-CBm0adwh.mjs.map} +1 -1
- package/dist/{ProductsScreen-C6eNgxjP.cjs → ProductsScreen-CYRCTRvW.cjs} +2 -2
- package/dist/{ProductsScreen-C8amMeRh.mjs → ProductsScreen-D810-dkz.mjs} +2 -4
- package/dist/{ProductsScreen-KjjhlDGo.cjs → ProductsScreen-DOn1eC4t.cjs} +2 -2
- package/dist/{ProductsScreen-KjjhlDGo.cjs.map → ProductsScreen-DOn1eC4t.cjs.map} +1 -1
- package/dist/{ProductsScreen-CVNJudq9.mjs → ProductsScreen-DWrE0FKE.mjs} +2 -2
- package/dist/{ProductsScreen-CVNJudq9.mjs.map → ProductsScreen-DWrE0FKE.mjs.map} +1 -1
- package/dist/{ShareablesScreen-Dz8w2l3e.cjs → ShareablesScreen-C3_fEMc0.cjs} +2 -2
- package/dist/{ShareablesScreen-Dz8w2l3e.cjs.map → ShareablesScreen-C3_fEMc0.cjs.map} +1 -1
- package/dist/{ShareablesScreen-DUzo8kRi.cjs → ShareablesScreen-ChpDLh7n.cjs} +2 -2
- package/dist/{ShareablesScreen-JxVPd89h.mjs → ShareablesScreen-CxWuxuGd.mjs} +2 -4
- package/dist/{ShareablesScreen-DpEP_6u0.mjs → ShareablesScreen-eCUiJFdU.mjs} +2 -2
- package/dist/{ShareablesScreen-DpEP_6u0.mjs.map → ShareablesScreen-eCUiJFdU.mjs.map} +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.mjs +7 -7
- package/package.json +13 -13
|
@@ -6,9 +6,9 @@ require("./dist-thaj08s5.cjs");
|
|
|
6
6
|
require("./es-xQF-WIMq.cjs");
|
|
7
7
|
require("./SearchSort-CYhjl8tC.cjs");
|
|
8
8
|
require("./dist-BSKQ_GoC.cjs");
|
|
9
|
-
require("./PortalContentApiProvider-
|
|
9
|
+
require("./PortalContentApiProvider-BMflGLYQ.cjs");
|
|
10
10
|
require("./dist-BF_4vk1z.cjs");
|
|
11
11
|
require("./PortalProductsApiProvider-BquMHwvt.cjs");
|
|
12
|
-
const require_ProductsScreen = require("./ProductsScreen-
|
|
12
|
+
const require_ProductsScreen = require("./ProductsScreen-DOn1eC4t.cjs");
|
|
13
13
|
exports.ProductsScreen = require_ProductsScreen.ProductsScreen;
|
|
14
14
|
exports.productsScreenPropertySchema = require_ProductsScreen.productsScreenPropertySchema;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import "./es-DfBgEQMu.mjs";
|
|
2
2
|
import "./account-api-context-R4VVlZdv.mjs";
|
|
3
|
-
import "./PortalTenantClientProvider-_VXOs0t4.mjs";
|
|
4
3
|
import "./src-hUw6fI7h.mjs";
|
|
5
4
|
import "./ScreenHeaderContext-DjSO5A8k.mjs";
|
|
6
|
-
import "./AppNavigationContext-D29xW9Ua.mjs";
|
|
7
5
|
import "./dist-CkIGP8my.mjs";
|
|
8
6
|
import "./SearchSort-Br8J8JS8.mjs";
|
|
9
7
|
import "./dist-C9vpl_rR.mjs";
|
|
10
|
-
import "./PortalContentApiProvider-
|
|
8
|
+
import "./PortalContentApiProvider-CBm0adwh.mjs";
|
|
11
9
|
import "./sortable.esm-E6JdQn7I.mjs";
|
|
12
10
|
import "./PortalProductsApiProvider-BCXX9NGK.mjs";
|
|
13
|
-
import { n as productsScreenPropertySchema, t as ProductsScreen } from "./ProductsScreen-
|
|
11
|
+
import { n as productsScreenPropertySchema, t as ProductsScreen } from "./ProductsScreen-DWrE0FKE.mjs";
|
|
14
12
|
export { ProductsScreen, productsScreenPropertySchema };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require("./chunk-9hOWP6kD.cjs");
|
|
2
2
|
const require_use_account = require("./use-account-CrgtI83z.cjs");
|
|
3
3
|
const require_AppNavigationContext = require("./AppNavigationContext-BiYNDj_X.cjs");
|
|
4
|
-
const require_PortalContentApiProvider = require("./PortalContentApiProvider-
|
|
4
|
+
const require_PortalContentApiProvider = require("./PortalContentApiProvider-BMflGLYQ.cjs");
|
|
5
5
|
const require_PortalProductsApiProvider = require("./PortalProductsApiProvider-BquMHwvt.cjs");
|
|
6
6
|
let react = require("react");
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -92,4 +92,4 @@ Object.defineProperty(exports, "productsScreenPropertySchema", {
|
|
|
92
92
|
}
|
|
93
93
|
});
|
|
94
94
|
|
|
95
|
-
//# sourceMappingURL=ProductsScreen-
|
|
95
|
+
//# sourceMappingURL=ProductsScreen-DOn1eC4t.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductsScreen-
|
|
1
|
+
{"version":3,"file":"ProductsScreen-DOn1eC4t.cjs","names":["PortalProductsApiProvider","PortalContentApiProvider","usePortalContentContext","useAccount","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 { useAppNavigation } from \"../shell/AppNavigationContext\";\nimport { useAccount } from \"../hooks/use-account\";\nimport { PortalProductsApiProvider } from \"../products/PortalProductsApiProvider\";\nimport {\n PortalContentApiProvider,\n usePortalContentContext,\n} from \"../content/PortalContentApiProvider\";\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 return (\n <div {...divProps} className={`h-full ${divProps.className ?? \"\"}`}>\n <PortalProductsApiProvider>\n <PortalContentApiProvider>\n <ProductsScreenContent />\n </PortalContentApiProvider>\n </PortalProductsApiProvider>\n </div>\n );\n}\n\n/** Inner component rendered inside providers so hooks can access context. */\nfunction ProductsScreenContent(): React.JSX.Element {\n const { productsApi: portalProductsApi } = usePortalContentContext();\n const { data: account } = useAccount();\n const { currentSlug, navigate } = useAppNavigation();\n\n const fetchProducts = useCallback(\n async (search: string, cursor?: string, limit?: number) => {\n if (search) {\n return portalProductsApi.searchProducts(search, { cursor, limit });\n }\n return portalProductsApi.listProducts({ cursor, limit });\n },\n [portalProductsApi],\n );\n\n const fetchProduct = useCallback(\n async (id: string | number) => portalProductsApi.getProduct(id),\n [portalProductsApi],\n );\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 user: account ? { id: account.id } : null,\n repContext: true,\n }),\n [account],\n );\n\n const uiConfig = useMemo(\n () => ({\n user: account\n ? {\n id: account.id,\n company: null, // TODO(portal-tenant): company branding not available from /api/account\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 [account, navigate],\n );\n\n return (\n <ShareablesCoreProvider config={coreConfig}>\n <ShareablesUIProvider config={uiConfig}>\n <ProductsApp\n countryCode={undefined}\n companyLogoUrl={undefined}\n fetchProducts={fetchProducts}\n fetchProduct={fetchProduct}\n productId={productId}\n onSelectProduct={handleSelectProduct}\n onBack={handleBack}\n />\n </ShareablesUIProvider>\n </ShareablesCoreProvider>\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":";;;;;;;;AA0BA,SAAgB,eAAe,EAE7B,YACA,WACA,aACA,SACA,cAEA,GAAG,YACsC;AACzC,QACE,iBAAA,GAAA,kBAAA,KAAC,OAAD;EAAK,GAAI;EAAU,WAAW,UAAU,SAAS,aAAa;YAC5D,iBAAA,GAAA,kBAAA,KAACA,kCAAAA,2BAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,KAACC,iCAAAA,0BAAD,EAAA,UACE,iBAAA,GAAA,kBAAA,KAAC,uBAAD,EAAyB,CAAA,EACA,CAAA,EACD,CAAA;EACxB,CAAA;;;AAKV,SAAS,wBAA2C;CAClD,MAAM,EAAE,aAAa,sBAAsBC,iCAAAA,yBAAyB;CACpE,MAAM,EAAE,MAAM,YAAYC,oBAAAA,YAAY;CACtC,MAAM,EAAE,aAAa,aAAaC,6BAAAA,kBAAkB;CAEpD,MAAM,iBAAA,GAAA,MAAA,aACJ,OAAO,QAAgB,QAAiB,UAAmB;AACzD,MAAI,OACF,QAAO,kBAAkB,eAAe,QAAQ;GAAE;GAAQ;GAAO,CAAC;AAEpE,SAAO,kBAA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
|
1
1
|
import { t as useAccount } from "./use-account-BJhzTl2j.mjs";
|
|
2
2
|
import { n as useAppNavigation } from "./AppNavigationContext-D29xW9Ua.mjs";
|
|
3
|
-
import { a as ShareablesUIProvider, n as usePortalContentContext, o as ShareablesCoreProvider, r as ProductsApp, t as PortalContentApiProvider } from "./PortalContentApiProvider-
|
|
3
|
+
import { a as ShareablesUIProvider, n as usePortalContentContext, o as ShareablesCoreProvider, r as ProductsApp, t as PortalContentApiProvider } from "./PortalContentApiProvider-CBm0adwh.mjs";
|
|
4
4
|
import { t as PortalProductsApiProvider } from "./PortalProductsApiProvider-BCXX9NGK.mjs";
|
|
5
5
|
import { useCallback, useMemo } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -80,4 +80,4 @@ const productsScreenPropertySchema = {
|
|
|
80
80
|
//#endregion
|
|
81
81
|
export { productsScreenPropertySchema as n, ProductsScreen as t };
|
|
82
82
|
|
|
83
|
-
//# sourceMappingURL=ProductsScreen-
|
|
83
|
+
//# sourceMappingURL=ProductsScreen-DWrE0FKE.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ProductsScreen-
|
|
1
|
+
{"version":3,"file":"ProductsScreen-DWrE0FKE.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 { useAppNavigation } from \"../shell/AppNavigationContext\";\nimport { useAccount } from \"../hooks/use-account\";\nimport { PortalProductsApiProvider } from \"../products/PortalProductsApiProvider\";\nimport {\n PortalContentApiProvider,\n usePortalContentContext,\n} from \"../content/PortalContentApiProvider\";\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 return (\n <div {...divProps} className={`h-full ${divProps.className ?? \"\"}`}>\n <PortalProductsApiProvider>\n <PortalContentApiProvider>\n <ProductsScreenContent />\n </PortalContentApiProvider>\n </PortalProductsApiProvider>\n </div>\n );\n}\n\n/** Inner component rendered inside providers so hooks can access context. */\nfunction ProductsScreenContent(): React.JSX.Element {\n const { productsApi: portalProductsApi } = usePortalContentContext();\n const { data: account } = useAccount();\n const { currentSlug, navigate } = useAppNavigation();\n\n const fetchProducts = useCallback(\n async (search: string, cursor?: string, limit?: number) => {\n if (search) {\n return portalProductsApi.searchProducts(search, { cursor, limit });\n }\n return portalProductsApi.listProducts({ cursor, limit });\n },\n [portalProductsApi],\n );\n\n const fetchProduct = useCallback(\n async (id: string | number) => portalProductsApi.getProduct(id),\n [portalProductsApi],\n );\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 user: account ? { id: account.id } : null,\n repContext: true,\n }),\n [account],\n );\n\n const uiConfig = useMemo(\n () => ({\n user: account\n ? {\n id: account.id,\n company: null, // TODO(portal-tenant): company branding not available from /api/account\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 [account, navigate],\n );\n\n return (\n <ShareablesCoreProvider config={coreConfig}>\n <ShareablesUIProvider config={uiConfig}>\n <ProductsApp\n countryCode={undefined}\n companyLogoUrl={undefined}\n fetchProducts={fetchProducts}\n fetchProduct={fetchProduct}\n productId={productId}\n onSelectProduct={handleSelectProduct}\n onBack={handleBack}\n />\n </ShareablesUIProvider>\n </ShareablesCoreProvider>\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":";;;;;;;AA0BA,SAAgB,eAAe,EAE7B,YACA,WACA,aACA,SACA,cAEA,GAAG,YACsC;AACzC,QACE,oBAAC,OAAD;EAAK,GAAI;EAAU,WAAW,UAAU,SAAS,aAAa;YAC5D,oBAAC,2BAAD,EAAA,UACE,oBAAC,0BAAD,EAAA,UACE,oBAAC,uBAAD,EAAyB,CAAA,EACA,CAAA,EACD,CAAA;EACxB,CAAA;;;AAKV,SAAS,wBAA2C;CAClD,MAAM,EAAE,aAAa,sBAAsB,yBAAyB;CACpE,MAAM,EAAE,MAAM,YAAY,YAAY;CACtC,MAAM,EAAE,aAAa,aAAa,kBAAkB;CAEpD,MAAM,gBAAgB,YACpB,OAAO,QAAgB,QAAiB,UAAmB;AACzD,MAAI,OACF,QAAO,kBAAkB,eAAe,QAAQ;GAAE;GAAQ;GAAO,CAAC;AAEpE,SAAO,kBAAkB,aAAa;GAAE;GAAQ;GAAO,CAAC;IAE1D,CAAC,kBAAkB,CACpB;CAED,MAAM,eAAe,YACnB,OAAO,OAAwB,kBAAkB,WAAW,GAAG,EAC/D,CAAC,kBAAkB,CACpB;CAGD,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;AAgCd,QACE,oBAAC,wBAAD;EAAwB,QA/BP,eACV;GACL,MAAM,UAAU,EAAE,IAAI,QAAQ,IAAI,GAAG;GACrC,YAAY;GACb,GACD,CAAC,QAAQ,CACV;YA0BG,oBAAC,sBAAD;GAAsB,QAxBT,eACR;IACL,MAAM,UACF;KACE,IAAI,QAAQ;KACZ,SAAS;KACV,GACD,KAAA;IACJ,UAAU;IACV,WAAW,SAAiB;AAC1B,cAAS,KAAK;;IAEhB,YAAY,SAGN;AACJ,aAAQ,IAAI,cAAc,KAAK,KAAK,IAAI,KAAK,QAAQ;;IAExD,GACD,CAAC,SAAS,SAAS,CACpB;aAKK,oBAAC,aAAD;IACE,aAAa,KAAA;IACb,gBAAgB,KAAA;IACD;IACD;IACH;IACX,iBAAiB;IACjB,QAAQ;IACR,CAAA;GACmB,CAAA;EACA,CAAA;;AAI7B,MAAa,+BAAqD;CAChE,YAAY;CACZ,aAAa;CACb,YAAY,CAAC;EAAE,IAAI;EAAW,OAAO;EAAW,CAAC;CACjD,QAAQ,EAAE;CACX"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require("./chunk-9hOWP6kD.cjs");
|
|
2
2
|
const require_use_account = require("./use-account-CrgtI83z.cjs");
|
|
3
3
|
const require_AppNavigationContext = require("./AppNavigationContext-BiYNDj_X.cjs");
|
|
4
|
-
const require_PortalContentApiProvider = require("./PortalContentApiProvider-
|
|
4
|
+
const require_PortalContentApiProvider = require("./PortalContentApiProvider-BMflGLYQ.cjs");
|
|
5
5
|
const require_PortalProductsApiProvider = require("./PortalProductsApiProvider-BquMHwvt.cjs");
|
|
6
6
|
let react = require("react");
|
|
7
7
|
let react_jsx_runtime = require("react/jsx-runtime");
|
|
@@ -141,4 +141,4 @@ Object.defineProperty(exports, "shareablesScreenPropertySchema", {
|
|
|
141
141
|
}
|
|
142
142
|
});
|
|
143
143
|
|
|
144
|
-
//# sourceMappingURL=ShareablesScreen-
|
|
144
|
+
//# sourceMappingURL=ShareablesScreen-C3_fEMc0.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShareablesScreen-
|
|
1
|
+
{"version":3,"file":"ShareablesScreen-C3_fEMc0.cjs","names":["PortalProductsApiProvider","PortalContentApiProvider","usePortalContentContext","useAccount","useAppNavigation","ShareablesCoreProvider","ShareablesUIProvider","ShareablesApp"],"sources":["../src/screens/ShareablesScreen.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, ShareablesApp } from \"@fluid-app/shareables-ui\";\nimport { useAppNavigation } from \"../shell/AppNavigationContext\";\nimport { useAccount } from \"../hooks/use-account\";\nimport { PortalProductsApiProvider } from \"../products/PortalProductsApiProvider\";\nimport {\n PortalContentApiProvider,\n usePortalContentContext,\n} from \"../content/PortalContentApiProvider\";\n\ntype ShareablesScreenProps = ComponentProps<\"div\"> & {\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n};\n\n/**\n * Parse the current shareables sub-route from the full slug.\n *\n * System nav slugs are \"share/products\", \"share/media\", \"share/playlists\".\n * Detail pages append an ID: \"share/products/123\", \"share/media/456\".\n *\n * \"share/products\" → screen=\"products\", detailId=null\n * \"share/products/123\" → screen=\"products\", detailId=\"123\"\n * \"share/media/456\" → screen=\"media\", detailId=\"456\"\n * \"share/playlists\" → screen=\"playlists\", detailId=null\n * \"share/playlists/789\" → screen=\"playlists\", detailId=\"789\"\n * \"share/files\" → screen=\"files\", detailId=null\n * \"share\" → screen=null (default to products)\n */\nfunction parseShareablesRoute(currentSlug: string): {\n screen: string | null;\n detailId: string | null;\n action: string | null;\n} {\n // Strip the \"share\" prefix\n const slugWithoutPrefix = currentSlug.replace(/^share\\/?/, \"\");\n if (!slugWithoutPrefix) {\n return { screen: null, detailId: null, action: null };\n }\n\n const parts = slugWithoutPrefix.split(\"/\");\n const screen = parts[0] || null;\n const detailId = parts[1] || null;\n const action = parts[2] || null;\n return { screen, detailId, action };\n}\n\nexport function ShareablesScreen({\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}: ShareablesScreenProps): React.JSX.Element {\n return (\n <div {...divProps} className={`h-full ${divProps.className ?? \"\"}`}>\n <PortalProductsApiProvider>\n <PortalContentApiProvider>\n <ShareablesScreenContent />\n </PortalContentApiProvider>\n </PortalProductsApiProvider>\n </div>\n );\n}\n\n/** Inner component rendered inside providers so hooks can access context. */\nfunction ShareablesScreenContent(): React.JSX.Element {\n const shareablesCtx = usePortalContentContext();\n const { productsApi: portalProductsApi } = shareablesCtx;\n const { data: account } = useAccount();\n const { currentSlug, navigate } = useAppNavigation();\n const isCustomer = account?.member_type === \"customer\";\n\n const fetchProducts = useCallback(\n async (search: string, cursor?: string, limit?: number) => {\n if (search) {\n return portalProductsApi.searchProducts(search, { cursor, limit });\n }\n return portalProductsApi.listProducts({ cursor, limit });\n },\n [portalProductsApi],\n );\n\n const fetchProduct = useCallback(\n async (id: string | number) => portalProductsApi.getProduct(id),\n [portalProductsApi],\n );\n\n const { screen, detailId, action } = parseShareablesRoute(currentSlug);\n\n const handleNavigate = useCallback(\n (subScreen: string, id?: string) => {\n const path = id ? `share/${subScreen}/${id}` : `share/${subScreen}`;\n navigate(path);\n },\n [navigate],\n );\n\n const handleBack = useCallback(() => {\n if (detailId && screen) {\n navigate(`share/${screen}`);\n } else {\n navigate(\"share/products\");\n }\n }, [navigate, detailId, screen]);\n\n const coreConfig = useMemo(\n () => ({\n user: account ? { id: account.id } : null,\n repContext: true,\n }),\n [account],\n );\n\n const uiConfig = useMemo(\n () => ({\n user: account\n ? {\n id: account.id,\n company: null, // TODO(portal-tenant): company branding not available from /api/account\n }\n : undefined,\n // TODO(portal-tenant): affiliate_id not available from /api/account\n affiliateId: null,\n basePath: \"\",\n navigate: (path: string) => {\n const cleanPath = path.replace(/^\\//, \"\");\n const prefixed = cleanPath.startsWith(\"share/\")\n ? cleanPath\n : `share/${cleanPath}`;\n navigate(prefixed);\n },\n showToast: (opts: {\n title: string;\n type: \"success\" | \"error\" | \"warning\";\n }) => {\n console.warn(`[Shareables] ${opts.type}: ${opts.title}`);\n },\n filePickerApi: shareablesCtx.filePickerApi,\n // TODO(portal-tenant): affiliate_id not available from /api/account; favorites disabled\n onToggleFavorite: undefined,\n onDeletePlaylist: isCustomer\n ? undefined\n : async (playlistId: number) => {\n await shareablesCtx.playlistsAdapter.deletePlaylist(playlistId);\n },\n readOnly: isCustomer,\n }),\n [\n account,\n navigate,\n shareablesCtx.filePickerApi,\n isCustomer,\n shareablesCtx.playlistsAdapter,\n ],\n );\n\n return (\n <ShareablesCoreProvider config={coreConfig}>\n <ShareablesUIProvider config={uiConfig}>\n <ShareablesApp\n screen={screen}\n detailId={detailId}\n action={action}\n companyLogoUrl={undefined}\n countryCode={undefined}\n fetchProducts={fetchProducts}\n fetchProduct={fetchProduct}\n onNavigate={handleNavigate}\n onBack={handleBack}\n />\n </ShareablesUIProvider>\n </ShareablesCoreProvider>\n );\n}\n\nexport const shareablesScreenPropertySchema: WidgetPropertySchema = {\n widgetType: \"ShareablesScreen\",\n displayName: \"Shareables Screen\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;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AY,CAAC;EAAE,IAAI;EAAW,OAAO;EAAW,CAAC;CACjD,QAAQ,EAAE;CACX"}
|
|
@@ -6,9 +6,9 @@ require("./dist-thaj08s5.cjs");
|
|
|
6
6
|
require("./es-xQF-WIMq.cjs");
|
|
7
7
|
require("./SearchSort-CYhjl8tC.cjs");
|
|
8
8
|
require("./dist-BSKQ_GoC.cjs");
|
|
9
|
-
require("./PortalContentApiProvider-
|
|
9
|
+
require("./PortalContentApiProvider-BMflGLYQ.cjs");
|
|
10
10
|
require("./dist-BF_4vk1z.cjs");
|
|
11
11
|
require("./PortalProductsApiProvider-BquMHwvt.cjs");
|
|
12
|
-
const require_ShareablesScreen = require("./ShareablesScreen-
|
|
12
|
+
const require_ShareablesScreen = require("./ShareablesScreen-C3_fEMc0.cjs");
|
|
13
13
|
exports.ShareablesScreen = require_ShareablesScreen.ShareablesScreen;
|
|
14
14
|
exports.shareablesScreenPropertySchema = require_ShareablesScreen.shareablesScreenPropertySchema;
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
import "./es-DfBgEQMu.mjs";
|
|
2
2
|
import "./account-api-context-R4VVlZdv.mjs";
|
|
3
|
-
import "./PortalTenantClientProvider-_VXOs0t4.mjs";
|
|
4
3
|
import "./src-hUw6fI7h.mjs";
|
|
5
4
|
import "./ScreenHeaderContext-DjSO5A8k.mjs";
|
|
6
|
-
import "./AppNavigationContext-D29xW9Ua.mjs";
|
|
7
5
|
import "./dist-CkIGP8my.mjs";
|
|
8
6
|
import "./SearchSort-Br8J8JS8.mjs";
|
|
9
7
|
import "./dist-C9vpl_rR.mjs";
|
|
10
|
-
import "./PortalContentApiProvider-
|
|
8
|
+
import "./PortalContentApiProvider-CBm0adwh.mjs";
|
|
11
9
|
import "./sortable.esm-E6JdQn7I.mjs";
|
|
12
10
|
import "./PortalProductsApiProvider-BCXX9NGK.mjs";
|
|
13
|
-
import { n as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-
|
|
11
|
+
import { n as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-eCUiJFdU.mjs";
|
|
14
12
|
export { ShareablesScreen, shareablesScreenPropertySchema };
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { t as useAccount } from "./use-account-BJhzTl2j.mjs";
|
|
2
2
|
import { n as useAppNavigation } from "./AppNavigationContext-D29xW9Ua.mjs";
|
|
3
|
-
import { a as ShareablesUIProvider, i as ShareablesApp, n as usePortalContentContext, o as ShareablesCoreProvider, t as PortalContentApiProvider } from "./PortalContentApiProvider-
|
|
3
|
+
import { a as ShareablesUIProvider, i as ShareablesApp, n as usePortalContentContext, o as ShareablesCoreProvider, t as PortalContentApiProvider } from "./PortalContentApiProvider-CBm0adwh.mjs";
|
|
4
4
|
import { t as PortalProductsApiProvider } from "./PortalProductsApiProvider-BCXX9NGK.mjs";
|
|
5
5
|
import { useCallback, useMemo } from "react";
|
|
6
6
|
import { jsx } from "react/jsx-runtime";
|
|
@@ -129,4 +129,4 @@ const shareablesScreenPropertySchema = {
|
|
|
129
129
|
//#endregion
|
|
130
130
|
export { shareablesScreenPropertySchema as n, ShareablesScreen as t };
|
|
131
131
|
|
|
132
|
-
//# sourceMappingURL=ShareablesScreen-
|
|
132
|
+
//# sourceMappingURL=ShareablesScreen-eCUiJFdU.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ShareablesScreen-
|
|
1
|
+
{"version":3,"file":"ShareablesScreen-eCUiJFdU.mjs","names":[],"sources":["../src/screens/ShareablesScreen.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, ShareablesApp } from \"@fluid-app/shareables-ui\";\nimport { useAppNavigation } from \"../shell/AppNavigationContext\";\nimport { useAccount } from \"../hooks/use-account\";\nimport { PortalProductsApiProvider } from \"../products/PortalProductsApiProvider\";\nimport {\n PortalContentApiProvider,\n usePortalContentContext,\n} from \"../content/PortalContentApiProvider\";\n\ntype ShareablesScreenProps = ComponentProps<\"div\"> & {\n background?: BackgroundValue;\n textColor?: ColorOptions;\n accentColor?: ColorOptions;\n padding?: PaddingOptions;\n borderRadius?: BorderRadiusOptions;\n};\n\n/**\n * Parse the current shareables sub-route from the full slug.\n *\n * System nav slugs are \"share/products\", \"share/media\", \"share/playlists\".\n * Detail pages append an ID: \"share/products/123\", \"share/media/456\".\n *\n * \"share/products\" → screen=\"products\", detailId=null\n * \"share/products/123\" → screen=\"products\", detailId=\"123\"\n * \"share/media/456\" → screen=\"media\", detailId=\"456\"\n * \"share/playlists\" → screen=\"playlists\", detailId=null\n * \"share/playlists/789\" → screen=\"playlists\", detailId=\"789\"\n * \"share/files\" → screen=\"files\", detailId=null\n * \"share\" → screen=null (default to products)\n */\nfunction parseShareablesRoute(currentSlug: string): {\n screen: string | null;\n detailId: string | null;\n action: string | null;\n} {\n // Strip the \"share\" prefix\n const slugWithoutPrefix = currentSlug.replace(/^share\\/?/, \"\");\n if (!slugWithoutPrefix) {\n return { screen: null, detailId: null, action: null };\n }\n\n const parts = slugWithoutPrefix.split(\"/\");\n const screen = parts[0] || null;\n const detailId = parts[1] || null;\n const action = parts[2] || null;\n return { screen, detailId, action };\n}\n\nexport function ShareablesScreen({\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}: ShareablesScreenProps): React.JSX.Element {\n return (\n <div {...divProps} className={`h-full ${divProps.className ?? \"\"}`}>\n <PortalProductsApiProvider>\n <PortalContentApiProvider>\n <ShareablesScreenContent />\n </PortalContentApiProvider>\n </PortalProductsApiProvider>\n </div>\n );\n}\n\n/** Inner component rendered inside providers so hooks can access context. */\nfunction ShareablesScreenContent(): React.JSX.Element {\n const shareablesCtx = usePortalContentContext();\n const { productsApi: portalProductsApi } = shareablesCtx;\n const { data: account } = useAccount();\n const { currentSlug, navigate } = useAppNavigation();\n const isCustomer = account?.member_type === \"customer\";\n\n const fetchProducts = useCallback(\n async (search: string, cursor?: string, limit?: number) => {\n if (search) {\n return portalProductsApi.searchProducts(search, { cursor, limit });\n }\n return portalProductsApi.listProducts({ cursor, limit });\n },\n [portalProductsApi],\n );\n\n const fetchProduct = useCallback(\n async (id: string | number) => portalProductsApi.getProduct(id),\n [portalProductsApi],\n );\n\n const { screen, detailId, action } = parseShareablesRoute(currentSlug);\n\n const handleNavigate = useCallback(\n (subScreen: string, id?: string) => {\n const path = id ? `share/${subScreen}/${id}` : `share/${subScreen}`;\n navigate(path);\n },\n [navigate],\n );\n\n const handleBack = useCallback(() => {\n if (detailId && screen) {\n navigate(`share/${screen}`);\n } else {\n navigate(\"share/products\");\n }\n }, [navigate, detailId, screen]);\n\n const coreConfig = useMemo(\n () => ({\n user: account ? { id: account.id } : null,\n repContext: true,\n }),\n [account],\n );\n\n const uiConfig = useMemo(\n () => ({\n user: account\n ? {\n id: account.id,\n company: null, // TODO(portal-tenant): company branding not available from /api/account\n }\n : undefined,\n // TODO(portal-tenant): affiliate_id not available from /api/account\n affiliateId: null,\n basePath: \"\",\n navigate: (path: string) => {\n const cleanPath = path.replace(/^\\//, \"\");\n const prefixed = cleanPath.startsWith(\"share/\")\n ? cleanPath\n : `share/${cleanPath}`;\n navigate(prefixed);\n },\n showToast: (opts: {\n title: string;\n type: \"success\" | \"error\" | \"warning\";\n }) => {\n console.warn(`[Shareables] ${opts.type}: ${opts.title}`);\n },\n filePickerApi: shareablesCtx.filePickerApi,\n // TODO(portal-tenant): affiliate_id not available from /api/account; favorites disabled\n onToggleFavorite: undefined,\n onDeletePlaylist: isCustomer\n ? undefined\n : async (playlistId: number) => {\n await shareablesCtx.playlistsAdapter.deletePlaylist(playlistId);\n },\n readOnly: isCustomer,\n }),\n [\n account,\n navigate,\n shareablesCtx.filePickerApi,\n isCustomer,\n shareablesCtx.playlistsAdapter,\n ],\n );\n\n return (\n <ShareablesCoreProvider config={coreConfig}>\n <ShareablesUIProvider config={uiConfig}>\n <ShareablesApp\n screen={screen}\n detailId={detailId}\n action={action}\n companyLogoUrl={undefined}\n countryCode={undefined}\n fetchProducts={fetchProducts}\n fetchProduct={fetchProduct}\n onNavigate={handleNavigate}\n onBack={handleBack}\n />\n </ShareablesUIProvider>\n </ShareablesCoreProvider>\n );\n}\n\nexport const shareablesScreenPropertySchema: WidgetPropertySchema = {\n widgetType: \"ShareablesScreen\",\n displayName: \"Shareables Screen\",\n tabsConfig: [{ id: \"styling\", label: \"Styling\" }],\n fields: [],\n} as const satisfies WidgetPropertySchema;\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;AAwCA,SAAS,qBAAqB,aAI5B;CAEA,MAAM,oBAAoB,YAAY,QAAQ,aAAa,GAAG;AAC9D,KAAI,CAAC,kBACH,QAAO;EAAE,QAAQ;EAAM,UAAU;EAAM,QAAQ;EAAM;CAGvD,MAAM,QAAQ,kBAAkB,MAAM,IAAI;AAI1C,QAAO;EAAE,QAHM,MAAM,MAAM;EAGV,UAFA,MAAM,MAAM;EAEF,QADZ,MAAM,MAAM;EACQ;;AAGrC,SAAgB,iBAAiB,EAE/B,YACA,WACA,aACA,SACA,cAEA,GAAG,YACwC;AAC3C,QACE,oBAAC,OAAD;EAAK,GAAI;EAAU,WAAW,UAAU,SAAS,aAAa;YAC5D,oBAAC,2BAAD,EAAA,UACE,oBAAC,0BAAD,EAAA,UACE,oBAAC,yBAAD,EAA2B,CAAA,EACF,CAAA,EACD,CAAA;EACxB,CAAA;;;AAKV,SAAS,0BAA6C;CACpD,MAAM,gBAAgB,yBAAyB;CAC/C,MAAM,EAAE,aAAa,sBAAsB;CAC3C,MAAM,EAAE,MAAM,YAAY,YAAY;CACtC,MAAM,EAAE,aAAa,aAAa,kB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E;IACA;IACA,cAAc;IACd;IACA,cAAc;IACf,CACF;aAKK,oBAAC,eAAD;IACU;IACE;IACF;IACR,gBAAgB,KAAA;IAChB,aAAa,KAAA;IACE;IACD;IACd,YAAY;IACZ,QAAQ;IACR,CAAA;GACmB,CAAA;EACA,CAAA;;AAI7B,MAAa,iCAAuD;CAClE,YAAY;CACZ,aAAa;CACb,YAAY,CAAC;EAAE,IAAI;EAAW,OAAO;EAAW,CAAC;CACjD,QAAQ,EAAE;CACX"}
|
package/dist/index.cjs
CHANGED
|
@@ -53,12 +53,12 @@ require("./src-B47XcHTS.cjs");
|
|
|
53
53
|
require("./dist-BSKQ_GoC.cjs");
|
|
54
54
|
const require_OrdersScreen = require("./OrdersScreen-BKCQdz5A.cjs");
|
|
55
55
|
const require_SubscriptionsScreen = require("./SubscriptionsScreen-BdGF5OLE.cjs");
|
|
56
|
-
require("./PortalContentApiProvider-
|
|
56
|
+
require("./PortalContentApiProvider-BMflGLYQ.cjs");
|
|
57
57
|
require("./dist-BF_4vk1z.cjs");
|
|
58
58
|
require("./PortalProductsApiProvider-BquMHwvt.cjs");
|
|
59
|
-
const require_ProductsScreen = require("./ProductsScreen-
|
|
59
|
+
const require_ProductsScreen = require("./ProductsScreen-DOn1eC4t.cjs");
|
|
60
60
|
const require_MySiteScreen = require("./MySiteScreen-Lr2SbrXz.cjs");
|
|
61
|
-
const require_ShareablesScreen = require("./ShareablesScreen-
|
|
61
|
+
const require_ShareablesScreen = require("./ShareablesScreen-C3_fEMc0.cjs");
|
|
62
62
|
const require_ShopScreen = require("./ShopScreen-D9clGspu.cjs");
|
|
63
63
|
require("./UpgradeScreen-DDSFWDYA.cjs");
|
|
64
64
|
require("./AppDownloadScreen-BSkt2tYd.cjs");
|
|
@@ -2571,8 +2571,8 @@ const MessagingScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => req
|
|
|
2571
2571
|
const ContactsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ContactsScreen-B3QKcB7X.cjs")).then((m) => ({ default: m.ContactsScreen })));
|
|
2572
2572
|
const ShopScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShopScreen-Dvsz_wyc.cjs")).then((m) => ({ default: m.ShopScreen })));
|
|
2573
2573
|
const CustomersScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./CustomersScreen-CSLbl2As.cjs")).then((n) => n.CustomersScreen_exports).then((m) => ({ default: m.CustomersScreen })));
|
|
2574
|
-
const ProductsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProductsScreen-
|
|
2575
|
-
const ShareablesScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShareablesScreen-
|
|
2574
|
+
const ProductsScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ProductsScreen-CYRCTRvW.cjs")).then((m) => ({ default: m.ProductsScreen })));
|
|
2575
|
+
const ShareablesScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./ShareablesScreen-ChpDLh7n.cjs")).then((m) => ({ default: m.ShareablesScreen })));
|
|
2576
2576
|
const MySiteScreen$1 = (0, react.lazy)(() => Promise.resolve().then(() => require("./MySiteScreen-DRMrEMEI.cjs")).then((m) => ({ default: m.MySiteScreen })));
|
|
2577
2577
|
const UpgradeScreen = (0, react.lazy)(() => Promise.resolve().then(() => require("./UpgradeScreen-C1s3IWEJ.cjs")).then((m) => ({ default: m.UpgradeScreen })));
|
|
2578
2578
|
const AppDownloadScreen = (0, react.lazy)(() => Promise.resolve().then(() => require("./AppDownloadScreen-BSkt2tYd.cjs")).then((n) => n.AppDownloadScreen_exports).then((m) => ({ default: m.AppDownloadScreen })));
|
|
@@ -4036,9 +4036,9 @@ const screenPropertySchemas = {
|
|
|
4036
4036
|
OrdersScreen: () => Promise.resolve().then(() => require("./OrdersScreen-B6n41CbG.cjs")).then((m) => m.ordersScreenPropertySchema),
|
|
4037
4037
|
SubscriptionsScreen: () => Promise.resolve().then(() => require("./SubscriptionsScreen-Cwa2lR1D.cjs")).then((m) => m.subscriptionsScreenPropertySchema),
|
|
4038
4038
|
CustomersScreen: () => Promise.resolve().then(() => require("./CustomersScreen-CSLbl2As.cjs")).then((n) => n.CustomersScreen_exports).then((m) => m.customersScreenPropertySchema),
|
|
4039
|
-
ProductsScreen: () => Promise.resolve().then(() => require("./ProductsScreen-
|
|
4039
|
+
ProductsScreen: () => Promise.resolve().then(() => require("./ProductsScreen-CYRCTRvW.cjs")).then((m) => m.productsScreenPropertySchema),
|
|
4040
4040
|
MySiteScreen: () => Promise.resolve().then(() => require("./MySiteScreen-DRMrEMEI.cjs")).then((m) => m.mySiteScreenPropertySchema),
|
|
4041
|
-
ShareablesScreen: () => Promise.resolve().then(() => require("./ShareablesScreen-
|
|
4041
|
+
ShareablesScreen: () => Promise.resolve().then(() => require("./ShareablesScreen-ChpDLh7n.cjs")).then((m) => m.shareablesScreenPropertySchema),
|
|
4042
4042
|
ShopScreen: () => Promise.resolve().then(() => require("./ShopScreen-Dvsz_wyc.cjs")).then((m) => m.shopScreenPropertySchema),
|
|
4043
4043
|
UpgradeScreen: () => Promise.resolve().then(() => require("./UpgradeScreen-C1s3IWEJ.cjs")).then((m) => m.upgradeScreenPropertySchema),
|
|
4044
4044
|
AppDownloadScreen: () => Promise.resolve().then(() => require("./AppDownloadScreen-BSkt2tYd.cjs")).then((n) => n.AppDownloadScreen_exports).then((m) => m.appDownloadScreenPropertySchema)
|
package/dist/index.mjs
CHANGED
|
@@ -51,12 +51,12 @@ import "./src-DAC9DwXZ.mjs";
|
|
|
51
51
|
import "./dist-C9vpl_rR.mjs";
|
|
52
52
|
import { r as ordersScreenPropertySchema, t as OrdersScreen } from "./OrdersScreen-CFRVfzez.mjs";
|
|
53
53
|
import { r as subscriptionsScreenPropertySchema, t as SubscriptionsScreen } from "./SubscriptionsScreen-Dn3AEUJi.mjs";
|
|
54
|
-
import "./PortalContentApiProvider-
|
|
54
|
+
import "./PortalContentApiProvider-CBm0adwh.mjs";
|
|
55
55
|
import "./sortable.esm-E6JdQn7I.mjs";
|
|
56
56
|
import "./PortalProductsApiProvider-BCXX9NGK.mjs";
|
|
57
|
-
import { n as productsScreenPropertySchema, t as ProductsScreen } from "./ProductsScreen-
|
|
57
|
+
import { n as productsScreenPropertySchema, t as ProductsScreen } from "./ProductsScreen-DWrE0FKE.mjs";
|
|
58
58
|
import { r as mySiteScreenPropertySchema, t as MySiteScreen } from "./MySiteScreen-CG2DnzQH.mjs";
|
|
59
|
-
import { n as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-
|
|
59
|
+
import { n as shareablesScreenPropertySchema, t as ShareablesScreen } from "./ShareablesScreen-eCUiJFdU.mjs";
|
|
60
60
|
import { r as shopScreenPropertySchema, t as ShopScreen } from "./ShopScreen-DW0puWGa.mjs";
|
|
61
61
|
import "./UpgradeScreen-KxjpcpiH.mjs";
|
|
62
62
|
import "./AppDownloadScreen-oSfoycT9.mjs";
|
|
@@ -2569,8 +2569,8 @@ const MessagingScreen$1 = lazy(() => import("./MessagingScreen-B78wJC_8.mjs").th
|
|
|
2569
2569
|
const ContactsScreen$1 = lazy(() => import("./ContactsScreen-D-bONbrH.mjs").then((n) => n.n).then((m) => ({ default: m.ContactsScreen })));
|
|
2570
2570
|
const ShopScreen$1 = lazy(() => import("./ShopScreen-DW0puWGa.mjs").then((n) => n.n).then((m) => ({ default: m.ShopScreen })));
|
|
2571
2571
|
const CustomersScreen$1 = lazy(() => import("./CustomersScreen-DeQj6gi4.mjs").then((n) => n.n).then((m) => ({ default: m.CustomersScreen })));
|
|
2572
|
-
const ProductsScreen$1 = lazy(() => import("./ProductsScreen-
|
|
2573
|
-
const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-
|
|
2572
|
+
const ProductsScreen$1 = lazy(() => import("./ProductsScreen-D810-dkz.mjs").then((m) => ({ default: m.ProductsScreen })));
|
|
2573
|
+
const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-CxWuxuGd.mjs").then((m) => ({ default: m.ShareablesScreen })));
|
|
2574
2574
|
const MySiteScreen$1 = lazy(() => import("./MySiteScreen-CG2DnzQH.mjs").then((n) => n.n).then((m) => ({ default: m.MySiteScreen })));
|
|
2575
2575
|
const UpgradeScreen = lazy(() => import("./UpgradeScreen-KxjpcpiH.mjs").then((n) => n.t).then((m) => ({ default: m.UpgradeScreen })));
|
|
2576
2576
|
const AppDownloadScreen = lazy(() => import("./AppDownloadScreen-oSfoycT9.mjs").then((n) => n.t).then((m) => ({ default: m.AppDownloadScreen })));
|
|
@@ -4034,9 +4034,9 @@ const screenPropertySchemas = {
|
|
|
4034
4034
|
OrdersScreen: () => import("./OrdersScreen-CFRVfzez.mjs").then((n) => n.n).then((m) => m.ordersScreenPropertySchema),
|
|
4035
4035
|
SubscriptionsScreen: () => import("./SubscriptionsScreen-Dn3AEUJi.mjs").then((n) => n.n).then((m) => m.subscriptionsScreenPropertySchema),
|
|
4036
4036
|
CustomersScreen: () => import("./CustomersScreen-DeQj6gi4.mjs").then((n) => n.n).then((m) => m.customersScreenPropertySchema),
|
|
4037
|
-
ProductsScreen: () => import("./ProductsScreen-
|
|
4037
|
+
ProductsScreen: () => import("./ProductsScreen-D810-dkz.mjs").then((m) => m.productsScreenPropertySchema),
|
|
4038
4038
|
MySiteScreen: () => import("./MySiteScreen-CG2DnzQH.mjs").then((n) => n.n).then((m) => m.mySiteScreenPropertySchema),
|
|
4039
|
-
ShareablesScreen: () => import("./ShareablesScreen-
|
|
4039
|
+
ShareablesScreen: () => import("./ShareablesScreen-CxWuxuGd.mjs").then((m) => m.shareablesScreenPropertySchema),
|
|
4040
4040
|
ShopScreen: () => import("./ShopScreen-DW0puWGa.mjs").then((n) => n.n).then((m) => m.shopScreenPropertySchema),
|
|
4041
4041
|
UpgradeScreen: () => import("./UpgradeScreen-KxjpcpiH.mjs").then((n) => n.t).then((m) => m.upgradeScreenPropertySchema),
|
|
4042
4042
|
AppDownloadScreen: () => import("./AppDownloadScreen-oSfoycT9.mjs").then((n) => n.t).then((m) => m.appDownloadScreenPropertySchema)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluid-app/portal-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.167",
|
|
4
4
|
"description": "SDK for building custom Fluid portals",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -71,43 +71,43 @@
|
|
|
71
71
|
"tsdown": "^0.21.0",
|
|
72
72
|
"typescript": "^5",
|
|
73
73
|
"zod": "4.3.5",
|
|
74
|
-
"@fluid-app/api-client-core": "0.1.0",
|
|
75
74
|
"@fluid-app/auth": "0.1.0",
|
|
75
|
+
"@fluid-app/cart-ui": "0.1.16",
|
|
76
|
+
"@fluid-app/api-client-core": "0.1.0",
|
|
76
77
|
"@fluid-app/company-switcher-core": "0.1.0",
|
|
77
78
|
"@fluid-app/company-switcher-ui": "0.1.0",
|
|
78
79
|
"@fluid-app/contacts-api-client": "0.1.0",
|
|
79
|
-
"@fluid-app/contacts-core": "0.1.0",
|
|
80
80
|
"@fluid-app/contacts-ui": "0.1.0",
|
|
81
|
+
"@fluid-app/contacts-core": "0.1.0",
|
|
81
82
|
"@fluid-app/file-picker-api-client": "0.1.0",
|
|
82
|
-
"@fluid-app/
|
|
83
|
+
"@fluid-app/fluid-pay-api-client": "0.1.0",
|
|
83
84
|
"@fluid-app/file-picker-core": "0.1.0",
|
|
84
85
|
"@fluid-app/fluid-pay-core": "0.1.0",
|
|
85
|
-
"@fluid-app/fluid-pay-api-client": "0.1.0",
|
|
86
|
-
"@fluid-app/fluidos-api-client": "0.1.0",
|
|
87
86
|
"@fluid-app/messaging-api-client": "0.1.0",
|
|
88
|
-
"@fluid-app/
|
|
87
|
+
"@fluid-app/fluidos-api-client": "0.1.0",
|
|
89
88
|
"@fluid-app/messaging-core": "0.1.0",
|
|
89
|
+
"@fluid-app/messaging-ui": "0.1.0",
|
|
90
90
|
"@fluid-app/mysite-core": "0.1.0",
|
|
91
|
-
"@fluid-app/mysite-ui": "0.1.0",
|
|
92
91
|
"@fluid-app/orders-core": "0.1.0",
|
|
92
|
+
"@fluid-app/mysite-ui": "0.1.0",
|
|
93
93
|
"@fluid-app/orders-ui": "0.1.0",
|
|
94
94
|
"@fluid-app/permissions": "0.1.0",
|
|
95
95
|
"@fluid-app/portal-core": "0.1.23",
|
|
96
96
|
"@fluid-app/portal-preview": "0.1.0",
|
|
97
|
-
"@fluid-app/portal-app-download-ui": "0.1.0",
|
|
98
|
-
"@fluid-app/portal-pro-upgrade-ui": "0.1.0",
|
|
99
97
|
"@fluid-app/portal-react": "0.1.0",
|
|
98
|
+
"@fluid-app/portal-app-download-ui": "0.1.0",
|
|
100
99
|
"@fluid-app/portal-tenant-api-client": "0.1.0",
|
|
101
100
|
"@fluid-app/portal-tenant-contacts-api-client": "0.1.0",
|
|
101
|
+
"@fluid-app/portal-pro-upgrade-ui": "0.1.0",
|
|
102
102
|
"@fluid-app/portal-tenant-content-api-client": "0.1.0",
|
|
103
103
|
"@fluid-app/portal-tenant-mysite-api-client": "0.1.0",
|
|
104
|
-
"@fluid-app/portal-tenant-pay-api-client": "0.1.0",
|
|
105
104
|
"@fluid-app/portal-widgets": "0.1.22",
|
|
105
|
+
"@fluid-app/portal-tenant-pay-api-client": "0.1.0",
|
|
106
106
|
"@fluid-app/products-api-client": "0.1.0",
|
|
107
107
|
"@fluid-app/products-core": "0.1.0",
|
|
108
108
|
"@fluid-app/profile-core": "0.1.0",
|
|
109
|
-
"@fluid-app/profile-ui": "0.1.0",
|
|
110
109
|
"@fluid-app/query-persister": "0.1.0",
|
|
110
|
+
"@fluid-app/profile-ui": "0.1.0",
|
|
111
111
|
"@fluid-app/shareables-api-client": "0.1.0",
|
|
112
112
|
"@fluid-app/shareables-core": "0.1.0",
|
|
113
113
|
"@fluid-app/shareables-ui": "0.1.0",
|
|
@@ -115,8 +115,8 @@
|
|
|
115
115
|
"@fluid-app/store-api-client": "0.1.0",
|
|
116
116
|
"@fluid-app/store-core": "0.1.0",
|
|
117
117
|
"@fluid-app/subscriptions-core": "0.1.0",
|
|
118
|
-
"@fluid-app/typescript-config": "0.0.0",
|
|
119
118
|
"@fluid-app/subscriptions-ui": "0.1.0",
|
|
119
|
+
"@fluid-app/typescript-config": "0.0.0",
|
|
120
120
|
"@fluid-app/ui-primitives": "0.1.13"
|
|
121
121
|
},
|
|
122
122
|
"peerDependencies": {
|