@livetiles/reach-plugin-types 0.4.188 → 0.4.190

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.
Files changed (2) hide show
  1. package/lib/index.d.ts +26 -5
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -3963,9 +3963,13 @@ declare module "libs/reach/ui/common/src/common/FloatingActionButton" {
3963
3963
  iconName: string;
3964
3964
  onClick: () => void;
3965
3965
  tooltipResourceKey: string;
3966
+ tooltipValues?: {
3967
+ [key: string]: string | number;
3968
+ };
3966
3969
  useSecondaryBgColor?: boolean;
3967
3970
  domIdentifier?: string;
3968
3971
  className?: string;
3972
+ disabled?: boolean;
3969
3973
  }>;
3970
3974
  export const FabButtonWithCallout: FC<{
3971
3975
  iconName: string;
@@ -8107,7 +8111,7 @@ declare module "libs/reach/feature/content/src/common/body/TextViewer" {
8107
8111
  }
8108
8112
  declare module "libs/reach/feature/content/src/common/detail/DetailViewContext" {
8109
8113
  import { Dispatch, SetStateAction } from 'react';
8110
- import { ItemResourceTypes, PublishableItem, PublishableItemContent } from "libs/reach/util/common/src/index";
8114
+ import { ItemResourceTypes, LeaseInfo, PublishableItem, PublishableItemContent } from "libs/reach/util/common/src/index";
8111
8115
  export const DetailViewContext: import("react").Context<DetailViewContextType<PublishableItem>>;
8112
8116
  export interface DetailViewContextType<TItem> {
8113
8117
  isLoading: boolean;
@@ -8122,6 +8126,7 @@ declare module "libs/reach/feature/content/src/common/detail/DetailViewContext"
8122
8126
  content: PublishableItemContent;
8123
8127
  updateSelectedLanguage: (lang: string) => unknown;
8124
8128
  handleRefresh: (onFinished?: () => void) => unknown;
8129
+ refreshLease?: () => Promise<LeaseInfo | null | undefined>;
8125
8130
  handleLanguageChange: (language: string) => unknown;
8126
8131
  isEditorPreview?: boolean;
8127
8132
  isMobilePreview?: boolean;
@@ -8288,14 +8293,28 @@ declare module "libs/reach/feature/content/src/common/item-tile/PublishableItemT
8288
8293
  export const PublishableItemTileWrapper: FC<Props>;
8289
8294
  }
8290
8295
  declare module "libs/reach/feature/content/src/common/TargetLinkOverrideContext" {
8291
- import { FC } from 'react';
8296
+ import { FC, MouseEvent } from 'react';
8292
8297
  import { ItemResourceTypes } from "libs/reach/util/common/src/index";
8293
8298
  interface TargetLinkOverrideContextProps {
8294
- onResolveContentTargetUrl: (itemId: string, itemType: ItemResourceTypes) => string;
8299
+ onResolveContentTargetUrl?: (itemId: string, itemType: ItemResourceTypes) => string;
8295
8300
  onResolveEmbeddedContentTargetUrl?: (itemId: string, itemType: ItemResourceTypes) => string;
8301
+ /**
8302
+ * Called instead of following the link when the user plain left-clicks a link to
8303
+ * another item, so the host can display that item itself (e.g. inside a modal).
8304
+ * Modified clicks (ctrl/cmd/shift/middle) still follow the resolved target url.
8305
+ */
8306
+ onNavigateToItem?: (itemId: string, itemType: ItemResourceTypes) => unknown;
8307
+ openTargetInNewWindow?: boolean;
8296
8308
  }
8297
8309
  export const TargetLinkOverrideContext: import("react").Context<TargetLinkOverrideContextProps>;
8298
8310
  export const TargetLinkOverrideContextProvider: FC<TargetLinkOverrideContextProps>;
8311
+ export function useTargetLinkOverride(): {
8312
+ resolveTargetUrl: (itemId: string, itemType: ItemResourceTypes) => string;
8313
+ openTargetInNewWindow: boolean;
8314
+ canNavigateToItem: boolean;
8315
+ tryNavigateToItem: (e: MouseEvent<unknown>, itemId: string, itemType: ItemResourceTypes) => boolean;
8316
+ withNavigateToItem: <E extends MouseEvent<unknown, globalThis.MouseEvent>>(itemId: string, itemType: ItemResourceTypes, onClick?: (e: E) => unknown) => (e: E) => unknown;
8317
+ };
8299
8318
  }
8300
8319
  declare module "libs/reach/feature/content/src/common/item-tile/NewsItemTile" {
8301
8320
  import { FC, ReactNode } from 'react';
@@ -9286,11 +9305,12 @@ declare module "libs/reach/feature/content/src/common/item-tile/EventItemTile" {
9286
9305
  }
9287
9306
  declare module "libs/reach/feature/content/src/common/detail/DetailViewContextProvider" {
9288
9307
  import { FC } from 'react';
9289
- import { ItemResourceTypes, PublishableItem } from "libs/reach/util/common/src/index";
9308
+ import { ItemResourceTypes, LeaseInfo, PublishableItem } from "libs/reach/util/common/src/index";
9290
9309
  export const DetailViewContextProvider: FC<{
9291
9310
  itemId: string;
9292
9311
  type?: ItemResourceTypes;
9293
9312
  loadItemFunc: (itemId: string) => Promise<PublishableItem>;
9313
+ loadLeaseFunc?: (itemId: string) => Promise<LeaseInfo | null>;
9294
9314
  isEditorPreview?: boolean;
9295
9315
  relatedItemIds?: string[];
9296
9316
  }>;
@@ -11938,7 +11958,7 @@ declare module "libs/reach/feature/content/src/editor/editorUtils" {
11938
11958
  }
11939
11959
  declare module "libs/reach/feature/content/src/editor/useEditorApi" {
11940
11960
  import { Observable } from 'rxjs';
11941
- import { ItemResourceTypes, ItemVersionSummary, PaginatedList, PublishableItem, PublishableItemContent, PublishableItemVersion, ResponseItem, WorkflowStatus } from "libs/reach/util/common/src/index";
11961
+ import { ItemResourceTypes, ItemVersionSummary, LeaseInfo, PaginatedList, PublishableItem, PublishableItemContent, PublishableItemVersion, ResponseItem, WorkflowStatus } from "libs/reach/util/common/src/index";
11942
11962
  import { NewsFilterDefinition } from "libs/reach/feature/content/src/filter/NewsFilterDefinition";
11943
11963
  import { KeepAliveHandle } from "libs/reach/feature/content/src/editor/editorUtils";
11944
11964
  export function useEditorApi(): {
@@ -11956,6 +11976,7 @@ declare module "libs/reach/feature/content/src/editor/useEditorApi" {
11956
11976
  setStatus: (type: ItemResourceTypes, itemId: number | string, status: WorkflowStatus, leaseId: string | null) => Promise<PublishableItem>;
11957
11977
  removeLease: (itemId: string, leaseId: string) => Promise<any>;
11958
11978
  keepLeaseAlive: (itemId: string, leaseId: string, token: string, subscriptionId: string) => KeepAliveHandle;
11979
+ getLease: (type: ItemResourceTypes, itemId: string) => Promise<LeaseInfo | null>;
11959
11980
  saveItem: (subscriptionId: string, type: ItemResourceTypes | null, item: PublishableItem, createLease?: boolean) => Observable<any>;
11960
11981
  updateGroups: (itemType: ItemResourceTypes, itemId: string, groupIds: string[]) => Promise<PublishableItem>;
11961
11982
  translateContent: (itemId: string, translateFrom: string, translateTo: string[]) => Promise<PublishableItemContent[]>;
package/package.json CHANGED
@@ -4,6 +4,6 @@
4
4
  "main": "",
5
5
  "types": "./index.d.ts",
6
6
  "license": "ISC",
7
- "version": "0.4.188",
7
+ "version": "0.4.190",
8
8
  "dependencies": {}
9
9
  }