@livetiles/reach-components-react 0.4.160 → 0.4.162

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.
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+ /**
3
+ * Outside of the Reach app the components run inside a MemoryRouter, so links to other
4
+ * items rendered in a detail view (subpages, page lists and embedded items in the body,
5
+ * ToC, previous/next, breadcrumb) would otherwise end up as relative urls on the host
6
+ * (e.g. SharePoint) and lead to a 404. If the host did not provide its own target urls,
7
+ * link to the item in the Reach web app in a new window instead.
8
+ */
9
+ export declare const DetailTargetLinkFallback: FC;
package/index.d.ts CHANGED
@@ -1208,8 +1208,15 @@ interface StreamEventCancelInformation extends EventCancelInformation {
1208
1208
  }
1209
1209
 
1210
1210
  interface TargetLinkOverrideContextProps {
1211
- onResolveContentTargetUrl: (itemId: string, itemType: ItemResourceTypes) => string;
1211
+ onResolveContentTargetUrl?: (itemId: string, itemType: ItemResourceTypes) => string;
1212
1212
  onResolveEmbeddedContentTargetUrl?: (itemId: string, itemType: ItemResourceTypes) => string;
1213
+ /**
1214
+ * Called instead of following the link when the user plain left-clicks a link to
1215
+ * another item, so the host can display that item itself (e.g. inside a modal).
1216
+ * Modified clicks (ctrl/cmd/shift/middle) still follow the resolved target url.
1217
+ */
1218
+ onNavigateToItem?: (itemId: string, itemType: ItemResourceTypes) => unknown;
1219
+ openTargetInNewWindow?: boolean;
1213
1220
  }
1214
1221
  declare const TargetLinkOverrideContextProvider: FC<TargetLinkOverrideContextProps>;
1215
1222