@hubspot/ui-extensions 0.12.1 → 0.12.3
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/__tests__/crm/utils/fetchAssociations.spec.js +1 -1
- package/dist/__tests__/crm/utils/fetchCrmProperties.spec.js +1 -1
- package/dist/crm/hooks/useAssociations.d.ts +1 -1
- package/dist/crm/hooks/useAssociations.js +2 -2
- package/dist/crm/hooks/useCrmProperties.d.ts +1 -1
- package/dist/crm/hooks/useCrmProperties.js +2 -2
- package/dist/crm/utils/fetchAssociations.d.ts +1 -1
- package/dist/crm/utils/fetchAssociations.js +0 -1
- package/dist/crm/utils/fetchCrmProperties.js +0 -1
- package/dist/experimental/pages/index.d.ts +4 -0
- package/dist/experimental/pages/index.js +3 -0
- package/dist/hs-internal/__tests__/createRemoteComponentInternal.spec.js +4 -4
- package/dist/hubspot.js +0 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/internal/global-utils.d.ts +1 -1
- package/dist/internal/hook-utils.d.ts +3 -3
- package/dist/shared/remoteComponents.d.ts +13 -2
- package/dist/shared/remoteComponents.js +13 -0
- package/dist/shared/types/components/accordion.d.ts +3 -3
- package/dist/shared/types/components/alert.d.ts +3 -3
- package/dist/shared/types/components/app-home-header-actions.d.ts +5 -5
- package/dist/shared/types/components/button-row.d.ts +3 -3
- package/dist/shared/types/components/button.d.ts +7 -6
- package/dist/shared/types/components/card.d.ts +2 -2
- package/dist/shared/types/components/chart.d.ts +3 -3
- package/dist/shared/types/components/description-list.d.ts +5 -5
- package/dist/shared/types/components/divider.d.ts +6 -2
- package/dist/shared/types/components/dropdown.d.ts +4 -5
- package/dist/shared/types/components/empty-state.d.ts +3 -3
- package/dist/shared/types/components/error-state.d.ts +3 -3
- package/dist/shared/types/components/form.d.ts +4 -4
- package/dist/shared/types/components/heading.d.ts +3 -3
- package/dist/shared/types/components/icon.d.ts +4 -4
- package/dist/shared/types/components/iframe.d.ts +1 -1
- package/dist/shared/types/components/illustration.d.ts +2 -2
- package/dist/shared/types/components/image.d.ts +5 -4
- package/dist/shared/types/components/index.d.ts +1 -0
- package/dist/shared/types/components/inputs.d.ts +9 -9
- package/dist/shared/types/components/layouts.d.ts +7 -7
- package/dist/shared/types/components/link.d.ts +6 -5
- package/dist/shared/types/components/list.d.ts +3 -3
- package/dist/shared/types/components/loading-spinner.d.ts +2 -2
- package/dist/shared/types/components/modal.d.ts +2 -2
- package/dist/shared/types/components/panel.d.ts +2 -2
- package/dist/shared/types/components/progress-bar.d.ts +2 -2
- package/dist/shared/types/components/score.d.ts +2 -2
- package/dist/shared/types/components/selects.d.ts +3 -3
- package/dist/shared/types/components/spacer.d.ts +14 -0
- package/dist/shared/types/components/spacer.js +1 -0
- package/dist/shared/types/components/statistics.d.ts +7 -7
- package/dist/shared/types/components/status-tag.d.ts +3 -3
- package/dist/shared/types/components/step-indicator.d.ts +2 -2
- package/dist/shared/types/components/table.d.ts +6 -6
- package/dist/shared/types/components/tabs.d.ts +2 -2
- package/dist/shared/types/components/tag.d.ts +6 -5
- package/dist/shared/types/components/text.d.ts +3 -3
- package/dist/shared/types/components/tile.d.ts +3 -3
- package/dist/shared/types/components/toggle.d.ts +2 -2
- package/dist/shared/types/components/toggleInputs.d.ts +4 -4
- package/dist/shared/types/components/tooltip.d.ts +2 -2
- package/dist/shared/types/crm.d.ts +188 -44
- package/dist/shared/types/experimental.d.ts +1 -1
- package/dist/shared/types/extend.d.ts +2 -2
- package/dist/shared/types/extension-points.d.ts +4 -5
- package/dist/shared/types/pages/app-pages-types.d.ts +75 -0
- package/dist/shared/types/pages/app-pages-types.js +1 -0
- package/dist/shared/types/pages/components/index.d.ts +2 -0
- package/dist/shared/types/pages/components/index.js +1 -0
- package/dist/shared/types/pages/components/page-link.d.ts +23 -0
- package/dist/shared/types/pages/components/page-link.js +1 -0
- package/dist/shared/types/pages/components/page-routes.d.ts +115 -0
- package/dist/shared/types/pages/components/page-routes.js +1 -0
- package/dist/shared/types/shared.d.ts +23 -1
- package/dist/shared/types/worker-globals.d.ts +17 -3
- package/dist/shared/utils/remote-component-registry.d.ts +1 -1
- package/dist/testing/__tests__/isMatch.spec.js +1 -1
- package/dist/testing/__tests__/mocks.runServerlessFunction.spec.js +1 -1
- package/dist/testing/__tests__/mocks.useAssociations.spec.js +2 -2
- package/dist/testing/__tests__/mocks.useCrmProperties.spec.js +2 -2
- package/dist/testing/__tests__/mocks.useExtensionActions.spec.js +1 -1
- package/dist/testing/__tests__/mocks.useExtensionApi.spec.js +1 -1
- package/dist/testing/__tests__/mocks.useExtensionContext.spec.js +1 -1
- package/dist/testing/internal/convert.d.ts +1 -1
- package/dist/testing/internal/convert.js +4 -5
- package/dist/testing/internal/debug.d.ts +1 -1
- package/dist/testing/internal/element.d.ts +1 -1
- package/dist/testing/internal/errors.d.ts +2 -2
- package/dist/testing/internal/fragment.d.ts +1 -1
- package/dist/testing/internal/match.d.ts +2 -2
- package/dist/testing/internal/mocks/index.d.ts +3 -3
- package/dist/testing/internal/mocks/index.js +1 -1
- package/dist/testing/internal/mocks/mock-extension-point-api.d.ts +2 -1
- package/dist/testing/internal/mocks/mock-extension-point-api.js +1 -1
- package/dist/testing/internal/mocks/mock-hooks.d.ts +1 -1
- package/dist/testing/internal/text.d.ts +2 -2
- package/dist/testing/internal/type-utils-internal.d.ts +2 -2
- package/dist/testing/internal/types-internal.d.ts +6 -6
- package/dist/testing/render.d.ts +2 -2
- package/dist/testing/render.js +5 -6
- package/dist/testing/type-utils.d.ts +1 -1
- package/dist/testing/type-utils.js +1 -1
- package/dist/testing/types.d.ts +9 -9
- package/dist/testing/utils.d.ts +1 -1
- package/dist/testing/utils.js +1 -1
- package/package.json +32 -24
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { vi } from 'vitest';
|
|
2
|
+
import { calculatePaginationFlags, fetchAssociations, } from "../../../crm/utils/fetchAssociations.js";
|
|
2
3
|
// Set up the mock before importing the module
|
|
3
4
|
const mockFetchAssociations = vi.fn();
|
|
4
5
|
const mockSelf = {
|
|
@@ -9,7 +10,6 @@ Object.defineProperty(global, 'self', {
|
|
|
9
10
|
value: mockSelf,
|
|
10
11
|
writable: true,
|
|
11
12
|
});
|
|
12
|
-
import { fetchAssociations, calculatePaginationFlags, } from "../../../crm/utils/fetchAssociations.js";
|
|
13
13
|
describe('fetchAssociations', () => {
|
|
14
14
|
// Helper functions
|
|
15
15
|
const createMockResponse = (data, overrides = {}) => ({
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { vi } from 'vitest';
|
|
2
|
+
import { fetchCrmProperties } from "../../../crm/utils/fetchCrmProperties.js";
|
|
2
3
|
// Set up the mock before importing the module
|
|
3
4
|
const mockFetchCrmProperties = vi.fn();
|
|
4
5
|
const mockSelf = {
|
|
@@ -9,7 +10,6 @@ Object.defineProperty(global, 'self', {
|
|
|
9
10
|
value: mockSelf,
|
|
10
11
|
writable: true,
|
|
11
12
|
});
|
|
12
|
-
import { fetchCrmProperties } from "../../../crm/utils/fetchCrmProperties.js";
|
|
13
13
|
const DEFAULT_OPTIONS = {};
|
|
14
14
|
describe('fetchCrmProperties', () => {
|
|
15
15
|
beforeEach(() => {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { AssociationResult, FetchAssociationsRequest } from '../utils/fetchAssociations.ts';
|
|
2
2
|
import { type FetchCrmPropertiesOptions } from '../utils/fetchCrmProperties.ts';
|
|
3
3
|
export interface UseAssociationsOptions {
|
|
4
4
|
propertiesToFormat?: 'all' | string[];
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { fetchAssociations, DEFAULT_PAGE_SIZE, calculatePaginationFlags, } from "../utils/fetchAssociations.js";
|
|
1
|
+
import { useCallback, useEffect, useMemo, useReducer, useRef } from 'react';
|
|
3
2
|
import { createMockAwareHook } from "../../internal/hook-utils.js";
|
|
3
|
+
import { calculatePaginationFlags, DEFAULT_PAGE_SIZE, fetchAssociations, } from "../utils/fetchAssociations.js";
|
|
4
4
|
function createInitialState(pageSize) {
|
|
5
5
|
return {
|
|
6
6
|
results: [],
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { fetchCrmProperties, } from "../utils/fetchCrmProperties.js";
|
|
1
|
+
import { useCallback, useEffect, useMemo, useReducer, useRef } from 'react';
|
|
3
2
|
import { createMockAwareHook } from "../../internal/hook-utils.js";
|
|
3
|
+
import { fetchCrmProperties } from "../utils/fetchCrmProperties.js";
|
|
4
4
|
const initialState = {
|
|
5
5
|
properties: {},
|
|
6
6
|
error: null,
|
|
@@ -27,7 +27,6 @@ export const fetchAssociations = async (request, options) => {
|
|
|
27
27
|
let response;
|
|
28
28
|
let result;
|
|
29
29
|
try {
|
|
30
|
-
// eslint-disable-next-line hubspot-dev/no-confusing-browser-globals
|
|
31
30
|
response = await self.fetchAssociations(request, options);
|
|
32
31
|
result = await response.json();
|
|
33
32
|
}
|
|
@@ -15,7 +15,6 @@ export const fetchCrmProperties = async (propertyNames, propertiesUpdatedCallbac
|
|
|
15
15
|
let response;
|
|
16
16
|
let result;
|
|
17
17
|
try {
|
|
18
|
-
// eslint-disable-next-line hubspot-dev/no-confusing-browser-globals
|
|
19
18
|
response = await self.fetchCrmProperties(propertyNames, propertiesUpdatedCallback, options);
|
|
20
19
|
result = await response.json();
|
|
21
20
|
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type * from '../../shared/types/pages/components/index.ts';
|
|
2
|
+
export type * from '../../shared/types/pages/app-pages-types.ts';
|
|
3
|
+
export declare const PageRoutes: import("../../shared/types/pages/components/page-routes.ts").PageRoutesComponent, usePageRoute: import("../../shared/types/pages/app-pages-types.ts").UsePageRouteHook, createPageRouter: import("../../shared/types/pages/app-pages-types.ts").CreatePageRouterFunction;
|
|
4
|
+
export { PageLink } from '../../shared/remoteComponents.tsx';
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { useState } from 'react';
|
|
2
3
|
import { describe, expect, it } from 'vitest';
|
|
3
|
-
import { createRenderer } from "../../testing/index.js";
|
|
4
|
-
import { createRemoteComponentInternal } from "../index.js";
|
|
5
|
-
import { __hubSpotComponentRegistry } from "../../shared/remoteComponents.js";
|
|
6
4
|
import { Button, Text } from "../../index.js";
|
|
5
|
+
import { __hubSpotComponentRegistry } from "../../shared/remoteComponents.js";
|
|
6
|
+
import { createRenderer } from "../../testing/index.js";
|
|
7
7
|
import { InvalidComponentsError } from "../../testing/internal/errors.js";
|
|
8
|
-
import {
|
|
8
|
+
import { createRemoteComponentInternal } from "../index.js";
|
|
9
9
|
// Create custom components once at the top level
|
|
10
10
|
const CustomButton = createRemoteComponentInternal('TestCustomButton');
|
|
11
11
|
const CustomCard = createRemoteComponentInternal('TestCustomCard', {
|
package/dist/hubspot.js
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import './clientTypes.ts';
|
|
|
2
2
|
export { hubspot } from './hubspot.ts';
|
|
3
3
|
export { logger } from './logger.ts';
|
|
4
4
|
export * from './shared/types/index.ts';
|
|
5
|
-
export { Accordion, Alert, AutoGrid, BarChart, Box, Button, ButtonRow, Card, Checkbox, CurrencyInput, DateInput, DescriptionList, DescriptionListItem, Divider, Dropdown, EmptyState, ErrorState, Flex, Form, Heading, Icon, Illustration, Image, Inline, Input, LineChart, Link, List, LoadingButton, LoadingSpinner, Modal, ModalBody, ModalFooter, MultiSelect, NumberInput, Panel, PanelBody, PanelFooter, PanelSection, ProgressBar, RadioButton, ScoreCircle, SearchInput, Select, Stack, Statistics, StatisticsItem, StatisticsTrend, StatusTag, StepIndicator, StepperInput, Tab, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, Tag, Text, TextArea, Textarea, Tile, TimeInput, Toggle, ToggleGroup, Tooltip, } from './shared/remoteComponents.tsx';
|
|
5
|
+
export { Accordion, Alert, AutoGrid, BarChart, Box, Button, ButtonRow, Card, Checkbox, CurrencyInput, DateInput, DescriptionList, DescriptionListItem, Divider, Dropdown, EmptyState, ErrorState, Flex, Form, Heading, Icon, Illustration, Image, Inline, Input, LineChart, Link, List, LoadingButton, LoadingSpinner, Modal, ModalBody, ModalFooter, MultiSelect, NumberInput, Panel, PanelBody, PanelFooter, PanelSection, ProgressBar, RadioButton, ScoreCircle, SearchInput, Select, Spacer, Stack, Statistics, StatisticsItem, StatisticsTrend, StatusTag, StepIndicator, StepperInput, Tab, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, Tag, Text, TextArea, Textarea, Tile, TimeInput, Toggle, ToggleGroup, Tooltip, } from './shared/remoteComponents.tsx';
|
|
6
6
|
export { useExtensionContext } from './hooks/useExtensionContext.tsx';
|
|
7
7
|
export { useExtensionActions } from './hooks/useExtensionActions.tsx';
|
|
8
8
|
export { useExtensionApi } from './hooks/useExtensionApi.tsx';
|
package/dist/index.js
CHANGED
|
@@ -3,7 +3,7 @@ import "./clientTypes.js";
|
|
|
3
3
|
export { hubspot } from "./hubspot.js";
|
|
4
4
|
export { logger } from "./logger.js";
|
|
5
5
|
export * from "./shared/types/index.js";
|
|
6
|
-
export { Accordion, Alert, AutoGrid, BarChart, Box, Button, ButtonRow, Card, Checkbox, CurrencyInput, DateInput, DescriptionList, DescriptionListItem, Divider, Dropdown, EmptyState, ErrorState, Flex, Form, Heading, Icon, Illustration, Image, Inline, Input, LineChart, Link, List, LoadingButton, LoadingSpinner, Modal, ModalBody, ModalFooter, MultiSelect, NumberInput, Panel, PanelBody, PanelFooter, PanelSection, ProgressBar, RadioButton, ScoreCircle, SearchInput, Select, Stack, Statistics, StatisticsItem, StatisticsTrend, StatusTag, StepIndicator, StepperInput, Tab, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, Tag, Text, TextArea, Textarea, Tile, TimeInput, Toggle, ToggleGroup, Tooltip, } from "./shared/remoteComponents.js";
|
|
6
|
+
export { Accordion, Alert, AutoGrid, BarChart, Box, Button, ButtonRow, Card, Checkbox, CurrencyInput, DateInput, DescriptionList, DescriptionListItem, Divider, Dropdown, EmptyState, ErrorState, Flex, Form, Heading, Icon, Illustration, Image, Inline, Input, LineChart, Link, List, LoadingButton, LoadingSpinner, Modal, ModalBody, ModalFooter, MultiSelect, NumberInput, Panel, PanelBody, PanelFooter, PanelSection, ProgressBar, RadioButton, ScoreCircle, SearchInput, Select, Spacer, Stack, Statistics, StatisticsItem, StatisticsTrend, StatusTag, StepIndicator, StepperInput, Tab, Table, TableBody, TableCell, TableFooter, TableHead, TableHeader, TableRow, Tabs, Tag, Text, TextArea, Textarea, Tile, TimeInput, Toggle, ToggleGroup, Tooltip, } from "./shared/remoteComponents.js";
|
|
7
7
|
export { useExtensionContext } from "./hooks/useExtensionContext.js";
|
|
8
8
|
export { useExtensionActions } from "./hooks/useExtensionActions.js";
|
|
9
9
|
export { useExtensionApi } from "./hooks/useExtensionApi.js";
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { RendererSpies } from '../testing/types.ts';
|
|
1
|
+
import type { RendererSpies } from '../testing/types.ts';
|
|
2
2
|
type AnyFunction = (...args: any[]) => any;
|
|
3
3
|
/**
|
|
4
4
|
* Creates a mock-aware hook function that can be used to mock the original hook function.
|
|
@@ -15,12 +15,12 @@ export declare const createMockAwareHook: <THookName extends keyof RendererSpies
|
|
|
15
15
|
*
|
|
16
16
|
* @returns The mocks object or null if not in a test environment.
|
|
17
17
|
*/
|
|
18
|
-
export declare function useMocksContext(): RendererSpies<"
|
|
18
|
+
export declare function useMocksContext(): RendererSpies<"crm.record.tab" | "crm.record.sidebar" | "crm.preview" | "helpdesk.sidebar" | "settings" | "home" | "uie.playground.middle"> | null;
|
|
19
19
|
/**
|
|
20
20
|
* A React component that provides the Mocks context that can be used to provide mocks to the mock-aware hook functions.
|
|
21
21
|
*
|
|
22
22
|
* @param children The children to render.
|
|
23
23
|
* @returns The children wrapped in the Mocks context provider.
|
|
24
24
|
*/
|
|
25
|
-
export declare const MocksContextProvider: import("react").Provider<RendererSpies<"
|
|
25
|
+
export declare const MocksContextProvider: import("react").Provider<RendererSpies<"crm.record.tab" | "crm.record.sidebar" | "crm.preview" | "helpdesk.sidebar" | "settings" | "home" | "uie.playground.middle"> | null>;
|
|
26
26
|
export {};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type * as experimentalTypes from './types/experimental.ts';
|
|
2
1
|
import type * as componentTypes from './types/components/index.ts';
|
|
3
|
-
import * as crmTypes from './types/crm.ts';
|
|
2
|
+
import type * as crmTypes from './types/crm.ts';
|
|
3
|
+
import type * as experimentalTypes from './types/experimental.ts';
|
|
4
|
+
import type * as pageComponentTypes from './types/pages/components/index.ts';
|
|
4
5
|
/**
|
|
5
6
|
* Represents a registry of HubSpot-provided React components that should only be used **internally** by the UI extension SDK.
|
|
6
7
|
*
|
|
@@ -59,6 +60,15 @@ export declare const DescriptionListItem: import("./types/shared.ts").HubSpotRea
|
|
|
59
60
|
* - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/divider Docs}
|
|
60
61
|
*/
|
|
61
62
|
export declare const Divider: import("./types/shared.ts").HubSpotReactComponent<componentTypes.DividerProps>;
|
|
63
|
+
/**
|
|
64
|
+
* The `Spacer` component renders vertical space between components. Use this component
|
|
65
|
+
* to add consistent spacing without using empty wrapper components.
|
|
66
|
+
*
|
|
67
|
+
* **Links:**
|
|
68
|
+
*
|
|
69
|
+
* - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/spacer Docs}
|
|
70
|
+
*/
|
|
71
|
+
export declare const Spacer: import("./types/shared.ts").HubSpotReactComponent<componentTypes.SpacerProps>;
|
|
62
72
|
/**
|
|
63
73
|
* The `EmptyState` component sets the content that appears when the extension is in an empty state. Use this component when there's no content or data to help guide users.
|
|
64
74
|
*
|
|
@@ -616,6 +626,7 @@ export declare const PrimaryHeaderActionButton: import("./types/shared.ts").HubS
|
|
|
616
626
|
*
|
|
617
627
|
*/
|
|
618
628
|
export declare const SecondaryHeaderActionButton: import("./types/shared.ts").HubSpotReactComponent<componentTypes.HeaderActionButtonProps>;
|
|
629
|
+
export declare const PageLink: import("./types/shared.ts").HubSpotReactComponent<pageComponentTypes.PageLinkProps>;
|
|
619
630
|
/**
|
|
620
631
|
* @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.
|
|
621
632
|
*/
|
|
@@ -63,6 +63,15 @@ export const DescriptionListItem = createAndRegisterRemoteReactComponent('Descri
|
|
|
63
63
|
* - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/divider Docs}
|
|
64
64
|
*/
|
|
65
65
|
export const Divider = createAndRegisterRemoteReactComponent('Divider');
|
|
66
|
+
/**
|
|
67
|
+
* The `Spacer` component renders vertical space between components. Use this component
|
|
68
|
+
* to add consistent spacing without using empty wrapper components.
|
|
69
|
+
*
|
|
70
|
+
* **Links:**
|
|
71
|
+
*
|
|
72
|
+
* - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/spacer Docs}
|
|
73
|
+
*/
|
|
74
|
+
export const Spacer = createAndRegisterRemoteReactComponent('Spacer');
|
|
66
75
|
/**
|
|
67
76
|
* The `EmptyState` component sets the content that appears when the extension is in an empty state. Use this component when there's no content or data to help guide users.
|
|
68
77
|
*
|
|
@@ -637,6 +646,10 @@ export const SecondaryHeaderActionButton = createAndRegisterRemoteReactComponent
|
|
|
637
646
|
fragmentProps: ['overlay'],
|
|
638
647
|
});
|
|
639
648
|
////////////////////////////////////////////////////////
|
|
649
|
+
// APP PAGE COMPONENTS
|
|
650
|
+
////////////////////////////////////////////////////////
|
|
651
|
+
export const PageLink = createAndRegisterRemoteReactComponent('PageLink');
|
|
652
|
+
////////////////////////////////////////////////////////
|
|
640
653
|
// EXPERIMENTAL COMPONENTS
|
|
641
654
|
////////////////////////////////////////////////////////
|
|
642
655
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { BaseComponentProps, TShirtSizes } from '../shared.ts';
|
|
3
3
|
/**
|
|
4
|
-
* The props type for
|
|
4
|
+
* The props type for [Accordion](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/accordion).
|
|
5
5
|
*
|
|
6
6
|
* @category Component Props
|
|
7
7
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { BaseComponentProps } from '../shared.ts';
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { BaseComponentProps } from '../shared.ts';
|
|
3
3
|
/**
|
|
4
|
-
* The props type for
|
|
4
|
+
* The props type for [Alert](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/alert).
|
|
5
5
|
*
|
|
6
6
|
* @category Component Props
|
|
7
7
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { ReactionsHandler } from '../reactions.ts';
|
|
3
|
-
import {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ReactionsHandler } from '../reactions.ts';
|
|
3
|
+
import type { BaseComponentProps, ExtensionEvent, HrefProp, OverlayComponentProps } from '../shared.ts';
|
|
4
4
|
/**
|
|
5
|
-
* The props type for
|
|
5
|
+
* The props type for [HeaderActions](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/create-an-app-home-page#headeractions).
|
|
6
6
|
*
|
|
7
7
|
* @category Component Props
|
|
8
8
|
*/
|
|
@@ -13,7 +13,7 @@ export interface HeaderActionsProps extends BaseComponentProps {
|
|
|
13
13
|
children: ReactNode;
|
|
14
14
|
}
|
|
15
15
|
/**
|
|
16
|
-
* The props type for
|
|
16
|
+
* The props type for [HeaderActions](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/create-an-app-home-page#headeractions).
|
|
17
17
|
*
|
|
18
18
|
* @category Component Props
|
|
19
19
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { BaseComponentProps, TShirtSizes } from '../shared.ts';
|
|
3
3
|
/**
|
|
4
|
-
* The props type for
|
|
4
|
+
* The props type for [ButtonRow](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/button-row).
|
|
5
5
|
*
|
|
6
6
|
* @category Component Props
|
|
7
7
|
*/
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ReactionsHandler } from '../reactions.ts';
|
|
3
|
+
import type { BaseComponentProps, ExtensionEvent, HrefProp, IconNames, OverlayComponentProps, TShirtSizes } from '../shared.ts';
|
|
4
4
|
export interface BaseButtonProps extends BaseComponentProps {
|
|
5
5
|
/**
|
|
6
|
-
* A function that will be invoked when the button is clicked. It receives
|
|
6
|
+
* A function that will be invoked when the button is clicked. It receives an event object and a reactions object
|
|
7
|
+
* with methods to control overlays. Its return value is ignored.
|
|
7
8
|
*
|
|
8
9
|
* @event
|
|
9
10
|
*/
|
|
@@ -52,7 +53,7 @@ export interface BaseButtonProps extends BaseComponentProps {
|
|
|
52
53
|
truncate?: boolean;
|
|
53
54
|
}
|
|
54
55
|
/**
|
|
55
|
-
* The props type for
|
|
56
|
+
* The props type for [Button](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/button).
|
|
56
57
|
*
|
|
57
58
|
* @category Component Props
|
|
58
59
|
*/
|
|
@@ -71,7 +72,7 @@ export interface LoadingButtonOverlayOptions {
|
|
|
71
72
|
openBehavior?: 'onClick' | 'onLoadingFinish';
|
|
72
73
|
}
|
|
73
74
|
/**
|
|
74
|
-
* The props type for
|
|
75
|
+
* The props type for [LoadingButton](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/loading-button).
|
|
75
76
|
*
|
|
76
77
|
* @category Component Props
|
|
77
78
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseComponentProps } from '../shared.ts';
|
|
1
|
+
import type { BaseComponentProps } from '../shared.ts';
|
|
2
2
|
export interface ChartProps extends BaseComponentProps {
|
|
3
3
|
/**
|
|
4
4
|
* An object containing the chart's data in an array.
|
|
@@ -24,7 +24,7 @@ export interface ChartProps extends BaseComponentProps {
|
|
|
24
24
|
options?: ChartOptions;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
* The props type for
|
|
27
|
+
* The props type for [BarChart](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/charts/bar-chart).
|
|
28
28
|
*
|
|
29
29
|
* @category Component Props
|
|
30
30
|
*/
|
|
@@ -57,7 +57,7 @@ export interface BarChartProps extends ChartProps {
|
|
|
57
57
|
axes: ChartAxisPair;
|
|
58
58
|
}
|
|
59
59
|
/**
|
|
60
|
-
* The props type for
|
|
60
|
+
* The props type for [LineChart](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/charts/line-chart).
|
|
61
61
|
*
|
|
62
62
|
* @category Component Props
|
|
63
63
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { BaseComponentProps } from '../shared.ts';
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { BaseComponentProps } from '../shared.ts';
|
|
3
3
|
/**
|
|
4
|
-
* The props type for
|
|
4
|
+
* The props type for [DescriptionListItem](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/description-list).
|
|
5
5
|
*
|
|
6
6
|
* @category Component Props
|
|
7
7
|
*/
|
|
@@ -18,13 +18,13 @@ export interface DescriptionListItemProps extends BaseComponentProps {
|
|
|
18
18
|
label: string;
|
|
19
19
|
}
|
|
20
20
|
/**
|
|
21
|
-
* The props type for
|
|
21
|
+
* The props type for [DescriptionList](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/description-list).
|
|
22
22
|
*
|
|
23
23
|
* @category Component Props
|
|
24
24
|
*/
|
|
25
25
|
export interface DescriptionListProps extends BaseComponentProps {
|
|
26
26
|
/**
|
|
27
|
-
* Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components. The children should be
|
|
27
|
+
* Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components. The children should be [DescriptionListItem](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/description-list).
|
|
28
28
|
*
|
|
29
29
|
*/
|
|
30
30
|
children: ReactNode;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { AllDistances, BaseComponentProps } from '../shared.ts';
|
|
1
|
+
import type { AllDistances, BaseComponentProps } from '../shared.ts';
|
|
2
2
|
/**
|
|
3
|
-
* The props type for
|
|
3
|
+
* The props type for [Divider](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/divider).
|
|
4
4
|
*
|
|
5
5
|
* @category Component Props
|
|
6
6
|
*/
|
|
@@ -10,5 +10,9 @@ export interface DividerProps extends BaseComponentProps {
|
|
|
10
10
|
*
|
|
11
11
|
* @defaultValue `"small"`
|
|
12
12
|
*/
|
|
13
|
+
size?: AllDistances;
|
|
14
|
+
/**
|
|
15
|
+
* @deprecated Use `size` instead.
|
|
16
|
+
*/
|
|
13
17
|
distance?: AllDistances;
|
|
14
18
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import { ExtensionEvent, OverlayComponentProps } from '../shared.ts';
|
|
4
|
-
import { ReactionsHandler } from '../reactions.ts';
|
|
2
|
+
import type { ReactionsHandler } from '../reactions.ts';
|
|
3
|
+
import type { BaseComponentProps, ExtensionEvent, OverlayComponentProps, TShirtSizes } from '../shared.ts';
|
|
5
4
|
/**
|
|
6
5
|
* @deprecated This type is deprecated and will be removed in a future release. Please use the `DropdownButtonItem` component instead.
|
|
7
6
|
*/
|
|
@@ -20,7 +19,7 @@ export interface DropdownOption {
|
|
|
20
19
|
onClick?: () => void;
|
|
21
20
|
}
|
|
22
21
|
/**
|
|
23
|
-
* The props type for
|
|
22
|
+
* The props type for [DropdownButtonItem](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/dropdown).
|
|
24
23
|
*
|
|
25
24
|
* @category Component Props
|
|
26
25
|
*/
|
|
@@ -38,7 +37,7 @@ export interface DropdownButtonItemProps extends OverlayComponentProps, BaseComp
|
|
|
38
37
|
onClick?: ReactionsHandler<ExtensionEvent>;
|
|
39
38
|
}
|
|
40
39
|
/**
|
|
41
|
-
* The props type for
|
|
40
|
+
* The props type for [Dropdown](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/dropdown).
|
|
42
41
|
*
|
|
43
42
|
* @category Component Props
|
|
44
43
|
*/
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { BaseComponentProps } from '../shared.ts';
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { BaseComponentProps } from '../shared.ts';
|
|
3
3
|
export type EmptyStateImageName = 'addOnReporting' | 'announcement' | 'api' | 'automatedTesting' | 'beta' | 'building' | 'callingSetUp' | 'companies' | 'components' | 'cone' | 'contacts' | 'contentStrategy' | 'customObjects' | 'customerExperience' | 'customerSupport' | 'deals' | 'developerSecurityUpdate' | 'electronicSignature' | 'electronicSignatureEmptyState' | 'emailConfirmation' | 'emptyStateCharts' | 'idea' | 'integrations' | 'leads' | 'lock' | 'meetings' | 'missedGoal' | 'multipleObjects' | 'object' | 'productsShoppingCart' | 'registration' | 'sandboxAddOn' | 'social' | 'store' | 'storeDisabled' | 'successfullyConnectedEmail' | 'target' | 'task' | 'tickets' | 'voteAndSearch';
|
|
4
4
|
/**
|
|
5
|
-
* The props type for
|
|
5
|
+
* The props type for [EmptyState](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/empty-state).
|
|
6
6
|
*
|
|
7
7
|
* @category Component Props
|
|
8
8
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { BaseComponentProps } from '../shared.ts';
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { BaseComponentProps } from '../shared.ts';
|
|
3
3
|
/**
|
|
4
|
-
* The props type for
|
|
4
|
+
* The props type for [ErrorState](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/error-state).
|
|
5
5
|
*
|
|
6
6
|
* @category Component Props
|
|
7
7
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { ReactionsHandler } from '../reactions.ts';
|
|
3
|
+
import type { BaseComponentProps, FormSubmitExtensionEvent } from '../shared.ts';
|
|
4
4
|
export type FormInputValues = Record<string, string | number>;
|
|
5
5
|
/**
|
|
6
|
-
* The props type for
|
|
6
|
+
* The props type for [Form](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/form).
|
|
7
7
|
*
|
|
8
8
|
* @category Component Props
|
|
9
9
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { BaseComponentProps } from '../shared.ts';
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { BaseComponentProps } from '../shared.ts';
|
|
3
3
|
/**
|
|
4
|
-
* The props type for
|
|
4
|
+
* The props type for [Heading](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/heading).
|
|
5
5
|
*
|
|
6
6
|
* @category Component Props
|
|
7
7
|
*/
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { BaseComponentProps, IconNames, TShirtSizes } from '../shared.ts';
|
|
2
2
|
export type IconColor = 'alert' | 'warning' | 'success' | 'inherit';
|
|
3
3
|
/**
|
|
4
|
-
* The props type for
|
|
4
|
+
* The props type for [Icon](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/icon).
|
|
5
5
|
*
|
|
6
6
|
* @category Component Props
|
|
7
7
|
*/
|
|
8
8
|
export interface IconProps extends BaseComponentProps {
|
|
9
9
|
/**
|
|
10
|
-
* The color of the icon.
|
|
10
|
+
* The color of the icon. See the [colors section](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/icon#colors) for details.
|
|
11
11
|
*
|
|
12
12
|
* @defaultValue `"inherit"`
|
|
13
13
|
*/
|
|
14
14
|
color?: IconColor;
|
|
15
15
|
/**
|
|
16
|
-
* Sets the icon to display.
|
|
16
|
+
* Sets the icon to display. See [all available icons](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/icon#available-icons).
|
|
17
17
|
*/
|
|
18
18
|
name: IconNames;
|
|
19
19
|
/**
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { BaseComponentProps } from '../shared.ts';
|
|
1
|
+
import type { BaseComponentProps } from '../shared.ts';
|
|
2
2
|
/**
|
|
3
|
-
* The props type for
|
|
3
|
+
* The props type for [Illustration](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/illustration).
|
|
4
4
|
*
|
|
5
5
|
* @category Component Props
|
|
6
6
|
*/
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ReactionsHandler } from '../reactions.ts';
|
|
2
|
+
import type { BaseComponentProps, ExtensionEvent, HrefProp, OverlayComponentProps } from '../shared.ts';
|
|
3
3
|
/**
|
|
4
|
-
* The props type for
|
|
4
|
+
* The props type for [Image](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/image).
|
|
5
5
|
*
|
|
6
6
|
* @category Component Props
|
|
7
7
|
*/
|
|
@@ -22,7 +22,8 @@ export interface ImageProps extends OverlayComponentProps, BaseComponentProps {
|
|
|
22
22
|
*/
|
|
23
23
|
href?: HrefProp;
|
|
24
24
|
/**
|
|
25
|
-
* A function that will be
|
|
25
|
+
* A function that will be invoked when the button is clicked. It receives an event object and a reactions object
|
|
26
|
+
* with methods to control overlays. Its return value is ignored.
|
|
26
27
|
*
|
|
27
28
|
* @event
|
|
28
29
|
*/
|
|
@@ -26,6 +26,7 @@ export type * from './panel.ts';
|
|
|
26
26
|
export type * from './progress-bar.ts';
|
|
27
27
|
export type * from './score.ts';
|
|
28
28
|
export type * from './selects.ts';
|
|
29
|
+
export type * from './spacer.ts';
|
|
29
30
|
export type * from './statistics.ts';
|
|
30
31
|
export type * from './status-tag.ts';
|
|
31
32
|
export type * from './step-indicator.ts';
|