@hubspot/ui-extensions 0.8.21 → 0.8.23

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,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, };
package/dist/types.d.ts CHANGED
@@ -59,7 +59,7 @@ export interface ButtonProps {
59
59
  *
60
60
  * @defaultValue `"secondary"`
61
61
  */
62
- variant?: 'primary' | 'secondary' | 'destructive';
62
+ variant?: 'primary' | 'secondary' | 'destructive' | 'transparent';
63
63
  /**
64
64
  * Sets the HTML attribute "role" of the button.
65
65
  *
@@ -1137,14 +1137,21 @@ export interface CrmRecordContext {
1137
1137
  objectTypeId: string;
1138
1138
  }
1139
1139
  /** @ignore */
1140
+ export interface AppContext {
1141
+ appId: number | string;
1142
+ appName?: string;
1143
+ cardTitle?: string;
1144
+ }
1145
+ /** @ignore */
1140
1146
  export interface BaseContext {
1141
1147
  user: UserContext;
1142
1148
  portal: PortalContext;
1143
1149
  }
1144
1150
  /** @ignore */
1145
1151
  export interface CrmContext extends BaseContext {
1146
- location: 'crm.record.tab' | 'crm.record.sidebar';
1152
+ location: 'crm.record.tab' | 'crm.record.sidebar' | 'crm.preview';
1147
1153
  crm: CrmRecordContext;
1154
+ extension?: AppContext;
1148
1155
  }
1149
1156
  /** @ignore */
1150
1157
  export interface GenericContext extends BaseContext {
@@ -1385,6 +1392,30 @@ export type onCrmPropertiesUpdateAction = (properties: string[] | '*', callback:
1385
1392
  message: string;
1386
1393
  }) => void) => void;
1387
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
+ }
1388
1419
  export interface CrmMiddleExtensionPoint extends ExtensionPointContract {
1389
1420
  actions: {
1390
1421
  addAlert: AddAlertAction;
@@ -1401,7 +1432,6 @@ export interface CrmMiddleExtensionPoint extends ExtensionPointContract {
1401
1432
  CrmDataHighlight: ComponentType<CrmDataHighlightProps>;
1402
1433
  CrmReport: ComponentType<CrmReportProps>;
1403
1434
  CrmAssociationPivot: ComponentType<CrmAssociationPivotProps>;
1404
- CrmObjectProperty?: ComponentType<CrmObjectPropertyProps>;
1405
1435
  CrmAssociationPropertyList: ComponentType<CrmAssociationPropertyListProps>;
1406
1436
  CrmStageTracker: ComponentType<CrmStageTrackerProps>;
1407
1437
  CrmStatistics?: ComponentType<CrmStatisticsProps>;
@@ -1445,12 +1475,6 @@ export interface CrmPropertyListProps {
1445
1475
  objectId?: number;
1446
1476
  }
1447
1477
  /** @ignore */
1448
- export interface CrmObjectPropertyProps {
1449
- properties: Array<string>;
1450
- objectTypeId?: string;
1451
- objectId?: number;
1452
- }
1453
- /** @ignore */
1454
1478
  type CrmSortDescriptor = {
1455
1479
  columnName: string;
1456
1480
  direction: 1 | -1;
@@ -1549,13 +1573,14 @@ interface ActivityCreatorActionArgs {
1549
1573
  interface ActionArgs {
1550
1574
  PREVIEW_OBJECT: ObjectCoordinates;
1551
1575
  ADD_NOTE: ActivityCreatorActionArgs;
1576
+ ADD_TASK: ActivityCreatorActionArgs;
1552
1577
  SEND_EMAIL: ActivityCreatorActionArgs;
1553
1578
  SCHEDULE_MEETING: ActivityCreatorActionArgs;
1554
1579
  OPEN_RECORD_ASSOCIATION_FORM: OpenRecordAssociationFormArgs;
1555
1580
  }
1556
1581
  /** @ignore */
1557
1582
  export type ArgsFor<SpecificActionType extends ActionType> = ActionArgs[SpecificActionType];
1558
- export type ActionType = 'PREVIEW_OBJECT' | 'ADD_NOTE' | 'SEND_EMAIL' | 'SCHEDULE_MEETING' | 'OPEN_RECORD_ASSOCIATION_FORM';
1583
+ export type ActionType = 'PREVIEW_OBJECT' | 'ADD_NOTE' | 'ADD_TASK' | 'SEND_EMAIL' | 'SCHEDULE_MEETING' | 'OPEN_RECORD_ASSOCIATION_FORM';
1559
1584
  /** @ignore */
1560
1585
  interface BaseActionComponent {
1561
1586
  children: ReactNode;
@@ -1617,7 +1642,8 @@ interface RemotePlaygroundExtensionPoint extends ExtensionPointContract {
1617
1642
  /** @ignore */
1618
1643
  export interface ExtensionPoints {
1619
1644
  'uie.playground.middle': RemotePlaygroundExtensionPoint;
1620
- 'crm.record.tab': CrmMiddleExtensionPoint;
1645
+ 'crm.record.tab': StandardCrmExtensionPoint;
1646
+ 'crm.preview': StandardCrmExtensionPoint;
1621
1647
  'crm.record.sidebar': CrmSidebarExtensionPoint;
1622
1648
  }
1623
1649
  export interface ExampleCrmComponentProps {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/ui-extensions",
3
- "version": "0.8.21",
3
+ "version": "0.8.23",
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": "1086b156684d2a06f3ca78dc3d0d504ce9c8f0c4"
54
+ "gitHead": "4e1721543d4dd631fb2aedbcd314d92b66f56e33"
55
55
  }