@hubspot/ui-extensions 0.8.29 → 0.8.31
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/dist/coreComponents.d.ts +19 -3
- package/dist/crm/components.d.ts +7 -2
- package/dist/crm/components.js +2 -1
- package/dist/crm/index.d.ts +2 -2
- package/dist/crm/index.js +2 -2
- package/dist/experimental/index.d.ts +13 -13
- package/dist/experimental/index.js +4 -4
- package/dist/types.d.ts +205 -115
- package/dist/types.js +5 -0
- package/package.json +2 -2
package/dist/coreComponents.d.ts
CHANGED
|
@@ -118,9 +118,25 @@ export declare const Stack: "Stack" & {
|
|
|
118
118
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Stack", types.StackProps, true>>;
|
|
119
119
|
export declare const ToggleGroup: "ToggleGroup" & {
|
|
120
120
|
readonly type?: "ToggleGroup" | undefined;
|
|
121
|
-
readonly props?:
|
|
122
|
-
|
|
123
|
-
|
|
121
|
+
readonly props?: ({
|
|
122
|
+
toggleType: "checkboxList";
|
|
123
|
+
onChange?: ((value: string[]) => void) | undefined;
|
|
124
|
+
value?: string[] | undefined;
|
|
125
|
+
} & types.CommonGroupProps) | ({
|
|
126
|
+
toggleType: "radioButtonList";
|
|
127
|
+
onChange?: ((value: string) => void) | undefined;
|
|
128
|
+
value?: string | undefined;
|
|
129
|
+
} & types.CommonGroupProps) | undefined;
|
|
130
|
+
readonly children?: true | undefined;
|
|
131
|
+
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"ToggleGroup", ({
|
|
132
|
+
toggleType: "checkboxList";
|
|
133
|
+
onChange?: ((value: string[]) => void) | undefined;
|
|
134
|
+
value?: string[] | undefined;
|
|
135
|
+
} & types.CommonGroupProps) | ({
|
|
136
|
+
toggleType: "radioButtonList";
|
|
137
|
+
onChange?: ((value: string) => void) | undefined;
|
|
138
|
+
value?: string | undefined;
|
|
139
|
+
} & types.CommonGroupProps), true>>;
|
|
124
140
|
export declare const StatisticsItem: "StatisticsItem" & {
|
|
125
141
|
readonly type?: "StatisticsItem" | undefined;
|
|
126
142
|
readonly props?: types.StatisticsItemProps | undefined;
|
package/dist/crm/components.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { CrmAssociationPivotProps, CrmAssociationTableProps, CrmDataHighlightProps, CrmPropertyListProps, CrmReportProps, CrmAssociationPropertyListProps, CrmAssociationStageTrackerProps, CrmStageTrackerProps, CrmStatisticsProps, CrmActionButtonProps, CrmActionLinkProps, CrmCardActionsProps } from '../types';
|
|
1
|
+
import { CrmAssociationPivotProps, CrmAssociationTableProps, CrmDataHighlightProps, CrmPropertyListProps, CrmReportProps, CrmAssociationPropertyListProps, CrmAssociationStageTrackerProps, CrmSimpleDeadlineProps, 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;
|
|
@@ -34,6 +34,11 @@ declare const CrmAssociationStageTracker: "CrmAssociationStageTracker" & {
|
|
|
34
34
|
readonly props?: CrmAssociationStageTrackerProps | undefined;
|
|
35
35
|
readonly children?: true | undefined;
|
|
36
36
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"CrmAssociationStageTracker", CrmAssociationStageTrackerProps, true>>;
|
|
37
|
+
declare const CrmSimpleDeadline: "CrmSimpleDeadline" & {
|
|
38
|
+
readonly type?: "CrmSimpleDeadline" | undefined;
|
|
39
|
+
readonly props?: CrmSimpleDeadlineProps | undefined;
|
|
40
|
+
readonly children?: true | undefined;
|
|
41
|
+
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"CrmSimpleDeadline", CrmSimpleDeadlineProps, true>>;
|
|
37
42
|
declare const CrmStageTracker: "CrmStageTracker" & {
|
|
38
43
|
readonly type?: "CrmStageTracker" | undefined;
|
|
39
44
|
readonly props?: CrmStageTrackerProps | undefined;
|
|
@@ -59,4 +64,4 @@ declare const CrmCardActions: "CrmCardActions" & {
|
|
|
59
64
|
readonly props?: CrmCardActionsProps | undefined;
|
|
60
65
|
readonly children?: true | undefined;
|
|
61
66
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"CrmCardActions", CrmCardActionsProps, true>>;
|
|
62
|
-
export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmAssociationStageTracker, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
|
|
67
|
+
export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmAssociationStageTracker, CrmSimpleDeadline, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
|
package/dist/crm/components.js
CHANGED
|
@@ -6,9 +6,10 @@ const CrmReport = createExtensionComponent('CrmReport');
|
|
|
6
6
|
const CrmAssociationPivot = createExtensionComponent('CrmAssociationPivot');
|
|
7
7
|
const CrmAssociationPropertyList = createExtensionComponent('CrmAssociationPropertyList');
|
|
8
8
|
const CrmAssociationStageTracker = createExtensionComponent('CrmAssociationStageTracker');
|
|
9
|
+
const CrmSimpleDeadline = createExtensionComponent('CrmSimpleDeadline');
|
|
9
10
|
const CrmStageTracker = createExtensionComponent('CrmStageTracker');
|
|
10
11
|
const CrmStatistics = createExtensionComponent('CrmStatistics');
|
|
11
12
|
const CrmActionButton = createExtensionComponent('CrmActionButton');
|
|
12
13
|
const CrmActionLink = createExtensionComponent('CrmActionLink');
|
|
13
14
|
const CrmCardActions = createExtensionComponent('CrmCardActions');
|
|
14
|
-
export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmAssociationStageTracker, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
|
|
15
|
+
export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmAssociationStageTracker, CrmSimpleDeadline, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
|
package/dist/crm/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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, };
|
|
1
|
+
import { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmAssociationStageTracker, CrmSimpleDeadline, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions } from './components';
|
|
2
|
+
export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmAssociationStageTracker, CrmSimpleDeadline, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
|
package/dist/crm/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
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, };
|
|
1
|
+
import { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmAssociationStageTracker, CrmSimpleDeadline, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, } from './components';
|
|
2
|
+
export { CrmPropertyList, CrmAssociationTable, CrmDataHighlight, CrmReport, CrmAssociationPivot, CrmAssociationPropertyList, CrmAssociationStageTracker, CrmSimpleDeadline, CrmStageTracker, CrmStatistics, CrmActionButton, CrmActionLink, CrmCardActions, };
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
import type * as types from '../types';
|
|
2
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
|
-
/** @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
3
|
declare const Iframe: "Iframe" & {
|
|
16
4
|
readonly type?: "Iframe" | undefined;
|
|
17
5
|
readonly props?: types.IframeProps | undefined;
|
|
18
6
|
readonly children?: true | undefined;
|
|
19
7
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Iframe", types.IframeProps, true>>;
|
|
20
|
-
|
|
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 BarChart: "BarChart" & {
|
|
10
|
+
readonly type?: "BarChart" | undefined;
|
|
11
|
+
readonly props?: types.ChartProps | undefined;
|
|
12
|
+
readonly children?: true | undefined;
|
|
13
|
+
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"BarChart", types.ChartProps, 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
|
+
declare const LineChart: "LineChart" & {
|
|
16
|
+
readonly type?: "LineChart" | undefined;
|
|
17
|
+
readonly props?: types.ChartProps | undefined;
|
|
18
|
+
readonly children?: true | undefined;
|
|
19
|
+
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"LineChart", types.ChartProps, true>>;
|
|
20
|
+
export { Iframe, BarChart, LineChart };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { createRemoteReactComponent } from '@remote-ui/react';
|
|
2
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
|
|
3
|
+
const Iframe = createRemoteReactComponent('Iframe');
|
|
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
|
-
const
|
|
5
|
+
const BarChart = createRemoteReactComponent('BarChart');
|
|
6
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
|
|
8
|
-
export {
|
|
7
|
+
const LineChart = createRemoteReactComponent('LineChart');
|
|
8
|
+
export { Iframe, BarChart, LineChart };
|
package/dist/types.d.ts
CHANGED
|
@@ -48,7 +48,7 @@ export interface BaseButtonProps {
|
|
|
48
48
|
/**
|
|
49
49
|
* A URL that will be opened when the button is clicked. If the value is a URL external to `hubspot.com` it will be opened in a new tab.
|
|
50
50
|
*/
|
|
51
|
-
href?:
|
|
51
|
+
href?: HrefProp;
|
|
52
52
|
/**
|
|
53
53
|
* Determines whether or not the button should be disabled.
|
|
54
54
|
*/
|
|
@@ -177,6 +177,130 @@ export interface CardProps {
|
|
|
177
177
|
*/
|
|
178
178
|
children: ReactNode;
|
|
179
179
|
}
|
|
180
|
+
/**
|
|
181
|
+
* The props type for {@link !components.BarChart}.
|
|
182
|
+
*
|
|
183
|
+
* @category Component Props
|
|
184
|
+
*/
|
|
185
|
+
export type BarChartProps = ChartProps;
|
|
186
|
+
/**
|
|
187
|
+
* The props type for {@link !components.LineChart}.
|
|
188
|
+
*
|
|
189
|
+
* @category Component Props
|
|
190
|
+
*/
|
|
191
|
+
export type LineChartProps = ChartProps;
|
|
192
|
+
export interface ChartProps {
|
|
193
|
+
/**
|
|
194
|
+
* The data used to render the chart. You can optionally provide configuration options.
|
|
195
|
+
*/
|
|
196
|
+
data: ChartDataRow[] | {
|
|
197
|
+
data: ChartDataRow[];
|
|
198
|
+
options?: ChartDataOptions;
|
|
199
|
+
};
|
|
200
|
+
/**
|
|
201
|
+
* The configuration for the axes of the chart.
|
|
202
|
+
*/
|
|
203
|
+
axes: ChartAxisPair;
|
|
204
|
+
/**
|
|
205
|
+
* Configuration options for the chart as a whole.
|
|
206
|
+
*/
|
|
207
|
+
options?: ChartOptions;
|
|
208
|
+
}
|
|
209
|
+
export type ChartDataRow = {
|
|
210
|
+
[key: string]: number | string;
|
|
211
|
+
};
|
|
212
|
+
export type ChartDataOptions = {
|
|
213
|
+
/**
|
|
214
|
+
* A mapping of fields to human-readable labels.
|
|
215
|
+
* We recommend pre-formatting your data to be human-readable instead of using this configuration.
|
|
216
|
+
*/
|
|
217
|
+
propertyLabels?: {
|
|
218
|
+
[fields: string]: Record<string, string>;
|
|
219
|
+
};
|
|
220
|
+
};
|
|
221
|
+
export type ChartAxisPair = {
|
|
222
|
+
/**
|
|
223
|
+
* The field to use for the horizontal x-axis.
|
|
224
|
+
*/
|
|
225
|
+
x: ChartAxis;
|
|
226
|
+
/**
|
|
227
|
+
* The field to use for the vertical y-axis.
|
|
228
|
+
*/
|
|
229
|
+
y: ChartAxis;
|
|
230
|
+
/**
|
|
231
|
+
* Configuration options for the pair of axes.
|
|
232
|
+
*/
|
|
233
|
+
options?: AxisPairOptions;
|
|
234
|
+
};
|
|
235
|
+
export type ChartAxis = {
|
|
236
|
+
/**
|
|
237
|
+
* The dataset field that should be graphed on this axis.
|
|
238
|
+
*/
|
|
239
|
+
field: string;
|
|
240
|
+
/**
|
|
241
|
+
* The type of data in the field property. Please read the documentation for the expected formats for each fieldType.
|
|
242
|
+
*/
|
|
243
|
+
fieldType: ChartFieldType;
|
|
244
|
+
/**
|
|
245
|
+
* The axis display label. Note: this will also be used in the legend and the hover tooltips.
|
|
246
|
+
*/
|
|
247
|
+
label?: string;
|
|
248
|
+
};
|
|
249
|
+
export type AxisPairOptions = {
|
|
250
|
+
/**
|
|
251
|
+
* If provided, the data will be grouped by color for this field.
|
|
252
|
+
*/
|
|
253
|
+
groupFieldByColor?: string;
|
|
254
|
+
/**
|
|
255
|
+
* When set to true, grouped data will be stacked.
|
|
256
|
+
*
|
|
257
|
+
* @defaultValue `false`
|
|
258
|
+
*/
|
|
259
|
+
stacking?: boolean;
|
|
260
|
+
};
|
|
261
|
+
export declare const chartFieldTypes: {
|
|
262
|
+
readonly datetime: "datetime";
|
|
263
|
+
readonly linear: "linear";
|
|
264
|
+
readonly category: "category";
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* The type of field for this axis.
|
|
268
|
+
* - `datetime`: Used for time data, such as JavaScript timestamps.
|
|
269
|
+
* - `linear`: Used for numerical data, such as quantities.
|
|
270
|
+
* - `category`: Used for categorical data, such as different types of products.
|
|
271
|
+
*
|
|
272
|
+
* Please read the documentation for recommended usage.
|
|
273
|
+
*/
|
|
274
|
+
export type ChartFieldType = keyof typeof chartFieldTypes;
|
|
275
|
+
export type ChartOptions = {
|
|
276
|
+
/**
|
|
277
|
+
* When set to `true`, shows a legend for the chart.
|
|
278
|
+
*
|
|
279
|
+
* @defaultValue `false`
|
|
280
|
+
*/
|
|
281
|
+
showLegend?: boolean;
|
|
282
|
+
/**
|
|
283
|
+
* When set to `true`, shows hover tooltips for the charted data.
|
|
284
|
+
*
|
|
285
|
+
* @defaultValue `false`
|
|
286
|
+
*/
|
|
287
|
+
showTooltips?: boolean;
|
|
288
|
+
/**
|
|
289
|
+
* When set to `true`, shows labels for the data directly on the chart.
|
|
290
|
+
*
|
|
291
|
+
* @defaultValue `false`
|
|
292
|
+
*/
|
|
293
|
+
showDataLabels?: boolean;
|
|
294
|
+
/**
|
|
295
|
+
* Use to choose the order in which our chart colors are assigned to your data. Unspecified colors will be chosen after the ones you've provided here.
|
|
296
|
+
* Please read the documentation for guidance on color usage.
|
|
297
|
+
*/
|
|
298
|
+
colors?: ChartColor[];
|
|
299
|
+
};
|
|
300
|
+
/**
|
|
301
|
+
* The allowed colors for data displayed on the chart.
|
|
302
|
+
*/
|
|
303
|
+
export type ChartColor = 'orange' | 'aqua' | 'purple' | 'yellow' | 'pink' | 'blue' | 'green' | 'darkOrange' | 'darkAqua' | 'darkPurple' | 'darkYellow' | 'darkPink' | 'darkBlue' | 'darkGreen';
|
|
180
304
|
/**
|
|
181
305
|
* The props type for {@link !components.DescriptionListItem}.
|
|
182
306
|
*
|
|
@@ -430,7 +554,7 @@ export interface ImageProps extends OverlayComponentProps {
|
|
|
430
554
|
* If provided, will be used as the href that will be opened in a new browser tab on click.
|
|
431
555
|
*
|
|
432
556
|
*/
|
|
433
|
-
href?:
|
|
557
|
+
href?: HrefProp;
|
|
434
558
|
/**
|
|
435
559
|
* A function that will be called when the image is clicked.
|
|
436
560
|
*
|
|
@@ -1138,49 +1262,12 @@ export interface RadioButtonListProps extends ToggleGroupListBaseProps {
|
|
|
1138
1262
|
value?: RadioButtonGroupProps['value'];
|
|
1139
1263
|
onChange?: RadioButtonGroupProps['onChange'];
|
|
1140
1264
|
}
|
|
1141
|
-
|
|
1265
|
+
type ToggleType = 'checkboxList' | 'radioButtonList';
|
|
1266
|
+
export interface CommonGroupProps {
|
|
1142
1267
|
/**
|
|
1143
1268
|
* Denotes the type of list to render.
|
|
1144
|
-
*
|
|
1145
|
-
* @defaultValue `"checkboxList"`
|
|
1146
|
-
*/
|
|
1147
|
-
toggleType: 'checkboxList';
|
|
1148
|
-
/**
|
|
1149
|
-
* A function that is called with the new value or values when the list is updated.
|
|
1150
|
-
*
|
|
1151
|
-
* @event
|
|
1152
|
-
*/
|
|
1153
|
-
onChange?: (value: this['value']) => void;
|
|
1154
|
-
/**
|
|
1155
|
-
* The value of the toggle group.
|
|
1156
|
-
*/
|
|
1157
|
-
value?: string[];
|
|
1158
|
-
}
|
|
1159
|
-
interface RadioButtonGroupProps {
|
|
1160
|
-
/**
|
|
1161
|
-
* Denotes the type of list to render.
|
|
1162
|
-
*
|
|
1163
|
-
* @defaultValue `"checkboxList"`
|
|
1164
|
-
*/
|
|
1165
|
-
toggleType: 'radioButtonList';
|
|
1166
|
-
/**
|
|
1167
|
-
* A function that is called with the new value or values when the list is updated.
|
|
1168
|
-
*
|
|
1169
|
-
* @event
|
|
1170
|
-
*/
|
|
1171
|
-
onChange?: (value: this['value']) => void;
|
|
1172
|
-
/**
|
|
1173
|
-
* The value of the toggle group.
|
|
1174
1269
|
*/
|
|
1175
|
-
|
|
1176
|
-
}
|
|
1177
|
-
/**
|
|
1178
|
-
* The props type for {@link !components.ToggleGroup}.
|
|
1179
|
-
*
|
|
1180
|
-
* @interface
|
|
1181
|
-
* @category Component Props
|
|
1182
|
-
*/
|
|
1183
|
-
export type ToggleGroupProps = {
|
|
1270
|
+
toggleType?: ToggleType;
|
|
1184
1271
|
/**
|
|
1185
1272
|
* The unique identifier for the toggle group element.
|
|
1186
1273
|
*/
|
|
@@ -1227,7 +1314,54 @@ export type ToggleGroupProps = {
|
|
|
1227
1314
|
* @defaultValue `"default"`
|
|
1228
1315
|
*/
|
|
1229
1316
|
variant?: 'default' | 'small';
|
|
1230
|
-
|
|
1317
|
+
value?: string[] | string;
|
|
1318
|
+
}
|
|
1319
|
+
type CheckboxGroupProps = {
|
|
1320
|
+
/**
|
|
1321
|
+
* Denotes the type of list to render.
|
|
1322
|
+
*
|
|
1323
|
+
* @defaultValue `"checkboxList"`
|
|
1324
|
+
*/
|
|
1325
|
+
toggleType: 'checkboxList';
|
|
1326
|
+
/**
|
|
1327
|
+
* A function that is called with the new value or values when the list is updated.
|
|
1328
|
+
*
|
|
1329
|
+
* @event
|
|
1330
|
+
*/
|
|
1331
|
+
onChange?: (value: string[]) => void;
|
|
1332
|
+
/**
|
|
1333
|
+
* The value of the toggle group.
|
|
1334
|
+
*/
|
|
1335
|
+
value?: string[];
|
|
1336
|
+
} & CommonGroupProps;
|
|
1337
|
+
type RadioButtonGroupProps = {
|
|
1338
|
+
/**
|
|
1339
|
+
* Denotes the type of list to render.
|
|
1340
|
+
*
|
|
1341
|
+
* @defaultValue `"checkboxList"`
|
|
1342
|
+
*/
|
|
1343
|
+
toggleType: 'radioButtonList';
|
|
1344
|
+
/**
|
|
1345
|
+
* A function that is called with the new value or values when the list is updated.
|
|
1346
|
+
*
|
|
1347
|
+
* @event
|
|
1348
|
+
*/
|
|
1349
|
+
onChange?: (value: string) => void;
|
|
1350
|
+
/**
|
|
1351
|
+
* The value of the toggle group.
|
|
1352
|
+
*/
|
|
1353
|
+
value?: string;
|
|
1354
|
+
} & CommonGroupProps;
|
|
1355
|
+
type DefaultToggleTypeProps = {
|
|
1356
|
+
toggleType?: never;
|
|
1357
|
+
} & CheckboxGroupProps;
|
|
1358
|
+
/**
|
|
1359
|
+
* The props type for {@link !components.ToggleGroup}.
|
|
1360
|
+
*
|
|
1361
|
+
* @interface
|
|
1362
|
+
* @category Component Props
|
|
1363
|
+
*/
|
|
1364
|
+
export type ToggleGroupProps = CheckboxGroupProps | RadioButtonGroupProps | DefaultToggleTypeProps;
|
|
1231
1365
|
/** @ignore */
|
|
1232
1366
|
export interface UserContext {
|
|
1233
1367
|
id: number;
|
|
@@ -1470,9 +1604,11 @@ export interface ExtensionCardContextData {
|
|
|
1470
1604
|
cardTitle?: string;
|
|
1471
1605
|
appId: number | string;
|
|
1472
1606
|
appName?: string;
|
|
1607
|
+
sourceId?: string | null;
|
|
1473
1608
|
objectId: number | string;
|
|
1474
1609
|
objectTypeId: string;
|
|
1475
1610
|
location: keyof ExtensionPoints;
|
|
1611
|
+
appAccessLevel: 'PRIVATE' | 'PUBLIC';
|
|
1476
1612
|
}
|
|
1477
1613
|
/** @ignore */
|
|
1478
1614
|
export type ExtensionPointAction = (...args: any[]) => Promise<any> | void;
|
|
@@ -1505,16 +1641,24 @@ export type onCrmPropertiesUpdateAction = (properties: string[] | '*', callback:
|
|
|
1505
1641
|
message: string;
|
|
1506
1642
|
}) => void) => void;
|
|
1507
1643
|
/** @ignore */
|
|
1644
|
+
export type CloseOverlayAction = (id: string) => void;
|
|
1645
|
+
/** @ignore */
|
|
1646
|
+
export interface CrmHostActions {
|
|
1647
|
+
addAlert: AddAlertAction;
|
|
1648
|
+
reloadPage: ReloadPageAction;
|
|
1649
|
+
fetchCrmObjectProperties: FetchCrmObjectPropertiesAction;
|
|
1650
|
+
openIframeModal: OpenIframeModalAction;
|
|
1651
|
+
refreshObjectProperties: refreshObjectPropertiesAction;
|
|
1652
|
+
onCrmPropertiesUpdate: onCrmPropertiesUpdateAction;
|
|
1653
|
+
}
|
|
1654
|
+
/** @ignore */
|
|
1655
|
+
export interface UiePlatformActions {
|
|
1656
|
+
copyTextToClipboard: Clipboard['writeText'];
|
|
1657
|
+
closeOverlay: CloseOverlayAction;
|
|
1658
|
+
}
|
|
1659
|
+
/** @ignore */
|
|
1508
1660
|
export interface StandardCrmExtensionPoint extends ExtensionPointContract {
|
|
1509
|
-
actions:
|
|
1510
|
-
addAlert: AddAlertAction;
|
|
1511
|
-
reloadPage: ReloadPageAction;
|
|
1512
|
-
fetchCrmObjectProperties: FetchCrmObjectPropertiesAction;
|
|
1513
|
-
openIframeModal: OpenIframeModalAction;
|
|
1514
|
-
refreshObjectProperties: refreshObjectPropertiesAction;
|
|
1515
|
-
onCrmPropertiesUpdate: onCrmPropertiesUpdateAction;
|
|
1516
|
-
copyTextToClipboard?: Clipboard['writeText'];
|
|
1517
|
-
};
|
|
1661
|
+
actions: CrmHostActions & UiePlatformActions;
|
|
1518
1662
|
context: CrmContext;
|
|
1519
1663
|
customComponents: {
|
|
1520
1664
|
CrmPropertyList: ComponentType<CrmPropertyListProps>;
|
|
@@ -1532,15 +1676,9 @@ export interface StandardCrmExtensionPoint extends ExtensionPointContract {
|
|
|
1532
1676
|
CrmCardActions?: ComponentType<CrmCardActionsProps>;
|
|
1533
1677
|
};
|
|
1534
1678
|
}
|
|
1679
|
+
/** @deprecated this interface has been replaced by StandardCrmExtensionPoint */
|
|
1535
1680
|
export interface CrmMiddleExtensionPoint extends ExtensionPointContract {
|
|
1536
|
-
actions:
|
|
1537
|
-
addAlert: AddAlertAction;
|
|
1538
|
-
reloadPage: ReloadPageAction;
|
|
1539
|
-
fetchCrmObjectProperties: FetchCrmObjectPropertiesAction;
|
|
1540
|
-
openIframeModal: OpenIframeModalAction;
|
|
1541
|
-
refreshObjectProperties: refreshObjectPropertiesAction;
|
|
1542
|
-
onCrmPropertiesUpdate: onCrmPropertiesUpdateAction;
|
|
1543
|
-
};
|
|
1681
|
+
actions: CrmHostActions;
|
|
1544
1682
|
context: CrmContext;
|
|
1545
1683
|
customComponents: {
|
|
1546
1684
|
CrmPropertyList: ComponentType<CrmPropertyListProps>;
|
|
@@ -1560,14 +1698,7 @@ export interface CrmMiddleExtensionPoint extends ExtensionPointContract {
|
|
|
1560
1698
|
}
|
|
1561
1699
|
/** @ignore */
|
|
1562
1700
|
export interface CrmSidebarExtensionPoint extends ExtensionPointContract {
|
|
1563
|
-
actions:
|
|
1564
|
-
addAlert: AddAlertAction;
|
|
1565
|
-
reloadPage: ReloadPageAction;
|
|
1566
|
-
fetchCrmObjectProperties: FetchCrmObjectPropertiesAction;
|
|
1567
|
-
openIframeModal: OpenIframeModalAction;
|
|
1568
|
-
refreshObjectProperties?: refreshObjectPropertiesAction;
|
|
1569
|
-
onCrmPropertiesUpdate?: onCrmPropertiesUpdateAction;
|
|
1570
|
-
};
|
|
1701
|
+
actions: CrmHostActions & UiePlatformActions;
|
|
1571
1702
|
context: CrmContext;
|
|
1572
1703
|
customComponents: {
|
|
1573
1704
|
CrmActionButton?: ComponentType<CrmActionButtonProps>;
|
|
@@ -2000,6 +2131,11 @@ export declare class RemoteEvent<V> {
|
|
|
2000
2131
|
targetValue: V;
|
|
2001
2132
|
constructor(value: V, event: Event);
|
|
2002
2133
|
}
|
|
2134
|
+
export type HrefOptions = {
|
|
2135
|
+
url: string;
|
|
2136
|
+
external?: boolean;
|
|
2137
|
+
};
|
|
2138
|
+
export type HrefProp = string | HrefOptions;
|
|
2003
2139
|
/**
|
|
2004
2140
|
* The props type for {@link !components.Link}.
|
|
2005
2141
|
*
|
|
@@ -2015,7 +2151,7 @@ export interface LinkProps extends OverlayComponentProps {
|
|
|
2015
2151
|
* The URL that will be opened on click. Links to pages in the HubSpot account will open in the same tab, while non-HubSpot links will open in a new tab.
|
|
2016
2152
|
*
|
|
2017
2153
|
*/
|
|
2018
|
-
href:
|
|
2154
|
+
href: HrefProp;
|
|
2019
2155
|
/**
|
|
2020
2156
|
* The color variation of the link.
|
|
2021
2157
|
*
|
|
@@ -2421,52 +2557,6 @@ export interface DropdownProps {
|
|
|
2421
2557
|
*/
|
|
2422
2558
|
disabled?: boolean;
|
|
2423
2559
|
}
|
|
2424
|
-
/**
|
|
2425
|
-
* @ignore
|
|
2426
|
-
* @experimental
|
|
2427
|
-
*/
|
|
2428
|
-
export interface TooltipProps {
|
|
2429
|
-
children: ReactNode;
|
|
2430
|
-
delay?: number;
|
|
2431
|
-
maxWidth?: number;
|
|
2432
|
-
open?: boolean;
|
|
2433
|
-
onOpenChange?: () => void;
|
|
2434
|
-
content?: string;
|
|
2435
|
-
placement?: 'left' | 'right' | 'top' | 'bottom';
|
|
2436
|
-
}
|
|
2437
|
-
/**
|
|
2438
|
-
* The props type for {@link !components.Slider}.
|
|
2439
|
-
*
|
|
2440
|
-
* @category Component Props
|
|
2441
|
-
* @ignore remove when it's not experimental
|
|
2442
|
-
* @experimental
|
|
2443
|
-
*/
|
|
2444
|
-
export interface SliderProps extends Omit<BaseInputForNumber, 'placeholder'> {
|
|
2445
|
-
/**
|
|
2446
|
-
* Sets the lower bound of the input.
|
|
2447
|
-
* @defaultValue `0`
|
|
2448
|
-
*/
|
|
2449
|
-
min?: number;
|
|
2450
|
-
/**
|
|
2451
|
-
* Sets the upper bound of the input.
|
|
2452
|
-
* @defaultValue `100`
|
|
2453
|
-
*/
|
|
2454
|
-
max?: number;
|
|
2455
|
-
/** The amount that the current value will increase or decrease on each step drag of the mouse
|
|
2456
|
-
* or keyboar interaction
|
|
2457
|
-
* @defaultValue `1`
|
|
2458
|
-
*/
|
|
2459
|
-
stepSize?: number;
|
|
2460
|
-
/** If `true`, it will display the min and max value labels.
|
|
2461
|
-
* @defaultValue `false`
|
|
2462
|
-
*/
|
|
2463
|
-
showLabels?: boolean;
|
|
2464
|
-
/**
|
|
2465
|
-
* Sets the size of the slider
|
|
2466
|
-
* @defaultValue `"md"`
|
|
2467
|
-
*/
|
|
2468
|
-
size?: TShirtSizes['md'] | TShirtSizes['lg'];
|
|
2469
|
-
}
|
|
2470
2560
|
export interface HubSpotFetchOptions {
|
|
2471
2561
|
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
2472
2562
|
timeout?: number;
|
package/dist/types.js
CHANGED
|
@@ -17,6 +17,11 @@ export class FormSubmitExtensionEvent extends ExtensionEvent {
|
|
|
17
17
|
this.targetValue = value;
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
|
+
export const chartFieldTypes = {
|
|
21
|
+
datetime: 'datetime',
|
|
22
|
+
linear: 'linear',
|
|
23
|
+
category: 'category',
|
|
24
|
+
};
|
|
20
25
|
export const iconNames = {
|
|
21
26
|
success: 'success',
|
|
22
27
|
remove: 'remove',
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hubspot/ui-extensions",
|
|
3
|
-
"version": "0.8.
|
|
3
|
+
"version": "0.8.31",
|
|
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": "
|
|
54
|
+
"gitHead": "6b4dc14443e533403206aeb72635132851b5f558"
|
|
55
55
|
}
|