@hubspot/ui-extensions 0.10.0 → 0.11.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{pages/home/components.d.ts → __synced__/appHomeRemoteComponents.synced.d.ts} +7 -7
- package/dist/{pages/home/components.js → __synced__/appHomeRemoteComponents.synced.js} +1 -0
- package/dist/{crm/components.d.ts → __synced__/crmRemoteComponents.synced.d.ts} +40 -41
- package/dist/__synced__/crmRemoteComponents.synced.js +15 -0
- package/dist/__synced__/experimental/types.synced.d.ts +241 -0
- package/dist/__synced__/experimental/types.synced.js +5 -0
- package/dist/__synced__/experimentalRemoteComponents.synced.d.ts +94 -0
- package/dist/__synced__/experimentalRemoteComponents.synced.js +56 -0
- package/dist/__synced__/remoteComponents.synced.d.ts +848 -0
- package/dist/__synced__/remoteComponents.synced.js +583 -0
- package/dist/__synced__/types/actions.synced.d.ts +57 -0
- package/dist/__synced__/types/actions.synced.js +1 -0
- package/dist/__synced__/types/components/accordion.synced.d.ts +48 -0
- package/dist/__synced__/types/components/accordion.synced.js +1 -0
- package/dist/__synced__/types/components/alert.synced.d.ts +24 -0
- package/dist/__synced__/types/components/alert.synced.js +1 -0
- package/dist/__synced__/types/components/app-home-header-actions.synced.d.ts +39 -0
- package/dist/__synced__/types/components/app-home-header-actions.synced.js +1 -0
- package/dist/__synced__/types/components/button-row.synced.d.ts +44 -0
- package/dist/__synced__/types/components/button-row.synced.js +1 -0
- package/dist/__synced__/types/components/button.synced.d.ts +89 -0
- package/dist/__synced__/types/components/button.synced.js +1 -0
- package/dist/__synced__/types/components/card.synced.d.ts +12 -0
- package/dist/__synced__/types/components/card.synced.js +1 -0
- package/dist/__synced__/types/components/chart.synced.d.ts +137 -0
- package/dist/__synced__/types/components/chart.synced.js +5 -0
- package/dist/__synced__/types/components/description-list.synced.d.ts +36 -0
- package/dist/__synced__/types/components/description-list.synced.js +1 -0
- package/dist/__synced__/types/components/divider.synced.d.ts +14 -0
- package/dist/__synced__/types/components/divider.synced.js +1 -0
- package/dist/__synced__/types/components/dropdown.synced.d.ts +84 -0
- package/dist/__synced__/types/components/dropdown.synced.js +1 -0
- package/dist/__synced__/types/components/empty-state.synced.d.ts +51 -0
- package/dist/__synced__/types/components/empty-state.synced.js +1 -0
- package/dist/__synced__/types/components/error-state.synced.d.ts +24 -0
- package/dist/__synced__/types/components/error-state.synced.js +1 -0
- package/dist/__synced__/types/components/form.synced.d.ts +29 -0
- package/dist/__synced__/types/components/form.synced.js +1 -0
- package/dist/__synced__/types/components/heading.synced.d.ts +19 -0
- package/dist/__synced__/types/components/heading.synced.js +1 -0
- package/dist/__synced__/types/components/icon.synced.d.ts +29 -0
- package/dist/__synced__/types/components/icon.synced.js +1 -0
- package/dist/__synced__/types/components/iframe.synced.d.ts +20 -0
- package/dist/__synced__/types/components/iframe.synced.js +1 -0
- package/dist/__synced__/types/components/illustration.synced.d.ts +53 -0
- package/dist/__synced__/types/components/illustration.synced.js +43 -0
- package/dist/__synced__/types/components/image.synced.d.ts +40 -0
- package/dist/__synced__/types/components/image.synced.js +1 -0
- package/dist/__synced__/types/components/index.synced.d.ts +38 -0
- package/dist/__synced__/types/components/index.synced.js +1 -0
- package/dist/__synced__/types/components/inputs.synced.d.ts +350 -0
- package/dist/__synced__/types/components/inputs.synced.js +1 -0
- package/dist/__synced__/types/components/layouts.synced.d.ts +172 -0
- package/dist/__synced__/types/components/layouts.synced.js +1 -0
- package/dist/__synced__/types/components/link.synced.d.ts +38 -0
- package/dist/__synced__/types/components/link.synced.js +1 -0
- package/dist/__synced__/types/components/list.synced.d.ts +18 -0
- package/dist/__synced__/types/components/list.synced.js +1 -0
- package/dist/__synced__/types/components/loading-spinner.synced.d.ts +31 -0
- package/dist/__synced__/types/components/loading-spinner.synced.js +1 -0
- package/dist/__synced__/types/components/modal.synced.d.ts +60 -0
- package/dist/__synced__/types/components/modal.synced.js +1 -0
- package/dist/__synced__/types/components/panel.synced.d.ts +73 -0
- package/dist/__synced__/types/components/panel.synced.js +1 -0
- package/dist/__synced__/types/components/progress-bar.synced.d.ts +48 -0
- package/dist/__synced__/types/components/progress-bar.synced.js +1 -0
- package/dist/__synced__/types/components/selects.synced.d.ts +130 -0
- package/dist/__synced__/types/components/selects.synced.js +1 -0
- package/dist/__synced__/types/components/statistics.synced.d.ts +56 -0
- package/dist/__synced__/types/components/statistics.synced.js +1 -0
- package/dist/__synced__/types/components/status-tag.synced.d.ts +42 -0
- package/dist/__synced__/types/components/status-tag.synced.js +1 -0
- package/dist/__synced__/types/components/step-indicator.synced.d.ts +44 -0
- package/dist/__synced__/types/components/step-indicator.synced.js +1 -0
- package/dist/__synced__/types/components/table.synced.d.ts +138 -0
- package/dist/__synced__/types/components/table.synced.js +1 -0
- package/dist/__synced__/types/components/tabs.synced.d.ts +55 -0
- package/dist/__synced__/types/components/tabs.synced.js +1 -0
- package/dist/__synced__/types/components/tag.synced.d.ts +32 -0
- package/dist/__synced__/types/components/tag.synced.js +1 -0
- package/dist/__synced__/types/components/text.synced.d.ts +93 -0
- package/dist/__synced__/types/components/text.synced.js +1 -0
- package/dist/__synced__/types/components/tile.synced.d.ts +24 -0
- package/dist/__synced__/types/components/tile.synced.js +1 -0
- package/dist/__synced__/types/components/toggle.synced.d.ts +60 -0
- package/dist/__synced__/types/components/toggle.synced.js +1 -0
- package/dist/__synced__/types/components/toggleInputs.synced.d.ts +191 -0
- package/dist/__synced__/types/components/toggleInputs.synced.js +1 -0
- package/dist/__synced__/types/components/tooltip.synced.d.ts +12 -0
- package/dist/__synced__/types/components/tooltip.synced.js +1 -0
- package/dist/__synced__/types/context.synced.d.ts +82 -0
- package/dist/__synced__/types/context.synced.js +1 -0
- package/dist/__synced__/types/crm.synced.d.ts +248 -0
- package/dist/__synced__/types/crm.synced.js +1 -0
- package/dist/__synced__/types/extension-points.synced.d.ts +122 -0
- package/dist/__synced__/types/extension-points.synced.js +9 -0
- package/dist/__synced__/types/http-requests.synced.d.ts +106 -0
- package/dist/__synced__/types/http-requests.synced.js +8 -0
- package/dist/__synced__/types/index.synced.d.ts +8 -0
- package/dist/__synced__/types/index.synced.js +9 -0
- package/dist/__synced__/types/reactions.synced.d.ts +12 -0
- package/dist/__synced__/types/reactions.synced.js +1 -0
- package/dist/__synced__/types/shared.synced.d.ts +197 -0
- package/dist/__synced__/types/shared.synced.js +179 -0
- package/dist/coreComponents.d.ts +21 -5
- package/dist/coreComponents.js +23 -1
- package/dist/crm/hooks/useAssociations.d.ts +3 -0
- package/dist/crm/hooks/useAssociations.js +3 -5
- package/dist/crm/hooks/useCrmProperties.d.ts +0 -2
- package/dist/crm/hooks/useCrmProperties.js +0 -7
- package/dist/crm/index.d.ts +2 -2
- package/dist/crm/index.js +1 -2
- package/dist/experimental/index.d.ts +2 -79
- package/dist/experimental/index.js +1 -36
- package/dist/experimental/testing/internal/types-internal.d.ts +47 -0
- package/dist/experimental/testing/internal/types-internal.js +1 -0
- package/dist/experimental/testing/type-utils.d.ts +29 -0
- package/dist/experimental/testing/type-utils.js +37 -0
- package/dist/experimental/testing/types.d.ts +240 -0
- package/dist/experimental/testing/types.js +10 -0
- package/dist/experimental/types.d.ts +4 -9
- package/dist/pages/home/index.d.ts +1 -0
- package/dist/pages/home/index.js +1 -0
- package/dist/types.d.ts +90 -4
- package/dist/types.js +0 -3
- package/package.json +4 -7
- package/dist/crm/components.js +0 -15
- package/dist/experimental/testing/index.d.ts +0 -14
- package/dist/experimental/testing/index.js +0 -33
- package/dist/experimental/testing/jest/matchers/index.d.ts +0 -6
- package/dist/experimental/testing/jest/matchers/index.js +0 -6
- package/dist/utils/createExtensionComponent.d.ts +0 -3
- package/dist/utils/createExtensionComponent.js +0 -4
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
import type { ExtensionPoints } from './extension-points.synced';
|
|
2
|
+
export interface HubSpotFetchOptions {
|
|
3
|
+
method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
|
|
4
|
+
timeout?: number;
|
|
5
|
+
body?: {
|
|
6
|
+
[key: string]: unknown;
|
|
7
|
+
};
|
|
8
|
+
headers?: Headers | Record<string, string>;
|
|
9
|
+
}
|
|
10
|
+
export type HubSpotFetchRequestURI = string | URL;
|
|
11
|
+
export type ProxyMetadata = {
|
|
12
|
+
userEmail?: string;
|
|
13
|
+
userId?: number;
|
|
14
|
+
portalId?: number;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* @category Serverless
|
|
18
|
+
*/
|
|
19
|
+
export interface ServerlessRunnerParams {
|
|
20
|
+
/**
|
|
21
|
+
* Name of the serverless function
|
|
22
|
+
*/
|
|
23
|
+
name: string;
|
|
24
|
+
/**
|
|
25
|
+
* Names of CRM object properties to be retrieved and supplied to the function as `context.propertiesToSend`
|
|
26
|
+
*/
|
|
27
|
+
propertiesToSend?: string[];
|
|
28
|
+
/**
|
|
29
|
+
* Additional parameters to be supplied to the function as `context.parameters`
|
|
30
|
+
*/
|
|
31
|
+
parameters?: JsonValue;
|
|
32
|
+
/**
|
|
33
|
+
* @deprecated Optional payload supplied to the function as `context.event.payload`.
|
|
34
|
+
* Support for this param may be removed in the future. Use `parameters` instead.
|
|
35
|
+
*/
|
|
36
|
+
payload?: JsonValue;
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* @category Serverless
|
|
40
|
+
*/
|
|
41
|
+
export declare enum ServerlessExecutionStatus {
|
|
42
|
+
Success = "SUCCESS",
|
|
43
|
+
Error = "ERROR"
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* @category Serverless
|
|
47
|
+
*/
|
|
48
|
+
export type ServerlessExecutionResult = {
|
|
49
|
+
status: ServerlessExecutionStatus.Success;
|
|
50
|
+
response: JsonValue;
|
|
51
|
+
} | {
|
|
52
|
+
status: ServerlessExecutionStatus.Error;
|
|
53
|
+
message: string;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* @category Serverless
|
|
57
|
+
*/
|
|
58
|
+
export type ServerlessFuncRunner = (params: ServerlessRunnerParams) => Promise<ServerlessExecutionResult>;
|
|
59
|
+
/**
|
|
60
|
+
* @ignore
|
|
61
|
+
* @category Serverless
|
|
62
|
+
*/
|
|
63
|
+
export interface ServerlessExecutionRequest {
|
|
64
|
+
appId: number;
|
|
65
|
+
extensibleCardId: number;
|
|
66
|
+
serverlessFunction: string;
|
|
67
|
+
location: keyof ExtensionPoints;
|
|
68
|
+
objectQuery?: {
|
|
69
|
+
objectId: number;
|
|
70
|
+
objectTypeId: string;
|
|
71
|
+
objectPropertyNames: string[];
|
|
72
|
+
};
|
|
73
|
+
parameters?: JsonValue;
|
|
74
|
+
event?: {
|
|
75
|
+
type: 'SERVERLESS_ACTION_HOOK';
|
|
76
|
+
payload: JsonValue;
|
|
77
|
+
};
|
|
78
|
+
objectId?: number;
|
|
79
|
+
objectTypeId?: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* @category Serverless
|
|
83
|
+
*/
|
|
84
|
+
export interface ServerlessExecutionResponse {
|
|
85
|
+
logId: string;
|
|
86
|
+
response?: JsonValue;
|
|
87
|
+
}
|
|
88
|
+
/**
|
|
89
|
+
* @category Serverless
|
|
90
|
+
*/
|
|
91
|
+
export interface ServerlessErrorResponse {
|
|
92
|
+
responseJSON?: {
|
|
93
|
+
message: string;
|
|
94
|
+
correlationId: string;
|
|
95
|
+
category: string;
|
|
96
|
+
subCategory?: string;
|
|
97
|
+
errors?: {
|
|
98
|
+
message: string;
|
|
99
|
+
subCategory: string;
|
|
100
|
+
}[];
|
|
101
|
+
};
|
|
102
|
+
status: number;
|
|
103
|
+
}
|
|
104
|
+
export type JsonValue = string | number | boolean | null | JsonValue[] | {
|
|
105
|
+
[key: string]: JsonValue;
|
|
106
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @category Serverless
|
|
3
|
+
*/
|
|
4
|
+
export var ServerlessExecutionStatus;
|
|
5
|
+
(function (ServerlessExecutionStatus) {
|
|
6
|
+
ServerlessExecutionStatus["Success"] = "SUCCESS";
|
|
7
|
+
ServerlessExecutionStatus["Error"] = "ERROR";
|
|
8
|
+
})(ServerlessExecutionStatus || (ServerlessExecutionStatus = {}));
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './components/index.synced';
|
|
2
|
+
export * from './actions.synced';
|
|
3
|
+
export * from './context.synced';
|
|
4
|
+
export * from './crm.synced';
|
|
5
|
+
export * from './extension-points.synced';
|
|
6
|
+
export * from './http-requests.synced';
|
|
7
|
+
export * from './reactions.synced';
|
|
8
|
+
export * from './shared.synced';
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
// Do not manually update this file, changes will be autogenerated by our scripts based on: ui-extensions-remote-renderer/static/js/types/index.ts
|
|
2
|
+
export * from './components/index.synced';
|
|
3
|
+
export * from './actions.synced';
|
|
4
|
+
export * from './context.synced';
|
|
5
|
+
export * from './crm.synced';
|
|
6
|
+
export * from './extension-points.synced';
|
|
7
|
+
export * from './http-requests.synced';
|
|
8
|
+
export * from './reactions.synced';
|
|
9
|
+
export * from './shared.synced';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/** @ignore */
|
|
2
|
+
export type PanelAction = (panelId: string) => void;
|
|
3
|
+
/** @ignore */
|
|
4
|
+
export type ModalAction = (modalId: string) => void;
|
|
5
|
+
/** @ignore */
|
|
6
|
+
export interface Reactions {
|
|
7
|
+
openPanel: PanelAction;
|
|
8
|
+
closePanel: PanelAction;
|
|
9
|
+
openModal: ModalAction;
|
|
10
|
+
closeModal: ModalAction;
|
|
11
|
+
}
|
|
12
|
+
export type ReactionsHandler<T> = (event: T, reactions: Reactions) => void | Promise<void>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,197 @@
|
|
|
1
|
+
import { RemoteFragment } from '@remote-ui/core';
|
|
2
|
+
import type { ReactElement, ComponentType } from 'react';
|
|
3
|
+
export type UnknownComponentProps = Record<string, any>;
|
|
4
|
+
/**
|
|
5
|
+
* Represents a HubSpot-provided React component.
|
|
6
|
+
*/
|
|
7
|
+
export type HubSpotReactComponent<TProps extends UnknownComponentProps = UnknownComponentProps> = ComponentType<TProps>;
|
|
8
|
+
/**
|
|
9
|
+
* Represents a fragment property for a HubSpot-provided React component that accepts a React.ReactElement, string, or null.
|
|
10
|
+
* NOTE: UI extension components do _not_ support arrays as a fragment property values.
|
|
11
|
+
*/
|
|
12
|
+
export type HubSpotReactFragmentProp = ReactElement | string | null;
|
|
13
|
+
export declare class ExtensionEvent {
|
|
14
|
+
type: string;
|
|
15
|
+
bubbles: boolean;
|
|
16
|
+
timeStamp: number;
|
|
17
|
+
id: string;
|
|
18
|
+
constructor(event: Event);
|
|
19
|
+
}
|
|
20
|
+
export declare class FormSubmitExtensionEvent<V> extends ExtensionEvent {
|
|
21
|
+
targetValue: V;
|
|
22
|
+
constructor(value: V, event: Event);
|
|
23
|
+
}
|
|
24
|
+
export type OverlayComponentProps = {
|
|
25
|
+
overlay?: RemoteFragment;
|
|
26
|
+
};
|
|
27
|
+
export type HrefOptions = {
|
|
28
|
+
url: string;
|
|
29
|
+
external?: boolean;
|
|
30
|
+
};
|
|
31
|
+
export type HrefProp = string | HrefOptions;
|
|
32
|
+
export interface TShirtSizes {
|
|
33
|
+
xs: 'extra-small' | 'xs';
|
|
34
|
+
sm: 'small' | 'sm';
|
|
35
|
+
md: 'medium' | 'md';
|
|
36
|
+
lg: 'large' | 'lg';
|
|
37
|
+
xl: 'extra-large' | 'xl';
|
|
38
|
+
}
|
|
39
|
+
export type AllSizes = TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'] | TShirtSizes['lg'] | TShirtSizes['xl'];
|
|
40
|
+
export type AllDistances = 'flush' | AllSizes;
|
|
41
|
+
export declare const iconNames: {
|
|
42
|
+
readonly success: "success";
|
|
43
|
+
readonly remove: "remove";
|
|
44
|
+
readonly add: "add";
|
|
45
|
+
readonly attach: "attach";
|
|
46
|
+
readonly date: "date";
|
|
47
|
+
readonly copy: "duplicate";
|
|
48
|
+
readonly delete: "delete";
|
|
49
|
+
readonly edit: "edit";
|
|
50
|
+
readonly email: "email";
|
|
51
|
+
readonly exclamation: "exclamation";
|
|
52
|
+
readonly question: "question";
|
|
53
|
+
readonly home: "home";
|
|
54
|
+
readonly location: "location";
|
|
55
|
+
readonly upCarat: "upCarat";
|
|
56
|
+
readonly downCarat: "downCarat";
|
|
57
|
+
readonly warning: "warning";
|
|
58
|
+
readonly shoppingCart: "cart";
|
|
59
|
+
readonly clock: "time";
|
|
60
|
+
readonly comment: "comments";
|
|
61
|
+
readonly contact: "contacts";
|
|
62
|
+
readonly star: "favorite";
|
|
63
|
+
readonly file: "file";
|
|
64
|
+
readonly reports: "reports";
|
|
65
|
+
readonly video: "video";
|
|
66
|
+
readonly robot: "simpleBot";
|
|
67
|
+
readonly refresh: "refresh";
|
|
68
|
+
readonly faceHappy: "emoji";
|
|
69
|
+
readonly faceNeutral: "emojiLineNeutral";
|
|
70
|
+
readonly faceSad: "emojiLineSad";
|
|
71
|
+
readonly upload: "upload";
|
|
72
|
+
readonly download: "download";
|
|
73
|
+
readonly left: "left";
|
|
74
|
+
readonly right: "right";
|
|
75
|
+
readonly dataSync: "dataSync";
|
|
76
|
+
readonly imageGallery: "imageGallery";
|
|
77
|
+
readonly search: "search";
|
|
78
|
+
readonly save: "saveEditableView";
|
|
79
|
+
readonly notification: "notification";
|
|
80
|
+
readonly bulb: "bulb";
|
|
81
|
+
readonly settings: "settings";
|
|
82
|
+
readonly filter: "filter";
|
|
83
|
+
readonly gauge: "gauge";
|
|
84
|
+
readonly enroll: "enroll";
|
|
85
|
+
readonly generateChart: "generateChart";
|
|
86
|
+
readonly gift: "gift";
|
|
87
|
+
readonly flame: "highlyEngagedLead";
|
|
88
|
+
readonly inbox: "inbox";
|
|
89
|
+
readonly image: "insertImage";
|
|
90
|
+
readonly quote: "insertQuote";
|
|
91
|
+
readonly insertVideo: "insertVideo";
|
|
92
|
+
readonly invoice: "invoice";
|
|
93
|
+
readonly key: "key";
|
|
94
|
+
readonly book: "knowledgeBase";
|
|
95
|
+
readonly globe: "language";
|
|
96
|
+
readonly lesson: "lesson";
|
|
97
|
+
readonly link: "link";
|
|
98
|
+
readonly listView: "listView";
|
|
99
|
+
readonly locked: "locked";
|
|
100
|
+
readonly mention: "mention";
|
|
101
|
+
readonly messages: "messages";
|
|
102
|
+
readonly mobile: "mobile";
|
|
103
|
+
readonly notificationOff: "notificationOff";
|
|
104
|
+
readonly hash: "numericDataType";
|
|
105
|
+
readonly objectAssociations: "objectAssociations";
|
|
106
|
+
readonly objectAssociationsManyToMany: "objectAssociationsManyToMany";
|
|
107
|
+
readonly objectAssociationsManyToOne: "objectAssociationsManyToOne";
|
|
108
|
+
readonly office365: "office365";
|
|
109
|
+
readonly order: "order";
|
|
110
|
+
readonly paymentSubscriptions: "paymentSubscriptions";
|
|
111
|
+
readonly product: "product";
|
|
112
|
+
readonly powerPointFile: "powerPointFile";
|
|
113
|
+
readonly presentation: "presentation";
|
|
114
|
+
readonly publish: "publish";
|
|
115
|
+
readonly questionAnswer: "questionAnswer";
|
|
116
|
+
readonly quickbooks: "quickbooks";
|
|
117
|
+
readonly readMore: "readMore";
|
|
118
|
+
readonly realEstateListing: "realEstateListing";
|
|
119
|
+
readonly readOnlyView: "readOnlyView";
|
|
120
|
+
readonly recentlySelected: "recentlySelected";
|
|
121
|
+
readonly record: "record";
|
|
122
|
+
readonly redo: "redo";
|
|
123
|
+
readonly undo: "undo";
|
|
124
|
+
readonly registration: "registration";
|
|
125
|
+
readonly replace: "replace";
|
|
126
|
+
readonly rotate: "rotate";
|
|
127
|
+
readonly salesQuote: "salesQuote";
|
|
128
|
+
readonly salesTemplates: "salesTemplates";
|
|
129
|
+
readonly sequences: "sequences";
|
|
130
|
+
readonly spellCheck: "spellCheck";
|
|
131
|
+
readonly strike: "strike";
|
|
132
|
+
readonly tablet: "tablet";
|
|
133
|
+
readonly tag: "tag";
|
|
134
|
+
readonly tasks: "tasks";
|
|
135
|
+
readonly test: "test";
|
|
136
|
+
readonly ticket: "ticket";
|
|
137
|
+
readonly thumbsUp: "thumbsUp";
|
|
138
|
+
readonly thumbsDown: "thumbsDown";
|
|
139
|
+
readonly translate: "translate";
|
|
140
|
+
readonly trophy: "trophy";
|
|
141
|
+
readonly videoFile: "videoFile";
|
|
142
|
+
readonly videoPlayerSubtitles: "videoPlayerSubtitles";
|
|
143
|
+
readonly view: "view";
|
|
144
|
+
readonly viewDetails: "viewDetails";
|
|
145
|
+
readonly website: "website";
|
|
146
|
+
readonly workflows: "workflows";
|
|
147
|
+
readonly zoomIn: "zoomIn";
|
|
148
|
+
readonly zoomOut: "zoomOut";
|
|
149
|
+
readonly goal: "goal";
|
|
150
|
+
readonly campaigns: "campaigns";
|
|
151
|
+
readonly cap: "cap";
|
|
152
|
+
readonly block: "block";
|
|
153
|
+
readonly bank: "bank";
|
|
154
|
+
readonly approvals: "approvals";
|
|
155
|
+
readonly appointment: "appointment";
|
|
156
|
+
readonly facebook: "socialBlockFacebook";
|
|
157
|
+
readonly googlePlus: "socialBlockGoogleplus";
|
|
158
|
+
readonly instagram: "socialBlockInstagram";
|
|
159
|
+
readonly linkedin: "socialBlockLinkedin";
|
|
160
|
+
readonly pinterest: "socialBlockPinterest";
|
|
161
|
+
readonly rss: "socialBlockRss";
|
|
162
|
+
readonly twitter: "socialBlockTwitter";
|
|
163
|
+
readonly x: "socialBlockX";
|
|
164
|
+
readonly xing: "socialBlockXing";
|
|
165
|
+
readonly youtube: "socialBlockYoutube";
|
|
166
|
+
readonly youtubePlay: "socialBlockYoutubeplay";
|
|
167
|
+
readonly sortAlpAsc: "sortAlpAsc";
|
|
168
|
+
readonly sortAlpDesc: "sortAlpDesc";
|
|
169
|
+
readonly sortAmtAsc: "sortAmtAsc";
|
|
170
|
+
readonly sortAmtDesc: "sortAmtDesc";
|
|
171
|
+
readonly sortNumAsc: "sortNumAsc";
|
|
172
|
+
readonly sortNumDesc: "sortNumDesc";
|
|
173
|
+
readonly sortTableAsc: "sortTableAsc";
|
|
174
|
+
readonly sortTableDesc: "sortTableDesc";
|
|
175
|
+
readonly text: "text";
|
|
176
|
+
readonly textColor: "textColor";
|
|
177
|
+
readonly textDataType: "textDataType";
|
|
178
|
+
readonly textSnippet: "textSnippet";
|
|
179
|
+
readonly calling: "calling";
|
|
180
|
+
readonly callingHangup: "callingHangup";
|
|
181
|
+
readonly callingMade: "callingMade";
|
|
182
|
+
readonly callingMissed: "callingMissed";
|
|
183
|
+
readonly callingVoicemail: "callingVoicemail";
|
|
184
|
+
readonly faceHappyFilled: "emojiFillHappy";
|
|
185
|
+
readonly faceNeutralFilled: "emojiFillNeutral";
|
|
186
|
+
readonly faceSadFilled: "emojiFillSad";
|
|
187
|
+
};
|
|
188
|
+
export type IconNames = keyof typeof iconNames;
|
|
189
|
+
export type TypesOfReadOnlyArray<T extends ReadonlyArray<unknown>> = T extends ReadonlyArray<infer ElementType> ? ElementType : never;
|
|
190
|
+
/** @deprecated use ExtensionEvent/FormSubmitExtensionEvent instead */
|
|
191
|
+
export declare class RemoteEvent<V> {
|
|
192
|
+
type: string;
|
|
193
|
+
bubbles: boolean;
|
|
194
|
+
timeStamp: number;
|
|
195
|
+
targetValue: V;
|
|
196
|
+
constructor(value: V, event: Event);
|
|
197
|
+
}
|
|
@@ -0,0 +1,179 @@
|
|
|
1
|
+
export class ExtensionEvent {
|
|
2
|
+
type;
|
|
3
|
+
bubbles;
|
|
4
|
+
timeStamp;
|
|
5
|
+
id;
|
|
6
|
+
constructor(event) {
|
|
7
|
+
this.bubbles = event.bubbles;
|
|
8
|
+
this.type = event.type;
|
|
9
|
+
this.timeStamp = event.timeStamp;
|
|
10
|
+
this.id = crypto.randomUUID();
|
|
11
|
+
}
|
|
12
|
+
}
|
|
13
|
+
export class FormSubmitExtensionEvent extends ExtensionEvent {
|
|
14
|
+
targetValue;
|
|
15
|
+
constructor(value, event) {
|
|
16
|
+
super(event);
|
|
17
|
+
this.targetValue = value;
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
export const iconNames = {
|
|
21
|
+
success: 'success',
|
|
22
|
+
remove: 'remove',
|
|
23
|
+
add: 'add',
|
|
24
|
+
attach: 'attach',
|
|
25
|
+
date: 'date',
|
|
26
|
+
copy: 'duplicate',
|
|
27
|
+
delete: 'delete',
|
|
28
|
+
edit: 'edit',
|
|
29
|
+
email: 'email',
|
|
30
|
+
exclamation: 'exclamation',
|
|
31
|
+
question: 'question',
|
|
32
|
+
home: 'home',
|
|
33
|
+
location: 'location',
|
|
34
|
+
upCarat: 'upCarat',
|
|
35
|
+
downCarat: 'downCarat',
|
|
36
|
+
warning: 'warning',
|
|
37
|
+
shoppingCart: 'cart',
|
|
38
|
+
clock: 'time',
|
|
39
|
+
comment: 'comments',
|
|
40
|
+
contact: 'contacts',
|
|
41
|
+
star: 'favorite',
|
|
42
|
+
file: 'file',
|
|
43
|
+
reports: 'reports',
|
|
44
|
+
video: 'video',
|
|
45
|
+
robot: 'simpleBot',
|
|
46
|
+
refresh: 'refresh',
|
|
47
|
+
faceHappy: 'emoji',
|
|
48
|
+
faceNeutral: 'emojiLineNeutral',
|
|
49
|
+
faceSad: 'emojiLineSad',
|
|
50
|
+
upload: 'upload',
|
|
51
|
+
download: 'download',
|
|
52
|
+
left: 'left',
|
|
53
|
+
right: 'right',
|
|
54
|
+
dataSync: 'dataSync',
|
|
55
|
+
imageGallery: 'imageGallery',
|
|
56
|
+
search: 'search',
|
|
57
|
+
save: 'saveEditableView',
|
|
58
|
+
notification: 'notification',
|
|
59
|
+
bulb: 'bulb',
|
|
60
|
+
settings: 'settings',
|
|
61
|
+
filter: 'filter',
|
|
62
|
+
gauge: 'gauge',
|
|
63
|
+
enroll: 'enroll',
|
|
64
|
+
generateChart: 'generateChart',
|
|
65
|
+
gift: 'gift',
|
|
66
|
+
flame: 'highlyEngagedLead',
|
|
67
|
+
inbox: 'inbox',
|
|
68
|
+
image: 'insertImage',
|
|
69
|
+
quote: 'insertQuote',
|
|
70
|
+
insertVideo: 'insertVideo',
|
|
71
|
+
invoice: 'invoice',
|
|
72
|
+
key: 'key',
|
|
73
|
+
book: 'knowledgeBase',
|
|
74
|
+
globe: 'language',
|
|
75
|
+
lesson: 'lesson',
|
|
76
|
+
link: 'link',
|
|
77
|
+
listView: 'listView',
|
|
78
|
+
locked: 'locked',
|
|
79
|
+
mention: 'mention',
|
|
80
|
+
messages: 'messages',
|
|
81
|
+
mobile: 'mobile',
|
|
82
|
+
notificationOff: 'notificationOff',
|
|
83
|
+
hash: 'numericDataType',
|
|
84
|
+
objectAssociations: 'objectAssociations',
|
|
85
|
+
objectAssociationsManyToMany: 'objectAssociationsManyToMany',
|
|
86
|
+
objectAssociationsManyToOne: 'objectAssociationsManyToOne',
|
|
87
|
+
office365: 'office365',
|
|
88
|
+
order: 'order',
|
|
89
|
+
paymentSubscriptions: 'paymentSubscriptions',
|
|
90
|
+
product: 'product',
|
|
91
|
+
powerPointFile: 'powerPointFile',
|
|
92
|
+
presentation: 'presentation',
|
|
93
|
+
publish: 'publish',
|
|
94
|
+
questionAnswer: 'questionAnswer',
|
|
95
|
+
quickbooks: 'quickbooks',
|
|
96
|
+
readMore: 'readMore',
|
|
97
|
+
realEstateListing: 'realEstateListing',
|
|
98
|
+
readOnlyView: 'readOnlyView',
|
|
99
|
+
recentlySelected: 'recentlySelected',
|
|
100
|
+
record: 'record',
|
|
101
|
+
redo: 'redo',
|
|
102
|
+
undo: 'undo',
|
|
103
|
+
registration: 'registration',
|
|
104
|
+
replace: 'replace',
|
|
105
|
+
rotate: 'rotate',
|
|
106
|
+
salesQuote: 'salesQuote',
|
|
107
|
+
salesTemplates: 'salesTemplates',
|
|
108
|
+
sequences: 'sequences',
|
|
109
|
+
spellCheck: 'spellCheck',
|
|
110
|
+
strike: 'strike',
|
|
111
|
+
tablet: 'tablet',
|
|
112
|
+
tag: 'tag',
|
|
113
|
+
tasks: 'tasks',
|
|
114
|
+
test: 'test',
|
|
115
|
+
ticket: 'ticket',
|
|
116
|
+
thumbsUp: 'thumbsUp',
|
|
117
|
+
thumbsDown: 'thumbsDown',
|
|
118
|
+
translate: 'translate',
|
|
119
|
+
trophy: 'trophy',
|
|
120
|
+
videoFile: 'videoFile',
|
|
121
|
+
videoPlayerSubtitles: 'videoPlayerSubtitles',
|
|
122
|
+
view: 'view',
|
|
123
|
+
viewDetails: 'viewDetails',
|
|
124
|
+
website: 'website',
|
|
125
|
+
workflows: 'workflows',
|
|
126
|
+
zoomIn: 'zoomIn',
|
|
127
|
+
zoomOut: 'zoomOut',
|
|
128
|
+
goal: 'goal',
|
|
129
|
+
campaigns: 'campaigns',
|
|
130
|
+
cap: 'cap',
|
|
131
|
+
block: 'block',
|
|
132
|
+
bank: 'bank',
|
|
133
|
+
approvals: 'approvals',
|
|
134
|
+
appointment: 'appointment',
|
|
135
|
+
facebook: 'socialBlockFacebook',
|
|
136
|
+
googlePlus: 'socialBlockGoogleplus',
|
|
137
|
+
instagram: 'socialBlockInstagram',
|
|
138
|
+
linkedin: 'socialBlockLinkedin',
|
|
139
|
+
pinterest: 'socialBlockPinterest',
|
|
140
|
+
rss: 'socialBlockRss',
|
|
141
|
+
twitter: 'socialBlockTwitter',
|
|
142
|
+
x: 'socialBlockX',
|
|
143
|
+
xing: 'socialBlockXing',
|
|
144
|
+
youtube: 'socialBlockYoutube',
|
|
145
|
+
youtubePlay: 'socialBlockYoutubeplay',
|
|
146
|
+
sortAlpAsc: 'sortAlpAsc',
|
|
147
|
+
sortAlpDesc: 'sortAlpDesc',
|
|
148
|
+
sortAmtAsc: 'sortAmtAsc',
|
|
149
|
+
sortAmtDesc: 'sortAmtDesc',
|
|
150
|
+
sortNumAsc: 'sortNumAsc',
|
|
151
|
+
sortNumDesc: 'sortNumDesc',
|
|
152
|
+
sortTableAsc: 'sortTableAsc',
|
|
153
|
+
sortTableDesc: 'sortTableDesc',
|
|
154
|
+
text: 'text',
|
|
155
|
+
textColor: 'textColor',
|
|
156
|
+
textDataType: 'textDataType',
|
|
157
|
+
textSnippet: 'textSnippet',
|
|
158
|
+
calling: 'calling',
|
|
159
|
+
callingHangup: 'callingHangup',
|
|
160
|
+
callingMade: 'callingMade',
|
|
161
|
+
callingMissed: 'callingMissed',
|
|
162
|
+
callingVoicemail: 'callingVoicemail',
|
|
163
|
+
faceHappyFilled: 'emojiFillHappy',
|
|
164
|
+
faceNeutralFilled: 'emojiFillNeutral',
|
|
165
|
+
faceSadFilled: 'emojiFillSad',
|
|
166
|
+
};
|
|
167
|
+
/** @deprecated use ExtensionEvent/FormSubmitExtensionEvent instead */
|
|
168
|
+
export class RemoteEvent {
|
|
169
|
+
type;
|
|
170
|
+
bubbles;
|
|
171
|
+
timeStamp;
|
|
172
|
+
targetValue;
|
|
173
|
+
constructor(value, event) {
|
|
174
|
+
this.bubbles = event.bubbles;
|
|
175
|
+
this.type = event.type;
|
|
176
|
+
this.timeStamp = event.timeStamp;
|
|
177
|
+
this.targetValue = value;
|
|
178
|
+
}
|
|
179
|
+
}
|
package/dist/coreComponents.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
1
2
|
import type * as types from './types';
|
|
2
3
|
/**
|
|
3
4
|
* The `Alert` component renders an alert within a card. Use this component to give usage guidance, notify users of action results, or warn them about potential issues or failures.
|
|
@@ -546,11 +547,14 @@ export declare const Toggle: "Toggle" & {
|
|
|
546
547
|
*
|
|
547
548
|
* - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/dropdown Docs}
|
|
548
549
|
*/
|
|
549
|
-
export declare
|
|
550
|
-
|
|
551
|
-
|
|
552
|
-
|
|
553
|
-
|
|
550
|
+
export declare function Dropdown(props: types.DropdownProps): JSX.Element;
|
|
551
|
+
export declare namespace Dropdown {
|
|
552
|
+
var ButtonItem: "DropdownButtonItem" & {
|
|
553
|
+
readonly type?: "DropdownButtonItem" | undefined;
|
|
554
|
+
readonly props?: types.DropdownButtonItemProps | undefined;
|
|
555
|
+
readonly children?: true | undefined;
|
|
556
|
+
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"DropdownButtonItem", types.DropdownButtonItemProps, true>>;
|
|
557
|
+
}
|
|
554
558
|
/**
|
|
555
559
|
* The Panel component renders a panel overlay on the right side of the page and contains other components.
|
|
556
560
|
*
|
|
@@ -830,3 +834,15 @@ export declare const CurrencyInput: "CurrencyInput" & {
|
|
|
830
834
|
readonly props?: types.InlineProps | undefined;
|
|
831
835
|
readonly children?: true | undefined;
|
|
832
836
|
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"Inline", types.InlineProps, true>>;
|
|
837
|
+
/**
|
|
838
|
+
* The `AutoGrid` component renders a responsive grid layout that automatically adjusts the number of columns based on available space. Use this component to create flexible grid layouts for cards, tiles, or other content.
|
|
839
|
+
*
|
|
840
|
+
* **Links:**
|
|
841
|
+
*
|
|
842
|
+
* - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/simple-grid Docs}
|
|
843
|
+
*/
|
|
844
|
+
export declare const AutoGrid: "AutoGrid" & {
|
|
845
|
+
readonly type?: "AutoGrid" | undefined;
|
|
846
|
+
readonly props?: types.AutoGridProps | undefined;
|
|
847
|
+
readonly children?: true | undefined;
|
|
848
|
+
} & import("@remote-ui/react").ReactComponentTypeFromRemoteComponentType<import("@remote-ui/types").RemoteComponentType<"AutoGrid", types.AutoGridProps, true>>;
|
package/dist/coreComponents.js
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
1
2
|
import { createRemoteReactComponent } from '@remote-ui/react';
|
|
2
3
|
/**
|
|
3
4
|
* The `Alert` component renders an alert within a card. Use this component to give usage guidance, notify users of action results, or warn them about potential issues or failures.
|
|
@@ -353,6 +354,7 @@ export const List = createRemoteReactComponent('List');
|
|
|
353
354
|
* - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/toggle Docs}
|
|
354
355
|
*/
|
|
355
356
|
export const Toggle = createRemoteReactComponent('Toggle');
|
|
357
|
+
const DropdownInternal = createRemoteReactComponent('Dropdown');
|
|
356
358
|
/**
|
|
357
359
|
* The `Dropdown` component renders a dropdown menu that can appear as a button or hyperlink. Use this component to enable users to select from multiple options in a compact list.
|
|
358
360
|
*
|
|
@@ -360,7 +362,19 @@ export const Toggle = createRemoteReactComponent('Toggle');
|
|
|
360
362
|
*
|
|
361
363
|
* - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/dropdown Docs}
|
|
362
364
|
*/
|
|
363
|
-
export
|
|
365
|
+
export function Dropdown(props) {
|
|
366
|
+
return _jsx(DropdownInternal, { ...props });
|
|
367
|
+
}
|
|
368
|
+
/**
|
|
369
|
+
* The `DropdownButtonItem` component represents a single option within a `Dropdown` menu. Use this component as a child of the `Dropdown` component.
|
|
370
|
+
*
|
|
371
|
+
* **Links:**
|
|
372
|
+
*
|
|
373
|
+
* - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/dropdown Docs}
|
|
374
|
+
*/
|
|
375
|
+
Dropdown.ButtonItem = createRemoteReactComponent('DropdownButtonItem', {
|
|
376
|
+
fragmentProps: ['overlay'],
|
|
377
|
+
});
|
|
364
378
|
/**
|
|
365
379
|
* The Panel component renders a panel overlay on the right side of the page and contains other components.
|
|
366
380
|
*
|
|
@@ -558,3 +572,11 @@ export const CurrencyInput = createRemoteReactComponent('CurrencyInput');
|
|
|
558
572
|
*
|
|
559
573
|
* - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/inline Docs}
|
|
560
574
|
*/ export const Inline = createRemoteReactComponent('Inline');
|
|
575
|
+
/**
|
|
576
|
+
* The `AutoGrid` component renders a responsive grid layout that automatically adjusts the number of columns based on available space. Use this component to create flexible grid layouts for cards, tiles, or other content.
|
|
577
|
+
*
|
|
578
|
+
* **Links:**
|
|
579
|
+
*
|
|
580
|
+
* - {@link https://developers.hubspot.com/docs/reference/ui-components/standard-components/simple-grid Docs}
|
|
581
|
+
*/
|
|
582
|
+
export const AutoGrid = createRemoteReactComponent('AutoGrid');
|
|
@@ -19,4 +19,7 @@ export interface UseAssociationsResult {
|
|
|
19
19
|
isLoading: boolean;
|
|
20
20
|
pagination: UseAssociationsPagination;
|
|
21
21
|
}
|
|
22
|
+
/**
|
|
23
|
+
* A hook to fetch and manage associations between CRM objects with pagination support.
|
|
24
|
+
*/
|
|
22
25
|
export declare function useAssociations(config: Omit<FetchAssociationsRequest, 'offset'>, options?: UseAssociationsOptions): UseAssociationsResult;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useEffect, useReducer, useMemo, useRef, useCallback } from 'react';
|
|
2
|
-
import { logger } from '../../logger';
|
|
3
2
|
import { fetchAssociations, DEFAULT_PAGE_SIZE, calculatePaginationFlags, } from '../utils/fetchAssociations';
|
|
4
3
|
function createInitialState(pageSize) {
|
|
5
4
|
return {
|
|
@@ -80,13 +79,12 @@ function associationsReducer(state, action) {
|
|
|
80
79
|
}
|
|
81
80
|
}
|
|
82
81
|
const DEFAULT_OPTIONS = {};
|
|
82
|
+
/**
|
|
83
|
+
* A hook to fetch and manage associations between CRM objects with pagination support.
|
|
84
|
+
*/
|
|
83
85
|
export function useAssociations(config, options = DEFAULT_OPTIONS) {
|
|
84
86
|
const pageSize = config?.pageLength ?? DEFAULT_PAGE_SIZE;
|
|
85
87
|
const [state, dispatch] = useReducer(associationsReducer, useMemo(() => createInitialState(pageSize), [pageSize]));
|
|
86
|
-
// Log experimental warning once on mount
|
|
87
|
-
useEffect(() => {
|
|
88
|
-
logger.warn('useAssociations is an experimental hook and might change or be removed in the future.');
|
|
89
|
-
}, []);
|
|
90
88
|
/**
|
|
91
89
|
* HOOK OPTIMIZATION:
|
|
92
90
|
*
|
|
@@ -6,7 +6,5 @@ export interface CrmPropertiesState {
|
|
|
6
6
|
}
|
|
7
7
|
/**
|
|
8
8
|
* A hook for using and managing CRM properties.
|
|
9
|
-
*
|
|
10
|
-
* @experimental This hook is experimental and might change or be removed in future versions.
|
|
11
9
|
*/
|
|
12
10
|
export declare function useCrmProperties(propertyNames: string[], options?: FetchCrmPropertiesOptions): CrmPropertiesState;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { useEffect, useReducer, useMemo, useRef } from 'react';
|
|
2
|
-
import { logger } from '../../logger';
|
|
3
2
|
import { fetchCrmProperties, } from '../utils/fetchCrmProperties';
|
|
4
3
|
const initialState = {
|
|
5
4
|
properties: {},
|
|
@@ -35,15 +34,9 @@ function crmPropertiesReducer(state, action) {
|
|
|
35
34
|
const DEFAULT_OPTIONS = {};
|
|
36
35
|
/**
|
|
37
36
|
* A hook for using and managing CRM properties.
|
|
38
|
-
*
|
|
39
|
-
* @experimental This hook is experimental and might change or be removed in future versions.
|
|
40
37
|
*/
|
|
41
38
|
export function useCrmProperties(propertyNames, options = DEFAULT_OPTIONS) {
|
|
42
39
|
const [state, dispatch] = useReducer(crmPropertiesReducer, initialState);
|
|
43
|
-
// Log experimental warning once on mount
|
|
44
|
-
useEffect(() => {
|
|
45
|
-
logger.warn('useCrmProperties is an experimental hook and might change or be removed in the future.');
|
|
46
|
-
}, []);
|
|
47
40
|
/**
|
|
48
41
|
* HOOK OPTIMIZATION:
|
|
49
42
|
*
|