@hubspot/ui-extensions 0.8.27 → 0.8.29

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.
@@ -281,3 +281,8 @@ export declare const StatusTag: "StatusTag" & {
281
281
  readonly props?: types.StatusTagProps | undefined;
282
282
  readonly children?: true | undefined;
283
283
  } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"StatusTag", types.StatusTagProps, true>>;
284
+ export declare const LoadingButton: "LoadingButton" & {
285
+ readonly type?: "LoadingButton" | undefined;
286
+ readonly props?: types.LoadingButtonProps | undefined;
287
+ readonly children?: true | undefined;
288
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"LoadingButton", types.LoadingButtonProps, true>>;
@@ -67,3 +67,6 @@ export const ModalBody = createRemoteReactComponent('ModalBody');
67
67
  export const ModalFooter = createRemoteReactComponent('ModalFooter');
68
68
  export const Icon = createRemoteReactComponent('Icon');
69
69
  export const StatusTag = createRemoteReactComponent('StatusTag');
70
+ export const LoadingButton = createRemoteReactComponent('LoadingButton', {
71
+ fragmentProps: ['overlay'],
72
+ });
package/dist/types.d.ts CHANGED
@@ -38,12 +38,7 @@ export interface AlertProps {
38
38
  */
39
39
  variant?: 'info' | 'warning' | 'success' | 'error' | 'danger' | 'tip';
40
40
  }
41
- /**
42
- * The props type for {@link !components.Button}.
43
- *
44
- * @category Component Props
45
- */
46
- export interface ButtonProps extends OverlayComponentProps {
41
+ export interface BaseButtonProps {
47
42
  /**
48
43
  * 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.
49
44
  *
@@ -81,6 +76,54 @@ export interface ButtonProps extends OverlayComponentProps {
81
76
  */
82
77
  size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
83
78
  }
79
+ /**
80
+ * The props type for {@link !components.Button}.
81
+ *
82
+ * @category Component Props
83
+ */
84
+ export interface ButtonProps extends BaseButtonProps, OverlayComponentProps {
85
+ }
86
+ /**
87
+ * Extra configuration passed to the overlay
88
+ */
89
+ export interface LoadingButtonOverlayOptions {
90
+ /**
91
+ * If `onLoadingFinish`, the overlay will open once the loading operation is done.
92
+ * If `onClick`, the overlay will open as soon as there is a click on the button.
93
+ *
94
+ * @defaultValue `"onClick"`
95
+ */
96
+ openBehavior?: 'onClick' | 'onLoadingFinish';
97
+ }
98
+ /**
99
+ * The props type for {@link !components.LoadingButton}.
100
+ *
101
+ * @category Component Props
102
+ */
103
+ export interface LoadingButtonProps extends BaseButtonProps, OverlayComponentProps {
104
+ /**
105
+ * Sets the color variation of the button.
106
+ *
107
+ * @defaultValue `"secondary"`
108
+ */
109
+ variant?: 'primary' | 'secondary' | 'destructive';
110
+ /**
111
+ * If true, the loading indicator is shown and the button becomes disabled.
112
+ *
113
+ * @defaultValue `false`
114
+ */
115
+ loading?: boolean;
116
+ /**
117
+ * Extra configuration passed to the overlay
118
+ */
119
+ overlayOptions?: LoadingButtonOverlayOptions;
120
+ /**
121
+ * Controls the icon that's shown after loading is done.
122
+ *
123
+ * @defaultValue `"success"`
124
+ */
125
+ resultIconName?: IconNames;
126
+ }
84
127
  /**
85
128
  * The props type for {@link !components.ButtonRow}.
86
129
  *
@@ -335,10 +378,13 @@ export declare const iconNames: {
335
378
  readonly add: "add";
336
379
  readonly attach: "attach";
337
380
  readonly date: "date";
381
+ readonly copy: "duplicate";
338
382
  readonly delete: "delete";
339
383
  readonly edit: "edit";
340
384
  readonly email: "email";
341
385
  readonly exclamation: "exclamation";
386
+ readonly question: "question";
387
+ readonly home: "home";
342
388
  readonly location: "location";
343
389
  readonly upCarat: "upCarat";
344
390
  readonly downCarat: "downCarat";
@@ -365,6 +411,8 @@ export declare const iconNames: {
365
411
  readonly search: "search";
366
412
  readonly save: "saveEditableView";
367
413
  readonly notification: "notification";
414
+ readonly bulb: "bulb";
415
+ readonly settings: "settings";
368
416
  };
369
417
  export type IconNames = keyof typeof iconNames;
370
418
  /**
@@ -1465,6 +1513,7 @@ export interface StandardCrmExtensionPoint extends ExtensionPointContract {
1465
1513
  openIframeModal: OpenIframeModalAction;
1466
1514
  refreshObjectProperties: refreshObjectPropertiesAction;
1467
1515
  onCrmPropertiesUpdate: onCrmPropertiesUpdateAction;
1516
+ copyTextToClipboard?: Clipboard['writeText'];
1468
1517
  };
1469
1518
  context: CrmContext;
1470
1519
  customComponents: {
@@ -1475,6 +1524,7 @@ export interface StandardCrmExtensionPoint extends ExtensionPointContract {
1475
1524
  CrmAssociationPivot: ComponentType<CrmAssociationPivotProps>;
1476
1525
  CrmAssociationPropertyList: ComponentType<CrmAssociationPropertyListProps>;
1477
1526
  CrmAssociationStageTracker?: ComponentType<CrmAssociationStageTrackerProps>;
1527
+ CrmSimpleDeadline?: ComponentType<CrmSimpleDeadlineProps>;
1478
1528
  CrmStageTracker: ComponentType<CrmStageTrackerProps>;
1479
1529
  CrmStatistics?: ComponentType<CrmStatisticsProps>;
1480
1530
  CrmActionButton?: ComponentType<CrmActionButtonProps>;
@@ -1500,6 +1550,7 @@ export interface CrmMiddleExtensionPoint extends ExtensionPointContract {
1500
1550
  CrmAssociationPivot: ComponentType<CrmAssociationPivotProps>;
1501
1551
  CrmAssociationPropertyList: ComponentType<CrmAssociationPropertyListProps>;
1502
1552
  CrmAssociationStageTracker?: ComponentType<CrmAssociationStageTrackerProps>;
1553
+ CrmSimpleDeadline?: ComponentType<CrmSimpleDeadlineProps>;
1503
1554
  CrmStageTracker: ComponentType<CrmStageTrackerProps>;
1504
1555
  CrmStatistics?: ComponentType<CrmStatisticsProps>;
1505
1556
  CrmActionButton?: ComponentType<CrmActionButtonProps>;
@@ -1592,6 +1643,14 @@ export interface CrmAssociationStageTrackerProps {
1592
1643
  sort?: Array<CrmSortDescriptor>;
1593
1644
  }
1594
1645
  /** @ignore */
1646
+ export interface CrmSimpleDeadlineProps {
1647
+ endDatePropertyName: string;
1648
+ properties: Array<string>;
1649
+ progressTheme?: ProgressTheme;
1650
+ showProperties?: boolean;
1651
+ startDatePropertyName: string;
1652
+ }
1653
+ /** @ignore */
1595
1654
  export interface CrmStageTrackerProps {
1596
1655
  objectId?: number;
1597
1656
  objectTypeId?: string;
@@ -1607,6 +1666,21 @@ interface FilterGroup {
1607
1666
  filters: Array<CrmSearchFilter>;
1608
1667
  }
1609
1668
  /** @ignore */
1669
+ interface ProgressTheme {
1670
+ backgroundColor?: string;
1671
+ completedColor?: string;
1672
+ upcomingColor?: string;
1673
+ borderRadius?: string | number;
1674
+ height?: string | number;
1675
+ completedGradient?: Gradient;
1676
+ upcomingGradient?: Gradient;
1677
+ }
1678
+ /** @ignore */
1679
+ interface Gradient {
1680
+ startColor: string;
1681
+ endColor: string;
1682
+ }
1683
+ /** @ignore */
1610
1684
  interface BasicMetricItem extends BaseCrmStatisticItem {
1611
1685
  statisticType: 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'DISTINCT_APPROX' | 'COUNT';
1612
1686
  propertyName: string;
@@ -2402,4 +2476,9 @@ export interface HubSpotFetchOptions {
2402
2476
  headers?: Headers | Record<string, string>;
2403
2477
  }
2404
2478
  export type HubSpotFetchRequestURI = string | URL;
2479
+ export type ProxyMetadata = {
2480
+ userEmail?: string;
2481
+ userId?: number;
2482
+ portalId?: number;
2483
+ };
2405
2484
  export {};
package/dist/types.js CHANGED
@@ -23,10 +23,13 @@ export const iconNames = {
23
23
  add: 'add',
24
24
  attach: 'attach',
25
25
  date: 'date',
26
+ copy: 'duplicate',
26
27
  delete: 'delete',
27
28
  edit: 'edit',
28
29
  email: 'email',
29
30
  exclamation: 'exclamation',
31
+ question: 'question',
32
+ home: 'home',
30
33
  location: 'location',
31
34
  upCarat: 'upCarat',
32
35
  downCarat: 'downCarat',
@@ -53,6 +56,8 @@ export const iconNames = {
53
56
  search: 'search',
54
57
  save: 'saveEditableView',
55
58
  notification: 'notification',
59
+ bulb: 'bulb',
60
+ settings: 'settings',
56
61
  };
57
62
  /**
58
63
  * @category Serverless
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/ui-extensions",
3
- "version": "0.8.27",
3
+ "version": "0.8.29",
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": "159fa4d11b8a3c87899b456317134037957036f4"
54
+ "gitHead": "f3b5d93b247947c6e8c495e9ae6969ddbf35fa13"
55
55
  }