@hubspot/ui-extensions 0.7.2 → 0.8.0

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.
package/README.md CHANGED
@@ -1830,14 +1830,21 @@ interface TableHeaderProps {
1830
1830
  children: ReactNode;
1831
1831
  width?: 'min' | 'max' | 'auto' | number;
1832
1832
  align?: 'left' | 'center' | 'right';
1833
+ sortDirection?: 'ascending' | 'descending' | 'none';
1834
+ onSortChange?: (value: 'ascending' | 'descending') => void;
1835
+ disabled?: boolean;
1833
1836
  }
1834
1837
  ```
1835
1838
 
1836
1839
  | Prop | Type | Default | Description |
1837
1840
  | --- | --- | --- | --- |
1838
1841
  | `children` | `ReactNode` | `N/A` | Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components. |
1839
- | `width` | `'min' \| 'max' \| 'auto' \| 'large'` | `'auto'` | Sets the width of a table header |
1842
+ | `width` | `'min' \| 'max' \| 'auto' \| 'large'` | `'auto'` | Sets the width of a table header. |
1840
1843
  | `align` | `'left' \| 'center' \| 'right'` | `'left'` | Sets the alignment of a table header |
1844
+ | `sortDirection` | `'ascending' \| 'descending' \| 'none'` | `'N/A'` | Sets the current direction in which the column is sorted (if any). It's a visual indicator, it doesn't modify the data. |
1845
+ | `disabled` | `boolean(optional)` | `false` | If `true`, users cannot change the sort ordering. It has no effect if sort=`never` or `undefined`. |
1846
+ | `onSortChange` | `(value: 'ascending' | 'descending') => void(optional)` | `N/A` | A callback function that is invoked when the header is clicked. It recieves the new sort direction as an argument. It's required when sort = `ascending`, `descending` or `none`. |
1847
+
1841
1848
  ##### Usage
1842
1849
 
1843
1850
  ```javascript
@@ -1,4 +1,4 @@
1
- import { CrmAssociationPivotProps, CrmAssociationTableProps, CrmDataHighlightProps, CrmObjectPropertyProps, CrmPropertyListProps, CrmReportProps, CrmAssociationPropertyListProps, CrmStageTrackerProps } from '../types';
1
+ import { CrmAssociationPivotProps, CrmAssociationTableProps, CrmDataHighlightProps, CrmObjectPropertyProps, CrmPropertyListProps, CrmReportProps, CrmAssociationPropertyListProps, CrmStageTrackerProps, CrmActionButtonProps, CrmActionLinkProps, CrmCardActionsProps } from '../types';
2
2
  declare const CrmObjectProperty: "CrmObjectProperty" & {
3
3
  readonly type?: "CrmObjectProperty" | undefined;
4
4
  readonly props?: CrmObjectPropertyProps | undefined;
@@ -39,4 +39,19 @@ declare const CrmStageTracker: "CrmStageTracker" & {
39
39
  readonly props?: CrmStageTrackerProps | undefined;
40
40
  readonly children?: true | undefined;
41
41
  } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"CrmStageTracker", CrmStageTrackerProps, true>>;
42
- export { CrmObjectProperty, CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmStageTracker, };
42
+ declare const CrmActionButton: "CrmActionButton" & {
43
+ readonly type?: "CrmActionButton" | undefined;
44
+ readonly props?: CrmActionButtonProps | undefined;
45
+ readonly children?: true | undefined;
46
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"CrmActionButton", CrmActionButtonProps, true>>;
47
+ declare const CrmActionLink: "CrmActionLink" & {
48
+ readonly type?: "CrmActionLink" | undefined;
49
+ readonly props?: CrmActionLinkProps | undefined;
50
+ readonly children?: true | undefined;
51
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"CrmActionLink", CrmActionLinkProps, true>>;
52
+ declare const CrmCardActions: "CrmCardActions" & {
53
+ readonly type?: "CrmCardActions" | undefined;
54
+ readonly props?: CrmCardActionsProps | undefined;
55
+ readonly children?: true | undefined;
56
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"CrmCardActions", CrmCardActionsProps, true>>;
57
+ export { CrmObjectProperty, CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmStageTracker, CrmActionButton, CrmActionLink, CrmCardActions, };
@@ -7,4 +7,7 @@ const CrmReport = createExtensionComponent('CrmReport');
7
7
  const CrmAssociationPivot = createExtensionComponent('CrmAssociationPivot');
8
8
  const CrmAssociationPropertyList = createExtensionComponent('CrmAssociationPropertyList');
9
9
  const CrmStageTracker = createExtensionComponent('CrmStageTracker');
10
- export { CrmObjectProperty, CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmStageTracker, };
10
+ const CrmActionButton = createExtensionComponent('CrmActionButton');
11
+ const CrmActionLink = createExtensionComponent('CrmActionLink');
12
+ const CrmCardActions = createExtensionComponent('CrmCardActions');
13
+ export { CrmObjectProperty, CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmStageTracker, CrmActionButton, CrmActionLink, CrmCardActions, };
@@ -1,2 +1,2 @@
1
- import { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, CrmStageTracker } from './components';
2
- export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, CrmStageTracker, };
1
+ import { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, CrmStageTracker, CrmActionButton, CrmActionLink, CrmCardActions } from './components';
2
+ export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, CrmStageTracker, CrmActionButton, CrmActionLink, CrmCardActions, };
package/dist/crm/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, CrmStageTracker, } from './components';
2
- export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, CrmStageTracker, };
1
+ import { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, CrmStageTracker, CrmActionButton, CrmActionLink, CrmCardActions, } from './components';
2
+ export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmObjectProperty, CrmAssociationPropertyList, CrmStageTracker, CrmActionButton, CrmActionLink, CrmCardActions, };