@hubspot/ui-extensions 0.8.23 → 0.8.25

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,6 +1,8 @@
1
1
  import { createRemoteReactComponent } from '@remote-ui/react';
2
2
  export const Alert = createRemoteReactComponent('Alert');
3
- export const Button = createRemoteReactComponent('Button');
3
+ export const Button = createRemoteReactComponent('Button', {
4
+ fragmentProps: ['overlay'],
5
+ });
4
6
  export const ButtonRow = createRemoteReactComponent('ButtonRow');
5
7
  export const Card = createRemoteReactComponent('Card');
6
8
  export const DescriptionList = createRemoteReactComponent('DescriptionList');
@@ -10,9 +12,13 @@ export const EmptyState = createRemoteReactComponent('EmptyState');
10
12
  export const ErrorState = createRemoteReactComponent('ErrorState');
11
13
  export const Form = createRemoteReactComponent('Form');
12
14
  export const Heading = createRemoteReactComponent('Heading');
13
- export const Image = createRemoteReactComponent('Image');
15
+ export const Image = createRemoteReactComponent('Image', {
16
+ fragmentProps: ['overlay'],
17
+ });
14
18
  export const Input = createRemoteReactComponent('Input');
15
- export const Link = createRemoteReactComponent('Link');
19
+ export const Link = createRemoteReactComponent('Link', {
20
+ fragmentProps: ['overlay'],
21
+ });
16
22
  export const TextArea = createRemoteReactComponent('TextArea');
17
23
  // Textarea was changed to TextArea
18
24
  // Exporting both for backwards compat
@@ -21,7 +27,9 @@ export const Textarea = createRemoteReactComponent('Textarea');
21
27
  export const LoadingSpinner = createRemoteReactComponent('LoadingSpinner');
22
28
  export const ProgressBar = createRemoteReactComponent('ProgressBar');
23
29
  export const Select = createRemoteReactComponent('Select');
24
- export const Tag = createRemoteReactComponent('Tag');
30
+ export const Tag = createRemoteReactComponent('Tag', {
31
+ fragmentProps: ['overlay'],
32
+ });
25
33
  export const Text = createRemoteReactComponent('Text');
26
34
  export const Tile = createRemoteReactComponent('Tile');
27
35
  /** @deprecated use Flex instead. It will be removed in the next release. */
@@ -1,4 +1,4 @@
1
- import { CrmAssociationPivotProps, CrmAssociationTableProps, CrmDataHighlightProps, CrmPropertyListProps, CrmReportProps, CrmAssociationPropertyListProps, CrmStageTrackerProps, CrmStatisticsProps, CrmActionButtonProps, CrmActionLinkProps, CrmCardActionsProps } from '../types';
1
+ import { CrmAssociationPivotProps, CrmAssociationTableProps, CrmDataHighlightProps, CrmPropertyListProps, CrmReportProps, CrmAssociationPropertyListProps, CrmAssociationStageTrackerProps, CrmStageTrackerProps, CrmStatisticsProps, CrmActionButtonProps, CrmActionLinkProps, CrmCardActionsProps } from '../types';
2
2
  declare const CrmPropertyList: "CrmPropertyList" & {
3
3
  readonly type?: "CrmPropertyList" | undefined;
4
4
  readonly props?: CrmPropertyListProps | undefined;
@@ -29,6 +29,11 @@ declare const CrmAssociationPropertyList: "CrmAssociationPropertyList" & {
29
29
  readonly props?: CrmAssociationPropertyListProps | undefined;
30
30
  readonly children?: true | undefined;
31
31
  } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"CrmAssociationPropertyList", CrmAssociationPropertyListProps, true>>;
32
+ declare const CrmAssociationStageTracker: "CrmAssociationStageTracker" & {
33
+ readonly type?: "CrmAssociationStageTracker" | undefined;
34
+ readonly props?: CrmAssociationStageTrackerProps | undefined;
35
+ readonly children?: true | undefined;
36
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"CrmAssociationStageTracker", CrmAssociationStageTrackerProps, true>>;
32
37
  declare const CrmStageTracker: "CrmStageTracker" & {
33
38
  readonly type?: "CrmStageTracker" | undefined;
34
39
  readonly props?: CrmStageTrackerProps | undefined;
@@ -54,4 +59,4 @@ declare const CrmCardActions: "CrmCardActions" & {
54
59
  readonly props?: CrmCardActionsProps | undefined;
55
60
  readonly children?: true | undefined;
56
61
  } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"CrmCardActions", CrmCardActionsProps, true>>;
57
- export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
62
+ export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmAssociationStageTracker, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
@@ -5,9 +5,10 @@ const CrmDataHighlight = createExtensionComponent('CrmDataHighlight');
5
5
  const CrmReport = createExtensionComponent('CrmReport');
6
6
  const CrmAssociationPivot = createExtensionComponent('CrmAssociationPivot');
7
7
  const CrmAssociationPropertyList = createExtensionComponent('CrmAssociationPropertyList');
8
+ const CrmAssociationStageTracker = createExtensionComponent('CrmAssociationStageTracker');
8
9
  const CrmStageTracker = createExtensionComponent('CrmStageTracker');
9
10
  const CrmStatistics = createExtensionComponent('CrmStatistics');
10
11
  const CrmActionButton = createExtensionComponent('CrmActionButton');
11
12
  const CrmActionLink = createExtensionComponent('CrmActionLink');
12
13
  const CrmCardActions = createExtensionComponent('CrmCardActions');
13
- export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
14
+ export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmAssociationStageTracker, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
@@ -1,2 +1,2 @@
1
- import { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions } from './components';
2
- export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
1
+ import { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmAssociationStageTracker, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions } from './components';
2
+ export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmAssociationStageTracker, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
package/dist/crm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, } from './components';
2
- export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
1
+ import { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmAssociationStageTracker, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, } from './components';
2
+ export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmAssociationStageTracker, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
@@ -11,4 +11,16 @@ declare const Slider: "Slider" & {
11
11
  readonly props?: types.SliderProps | undefined;
12
12
  readonly children?: true | undefined;
13
13
  } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Slider", types.SliderProps, true>>;
14
- export { Tooltip, Slider };
14
+ /** @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. */
15
+ declare const StatusTag: "StatusTag" & {
16
+ readonly type?: "StatusTag" | undefined;
17
+ readonly props?: types.StatusTagProps | undefined;
18
+ readonly children?: true | undefined;
19
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"StatusTag", types.StatusTagProps, true>>;
20
+ /** @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. */
21
+ declare const Iframe: "Iframe" & {
22
+ readonly type?: "Iframe" | undefined;
23
+ readonly props?: types.IframeProps | undefined;
24
+ readonly children?: true | undefined;
25
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Iframe", types.IframeProps, true>>;
26
+ export { Tooltip, Slider, StatusTag, Iframe };
@@ -3,4 +3,8 @@ import { createRemoteReactComponent } from '@remote-ui/react';
3
3
  const Tooltip = createRemoteReactComponent('Tooltip');
4
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
5
  const Slider = createRemoteReactComponent('Slider');
6
- export { Tooltip, Slider };
6
+ /** @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. */
7
+ const StatusTag = createRemoteReactComponent('StatusTag');
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
+ const Iframe = createRemoteReactComponent('Iframe');
10
+ export { Tooltip, Slider, StatusTag, Iframe };
package/dist/types.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import { RemoteFragment } from '@remote-ui/core';
1
2
  import { ReactNode, ComponentType } from 'react';
2
3
  export declare class ExtensionEvent {
3
4
  type: string;
@@ -11,6 +12,9 @@ export declare class FormSubmitExtensionEvent<V> extends ExtensionEvent {
11
12
  constructor(value: V, event: Event);
12
13
  }
13
14
  export type ReactionsHandler<T> = (event: T, reactions: Reactions) => void | Promise<void>;
15
+ export type OverlayComponentProps = {
16
+ overlay?: RemoteFragment;
17
+ };
14
18
  /**
15
19
  * The props type for {@link !components.Alert}.
16
20
  *
@@ -39,7 +43,7 @@ export interface AlertProps {
39
43
  *
40
44
  * @category Component Props
41
45
  */
42
- export interface ButtonProps {
46
+ export interface ButtonProps extends OverlayComponentProps {
43
47
  /**
44
48
  * A function that will be invoked when the button is clicked. Do not use this function for submitting a form; use Form's `onSubmit` function instead.
45
49
  *
@@ -283,6 +287,25 @@ export interface HeadingProps {
283
287
  */
284
288
  inline?: boolean;
285
289
  }
290
+ /**
291
+ * The props type for {@link !components.Iframe}.
292
+ *
293
+ * @ignore
294
+ * @experimental
295
+ * @category Component Props
296
+ */
297
+ export interface IframeProps {
298
+ /**
299
+ * Sets the height of the iframe. If this prop is not provided, the iframe defaults size medium.
300
+ *
301
+ * @defaultValue `"medium"`
302
+ */
303
+ height?: TShirtSizes['sm'] | TShirtSizes['md'] | TShirtSizes['lg'];
304
+ /**
305
+ * The URL to render into the inline iframe.
306
+ */
307
+ src: string;
308
+ }
286
309
  /**
287
310
  * The props type for {@link !components.Icon}.
288
311
  *
@@ -331,6 +354,7 @@ export declare const iconNames: {
331
354
  readonly robot: "simpleBot";
332
355
  readonly refresh: "refresh";
333
356
  readonly faceHappy: "emoji";
357
+ readonly faceNeutral: "emojiLineNeutral";
334
358
  readonly faceSad: "emojiLineSad";
335
359
  readonly upload: "upload";
336
360
  readonly download: "download";
@@ -348,7 +372,7 @@ export type IconNames = keyof typeof iconNames;
348
372
  *
349
373
  * @category Component Props
350
374
  */
351
- export interface ImageProps {
375
+ export interface ImageProps extends OverlayComponentProps {
352
376
  /**
353
377
  * The alt text for the image.
354
378
  *
@@ -804,12 +828,59 @@ export interface MultiSelectProps extends BaseSelectProps {
804
828
  */
805
829
  onChange?: (value: NonNullable<MultiSelectProps['value']>) => void;
806
830
  }
831
+ /**
832
+ * The props type for {@link !components.StatusTag}.
833
+ *
834
+ * @category Component Props
835
+ */
836
+ export interface StatusTagProps {
837
+ /**
838
+ * The status tag's indicator color.
839
+ *
840
+ * @defaultValue `"default"`
841
+ */
842
+ variant?: 'danger' | 'warning' | 'info' | 'success' | 'default';
843
+ /**
844
+ * When set to true, the status tag's dot will be a ring instead.
845
+ *
846
+ * @defaultValue `false `
847
+ */
848
+ hollow?: boolean;
849
+ /**
850
+ * When set to true, adjusts the styling of a status tag for better spacing on the same line as other status tags or text
851
+ *
852
+ * @defaultValue `false`
853
+ */
854
+ inline?: boolean;
855
+ /**
856
+ * A function that will be invoked when the status tag is clicked. It receives no arguments and its return value is ignored.
857
+ *
858
+ * @event
859
+ */
860
+ onClick?: () => void;
861
+ /**
862
+ * When set to true, the status tag will show a small clickable 'x' icon.
863
+ *
864
+ * @defaultValue `false`
865
+ */
866
+ showRemoveIcon?: boolean;
867
+ /**
868
+ * A function that will be invoked when the 'x' icon is clicked. It receives no arguments and its return value is ignored.
869
+ *
870
+ * @event
871
+ */
872
+ onRemoveClick?: () => void;
873
+ /**
874
+ * Sets the content that will render inside the StatusTag. This prop is passed implicitly by providing sub-components. We recommend only using a small amount of text.
875
+ */
876
+ children: ReactNode;
877
+ }
807
878
  /**
808
879
  * The props type for {@link !components.Tag}.
809
880
  *
810
881
  * @category Component Props
811
882
  */
812
- export interface TagProps {
883
+ export interface TagProps extends OverlayComponentProps {
813
884
  /**
814
885
  * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
815
886
  */
@@ -1409,6 +1480,7 @@ export interface StandardCrmExtensionPoint extends ExtensionPointContract {
1409
1480
  CrmReport: ComponentType<CrmReportProps>;
1410
1481
  CrmAssociationPivot: ComponentType<CrmAssociationPivotProps>;
1411
1482
  CrmAssociationPropertyList: ComponentType<CrmAssociationPropertyListProps>;
1483
+ CrmAssociationStageTracker?: ComponentType<CrmAssociationStageTrackerProps>;
1412
1484
  CrmStageTracker: ComponentType<CrmStageTrackerProps>;
1413
1485
  CrmStatistics?: ComponentType<CrmStatisticsProps>;
1414
1486
  CrmActionButton?: ComponentType<CrmActionButtonProps>;
@@ -1433,6 +1505,7 @@ export interface CrmMiddleExtensionPoint extends ExtensionPointContract {
1433
1505
  CrmReport: ComponentType<CrmReportProps>;
1434
1506
  CrmAssociationPivot: ComponentType<CrmAssociationPivotProps>;
1435
1507
  CrmAssociationPropertyList: ComponentType<CrmAssociationPropertyListProps>;
1508
+ CrmAssociationStageTracker?: ComponentType<CrmAssociationStageTrackerProps>;
1436
1509
  CrmStageTracker: ComponentType<CrmStageTrackerProps>;
1437
1510
  CrmStatistics?: ComponentType<CrmStatisticsProps>;
1438
1511
  CrmActionButton?: ComponentType<CrmActionButtonProps>;
@@ -1516,6 +1589,15 @@ export interface CrmAssociationPropertyListProps {
1516
1589
  sort?: Array<CrmSortDescriptor>;
1517
1590
  }
1518
1591
  /** @ignore */
1592
+ export interface CrmAssociationStageTrackerProps {
1593
+ objectTypeId: string;
1594
+ properties: Array<string>;
1595
+ associationLabels?: Array<string>;
1596
+ filters?: Array<CrmSearchFilter>;
1597
+ showProperties?: boolean;
1598
+ sort?: Array<CrmSortDescriptor>;
1599
+ }
1600
+ /** @ignore */
1519
1601
  export interface CrmStageTrackerProps {
1520
1602
  objectId?: number;
1521
1603
  objectTypeId?: string;
@@ -1854,7 +1936,7 @@ export declare class RemoteEvent<V> {
1854
1936
  *
1855
1937
  * @category Component Props
1856
1938
  */
1857
- export interface LinkProps {
1939
+ export interface LinkProps extends OverlayComponentProps {
1858
1940
  /**
1859
1941
  * Sets the content that will render inside the component.
1860
1942
  *
package/dist/types.js CHANGED
@@ -42,6 +42,7 @@ export const iconNames = {
42
42
  robot: 'simpleBot',
43
43
  refresh: 'refresh',
44
44
  faceHappy: 'emoji',
45
+ faceNeutral: 'emojiLineNeutral',
45
46
  faceSad: 'emojiLineSad',
46
47
  upload: 'upload',
47
48
  download: 'download',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/ui-extensions",
3
- "version": "0.8.23",
3
+ "version": "0.8.25",
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": "4e1721543d4dd631fb2aedbcd314d92b66f56e33"
54
+ "gitHead": "36b80f541eceededf57ac1c4ba6149b184564707"
55
55
  }