@hubspot/ui-extensions 0.12.2 → 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/internal/global-utils.d.ts +1 -1
- package/dist/internal/hook-utils.d.ts +3 -3
- package/dist/shared/remoteComponents.d.ts +4 -2
- package/dist/shared/remoteComponents.js +4 -0
- package/dist/shared/types/components/accordion.d.ts +2 -2
- package/dist/shared/types/components/alert.d.ts +2 -2
- package/dist/shared/types/components/app-home-header-actions.d.ts +3 -3
- package/dist/shared/types/components/button-row.d.ts +2 -2
- package/dist/shared/types/components/button.d.ts +3 -3
- package/dist/shared/types/components/card.d.ts +2 -2
- package/dist/shared/types/components/chart.d.ts +1 -1
- package/dist/shared/types/components/description-list.d.ts +2 -2
- package/dist/shared/types/components/divider.d.ts +1 -1
- package/dist/shared/types/components/dropdown.d.ts +2 -3
- package/dist/shared/types/components/empty-state.d.ts +2 -2
- package/dist/shared/types/components/error-state.d.ts +2 -2
- package/dist/shared/types/components/form.d.ts +3 -3
- package/dist/shared/types/components/heading.d.ts +2 -2
- package/dist/shared/types/components/icon.d.ts +3 -3
- package/dist/shared/types/components/iframe.d.ts +1 -1
- package/dist/shared/types/components/illustration.d.ts +1 -1
- package/dist/shared/types/components/image.d.ts +2 -2
- package/dist/shared/types/components/inputs.d.ts +1 -1
- package/dist/shared/types/components/layouts.d.ts +2 -2
- package/dist/shared/types/components/link.d.ts +3 -3
- package/dist/shared/types/components/list.d.ts +2 -2
- package/dist/shared/types/components/loading-spinner.d.ts +1 -1
- 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 +1 -1
- package/dist/shared/types/components/score.d.ts +2 -2
- package/dist/shared/types/components/selects.d.ts +1 -1
- package/dist/shared/types/components/spacer.d.ts +1 -1
- package/dist/shared/types/components/statistics.d.ts +2 -2
- package/dist/shared/types/components/status-tag.d.ts +2 -2
- package/dist/shared/types/components/step-indicator.d.ts +1 -1
- package/dist/shared/types/components/table.d.ts +2 -2
- package/dist/shared/types/components/tabs.d.ts +2 -2
- package/dist/shared/types/components/tag.d.ts +3 -3
- package/dist/shared/types/components/text.d.ts +2 -2
- package/dist/shared/types/components/tile.d.ts +2 -2
- package/dist/shared/types/components/toggle.d.ts +1 -1
- package/dist/shared/types/components/toggleInputs.d.ts +1 -1
- package/dist/shared/types/components/tooltip.d.ts +2 -2
- package/dist/shared/types/crm.d.ts +2 -2
- 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 +15 -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 +31 -23
|
@@ -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
|
@@ -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
|
*
|
|
@@ -625,6 +626,7 @@ export declare const PrimaryHeaderActionButton: import("./types/shared.ts").HubS
|
|
|
625
626
|
*
|
|
626
627
|
*/
|
|
627
628
|
export declare const SecondaryHeaderActionButton: import("./types/shared.ts").HubSpotReactComponent<componentTypes.HeaderActionButtonProps>;
|
|
629
|
+
export declare const PageLink: import("./types/shared.ts").HubSpotReactComponent<pageComponentTypes.PageLinkProps>;
|
|
628
630
|
/**
|
|
629
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.
|
|
630
632
|
*/
|
|
@@ -646,6 +646,10 @@ export const SecondaryHeaderActionButton = createAndRegisterRemoteReactComponent
|
|
|
646
646
|
fragmentProps: ['overlay'],
|
|
647
647
|
});
|
|
648
648
|
////////////////////////////////////////////////////////
|
|
649
|
+
// APP PAGE COMPONENTS
|
|
650
|
+
////////////////////////////////////////////////////////
|
|
651
|
+
export const PageLink = createAndRegisterRemoteReactComponent('PageLink');
|
|
652
|
+
////////////////////////////////////////////////////////
|
|
649
653
|
// EXPERIMENTAL COMPONENTS
|
|
650
654
|
////////////////////////////////////////////////////////
|
|
651
655
|
/**
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { BaseComponentProps, TShirtSizes } from '../shared.ts';
|
|
3
3
|
/**
|
|
4
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
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
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
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
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
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
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
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { BaseComponentProps, TShirtSizes } from '../shared.ts';
|
|
3
3
|
/**
|
|
4
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
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
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
6
|
* A function that will be invoked when the button is clicked. It receives an event object and a reactions object
|
|
@@ -1,5 +1,5 @@
|
|
|
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
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
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AllDistances, BaseComponentProps } from '../shared.ts';
|
|
1
|
+
import type { AllDistances, BaseComponentProps } from '../shared.ts';
|
|
2
2
|
/**
|
|
3
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
|
*
|
|
@@ -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
|
*/
|
|
@@ -1,5 +1,5 @@
|
|
|
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
5
|
* The props type for [EmptyState](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/empty-state).
|
|
@@ -1,5 +1,5 @@
|
|
|
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
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
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
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
6
|
* The props type for [Form](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/form).
|
|
@@ -1,5 +1,5 @@
|
|
|
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
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
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { BaseComponentProps, IconNames, TShirtSizes } from '../shared.ts';
|
|
2
2
|
export type IconColor = 'alert' | 'warning' | 'success' | 'inherit';
|
|
3
3
|
/**
|
|
4
4
|
* The props type for [Icon](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/icon).
|
|
@@ -7,13 +7,13 @@ export type IconColor = 'alert' | 'warning' | 'success' | 'inherit';
|
|
|
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,4 +1,4 @@
|
|
|
1
|
-
import { BaseComponentProps } from '../shared.ts';
|
|
1
|
+
import type { BaseComponentProps } from '../shared.ts';
|
|
2
2
|
/**
|
|
3
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
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
1
|
+
import type { ReactionsHandler } from '../reactions.ts';
|
|
2
|
+
import type { BaseComponentProps, ExtensionEvent, HrefProp, OverlayComponentProps } from '../shared.ts';
|
|
3
3
|
/**
|
|
4
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
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import { AllDistances, BaseComponentProps } from '../shared.ts';
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { AllDistances, BaseComponentProps } from '../shared.ts';
|
|
3
3
|
/**
|
|
4
4
|
* The props type for [Stack](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/flex).
|
|
5
5
|
*
|
|
@@ -1,6 +1,6 @@
|
|
|
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, OverlayComponentProps } from '../shared.ts';
|
|
4
4
|
/**
|
|
5
5
|
* The props type for [Link](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/link).
|
|
6
6
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
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
4
|
* The props type for [List](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/list).
|
|
5
5
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { BaseComponentProps, TShirtSizes } from '../shared.ts';
|
|
2
2
|
/**
|
|
3
3
|
* The props type for [LoadingSpinner](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/loading-spinner).
|
|
4
4
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { BaseComponentProps, TShirtSizes } from '../shared.ts';
|
|
3
3
|
export interface ModalProps extends BaseComponentProps {
|
|
4
4
|
/**
|
|
5
5
|
* The modal's accessibility label.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { BaseComponentProps, TShirtSizes } from '../shared.ts';
|
|
3
3
|
export interface PanelProps extends BaseComponentProps {
|
|
4
4
|
/**
|
|
5
5
|
* The panel's accessibility label.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseComponentProps } from '../shared.ts';
|
|
1
|
+
import type { BaseComponentProps } from '../shared.ts';
|
|
2
2
|
/**
|
|
3
3
|
* The props type for [ProgressBar](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/progress-bar).
|
|
4
4
|
*
|
|
@@ -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 [ScoreCircle](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/scorecircle)
|
|
4
4
|
*
|
|
5
5
|
* @category Component Props
|
|
6
6
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AllSizesUnaliased, BaseComponentProps } from '../shared.ts';
|
|
1
|
+
import type { AllSizesUnaliased, BaseComponentProps } from '../shared.ts';
|
|
2
2
|
/**
|
|
3
3
|
* The props type for [Spacer](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/spacer)
|
|
4
4
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
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
4
|
* The props type for [StatisticsTrend](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/statistics).
|
|
5
5
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
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
4
|
* The props type for [StatusTag](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/status-tag).
|
|
5
5
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AllSizes, BaseComponentProps } from '../shared.ts';
|
|
1
|
+
import type { AllSizes, BaseComponentProps } from '../shared.ts';
|
|
2
2
|
/**
|
|
3
3
|
* The props type for [StepIndicator](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/step-indicator).
|
|
4
4
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
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 interface AlignmentProps {
|
|
4
4
|
/**
|
|
5
5
|
* Sets the alignment of the table element.
|
|
@@ -1,5 +1,5 @@
|
|
|
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 interface TabsProps extends BaseComponentProps {
|
|
4
4
|
/**
|
|
5
5
|
* Sets the content that will render inside the component.
|
|
@@ -1,6 +1,6 @@
|
|
|
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, OverlayComponentProps } from '../shared.ts';
|
|
4
4
|
/**
|
|
5
5
|
* The props type for [Tag](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/tag).
|
|
6
6
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
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
4
|
* The props type for [Tile](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/tile).
|
|
5
5
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import type { BaseComponentProps, TShirtSizes } from '../shared.ts';
|
|
2
2
|
/**
|
|
3
3
|
* The props type for [Toggle](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/toggle).
|
|
4
4
|
*
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseComponentProps } from '../shared.ts';
|
|
1
|
+
import type { BaseComponentProps } from '../shared.ts';
|
|
2
2
|
/**
|
|
3
3
|
* The props type for [Checkbox](https://developers.hubspot.com/docs/apps/developer-platform/add-features/ui-extensibility/ui-components/standard-components/checkbox).
|
|
4
4
|
*
|
|
@@ -1,5 +1,5 @@
|
|
|
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 interface TooltipProps extends BaseComponentProps {
|
|
4
4
|
/**
|
|
5
5
|
* Sets the content to render on the screen, and serves as the trigger for the tooltip. This prop is passed implicitly by providing sub-components.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
1
|
+
import type { ReactNode } from 'react';
|
|
2
|
+
import type { BaseComponentProps, TShirtSizes } from './shared.ts';
|
|
3
3
|
export interface CrmDataHighlightProps extends BaseComponentProps {
|
|
4
4
|
/**
|
|
5
5
|
* The properties to display, up to four. By default, will display property data from the currently displaying record. To pull data from a specific record, include the `objectTypeId` and `objectId` props.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { ReactNode } from 'react';
|
|
2
2
|
import type { ReactionsHandler } from './reactions.ts';
|
|
3
|
-
import type { AllDistances,
|
|
3
|
+
import type { AllDistances, BaseComponentProps, ExtensionEvent } from './shared.ts';
|
|
4
4
|
/**
|
|
5
5
|
* @ignore
|
|
6
6
|
* @experimental do not use in production
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ReactElement } from 'react';
|
|
2
|
-
import { ExtensionPointApi, ExtensionPoints } from './extension-points.ts';
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
import type { ExtensionPointApi, ExtensionPoints } from './extension-points.ts';
|
|
3
3
|
export type RenderExtensionCallback<TExtensionPointName extends keyof ExtensionPoints> = (api: ExtensionPointApi<TExtensionPointName>) => ReactElement<any>;
|
|
4
4
|
export type HubspotExtendFunction = <TExtensionPointName extends keyof ExtensionPoints>(renderExtensionCallback: RenderExtensionCallback<TExtensionPointName>) => void;
|