@hubspot/ui-extensions 0.8.35 → 0.8.37

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.
@@ -1,4 +1,7 @@
1
1
  import type * as types from './types';
2
+ /**
3
+ * @link https://developers.hubspot.com/beta-docs/reference/ui-components/standard-components/alert
4
+ */
2
5
  export declare const Alert: "Alert" & {
3
6
  readonly type?: "Alert" | undefined;
4
7
  readonly props?: types.AlertProps | undefined;
@@ -1,4 +1,7 @@
1
1
  import { createRemoteReactComponent } from '@remote-ui/react';
2
+ /**
3
+ * @link https://developers.hubspot.com/beta-docs/reference/ui-components/standard-components/alert
4
+ */
2
5
  export const Alert = createRemoteReactComponent('Alert');
3
6
  export const Button = createRemoteReactComponent('Button', {
4
7
  fragmentProps: ['overlay'],
@@ -5,4 +5,10 @@ declare const Iframe: "Iframe" & {
5
5
  readonly props?: types.IframeProps | undefined;
6
6
  readonly children?: true | undefined;
7
7
  } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Iframe", types.IframeProps, true>>;
8
- export { Iframe };
8
+ /** @experimental This component is experimental. Avoid using it in production due to potential breaking changes. Your feedback is valuable for improvements. Stay tuned for updates. */
9
+ declare const MediaObject: "MediaObject" & {
10
+ readonly type?: "MediaObject" | undefined;
11
+ readonly props?: types.MediaObjectProps | undefined;
12
+ readonly children?: true | undefined;
13
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"MediaObject", types.MediaObjectProps, true>>;
14
+ export { Iframe, MediaObject };
@@ -1,4 +1,8 @@
1
1
  import { createRemoteReactComponent } from '@remote-ui/react';
2
2
  /** @experimental This component is experimental. Avoid using it in production due to potential breaking changes. Your feedback is valuable for improvements. Stay tuned for updates. */
3
3
  const Iframe = createRemoteReactComponent('Iframe');
4
- export { Iframe };
4
+ /** @experimental This component is experimental. Avoid using it in production due to potential breaking changes. Your feedback is valuable for improvements. Stay tuned for updates. */
5
+ const MediaObject = createRemoteReactComponent('MediaObject', {
6
+ fragmentProps: ['itemRight', 'itemLeft'],
7
+ });
8
+ export { Iframe, MediaObject };
package/dist/types.d.ts CHANGED
@@ -7,6 +7,7 @@ export declare class ExtensionEvent {
7
7
  id: string;
8
8
  constructor(event: Event);
9
9
  }
10
+ export type TypesOfReadOnlyArray<T extends ReadonlyArray<unknown>> = T extends ReadonlyArray<infer ElementType> ? ElementType : never;
10
11
  export declare class FormSubmitExtensionEvent<V> extends ExtensionEvent {
11
12
  targetValue: V;
12
13
  constructor(value: V, event: Event);
@@ -1887,17 +1888,49 @@ interface ActivityCreatorActionArgs {
1887
1888
  windowVariant?: 'windowed' | 'fullscreen';
1888
1889
  }
1889
1890
  /** @ignore */
1891
+ interface EngagementAppLinkArgs {
1892
+ objectId: number | string;
1893
+ objectTypeId: string;
1894
+ engagementId: number | string;
1895
+ external?: boolean;
1896
+ }
1897
+ /** @ignore */
1898
+ interface RecordAppLinkArgs {
1899
+ includeEschref?: boolean;
1900
+ objectId: number;
1901
+ objectTypeId: string;
1902
+ external?: boolean;
1903
+ }
1904
+ /** @ignore */
1905
+ interface PageAppLinkArgs {
1906
+ path: string;
1907
+ external?: boolean;
1908
+ }
1909
+ /** @ignore */
1910
+ interface ExternalUrlArgs {
1911
+ href: string;
1912
+ }
1913
+ interface OpenRecordCreatorFormArgs {
1914
+ objectTypeId: string;
1915
+ }
1916
+ /** @ignore */
1890
1917
  interface ActionArgs {
1891
1918
  PREVIEW_OBJECT: ObjectCoordinates;
1892
1919
  ADD_NOTE: ActivityCreatorActionArgs;
1893
1920
  ADD_TASK: ActivityCreatorActionArgs;
1894
1921
  SEND_EMAIL: ActivityCreatorActionArgs;
1895
1922
  SCHEDULE_MEETING: ActivityCreatorActionArgs;
1923
+ OPEN_RECORD_CREATOR_FORM: OpenRecordCreatorFormArgs;
1896
1924
  OPEN_RECORD_ASSOCIATION_FORM: OpenRecordAssociationFormArgs;
1925
+ ENGAGEMENT_APP_LINK: EngagementAppLinkArgs;
1926
+ RECORD_APP_LINK: RecordAppLinkArgs;
1927
+ PAGE_APP_LINK: PageAppLinkArgs;
1928
+ EXTERNAL_URL: ExternalUrlArgs;
1929
+ OPEN_WORKFLOW_ENROLLMENT_MODAL: ObjectCoordinates;
1897
1930
  }
1898
1931
  /** @ignore */
1899
1932
  export type ArgsFor<SpecificActionType extends ActionType> = ActionArgs[SpecificActionType];
1900
- export type ActionType = 'PREVIEW_OBJECT' | 'ADD_NOTE' | 'ADD_TASK' | 'SEND_EMAIL' | 'SCHEDULE_MEETING' | 'OPEN_RECORD_ASSOCIATION_FORM';
1933
+ export type ActionType = 'PREVIEW_OBJECT' | 'ADD_NOTE' | 'ADD_TASK' | 'SEND_EMAIL' | 'SCHEDULE_MEETING' | 'OPEN_RECORD_CREATOR_FORM' | 'OPEN_RECORD_ASSOCIATION_FORM' | 'ENGAGEMENT_APP_LINK' | 'RECORD_APP_LINK' | 'PAGE_APP_LINK' | 'EXTERNAL_URL' | 'OPEN_WORKFLOW_ENROLLMENT_MODAL';
1901
1934
  /** @ignore */
1902
1935
  interface BaseActionComponent {
1903
1936
  children: ReactNode;
@@ -1956,14 +1989,26 @@ interface RemotePlaygroundExtensionPoint extends ExtensionPointContract {
1956
1989
  ExampleCrmComponent: ComponentType<ExampleCrmComponentProps>;
1957
1990
  };
1958
1991
  }
1992
+ export declare const EXTENSION_POINT_LOCATIONS: readonly ["crm.preview", "crm.record.sidebar", "crm.record.tab", "helpdesk.sidebar", "uie.playground.middle"];
1993
+ export type ExtensionPointLocation = TypesOfReadOnlyArray<typeof EXTENSION_POINT_LOCATIONS>;
1959
1994
  /** @ignore */
1960
- export interface ExtensionPoints {
1995
+ interface LocationToExtensionPoint {
1961
1996
  'uie.playground.middle': RemotePlaygroundExtensionPoint;
1962
1997
  'crm.record.tab': StandardCrmExtensionPoint;
1963
1998
  'crm.preview': StandardCrmExtensionPoint;
1964
1999
  'crm.record.sidebar': CrmSidebarExtensionPoint;
1965
2000
  'helpdesk.sidebar': StandardCrmExtensionPoint;
1966
2001
  }
2002
+ /**
2003
+ * While this resolves to the same result as LocationToExtensionPoint, it ensures that every location
2004
+ * from ExtensionPointLocation is explicitly included. This way, EXTENSION_POINT_LOCATIONS becomes
2005
+ * the single source of truth for defining all locations.
2006
+ */
2007
+ type _ExtensionPoints = {
2008
+ [key in ExtensionPointLocation]: LocationToExtensionPoint[key];
2009
+ };
2010
+ export interface ExtensionPoints extends _ExtensionPoints {
2011
+ }
1967
2012
  export interface ExampleCrmComponentProps {
1968
2013
  name: string;
1969
2014
  size: 'sm' | 'md' | 'lg';
@@ -2607,4 +2652,15 @@ export type ProxyMetadata = {
2607
2652
  userId?: number;
2608
2653
  portalId?: number;
2609
2654
  };
2655
+ /**
2656
+ * @ignore
2657
+ * @experimental
2658
+ */
2659
+ export interface MediaObjectProps {
2660
+ align?: 'start' | 'center' | 'baseline' | 'end' | 'stretch';
2661
+ spacing?: 'none' | 'extra-small' | 'small' | 'medium' | 'large' | 'extra-large';
2662
+ children?: ReactNode;
2663
+ itemLeft?: RemoteFragment;
2664
+ itemRight?: RemoteFragment;
2665
+ }
2610
2666
  export {};
package/dist/types.js CHANGED
@@ -72,6 +72,13 @@ export var ServerlessExecutionStatus;
72
72
  ServerlessExecutionStatus["Success"] = "SUCCESS";
73
73
  ServerlessExecutionStatus["Error"] = "ERROR";
74
74
  })(ServerlessExecutionStatus || (ServerlessExecutionStatus = {}));
75
+ export const EXTENSION_POINT_LOCATIONS = [
76
+ 'crm.preview',
77
+ 'crm.record.sidebar',
78
+ 'crm.record.tab',
79
+ 'helpdesk.sidebar',
80
+ 'uie.playground.middle',
81
+ ];
75
82
  /** @deprecated use ExtensionEvent/FormSubmitExtensionEvent instead */
76
83
  export class RemoteEvent {
77
84
  type;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/ui-extensions",
3
- "version": "0.8.35",
3
+ "version": "0.8.37",
4
4
  "description": "",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -51,5 +51,5 @@
51
51
  "devDependencies": {
52
52
  "typescript": "5.0.4"
53
53
  },
54
- "gitHead": "3f6a69859a3ee37e755f6e594884e5916d46138a"
54
+ "gitHead": "d1c0d81115c16b53ed5b9d2da2992be27181330f"
55
55
  }