@livetiles/reach-plugin-types 0.4.15 → 0.4.17

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 +84 -27
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -1496,9 +1496,19 @@ declare module "libs/reach/util/common/src/user/Subscription" {
1496
1496
  subscriptionId: string;
1497
1497
  subscriptionName: string;
1498
1498
  }
1499
- export interface PluginExtension {
1500
- area: string;
1501
- componentName: string;
1499
+ export enum ExtensionArea {
1500
+ global = "Global",
1501
+ page = "Page",
1502
+ eventEditorFeedbackSection = "EventEditorFeedbackSection",
1503
+ eventDetailViewSection = "EventDetailViewSection",
1504
+ itemEditor = "ItemEditor"
1505
+ }
1506
+ export type InlinePlugin = {
1507
+ area: ExtensionArea.itemEditor;
1508
+ objectButton: PluginObjectButton;
1509
+ };
1510
+ export type PagePlugin = {
1511
+ area: ExtensionArea.page;
1502
1512
  route: string;
1503
1513
  navigationNode?: {
1504
1514
  componentName?: string;
@@ -1508,7 +1518,20 @@ declare module "libs/reach/util/common/src/user/Subscription" {
1508
1518
  [key: string]: string;
1509
1519
  };
1510
1520
  };
1511
- }
1521
+ };
1522
+ export type PluginExtension = {
1523
+ area: ExtensionArea;
1524
+ componentName: string;
1525
+ } & (InlinePlugin | PagePlugin);
1526
+ export type PluginObjectButton = {
1527
+ buttonLabel: {
1528
+ defaultLabel: string;
1529
+ translations?: {
1530
+ [key: string]: string;
1531
+ };
1532
+ };
1533
+ iconName: string;
1534
+ };
1512
1535
  export interface PluginNotificationDefinitions {
1513
1536
  key: string;
1514
1537
  title: string;
@@ -3030,17 +3053,15 @@ declare module "libs/reach/util/common/src/Models" {
3030
3053
  }
3031
3054
  }
3032
3055
  declare module "libs/reach/util/common/src/plugins/usePluginExtensions" {
3033
- import { PluginExtension, WebPluginDefinition } from "libs/reach/util/common/src/user/Subscription";
3056
+ import { ExtensionArea, PluginExtension, WebPluginDefinition } from "libs/reach/util/common/src/user/Subscription";
3034
3057
  import { PageNavigationNodeProps } from "libs/reach/util/common/src/Models";
3035
- export enum ExtensionArea {
3036
- global = "Global",
3037
- page = "Page",
3038
- eventEditorFeedbackSection = "EventEditorFeedbackSection",
3039
- eventDetailViewSection = "EventDetailViewSection"
3040
- }
3041
3058
  export interface PluginNavigationNodeProps {
3042
3059
  navigationNodeProps?: PageNavigationNodeProps;
3043
3060
  }
3061
+ export type EmbeddedPluginProps = PluginProps & {
3062
+ isEditMode?: boolean;
3063
+ componentInstanceId: string;
3064
+ };
3044
3065
  export type PluginProps = Omit<WebPluginDefinition, 'extensions'> & PluginExtension;
3045
3066
  type DevPlugin = {
3046
3067
  pluginId: string;
@@ -3094,22 +3115,11 @@ declare module "libs/reach/util/common/src/plugins/PluginWrapper" {
3094
3115
  }
3095
3116
  declare module "libs/reach/util/common/src/plugins/Plugins" {
3096
3117
  import { FC } from 'react';
3097
- import { ExtensionArea } from "libs/reach/util/common/src/plugins/usePluginExtensions";
3118
+ import { ExtensionArea } from "libs/reach/util/common/src/user/Subscription";
3098
3119
  export const Plugins: FC<{
3099
3120
  area: ExtensionArea;
3100
3121
  } & any>;
3101
3122
  }
3102
- declare module "libs/reach/util/common/src/plugins/index" {
3103
- export * from "libs/reach/util/common/src/plugins/PluginContext";
3104
- export * from "libs/reach/util/common/src/plugins/PluginWrapper";
3105
- export * from "libs/reach/util/common/src/plugins/Plugins";
3106
- export * from "libs/reach/util/common/src/plugins/SystemJSHelper";
3107
- export * from "libs/reach/util/common/src/plugins/usePluginApi";
3108
- export * from "libs/reach/util/common/src/plugins/usePluginExtensions";
3109
- export * from "libs/reach/util/common/src/plugins/usePluginDeviceStore";
3110
- export * from "libs/reach/util/common/src/plugins/usePluginSubscriptionStore";
3111
- export * from "libs/reach/util/common/src/plugins/usePluginUserStore";
3112
- }
3113
3123
  declare module "libs/reach/util/common/src/theme/ColorGenerator" {
3114
3124
  export class Color {
3115
3125
  private r;
@@ -3326,6 +3336,25 @@ declare module "libs/reach/util/common/src/Variables" {
3326
3336
  export const managePagesRowHeight = 40;
3327
3337
  export const mobilePreviewWidth = 414;
3328
3338
  }
3339
+ declare module "libs/reach/util/common/src/plugins/Plugin" {
3340
+ import { FC } from 'react';
3341
+ import { PluginProps } from "libs/reach/util/common/src/plugins/usePluginExtensions";
3342
+ export const Plugin: FC<PluginProps & {
3343
+ showDetailedErrorMessage?: boolean;
3344
+ } & any>;
3345
+ }
3346
+ declare module "libs/reach/util/common/src/plugins/index" {
3347
+ export * from "libs/reach/util/common/src/plugins/PluginContext";
3348
+ export * from "libs/reach/util/common/src/plugins/PluginWrapper";
3349
+ export * from "libs/reach/util/common/src/plugins/Plugins";
3350
+ export * from "libs/reach/util/common/src/plugins/Plugin";
3351
+ export * from "libs/reach/util/common/src/plugins/SystemJSHelper";
3352
+ export * from "libs/reach/util/common/src/plugins/usePluginApi";
3353
+ export * from "libs/reach/util/common/src/plugins/usePluginExtensions";
3354
+ export * from "libs/reach/util/common/src/plugins/usePluginDeviceStore";
3355
+ export * from "libs/reach/util/common/src/plugins/usePluginSubscriptionStore";
3356
+ export * from "libs/reach/util/common/src/plugins/usePluginUserStore";
3357
+ }
3329
3358
  declare module "libs/reach/util/common/src/notification/NotificationContext" {
3330
3359
  import { FC, ReactNode } from 'react';
3331
3360
  import { ToastOptions } from 'react-toastify';
@@ -3428,6 +3457,15 @@ declare module "libs/reach/util/common/src/ImageDetails" {
3428
3457
  width?: number;
3429
3458
  height?: number;
3430
3459
  }
3460
+ export interface ImageWithAlignment extends ImageDetails {
3461
+ imageAlignment?: ImageAlignment;
3462
+ }
3463
+ export enum ImageAlignment {
3464
+ Default = "default",
3465
+ Left = "left",
3466
+ Right = "right",
3467
+ Center = "center"
3468
+ }
3431
3469
  }
3432
3470
  declare module "libs/reach/util/common/src/MainContentPanelContext" {
3433
3471
  export interface MainPanelContextType {
@@ -3672,7 +3710,7 @@ declare module "libs/reach/ui/common/src/PeoplePicker" {
3672
3710
  export const PeoplePicker: FC<Props>;
3673
3711
  }
3674
3712
  declare module "libs/reach/ui/common/src/plugins/reach-core" {
3675
- import { Account, AccountType, PluginNavigationNodeProps, PluginProps, PluginStorage, PluginStore, useAccountApi, useCurrentUser, useNotificationContext, usePluginDeviceStore, usePluginSettings, usePluginSubscriptionStore, usePluginSubscriptionStoreValue, usePluginUserStore, usePluginUserStoreValue, useReachApiEndPoints, useSubscriptionHandlePathBuilder, useSubscriptionWebAppUrl, useTheme } from "libs/reach/util/common/src/index";
3713
+ import { Account, AccountType, PluginNavigationNodeProps, PluginProps, PluginStorage, PluginStore, useAccountApi, useCurrentUser, useNotificationContext, usePluginDeviceStore, usePluginSettings, usePluginSubscriptionStore, usePluginSubscriptionStoreValue, usePluginUserStore, usePluginUserStoreValue, useReachApiEndPoints, useSubscriptionHandlePathBuilder, useSubscriptionWebAppUrl, useTheme, EmbeddedPluginProps } from "libs/reach/util/common/src/index";
3676
3714
  import { LinkContext, ResourceContext } from "libs/reach/util/context/src/index";
3677
3715
  import { useAuthenticationContext } from "libs/shared/util/authentication/src/index";
3678
3716
  import { createId, logger } from "libs/shared/util/common/src/index";
@@ -3689,7 +3727,7 @@ declare module "libs/reach/ui/common/src/plugins/reach-core" {
3689
3727
  * @deprecated Please use `usePluginDeviceStore` instead
3690
3728
  */
3691
3729
  usePluginDeviceStore as usePluginStorage, usePluginDeviceStore, usePluginSubscriptionStore, usePluginSubscriptionStoreValue, usePluginUserStore, usePluginUserStoreValue, useReachApiEndPoints, AccountType, PeoplePicker, GutterToggle, EditorSettingsDialogWithFixedWidth as EditorSettingsDialog, Spinner, SelectionMode, EditorHighlight, useTheme, useSubscriptionHandlePathBuilder, useSubscriptionWebAppUrl, };
3692
- export type { Account, PluginNavigationNodeProps, PluginProps, PluginStorage, PluginStore, };
3730
+ export type { Account, PluginNavigationNodeProps, PluginProps, PluginStorage, PluginStore, EmbeddedPluginProps, };
3693
3731
  }
3694
3732
  declare module "libs/reach/ui/common/src/content-keyword-utils" {
3695
3733
  import { CurrentUser, Keyword, KeywordGroup, KeywordsByGroupId } from "libs/reach/util/common/src/index";
@@ -7965,7 +8003,8 @@ declare module "libs/reach/feature/content/src/common/body/TextViewer" {
7965
8003
  Contact = "contact",
7966
8004
  InlinePageList = "inline-page-list",
7967
8005
  UrlPreview = "url-preview",
7968
- ActionButton = "action-button"
8006
+ ActionButton = "action-button",
8007
+ InlinePlugin = "inline-plugin"
7969
8008
  }
7970
8009
  export interface HtmlComponentMapper {
7971
8010
  component: FC<any>;
@@ -8463,6 +8502,7 @@ declare module "libs/reach/feature/content/src/common/body/InlineObjectToolbar"
8463
8502
  import { FC, ReactNode } from 'react';
8464
8503
  export const InlineObjectToolbar: FC<{
8465
8504
  onDelete?: () => void;
8505
+ deleteAriaLabelResourceKey?: string;
8466
8506
  additionalButtons?: ReactNode;
8467
8507
  }>;
8468
8508
  export const InlineObjectToolbarWrapper: FC<{
@@ -8470,15 +8510,18 @@ declare module "libs/reach/feature/content/src/common/body/InlineObjectToolbar"
8470
8510
  }>;
8471
8511
  }
8472
8512
  declare module "libs/reach/feature/content/src/common/body/ImageToolbar" {
8473
- import { FC } from 'react';
8513
+ import { FC, ReactNode } from 'react';
8514
+ import { ImageAlignment } from "libs/reach/util/common/src/index";
8474
8515
  export const ImageToolbar: FC<{
8475
8516
  onDelete?: () => void;
8476
8517
  onFullScreen?: (e: React.MouseEvent<any>) => void;
8477
8518
  onClose?: (e: React.MouseEvent<any>) => void;
8478
8519
  onCrop?: (e: React.MouseEvent<any>) => void;
8520
+ onAlignment?: (e: React.MouseEvent<any>, alignment: ImageAlignment) => void;
8479
8521
  showFullScreenButton?: boolean;
8480
8522
  showCloseButton?: boolean;
8481
8523
  showCropButton?: boolean;
8524
+ alignmentButtons?: ReactNode;
8482
8525
  }>;
8483
8526
  }
8484
8527
  declare module "libs/reach/feature/content/src/common/body/PhotoGallery" {
@@ -9046,6 +9089,7 @@ declare module "libs/reach/feature/content/src/common/body/InlineUrlPreview" {
9046
9089
  }
9047
9090
  declare module "libs/reach/feature/content/src/common/body/InlineImage" {
9048
9091
  import { HtmlComponentMapper } from "libs/reach/feature/content/src/common/body/TextViewer";
9092
+ export const ImageAlignmentStyles: (alignment: string, width: number, preventFloat?: boolean) => string | import("styled-components").FlattenSimpleInterpolation;
9049
9093
  export const InlineImageMapper: HtmlComponentMapper;
9050
9094
  }
9051
9095
  declare module "libs/reach/feature/content/src/common/body/InlineContact" {
@@ -9264,6 +9308,10 @@ declare module "libs/reach/feature/content/src/common/body/InlineActionButtonLis
9264
9308
  }
9265
9309
  export const InlineActionButtonMapper: HtmlComponentMapper;
9266
9310
  }
9311
+ declare module "libs/reach/feature/content/src/common/body/InlineObjectPluginView" {
9312
+ import { HtmlComponentMapper } from "libs/reach/feature/content/src/common/body/TextViewer";
9313
+ export const InlineObjectPluginMapper: HtmlComponentMapper;
9314
+ }
9267
9315
  declare module "libs/reach/feature/content/src/common/detail/events/controls/EventDetailViewPeopleInfo" {
9268
9316
  import { FC } from 'react';
9269
9317
  export const EventDetailViewPeopleInfo: FC;
@@ -9997,6 +10045,13 @@ declare module "libs/reach/feature/content/src/common/hooks/useCommonEditorApi"
9997
10045
  getTaskViewCounts: (type: ItemResourceTypes, groupId?: string) => Promise<TaskSummary>;
9998
10046
  };
9999
10047
  }
10048
+ declare module "libs/reach/feature/content/src/common/hooks/useClickOutside" {
10049
+ interface IClickHandles {
10050
+ onInsideClick: () => void;
10051
+ onOutsideClick: () => void;
10052
+ }
10053
+ export function useClickOutside<T extends HTMLElement>({ onInsideClick, onOutsideClick, }: IClickHandles): import("react").MutableRefObject<T>;
10054
+ }
10000
10055
  declare module "libs/reach/feature/content/src/common/sidebar/SidebarIcon" {
10001
10056
  import { LocationDescriptor } from 'history';
10002
10057
  import { FC, ReactNode } from 'react';
@@ -10165,6 +10220,7 @@ declare module "libs/reach/feature/content/src/common/index" {
10165
10220
  export * from "libs/reach/feature/content/src/common/body/ItemBodyWrapper";
10166
10221
  export * from "libs/reach/feature/content/src/common/body/InlineFileList";
10167
10222
  export * from "libs/reach/feature/content/src/common/body/InlineActionButtonList";
10223
+ export * from "libs/reach/feature/content/src/common/body/InlineObjectPluginView";
10168
10224
  export * from "libs/reach/feature/content/src/common/body/inline-action-button/InlineActionButtonStyles";
10169
10225
  export * from "libs/reach/feature/content/src/common/detail/events/controls/EventMetaInfo";
10170
10226
  export * from "libs/reach/feature/content/src/common/detail/events/controls/EventRegistrationButton";
@@ -10218,6 +10274,7 @@ declare module "libs/reach/feature/content/src/common/index" {
10218
10274
  export * from "libs/reach/feature/content/src/common/hooks/useExternalContentHandler";
10219
10275
  export * from "libs/reach/feature/content/src/common/hooks/useCommonEditorApi";
10220
10276
  export * from "libs/reach/feature/content/src/common/hooks/usePageViewTracker";
10277
+ export * from "libs/reach/feature/content/src/common/hooks/useClickOutside";
10221
10278
  export * from "libs/reach/feature/content/src/common/TargetLinkOverrideContext";
10222
10279
  export * from "libs/reach/feature/content/src/common/sidebar/BaseSidebarItem";
10223
10280
  export * from "libs/reach/feature/content/src/common/sidebar/SidebarGroup";
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.15",
7
+ "version": "0.4.17",
8
8
  "dependencies": {}
9
9
  }