@fluid-app/portal-sdk 0.1.456 → 0.1.458
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/{CardWidget-BbddboSI.cjs → CardWidget-8kubp1dh.cjs} +2 -2
- package/dist/{CardWidget-Bs0hqVjy.mjs → CardWidget-Dee9DpBH.mjs} +2 -2
- package/dist/{CardWidget-Bs0hqVjy.mjs.map → CardWidget-Dee9DpBH.mjs.map} +1 -1
- package/dist/{CardWidget-CGbAcMeq.cjs → CardWidget-YGsYcK7i.cjs} +2 -2
- package/dist/{CardWidget-CGbAcMeq.cjs.map → CardWidget-YGsYcK7i.cjs.map} +1 -1
- package/dist/{ContainerWidget-bbzSrNUJ.mjs → ContainerWidget-BVlY76wy.mjs} +2 -2
- package/dist/{ContainerWidget-bbzSrNUJ.mjs.map → ContainerWidget-BVlY76wy.mjs.map} +1 -1
- package/dist/{ContainerWidget-CRCAjF4G.cjs → ContainerWidget-Ba_Ti1Qh.cjs} +3 -3
- package/dist/{ContainerWidget-BOZYpAH1.cjs → ContainerWidget-DCDrjhgP.cjs} +2 -2
- package/dist/{ContainerWidget-BOZYpAH1.cjs.map → ContainerWidget-DCDrjhgP.cjs.map} +1 -1
- package/dist/{FluidProvider-CbA8KrhD.mjs → FluidProvider-C5JqeOGi.mjs} +3 -3
- package/dist/{FluidProvider-CbA8KrhD.mjs.map → FluidProvider-C5JqeOGi.mjs.map} +1 -1
- package/dist/{FluidProvider-JiGJqJQe.cjs → FluidProvider-LYDiXUkk.cjs} +3 -3
- package/dist/{FluidProvider-JiGJqJQe.cjs.map → FluidProvider-LYDiXUkk.cjs.map} +1 -1
- package/dist/{LayoutWidget-nea3CGc6.cjs → LayoutWidget-BKjkjoNO.cjs} +2 -2
- package/dist/{LayoutWidget-CS8fOr1e.cjs → LayoutWidget-CqIkNZNa.cjs} +2 -2
- package/dist/{LayoutWidget-CS8fOr1e.cjs.map → LayoutWidget-CqIkNZNa.cjs.map} +1 -1
- package/dist/{LayoutWidget-ENLd1G__.mjs → LayoutWidget-DkYKWC2P.mjs} +2 -2
- package/dist/{LayoutWidget-ENLd1G__.mjs.map → LayoutWidget-DkYKWC2P.mjs.map} +1 -1
- package/dist/{MessagingScreen-BeUhzBWr.cjs → MessagingScreen-BLZt8lMN.cjs} +2 -2
- package/dist/{MessagingScreen-BeUhzBWr.cjs.map → MessagingScreen-BLZt8lMN.cjs.map} +1 -1
- package/dist/{MessagingScreen-D6Bxoq0a.cjs → MessagingScreen-CoBvR0p4.cjs} +7 -7
- package/dist/{MessagingScreen-Dt6Rwk7_.mjs → MessagingScreen-CowNfnz0.mjs} +8 -8
- package/dist/{MessagingScreen-BtdVeSR5.mjs → MessagingScreen-kftHOAO7.mjs} +2 -2
- package/dist/{MessagingScreen-BtdVeSR5.mjs.map → MessagingScreen-kftHOAO7.mjs.map} +1 -1
- package/dist/{OrdersScreen-BirJq38x.cjs → OrdersScreen-B3Aa4ip-.cjs} +7 -7
- package/dist/{OrdersScreen-BSwESoF3.cjs → OrdersScreen-C-B6_Agy.cjs} +2 -2
- package/dist/{OrdersScreen-BSwESoF3.cjs.map → OrdersScreen-C-B6_Agy.cjs.map} +1 -1
- package/dist/{OrdersScreen-fZFg1l1W.mjs → OrdersScreen-DDQ8QXWo.mjs} +2 -2
- package/dist/{OrdersScreen-fZFg1l1W.mjs.map → OrdersScreen-DDQ8QXWo.mjs.map} +1 -1
- package/dist/{OrdersScreen-1kPmXJga.mjs → OrdersScreen-DPkq_mS2.mjs} +8 -8
- package/dist/{ProfileScreen-CirvTBwX.cjs → ProfileScreen-CK17yi8m.cjs} +8 -8
- package/dist/{ProfileScreen-Dj1pTzLz.mjs → ProfileScreen-DnlCxwh6.mjs} +3 -3
- package/dist/{ProfileScreen-Dj1pTzLz.mjs.map → ProfileScreen-DnlCxwh6.mjs.map} +1 -1
- package/dist/{ProfileScreen-BvxuA9P4.cjs → ProfileScreen-R4ulzpPu.cjs} +3 -3
- package/dist/{ProfileScreen-BvxuA9P4.cjs.map → ProfileScreen-R4ulzpPu.cjs.map} +1 -1
- package/dist/{ProfileScreen-Bqv7MNPH.mjs → ProfileScreen-ntvqBCpb.mjs} +9 -9
- package/dist/{ScreenRenderer-EGk5-w0h.cjs → ScreenRenderer-D0-ymcZV.cjs} +13 -4
- package/dist/ScreenRenderer-D0-ymcZV.cjs.map +1 -0
- package/dist/{ScreenRenderer-BQz-1cCn.mjs → ScreenRenderer-KJIcMne2.mjs} +13 -4
- package/dist/ScreenRenderer-KJIcMne2.mjs.map +1 -0
- package/dist/{ShopScreen-3ryiBWeh.cjs → ShopScreen-BtwvHTbN.cjs} +7 -7
- package/dist/{ShopScreen-CfvCqYJ9.mjs → ShopScreen-CGX6YHVV.mjs} +8 -8
- package/dist/{ShopScreen-BKWFrPHB.mjs → ShopScreen-CUoUECrG.mjs} +3 -3
- package/dist/{ShopScreen-BKWFrPHB.mjs.map → ShopScreen-CUoUECrG.mjs.map} +1 -1
- package/dist/{ShopScreen-C3vwiETG.cjs → ShopScreen-DS5-ICA-.cjs} +2 -2
- package/dist/{ShopScreen-C3vwiETG.cjs.map → ShopScreen-DS5-ICA-.cjs.map} +1 -1
- package/dist/{ShopWidget-CwiD88Sr.mjs → ShopWidget-DXVNRrFY.mjs} +2 -2
- package/dist/{ShopWidget-CwiD88Sr.mjs.map → ShopWidget-DXVNRrFY.mjs.map} +1 -1
- package/dist/{SubscriptionsScreen-DWB0E5Hu.cjs → SubscriptionsScreen-D04ldHXL.cjs} +3 -3
- package/dist/{SubscriptionsScreen-DWB0E5Hu.cjs.map → SubscriptionsScreen-D04ldHXL.cjs.map} +1 -1
- package/dist/{SubscriptionsScreen-Dv7PjXwb.mjs → SubscriptionsScreen-D0pn4_JR.mjs} +3 -3
- package/dist/{SubscriptionsScreen-Dv7PjXwb.mjs.map → SubscriptionsScreen-D0pn4_JR.mjs.map} +1 -1
- package/dist/{SubscriptionsScreen-COBaRHDG.cjs → SubscriptionsScreen-J4R7V7na.cjs} +8 -8
- package/dist/{SubscriptionsScreen-G64lYG5v.mjs → SubscriptionsScreen-qD8Mnh2A.mjs} +9 -9
- package/dist/{build-widget-registry-7slNHtKU.cjs → build-widget-registry-DMiPjMfG.cjs} +31 -7
- package/dist/build-widget-registry-DMiPjMfG.cjs.map +1 -0
- package/dist/{build-widget-registry-BZjLacQ8.mjs → build-widget-registry-Dveiky2q.mjs} +28 -10
- package/dist/build-widget-registry-Dveiky2q.mjs.map +1 -0
- package/dist/index.cjs +260 -26
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +260 -26
- package/dist/index.mjs.map +1 -1
- package/dist/{use-portal-card-add-3ds-flow-tvSUKAvl.mjs → use-portal-card-add-3ds-flow--PAh5qUt.mjs} +2 -2
- package/dist/{use-portal-card-add-3ds-flow-tvSUKAvl.mjs.map → use-portal-card-add-3ds-flow--PAh5qUt.mjs.map} +1 -1
- package/dist/{use-portal-card-add-3ds-flow-C_Frj80d.cjs → use-portal-card-add-3ds-flow-DzFfku22.cjs} +2 -2
- package/dist/{use-portal-card-add-3ds-flow-C_Frj80d.cjs.map → use-portal-card-add-3ds-flow-DzFfku22.cjs.map} +1 -1
- package/dist/utils/build-remote-widget-plugin-manifests.cjs +5 -5
- package/dist/utils/build-remote-widget-plugin-manifests.mjs +6 -6
- package/package.json +9 -9
- package/dist/ScreenRenderer-BQz-1cCn.mjs.map +0 -1
- package/dist/ScreenRenderer-EGk5-w0h.cjs.map +0 -1
- package/dist/build-widget-registry-7slNHtKU.cjs.map +0 -1
- package/dist/build-widget-registry-BZjLacQ8.mjs.map +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import "./translation-adapter-RsuBioxm.mjs";
|
|
2
|
-
import { A as
|
|
3
|
-
import { a as assertNever, i as assertDefined, n as DataAwareWidget, o as isWidgetType, r as WIDGET_TYPE_NAMES, s as isWidgetTypeName, u as useRegistry } from "./ScreenRenderer-
|
|
2
|
+
import { A as serialiseTheme, B as deriveDarkVariant, C as applyTheme, D as getActiveThemeId, E as buildThemeDefinition, F as DEFAULT_SPACING, G as FONT_FAMILY_KEYS, H as mergeDarkOverrides, I as DEFAULT_THEME_ID, J as SEMANTIC_COLOR_NAMES, K as FONT_SIZE_KEYS, L as DEFAULT_THEME_NAME, M as DEFAULT_FONT_FAMILIES, N as DEFAULT_FONT_SIZES, O as transformThemes, P as DEFAULT_RADII, Q as deleteDatabase, R as getDefaultThemeDefinition, S as createWidgetRegistry, T as removeTheme, U as parseColor, V as getForegroundColor, W as resolveTheme, X as useAppDefinitionApi, _ as DEFAULT_SDK_WIDGET_REGISTRY, a as useScreenAreaFullscreenSnapshot, b as createScreen, c as useFluidApp, d as toNavigationItem, f as normalizeComponentTree, h as useCompanyScopedQueryKey, i as useOptionalScreenAreaFullscreenCoordinator, j as DEFAULT_COLORS, k as deserialiseTheme, l as toRawManifest, m as createCompanyQueryKey, o as APP_DATA_QUERY_KEY, p as toScreenDefinition, q as RADIUS_KEYS, r as ScreenAreaFullscreenProvider, s as fetchRawManifest, t as buildRemoteWidgetRegistry, u as transformManifestToRepAppData, v as isDefaultWidgetComponent, w as removeAllThemes, x as createWidgetFromShareable, y as widgetPropertySchemas, z as generateThemeCSS } from "./build-widget-registry-Dveiky2q.mjs";
|
|
3
|
+
import { a as assertNever, i as assertDefined, n as DataAwareWidget, o as isWidgetType, r as WIDGET_TYPE_NAMES, s as isWidgetTypeName, u as useRegistry } from "./ScreenRenderer-KJIcMne2.mjs";
|
|
4
4
|
import { t as useAccount } from "./use-account-DR6HXMw_.mjs";
|
|
5
5
|
import "./use-optional-store-DpB_jK4Q.mjs";
|
|
6
|
-
import { g as useNativeCapabilities, h as useThemeContext, m as FluidThemeProvider, n as useFluidContext, p as shellEn, r as SUPPORTED_LANGUAGES, t as FluidProvider, x as useLanguagesApi } from "./FluidProvider-
|
|
6
|
+
import { g as useNativeCapabilities, h as useThemeContext, m as FluidThemeProvider, n as useFluidContext, p as shellEn, r as SUPPORTED_LANGUAGES, t as FluidProvider, x as useLanguagesApi } from "./FluidProvider-C5JqeOGi.mjs";
|
|
7
7
|
import "./mysite-api-context-BbxSfNft.mjs";
|
|
8
8
|
import "./ContactsTranslationBridge-DCSWCdyq.mjs";
|
|
9
9
|
import { r as contactsScreenPropertySchema, t as ContactsScreen } from "./ContactsScreen-D0l3-Xof.mjs";
|
|
@@ -22,7 +22,7 @@ import { r as useShellTranslation, t as ShellTranslationContext } from "./shell-
|
|
|
22
22
|
import "./error-state-BMPrAS3n.mjs";
|
|
23
23
|
import { r as pointsWidgetPropertySchema, t as PointsWidget } from "./PointsWidget-7OpNqRDe.mjs";
|
|
24
24
|
import "./task-composer-form-DzVUCin2.mjs";
|
|
25
|
-
import { a as sectionLayoutConfig, i as groupChildrenByColumn, r as layoutWidgetPropertySchema, t as LayoutWidget } from "./LayoutWidget-
|
|
25
|
+
import { a as sectionLayoutConfig, i as groupChildrenByColumn, r as layoutWidgetPropertySchema, t as LayoutWidget } from "./LayoutWidget-DkYKWC2P.mjs";
|
|
26
26
|
import { _ as extractPropertyValues, g as applyPropertyValues, h as PROPERTY_FIELD_TYPES, r as gapValues, v as groupPropertyFields, y as isPropertyFieldType } from "./registries-DXVOnKV2.mjs";
|
|
27
27
|
import "./fields-Cz7BkKd6.mjs";
|
|
28
28
|
import { r as textWidgetPropertySchema, t as TextWidget } from "./TextWidget-cnDl92rJ.mjs";
|
|
@@ -30,16 +30,16 @@ import { r as alertWidgetPropertySchema, t as AlertWidget } from "./AlertWidget-
|
|
|
30
30
|
import { r as bulletListWidgetPropertySchema, t as BulletListWidget } from "./BulletListWidget-DZrlNEa4.mjs";
|
|
31
31
|
import "./preview-context-DvXxVZ0z.mjs";
|
|
32
32
|
import { r as calendarWidgetPropertySchema, t as CalendarWidget } from "./CalendarWidget-DwZ5hrXx.mjs";
|
|
33
|
-
import { r as cardWidgetPropertySchema, t as CardWidget } from "./CardWidget-
|
|
33
|
+
import { r as cardWidgetPropertySchema, t as CardWidget } from "./CardWidget-Dee9DpBH.mjs";
|
|
34
34
|
import "./purify.es-CcYKK30Z.mjs";
|
|
35
35
|
import "./MediaRenderer-DflyyaXq.mjs";
|
|
36
36
|
import { r as carouselWidgetPropertySchema, t as CarouselWidget } from "./CarouselWidget-DEyRWj_S.mjs";
|
|
37
37
|
import { r as catchUpWidgetPropertySchema, t as CatchUpWidget } from "./CatchUpWidget-dROZKeGW.mjs";
|
|
38
38
|
import { Cn as Button, Ln as cn, N as IconButton, ct as PopoverContent, dt as CollapsibleContent, ft as CollapsibleTrigger, g as Skeleton, lt as PopoverTrigger, m as Toaster, st as Popover, ut as Collapsible } from "./src-v1U7mjgR.mjs";
|
|
39
|
-
import { _ as SidebarProvider, a as BottomNavVisibilityProvider, c as SidebarContent, d as SidebarHeader, f as SidebarInset, g as SidebarMenuSub, h as SidebarMenuItem, i as useMessagingAuth, l as SidebarFooter, m as SidebarMenuButton, n as messagingScreenPropertySchema, o as useBottomNavHidden, p as SidebarMenu, r as useMessagingConfig, s as Sidebar, t as MessagingScreen, u as SidebarGroupLabel, v as useSidebar } from "./MessagingScreen-
|
|
40
|
-
import { n as subscriptionsScreenPropertySchema, t as SubscriptionsScreen } from "./SubscriptionsScreen-
|
|
39
|
+
import { _ as SidebarProvider, a as BottomNavVisibilityProvider, c as SidebarContent, d as SidebarHeader, f as SidebarInset, g as SidebarMenuSub, h as SidebarMenuItem, i as useMessagingAuth, l as SidebarFooter, m as SidebarMenuButton, n as messagingScreenPropertySchema, o as useBottomNavHidden, p as SidebarMenu, r as useMessagingConfig, s as Sidebar, t as MessagingScreen, u as SidebarGroupLabel, v as useSidebar } from "./MessagingScreen-kftHOAO7.mjs";
|
|
40
|
+
import { n as subscriptionsScreenPropertySchema, t as SubscriptionsScreen } from "./SubscriptionsScreen-D0pn4_JR.mjs";
|
|
41
41
|
import { r as chartWidgetPropertySchema, t as ChartWidget } from "./ChartWidget-LcbtV1uD.mjs";
|
|
42
|
-
import { r as containerWidgetPropertySchema, t as ContainerWidget } from "./ContainerWidget-
|
|
42
|
+
import { r as containerWidgetPropertySchema, t as ContainerWidget } from "./ContainerWidget-BVlY76wy.mjs";
|
|
43
43
|
import { r as embedWidgetPropertySchema, t as EmbedWidget } from "./EmbedWidget-EjCuOFOz.mjs";
|
|
44
44
|
import { r as imageWidgetPropertySchema, t as ImageWidget } from "./ImageWidget-BjyKNhR9.mjs";
|
|
45
45
|
import { r as linkWidgetPropertySchema, t as LinkWidget } from "./LinkWidget-BNZzqXbl.mjs";
|
|
@@ -53,7 +53,7 @@ import { r as spacerWidgetPropertySchema, t as SpacerWidget } from "./SpacerWidg
|
|
|
53
53
|
import { r as tableWidgetPropertySchema, t as TableWidget } from "./TableWidget-BCIzecMi.mjs";
|
|
54
54
|
import { r as toDoWidgetPropertySchema, t as ToDoWidget } from "./ToDoWidget-DtM9JWAS.mjs";
|
|
55
55
|
import { r as videoWidgetPropertySchema, t as VideoWidget } from "./VideoWidget-DyyX7THj.mjs";
|
|
56
|
-
import "./ShopWidget-
|
|
56
|
+
import { r as shopWidgetPropertySchema } from "./ShopWidget-DXVNRrFY.mjs";
|
|
57
57
|
import "./translation-adapter-DfT1IP6Z.mjs";
|
|
58
58
|
import "./translation-adapter-C-L9dSVl.mjs";
|
|
59
59
|
import { r as storeKeys } from "./query-keys-QbaHKNsd.mjs";
|
|
@@ -65,17 +65,17 @@ import { i as useScreenHeaderSlotRefs, r as ScreenHeaderProvider } from "./Scree
|
|
|
65
65
|
import { a as FallbackCard, i as CoreScreenPlaceholder, r as customersScreenPropertySchema, t as CustomersScreen } from "./CustomersScreen-B_dmvOqk.mjs";
|
|
66
66
|
import { a as memberTypeSlug, i as memberTypeName, n as deniesRepSurfaces, r as hasMemberPermission, t as canAccessRepSurfaces } from "./member-permissions-CXsp_VS_.mjs";
|
|
67
67
|
import { a as implementPortalFunction } from "./portal-function-VnzSP78n.mjs";
|
|
68
|
-
import "./use-portal-card-add-3ds-flow
|
|
68
|
+
import "./use-portal-card-add-3ds-flow--PAh5qUt.mjs";
|
|
69
69
|
import "./display-CG8t6Bv8.mjs";
|
|
70
70
|
import "./use-mysite-portal-B9dx249L.mjs";
|
|
71
|
-
import { n as profileScreenPropertySchema, t as ProfileScreen } from "./ProfileScreen-
|
|
71
|
+
import { n as profileScreenPropertySchema, t as ProfileScreen } from "./ProfileScreen-DnlCxwh6.mjs";
|
|
72
72
|
import "./dist-CBZLrT5S.mjs";
|
|
73
73
|
import "./es-B3I_oMk-.mjs";
|
|
74
74
|
import "./dist-CU-tsJ00.mjs";
|
|
75
|
-
import { n as ordersScreenPropertySchema, t as OrdersScreen } from "./OrdersScreen-
|
|
75
|
+
import { n as ordersScreenPropertySchema, t as OrdersScreen } from "./OrdersScreen-DDQ8QXWo.mjs";
|
|
76
76
|
import { r as mySiteScreenPropertySchema, t as MySiteScreen } from "./MySiteScreen-DVkGc2_9.mjs";
|
|
77
77
|
import "./sortable.esm-B6B4nWkF.mjs";
|
|
78
|
-
import { r as shopScreenPropertySchema, t as ShopScreen } from "./ShopScreen-
|
|
78
|
+
import { r as shopScreenPropertySchema, t as ShopScreen } from "./ShopScreen-CUoUECrG.mjs";
|
|
79
79
|
import "./AppDownloadScreen-OiFZo-I_.mjs";
|
|
80
80
|
import { buildRemoteWidgetPluginManifests } from "./utils/build-remote-widget-plugin-manifests.mjs";
|
|
81
81
|
import * as React$1 from "react";
|
|
@@ -1443,6 +1443,192 @@ function AccessDeniedScreen() {
|
|
|
1443
1443
|
});
|
|
1444
1444
|
}
|
|
1445
1445
|
//#endregion
|
|
1446
|
+
//#region src/core/default-property-schema-registry.ts
|
|
1447
|
+
const DEFAULT_PROPERTY_SCHEMA_REGISTRY = {
|
|
1448
|
+
AlertWidget: alertWidgetPropertySchema,
|
|
1449
|
+
BulletListWidget: bulletListWidgetPropertySchema,
|
|
1450
|
+
CalendarWidget: calendarWidgetPropertySchema,
|
|
1451
|
+
CardWidget: cardWidgetPropertySchema,
|
|
1452
|
+
CarouselWidget: carouselWidgetPropertySchema,
|
|
1453
|
+
ChartWidget: chartWidgetPropertySchema,
|
|
1454
|
+
ContainerWidget: containerWidgetPropertySchema,
|
|
1455
|
+
EmbedWidget: embedWidgetPropertySchema,
|
|
1456
|
+
ImageWidget: imageWidgetPropertySchema,
|
|
1457
|
+
LayoutWidget: layoutWidgetPropertySchema,
|
|
1458
|
+
LinkWidget: linkWidgetPropertySchema,
|
|
1459
|
+
ListWidget: listWidgetPropertySchema,
|
|
1460
|
+
MySiteWidget: mySiteWidgetPropertySchema,
|
|
1461
|
+
NestedWidget: nestedWidgetPropertySchema,
|
|
1462
|
+
PointsWidget: pointsWidgetPropertySchema,
|
|
1463
|
+
QuickLinksWidget: quickLinksWidgetPropertySchema,
|
|
1464
|
+
QuickShareWidget: quickShareWidgetPropertySchema,
|
|
1465
|
+
RecentActivityWidget: recentActivityWidgetPropertySchema,
|
|
1466
|
+
SeparatorWidget: separatorWidgetPropertySchema,
|
|
1467
|
+
ShopWidget: shopWidgetPropertySchema,
|
|
1468
|
+
SpacerWidget: spacerWidgetPropertySchema,
|
|
1469
|
+
TableWidget: tableWidgetPropertySchema,
|
|
1470
|
+
TextWidget: textWidgetPropertySchema,
|
|
1471
|
+
ToDoWidget: toDoWidgetPropertySchema,
|
|
1472
|
+
VideoWidget: videoWidgetPropertySchema
|
|
1473
|
+
};
|
|
1474
|
+
//#endregion
|
|
1475
|
+
//#region src/utils/warn-unknown-widget-props.ts
|
|
1476
|
+
/**
|
|
1477
|
+
* Props every widget instance may legitimately receive that are never part
|
|
1478
|
+
* of a widget's own editable property schema:
|
|
1479
|
+
* - Standard React/DOM pass-through props (`className`, `style`, `children`,
|
|
1480
|
+
* `id`, `key`).
|
|
1481
|
+
* - Structural identity props the screen-renderer pipeline injects itself
|
|
1482
|
+
* for container widgets so they can support drag/select wiring
|
|
1483
|
+
* (`widgetId`, `widgetPath`) — see `ScreenRenderer.tsx` in
|
|
1484
|
+
* `@fluid-app/portal-widgets/core` and `WidgetContent` in
|
|
1485
|
+
* `@fluid-app/portal-builder/core/widget-rendering`, which both inject
|
|
1486
|
+
* these for the same widget nodes rendered here.
|
|
1487
|
+
* Never warn about these even though they never appear in a widget's
|
|
1488
|
+
* `fields` list.
|
|
1489
|
+
*/
|
|
1490
|
+
const ALWAYS_ALLOWED_WIDGET_PROPS = new Set([
|
|
1491
|
+
"className",
|
|
1492
|
+
"style",
|
|
1493
|
+
"children",
|
|
1494
|
+
"id",
|
|
1495
|
+
"key",
|
|
1496
|
+
"widgetId",
|
|
1497
|
+
"widgetPath"
|
|
1498
|
+
]);
|
|
1499
|
+
/** Maximum Levenshtein distance for a "did you mean" suggestion to be shown. */
|
|
1500
|
+
const MAX_SUGGESTION_DISTANCE = 3;
|
|
1501
|
+
/**
|
|
1502
|
+
* Common authoring aliases → the canonical prop name to suggest. Levenshtein
|
|
1503
|
+
* only catches spelling slips; these are *semantic* misses (the motivating
|
|
1504
|
+
* incident authored `content` where the schema says `description` — edit
|
|
1505
|
+
* distance 9, far beyond any sane typo threshold). A suggestion is only shown
|
|
1506
|
+
* when the canonical name actually exists in the widget's schema.
|
|
1507
|
+
*/
|
|
1508
|
+
const PROP_NAME_SYNONYMS = {
|
|
1509
|
+
content: "description",
|
|
1510
|
+
text: "description",
|
|
1511
|
+
body: "description",
|
|
1512
|
+
copy: "description",
|
|
1513
|
+
message: "description",
|
|
1514
|
+
heading: "title",
|
|
1515
|
+
header: "title",
|
|
1516
|
+
label: "title"
|
|
1517
|
+
};
|
|
1518
|
+
/** `${widgetType}::${propName}` pairs already warned about this session. */
|
|
1519
|
+
const warnedPairs = /* @__PURE__ */ new Set();
|
|
1520
|
+
function isDevBuild() {
|
|
1521
|
+
return import.meta.env?.DEV === true;
|
|
1522
|
+
}
|
|
1523
|
+
/**
|
|
1524
|
+
* Levenshtein edit distance between two strings. Small inline helper (no new
|
|
1525
|
+
* dependency) — only ever called with short widget-prop-name strings.
|
|
1526
|
+
*/
|
|
1527
|
+
function levenshteinDistance(a, b) {
|
|
1528
|
+
if (a === b) return 0;
|
|
1529
|
+
if (a.length === 0) return b.length;
|
|
1530
|
+
if (b.length === 0) return a.length;
|
|
1531
|
+
let previousRow = Array.from({ length: b.length + 1 }, (_, j) => j);
|
|
1532
|
+
for (let i = 1; i <= a.length; i++) {
|
|
1533
|
+
const currentRow = [i];
|
|
1534
|
+
for (let j = 1; j <= b.length; j++) {
|
|
1535
|
+
const substitutionCost = a[i - 1] === b[j - 1] ? 0 : 1;
|
|
1536
|
+
const deletion = (previousRow[j] ?? Infinity) + 1;
|
|
1537
|
+
const insertion = (currentRow[j - 1] ?? Infinity) + 1;
|
|
1538
|
+
const substitution = (previousRow[j - 1] ?? Infinity) + substitutionCost;
|
|
1539
|
+
currentRow.push(Math.min(deletion, insertion, substitution));
|
|
1540
|
+
}
|
|
1541
|
+
previousRow = currentRow;
|
|
1542
|
+
}
|
|
1543
|
+
return previousRow[b.length] ?? Math.max(a.length, b.length);
|
|
1544
|
+
}
|
|
1545
|
+
/**
|
|
1546
|
+
* Finds the suggestion for an unknown prop: a known semantic synonym first
|
|
1547
|
+
* (see {@link PROP_NAME_SYNONYMS}), then the nearest known key by Levenshtein
|
|
1548
|
+
* distance within {@link MAX_SUGGESTION_DISTANCE}.
|
|
1549
|
+
*/
|
|
1550
|
+
function findNearestKey(propName, candidates) {
|
|
1551
|
+
const synonym = PROP_NAME_SYNONYMS[propName.toLowerCase()];
|
|
1552
|
+
if (synonym && candidates.includes(synonym)) return synonym;
|
|
1553
|
+
let nearest;
|
|
1554
|
+
let nearestDistance = MAX_SUGGESTION_DISTANCE + 1;
|
|
1555
|
+
for (const candidate of candidates) {
|
|
1556
|
+
const distance = levenshteinDistance(propName, candidate);
|
|
1557
|
+
if (distance < nearestDistance) {
|
|
1558
|
+
nearestDistance = distance;
|
|
1559
|
+
nearest = candidate;
|
|
1560
|
+
}
|
|
1561
|
+
}
|
|
1562
|
+
return nearestDistance <= MAX_SUGGESTION_DISTANCE ? nearest : void 0;
|
|
1563
|
+
}
|
|
1564
|
+
/**
|
|
1565
|
+
* Collects every prop name a widget's property schema actually recognizes as
|
|
1566
|
+
* a `widget.props` key:
|
|
1567
|
+
* - `borderRadius` fields are composite — their top-level `key` is a schema
|
|
1568
|
+
* grouping identifier, not a real widget prop, so its four corner keys are
|
|
1569
|
+
* expanded instead (mirrors `extractPropertyValues` in
|
|
1570
|
+
* `@fluid-app/portal-core/registries`).
|
|
1571
|
+
* - `dataSource` fields are excluded entirely. Per the same
|
|
1572
|
+
* `extractPropertyValues` reference, this field type only exists so the
|
|
1573
|
+
* property panel can gate other fields' visibility on whether a data
|
|
1574
|
+
* source is configured — its value is read from `widget.dataSource` (the
|
|
1575
|
+
* top-level, sibling-of-`props` config), never from `widget.props`.
|
|
1576
|
+
* Authoring a literal `props.dataSource` is a real mistake (the config
|
|
1577
|
+
* belongs one level up), so its field `key` must not be treated as an
|
|
1578
|
+
* accepted prop here.
|
|
1579
|
+
*/
|
|
1580
|
+
function collectKnownPropKeys(fields) {
|
|
1581
|
+
const keys = [];
|
|
1582
|
+
for (const field of fields) if (field.type === "borderRadius") keys.push(...Object.values(field.keys));
|
|
1583
|
+
else if (field.type !== "dataSource") keys.push(field.key);
|
|
1584
|
+
return keys;
|
|
1585
|
+
}
|
|
1586
|
+
/**
|
|
1587
|
+
* Merges schema field keys with `dataSourceTargetProps` — props a data
|
|
1588
|
+
* source may populate (e.g. ListWidget's `items`) that aren't necessarily
|
|
1589
|
+
* declared as editable fields — into one deduped list. Used for both the
|
|
1590
|
+
* known/unknown check and what's surfaced to the author (the "Known props:"
|
|
1591
|
+
* list and suggestion candidates), so a typo of a data-source-only prop
|
|
1592
|
+
* still gets a correct suggestion and the valid name is actually listed.
|
|
1593
|
+
*/
|
|
1594
|
+
function collectAllKnownKeys(schema) {
|
|
1595
|
+
const fieldKeys = collectKnownPropKeys(schema.fields);
|
|
1596
|
+
const targetProps = schema.dataSourceTargetProps ?? [];
|
|
1597
|
+
return Array.from(new Set([...fieldKeys, ...targetProps]));
|
|
1598
|
+
}
|
|
1599
|
+
/**
|
|
1600
|
+
* Dev-only console warning for widget props not declared in the widget's
|
|
1601
|
+
* registered property schema. Guards against the class of bug where an
|
|
1602
|
+
* authored screen sets a prop the widget doesn't know about (typo'd name,
|
|
1603
|
+
* stale field from a prior schema version) — the prop is silently dropped
|
|
1604
|
+
* and the widget renders its placeholder defaults with no signal to the
|
|
1605
|
+
* author.
|
|
1606
|
+
*
|
|
1607
|
+
* No-ops entirely outside a Vite dev build (checked first, before any prop
|
|
1608
|
+
* iteration, so there's zero overhead in production bundles) and for widget
|
|
1609
|
+
* types with no registered schema (custom/company widgets) — there's nothing
|
|
1610
|
+
* to validate against, so we skip silently rather than warn.
|
|
1611
|
+
*
|
|
1612
|
+
* Warns at most once per (widgetType, propName) pair per session.
|
|
1613
|
+
*/
|
|
1614
|
+
function warnUnknownWidgetProps({ widgetType, props, registry }) {
|
|
1615
|
+
if (!isDevBuild()) return;
|
|
1616
|
+
const schema = registry[widgetType];
|
|
1617
|
+
if (!schema) return;
|
|
1618
|
+
const knownKeys = collectAllKnownKeys(schema);
|
|
1619
|
+
const knownKeySet = new Set(knownKeys);
|
|
1620
|
+
for (const propName of Object.keys(props)) {
|
|
1621
|
+
if (knownKeySet.has(propName)) continue;
|
|
1622
|
+
if (ALWAYS_ALLOWED_WIDGET_PROPS.has(propName)) continue;
|
|
1623
|
+
const pairKey = `${widgetType}::${propName}`;
|
|
1624
|
+
if (warnedPairs.has(pairKey)) continue;
|
|
1625
|
+
warnedPairs.add(pairKey);
|
|
1626
|
+
const suggestion = findNearestKey(propName, knownKeys);
|
|
1627
|
+
const suggestionText = suggestion ? ` Did you mean "${suggestion}"?` : "";
|
|
1628
|
+
console.warn(`[portal] ${widgetType} received unknown prop "${propName}" — not in its schema.${suggestionText} Known props: ${knownKeys.join(", ")}.`);
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
//#endregion
|
|
1446
1632
|
//#region src/shell/BuilderScreenView.tsx
|
|
1447
1633
|
/**
|
|
1448
1634
|
* BuilderScreenView — renders a builder screen's component_tree with
|
|
@@ -1460,6 +1646,11 @@ function WidgetRenderer({ widget, index }) {
|
|
|
1460
1646
|
console.warn(`[BuilderScreenView] Widget type "${String(widget.type)}" not found in registry`);
|
|
1461
1647
|
return null;
|
|
1462
1648
|
}
|
|
1649
|
+
if (isDefaultWidgetComponent(widget.type, Component)) warnUnknownWidgetProps({
|
|
1650
|
+
widgetType: widget.type,
|
|
1651
|
+
props: widget.props,
|
|
1652
|
+
registry: DEFAULT_PROPERTY_SCHEMA_REGISTRY
|
|
1653
|
+
});
|
|
1463
1654
|
if (widget.dataSource) return /* @__PURE__ */ jsx("div", {
|
|
1464
1655
|
className: "h-full w-full overflow-x-hidden",
|
|
1465
1656
|
children: /* @__PURE__ */ jsx(DataAwareWidget, {
|
|
@@ -1522,12 +1713,12 @@ function resolveMemberTypePage(registry, memberTypeSlug, currentSlug, baseSlug)
|
|
|
1522
1713
|
}
|
|
1523
1714
|
//#endregion
|
|
1524
1715
|
//#region src/shell/system-screen-map.ts
|
|
1525
|
-
const ProfileScreen$1 = lazy(() => import("./ProfileScreen-
|
|
1526
|
-
const OrdersScreen$1 = lazy(() => import("./OrdersScreen-
|
|
1527
|
-
const SubscriptionsScreen$1 = lazy(() => import("./SubscriptionsScreen-
|
|
1528
|
-
const MessagingScreen$1 = lazy(() => import("./MessagingScreen-
|
|
1716
|
+
const ProfileScreen$1 = lazy(() => import("./ProfileScreen-ntvqBCpb.mjs").then((m) => ({ default: m.ProfileScreen })));
|
|
1717
|
+
const OrdersScreen$1 = lazy(() => import("./OrdersScreen-DPkq_mS2.mjs").then((m) => ({ default: m.OrdersScreen })));
|
|
1718
|
+
const SubscriptionsScreen$1 = lazy(() => import("./SubscriptionsScreen-qD8Mnh2A.mjs").then((m) => ({ default: m.SubscriptionsScreen })));
|
|
1719
|
+
const MessagingScreen$1 = lazy(() => import("./MessagingScreen-CowNfnz0.mjs").then((m) => ({ default: m.MessagingScreen })));
|
|
1529
1720
|
const ContactsScreen$1 = lazy(() => import("./ContactsScreen-D0l3-Xof.mjs").then((n) => n.n).then((m) => ({ default: m.ContactsScreen })));
|
|
1530
|
-
const ShopScreen$1 = lazy(() => import("./ShopScreen-
|
|
1721
|
+
const ShopScreen$1 = lazy(() => import("./ShopScreen-CGX6YHVV.mjs").then((m) => ({ default: m.ShopScreen })));
|
|
1531
1722
|
const CustomersScreen$1 = lazy(() => import("./CustomersScreen-B_dmvOqk.mjs").then((n) => n.n).then((m) => ({ default: m.CustomersScreen })));
|
|
1532
1723
|
const ShareablesScreen$1 = lazy(() => import("./ShareablesScreen-u6O-4LI4.mjs").then((m) => ({ default: m.ShareablesScreen })));
|
|
1533
1724
|
const MySiteScreen$1 = lazy(() => import("./MySiteScreen-DVkGc2_9.mjs").then((n) => n.n).then((m) => ({ default: m.MySiteScreen })));
|
|
@@ -1975,6 +2166,35 @@ function TranslatedScreenHeader({ slug, title, trailingContent }) {
|
|
|
1975
2166
|
});
|
|
1976
2167
|
}
|
|
1977
2168
|
//#endregion
|
|
2169
|
+
//#region src/shell/mobile-back-target.ts
|
|
2170
|
+
const LEGACY_SHAREABLE_PARENT_SLUGS = {
|
|
2171
|
+
"share/page": "share/pages",
|
|
2172
|
+
"share/playlist": "share/playlists",
|
|
2173
|
+
"share/product": "share/products"
|
|
2174
|
+
};
|
|
2175
|
+
const SHAREABLE_DETAIL_ROUTE_PREFIXES = [
|
|
2176
|
+
"share/files",
|
|
2177
|
+
"share/media",
|
|
2178
|
+
"share/page",
|
|
2179
|
+
"share/pages",
|
|
2180
|
+
"share/playlist",
|
|
2181
|
+
"share/playlists",
|
|
2182
|
+
"share/product",
|
|
2183
|
+
"share/products"
|
|
2184
|
+
];
|
|
2185
|
+
function isShareableDetailRoute(normalizedSlug) {
|
|
2186
|
+
return SHAREABLE_DETAIL_ROUTE_PREFIXES.some((routePrefix) => normalizedSlug.startsWith(routePrefix + "/"));
|
|
2187
|
+
}
|
|
2188
|
+
function resolveMobileBackTarget(currentSlug, navSlugs, previousSlug) {
|
|
2189
|
+
const navMatch = matchSlugPrefix(currentSlug, navSlugs);
|
|
2190
|
+
const normalized = normalizeSlug(currentSlug);
|
|
2191
|
+
const isDrillDownRoute = !!navMatch?.rest || isShareableDetailRoute(normalized);
|
|
2192
|
+
const normalizedPrevious = normalizeSlug(previousSlug ?? void 0);
|
|
2193
|
+
if (isDrillDownRoute && normalizedPrevious && normalizedPrevious !== normalized) return normalizedPrevious;
|
|
2194
|
+
if (navMatch?.rest) return navMatch.matchedSlug;
|
|
2195
|
+
for (const [routePrefix, parentSlug] of Object.entries(LEGACY_SHAREABLE_PARENT_SLUGS)) if (normalized.startsWith(routePrefix + "/") && navSlugs.includes(parentSlug)) return parentSlug;
|
|
2196
|
+
}
|
|
2197
|
+
//#endregion
|
|
1978
2198
|
//#region src/shell/AppShell.tsx
|
|
1979
2199
|
const THEME_STORAGE_KEY = "portal-theme-mode";
|
|
1980
2200
|
const SHAREABLE_TYPE_TO_SLUG = {
|
|
@@ -2167,9 +2387,11 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
|
|
|
2167
2387
|
const activeSlug = controlledSlug ?? pathSlug;
|
|
2168
2388
|
const activeSlugRef = useRef(activeSlug);
|
|
2169
2389
|
activeSlugRef.current = activeSlug;
|
|
2170
|
-
const
|
|
2390
|
+
const navigateToSlug = useCallback((slug, options) => {
|
|
2171
2391
|
const current = activeSlugRef.current;
|
|
2172
|
-
|
|
2392
|
+
const recordPrevious = options?.recordPrevious ?? true;
|
|
2393
|
+
if (slug !== current && recordPrevious) setPreviousSlug(current || null);
|
|
2394
|
+
else if (slug !== current) setPreviousSlug(null);
|
|
2173
2395
|
if (onNavigateProp) {
|
|
2174
2396
|
onNavigateProp(slug);
|
|
2175
2397
|
return;
|
|
@@ -2178,6 +2400,9 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
|
|
|
2178
2400
|
history.pushState(null, "", targetPath);
|
|
2179
2401
|
setPathSlug(slug);
|
|
2180
2402
|
}, [onNavigateProp, normalizedBasePath]);
|
|
2403
|
+
const handleNavigate = useCallback((slug) => {
|
|
2404
|
+
navigateToSlug(slug);
|
|
2405
|
+
}, [navigateToSlug]);
|
|
2181
2406
|
const handleWidgetItemClick = useCallback((item) => {
|
|
2182
2407
|
const subscriptionToken = item.subscription_token;
|
|
2183
2408
|
if (typeof subscriptionToken === "string" && subscriptionToken) {
|
|
@@ -2208,6 +2433,15 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
|
|
|
2208
2433
|
const slugMatch = useMemo(() => matchSlugPrefix(activeSlug, allNavSlugs), [activeSlug, allNavSlugs]);
|
|
2209
2434
|
const baseSlug = slugMatch?.matchedSlug ?? normalizeSlug(activeSlug);
|
|
2210
2435
|
const restParams = slugMatch?.rest ?? "";
|
|
2436
|
+
const mobileBackTarget = useMemo(() => resolveMobileBackTarget(activeSlug, allNavSlugs, previousSlug), [
|
|
2437
|
+
activeSlug,
|
|
2438
|
+
allNavSlugs,
|
|
2439
|
+
previousSlug
|
|
2440
|
+
]);
|
|
2441
|
+
const handleMobileBack = useCallback(() => {
|
|
2442
|
+
if (!mobileBackTarget) return;
|
|
2443
|
+
navigateToSlug(mobileBackTarget, { recordPrevious: false });
|
|
2444
|
+
}, [mobileBackTarget, navigateToSlug]);
|
|
2211
2445
|
const mobileSecondLevelTabs = findCurrentSection(filteredMobileNavItems, baseSlug)?.children ?? [];
|
|
2212
2446
|
const currentNavItem = findNavItem(filteredNavItems, baseSlug) ?? findNavItem(filteredMobileNavItems, baseSlug);
|
|
2213
2447
|
const matchingScreen = screens?.find((s) => s.id === currentNavItem?.screen_id);
|
|
@@ -2292,7 +2526,7 @@ function AppShell({ appData: appDataProp, navigation: navigationProp, customPage
|
|
|
2292
2526
|
mobileTabs: mobileSecondLevelTabs,
|
|
2293
2527
|
currentSlug: activeSlug,
|
|
2294
2528
|
title: screenTitle,
|
|
2295
|
-
...
|
|
2529
|
+
...mobileBackTarget !== void 0 && { onBack: handleMobileBack },
|
|
2296
2530
|
onNavigate: handleNavigate,
|
|
2297
2531
|
onLogout: logout
|
|
2298
2532
|
}),
|
|
@@ -3435,15 +3669,15 @@ const CORE_PAGE_IDS = {
|
|
|
3435
3669
|
//#endregion
|
|
3436
3670
|
//#region src/screens/index.ts
|
|
3437
3671
|
const screenPropertySchemas = {
|
|
3438
|
-
ProfileScreen: () => import("./ProfileScreen-
|
|
3439
|
-
MessagingScreen: () => import("./MessagingScreen-
|
|
3672
|
+
ProfileScreen: () => import("./ProfileScreen-ntvqBCpb.mjs").then((m) => m.profileScreenPropertySchema),
|
|
3673
|
+
MessagingScreen: () => import("./MessagingScreen-CowNfnz0.mjs").then((m) => m.messagingScreenPropertySchema),
|
|
3440
3674
|
ContactsScreen: () => import("./ContactsScreen-D0l3-Xof.mjs").then((n) => n.n).then((m) => m.contactsScreenPropertySchema),
|
|
3441
|
-
OrdersScreen: () => import("./OrdersScreen-
|
|
3442
|
-
SubscriptionsScreen: () => import("./SubscriptionsScreen-
|
|
3675
|
+
OrdersScreen: () => import("./OrdersScreen-DPkq_mS2.mjs").then((m) => m.ordersScreenPropertySchema),
|
|
3676
|
+
SubscriptionsScreen: () => import("./SubscriptionsScreen-qD8Mnh2A.mjs").then((m) => m.subscriptionsScreenPropertySchema),
|
|
3443
3677
|
CustomersScreen: () => import("./CustomersScreen-B_dmvOqk.mjs").then((n) => n.n).then((m) => m.customersScreenPropertySchema),
|
|
3444
3678
|
MySiteScreen: () => import("./MySiteScreen-DVkGc2_9.mjs").then((n) => n.n).then((m) => m.mySiteScreenPropertySchema),
|
|
3445
3679
|
ShareablesScreen: () => import("./ShareablesScreen-u6O-4LI4.mjs").then((m) => m.shareablesScreenPropertySchema),
|
|
3446
|
-
ShopScreen: () => import("./ShopScreen-
|
|
3680
|
+
ShopScreen: () => import("./ShopScreen-CGX6YHVV.mjs").then((m) => m.shopScreenPropertySchema),
|
|
3447
3681
|
AppDownloadScreen: () => import("./AppDownloadScreen-OiFZo-I_.mjs").then((n) => n.t).then((m) => m.appDownloadScreenPropertySchema)
|
|
3448
3682
|
};
|
|
3449
3683
|
/**
|