@hubspot/ui-extensions 0.8.20 → 0.8.22

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.
@@ -271,3 +271,8 @@ export declare const ModalFooter: "ModalFooter" & {
271
271
  readonly props?: types.ModalFooterProps | undefined;
272
272
  readonly children?: true | undefined;
273
273
  } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"ModalFooter", types.ModalFooterProps, true>>;
274
+ export declare const Icon: "Icon" & {
275
+ readonly type?: "Icon" | undefined;
276
+ readonly props?: types.IconProps | undefined;
277
+ readonly children?: true | undefined;
278
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Icon", types.IconProps, true>>;
@@ -57,3 +57,4 @@ export const StepperInput = createRemoteReactComponent('StepperInput');
57
57
  export const Modal = createRemoteReactComponent('Modal');
58
58
  export const ModalBody = createRemoteReactComponent('ModalBody');
59
59
  export const ModalFooter = createRemoteReactComponent('ModalFooter');
60
+ export const Icon = createRemoteReactComponent('Icon');
@@ -1,9 +1,4 @@
1
- import { CrmAssociationPivotProps, CrmAssociationTableProps, CrmDataHighlightProps, CrmObjectPropertyProps, CrmPropertyListProps, CrmReportProps, CrmAssociationPropertyListProps, CrmStageTrackerProps, CrmStatisticsProps, CrmActionButtonProps, CrmActionLinkProps, CrmCardActionsProps } from '../types';
2
- declare const CrmObjectProperty: "CrmObjectProperty" & {
3
- readonly type?: "CrmObjectProperty" | undefined;
4
- readonly props?: CrmObjectPropertyProps | undefined;
5
- readonly children?: true | undefined;
6
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"CrmObjectProperty", CrmObjectPropertyProps, true>>;
1
+ import { CrmAssociationPivotProps, CrmAssociationTableProps, CrmDataHighlightProps, CrmPropertyListProps, CrmReportProps, CrmAssociationPropertyListProps, CrmStageTrackerProps, CrmStatisticsProps, CrmActionButtonProps, CrmActionLinkProps, CrmCardActionsProps } from '../types';
7
2
  declare const CrmPropertyList: "CrmPropertyList" & {
8
3
  readonly type?: "CrmPropertyList" | undefined;
9
4
  readonly props?: CrmPropertyListProps | undefined;
@@ -59,4 +54,4 @@ declare const CrmCardActions: "CrmCardActions" & {
59
54
  readonly props?: CrmCardActionsProps | undefined;
60
55
  readonly children?: true | undefined;
61
56
  } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"CrmCardActions", CrmCardActionsProps, true>>;
62
- export { CrmObjectProperty, CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
57
+ export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
@@ -1,5 +1,4 @@
1
1
  import { createExtensionComponent } from '../utils/createExtensionComponent';
2
- const CrmObjectProperty = createExtensionComponent('CrmObjectProperty');
3
2
  const CrmPropertyList = createExtensionComponent('CrmPropertyList');
4
3
  const CrmAssociationTable = createExtensionComponent('CrmAssociationTable');
5
4
  const CrmDataHighlight = createExtensionComponent('CrmDataHighlight');
@@ -11,4 +10,4 @@ const CrmStatistics = createExtensionComponent('CrmStatistics');
11
10
  const CrmActionButton = createExtensionComponent('CrmActionButton');
12
11
  const CrmActionLink = createExtensionComponent('CrmActionLink');
13
12
  const CrmCardActions = createExtensionComponent('CrmCardActions');
14
- export { CrmObjectProperty, CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
13
+ export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
@@ -1,2 +1,2 @@
1
- import { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions } from './components';
2
- export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
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, };
package/dist/crm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, } from './components';
2
- export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
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 +1,14 @@
1
- export { Tooltip, Slider, Icon } from './experimentalComponents';
1
+ import type * as types from '../types';
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
+ declare const Tooltip: "Tooltip" & {
4
+ readonly type?: "Tooltip" | undefined;
5
+ readonly props?: types.TooltipProps | undefined;
6
+ readonly children?: true | undefined;
7
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Tooltip", types.TooltipProps, true>>;
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 Slider: "Slider" & {
10
+ readonly type?: "Slider" | undefined;
11
+ readonly props?: types.SliderProps | undefined;
12
+ readonly children?: true | undefined;
13
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Slider", types.SliderProps, true>>;
14
+ export { Tooltip, Slider };
@@ -1 +1,6 @@
1
- export { Tooltip, Slider, Icon } from './experimentalComponents';
1
+ import { createRemoteReactComponent } from '@remote-ui/react';
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
+ const Tooltip = createRemoteReactComponent('Tooltip');
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 Slider = createRemoteReactComponent('Slider');
6
+ export { Tooltip, Slider };
package/dist/types.d.ts CHANGED
@@ -32,7 +32,7 @@ export interface AlertProps {
32
32
  *
33
33
  * @defaultValue `"info"`
34
34
  */
35
- variant?: 'info' | 'warning' | 'success' | 'error' | 'danger';
35
+ variant?: 'info' | 'warning' | 'success' | 'error' | 'danger' | 'tip';
36
36
  }
37
37
  /**
38
38
  * The props type for {@link !components.Button}.
@@ -41,7 +41,7 @@ export interface AlertProps {
41
41
  */
42
42
  export interface ButtonProps {
43
43
  /**
44
- * A function that will be invoked when the button is clicked.
44
+ * 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
45
  *
46
46
  * @event
47
47
  */
@@ -93,6 +93,31 @@ export interface ButtonRowProps {
93
93
  * @defaultValue `false`
94
94
  */
95
95
  disableDropdown?: boolean;
96
+ /**
97
+ * Controls the appearance and text content of the dropdown button.
98
+ */
99
+ dropDownButtonOptions?: ButtonRownDropDownButtonOptionsProps;
100
+ }
101
+ /** Configures the Dropdown Button in the ButtonRow component */
102
+ export interface ButtonRownDropDownButtonOptionsProps {
103
+ /**
104
+ * Sets the content for the dropdown button.
105
+ *
106
+ * @defaultValue `"More"`
107
+ */
108
+ text?: string;
109
+ /**
110
+ * Sets the size of the dropdown button.
111
+ *
112
+ * @defaultValue `"md"`
113
+ */
114
+ size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
115
+ /**
116
+ * Controls the appearance of the dropdown button
117
+ *
118
+ * @defaultValue `"secondary"`
119
+ */
120
+ variant?: 'primary' | 'secondary' | 'transparent';
96
121
  }
97
122
  /**
98
123
  * The props type for {@link !components.Card}.
@@ -232,16 +257,12 @@ export interface FormProps {
232
257
  */
233
258
  children: ReactNode;
234
259
  /**
235
- * The function that is called when the form is submitted. It will receive a FormSubmitExtensionEvent as an argument and its return value will be ignored.
260
+ * The function that is called when the form is submitted. It will receive a FormSubmitExtensionEvent as an argument and its return value will be ignored. This function should be used instead of Button's `onClick` for the Form's submit button.
236
261
  *
237
262
  * @event
238
263
  */
239
264
  onSubmit?: ReactionsHandler<FormSubmitExtensionEvent<FormInputValues>>;
240
- /**
241
- * When set to `true`, `event.preventDefault()` will be invoked before the `onSubmit` function is called, preventing the default HTML form behavior.
242
- *
243
- * @defaultValue `false`
244
- */
265
+ /** @deprecated the value for `preventDefault` is now always `true`, use `onSubmit` to handle all form submission behavior */
245
266
  preventDefault?: boolean;
246
267
  }
247
268
  /**
@@ -273,7 +294,7 @@ export interface IconProps {
273
294
  /**
274
295
  * Sets the specific icon to display.
275
296
  */
276
- type: IconTypes;
297
+ name: IconNames;
277
298
  /**
278
299
  * Sets the size of the icon. If this prop is not provided, the icon will default to the size of its parent.
279
300
  *
@@ -285,7 +306,7 @@ export interface IconProps {
285
306
  */
286
307
  screenReaderText?: string;
287
308
  }
288
- export declare const iconTypes: {
309
+ export declare const iconNames: {
289
310
  readonly success: "success";
290
311
  readonly remove: "remove";
291
312
  readonly add: "add";
@@ -321,7 +342,7 @@ export declare const iconTypes: {
321
342
  readonly save: "saveEditableView";
322
343
  readonly notification: "notification";
323
344
  };
324
- export type IconTypes = keyof typeof iconTypes;
345
+ export type IconNames = keyof typeof iconNames;
325
346
  /**
326
347
  * The props type for {@link !components.Image}.
327
348
  *
@@ -1116,14 +1137,21 @@ export interface CrmRecordContext {
1116
1137
  objectTypeId: string;
1117
1138
  }
1118
1139
  /** @ignore */
1140
+ export interface AppContext {
1141
+ appId: number | string;
1142
+ appName?: string;
1143
+ cardTitle?: string;
1144
+ }
1145
+ /** @ignore */
1119
1146
  export interface BaseContext {
1120
1147
  user: UserContext;
1121
1148
  portal: PortalContext;
1122
1149
  }
1123
1150
  /** @ignore */
1124
1151
  export interface CrmContext extends BaseContext {
1125
- location: 'crm.record.tab' | 'crm.record.sidebar';
1152
+ location: 'crm.record.tab' | 'crm.record.sidebar' | 'crm.preview';
1126
1153
  crm: CrmRecordContext;
1154
+ extension?: AppContext;
1127
1155
  }
1128
1156
  /** @ignore */
1129
1157
  export interface GenericContext extends BaseContext {
@@ -1364,6 +1392,30 @@ export type onCrmPropertiesUpdateAction = (properties: string[] | '*', callback:
1364
1392
  message: string;
1365
1393
  }) => void) => void;
1366
1394
  /** @ignore */
1395
+ export interface StandardCrmExtensionPoint extends ExtensionPointContract {
1396
+ actions: {
1397
+ addAlert: AddAlertAction;
1398
+ reloadPage: ReloadPageAction;
1399
+ fetchCrmObjectProperties: FetchCrmObjectPropertiesAction;
1400
+ openIframeModal: OpenIframeModalAction;
1401
+ refreshObjectProperties: refreshObjectPropertiesAction;
1402
+ onCrmPropertiesUpdate: onCrmPropertiesUpdateAction;
1403
+ };
1404
+ context: CrmContext;
1405
+ customComponents: {
1406
+ CrmPropertyList: ComponentType<CrmPropertyListProps>;
1407
+ CrmAssociationTable: ComponentType<CrmAssociationTableProps>;
1408
+ CrmDataHighlight: ComponentType<CrmDataHighlightProps>;
1409
+ CrmReport: ComponentType<CrmReportProps>;
1410
+ CrmAssociationPivot: ComponentType<CrmAssociationPivotProps>;
1411
+ CrmAssociationPropertyList: ComponentType<CrmAssociationPropertyListProps>;
1412
+ CrmStageTracker: ComponentType<CrmStageTrackerProps>;
1413
+ CrmStatistics?: ComponentType<CrmStatisticsProps>;
1414
+ CrmActionButton?: ComponentType<CrmActionButtonProps>;
1415
+ CrmActionLink?: ComponentType<CrmActionLinkProps>;
1416
+ CrmCardActions?: ComponentType<CrmCardActionsProps>;
1417
+ };
1418
+ }
1367
1419
  export interface CrmMiddleExtensionPoint extends ExtensionPointContract {
1368
1420
  actions: {
1369
1421
  addAlert: AddAlertAction;
@@ -1380,7 +1432,6 @@ export interface CrmMiddleExtensionPoint extends ExtensionPointContract {
1380
1432
  CrmDataHighlight: ComponentType<CrmDataHighlightProps>;
1381
1433
  CrmReport: ComponentType<CrmReportProps>;
1382
1434
  CrmAssociationPivot: ComponentType<CrmAssociationPivotProps>;
1383
- CrmObjectProperty?: ComponentType<CrmObjectPropertyProps>;
1384
1435
  CrmAssociationPropertyList: ComponentType<CrmAssociationPropertyListProps>;
1385
1436
  CrmStageTracker: ComponentType<CrmStageTrackerProps>;
1386
1437
  CrmStatistics?: ComponentType<CrmStatisticsProps>;
@@ -1424,12 +1475,6 @@ export interface CrmPropertyListProps {
1424
1475
  objectId?: number;
1425
1476
  }
1426
1477
  /** @ignore */
1427
- export interface CrmObjectPropertyProps {
1428
- properties: Array<string>;
1429
- objectTypeId?: string;
1430
- objectId?: number;
1431
- }
1432
- /** @ignore */
1433
1478
  type CrmSortDescriptor = {
1434
1479
  columnName: string;
1435
1480
  direction: 1 | -1;
@@ -1596,7 +1641,8 @@ interface RemotePlaygroundExtensionPoint extends ExtensionPointContract {
1596
1641
  /** @ignore */
1597
1642
  export interface ExtensionPoints {
1598
1643
  'uie.playground.middle': RemotePlaygroundExtensionPoint;
1599
- 'crm.record.tab': CrmMiddleExtensionPoint;
1644
+ 'crm.record.tab': StandardCrmExtensionPoint;
1645
+ 'crm.preview': StandardCrmExtensionPoint;
1600
1646
  'crm.record.sidebar': CrmSidebarExtensionPoint;
1601
1647
  }
1602
1648
  export interface ExampleCrmComponentProps {
@@ -2216,6 +2262,12 @@ export interface DropdownProps {
2216
2262
  * @defaultValue `"md"`
2217
2263
  */
2218
2264
  buttonSize?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
2265
+ /**
2266
+ * Disables the ability to focus and click-to-expand of the dropdown button
2267
+ *
2268
+ * @defaultValue `false`
2269
+ */
2270
+ disabled?: boolean;
2219
2271
  }
2220
2272
  /**
2221
2273
  * @ignore
package/dist/types.js CHANGED
@@ -17,7 +17,7 @@ export class FormSubmitExtensionEvent extends ExtensionEvent {
17
17
  this.targetValue = value;
18
18
  }
19
19
  }
20
- export const iconTypes = {
20
+ export const iconNames = {
21
21
  success: 'success',
22
22
  remove: 'remove',
23
23
  add: 'add',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/ui-extensions",
3
- "version": "0.8.20",
3
+ "version": "0.8.22",
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": "6aee5b2b08bb56a07bbafbcaafe455f491d47233"
54
+ "gitHead": "b2a018c5b7c7bc4cffc3d212536fdb5f8f15db9a"
55
55
  }
@@ -1,19 +0,0 @@
1
- import type * as types from '../types';
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
- export declare const Tooltip: "Tooltip" & {
4
- readonly type?: "Tooltip" | undefined;
5
- readonly props?: types.TooltipProps | undefined;
6
- readonly children?: true | undefined;
7
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Tooltip", types.TooltipProps, true>>;
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
- export declare const Slider: "Slider" & {
10
- readonly type?: "Slider" | undefined;
11
- readonly props?: types.SliderProps | undefined;
12
- readonly children?: true | undefined;
13
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Slider", types.SliderProps, true>>;
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
- export declare const Icon: "Icon" & {
16
- readonly type?: "Icon" | undefined;
17
- readonly props?: types.IconProps | undefined;
18
- readonly children?: true | undefined;
19
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Icon", types.IconProps, true>>;
@@ -1,7 +0,0 @@
1
- import { createRemoteReactComponent } from '@remote-ui/react';
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
- export const Tooltip = createRemoteReactComponent('Tooltip');
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
- export const Slider = createRemoteReactComponent('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
- export const Icon = createRemoteReactComponent('Icon');