@hubspot/ui-extensions 0.8.8 → 0.8.10

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.
@@ -231,3 +231,28 @@ export declare const Dropdown: "Dropdown" & {
231
231
  readonly props?: types.DropdownProps | undefined;
232
232
  readonly children?: true | undefined;
233
233
  } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Dropdown", types.DropdownProps, true>>;
234
+ export declare const Panel: "Panel" & {
235
+ readonly type?: "Panel" | undefined;
236
+ readonly props?: types.PanelProps | undefined;
237
+ readonly children?: true | undefined;
238
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Panel", types.PanelProps, true>>;
239
+ export declare const PanelFooter: "PanelFooter" & {
240
+ readonly type?: "PanelFooter" | undefined;
241
+ readonly props?: types.PanelFooterProps | undefined;
242
+ readonly children?: true | undefined;
243
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"PanelFooter", types.PanelFooterProps, true>>;
244
+ export declare const PanelBody: "PanelBody" & {
245
+ readonly type?: "PanelBody" | undefined;
246
+ readonly props?: types.PanelBodyProps | undefined;
247
+ readonly children?: true | undefined;
248
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"PanelBody", types.PanelBodyProps, true>>;
249
+ export declare const PanelSection: "PanelSection" & {
250
+ readonly type?: "PanelSection" | undefined;
251
+ readonly props?: types.PanelSectionProps | undefined;
252
+ readonly children?: true | undefined;
253
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"PanelSection", types.PanelSectionProps, true>>;
254
+ export declare const StepperInput: "StepperInput" & {
255
+ readonly type?: "StepperInput" | undefined;
256
+ readonly props?: types.StepperInputProps | undefined;
257
+ readonly children?: true | undefined;
258
+ } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"StepperInput", types.StepperInputProps, true>>;
@@ -49,3 +49,8 @@ export const RadioButton = createRemoteReactComponent('RadioButton');
49
49
  export const List = createRemoteReactComponent('List');
50
50
  export const Toggle = createRemoteReactComponent('Toggle');
51
51
  export const Dropdown = createRemoteReactComponent('Dropdown');
52
+ export const Panel = createRemoteReactComponent('Panel');
53
+ export const PanelFooter = createRemoteReactComponent('PanelFooter');
54
+ export const PanelBody = createRemoteReactComponent('PanelBody');
55
+ export const PanelSection = createRemoteReactComponent('PanelSection');
56
+ export const StepperInput = createRemoteReactComponent('StepperInput');
@@ -1,31 +1,13 @@
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
- export declare const Panel: "Panel" & {
4
- readonly type?: "Panel" | undefined;
5
- readonly props?: types.PanelProps | undefined;
6
- readonly children?: true | undefined;
7
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Panel", types.PanelProps, 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 PanelFooter: "PanelFooter" & {
10
- readonly type?: "PanelFooter" | undefined;
11
- readonly props?: types.PanelFooterProps | undefined;
12
- readonly children?: true | undefined;
13
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"PanelFooter", types.PanelFooterProps, 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 PanelBody: "PanelBody" & {
16
- readonly type?: "PanelBody" | undefined;
17
- readonly props?: types.PanelBodyProps | undefined;
18
- readonly children?: true | undefined;
19
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"PanelBody", types.PanelBodyProps, true>>;
20
- /** @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. */
21
- export declare const PanelSection: "PanelSection" & {
22
- readonly type?: "PanelSection" | undefined;
23
- readonly props?: types.PanelSectionProps | undefined;
24
- readonly children?: true | undefined;
25
- } & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"PanelSection", types.PanelSectionProps, true>>;
26
- /** @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. */
27
3
  export declare const Tooltip: "Tooltip" & {
28
4
  readonly type?: "Tooltip" | undefined;
29
5
  readonly props?: types.TooltipProps | undefined;
30
6
  readonly children?: true | undefined;
31
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>>;
@@ -1,11 +1,5 @@
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
- export const Panel = createRemoteReactComponent('Panel');
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 PanelFooter = createRemoteReactComponent('PanelFooter');
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 PanelBody = createRemoteReactComponent('PanelBody');
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 const PanelSection = createRemoteReactComponent('PanelSection');
10
- /** @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. */
11
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');
@@ -1 +1 @@
1
- export { Panel, PanelBody, PanelSection, PanelFooter, Tooltip, } from './experimentalComponents';
1
+ export { Tooltip, Slider } from './experimentalComponents';
@@ -1 +1 @@
1
- export { Panel, PanelBody, PanelSection, PanelFooter, Tooltip, } from './experimentalComponents';
1
+ export { Tooltip, Slider } from './experimentalComponents';
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
1
  export { hubspot } from './hubspot';
2
+ export { logger } from './logger';
2
3
  export * from './coreComponents';
3
4
  export * from './types';
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
1
  export { hubspot } from './hubspot';
2
+ export { logger } from './logger';
2
3
  export * from './coreComponents';
3
4
  export * from './types';
@@ -0,0 +1,8 @@
1
+ interface Logger {
2
+ debug: (value: string) => void;
3
+ info: (value: string) => void;
4
+ warn: (value: string) => void;
5
+ error: (value: string) => void;
6
+ }
7
+ export declare const logger: Logger;
8
+ export {};
package/dist/logger.js ADDED
@@ -0,0 +1,2 @@
1
+ /* eslint-disable hubspot-dev/no-confusing-browser-globals */
2
+ export const logger = self.logger;
package/dist/types.d.ts CHANGED
@@ -460,6 +460,27 @@ export interface NumberInputProps extends BaseInputForNumber {
460
460
  /** @deprecated use onChange instead. It doesn't guarantee valid format */
461
461
  onInput?: (value: number) => void;
462
462
  }
463
+ /**
464
+ * The props type for {@link !components.StepperInput}.
465
+ *
466
+ * @category Component Props
467
+ */
468
+ export interface StepperInputProps extends Omit<NumberInputProps, 'onInput'> {
469
+ /** The amount that the current value will increase or decrease on each step button click.
470
+ * @defaultValue `1`
471
+ */
472
+ stepSize?: number;
473
+ /**
474
+ * Text that will appear in a tooltip next to the step up button when users
475
+ * can't increase the current value.
476
+ */
477
+ maxValueReachedTooltip?: string;
478
+ /**
479
+ * Text that will appear in a tooltip next to the step down button when users
480
+ * can't decrease the current value.
481
+ */
482
+ minValueReachedTooltip?: string;
483
+ }
463
484
  /** Object that represents dates. */
464
485
  export interface BaseDate {
465
486
  /** the four-digit year (e.g., 2023). */
@@ -1264,19 +1285,24 @@ export type AddAlertAction = (args: {
1264
1285
  /** @ignore */
1265
1286
  export type ReloadPageAction = () => void;
1266
1287
  /** @ignore */
1267
- export type FetchCrmObjectPropertiesAction = (properties: string[]) => Promise<Record<string, string>>;
1288
+ export type FetchCrmObjectPropertiesAction = (properties: string[] | '*') => Promise<Record<string, string>>;
1268
1289
  /** @ignore */
1269
1290
  export type OpenIframeModalAction = (action: OpenIframeActionPayload) => void;
1270
1291
  /** @ignore */
1271
1292
  export type refreshObjectPropertiesAction = () => void;
1272
1293
  /** @ignore */
1294
+ export type onCrmPropertiesUpdateAction = (properties: string[] | '*', callback: (properties: Record<string, string>, error?: {
1295
+ message: string;
1296
+ }) => void) => void;
1297
+ /** @ignore */
1273
1298
  export interface CrmMiddleExtensionPoint extends ExtensionPointContract {
1274
1299
  actions: {
1275
1300
  addAlert: AddAlertAction;
1276
1301
  reloadPage: ReloadPageAction;
1277
1302
  fetchCrmObjectProperties: FetchCrmObjectPropertiesAction;
1278
1303
  openIframeModal: OpenIframeModalAction;
1279
- refreshObjectProperties?: refreshObjectPropertiesAction;
1304
+ refreshObjectProperties: refreshObjectPropertiesAction;
1305
+ onCrmPropertiesUpdate: onCrmPropertiesUpdateAction;
1280
1306
  };
1281
1307
  context: CrmContext;
1282
1308
  customComponents: {
@@ -1302,6 +1328,7 @@ export interface CrmSidebarExtensionPoint extends ExtensionPointContract {
1302
1328
  fetchCrmObjectProperties: FetchCrmObjectPropertiesAction;
1303
1329
  openIframeModal: OpenIframeModalAction;
1304
1330
  refreshObjectProperties?: refreshObjectPropertiesAction;
1331
+ onCrmPropertiesUpdate?: onCrmPropertiesUpdateAction;
1305
1332
  };
1306
1333
  context: CrmContext;
1307
1334
  customComponents: {
@@ -1977,17 +2004,6 @@ export interface PanelProps {
1977
2004
  *
1978
2005
  */
1979
2006
  title?: string;
1980
- /**
1981
- * The Footer of the panel
1982
- *
1983
- */
1984
- footer?: React.ReactNode;
1985
- /**
1986
- * When set to `true`, the table will not have side padding.
1987
- *
1988
- * @defaultValue `false`
1989
- */
1990
- flush?: boolean;
1991
2007
  /**
1992
2008
  * The variant of the panel
1993
2009
  *
@@ -2079,4 +2095,37 @@ export interface TooltipProps {
2079
2095
  content?: string;
2080
2096
  placement?: 'left' | 'right' | 'top' | 'bottom';
2081
2097
  }
2098
+ /**
2099
+ * The props type for {@link !components.Slider}.
2100
+ *
2101
+ * @category Component Props
2102
+ * @ignore remove when it's not experimental
2103
+ * @experimental
2104
+ */
2105
+ export interface SliderProps extends Omit<BaseInputForNumber, 'placeholder'> {
2106
+ /**
2107
+ * Sets the lower bound of the input.
2108
+ * @defaultValue `0`
2109
+ */
2110
+ min?: number;
2111
+ /**
2112
+ * Sets the upper bound of the input.
2113
+ * @defaultValue `100`
2114
+ */
2115
+ max?: number;
2116
+ /** The amount that the current value will increase or decrease on each step drag of the mouse
2117
+ * or keyboar interaction
2118
+ * @defaultValue `1`
2119
+ */
2120
+ stepSize?: number;
2121
+ /** If `true`, it will display the min and max value labels.
2122
+ * @defaultValue `false`
2123
+ */
2124
+ showLabels?: boolean;
2125
+ /**
2126
+ * Sets the size of the slider
2127
+ * @defaultValue `"md"`
2128
+ */
2129
+ size?: TShirtSizes['md'] | TShirtSizes['lg'];
2130
+ }
2082
2131
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hubspot/ui-extensions",
3
- "version": "0.8.8",
3
+ "version": "0.8.10",
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": "97c104741286d22bac7ea75193fbdd09b6f6db64"
54
+ "gitHead": "304f163621e00aac8339440fac02a09b57e078d8"
55
55
  }