@livetiles/reach-plugin-types 0.4.0-preview.351 → 0.4.0-preview.353

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 +136 -140
  2. package/package.json +1 -1
package/lib/index.d.ts CHANGED
@@ -2299,15 +2299,134 @@ declare module "libs/reach/util/common/src/plugins/usePluginApi" {
2299
2299
  unlinkPlugin: (pluginId: string) => Promise<any>;
2300
2300
  };
2301
2301
  }
2302
+ declare module "libs/reach/util/common/src/content/GraphQLAttachmentType" {
2303
+ export enum GraphQLAttachmentType {
2304
+ Image = "IMAGE",
2305
+ File = "FILE",
2306
+ YouTubeVideo = "YOU_TUBE_VIDEO",
2307
+ VimeoVideo = "VIMEO_VIDEO",
2308
+ News = "NEWS",
2309
+ Event = "EVENT",
2310
+ Page = "PAGE",
2311
+ Post = "POST",
2312
+ Giphy = "GIPHY"
2313
+ }
2314
+ }
2315
+ declare module "libs/reach/util/common/src/Models" {
2316
+ import { BaseAttachment } from "libs/reach/util/common/src/content/Attachment";
2317
+ import { GraphQLAttachmentType } from "libs/reach/util/common/src/content/GraphQLAttachmentType";
2318
+ import { Account } from "libs/reach/util/common/src/user/Account";
2319
+ export interface ColorStyleDefinition {
2320
+ backgroundColor: string;
2321
+ color: string;
2322
+ }
2323
+ export interface PageNavigationNodeProps {
2324
+ title?: string;
2325
+ iconName?: string;
2326
+ to?: string;
2327
+ onClick?: () => void;
2328
+ isActive?: boolean;
2329
+ exact?: boolean;
2330
+ cannotBeActive?: boolean;
2331
+ submenuContents?: JSX.Element;
2332
+ submenuStyleDefinition?: ColorStyleDefinition;
2333
+ badgeInfo?: number | boolean;
2334
+ domIdentifier?: string;
2335
+ secondaryIconName?: string;
2336
+ secondaryIconTooltipResourceKey?: string;
2337
+ onSecondaryIconClick?: () => void;
2338
+ iconColor?: string;
2339
+ className?: string;
2340
+ }
2341
+ export interface Chat {
2342
+ id: string;
2343
+ members: (Account & ChatMember)[];
2344
+ memberIds: string[];
2345
+ groupName?: string;
2346
+ lastMessageInfo?: {
2347
+ received: string;
2348
+ senderId: string;
2349
+ content?: string;
2350
+ attachments: ChatAttachment[];
2351
+ deleteDate?: string;
2352
+ deleteState?: DeleteState;
2353
+ messageType?: ChatMessageType;
2354
+ messageValues?: {
2355
+ groupName?: string;
2356
+ userId?: string;
2357
+ };
2358
+ };
2359
+ messages: ChatMessage[];
2360
+ hasNewMessages: boolean;
2361
+ fileAccessToken: string;
2362
+ }
2363
+ export enum DeleteState {
2364
+ NotDeleted = "NOT_DELETED",
2365
+ RecycleBin = "RECYCLE_BIN",
2366
+ Deleted = "DELETED"
2367
+ }
2368
+ export enum ChatMessageType {
2369
+ Default = "DEFAULT",
2370
+ GroupNameChange = "GROUP_NAME_CHANGE",
2371
+ UserLeftGroup = "USER_LEFT_GROUP"
2372
+ }
2373
+ export enum MemberStatus {
2374
+ Normal = "NORMAL",
2375
+ LeftGroupChat = "LEFT_GROUP_CHAT",
2376
+ LeftOneToOneChat = "LEFT_ONE_TO_ONE_CHAT"
2377
+ }
2378
+ export interface ChatMember {
2379
+ id?: string;
2380
+ status?: MemberStatus;
2381
+ joinDate?: string;
2382
+ leftDate?: string;
2383
+ }
2384
+ export interface ChatMessage {
2385
+ itemId: string;
2386
+ content: string;
2387
+ senderId?: string;
2388
+ chatId?: string;
2389
+ received?: string;
2390
+ attachments?: ChatAttachment[];
2391
+ attachmentContainerId?: string;
2392
+ fileAccessToken?: string;
2393
+ deleteDate?: string;
2394
+ deleteState?: DeleteState;
2395
+ modifiedDate?: string;
2396
+ chat?: Chat;
2397
+ messageType?: ChatMessageType;
2398
+ messageValues?: {
2399
+ groupName?: string;
2400
+ };
2401
+ }
2402
+ export interface ChatIsTypingInfo {
2403
+ sender: Account;
2404
+ chatId: string;
2405
+ sentOn: string;
2406
+ }
2407
+ export interface ChatView {
2408
+ chatId: string;
2409
+ timestamp: Date;
2410
+ isActive: boolean;
2411
+ }
2412
+ export interface ChatAttachment extends BaseAttachment {
2413
+ type: GraphQLAttachmentType;
2414
+ }
2415
+ }
2302
2416
  declare module "libs/reach/util/common/src/plugins/usePluginExtensions" {
2303
2417
  import { PluginExtension, WebPluginDefinition } from "libs/reach/util/common/src/user/Subscription";
2418
+ import { PageNavigationNodeProps } from "libs/reach/util/common/src/Models";
2304
2419
  export enum ExtensionArea {
2305
2420
  global = "Global",
2306
2421
  page = "Page",
2307
2422
  eventEditorFeedbackSection = "EventEditorFeedbackSection",
2308
2423
  eventDetailViewSection = "EventDetailViewSection"
2309
2424
  }
2310
- export type PluginAndExtension = Omit<WebPluginDefinition, 'extensions'> & PluginExtension;
2425
+ export interface PluginNavigationNodeProps {
2426
+ navigationNodeProps?: PageNavigationNodeProps;
2427
+ renderNavigationNode?: (navigationNodeProps: PageNavigationNodeProps) => JSX.Element;
2428
+ }
2429
+ export type PluginProps = Omit<WebPluginDefinition, 'extensions'> & PluginExtension;
2311
2430
  type DevPlugin = {
2312
2431
  pluginId: string;
2313
2432
  port: number;
@@ -2315,18 +2434,15 @@ declare module "libs/reach/util/common/src/plugins/usePluginExtensions" {
2315
2434
  linkPlugin?: boolean;
2316
2435
  };
2317
2436
  export function usePlugins(): WebPluginDefinition[];
2318
- export function usePluginExtensions(area?: ExtensionArea): PluginAndExtension[];
2437
+ export function usePluginExtensions(area?: ExtensionArea): PluginProps[];
2319
2438
  export function removeInjectedRemotePlugin(pluginId: string): void;
2320
2439
  export function useInjectedRemotePlugins(): DevPlugin[];
2321
2440
  export function useRemotePlugins(): WebPluginDefinition[];
2322
2441
  }
2323
2442
  declare module "libs/reach/util/common/src/plugins/PluginWrapper" {
2324
2443
  import { FC } from 'react';
2325
- import { PluginAndExtension } from "libs/reach/util/common/src/plugins/usePluginExtensions";
2326
- export const PluginWrapper: FC<PluginAndExtension & {
2327
- navigationNodeProps?: any;
2328
- renderNavigationNode?: (navigationNodeProps: any) => JSX.Element;
2329
- }>;
2444
+ import { PluginNavigationNodeProps, PluginProps } from "libs/reach/util/common/src/plugins/usePluginExtensions";
2445
+ export const PluginWrapper: FC<PluginProps & PluginNavigationNodeProps>;
2330
2446
  }
2331
2447
  declare module "libs/reach/util/common/src/plugins/Plugins" {
2332
2448
  import { FC } from 'react';
@@ -2478,19 +2594,6 @@ declare module "libs/reach/util/common/src/theme/index" {
2478
2594
  export * from "libs/reach/util/common/src/theme/ThemeService";
2479
2595
  export * from "libs/reach/util/common/src/theme/ColorGenerator";
2480
2596
  }
2481
- declare module "libs/reach/util/common/src/content/GraphQLAttachmentType" {
2482
- export enum GraphQLAttachmentType {
2483
- Image = "IMAGE",
2484
- File = "FILE",
2485
- YouTubeVideo = "YOU_TUBE_VIDEO",
2486
- VimeoVideo = "VIMEO_VIDEO",
2487
- News = "NEWS",
2488
- Event = "EVENT",
2489
- Page = "PAGE",
2490
- Post = "POST",
2491
- Giphy = "GIPHY"
2492
- }
2493
- }
2494
2597
  declare module "libs/reach/util/common/src/content/EventItem" {
2495
2598
  import { Account } from "libs/reach/util/common/src/user/Account";
2496
2599
  import { PollResult } from "libs/reach/util/common/src/content/BaseItem";
@@ -2956,85 +3059,6 @@ declare module "libs/reach/util/common/src/MainContentPanelContext" {
2956
3059
  }
2957
3060
  export const MainContentPanelContext: import("react").Context<MainPanelContextType>;
2958
3061
  }
2959
- declare module "libs/reach/util/common/src/Models" {
2960
- import { BaseAttachment } from "libs/reach/util/common/src/content/Attachment";
2961
- import { GraphQLAttachmentType } from "libs/reach/util/common/src/content/GraphQLAttachmentType";
2962
- import { Account } from "libs/reach/util/common/src/user/Account";
2963
- export interface Chat {
2964
- id: string;
2965
- members: (Account & ChatMember)[];
2966
- memberIds: string[];
2967
- groupName?: string;
2968
- lastMessageInfo?: {
2969
- received: string;
2970
- senderId: string;
2971
- content?: string;
2972
- attachments: ChatAttachment[];
2973
- deleteDate?: string;
2974
- deleteState?: DeleteState;
2975
- messageType?: ChatMessageType;
2976
- messageValues?: {
2977
- groupName?: string;
2978
- userId?: string;
2979
- };
2980
- };
2981
- messages: ChatMessage[];
2982
- hasNewMessages: boolean;
2983
- fileAccessToken: string;
2984
- }
2985
- export enum DeleteState {
2986
- NotDeleted = "NOT_DELETED",
2987
- RecycleBin = "RECYCLE_BIN",
2988
- Deleted = "DELETED"
2989
- }
2990
- export enum ChatMessageType {
2991
- Default = "DEFAULT",
2992
- GroupNameChange = "GROUP_NAME_CHANGE",
2993
- UserLeftGroup = "USER_LEFT_GROUP"
2994
- }
2995
- export enum MemberStatus {
2996
- Normal = "NORMAL",
2997
- LeftGroupChat = "LEFT_GROUP_CHAT",
2998
- LeftOneToOneChat = "LEFT_ONE_TO_ONE_CHAT"
2999
- }
3000
- export interface ChatMember {
3001
- id?: string;
3002
- status?: MemberStatus;
3003
- joinDate?: string;
3004
- leftDate?: string;
3005
- }
3006
- export interface ChatMessage {
3007
- itemId: string;
3008
- content: string;
3009
- senderId?: string;
3010
- chatId?: string;
3011
- received?: string;
3012
- attachments?: ChatAttachment[];
3013
- attachmentContainerId?: string;
3014
- fileAccessToken?: string;
3015
- deleteDate?: string;
3016
- deleteState?: DeleteState;
3017
- modifiedDate?: string;
3018
- chat?: Chat;
3019
- messageType?: ChatMessageType;
3020
- messageValues?: {
3021
- groupName?: string;
3022
- };
3023
- }
3024
- export interface ChatIsTypingInfo {
3025
- sender: Account;
3026
- chatId: string;
3027
- sentOn: string;
3028
- }
3029
- export interface ChatView {
3030
- chatId: string;
3031
- timestamp: Date;
3032
- isActive: boolean;
3033
- }
3034
- export interface ChatAttachment extends BaseAttachment {
3035
- type: GraphQLAttachmentType;
3036
- }
3037
- }
3038
3062
  declare module "libs/reach/util/common/src/PagingService" {
3039
3063
  import { Observable } from 'rxjs';
3040
3064
  export const onPageScroll: Observable<number>;
@@ -3221,7 +3245,7 @@ declare module "libs/reach/ui/common/src/PeoplePicker" {
3221
3245
  export const PeoplePicker: FC<Props>;
3222
3246
  }
3223
3247
  declare module "libs/reach/ui/common/src/plugins/reach-core" {
3224
- import { Account, AccountType, useCurrentUser, useNotificationContext, usePluginSettings, usePluginStorage, useReachApiEndPoints, useSubscriptionHandlePathBuilder, useTheme } from "libs/reach/util/common/src/index";
3248
+ import { Account, AccountType, PluginProps, PluginNavigationNodeProps, useCurrentUser, useNotificationContext, usePluginSettings, usePluginStorage, useReachApiEndPoints, useSubscriptionHandlePathBuilder, useTheme } from "libs/reach/util/common/src/index";
3225
3249
  import { LinkContext, ResourceContext } from "libs/reach/util/context/src/index";
3226
3250
  import { useAuthenticationContext } from "libs/shared/util/authentication/src/index";
3227
3251
  import { createId, logger } from "libs/shared/util/common/src/index";
@@ -3235,7 +3259,7 @@ declare module "libs/reach/ui/common/src/plugins/reach-core" {
3235
3259
  import { PeoplePicker } from "libs/reach/ui/common/src/PeoplePicker";
3236
3260
  import { useAccountApi } from "libs/reach/util/common/src/index";
3237
3261
  export { useCurrentUser, useAccountApi, useAuthenticationContext, useEnvironmentConfig, useNotificationContext, usePromise, LinkContext, TextLink, logger, createId, ResourceContext, usePluginSettings, usePluginStorage, useReachApiEndPoints, AccountType, PeoplePicker, GutterToggle, EditorSettingsDialogWithFixedWidth as EditorSettingsDialog, Spinner, SelectionMode, EditorHighlight, useTheme, useSubscriptionHandlePathBuilder, };
3238
- export type { Account };
3262
+ export type { Account, PluginNavigationNodeProps, PluginProps };
3239
3263
  }
3240
3264
  declare module "libs/reach/ui/common/src/content-keyword-utils" {
3241
3265
  import { CurrentUser, Keyword, KeywordGroup, KeywordsByGroupId } from "libs/reach/util/common/src/index";
@@ -6029,22 +6053,19 @@ declare module "apps/reach-app/src/app/chrome/BaseSidebarItem" {
6029
6053
  }
6030
6054
  declare module "apps/reach-app/src/app/chrome/SidebarItemSection" {
6031
6055
  import { FC } from 'react';
6032
- export interface StyleDefinition {
6033
- backgroundColor: string;
6034
- color: string;
6035
- }
6056
+ import { ColorStyleDefinition } from "libs/reach/util/common/src/index";
6036
6057
  export const SidebarItemSection: FC<{
6037
- styleDefinition?: StyleDefinition;
6058
+ styleDefinition?: ColorStyleDefinition;
6038
6059
  }>;
6039
6060
  }
6040
6061
  declare module "apps/reach-app/src/app/chrome/SidebarItem" {
6041
6062
  import { FC, ReactNode } from 'react';
6042
6063
  import { PrimitiveType } from 'intl-messageformat';
6043
6064
  import './SidebarItem.scss';
6044
- import { StyleDefinition } from "apps/reach-app/src/app/chrome/SidebarItemSection";
6045
6065
  import { LocationDescriptor } from 'history';
6066
+ import { ColorStyleDefinition } from "libs/reach/util/common/src/index";
6046
6067
  interface CommonSidebarItemProps {
6047
- title?: any;
6068
+ title?: string | JSX.Element;
6048
6069
  titleResource?: string;
6049
6070
  icon?: ReactNode;
6050
6071
  iconName?: string;
@@ -6056,14 +6077,13 @@ declare module "apps/reach-app/src/app/chrome/SidebarItem" {
6056
6077
  reverse?: boolean;
6057
6078
  notHighlightable?: boolean;
6058
6079
  onClick?: () => void;
6059
- children?: any;
6060
6080
  className?: string;
6061
6081
  isActive?: boolean;
6062
6082
  activeClassName?: string;
6063
6083
  readOnly?: boolean;
6064
6084
  submenu?: JSX.Element;
6065
6085
  submenuClassName?: string;
6066
- submenuStyleDefinition?: StyleDefinition;
6086
+ submenuStyleDefinition?: ColorStyleDefinition;
6067
6087
  badgeInfo?: number | boolean;
6068
6088
  domIdentifier?: string;
6069
6089
  }
@@ -6352,6 +6372,7 @@ declare module "libs/reach/feature/content/src/comments/FollowComments" {
6352
6372
  declare module "libs/reach/feature/content/src/comments/CommentInput" {
6353
6373
  import { ReactNode } from 'react';
6354
6374
  import { Account } from "libs/reach/util/common/src/index";
6375
+ import { CommentInputTheme } from "libs/reach/ui/common/src/index";
6355
6376
  export interface UserSuggestion {
6356
6377
  id: string;
6357
6378
  upn: string;
@@ -6371,16 +6392,13 @@ declare module "libs/reach/feature/content/src/comments/CommentInput" {
6371
6392
  onCtrlEnter?: () => unknown;
6372
6393
  onChange?: (value: string) => void;
6373
6394
  onFocus?: () => void;
6374
- buttons?: {
6375
- leftSide?: ReactNode;
6376
- rightSide?: ReactNode;
6377
- };
6395
+ buttons?: ReactNode;
6378
6396
  mentionSearchHandler: (searchText: string) => Promise<Account[]>;
6397
+ inputTheme?: CommentInputTheme;
6379
6398
  placeHolderStringResourceKey?: string;
6380
6399
  placeHolderStringResourceValues?: {
6381
6400
  [key: string]: string | number | boolean | Date;
6382
6401
  };
6383
- disableBoxShadow?: boolean;
6384
6402
  }
6385
6403
  export const CommentInput: import("react").ForwardRefExoticComponent<CommentInputProps & import("react").RefAttributes<HTMLInputElement>>;
6386
6404
  }
@@ -7831,7 +7849,6 @@ declare module "libs/reach/feature/content/src/comments/CreateComment" {
7831
7849
  defaultKeywords?: Keyword[];
7832
7850
  mandatoryKeywords?: Keyword[];
7833
7851
  };
7834
- disableBoxShadow?: boolean;
7835
7852
  }
7836
7853
  interface Props extends BaseProps {
7837
7854
  allowAttachments?: boolean;
@@ -7922,6 +7939,7 @@ declare module "libs/reach/feature/content/src/comments/EditComment" {
7922
7939
  deletedFileUrls?: string[];
7923
7940
  onCancel?: () => void;
7924
7941
  mentionSearchHandler: (searchText: string) => Promise<Account[]>;
7942
+ inputTheme?: CommentInputTheme;
7925
7943
  onAttachmentAdded?: (attachments: ClientAttachment[]) => void;
7926
7944
  onDeleteAttachment?: (attachment: ClientAttachment) => void;
7927
7945
  }
@@ -7939,7 +7957,6 @@ declare module "libs/reach/feature/content/src/comments/EditComment" {
7939
7957
  allowSaveWithoutContent?: boolean;
7940
7958
  saveOnEnter?: boolean;
7941
7959
  saveOnCtrlEnter?: boolean;
7942
- attachmentPreviewTheme?: CommentInputTheme;
7943
7960
  }
7944
7961
  export const EditComment: FC<Props>;
7945
7962
  }
@@ -7961,7 +7978,6 @@ declare module "libs/reach/feature/content/src/comments/EditCommentWithAttachmen
7961
7978
  import { ClientAttachment } from "libs/reach/feature/content/src/comments/RichCommentInput";
7962
7979
  import { ItemWithAttachments } from "libs/reach/util/common/src/index";
7963
7980
  import { Keyword } from "libs/reach/util/common/src/index";
7964
- import { CommentInputTheme } from "libs/reach/ui/common/src/index";
7965
7981
  interface Props extends CreateCommentProps {
7966
7982
  onSave: (newContent: string, attachments?: Attachment[], keywords?: {
7967
7983
  [key: string]: Keyword[];
@@ -7977,7 +7993,6 @@ declare module "libs/reach/feature/content/src/comments/EditCommentWithAttachmen
7977
7993
  allowSaveWithoutContent?: boolean;
7978
7994
  saveOnEnter?: boolean;
7979
7995
  saveOnCtrlEnter?: boolean;
7980
- attachmentPreviewTheme?: CommentInputTheme;
7981
7996
  }
7982
7997
  export const EditCommentWithAttachments: FC<Props>;
7983
7998
  export function isClientAttachment(value: ClientAttachment | Attachment): value is ClientAttachment;
@@ -11181,27 +11196,8 @@ declare module "apps/reach-app/src/app/EnforcedSubscriptionContextProvider" {
11181
11196
  }
11182
11197
  declare module "apps/reach-app/src/app/chrome/PageMenuActionItem" {
11183
11198
  import { FC } from 'react';
11184
- import { StyleDefinition } from "apps/reach-app/src/app/chrome/SidebarItemSection";
11185
- export interface PageAction {
11186
- key?: string | number;
11187
- title?: string;
11188
- iconName?: string;
11189
- to?: string;
11190
- onClick?: () => void;
11191
- isActive?: boolean;
11192
- exact?: boolean;
11193
- cannotBeActive?: boolean;
11194
- submenuContents?: JSX.Element;
11195
- submenuStyleDefinition?: StyleDefinition;
11196
- badgeInfo?: number | boolean;
11197
- domIdentifier?: string;
11198
- secondaryIconName?: string;
11199
- secondaryIconTooltipResourceKey?: string;
11200
- onSecondaryIconClick?: () => void;
11201
- iconColor?: string;
11202
- className?: string;
11203
- }
11204
- export const PageMenuActionItem: FC<PageAction>;
11199
+ import { PageNavigationNodeProps } from "libs/reach/util/common/src/index";
11200
+ export const PageMenuActionItem: FC<PageNavigationNodeProps>;
11205
11201
  }
11206
11202
  declare module "apps/reach-app/src/app/admin/ManagePluginsPage" {
11207
11203
  import { FC } from 'react';
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.0-preview.351",
7
+ "version": "0.4.0-preview.353",
8
8
  "dependencies": {}
9
9
  }