@hubspot/ui-extensions 0.8.52 → 0.8.54

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/types.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { RemoteFragment } from '@remote-ui/core';
2
1
  import { ReactNode, ComponentType } from 'react';
2
+ import { RemoteFragment } from '@remote-ui/core';
3
3
  export declare class ExtensionEvent {
4
4
  type: string;
5
5
  bubbles: boolean;
@@ -7,52 +7,360 @@ export declare class ExtensionEvent {
7
7
  id: string;
8
8
  constructor(event: Event);
9
9
  }
10
- export type TypesOfReadOnlyArray<T extends ReadonlyArray<unknown>> = T extends ReadonlyArray<infer ElementType> ? ElementType : never;
11
10
  export declare class FormSubmitExtensionEvent<V> extends ExtensionEvent {
12
11
  targetValue: V;
13
12
  constructor(value: V, event: Event);
14
13
  }
15
- export type ReactionsHandler<T> = (event: T, reactions: Reactions) => void | Promise<void>;
16
14
  export type OverlayComponentProps = {
17
15
  overlay?: RemoteFragment;
18
16
  };
17
+ export type HrefOptions = {
18
+ url: string;
19
+ external?: boolean;
20
+ };
21
+ export type HrefProp = string | HrefOptions;
22
+ export interface TShirtSizes {
23
+ xs: 'extra-small' | 'xs';
24
+ sm: 'small' | 'sm';
25
+ md: 'medium' | 'md';
26
+ lg: 'large' | 'lg';
27
+ xl: 'extra-large' | 'xl';
28
+ }
29
+ export type AllSizes = TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'] | TShirtSizes['lg'] | TShirtSizes['xl'];
30
+ export type AllDistances = 'flush' | AllSizes;
31
+ export declare const iconNames: {
32
+ readonly success: "success";
33
+ readonly remove: "remove";
34
+ readonly add: "add";
35
+ readonly attach: "attach";
36
+ readonly date: "date";
37
+ readonly copy: "duplicate";
38
+ readonly delete: "delete";
39
+ readonly edit: "edit";
40
+ readonly email: "email";
41
+ readonly exclamation: "exclamation";
42
+ readonly question: "question";
43
+ readonly home: "home";
44
+ readonly location: "location";
45
+ readonly upCarat: "upCarat";
46
+ readonly downCarat: "downCarat";
47
+ readonly warning: "warning";
48
+ readonly shoppingCart: "cart";
49
+ readonly clock: "time";
50
+ readonly comment: "comments";
51
+ readonly contact: "contacts";
52
+ readonly star: "favorite";
53
+ readonly file: "file";
54
+ readonly reports: "reports";
55
+ readonly video: "video";
56
+ readonly robot: "simpleBot";
57
+ readonly refresh: "refresh";
58
+ readonly faceHappy: "emoji";
59
+ readonly faceNeutral: "emojiLineNeutral";
60
+ readonly faceSad: "emojiLineSad";
61
+ readonly upload: "upload";
62
+ readonly download: "download";
63
+ readonly left: "left";
64
+ readonly right: "right";
65
+ readonly dataSync: "dataSync";
66
+ readonly imageGallery: "imageGallery";
67
+ readonly search: "search";
68
+ readonly save: "saveEditableView";
69
+ readonly notification: "notification";
70
+ readonly bulb: "bulb";
71
+ readonly settings: "settings";
72
+ readonly filter: "filter";
73
+ readonly gauge: "gauge";
74
+ readonly enroll: "enroll";
75
+ readonly generateChart: "generateChart";
76
+ readonly gift: "gift";
77
+ readonly flame: "highlyEngagedLead";
78
+ readonly inbox: "inbox";
79
+ readonly image: "insertImage";
80
+ readonly quote: "insertQuote";
81
+ readonly insertVideo: "insertVideo";
82
+ readonly invoice: "invoice";
83
+ readonly key: "key";
84
+ readonly book: "knowledgeBase";
85
+ readonly globe: "language";
86
+ readonly lesson: "lesson";
87
+ readonly link: "link";
88
+ readonly listView: "listView";
89
+ readonly locked: "locked";
90
+ readonly mention: "mention";
91
+ readonly messages: "messages";
92
+ readonly mobile: "mobile";
93
+ readonly notificationOff: "notificationOff";
94
+ readonly hash: "numericDataType";
95
+ readonly objectAssociations: "objectAssociations";
96
+ readonly objectAssociationsManyToMany: "objectAssociationsManyToMany";
97
+ readonly objectAssociationsManyToOne: "objectAssociationsManyToOne";
98
+ readonly office365: "office365";
99
+ readonly order: "order";
100
+ readonly paymentSubscriptions: "paymentSubscriptions";
101
+ readonly product: "product";
102
+ readonly powerPointFile: "powerPointFile";
103
+ readonly presentation: "presentation";
104
+ readonly publish: "publish";
105
+ readonly questionAnswer: "questionAnswer";
106
+ readonly quickbooks: "quickbooks";
107
+ readonly readMore: "readMore";
108
+ readonly realEstateListing: "realEstateListing";
109
+ readonly readOnlyView: "readOnlyView";
110
+ readonly recentlySelected: "recentlySelected";
111
+ readonly record: "record";
112
+ readonly redo: "redo";
113
+ readonly undo: "undo";
114
+ readonly registration: "registration";
115
+ readonly replace: "replace";
116
+ readonly rotate: "rotate";
117
+ readonly salesQuote: "salesQuote";
118
+ readonly salesTemplates: "salesTemplates";
119
+ readonly sequences: "sequences";
120
+ readonly spellCheck: "spellCheck";
121
+ readonly strike: "strike";
122
+ readonly tablet: "tablet";
123
+ readonly tag: "tag";
124
+ readonly tasks: "tasks";
125
+ readonly test: "test";
126
+ readonly ticket: "ticket";
127
+ readonly thumbsUp: "thumbsUp";
128
+ readonly thumbsDown: "thumbsDown";
129
+ readonly translate: "translate";
130
+ readonly trophy: "trophy";
131
+ readonly videoFile: "videoFile";
132
+ readonly videoPlayerSubtitles: "videoPlayerSubtitles";
133
+ readonly view: "view";
134
+ readonly viewDetails: "viewDetails";
135
+ readonly website: "website";
136
+ readonly workflows: "workflows";
137
+ readonly zoomIn: "zoomIn";
138
+ readonly zoomOut: "zoomOut";
139
+ readonly goal: "goal";
140
+ readonly campaigns: "campaigns";
141
+ readonly cap: "cap";
142
+ readonly block: "block";
143
+ readonly bank: "bank";
144
+ readonly approvals: "approvals";
145
+ readonly appointment: "appointment";
146
+ readonly facebook: "socialBlockFacebook";
147
+ readonly googlePlus: "socialBlockGoogleplus";
148
+ readonly instagram: "socialBlockInstagram";
149
+ readonly linkedin: "socialBlockLinkedin";
150
+ readonly pinterest: "socialBlockPinterest";
151
+ readonly rss: "socialBlockRss";
152
+ readonly twitter: "socialBlockTwitter";
153
+ readonly x: "socialBlockX";
154
+ readonly xing: "socialBlockXing";
155
+ readonly youtube: "socialBlockYoutube";
156
+ readonly youtubePlay: "socialBlockYoutubeplay";
157
+ readonly sortAlpAsc: "sortAlpAsc";
158
+ readonly sortAlpDesc: "sortAlpDesc";
159
+ readonly sortAmtAsc: "sortAmtAsc";
160
+ readonly sortAmtDesc: "sortAmtDesc";
161
+ readonly sortNumAsc: "sortNumAsc";
162
+ readonly sortNumDesc: "sortNumDesc";
163
+ readonly sortTableAsc: "sortTableAsc";
164
+ readonly sortTableDesc: "sortTableDesc";
165
+ readonly text: "text";
166
+ readonly textColor: "textColor";
167
+ readonly textDataType: "textDataType";
168
+ readonly textSnippet: "textSnippet";
169
+ readonly calling: "calling";
170
+ readonly callingHangup: "callingHangup";
171
+ readonly callingMade: "callingMade";
172
+ readonly callingMissed: "callingMissed";
173
+ readonly callingVoicemail: "callingVoicemail";
174
+ readonly faceHappyFilled: "emojiFillHappy";
175
+ readonly faceNeutralFilled: "emojiFillNeutral";
176
+ readonly faceSadFilled: "emojiFillSad";
177
+ };
178
+ export type IconNames = keyof typeof iconNames;
179
+ export type TypesOfReadOnlyArray<T extends ReadonlyArray<unknown>> = T extends ReadonlyArray<infer ElementType> ? ElementType : never;
180
+ /** @deprecated use ExtensionEvent/FormSubmitExtensionEvent instead */
181
+ export declare class RemoteEvent<V> {
182
+ type: string;
183
+ bubbles: boolean;
184
+ timeStamp: number;
185
+ targetValue: V;
186
+ constructor(value: V, event: Event);
187
+ }
188
+ /** @ignore */
189
+ type AlertType = 'info' | 'warning' | 'success' | 'danger' | 'tip' | undefined;
190
+ /** @ignore */
191
+ export type AddAlertAction = (args: {
192
+ type?: AlertType;
193
+ message: string;
194
+ title?: string;
195
+ }) => void;
196
+ /** @ignore */
197
+ export type ReloadPageAction = () => void;
198
+ /** @ignore */
199
+ export type FetchCrmObjectPropertiesAction = (properties: string[] | '*') => Promise<Record<string, string>>;
200
+ /** @ignore */
201
+ interface OpenIframeActionPayload {
202
+ uri: string;
203
+ height: number;
204
+ width: number;
205
+ /** @deprecated This property is no longer functional and has no effect. Please avoid using it, as it will be removed in future updates */
206
+ associatedObjectProperties?: string[];
207
+ title?: string;
208
+ flush?: boolean;
209
+ }
210
+ /** @ignore */
211
+ export type OpenIframeModalAction = (action: OpenIframeActionPayload, onClose?: () => void) => void;
212
+ /** @ignore */
213
+ export type refreshObjectPropertiesAction = () => void;
214
+ /** @ignore */
215
+ export type onCrmPropertiesUpdateAction = (properties: string[] | '*', callback: (properties: Record<string, string>, error?: {
216
+ message: string;
217
+ }) => void) => void;
218
+ /** @ignore */
219
+ export type CloseOverlayAction = (id: string) => void;
220
+ /** @ignore */
221
+ export interface CrmHostActions {
222
+ addAlert: AddAlertAction;
223
+ reloadPage: ReloadPageAction;
224
+ fetchCrmObjectProperties: FetchCrmObjectPropertiesAction;
225
+ openIframeModal: OpenIframeModalAction;
226
+ refreshObjectProperties: refreshObjectPropertiesAction;
227
+ onCrmPropertiesUpdate: onCrmPropertiesUpdateAction;
228
+ }
229
+ /** @ignore */
230
+ export interface SettingsActions {
231
+ addAlert: AddAlertAction;
232
+ }
233
+ /** @ignore */
234
+ export interface UiePlatformActions {
235
+ copyTextToClipboard: Clipboard['writeText'];
236
+ closeOverlay: CloseOverlayAction;
237
+ reloadPage: ReloadPageAction;
238
+ }
19
239
  /**
20
- * The props type for {@link !components.Alert}.
240
+ * The props type for {@link !components.Accordion}.
21
241
  *
22
242
  * @category Component Props
23
243
  */
24
- export interface AlertProps {
244
+ export interface AccordionProps {
25
245
  /**
26
- * The bolded title text of the alert.
246
+ * The title text for the accordion.
27
247
  *
28
248
  */
29
249
  title: string;
30
250
  /**
31
- * The main content of the alert message.
251
+ * The main content of the accordion when it opens.
32
252
  *
33
253
  */
34
- children?: ReactNode;
254
+ children: ReactNode;
35
255
  /**
36
- * The color of the alert.
256
+ * Defines default open behavior on page load. When set to `true`, the accordion will be open by default on initial load.
37
257
  *
38
- * @defaultValue `"info"`
258
+ * @defaultValue `false`
39
259
  */
40
- variant?: 'info' | 'warning' | 'success' | 'error' | 'danger' | 'tip';
41
- }
42
- export interface BaseButtonProps {
260
+ defaultOpen?: boolean;
43
261
  /**
44
- * A function that will be invoked when the button is clicked. Do not use this function for submitting a form; use Form's `onSubmit` function instead.
262
+ * When set to `true`, the accordion's open state cannot be changed.
45
263
  *
46
- * @event
264
+ * @defaultValue `false`
47
265
  */
48
- onClick?: ReactionsHandler<ExtensionEvent>;
266
+ disabled?: boolean;
49
267
  /**
50
- * A URL that will be opened when the button is clicked. If the value is a URL external to `hubspot.com` it will be opened in a new tab.
268
+ * For controlling the accordion's open state programmatically. When set to `true`, the accordion will open. Takes precedence over `defaultOpen`.
269
+ *
51
270
  */
52
- href?: HrefProp;
271
+ open?: boolean;
53
272
  /**
54
- * Determines whether or not the button should be disabled.
55
- */
273
+ * The size of the accordion title.
274
+ *
275
+ * @defaultValue `"small"`
276
+ */
277
+ size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
278
+ /**
279
+ * A function that will be invoked when the title is clicked. It receives no arguments and its return value is ignored.
280
+ *
281
+ * @event
282
+ */
283
+ onClick?: () => void;
284
+ }
285
+ /**
286
+ * The props type for {@link !components.Alert}.
287
+ *
288
+ * @category Component Props
289
+ */
290
+ export interface AlertProps {
291
+ /**
292
+ * The bolded title text of the alert.
293
+ *
294
+ */
295
+ title: string;
296
+ /**
297
+ * The main content of the alert message.
298
+ *
299
+ */
300
+ children?: ReactNode;
301
+ /**
302
+ * The color of the alert.
303
+ *
304
+ * @defaultValue `"info"`
305
+ */
306
+ variant?: 'info' | 'warning' | 'success' | 'error' | 'danger' | 'tip';
307
+ }
308
+ /**
309
+ * The props type for {@link !components.ButtonRow}.
310
+ *
311
+ * @category Component Props
312
+ */
313
+ export interface ButtonRowProps {
314
+ /**
315
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
316
+ */
317
+ children: ReactNode;
318
+ /**
319
+ * Disables the dropdown list of buttons that appears when the children expand beyond the horizontal space.
320
+ *
321
+ * @defaultValue `false`
322
+ */
323
+ disableDropdown?: boolean;
324
+ /**
325
+ * Controls the appearance and text content of the dropdown button.
326
+ */
327
+ dropDownButtonOptions?: ButtonRownDropDownButtonOptionsProps;
328
+ }
329
+ /** Configures the Dropdown Button in the ButtonRow component */
330
+ export interface ButtonRownDropDownButtonOptionsProps {
331
+ /**
332
+ * Sets the content for the dropdown button.
333
+ *
334
+ * @defaultValue `"More"`
335
+ */
336
+ text?: string;
337
+ /**
338
+ * Sets the size of the dropdown button.
339
+ *
340
+ * @defaultValue `"md"`
341
+ */
342
+ size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
343
+ /**
344
+ * Controls the appearance of the dropdown button
345
+ *
346
+ * @defaultValue `"secondary"`
347
+ */
348
+ variant?: 'primary' | 'secondary' | 'transparent';
349
+ }
350
+ export interface BaseButtonProps {
351
+ /**
352
+ * A function that will be invoked when the button is clicked. Do not use this function for submitting a form; use Form's `onSubmit` function instead.
353
+ *
354
+ * @event
355
+ */
356
+ onClick?: ReactionsHandler<ExtensionEvent>;
357
+ /**
358
+ * A URL that will be opened when the button is clicked. If the value is a URL external to `hubspot.com` it will be opened in a new tab.
359
+ */
360
+ href?: HrefProp;
361
+ /**
362
+ * Determines whether or not the button should be disabled.
363
+ */
56
364
  disabled?: boolean;
57
365
  /**
58
366
  * Sets the color variation of the button.
@@ -125,48 +433,6 @@ export interface LoadingButtonProps extends BaseButtonProps, OverlayComponentPro
125
433
  */
126
434
  resultIconName?: IconNames;
127
435
  }
128
- /**
129
- * The props type for {@link !components.ButtonRow}.
130
- *
131
- * @category Component Props
132
- */
133
- export interface ButtonRowProps {
134
- /**
135
- * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
136
- */
137
- children: ReactNode;
138
- /**
139
- * Disables the dropdown list of buttons that appears when the children expand beyond the horizontal space.
140
- *
141
- * @defaultValue `false`
142
- */
143
- disableDropdown?: boolean;
144
- /**
145
- * Controls the appearance and text content of the dropdown button.
146
- */
147
- dropDownButtonOptions?: ButtonRownDropDownButtonOptionsProps;
148
- }
149
- /** Configures the Dropdown Button in the ButtonRow component */
150
- export interface ButtonRownDropDownButtonOptionsProps {
151
- /**
152
- * Sets the content for the dropdown button.
153
- *
154
- * @defaultValue `"More"`
155
- */
156
- text?: string;
157
- /**
158
- * Sets the size of the dropdown button.
159
- *
160
- * @defaultValue `"md"`
161
- */
162
- size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
163
- /**
164
- * Controls the appearance of the dropdown button
165
- *
166
- * @defaultValue `"secondary"`
167
- */
168
- variant?: 'primary' | 'secondary' | 'transparent';
169
- }
170
436
  /**
171
437
  * The props type for {@link !components.Card}.
172
438
  *
@@ -363,6 +629,56 @@ export interface DividerProps {
363
629
  */
364
630
  distance?: AllDistances;
365
631
  }
632
+ export interface DropdownOption {
633
+ /**
634
+ * Text to be displayed as the menu item text.
635
+ *
636
+ */
637
+ label: string;
638
+ /**
639
+ * A function that will be invoked when the item is clicked.
640
+ * It receives no arguments and its return value is ignored.
641
+ *
642
+ * @event
643
+ */
644
+ onClick?: () => void;
645
+ }
646
+ /**
647
+ * The props type for {@link !components.Dropdown}.
648
+ *
649
+ * @category Component Props
650
+ */
651
+ export interface DropdownProps {
652
+ /**
653
+ * The list of options to be rendered within the dropdown menu.
654
+ * Each option represents an entry in the Dropdown.
655
+ */
656
+ options: DropdownOption[];
657
+ /**
658
+ * Controls the appearance of the dropdown button
659
+ *
660
+ * @defaultValue `"secondary"`
661
+ */
662
+ variant?: 'primary' | 'secondary' | 'transparent';
663
+ /**
664
+ * Sets the content for the dropdown button.
665
+ *
666
+ * @defaultValue `"More"`
667
+ */
668
+ buttonText?: string;
669
+ /**
670
+ * Sets the size of the dropdown button.
671
+ *
672
+ * @defaultValue `"md"`
673
+ */
674
+ buttonSize?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
675
+ /**
676
+ * Disables the ability to focus and click-to-expand of the dropdown button
677
+ *
678
+ * @defaultValue `false`
679
+ */
680
+ disabled?: boolean;
681
+ }
366
682
  /**
367
683
  * The props type for {@link !components.EmptyState}.
368
684
  *
@@ -473,6 +789,27 @@ export interface HeadingProps {
473
789
  */
474
790
  inline?: boolean;
475
791
  }
792
+ /**
793
+ * The props type for {@link !components.Icon}.
794
+ *
795
+ * @category Component Props
796
+ */
797
+ export interface IconProps {
798
+ /**
799
+ * Sets the specific icon to display.
800
+ */
801
+ name: IconNames;
802
+ /**
803
+ * Sets the size of the icon. If this prop is not provided, the icon will default to the size of its parent.
804
+ *
805
+ * @defaultValue `"medium"`
806
+ */
807
+ size?: TShirtSizes['sm'] | TShirtSizes['md'] | TShirtSizes['lg'];
808
+ /**
809
+ * Sets the text that a screenreader will read for this icon.
810
+ */
811
+ screenReaderText?: string;
812
+ }
476
813
  /**
477
814
  * The props type for {@link !components.Iframe}.
478
815
  *
@@ -493,174 +830,58 @@ export interface IframeProps {
493
830
  src: string;
494
831
  }
495
832
  /**
496
- * The props type for {@link !components.Icon}.
833
+ * The props type for {@link !components.Illustration}.
497
834
  *
498
835
  * @category Component Props
499
836
  */
500
- export interface IconProps {
501
- /**
502
- * Sets the specific icon to display.
503
- */
504
- name: IconNames;
505
- /**
506
- * Sets the size of the icon. If this prop is not provided, the icon will default to the size of its parent.
507
- *
508
- * @defaultValue `"medium"`
509
- */
510
- size?: TShirtSizes['sm'] | TShirtSizes['md'] | TShirtSizes['lg'];
511
- /**
512
- * Sets the text that a screenreader will read for this icon.
513
- */
514
- screenReaderText?: string;
837
+ export interface IllustrationProps {
838
+ name: IllustrationNames;
839
+ alt: string;
840
+ width?: number;
841
+ height?: number;
515
842
  }
516
- export declare const iconNames: {
517
- readonly success: "success";
518
- readonly remove: "remove";
519
- readonly add: "add";
520
- readonly attach: "attach";
521
- readonly date: "date";
522
- readonly copy: "duplicate";
523
- readonly delete: "delete";
524
- readonly edit: "edit";
525
- readonly email: "email";
526
- readonly exclamation: "exclamation";
527
- readonly question: "question";
528
- readonly home: "home";
529
- readonly location: "location";
530
- readonly upCarat: "upCarat";
531
- readonly downCarat: "downCarat";
532
- readonly warning: "warning";
533
- readonly shoppingCart: "cart";
534
- readonly clock: "time";
535
- readonly comment: "comments";
536
- readonly contact: "contacts";
537
- readonly star: "favorite";
538
- readonly file: "file";
539
- readonly reports: "reports";
540
- readonly video: "video";
541
- readonly robot: "simpleBot";
542
- readonly refresh: "refresh";
543
- readonly faceHappy: "emoji";
544
- readonly faceNeutral: "emojiLineNeutral";
545
- readonly faceSad: "emojiLineSad";
546
- readonly upload: "upload";
547
- readonly download: "download";
548
- readonly left: "left";
549
- readonly right: "right";
550
- readonly dataSync: "dataSync";
551
- readonly imageGallery: "imageGallery";
552
- readonly search: "search";
553
- readonly save: "saveEditableView";
554
- readonly notification: "notification";
555
- readonly bulb: "bulb";
556
- readonly settings: "settings";
557
- readonly filter: "filter";
558
- readonly gauge: "gauge";
559
- readonly enroll: "enroll";
560
- readonly generateChart: "generateChart";
561
- readonly gift: "gift";
562
- readonly flame: "highlyEngagedLead";
563
- readonly inbox: "inbox";
564
- readonly image: "insertImage";
565
- readonly quote: "insertQuote";
566
- readonly insertVideo: "insertVideo";
567
- readonly invoice: "invoice";
568
- readonly key: "key";
569
- readonly book: "knowledgeBase";
570
- readonly globe: "language";
571
- readonly lesson: "lesson";
572
- readonly link: "link";
573
- readonly listView: "listView";
574
- readonly locked: "locked";
575
- readonly mention: "mention";
576
- readonly messages: "messages";
577
- readonly mobile: "mobile";
578
- readonly notificationOff: "notificationOff";
579
- readonly hash: "numericDataType";
580
- readonly objectAssociations: "objectAssociations";
581
- readonly objectAssociationsManyToMany: "objectAssociationsManyToMany";
582
- readonly objectAssociationsManyToOne: "objectAssociationsManyToOne";
583
- readonly office365: "office365";
584
- readonly order: "order";
585
- readonly paymentSubscriptions: "paymentSubscriptions";
586
- readonly product: "product";
587
- readonly powerPointFile: "powerPointFile";
588
- readonly presentation: "presentation";
589
- readonly publish: "publish";
590
- readonly questionAnswer: "questionAnswer";
591
- readonly quickbooks: "quickbooks";
592
- readonly readMore: "readMore";
593
- readonly realEstateListing: "realEstateListing";
594
- readonly readOnlyView: "readOnlyView";
595
- readonly recentlySelected: "recentlySelected";
596
- readonly record: "record";
597
- readonly redo: "redo";
598
- readonly undo: "undo";
843
+ export declare const illustrationNames: {
844
+ readonly lock: "lock";
845
+ readonly unlock: "unlock";
846
+ readonly electronicSignature: "electronic-signature";
847
+ readonly electronicSignatureEmptyState: "electronic-signature-empty-state";
848
+ readonly callingSetUp: "calling-set-up";
849
+ readonly companies: "companies";
850
+ readonly contacts: "contacts";
851
+ readonly multipleObjects: "multiple-objects";
852
+ readonly object: "object";
853
+ readonly task: "task";
854
+ readonly deals: "deals";
599
855
  readonly registration: "registration";
600
- readonly replace: "replace";
601
- readonly rotate: "rotate";
602
- readonly salesQuote: "salesQuote";
603
- readonly salesTemplates: "salesTemplates";
604
- readonly sequences: "sequences";
605
- readonly spellCheck: "spellCheck";
606
- readonly strike: "strike";
607
- readonly tablet: "tablet";
608
- readonly tag: "tag";
609
- readonly tasks: "tasks";
610
- readonly test: "test";
611
- readonly ticket: "ticket";
612
- readonly thumbsUp: "thumbsUp";
613
- readonly thumbsDown: "thumbsDown";
614
- readonly translate: "translate";
615
- readonly trophy: "trophy";
616
- readonly videoFile: "videoFile";
617
- readonly videoPlayerSubtitles: "videoPlayerSubtitles";
618
- readonly view: "view";
619
- readonly viewDetails: "viewDetails";
620
- readonly website: "website";
621
- readonly workflows: "workflows";
622
- readonly zoomIn: "zoomIn";
623
- readonly zoomOut: "zoomOut";
624
- readonly goal: "goal";
625
- readonly campaigns: "campaigns";
626
- readonly cap: "cap";
627
- readonly block: "block";
628
- readonly bank: "bank";
629
- readonly approvals: "approvals";
630
- readonly appointment: "appointment";
631
- readonly facebook: "socialBlockFacebook";
632
- readonly googlePlus: "socialBlockGoogleplus";
633
- readonly instagram: "socialBlockInstagram";
634
- readonly linkedin: "socialBlockLinkedin";
635
- readonly pinterest: "socialBlockPinterest";
636
- readonly rss: "socialBlockRss";
637
- readonly twitter: "socialBlockTwitter";
638
- readonly x: "socialBlockX";
639
- readonly xing: "socialBlockXing";
640
- readonly youtube: "socialBlockYoutube";
641
- readonly youtubePlay: "socialBlockYoutubeplay";
642
- readonly sortAlpAsc: "sortAlpAsc";
643
- readonly sortAlpDesc: "sortAlpDesc";
644
- readonly sortAmtAsc: "sortAmtAsc";
645
- readonly sortAmtDesc: "sortAmtDesc";
646
- readonly sortNumAsc: "sortNumAsc";
647
- readonly sortNumDesc: "sortNumDesc";
648
- readonly sortTableAsc: "sortTableAsc";
649
- readonly sortTableDesc: "sortTableDesc";
650
- readonly text: "text";
651
- readonly textColor: "textColor";
652
- readonly textDataType: "textDataType";
653
- readonly textSnippet: "textSnippet";
654
- readonly calling: "calling";
655
- readonly callingHangup: "callingHangup";
656
- readonly callingMade: "callingMade";
657
- readonly callingMissed: "callingMissed";
658
- readonly callingVoicemail: "callingVoicemail";
659
- readonly faceHappyFilled: "emojiFillHappy";
660
- readonly faceNeutralFilled: "emojiFillNeutral";
661
- readonly faceSadFilled: "emojiFillSad";
856
+ readonly developerSecurityUpdate: "developer-security-update";
857
+ readonly social: "social";
858
+ readonly leads: "leads";
859
+ readonly target: "target";
860
+ readonly emailConfirmation: "email-confirmation";
861
+ readonly successfullyConnectedEmail: "successfully-connected-email";
862
+ readonly contentStrategy: "content-strategy";
863
+ readonly addOnReporting: "add-on-reporting";
864
+ readonly productsShoppingCart: "products-shopping-cart";
865
+ readonly store: "store";
866
+ readonly storeDisabled: "store-disabled";
867
+ readonly customerSupport: "customer-support";
868
+ readonly customerExperience: "customer-experience";
869
+ readonly api: "api";
870
+ readonly integrations: "integrations";
871
+ readonly sandboxAddOn: "sandbox-add-on";
872
+ readonly customObjects: "custom-objects";
873
+ readonly paymentsButton: "payments-button";
874
+ readonly automatedTesting: "automated-testing";
875
+ readonly emptyStateCharts: "empty-state-charts";
876
+ readonly meetings: "meetings-small";
877
+ readonly tickets: "ticket-small";
878
+ readonly errorGeneral: "errors/general";
879
+ readonly errorHourglass: "errors/hourglass";
880
+ readonly middlePaneCards: "settings-middle-pane-cards";
881
+ readonly propertiesSidebar: "settings-properties-sidebar";
882
+ readonly sidebar: "settings-sidebar";
662
883
  };
663
- export type IconNames = keyof typeof iconNames;
884
+ export type IllustrationNames = keyof typeof illustrationNames;
664
885
  /**
665
886
  * The props type for {@link !components.Image}.
666
887
  *
@@ -962,1802 +1183,1633 @@ export interface DateInputProps extends BaseDateInputForDate {
962
1183
  todayButtonLabel?: string;
963
1184
  }
964
1185
  /**
965
- * The props type for {@link !components.ProgressBar}.
1186
+ * The props type for {@link !components.Stack}.
966
1187
  *
967
1188
  * @category Component Props
968
1189
  */
969
- export interface ProgressBarProps {
970
- /**
971
- * The text that displays above the progress bar.
972
- *
973
- */
974
- title?: string;
1190
+ export interface StackProps {
975
1191
  /**
976
- * Accessibility label.
977
- *
1192
+ * Sets the spacing between components.
978
1193
  */
979
- 'aria-label'?: string;
1194
+ distance?: AllDistances;
980
1195
  /**
981
- * Whether the progress bar displays the completion percentage.
982
- *
983
- * @defaultValue `false`
1196
+ * Sets the content that will render inside the component.
984
1197
  */
985
- showPercentage?: boolean;
1198
+ children?: React.ReactNode;
986
1199
  /**
987
- * The number representing the progress so far.
988
- *
989
- * @defaultValue `0`
1200
+ * Arranges components `horizontally` or `vertically` by setting the main axis.
990
1201
  */
991
- value?: number;
1202
+ direction?: 'row' | 'column';
992
1203
  /**
993
- * The maximum value of the progress bar.
994
- *
995
- * @defaultValue `100`
1204
+ * Distributes components along the main axis using the available free space.
996
1205
  */
997
- maxValue?: number;
1206
+ justify?: 'center' | 'end' | 'start';
998
1207
  /**
999
- * The text that explains the current state of the value property. For example, "150 out of 250". Displays above the progress bar on the right side.
1000
- *
1208
+ * Distributes components along the cross-axis using the available free space.
1001
1209
  */
1002
- valueDescription?: string;
1210
+ align?: 'start' | 'center' | 'baseline' | 'end' | 'stretch';
1003
1211
  /**
1004
- * The color that indicates the type of progress bar.
1005
- *
1006
- * @defaultValue `"success"`
1212
+ * Sets the width of the stack.
1007
1213
  */
1008
- variant?: 'success' | 'danger' | 'warning';
1009
- /** @deprecated use maxValue instead */
1010
- valueMax?: number;
1214
+ width?: 'auto' | '100%';
1011
1215
  }
1012
1216
  /**
1013
- * Generic collection of props for select components
1014
- * @internal
1015
- * */
1016
- export interface BaseSelectProps {
1217
+ * The props type for {@link !components.Flex}.
1218
+ *
1219
+ * @category Component Props
1220
+ */
1221
+ export interface FlexProps {
1017
1222
  /**
1018
- * The text that displays above to the dropdown menu.
1223
+ * Sets the spacing between components.
1019
1224
  *
1225
+ * @defaultValue `"flush"`
1020
1226
  */
1021
- label?: string;
1227
+ gap?: AllDistances;
1022
1228
  /**
1023
- * The unique identifier for the select element.
1229
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
1024
1230
  *
1025
1231
  */
1026
- name?: string;
1232
+ children?: ReactNode;
1027
1233
  /**
1028
- * When set to `true`, displays a required field indicator.
1234
+ * Arranges components `horizontally` or `vertically` by setting the main axis.
1029
1235
  *
1030
- * @defaultValue `false`
1236
+ * @defaultValue `"row"`
1031
1237
  */
1032
- required?: boolean;
1238
+ direction?: 'row' | 'column';
1033
1239
  /**
1034
- * When set to `true`, sets the field as read-only on the CRM record, and users will not be able to fill the input field.
1240
+ * Distributes components along the main axis using the available free space.
1035
1241
  *
1036
- * @defaultValue `false`
1242
+ * @defaultValue `"start"`
1037
1243
  */
1038
- readOnly?: boolean;
1244
+ justify?: 'center' | 'end' | 'start' | 'around' | 'between';
1039
1245
  /**
1040
- * Displayed text that describes the field's purpose.
1246
+ * Distributes components along the cross-axis using the available free space.
1041
1247
  *
1248
+ * @defaultValue `"stretch"`
1042
1249
  */
1043
- description?: string;
1250
+ align?: 'start' | 'center' | 'baseline' | 'end' | 'stretch';
1044
1251
  /**
1045
- * The text that displays in a tooltip next to the label.
1252
+ * Overrides Flex's `alignItem` value for this element.
1046
1253
  *
1047
1254
  */
1048
- tooltip?: string;
1255
+ alignSelf?: 'start' | 'center' | 'baseline' | 'end' | 'stretch';
1049
1256
  /**
1050
- * Text that appears in the input when no value is set.
1257
+ * Whether components will wrap instead of trying to fit on one line.
1051
1258
  *
1259
+ * @defaultValue `"nowrap"`
1052
1260
  */
1053
- placeholder?: string;
1261
+ wrap?: boolean | 'wrap' | 'nowrap';
1262
+ }
1263
+ /**
1264
+ * The props type for {@link !components.Box}.
1265
+ *
1266
+ * @category Component Props
1267
+ */
1268
+ export interface BoxProps {
1054
1269
  /**
1055
- * When set to `true`, `validationMessage` is displayed as an error message if provided.
1056
- * The input will also render its error state to let the user know there's an error.
1057
- * If left `false` (default), `validationMessage` is displayed as a success message.
1270
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
1058
1271
  *
1059
- * @defaultValue `false`
1060
1272
  */
1061
- error?: boolean;
1273
+ children: ReactNode;
1062
1274
  /**
1063
- * The text to show if the input has an error.
1275
+ * Overrides Flex's `alignItem` value for this element.
1064
1276
  *
1277
+ * @defaultValue `"auto"`
1065
1278
  */
1066
- validationMessage?: string;
1067
- /**
1068
- * The options to display in the dropdown menu.
1069
- */
1070
- options: {
1071
- /** Will be used as the display text. **/
1072
- label: string;
1073
- /** Should be the option's unique identifier, which is submitted with the form. **/
1074
- value: string | number;
1075
- }[];
1279
+ alignSelf?: 'start' | 'center' | 'baseline' | 'end' | 'stretch' | 'auto';
1076
1280
  /**
1077
- * The variant type for the select.
1281
+ * Sets how the item will grow or shrink when it's a direct ancestor of the Flex component.
1282
+ * ##### Options in detail
1078
1283
  *
1079
- * @defaultValue `"input"`
1284
+ *- `initial`: The item is sized according to its width and height properties. It shrinks to its minimum size to fit the container, but does not grow to absorb any extra free space in the flex container.
1285
+ *- `auto`: The item is sized according to its width and height properties, but grows to absorb any extra free space in the flex container, and shrinks to its minimum size to fit the container.
1286
+ *- `none`: The item is sized according to its width and height properties. It is fully inflexible: it neither shrinks nor grows in relation to the flex container.
1287
+ *- `number`: Tells a component to fill all available space, shared evenly amongst other components with the same parent. The larger the flex given, the higher the ratio of space a component will take compared to its siblings.
1288
+ *
1289
+ * @defaultValue `"initial"`
1080
1290
  */
1081
- variant?: 'transparent' | 'input';
1291
+ flex?: 'initial' | 'auto' | 'none' | number;
1082
1292
  }
1083
1293
  /**
1084
- * The props type for {@link !components.Select}.
1294
+ * The props type for {@link !components.Link}.
1085
1295
  *
1086
1296
  * @category Component Props
1087
1297
  */
1088
- export interface SelectProps extends BaseSelectProps {
1298
+ export interface LinkProps extends OverlayComponentProps {
1089
1299
  /**
1090
- * The value of the select input.
1300
+ * Sets the content that will render inside the component.
1091
1301
  *
1092
1302
  */
1093
- value?: string | number;
1303
+ children: ReactNode;
1094
1304
  /**
1095
- * A callback function that is invoked when the value is committed.
1305
+ * The URL that will be opened on click. Links to pages in the HubSpot account will open in the same tab, while non-HubSpot links will open in a new tab.
1306
+ *
1307
+ */
1308
+ href: HrefProp;
1309
+ /**
1310
+ * The color variation of the link.
1311
+ *
1312
+ * @defaultValue `"primary"`
1313
+ */
1314
+ variant?: 'primary' | 'destructive' | 'light' | 'dark';
1315
+ /**
1316
+ * A function that will be invoked with the link is clicked.
1096
1317
  *
1097
1318
  * @event
1098
1319
  */
1099
- onChange?: (value: NonNullable<SelectProps['value']>) => void;
1320
+ onClick?: ReactionsHandler<ExtensionEvent>;
1100
1321
  /**
1101
- * The variant type for the select.
1322
+ * When set to true, `event.preventDefault()` will be invoked before the `onClick` function is called, preventing automatic navigation to the href URL.
1102
1323
  *
1103
- * @defaultValue `"input"`
1324
+ * @defaultValue `false`
1104
1325
  */
1105
- variant?: 'transparent' | 'input';
1326
+ preventDefault?: boolean;
1106
1327
  }
1107
1328
  /**
1108
- * The props type for {@link !components.MultiSelect}.
1329
+ * The props type for {@link !components.List}.
1109
1330
  *
1110
1331
  * @category Component Props
1111
1332
  */
1112
- export interface MultiSelectProps extends BaseSelectProps {
1333
+ export interface ListProps {
1113
1334
  /**
1114
- * The value of the select input.
1115
- *
1335
+ * The content of the list. Each child will be wrapped in an `li` tag.
1116
1336
  */
1117
- value?: (string | number)[];
1337
+ children: ReactNode;
1118
1338
  /**
1119
- * A callback function that is invoked when the value is committed.
1339
+ * The type of list to render.
1120
1340
  *
1121
- * @event
1341
+ * @defaultValue `"unordered"`
1122
1342
  */
1123
- onChange?: (value: NonNullable<MultiSelectProps['value']>) => void;
1343
+ variant?: 'unordered' | 'unordered-styled' | 'ordered' | 'ordered-styled' | 'inline' | 'inline-divided';
1124
1344
  }
1125
1345
  /**
1126
- * The props type for {@link !components.StatusTag}.
1346
+ * The props type for {@link !components.LoadingSpinner}.
1127
1347
  *
1128
1348
  * @category Component Props
1129
1349
  */
1130
- export interface StatusTagProps {
1350
+ export interface LoadingSpinnerProps {
1131
1351
  /**
1132
- * The status tag's indicator color.
1352
+ * The text that displays next to the spinner. Note: the label is not shown by default, you must set `showLabel` to `true` to display the label.
1133
1353
  *
1134
- * @defaultValue `"default"`
1135
1354
  */
1136
- variant?: 'danger' | 'warning' | 'info' | 'success' | 'default';
1355
+ label: string;
1137
1356
  /**
1138
- * When set to true, the status tag's dot will be a ring instead.
1357
+ * When set to `true`, the label will appear next to the spinner.
1139
1358
  *
1140
- * @defaultValue `false `
1359
+ * @defaultValue `false`
1141
1360
  */
1142
- hollow?: boolean;
1361
+ showLabel?: boolean;
1143
1362
  /**
1144
- * A function that will be invoked when the status tag is clicked. It receives no arguments and its return value is ignored.
1363
+ * The size of the spinner.
1145
1364
  *
1146
- * @event
1365
+ * @defaultValue `"sm"`
1147
1366
  */
1148
- onClick?: () => void;
1367
+ size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
1149
1368
  /**
1150
- * When set to true, the status tag will show a small clickable 'x' icon.
1369
+ * The position of the spinner. Can be one of `inline` or `centered`.
1151
1370
  *
1152
- * @defaultValue `false`
1371
+ * @defaultValue `"inline"`
1153
1372
  */
1154
- showRemoveIcon?: boolean;
1373
+ layout?: 'inline' | 'centered';
1374
+ }
1375
+ export interface ModalProps {
1155
1376
  /**
1156
- * A function that will be invoked when the 'x' icon is clicked. It receives no arguments and its return value is ignored.
1377
+ * Accessibility label.
1157
1378
  *
1158
- * @event
1159
1379
  */
1160
- onRemoveClick?: () => void;
1380
+ 'aria-label'?: string;
1161
1381
  /**
1162
- * Sets the content that will render inside the StatusTag. This prop is passed implicitly by providing sub-components. We recommend only using a small amount of text.
1382
+ * The main content of the modal when it opens.
1383
+ *
1163
1384
  */
1164
- children: ReactNode;
1165
- }
1166
- /**
1167
- * The props type for {@link !components.Tag}.
1168
- *
1169
- * @category Component Props
1170
- */
1171
- export interface TagProps extends OverlayComponentProps {
1385
+ children?: ReactNode;
1172
1386
  /**
1173
- * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
1387
+ * A unique ID for the modal
1388
+ *
1174
1389
  */
1175
- children: ReactNode;
1390
+ id: string;
1176
1391
  /**
1177
- * The tag's color. The following variants are available.
1392
+ * A function that will be invoked when the modal has finished opening.
1178
1393
  *
1179
- * @defaultValue `"default"`
1180
1394
  */
1181
- variant?: 'default' | 'warning' | 'success' | 'error' | 'info';
1395
+ onOpen?: () => void;
1182
1396
  /**
1183
- * A function that will be invoked when the tag is clicked.
1397
+ * A function that will be invoked when the modal has finished closing.
1184
1398
  *
1185
- * @event
1186
1399
  */
1187
- onClick?: ReactionsHandler<ExtensionEvent>;
1400
+ onClose?: () => void;
1188
1401
  /**
1189
- * When set to true, this component can be aligned side-by-side with text.
1402
+ * The width of the modal
1190
1403
  *
1191
- * @defaultValue `false`
1404
+ * @defaultValue `"sm"`
1192
1405
  */
1193
- inline?: boolean;
1194
- }
1195
- /**
1196
- * @internal
1197
- * Format options for text component.
1198
- */
1199
- export interface TextFormatOptions {
1406
+ width?: TShirtSizes['sm'] | TShirtSizes['md'] | TShirtSizes['lg'];
1200
1407
  /**
1201
- * Weight of the font.
1408
+ * The title of the modal
1202
1409
  *
1203
- * @defaultValue `"regular"`
1204
1410
  */
1205
- fontWeight?: 'regular' | 'bold' | 'demibold';
1411
+ title?: string;
1206
1412
  /**
1207
- * If `true`, font will be in italicized.
1413
+ * The variant of the modal
1208
1414
  *
1209
- * @defaultValue `false`
1415
+ * @defaultValue `"default"`
1210
1416
  */
1211
- italic?: boolean;
1417
+ variant?: 'danger' | 'default';
1418
+ }
1419
+ export interface ModalBodyProps {
1212
1420
  /**
1213
- * Line decoration of the font.
1421
+ * The main content of the modal
1214
1422
  *
1215
- * @defaultValue `"none"`
1216
1423
  */
1217
- lineDecoration?: 'none' | 'underline' | 'strikethrough';
1424
+ children: ReactNode;
1218
1425
  }
1219
- /**
1220
- * The props type for {@link !components.Text}.
1221
- *
1222
- * @interface
1223
- * @category Component Props
1224
- */
1225
- export type TextProps = {
1426
+ export interface ModalFooterProps {
1226
1427
  /**
1227
- * The style of text to display. Can be either of:
1428
+ * The footer of the modal
1228
1429
  *
1229
- * - bodytext: the default value which renders the standard text size.
1230
- * - microcopy: smaller text used for adding context.
1430
+ */
1431
+ children: ReactNode;
1432
+ }
1433
+ export interface PanelProps {
1434
+ /**
1435
+ * Accessibility label.
1231
1436
  *
1232
- * @defaultValue `"bodytext"`
1233
1437
  */
1234
- variant?: 'bodytext' | 'microcopy';
1438
+ 'aria-label'?: string;
1235
1439
  /**
1236
- * When set to `true`, inserts a line break.
1440
+ * The main content of the panel when it opens.
1237
1441
  *
1238
- * @defaultValue `false`
1239
1442
  */
1240
- inline?: boolean;
1443
+ children?: ReactNode;
1241
1444
  /**
1242
- * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
1445
+ * A unique ID for the panel
1446
+ *
1243
1447
  */
1244
- children: ReactNode;
1448
+ id: string;
1245
1449
  /**
1246
- * @interface
1247
- * The style of text to display. Can be any of:
1450
+ * A function that will be invoked when the panel has finished opening.
1248
1451
  *
1249
- * - { fontWeight: 'bold' }
1250
- * - { fontWeight: 'demibold' }
1251
- * - { italic: true }
1252
- * - { lineDecoration: 'strikethrough' }
1253
- * - { lineDecoration: 'underline' }
1254
- * - <Text inline={true}>
1255
1452
  */
1256
- format?: TextFormatOptions;
1453
+ onOpen?: () => void;
1257
1454
  /**
1258
- * @interface
1259
- * truncates long strings to a single line. If the full string doesn't fit in one line,
1260
- * it's shown in a tooltip on hover.
1455
+ * A function that will be invoked when the panel has finished closing.
1261
1456
  *
1262
- * - `false` => no truncation(default).
1263
- * - `true` => truncates the string to a single line. Full-text will show inside the tooltip.
1264
- * - { tooltipText: 'some text' } => truncates the string and lets you control the contents of the tooltip.
1265
- * - { maxWidth: 150 } => sets the width(in pixel) of the line.
1457
+ */
1458
+ onClose?: () => void;
1459
+ /**
1460
+ * The width of the panel
1266
1461
  *
1267
- * @defaultValue `false`
1462
+ * @defaultValue `"sm"`
1268
1463
  */
1269
- truncate?: boolean | TruncateOptions;
1270
- };
1271
- export interface TruncateOptions {
1272
- maxWidth?: number;
1273
- tooltipText?: string;
1274
- }
1275
- /**
1276
- * The props type for {@link !components.Tile}.
1277
- *
1278
- * @category Component Props
1279
- */
1280
- export interface TileProps {
1464
+ width?: TShirtSizes['sm'] | TShirtSizes['md'] | TShirtSizes['lg'];
1281
1465
  /**
1282
- * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
1466
+ * The title of the panel
1467
+ *
1283
1468
  */
1284
- children: ReactNode;
1469
+ title?: string;
1285
1470
  /**
1286
- * When set to `true`, reduces the default amount of padding around the contents of the Tile.
1471
+ * The variant of the panel
1287
1472
  *
1288
- * @defaultValue `false`
1473
+ * @defaultValue `"default"`
1289
1474
  */
1290
- compact?: boolean;
1475
+ variant?: 'modal' | 'default';
1476
+ }
1477
+ export interface PanelSectionProps {
1291
1478
  /**
1292
- * When set to `true`, removes left and right padding from tile contents.
1479
+ * When set to `true`, the section will have no bottom margin
1293
1480
  *
1294
1481
  * @defaultValue `false`
1295
1482
  */
1296
1483
  flush?: boolean;
1297
- }
1298
- /** @ignore */
1299
- interface Team {
1300
- id: number;
1301
- name: string;
1302
- teammates: number[];
1303
- }
1304
- /**
1305
- * The props type for {@link !components.Checkbox}.
1306
- *
1307
- * @category Component Props
1308
- */
1309
- export interface CheckboxProps {
1310
1484
  /**
1311
- * A string representing the value of the input. This is not displayed on the client-side,
1312
- * but on the server this is the value given to the data submitted with the checkbox's name.
1485
+ * The main content of the section
1486
+ *
1313
1487
  */
1314
- value?: string;
1488
+ children: ReactNode;
1489
+ }
1490
+ export interface PanelBodyProps {
1315
1491
  /**
1316
- * The current status of the input.
1492
+ * The main content of the body
1493
+ *
1317
1494
  */
1318
- checked?: boolean;
1319
- /** @deprecated use readOnly instead */
1320
- readonly?: boolean;
1495
+ children: ReactNode;
1496
+ }
1497
+ export interface PanelFooterProps {
1321
1498
  /**
1322
- * When set to `true`, the option cannot be selected.
1499
+ * The main content of the footer
1500
+ *
1323
1501
  */
1324
- readOnly?: boolean;
1502
+ children: ReactNode;
1503
+ }
1504
+ /**
1505
+ * The props type for {@link !components.ProgressBar}.
1506
+ *
1507
+ * @category Component Props
1508
+ */
1509
+ export interface ProgressBarProps {
1325
1510
  /**
1326
- * The string that displays below the toggle.
1511
+ * The text that displays above the progress bar.
1512
+ *
1327
1513
  */
1328
- description?: string;
1514
+ title?: string;
1329
1515
  /**
1330
- * The unique identifier for the checkbox element.
1516
+ * Accessibility label.
1517
+ *
1331
1518
  */
1332
- name?: string;
1519
+ 'aria-label'?: string;
1333
1520
  /**
1334
- * The size variation of the checkbox.
1521
+ * Whether the progress bar displays the completion percentage.
1335
1522
  *
1336
- * @defaultValue `"default"`
1523
+ * @defaultValue `false`
1337
1524
  */
1338
- variant?: 'default' | 'small';
1525
+ showPercentage?: boolean;
1339
1526
  /**
1340
- * A function that is called when the `checked` input status changes.
1527
+ * The number representing the progress so far.
1341
1528
  *
1342
- * @event
1529
+ * @defaultValue `0`
1343
1530
  */
1344
- onChange?: (checked: boolean, value: string) => void;
1345
- /** The text that displays in the dropdown menu. */
1346
- children?: React.ReactNode;
1531
+ value?: number;
1347
1532
  /**
1348
- * Use the inline prop to arrange checkboxes side-by-side.
1533
+ * The maximum value of the progress bar.
1534
+ *
1535
+ * @defaultValue `100`
1349
1536
  */
1350
- inline?: boolean;
1537
+ maxValue?: number;
1351
1538
  /**
1352
- * When set to `true`, the option will be selected by default. Use it to
1353
- * set the default `checked` state when the component is **uncontrolled**.
1539
+ * The text that explains the current state of the value property. For example, "150 out of 250". Displays above the progress bar on the right side.
1540
+ *
1354
1541
  */
1355
- initialIsChecked?: boolean;
1542
+ valueDescription?: string;
1356
1543
  /**
1357
- * Accessibility label. It should be present when the checkbox has no label(children).
1544
+ * The color that indicates the type of progress bar.
1545
+ *
1546
+ * @defaultValue `"success"`
1358
1547
  */
1359
- 'aria-label'?: string;
1548
+ variant?: 'success' | 'danger' | 'warning';
1549
+ /** @deprecated use maxValue instead */
1550
+ valueMax?: number;
1360
1551
  }
1361
1552
  /**
1362
- * The props type for {@link !components.RadioButton}.
1363
- * @category Component Props
1364
- * @interface
1365
- */
1366
- export type RadioButtonProps = Omit<CheckboxProps, 'aria-label'>;
1367
- export type ToggleGroupOption = {
1368
- /** The text that displays in the dropdown menu. */
1369
- label: string;
1370
- /** The unique value that is submitted with the form. */
1371
- value: string;
1372
- /** When set to `true`, the option will be selected by default. */
1373
- initialIsChecked?: boolean;
1374
- /** When set to `true`, the option cannot be selected. */
1375
- readonly?: boolean;
1376
- /** The string that displays below the toggle. */
1377
- description?: string;
1378
- };
1379
- interface ToggleGroupListBaseProps {
1380
- name: ToggleGroupProps['name'];
1381
- options: ToggleGroupProps['options'];
1382
- variant: ToggleGroupProps['variant'];
1383
- inline?: boolean;
1384
- }
1385
- export interface CheckboxListProps extends ToggleGroupListBaseProps {
1386
- value?: CheckboxGroupProps['value'];
1387
- onChange?: CheckboxGroupProps['onChange'];
1388
- }
1389
- export interface RadioButtonListProps extends ToggleGroupListBaseProps {
1390
- value?: RadioButtonGroupProps['value'];
1391
- onChange?: RadioButtonGroupProps['onChange'];
1392
- }
1393
- type ToggleType = 'checkboxList' | 'radioButtonList';
1394
- export interface CommonGroupProps {
1553
+ * Generic collection of props for select components
1554
+ * @internal
1555
+ * */
1556
+ export interface BaseSelectProps {
1395
1557
  /**
1396
- * Denotes the type of list to render.
1558
+ * The text that displays above to the dropdown menu.
1559
+ *
1397
1560
  */
1398
- toggleType?: ToggleType;
1561
+ label?: string;
1399
1562
  /**
1400
- * The unique identifier for the toggle group element.
1563
+ * The unique identifier for the select element.
1564
+ *
1401
1565
  */
1402
- name: string;
1566
+ name?: string;
1403
1567
  /**
1404
- * The label that displays above the toggle group.
1568
+ * When set to `true`, displays a required field indicator.
1569
+ *
1570
+ * @defaultValue `false`
1405
1571
  */
1406
- label: string;
1572
+ required?: boolean;
1407
1573
  /**
1408
- * The text to display if the input has an error.
1574
+ * When set to `true`, sets the field as read-only on the CRM record, and users will not be able to fill the input field.
1575
+ *
1576
+ * @defaultValue `false`
1409
1577
  */
1410
- validationMessage?: string;
1578
+ readOnly?: boolean;
1411
1579
  /**
1412
- * When set to `true`, displays a required indicator next to the toggle group.
1580
+ * Displayed text that describes the field's purpose.
1413
1581
  *
1414
- * @defaultValue `false`
1415
1582
  */
1416
- required?: boolean;
1583
+ description?: string;
1417
1584
  /**
1418
- * Text that will appear in a tooltip next to the toggle group label.
1585
+ * The text that displays in a tooltip next to the label.
1586
+ *
1419
1587
  */
1420
1588
  tooltip?: string;
1421
1589
  /**
1422
- * When set to `true`, `validationMessage` is displayed as an error message if provided. The input will also render its error state to let the user know there is an error. If left false, `validationMessage` is displayed as a success message.
1590
+ * Text that appears in the input when no value is set.
1591
+ *
1592
+ */
1593
+ placeholder?: string;
1594
+ /**
1595
+ * When set to `true`, `validationMessage` is displayed as an error message if provided.
1596
+ * The input will also render its error state to let the user know there's an error.
1597
+ * If left `false` (default), `validationMessage` is displayed as a success message.
1423
1598
  *
1424
1599
  * @defaultValue `false`
1425
1600
  */
1426
1601
  error?: boolean;
1427
1602
  /**
1428
- * An array of options to display in the dropdown menu.
1603
+ * The text to show if the input has an error.
1429
1604
  *
1430
- * @defaultValue `[]`
1431
1605
  */
1432
- options: Array<ToggleGroupOption>;
1606
+ validationMessage?: string;
1433
1607
  /**
1434
- * When set to `true`, stacks the options horizontally.
1435
- *
1436
- * @defaultValue `false`
1608
+ * The options to display in the dropdown menu.
1437
1609
  */
1438
- inline?: boolean;
1610
+ options: {
1611
+ /** Will be used as the display text. **/
1612
+ label: string;
1613
+ /** Should be the option's unique identifier, which is submitted with the form. **/
1614
+ value: string | number;
1615
+ }[];
1439
1616
  /**
1440
- * The size variation of the individual options.
1617
+ * The variant type for the select.
1441
1618
  *
1442
- * @defaultValue `"default"`
1619
+ * @defaultValue `"input"`
1443
1620
  */
1444
- variant?: 'default' | 'small';
1445
- value?: string[] | string;
1621
+ variant?: 'transparent' | 'input';
1446
1622
  }
1447
- type CheckboxGroupProps = {
1623
+ /**
1624
+ * The props type for {@link !components.Select}.
1625
+ *
1626
+ * @category Component Props
1627
+ */
1628
+ export interface SelectProps extends BaseSelectProps {
1448
1629
  /**
1449
- * Denotes the type of list to render.
1630
+ * The value of the select input.
1450
1631
  *
1451
- * @defaultValue `"checkboxList"`
1452
1632
  */
1453
- toggleType: 'checkboxList';
1633
+ value?: string | number;
1454
1634
  /**
1455
- * A function that is called with the new value or values when the list is updated.
1635
+ * A callback function that is invoked when the value is committed.
1456
1636
  *
1457
1637
  * @event
1458
1638
  */
1459
- onChange?: (value: string[]) => void;
1639
+ onChange?: (value: NonNullable<SelectProps['value']>) => void;
1460
1640
  /**
1461
- * The value of the toggle group.
1641
+ * The variant type for the select.
1642
+ *
1643
+ * @defaultValue `"input"`
1462
1644
  */
1463
- value?: string[];
1464
- } & CommonGroupProps;
1465
- type RadioButtonGroupProps = {
1645
+ variant?: 'transparent' | 'input';
1466
1646
  /**
1467
- * Denotes the type of list to render.
1647
+ * A function that is called and passed the value every time the search field is
1648
+ * edited by the user. Prefer updating state in onChange as it fires less
1649
+ * frequently, and if you need to update state here, consider debouncing your function.
1468
1650
  *
1469
- * @defaultValue `"checkboxList"`
1651
+ * @event
1470
1652
  */
1471
- toggleType: 'radioButtonList';
1653
+ onInput?: (value: string) => void;
1654
+ }
1655
+ /**
1656
+ * The props type for {@link !components.MultiSelect}.
1657
+ *
1658
+ * @category Component Props
1659
+ */
1660
+ export interface MultiSelectProps extends BaseSelectProps {
1472
1661
  /**
1473
- * A function that is called with the new value or values when the list is updated.
1662
+ * The value of the select input.
1474
1663
  *
1475
- * @event
1476
1664
  */
1477
- onChange?: (value: string) => void;
1665
+ value?: (string | number)[];
1478
1666
  /**
1479
- * The value of the toggle group.
1667
+ * A callback function that is invoked when the value is committed.
1668
+ *
1669
+ * @event
1480
1670
  */
1481
- value?: string;
1482
- } & CommonGroupProps;
1483
- type DefaultToggleTypeProps = {
1484
- toggleType?: never;
1485
- } & CheckboxGroupProps;
1671
+ onChange?: (value: NonNullable<MultiSelectProps['value']>) => void;
1672
+ }
1486
1673
  /**
1487
- * The props type for {@link !components.ToggleGroup}.
1674
+ * The props type for {@link !components.StatisticsTrend}.
1488
1675
  *
1489
- * @interface
1490
1676
  * @category Component Props
1491
1677
  */
1492
- export type ToggleGroupProps = CheckboxGroupProps | RadioButtonGroupProps | DefaultToggleTypeProps;
1493
- /** @ignore */
1494
- export interface UserContext {
1495
- id: number;
1496
- emails: string[];
1497
- email: string;
1498
- firstName: string;
1499
- lastName: string;
1500
- /** @deprecated Roles will always be empty. Please use teams instead */
1501
- roles: string[];
1502
- teams: Team[];
1503
- locale?: string;
1504
- }
1505
- /** @ignore */
1506
- export interface PortalContext {
1507
- id: number;
1508
- timezone: string;
1509
- }
1510
- /** @ignore */
1511
- export interface CrmRecordContext {
1512
- objectId: number;
1513
- objectTypeId: string;
1514
- }
1515
- /** @ignore */
1516
- export interface AppContext {
1517
- appId: number | string;
1518
- appName?: string;
1519
- cardTitle?: string;
1520
- }
1521
- /** @ignore */
1522
- export interface BaseContext {
1523
- user: UserContext;
1524
- portal: PortalContext;
1525
- }
1526
- /** @ignore */
1527
- export interface CrmContext extends BaseContext {
1528
- location: 'crm.record.tab' | 'crm.record.sidebar' | 'crm.preview' | 'helpdesk.sidebar';
1529
- crm: CrmRecordContext;
1530
- extension?: AppContext;
1531
- }
1532
- /** @ignore */
1533
- export interface SettingsContext extends BaseContext {
1534
- location: 'settings';
1535
- }
1536
- /** @ignore */
1537
- export interface GenericContext extends BaseContext {
1538
- location: 'uie.playground.middle';
1539
- }
1540
- export interface StackProps {
1541
- distance?: AllDistances;
1542
- children?: React.ReactNode;
1543
- direction?: 'row' | 'column';
1544
- justify?: 'center' | 'end' | 'start';
1545
- align?: 'start' | 'center' | 'baseline' | 'end' | 'stretch';
1546
- width?: 'auto' | '100%';
1678
+ export interface StatisticsTrendProps {
1679
+ /**
1680
+ * The text to be displayed as the trend value.
1681
+ */
1682
+ value: string;
1683
+ /**
1684
+ * The direction of the trend arrow.
1685
+ *
1686
+ * @defaultValue `"increase"`
1687
+ */
1688
+ direction: 'increase' | 'decrease';
1689
+ /**
1690
+ * The color of the trend arrow.
1691
+ */
1692
+ color?: 'red' | 'green';
1547
1693
  }
1548
1694
  /**
1549
- * The props type for {@link !components.Flex}.
1695
+ * The props type for {@link !components.StatisticsItem}.
1550
1696
  *
1551
1697
  * @category Component Props
1552
1698
  */
1553
- export interface FlexProps {
1699
+ export interface StatisticsItemProps {
1554
1700
  /**
1555
- * Sets the spacing between components.
1556
- *
1557
- * @defaultValue `"flush"`
1701
+ * The unique identifier.
1558
1702
  */
1559
- gap?: AllDistances;
1703
+ id?: string;
1560
1704
  /**
1561
- * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
1562
- *
1705
+ * The item's label text.
1706
+ */
1707
+ label: string;
1708
+ /**
1709
+ * The string to be displayed as the item's primary number.
1710
+ */
1711
+ number: string | number;
1712
+ /**
1713
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components. The children should be {@link !components.StatisticsTrend} or {@link !components.Text}.
1563
1714
  */
1564
1715
  children?: ReactNode;
1716
+ }
1717
+ /**
1718
+ * The props type for {@link !components.Statistics}.
1719
+ *
1720
+ * @category Component Props
1721
+ */
1722
+ export interface StatisticsProps {
1565
1723
  /**
1566
- * Arranges components `horizontally` or `vertically` by setting the main axis.
1724
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components. The children should be {@link !components.StatisticsItem}.
1725
+ */
1726
+ children: ReactNode;
1727
+ }
1728
+ /**
1729
+ * The props type for {@link !components.StatusTag}.
1730
+ *
1731
+ * @category Component Props
1732
+ */
1733
+ export interface StatusTagProps {
1734
+ /**
1735
+ * The status tag's indicator color.
1567
1736
  *
1568
- * @defaultValue `"row"`
1737
+ * @defaultValue `"default"`
1569
1738
  */
1570
- direction?: 'row' | 'column';
1739
+ variant?: 'danger' | 'warning' | 'info' | 'success' | 'default';
1571
1740
  /**
1572
- * Distributes components along the main axis using the available free space.
1741
+ * When set to true, the status tag's dot will be a ring instead.
1573
1742
  *
1574
- * @defaultValue `"start"`
1743
+ * @defaultValue `false `
1575
1744
  */
1576
- justify?: 'center' | 'end' | 'start' | 'around' | 'between';
1745
+ hollow?: boolean;
1577
1746
  /**
1578
- * Distributes components along the cross-axis using the available free space.
1747
+ * A function that will be invoked when the status tag is clicked. It receives no arguments and its return value is ignored.
1579
1748
  *
1580
- * @defaultValue `"stretch"`
1749
+ * @event
1581
1750
  */
1582
- align?: 'start' | 'center' | 'baseline' | 'end' | 'stretch';
1751
+ onClick?: () => void;
1583
1752
  /**
1584
- * Distributes a child component along the cross-axis using the available free space. Use this prop for nested child Flex and Box components to align them differently from other child components in the Flex.
1753
+ * When set to true, the status tag will show a small clickable 'x' icon.
1585
1754
  *
1755
+ * @defaultValue `false`
1586
1756
  */
1587
- alignSelf?: 'start' | 'center' | 'baseline' | 'end' | 'stretch';
1757
+ showRemoveIcon?: boolean;
1588
1758
  /**
1589
- * Whether components will wrap instead of trying to fit on one line.
1759
+ * A function that will be invoked when the 'x' icon is clicked. It receives no arguments and its return value is ignored.
1590
1760
  *
1591
- * @defaultValue `"nowrap"`
1761
+ * @event
1592
1762
  */
1593
- wrap?: boolean | 'wrap' | 'nowrap';
1763
+ onRemoveClick?: () => void;
1764
+ /**
1765
+ * Sets the content that will render inside the StatusTag. This prop is passed implicitly by providing sub-components. We recommend only using a small amount of text.
1766
+ */
1767
+ children: ReactNode;
1594
1768
  }
1595
1769
  /**
1596
- * The props type for {@link !components.StatisticsTrend}.
1770
+ * The props type for {@link !components.StepIndicator}.
1597
1771
  *
1598
1772
  * @category Component Props
1599
1773
  */
1600
- export interface StatisticsTrendProps {
1774
+ export interface StepIndicatorProps {
1601
1775
  /**
1602
- * The text to be displayed as the trend value.
1776
+ * An array containing the name of each step.
1603
1777
  */
1604
- value: string;
1778
+ stepNames: string[];
1605
1779
  /**
1606
- * The direction of the trend arrow.
1780
+ * The orientation of the indicator.
1607
1781
  *
1608
- * @defaultValue `"increase"`
1782
+ * @defaultValue `"horizontal"`
1609
1783
  */
1610
- direction: 'increase' | 'decrease';
1784
+ direction?: 'horizontal' | 'vertical';
1611
1785
  /**
1612
- * The color of the trend arrow.
1786
+ * The size of the indicator circles.
1787
+ *
1788
+ * @defaultValue `"small"`
1613
1789
  */
1614
- color?: 'red' | 'green';
1790
+ circleSize?: AllSizes;
1791
+ /**
1792
+ * The currently active step. Steps are 0-based.
1793
+ */
1794
+ currentStep?: number;
1795
+ /**
1796
+ * The visual style of the component.
1797
+ *
1798
+ * - default: default spacing.
1799
+ * - compact: only shows the title of the currently active step.
1800
+ * - flush: only shows the title of the currently active step and removes left and right margins.
1801
+ *
1802
+ * @defaultValue `"default"`
1803
+ */
1804
+ variant?: 'default' | 'compact' | 'flush';
1805
+ /**
1806
+ * A function that will be invoked when a step in the indicator is clicked. The function receives the current step index as an argument (zero-based). Use this to update the currently active step.
1807
+ *
1808
+ * @event
1809
+ */
1810
+ onClick?: (stepIndex: number) => void;
1811
+ }
1812
+ export interface AlignmentProps {
1813
+ align?: 'left' | 'center' | 'right';
1814
+ }
1815
+ export interface WidthProps {
1816
+ width?: 'min' | 'max' | 'auto' | number;
1817
+ }
1818
+ export interface TableElementProps {
1819
+ children: ReactNode;
1615
1820
  }
1616
1821
  /**
1617
- * The props type for {@link !components.StatisticsItem}.
1822
+ * @property align Sets the alignment of a table header.
1823
+ * @property width Sets the width of a table header.
1824
+ *
1825
+ * @interface
1826
+ */
1827
+ export type BaseTableHeaderProps = TableElementProps & AlignmentProps & WidthProps;
1828
+ export type TableCellProps = TableElementProps & AlignmentProps & WidthProps;
1829
+ /**
1830
+ * The props type for {@link !components.TableHeader} when sorted === never.
1618
1831
  *
1619
1832
  * @category Component Props
1620
1833
  */
1621
- export interface StatisticsItemProps {
1622
- /**
1623
- * The unique identifier.
1624
- */
1625
- id?: string;
1834
+ export interface UnSortedTableHeaderProps extends BaseTableHeaderProps {
1835
+ sortDirection?: 'never';
1836
+ }
1837
+ /**
1838
+ * The props type for {@link !components.TableHeader} when sorted !== never.
1839
+ *
1840
+ * @category Component Props
1841
+ */
1842
+ export interface SortedTableHeaderProps extends BaseTableHeaderProps {
1626
1843
  /**
1627
- * The item's label text.
1844
+ * Sets the current direction in which the column is sorted (if any). It's a visual indicator, it doesn't modify the data.
1845
+ *
1846
+ * @defaultValue `"none"`
1628
1847
  */
1629
- label: string;
1848
+ sortDirection: 'ascending' | 'descending' | 'none';
1630
1849
  /**
1631
- * The string to be displayed as the item's primary number.
1850
+ * A callback function that is invoked when the header is clicked. It recieves the new `sortDirection` as an argument.
1851
+ * It's required when sort = `ascending`, `descending` or `none`.
1852
+ *
1853
+ * @event
1854
+ * @defaultValue `"none"`
1632
1855
  */
1633
- number: string | number;
1856
+ onSortChange: (value: NonNullable<SortedTableHeaderProps['sortDirection']>) => void;
1634
1857
  /**
1635
- * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components. The children should be {@link !components.StatisticsTrend} or {@link !components.Text}.
1858
+ * If `true`, users cannot change the sort ordering. It has no effect if sort=`never` or `undefined`.
1859
+ *
1860
+ * @defaultValue `false`
1636
1861
  */
1637
- children?: ReactNode;
1862
+ disabled?: boolean;
1638
1863
  }
1639
1864
  /**
1640
- * The props type for {@link !components.Statistics}.
1865
+ * The props type for {@link !components.TableHeader}.
1641
1866
  *
1642
1867
  * @category Component Props
1643
1868
  */
1644
- export interface StatisticsProps {
1869
+ export type TableHeaderProps = SortedTableHeaderProps | UnSortedTableHeaderProps;
1870
+ interface BaseTableProps {
1645
1871
  /**
1646
- * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components. The children should be {@link !components.StatisticsItem}.
1872
+ * When set to false, the table will not have borders.
1873
+ *
1874
+ * @defaultValue `true`
1875
+ */
1876
+ bordered?: boolean;
1877
+ /**
1878
+ * When set to `true`, the table will not have bottom margin.
1879
+ *
1880
+ * @defaultValue `false`
1881
+ */
1882
+ flush?: boolean;
1883
+ /**
1884
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components. The children should be one of Table's subcomponents.
1647
1885
  */
1648
1886
  children: ReactNode;
1649
1887
  }
1650
1888
  /**
1651
- * @category Serverless
1889
+ * @internal
1652
1890
  */
1653
- export interface ServerlessRunnerParams {
1891
+ export interface TableNoPaginatedProps extends BaseTableProps {
1654
1892
  /**
1655
- * Name of the serverless function
1893
+ * When set to `true`, the table will include pagination navigation. Take a look at {@link !types.TablePaginatedProps} for pagination props.
1894
+ *
1895
+ * @defaultValue `false`
1656
1896
  */
1657
- name: string;
1897
+ paginated?: false;
1898
+ }
1899
+ /**
1900
+ * @internal
1901
+ */
1902
+ export interface TablePaginatedProps extends BaseTableProps {
1658
1903
  /**
1659
- * Names of CRM object properties to be retrieved and supplied to the function as `context.propertiesToSend`
1904
+ * When set to `true`, the table will include pagination navigation. Take a look at {@link !types.TablePaginatedProps} for pagination props.
1905
+ *
1906
+ * @defaultValue `false`
1660
1907
  */
1661
- propertiesToSend?: string[];
1908
+ paginated: true;
1662
1909
  /**
1663
- * Additional parameters to be supplied to the function as `context.parameters`
1910
+ * The total number of pages available.
1664
1911
  */
1665
- parameters?: JsonValue;
1912
+ pageCount: number;
1666
1913
  /**
1667
- * @deprecated Optional payload supplied to the function as `context.event.payload`.
1668
- * Support for this param may be removed in the future. Use `parameters` instead.
1914
+ * When set to `false`, hides the text labels for the First/Prev/Next buttons. The button labels will still be accessible to screen readers.
1915
+ *
1916
+ * @defaultValue `true`
1669
1917
  */
1670
- payload?: JsonValue;
1671
- }
1672
- /**
1673
- * @category Serverless
1674
- */
1675
- export declare enum ServerlessExecutionStatus {
1676
- Success = "SUCCESS",
1677
- Error = "ERROR"
1918
+ showButtonLabels?: boolean;
1919
+ /**
1920
+ * When set to `true`, displays the **First/Last** page buttons.
1921
+ *
1922
+ * @defaultValue `false`
1923
+ */
1924
+ showFirstLastButtons?: boolean;
1925
+ /**
1926
+ * Sets how many page buttons are displayed.
1927
+ */
1928
+ maxVisiblePageButtons?: number;
1929
+ /**
1930
+ * Denotes the current page.
1931
+ */
1932
+ page?: number;
1933
+ /**
1934
+ * A function that will be invoked when the pagination button is clicked. It receives the new page number as argument.
1935
+ *
1936
+ * @event
1937
+ */
1938
+ onPageChange: (pageNumber: number) => void;
1678
1939
  }
1679
1940
  /**
1680
- * @category Serverless
1941
+ * The props type for {@link !components.Table}.
1942
+ *
1943
+ * @category Component Props
1681
1944
  */
1682
- export type ServerlessExecutionResult = {
1683
- status: ServerlessExecutionStatus.Success;
1684
- response: JsonValue;
1685
- } | {
1686
- status: ServerlessExecutionStatus.Error;
1687
- message: string;
1688
- };
1945
+ export type TableProps = TableNoPaginatedProps | TablePaginatedProps;
1946
+ export interface TabsProps {
1947
+ /**
1948
+ * Sets the content that will render inside the component.
1949
+ */
1950
+ children?: ReactNode;
1951
+ /**
1952
+ * Callback when the selected tab changes.
1953
+ */
1954
+ onSelectedChange?: ((selectedId: string) => void) | ((selectedId: number) => void) | ((selectedId: number | string) => void);
1955
+ /**
1956
+ * The initially selected tab ID.
1957
+ */
1958
+ defaultSelected?: string | number;
1959
+ /**
1960
+ * The currently selected tab ID (controlled component).
1961
+ */
1962
+ selected?: string | number;
1963
+ /**
1964
+ * Visual style variant of the tabs.
1965
+ * @defaultValue 'default'
1966
+ */
1967
+ variant?: 'default' | 'enclosed';
1968
+ /**
1969
+ * Whether the tab should fill available space.
1970
+ */
1971
+ fill?: boolean;
1972
+ }
1973
+ export interface TabProps {
1974
+ /**
1975
+ * Whether the tab is disabled.
1976
+ */
1977
+ disabled?: boolean;
1978
+ /**
1979
+ * Unique identifier for the tab.
1980
+ */
1981
+ tabId?: string | number;
1982
+ /**
1983
+ * The title text of the tab.
1984
+ */
1985
+ title?: string;
1986
+ /**
1987
+ * The content to display when this tab is selected.
1988
+ */
1989
+ children?: ReactNode;
1990
+ /**
1991
+ * The tooltip text of the tab.
1992
+ */
1993
+ tooltip?: string;
1994
+ /**
1995
+ * The tab's tooltip placement
1996
+ * @defaultValue 'top'
1997
+ */
1998
+ tooltipPlacement?: 'top' | 'bottom' | 'left' | 'right';
1999
+ }
1689
2000
  /**
1690
- * @category Serverless
2001
+ * The props type for {@link !components.Tag}.
2002
+ *
2003
+ * @category Component Props
1691
2004
  */
1692
- export type ServerlessFuncRunner = (params: ServerlessRunnerParams) => Promise<ServerlessExecutionResult>;
2005
+ export interface TagProps extends OverlayComponentProps {
2006
+ /**
2007
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
2008
+ */
2009
+ children: ReactNode;
2010
+ /**
2011
+ * The tag's color. The following variants are available.
2012
+ *
2013
+ * @defaultValue `"default"`
2014
+ */
2015
+ variant?: 'default' | 'warning' | 'success' | 'error' | 'info';
2016
+ /**
2017
+ * A function that will be invoked when the tag is clicked.
2018
+ *
2019
+ * @event
2020
+ */
2021
+ onClick?: ReactionsHandler<ExtensionEvent>;
2022
+ /**
2023
+ * When set to true, this component can be aligned side-by-side with text.
2024
+ *
2025
+ * @defaultValue `false`
2026
+ */
2027
+ inline?: boolean;
2028
+ }
1693
2029
  /**
1694
- * @ignore
1695
- * @category Serverless
2030
+ * @internal
2031
+ * Format options for text component.
1696
2032
  */
1697
- export interface ServerlessExecutionRequest {
1698
- appId: number;
1699
- extensibleCardId: number;
1700
- serverlessFunction: string;
1701
- location: keyof ExtensionPoints;
1702
- objectQuery?: {
1703
- objectId: number;
1704
- objectTypeId: string;
1705
- objectPropertyNames: string[];
1706
- };
1707
- parameters?: JsonValue;
1708
- event?: {
1709
- type: 'SERVERLESS_ACTION_HOOK';
1710
- payload: JsonValue;
1711
- };
1712
- objectId?: number;
1713
- objectTypeId?: string;
2033
+ export interface TextFormatOptions {
2034
+ /**
2035
+ * Weight of the font.
2036
+ *
2037
+ * @defaultValue `"regular"`
2038
+ */
2039
+ fontWeight?: 'regular' | 'bold' | 'demibold';
2040
+ /**
2041
+ * If `true`, font will be in italicized.
2042
+ *
2043
+ * @defaultValue `false`
2044
+ */
2045
+ italic?: boolean;
2046
+ /**
2047
+ * Line decoration of the font.
2048
+ *
2049
+ * @defaultValue `"none"`
2050
+ */
2051
+ lineDecoration?: 'none' | 'underline' | 'strikethrough';
2052
+ /**
2053
+ * Controls the capitalization of text.
2054
+ *
2055
+ * - `none`: No capitalization changes (default)
2056
+ * - `uppercase`: Transforms all characters to uppercase
2057
+ * - `lowercase`: Transforms all characters to lowercase
2058
+ * - `capitalize`: Capitalizes the first letter of each word
2059
+ * - `sentenceCase`: Capitalizes the first letter of the text and makes the rest lowercase
2060
+ *
2061
+ * @defaultValue `"none"`
2062
+ */
2063
+ textTransform?: 'none' | 'uppercase' | 'lowercase' | 'capitalize' | 'sentenceCase';
2064
+ }
2065
+ export interface TruncateOptions {
2066
+ maxWidth?: number;
2067
+ tooltipText?: string;
1714
2068
  }
1715
2069
  /**
1716
- * @category Serverless
2070
+ * The props type for {@link !components.Text}.
2071
+ *
2072
+ * @interface
2073
+ * @category Component Props
1717
2074
  */
1718
- export interface ServerlessExecutionResponse {
1719
- logId: string;
1720
- response?: JsonValue;
2075
+ export type TextProps = {
2076
+ /**
2077
+ * The style of text to display. Can be either of:
2078
+ *
2079
+ * - bodytext: the default value which renders the standard text size.
2080
+ * - microcopy: smaller text used for adding context.
2081
+ *
2082
+ * @defaultValue `"bodytext"`
2083
+ */
2084
+ variant?: 'bodytext' | 'microcopy';
2085
+ /**
2086
+ * When set to `true`, inserts a line break.
2087
+ *
2088
+ * @defaultValue `false`
2089
+ */
2090
+ inline?: boolean;
2091
+ /**
2092
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
2093
+ */
2094
+ children: ReactNode;
2095
+ /**
2096
+ * @interface
2097
+ * The style of text to display. Can be any of:
2098
+ *
2099
+ * - { fontWeight: 'bold' }
2100
+ * - { fontWeight: 'demibold' }
2101
+ * - { italic: true }
2102
+ * - { lineDecoration: 'strikethrough' }
2103
+ * - { lineDecoration: 'underline' }
2104
+ * - <Text inline={true}>
2105
+ */
2106
+ format?: TextFormatOptions;
2107
+ /**
2108
+ * @interface
2109
+ * truncates long strings to a single line. If the full string doesn't fit in one line,
2110
+ * it's shown in a tooltip on hover.
2111
+ *
2112
+ * - `false` => no truncation(default).
2113
+ * - `true` => truncates the string to a single line. Full-text will show inside the tooltip.
2114
+ * - { tooltipText: 'some text' } => truncates the string and lets you control the contents of the tooltip.
2115
+ * - { maxWidth: 150 } => sets the width(in pixel) of the line.
2116
+ *
2117
+ * @defaultValue `false`
2118
+ */
2119
+ truncate?: boolean | TruncateOptions;
2120
+ };
2121
+ /**
2122
+ * The props type for {@link !components.Tile}.
2123
+ *
2124
+ * @category Component Props
2125
+ */
2126
+ export interface TileProps {
2127
+ /**
2128
+ * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
2129
+ */
2130
+ children: ReactNode;
2131
+ /**
2132
+ * When set to `true`, reduces the default amount of padding around the contents of the Tile.
2133
+ *
2134
+ * @defaultValue `false`
2135
+ */
2136
+ compact?: boolean;
2137
+ /**
2138
+ * When set to `true`, removes left and right padding from tile contents.
2139
+ *
2140
+ * @defaultValue `false`
2141
+ */
2142
+ flush?: boolean;
1721
2143
  }
1722
2144
  /**
1723
- * @category Serverless
2145
+ * The props type for {@link !components.Toggle}.
2146
+ *
2147
+ * @category Component Props
1724
2148
  */
1725
- export interface ServerlessErrorResponse {
1726
- responseJSON?: {
1727
- message: string;
1728
- correlationId: string;
1729
- category: string;
1730
- subCategory?: string;
1731
- errors?: {
1732
- message: string;
1733
- subCategory: string;
1734
- }[];
1735
- };
1736
- status: number;
1737
- }
1738
- /** @ignore */
1739
- export interface BaseExtensionContextData {
1740
- appId: number | string;
1741
- appName?: string;
1742
- cardId: string;
1743
- cardTitle?: string;
1744
- location: keyof ExtensionPoints;
1745
- sourceId?: string | null;
1746
- appAccessLevel: 'PUBLIC' | 'PRIVATE';
1747
- additionalProperties?: {
1748
- [key: string]: string;
1749
- } | null;
1750
- }
1751
- /** @ignore */
1752
- export interface CrmExtensionContextData extends BaseExtensionContextData {
1753
- objectId: number | string;
1754
- objectTypeId: string;
1755
- }
1756
- /** @ignore */
1757
- export type ExtensionPointAction = (...args: any[]) => Promise<any> | void;
1758
- /** @ignore */
1759
- export interface ExtensionPointContract {
1760
- actions?: {
1761
- [k: string]: ExtensionPointAction;
1762
- } | {};
1763
- context: BaseContext;
1764
- customComponents: Record<string, ComponentType<any>>;
1765
- }
1766
- /** @ignore */
1767
- type AlertType = 'info' | 'warning' | 'success' | 'danger' | 'tip' | undefined;
1768
- /** @ignore */
1769
- export type AddAlertAction = (args: {
1770
- type?: AlertType;
1771
- message: string;
1772
- title?: string;
1773
- }) => void;
1774
- /** @ignore */
1775
- export type ReloadPageAction = () => void;
1776
- /** @ignore */
1777
- export type FetchCrmObjectPropertiesAction = (properties: string[] | '*') => Promise<Record<string, string>>;
1778
- /** @ignore */
1779
- export type OpenIframeModalAction = (action: OpenIframeActionPayload, onClose?: () => void) => void;
1780
- /** @ignore */
1781
- export type refreshObjectPropertiesAction = () => void;
1782
- /** @ignore */
1783
- export type onCrmPropertiesUpdateAction = (properties: string[] | '*', callback: (properties: Record<string, string>, error?: {
1784
- message: string;
1785
- }) => void) => void;
1786
- /** @ignore */
1787
- export type CloseOverlayAction = (id: string) => void;
1788
- /** @ignore */
1789
- export interface CrmHostActions {
1790
- addAlert: AddAlertAction;
1791
- reloadPage: ReloadPageAction;
1792
- fetchCrmObjectProperties: FetchCrmObjectPropertiesAction;
1793
- openIframeModal: OpenIframeModalAction;
1794
- refreshObjectProperties: refreshObjectPropertiesAction;
1795
- onCrmPropertiesUpdate: onCrmPropertiesUpdateAction;
1796
- }
1797
- /** @ignore */
1798
- export interface UiePlatformActions {
1799
- copyTextToClipboard: Clipboard['writeText'];
1800
- closeOverlay: CloseOverlayAction;
1801
- reloadPage: ReloadPageAction;
1802
- }
1803
- /** @ignore */
1804
- export interface StandardCrmExtensionPoint extends ExtensionPointContract {
1805
- actions: CrmHostActions & UiePlatformActions;
1806
- context: CrmContext;
1807
- customComponents: {
1808
- CrmPropertyList: ComponentType<CrmPropertyListProps>;
1809
- CrmAssociationTable: ComponentType<CrmAssociationTableProps>;
1810
- CrmDataHighlight: ComponentType<CrmDataHighlightProps>;
1811
- CrmReport: ComponentType<CrmReportProps>;
1812
- CrmAssociationPivot: ComponentType<CrmAssociationPivotProps>;
1813
- CrmAssociationPropertyList: ComponentType<CrmAssociationPropertyListProps>;
1814
- CrmAssociationStageTracker?: ComponentType<CrmAssociationStageTrackerProps>;
1815
- CrmSimpleDeadline?: ComponentType<CrmSimpleDeadlineProps>;
1816
- CrmRelativeTimeline?: ComponentType<CrmRelativeTimelineProps>;
1817
- CrmStageTracker: ComponentType<CrmStageTrackerProps>;
1818
- CrmStatistics?: ComponentType<CrmStatisticsProps>;
1819
- CrmActionButton?: ComponentType<CrmActionButtonProps>;
1820
- CrmActionLink?: ComponentType<CrmActionLinkProps>;
1821
- CrmCardActions?: ComponentType<CrmCardActionsProps>;
1822
- };
1823
- }
1824
- /** @deprecated this interface has been replaced by StandardCrmExtensionPoint */
1825
- export interface CrmMiddleExtensionPoint extends ExtensionPointContract {
1826
- actions: CrmHostActions;
1827
- context: CrmContext;
1828
- customComponents: {
1829
- CrmPropertyList: ComponentType<CrmPropertyListProps>;
1830
- CrmAssociationTable: ComponentType<CrmAssociationTableProps>;
1831
- CrmDataHighlight: ComponentType<CrmDataHighlightProps>;
1832
- CrmReport: ComponentType<CrmReportProps>;
1833
- CrmAssociationPivot: ComponentType<CrmAssociationPivotProps>;
1834
- CrmAssociationPropertyList: ComponentType<CrmAssociationPropertyListProps>;
1835
- CrmAssociationStageTracker?: ComponentType<CrmAssociationStageTrackerProps>;
1836
- CrmSimpleDeadline?: ComponentType<CrmSimpleDeadlineProps>;
1837
- CrmRelativeTimeline?: ComponentType<CrmRelativeTimelineProps>;
1838
- CrmStageTracker: ComponentType<CrmStageTrackerProps>;
1839
- CrmStatistics?: ComponentType<CrmStatisticsProps>;
1840
- CrmActionButton?: ComponentType<CrmActionButtonProps>;
1841
- CrmActionLink?: ComponentType<CrmActionLinkProps>;
1842
- CrmCardActions?: ComponentType<CrmCardActionsProps>;
1843
- };
1844
- }
1845
- /** @ignore */
1846
- export interface CrmSidebarExtensionPoint extends ExtensionPointContract {
1847
- actions: CrmHostActions & UiePlatformActions;
1848
- context: CrmContext;
1849
- customComponents: {
1850
- CrmActionButton?: ComponentType<CrmActionButtonProps>;
1851
- CrmActionLink?: ComponentType<CrmActionLinkProps>;
1852
- };
1853
- }
1854
- /** @ignore */
1855
- export interface SettingsExtensionPoint extends ExtensionPointContract {
1856
- actions: UiePlatformActions;
1857
- context: SettingsContext;
1858
- }
1859
- /** @ignore */
1860
- export interface CrmDataHighlightProps {
1861
- properties: Array<string>;
1862
- objectTypeId?: string;
1863
- objectId?: number;
1864
- }
1865
- /** @ignore */
1866
- export interface CrmReportProps {
1867
- reportId: string;
1868
- use?: 'associations' | 'subject' | 'unfiltered';
1869
- }
1870
- /** @ignore */
1871
- export interface CrmPropertyListProps {
1872
- properties: Array<string>;
1873
- direction?: string;
1874
- objectTypeId?: string;
1875
- objectId?: number;
1876
- }
1877
- /** @ignore */
1878
- type CrmSortDescriptor = {
1879
- columnName: string;
1880
- direction: 1 | -1;
1881
- };
1882
- /** @ignore */
1883
- interface CrmSearchFilter {
1884
- operator: 'EQ' | 'NEQ' | 'LT' | 'LTE' | 'GT' | 'GTE' | 'BETWEEN' | 'IN' | 'NOT_IN' | 'HAS_PROPERTY' | 'NOT_HAS_PROPERTY';
1885
- value?: string | number;
1886
- values?: string | number;
1887
- highValue?: string | number;
1888
- property: string;
1889
- }
1890
- /** @ignore */
1891
- export interface CrmAssociationTableProps {
1892
- objectTypeId: string;
1893
- propertyColumns: Array<string>;
1894
- quickFilterProperties?: Array<string>;
1895
- searchable?: boolean;
1896
- pagination?: boolean;
1897
- associationLabelFilter?: boolean;
1898
- pageSize?: number;
1899
- preFilters?: Array<CrmSearchFilter>;
1900
- sort?: Array<CrmSortDescriptor>;
1901
- }
1902
- /** @ignore */
1903
- export interface CrmAssociationPivotProps {
1904
- objectTypeId: string;
1905
- associationLabels?: Array<string>;
1906
- maxAssociations?: number;
1907
- preFilters?: Array<CrmSearchFilter>;
1908
- sort?: Array<CrmSortDescriptor>;
1909
- }
1910
- /** @ignore */
1911
- export interface CrmAssociationPropertyListProps {
1912
- objectTypeId: string;
1913
- properties: Array<string>;
1914
- associationLabels?: Array<string>;
1915
- filters?: Array<CrmSearchFilter>;
1916
- sort?: Array<CrmSortDescriptor>;
1917
- }
1918
- /** @ignore */
1919
- export interface CrmAssociationStageTrackerProps {
1920
- objectTypeId: string;
1921
- properties: Array<string>;
1922
- associationLabels?: Array<string>;
1923
- filters?: Array<CrmSearchFilter>;
1924
- showProperties?: boolean;
1925
- sort?: Array<CrmSortDescriptor>;
1926
- }
1927
- /** @ignore */
1928
- export interface CrmSimpleDeadlineProps {
1929
- endDatePropertyName: string;
1930
- properties: Array<string>;
1931
- progressTheme?: ProgressTheme;
1932
- showProperties?: boolean;
1933
- startDatePropertyName: string;
1934
- }
1935
- /** @ignore */
1936
- export interface CrmRelativeTimelineProps {
1937
- properties: Array<string>;
1938
- }
1939
- /** @ignore */
1940
- export interface CrmStageTrackerProps {
1941
- objectId?: number;
1942
- objectTypeId?: string;
1943
- properties: Array<string>;
1944
- showProperties?: boolean;
1945
- }
1946
- /** @ignore */
1947
- interface BaseCrmStatisticItem {
1948
- label: string;
1949
- }
1950
- /** @ignore */
1951
- interface FilterGroup {
1952
- filters: Array<CrmSearchFilter>;
1953
- }
1954
- /** @ignore */
1955
- interface ProgressTheme {
1956
- backgroundColor?: string;
1957
- completedColor?: string;
1958
- upcomingColor?: string;
1959
- borderRadius?: string | number;
1960
- height?: string | number;
1961
- completedGradient?: Gradient;
1962
- upcomingGradient?: Gradient;
1963
- }
1964
- /** @ignore */
1965
- interface Gradient {
1966
- startColor: string;
1967
- endColor: string;
1968
- }
1969
- /** @ignore */
1970
- interface BasicMetricItem extends BaseCrmStatisticItem {
1971
- statisticType: 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'DISTINCT_APPROX' | 'COUNT';
1972
- propertyName: string;
1973
- filterGroups?: Array<FilterGroup>;
1974
- }
1975
- /** @ignore */
1976
- interface PercentileMetricItem extends BaseCrmStatisticItem {
1977
- statisticType: 'PERCENTILES';
1978
- propertyName: string;
1979
- percentile: number;
1980
- filterGroups?: Array<FilterGroup>;
1981
- }
1982
- /** @ignore */
1983
- type CrmStatisticItem = BasicMetricItem | PercentileMetricItem;
1984
- /** @ignore */
1985
- export interface CrmStatisticsProps {
1986
- objectTypeId: string;
1987
- statistics: Array<CrmStatisticItem>;
1988
- }
1989
- /** @ignore */
1990
- interface ObjectCoordinates {
1991
- objectTypeId: string;
1992
- objectId: number;
1993
- }
1994
- /** @ignore */
1995
- interface OpenRecordAssociationFormArgs {
1996
- objectTypeId: string;
1997
- association: {
1998
- objectTypeId: string;
1999
- objectId: number;
2000
- };
2001
- }
2002
- /** @ignore */
2003
- interface ActivityCreatorActionArgs {
2004
- objectTypeId: string;
2005
- objectId: number;
2006
- windowVariant?: 'windowed' | 'fullscreen';
2007
- }
2008
- /** @ignore */
2009
- interface EngagementAppLinkArgs {
2010
- objectId: number | string;
2011
- objectTypeId: string;
2012
- engagementId: number | string;
2013
- external?: boolean;
2014
- }
2015
- /** @ignore */
2016
- interface RecordAppLinkArgs {
2017
- includeEschref?: boolean;
2018
- objectId: number;
2019
- objectTypeId: string;
2020
- external?: boolean;
2021
- }
2022
- /** @ignore */
2023
- interface PageAppLinkArgs {
2024
- path: string;
2025
- external?: boolean;
2026
- }
2027
- /** @ignore */
2028
- interface ExternalUrlArgs {
2029
- href: string;
2030
- }
2031
- interface OpenRecordCreatorFormArgs {
2032
- objectTypeId: string;
2033
- }
2034
- /** @ignore */
2035
- interface ActionArgs {
2036
- PREVIEW_OBJECT: ObjectCoordinates;
2037
- ADD_NOTE: ActivityCreatorActionArgs;
2038
- ADD_TASK: ActivityCreatorActionArgs;
2039
- SEND_EMAIL: ActivityCreatorActionArgs;
2040
- SCHEDULE_MEETING: ActivityCreatorActionArgs;
2041
- OPEN_RECORD_CREATOR_FORM: OpenRecordCreatorFormArgs;
2042
- OPEN_RECORD_ASSOCIATION_FORM: OpenRecordAssociationFormArgs;
2043
- ENGAGEMENT_APP_LINK: EngagementAppLinkArgs;
2044
- RECORD_APP_LINK: RecordAppLinkArgs;
2045
- PAGE_APP_LINK: PageAppLinkArgs;
2046
- EXTERNAL_URL: ExternalUrlArgs;
2047
- OPEN_WORKFLOW_ENROLLMENT_MODAL: ObjectCoordinates;
2048
- }
2049
- /** @ignore */
2050
- export type ArgsFor<SpecificActionType extends ActionType> = ActionArgs[SpecificActionType];
2051
- export type ActionType = 'PREVIEW_OBJECT' | 'ADD_NOTE' | 'ADD_TASK' | 'SEND_EMAIL' | 'SCHEDULE_MEETING' | 'OPEN_RECORD_CREATOR_FORM' | 'OPEN_RECORD_ASSOCIATION_FORM' | 'ENGAGEMENT_APP_LINK' | 'RECORD_APP_LINK' | 'PAGE_APP_LINK' | 'EXTERNAL_URL' | 'OPEN_WORKFLOW_ENROLLMENT_MODAL';
2052
- /** @ignore */
2053
- interface BaseActionComponent {
2054
- children: ReactNode;
2055
- actionType: ActionType;
2056
- actionContext: ArgsFor<ActionType>;
2057
- onError?: (errors: string[]) => void;
2058
- }
2059
- /** @ignore */
2060
- export interface CrmActionButtonProps extends BaseActionComponent {
2061
- variant?: 'primary' | 'secondary' | 'destructive';
2062
- type?: 'button' | 'reset' | 'submit';
2063
- size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
2064
- onClick?: () => void;
2065
- }
2066
- /** @ignore */
2067
- export interface CrmActionLinkProps extends BaseActionComponent {
2068
- variant?: 'primary' | 'light' | 'dark' | 'destructive';
2069
- }
2070
- /** @ignore */
2071
- export interface ActionLibraryButtonCardActionConfig<SpecificActionType extends ActionType = ActionType> {
2072
- type: 'action-library-button';
2073
- actionType: SpecificActionType;
2074
- actionContext: ArgsFor<SpecificActionType>;
2075
- label?: string;
2076
- disabled?: boolean;
2077
- tooltipText?: string;
2078
- }
2079
- /** @ignore */
2080
- export type DropdownCardActionConfigOptions = [
2081
- ActionLibraryButtonCardActionConfig,
2082
- ...ActionLibraryButtonCardActionConfig[]
2083
- ];
2084
- /** @ignore */
2085
- export interface DropdownCardActionConfig {
2086
- type: 'dropdown';
2087
- options: DropdownCardActionConfigOptions;
2088
- label?: string;
2089
- disabled?: boolean;
2090
- tooltipText?: string;
2091
- }
2092
- /** @ignore */
2093
- type ErrorHandler = (errors: string[]) => void;
2094
- /** @ignore */
2095
- type CardActionConfig = ActionLibraryButtonCardActionConfig | DropdownCardActionConfig;
2096
- /** @ignore */
2097
- export type CrmCardActionsProps = {
2098
- actionConfigs: Array<CardActionConfig>;
2099
- onError?: ErrorHandler;
2100
- };
2101
- /** @ignore */
2102
- interface RemotePlaygroundExtensionPoint extends ExtensionPointContract {
2103
- actions: {
2104
- warn: () => void;
2105
- };
2106
- context: GenericContext;
2107
- customComponents: {
2108
- ExampleCrmComponent: ComponentType<ExampleCrmComponentProps>;
2109
- };
2110
- }
2111
- export declare const EXTENSION_POINT_LOCATIONS: readonly ["crm.preview", "crm.record.sidebar", "crm.record.tab", "helpdesk.sidebar", "uie.playground.middle", "settings"];
2112
- export type ExtensionPointLocation = TypesOfReadOnlyArray<typeof EXTENSION_POINT_LOCATIONS>;
2113
- /** @ignore */
2114
- interface LocationToExtensionPoint {
2115
- 'uie.playground.middle': RemotePlaygroundExtensionPoint;
2116
- 'crm.record.tab': StandardCrmExtensionPoint;
2117
- 'crm.preview': StandardCrmExtensionPoint;
2118
- 'crm.record.sidebar': CrmSidebarExtensionPoint;
2119
- 'helpdesk.sidebar': StandardCrmExtensionPoint;
2120
- settings: SettingsExtensionPoint;
2121
- }
2122
- /**
2123
- * While this resolves to the same result as LocationToExtensionPoint, it ensures that every location
2124
- * from ExtensionPointLocation is explicitly included. This way, EXTENSION_POINT_LOCATIONS becomes
2125
- * the single source of truth for defining all locations.
2126
- */
2127
- type _ExtensionPoints = {
2128
- [key in ExtensionPointLocation]: LocationToExtensionPoint[key];
2129
- };
2130
- export interface ExtensionPoints extends _ExtensionPoints {
2131
- }
2132
- export interface ExampleCrmComponentProps {
2133
- name: string;
2134
- size: 'sm' | 'md' | 'lg';
2135
- count: number;
2136
- }
2137
- /** @ignore */
2138
- export type PanelAction = (panelId: string) => void;
2139
- /** @ignore */
2140
- export type ModalAction = (modalId: string) => void;
2141
- /** @ignore */
2142
- export interface Reactions {
2143
- openPanel: PanelAction;
2144
- closePanel: PanelAction;
2145
- openModal: ModalAction;
2146
- closeModal: ModalAction;
2147
- }
2148
- /** @ignore */
2149
- export interface ExtensionPointApi<ExtensionPointName extends keyof ExtensionPoints> {
2150
- runServerlessFunction: ServerlessFuncRunner;
2151
- actions: ExtensionPoints[ExtensionPointName]['actions'];
2152
- context: ExtensionPoints[ExtensionPointName]['context'];
2153
- }
2154
- /** @ignore */
2155
- interface OpenIframeActionPayload {
2156
- uri: string;
2157
- height: number;
2158
- width: number;
2159
- /** @deprecated This property is no longer functional and has no effect. Please avoid using it, as it will be removed in future updates */
2160
- associatedObjectProperties?: string[];
2161
- title?: string;
2162
- flush?: boolean;
2163
- }
2164
- /**
2165
- * The props type for {@link !components.LoadingSpinner}.
2166
- *
2167
- * @category Component Props
2168
- */
2169
- export interface LoadingSpinnerProps {
2149
+ export interface ToggleProps {
2150
+ /**
2151
+ * The current status of the input.
2152
+ */
2153
+ checked?: boolean;
2154
+ /**
2155
+ * When set to `true`, the option cannot be selected.
2156
+ */
2157
+ readonly?: boolean;
2158
+ /**
2159
+ * The unique identifier for the toggle element.
2160
+ */
2161
+ name?: string;
2162
+ /**
2163
+ * The size variation of the toggle.
2164
+ *
2165
+ * @defaultValue `"medium"`
2166
+ */
2167
+ size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'] | 'default';
2170
2168
  /**
2171
- * The text that displays next to the spinner.
2169
+ * A function that is called when the `checked` input status changes.
2172
2170
  *
2171
+ * @event
2172
+ */
2173
+ onChange?: (checked: boolean) => void;
2174
+ /**
2175
+ * When set to `true`, the option will be selected by default. Use it to
2176
+ * set the default `checked` state when the component is **uncontrolled**.
2177
+ */
2178
+ initialIsChecked?: boolean;
2179
+ /**
2180
+ * The companion text of for Toggle. It can be displayed on top,
2181
+ * inline, or hidden. When hidden, it will remain usable for screen readers.
2173
2182
  */
2174
2183
  label: string;
2175
2184
  /**
2176
- * When set to `true`, the label will appear next to the spinner.
2185
+ * Controls the display setting of the label prop.
2177
2186
  *
2178
- * @defaultValue `false`
2187
+ * @defaultValue `"inline"`
2179
2188
  */
2180
- showLabel?: boolean;
2189
+ labelDisplay?: 'inline' | 'top' | 'hidden';
2181
2190
  /**
2182
- * The size of the spinner.
2191
+ * The text that appears on the Toggle when `checked={true}`.
2183
2192
  *
2184
- * @defaultValue `"sm"`
2193
+ * @defaultValue `"ON"`
2185
2194
  */
2186
- size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
2195
+ textChecked?: string;
2187
2196
  /**
2188
- * The position of the spinner. Can be one of `inline` or `centered`.
2197
+ * The text that appears on the Toggle when `checked={false}`.
2189
2198
  *
2190
- * @defaultValue `"inline"`
2199
+ * @defaultValue `"ON"`
2191
2200
  */
2192
- layout?: 'inline' | 'centered';
2193
- }
2194
- export interface AlignmentProps {
2195
- align?: 'left' | 'center' | 'right';
2196
- }
2197
- export interface WidthProps {
2198
- width?: 'min' | 'max' | 'auto' | number;
2199
- }
2200
- export interface TableElementProps {
2201
- children: React.ReactNode;
2202
- }
2203
- /**
2204
- * @property align Sets the alignment of a table header.
2205
- * @property width Sets the width of a table header.
2206
- *
2207
- * @interface
2208
- */
2209
- export type BaseTableHeaderProps = TableElementProps & AlignmentProps & WidthProps;
2210
- export type TableCellProps = TableElementProps & AlignmentProps & WidthProps;
2211
- /**
2212
- * The props type for {@link !components.TableHeader} when sorted === never.
2213
- *
2214
- * @category Component Props
2215
- */
2216
- export interface UnSortedTableHeaderProps extends BaseTableHeaderProps {
2217
- sortDirection?: 'never';
2201
+ textUnchecked?: string;
2218
2202
  }
2219
2203
  /**
2220
- * The props type for {@link !components.TableHeader} when sorted !== never.
2204
+ * The props type for {@link !components.Checkbox}.
2221
2205
  *
2222
2206
  * @category Component Props
2223
2207
  */
2224
- export interface SortedTableHeaderProps extends BaseTableHeaderProps {
2208
+ export interface CheckboxProps {
2225
2209
  /**
2226
- * Sets the current direction in which the column is sorted (if any). It's a visual indicator, it doesn't modify the data.
2210
+ * A string representing the value of the input. This is not displayed on the client-side,
2211
+ * but on the server this is the value given to the data submitted with the checkbox's name.
2212
+ */
2213
+ value?: string;
2214
+ /**
2215
+ * The current status of the input.
2216
+ */
2217
+ checked?: boolean;
2218
+ /** @deprecated use readOnly instead */
2219
+ readonly?: boolean;
2220
+ /**
2221
+ * When set to `true`, the option cannot be selected.
2222
+ */
2223
+ readOnly?: boolean;
2224
+ /**
2225
+ * The string that displays below the toggle.
2226
+ */
2227
+ description?: string;
2228
+ /**
2229
+ * The unique identifier for the checkbox element.
2230
+ */
2231
+ name?: string;
2232
+ /**
2233
+ * The size variation of the checkbox.
2227
2234
  *
2228
- * @defaultValue `"none"`
2235
+ * @defaultValue `"default"`
2229
2236
  */
2230
- sortDirection: 'ascending' | 'descending' | 'none';
2237
+ variant?: 'default' | 'small';
2231
2238
  /**
2232
- * A callback function that is invoked when the header is clicked. It recieves the new `sortDirection` as an argument.
2233
- * It's required when sort = `ascending`, `descending` or `none`.
2239
+ * A function that is called when the `checked` input status changes.
2234
2240
  *
2235
2241
  * @event
2236
- * @defaultValue `"none"`
2237
2242
  */
2238
- onSortChange: (value: NonNullable<SortedTableHeaderProps['sortDirection']>) => void;
2243
+ onChange?: (checked: boolean, value: string) => void;
2244
+ /** The text that displays in the dropdown menu. */
2245
+ children?: React.ReactNode;
2239
2246
  /**
2240
- * If `true`, users cannot change the sort ordering. It has no effect if sort=`never` or `undefined`.
2241
- *
2242
- * @defaultValue `false`
2247
+ * Use the inline prop to arrange checkboxes side-by-side.
2243
2248
  */
2244
- disabled?: boolean;
2249
+ inline?: boolean;
2250
+ /**
2251
+ * When set to `true`, the option will be selected by default. Use it to
2252
+ * set the default `checked` state when the component is **uncontrolled**.
2253
+ */
2254
+ initialIsChecked?: boolean;
2255
+ /**
2256
+ * Accessibility label. It should be present when the checkbox has no label(children).
2257
+ */
2258
+ 'aria-label'?: string;
2245
2259
  }
2246
2260
  /**
2247
- * The props type for {@link !components.TableHeader}.
2248
- *
2261
+ * The props type for {@link !components.RadioButton}.
2249
2262
  * @category Component Props
2263
+ * @interface
2250
2264
  */
2251
- export type TableHeaderProps = SortedTableHeaderProps | UnSortedTableHeaderProps;
2252
- interface BaseTableProps {
2265
+ export type RadioButtonProps = Omit<CheckboxProps, 'aria-label'>;
2266
+ export type ToggleGroupOption = {
2267
+ /** The text that displays in the dropdown menu. */
2268
+ label: string;
2269
+ /** The unique value that is submitted with the form. */
2270
+ value: string;
2271
+ /** When set to `true`, the option will be selected by default. */
2272
+ initialIsChecked?: boolean;
2273
+ /** When set to `true`, the option cannot be selected. */
2274
+ readonly?: boolean;
2275
+ /** The string that displays below the toggle. */
2276
+ description?: string;
2277
+ };
2278
+ interface ToggleGroupListBaseProps {
2279
+ name: ToggleGroupProps['name'];
2280
+ options: ToggleGroupProps['options'];
2281
+ variant: ToggleGroupProps['variant'];
2282
+ inline?: boolean;
2283
+ }
2284
+ export interface CheckboxListProps extends ToggleGroupListBaseProps {
2285
+ value?: CheckboxGroupProps['value'];
2286
+ onChange?: CheckboxGroupProps['onChange'];
2287
+ }
2288
+ export interface RadioButtonListProps extends ToggleGroupListBaseProps {
2289
+ value?: RadioButtonGroupProps['value'];
2290
+ onChange?: RadioButtonGroupProps['onChange'];
2291
+ }
2292
+ type ToggleType = 'checkboxList' | 'radioButtonList';
2293
+ export interface CommonGroupProps {
2253
2294
  /**
2254
- * When set to false, the table will not have borders.
2255
- *
2256
- * @defaultValue `true`
2295
+ * Denotes the type of list to render.
2257
2296
  */
2258
- bordered?: boolean;
2297
+ toggleType?: ToggleType;
2259
2298
  /**
2260
- * When set to `true`, the table will not have bottom margin.
2261
- *
2262
- * @defaultValue `false`
2299
+ * The unique identifier for the toggle group element.
2263
2300
  */
2264
- flush?: boolean;
2301
+ name: string;
2265
2302
  /**
2266
- * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components. The children should be one of Table's subcomponents.
2303
+ * The label that displays above the toggle group.
2267
2304
  */
2268
- children: React.ReactNode;
2269
- }
2270
- /**
2271
- * @internal
2272
- */
2273
- export interface TableNoPaginatedProps extends BaseTableProps {
2305
+ label: string;
2274
2306
  /**
2275
- * When set to `true`, the table will include pagination navigation. Take a look at {@link !types.TablePaginatedProps} for pagination props.
2276
- *
2277
- * @defaultValue `false`
2307
+ * The text to display if the input has an error.
2278
2308
  */
2279
- paginated?: false;
2280
- }
2281
- /**
2282
- * @internal
2283
- */
2284
- export interface TablePaginatedProps extends BaseTableProps {
2309
+ validationMessage?: string;
2285
2310
  /**
2286
- * When set to `true`, the table will include pagination navigation. Take a look at {@link !types.TablePaginatedProps} for pagination props.
2311
+ * When set to `true`, displays a required indicator next to the toggle group.
2287
2312
  *
2288
2313
  * @defaultValue `false`
2289
2314
  */
2290
- paginated: true;
2291
- /**
2292
- * The total number of pages available.
2293
- */
2294
- pageCount: number;
2315
+ required?: boolean;
2295
2316
  /**
2296
- * When set to `false`, hides the text labels for the First/Prev/Next buttons. The button labels will still be accessible to screen readers.
2297
- *
2298
- * @defaultValue `true`
2317
+ * Text that will appear in a tooltip next to the toggle group label.
2299
2318
  */
2300
- showButtonLabels?: boolean;
2319
+ tooltip?: string;
2301
2320
  /**
2302
- * When set to `true`, displays the **First/Last** page buttons.
2321
+ * When set to `true`, `validationMessage` is displayed as an error message if provided. The input will also render its error state to let the user know there is an error. If left false, `validationMessage` is displayed as a success message.
2303
2322
  *
2304
2323
  * @defaultValue `false`
2305
2324
  */
2306
- showFirstLastButtons?: boolean;
2325
+ error?: boolean;
2307
2326
  /**
2308
- * Sets how many page buttons are displayed.
2327
+ * An array of options to display in the dropdown menu.
2328
+ *
2329
+ * @defaultValue `[]`
2309
2330
  */
2310
- maxVisiblePageButtons?: number;
2331
+ options: Array<ToggleGroupOption>;
2311
2332
  /**
2312
- * Denotes the current page.
2333
+ * When set to `true`, stacks the options horizontally.
2334
+ *
2335
+ * @defaultValue `false`
2313
2336
  */
2314
- page?: number;
2337
+ inline?: boolean;
2315
2338
  /**
2316
- * A function that will be invoked when the pagination button is clicked. It receives the new page number as argument.
2339
+ * The size variation of the individual options.
2317
2340
  *
2318
- * @event
2341
+ * @defaultValue `"default"`
2319
2342
  */
2320
- onPageChange: (pageNumber: number) => void;
2321
- }
2322
- /**
2323
- * The props type for {@link !components.Table}.
2324
- *
2325
- * @category Component Props
2326
- */
2327
- export type TableProps = TableNoPaginatedProps | TablePaginatedProps;
2328
- /** @deprecated use ExtensionEvent/FormSubmitExtensionEvent instead */
2329
- export declare class RemoteEvent<V> {
2330
- type: string;
2331
- bubbles: boolean;
2332
- timeStamp: number;
2333
- targetValue: V;
2334
- constructor(value: V, event: Event);
2343
+ variant?: 'default' | 'small';
2344
+ value?: string[] | string;
2335
2345
  }
2336
- export type HrefOptions = {
2337
- url: string;
2338
- external?: boolean;
2339
- };
2340
- export type HrefProp = string | HrefOptions;
2341
- /**
2342
- * The props type for {@link !components.Link}.
2343
- *
2344
- * @category Component Props
2345
- */
2346
- export interface LinkProps extends OverlayComponentProps {
2346
+ type CheckboxGroupProps = {
2347
2347
  /**
2348
- * Sets the content that will render inside the component.
2348
+ * Denotes the type of list to render.
2349
2349
  *
2350
+ * @defaultValue `"checkboxList"`
2350
2351
  */
2351
- children: ReactNode;
2352
+ toggleType: 'checkboxList';
2352
2353
  /**
2353
- * The URL that will be opened on click. Links to pages in the HubSpot account will open in the same tab, while non-HubSpot links will open in a new tab.
2354
+ * A function that is called with the new value or values when the list is updated.
2354
2355
  *
2356
+ * @event
2355
2357
  */
2356
- href: HrefProp;
2358
+ onChange?: (value: string[]) => void;
2357
2359
  /**
2358
- * The color variation of the link.
2360
+ * The value of the toggle group.
2361
+ */
2362
+ value?: string[];
2363
+ } & CommonGroupProps;
2364
+ type RadioButtonGroupProps = {
2365
+ /**
2366
+ * Denotes the type of list to render.
2359
2367
  *
2360
- * @defaultValue `"primary"`
2368
+ * @defaultValue `"checkboxList"`
2361
2369
  */
2362
- variant?: 'primary' | 'destructive' | 'light' | 'dark';
2370
+ toggleType: 'radioButtonList';
2363
2371
  /**
2364
- * A function that will be invoked with the link is clicked.
2372
+ * A function that is called with the new value or values when the list is updated.
2365
2373
  *
2366
2374
  * @event
2367
2375
  */
2368
- onClick?: ReactionsHandler<ExtensionEvent>;
2376
+ onChange?: (value: string) => void;
2369
2377
  /**
2370
- * When set to true, `event.preventDefault()` will be invoked before the `onClick` function is called, preventing automatic navigation to the href URL.
2371
- *
2372
- * @defaultValue `false`
2378
+ * The value of the toggle group.
2373
2379
  */
2374
- preventDefault?: boolean;
2380
+ value?: string;
2381
+ } & CommonGroupProps;
2382
+ type DefaultToggleTypeProps = {
2383
+ toggleType?: never;
2384
+ } & CheckboxGroupProps;
2385
+ /**
2386
+ * The props type for {@link !components.ToggleGroup}.
2387
+ *
2388
+ * @interface
2389
+ * @category Component Props
2390
+ */
2391
+ export type ToggleGroupProps = CheckboxGroupProps | RadioButtonGroupProps | DefaultToggleTypeProps;
2392
+ /** @ignore */
2393
+ interface Team {
2394
+ id: number;
2395
+ name: string;
2396
+ teammates: number[];
2397
+ }
2398
+ /** @ignore */
2399
+ export interface UserContext {
2400
+ id: number;
2401
+ emails: string[];
2402
+ email: string;
2403
+ firstName: string;
2404
+ lastName: string;
2405
+ /** @deprecated Roles will always be empty. Please use teams instead */
2406
+ roles: string[];
2407
+ teams: Team[];
2408
+ locale?: string;
2409
+ }
2410
+ /** @ignore */
2411
+ export interface PortalContext {
2412
+ id: number;
2413
+ timezone: string;
2414
+ }
2415
+ /** @ignore */
2416
+ export interface CrmRecordContext {
2417
+ objectId: number;
2418
+ objectTypeId: string;
2419
+ }
2420
+ /** @ignore */
2421
+ export interface AppContext {
2422
+ appId: number | string;
2423
+ appName?: string;
2424
+ cardTitle?: string;
2425
+ }
2426
+ /** @ignore */
2427
+ export interface BaseContext {
2428
+ user: UserContext;
2429
+ portal: PortalContext;
2430
+ }
2431
+ /** @ignore */
2432
+ export interface CrmContext extends BaseContext {
2433
+ location: 'crm.record.tab' | 'crm.record.sidebar' | 'crm.preview' | 'helpdesk.sidebar';
2434
+ crm: CrmRecordContext;
2435
+ extension?: AppContext;
2436
+ }
2437
+ /** @ignore */
2438
+ export interface SettingsContext extends BaseContext {
2439
+ location: 'settings';
2440
+ }
2441
+ /** @ignore */
2442
+ export interface GenericContext extends BaseContext {
2443
+ location: 'uie.playground.middle';
2444
+ }
2445
+ /** @ignore */
2446
+ export interface BaseExtensionContextData {
2447
+ appId: number | string;
2448
+ appName?: string;
2449
+ cardId: string;
2450
+ cardTitle?: string;
2451
+ location: keyof ExtensionPoints;
2452
+ sourceId?: string | null;
2453
+ appAccessLevel: 'PUBLIC' | 'PRIVATE';
2454
+ additionalProperties?: {
2455
+ [key: string]: string;
2456
+ } | null;
2457
+ }
2458
+ /** @ignore */
2459
+ export interface CrmExtensionContextData extends BaseExtensionContextData {
2460
+ objectId: number | string;
2461
+ objectTypeId: string;
2462
+ }
2463
+ /** @ignore */
2464
+ export interface CrmDataHighlightProps {
2465
+ properties: Array<string>;
2466
+ objectTypeId?: string;
2467
+ objectId?: number;
2468
+ }
2469
+ /** @ignore */
2470
+ export interface CrmReportProps {
2471
+ reportId: string;
2472
+ use?: 'associations' | 'subject' | 'unfiltered';
2473
+ }
2474
+ /** @ignore */
2475
+ export interface CrmPropertyListProps {
2476
+ properties: Array<string>;
2477
+ direction?: string;
2478
+ objectTypeId?: string;
2479
+ objectId?: number;
2480
+ }
2481
+ /** @ignore */
2482
+ type CrmSortDescriptor = {
2483
+ columnName: string;
2484
+ direction: 1 | -1;
2485
+ };
2486
+ /** @ignore */
2487
+ interface CrmSearchFilter {
2488
+ operator: 'EQ' | 'NEQ' | 'LT' | 'LTE' | 'GT' | 'GTE' | 'BETWEEN' | 'IN' | 'NOT_IN' | 'HAS_PROPERTY' | 'NOT_HAS_PROPERTY';
2489
+ value?: string | number;
2490
+ values?: string | number;
2491
+ highValue?: string | number;
2492
+ property: string;
2493
+ }
2494
+ /** @ignore */
2495
+ export interface CrmAssociationTableProps {
2496
+ objectTypeId: string;
2497
+ propertyColumns: Array<string>;
2498
+ quickFilterProperties?: Array<string>;
2499
+ searchable?: boolean;
2500
+ pagination?: boolean;
2501
+ associationLabelFilter?: boolean;
2502
+ pageSize?: number;
2503
+ preFilters?: Array<CrmSearchFilter>;
2504
+ sort?: Array<CrmSortDescriptor>;
2505
+ }
2506
+ /** @ignore */
2507
+ export interface CrmAssociationPivotProps {
2508
+ objectTypeId: string;
2509
+ associationLabels?: Array<string>;
2510
+ maxAssociations?: number;
2511
+ preFilters?: Array<CrmSearchFilter>;
2512
+ sort?: Array<CrmSortDescriptor>;
2513
+ }
2514
+ /** @ignore */
2515
+ export interface CrmAssociationStageTrackerProps {
2516
+ objectTypeId: string;
2517
+ properties: Array<string>;
2518
+ associationLabels?: Array<string>;
2519
+ filters?: Array<CrmSearchFilter>;
2520
+ showProperties?: boolean;
2521
+ sort?: Array<CrmSortDescriptor>;
2522
+ }
2523
+ /** @ignore */
2524
+ export interface CrmSimpleDeadlineProps {
2525
+ endDatePropertyName: string;
2526
+ properties: Array<string>;
2527
+ progressTheme?: ProgressTheme;
2528
+ showProperties?: boolean;
2529
+ startDatePropertyName: string;
2530
+ }
2531
+ /** @ignore */
2532
+ export interface CrmRelativeTimelineProps {
2533
+ properties: Array<string>;
2534
+ }
2535
+ /** @ignore */
2536
+ interface BaseCrmStatisticItem {
2537
+ label: string;
2538
+ }
2539
+ /** @ignore */
2540
+ interface FilterGroup {
2541
+ filters: Array<CrmSearchFilter>;
2542
+ }
2543
+ /** @ignore */
2544
+ interface ProgressTheme {
2545
+ backgroundColor?: string;
2546
+ completedColor?: string;
2547
+ upcomingColor?: string;
2548
+ borderRadius?: string | number;
2549
+ height?: string | number;
2550
+ completedGradient?: Gradient;
2551
+ upcomingGradient?: Gradient;
2552
+ }
2553
+ /** @ignore */
2554
+ interface PercentileMetricItem extends BaseCrmStatisticItem {
2555
+ statisticType: 'PERCENTILES';
2556
+ propertyName: string;
2557
+ percentile: number;
2558
+ filterGroups?: Array<FilterGroup>;
2559
+ }
2560
+ /** @ignore */
2561
+ type CrmStatisticItem = BasicMetricItem | PercentileMetricItem;
2562
+ /** @ignore */
2563
+ export interface CrmStatisticsProps {
2564
+ objectTypeId: string;
2565
+ statistics: Array<CrmStatisticItem>;
2566
+ }
2567
+ /** @ignore */
2568
+ interface BasicMetricItem extends BaseCrmStatisticItem {
2569
+ statisticType: 'SUM' | 'AVG' | 'MIN' | 'MAX' | 'DISTINCT_APPROX' | 'COUNT';
2570
+ propertyName: string;
2571
+ filterGroups?: Array<FilterGroup>;
2375
2572
  }
2376
- export type JsonValue = string | number | boolean | null | JsonValue[] | {
2377
- [key: string]: JsonValue;
2378
- };
2379
- /**
2380
- * The props type for {@link !components.Box}.
2381
- *
2382
- * @category Component Props
2383
- */
2384
- export interface BoxProps {
2385
- /**
2386
- * Sets the content that will render inside the component. This prop is passed implicitly by providing sub-components.
2387
- *
2388
- */
2389
- children: ReactNode;
2390
- /**
2391
- * Overrides Flex's `alignItem` value for this element.
2392
- *
2393
- * @defaultValue `"auto"`
2394
- */
2395
- alignSelf?: 'start' | 'center' | 'baseline' | 'end' | 'stretch' | 'auto';
2396
- /**
2397
- * Sets how the item will grow or shrink when it's a direct ancestor of the Flex component.
2398
- * ##### Options in detail
2399
- *
2400
- *- `initial`: The item is sized according to its width and height properties. It shrinks to its minimum size to fit the container, but does not grow to absorb any extra free space in the flex container.
2401
- *- `auto`: The item is sized according to its width and height properties, but grows to absorb any extra free space in the flex container, and shrinks to its minimum size to fit the container.
2402
- *- `none`: The item is sized according to its width and height properties. It is fully inflexible: it neither shrinks nor grows in relation to the flex container.
2403
- *- `number`: Tells a component to fill all available space, shared evenly amongst other components with the same parent. The larger the flex given, the higher the ratio of space a component will take compared to its siblings.
2404
- *
2405
- * @defaultValue `"initial"`
2406
- */
2407
- flex?: 'initial' | 'auto' | 'none' | number;
2573
+ /** @ignore */
2574
+ interface Gradient {
2575
+ startColor: string;
2576
+ endColor: string;
2408
2577
  }
2409
- export interface TShirtSizes {
2410
- xs: 'extra-small' | 'xs';
2411
- sm: 'small' | 'sm';
2412
- md: 'medium' | 'md';
2413
- lg: 'large' | 'lg';
2414
- xl: 'extra-large' | 'xl';
2578
+ /** @ignore */
2579
+ export interface CrmStageTrackerProps {
2580
+ objectId?: number;
2581
+ objectTypeId?: string;
2582
+ properties: Array<string>;
2583
+ showProperties?: boolean;
2415
2584
  }
2416
- export type AllSizes = TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'] | TShirtSizes['lg'] | TShirtSizes['xl'];
2417
- export type AllDistances = 'flush' | AllSizes;
2418
- /**
2419
- * The props type for {@link !components.StepIndicator}.
2420
- *
2421
- * @category Component Props
2422
- */
2423
- export interface StepIndicatorProps {
2424
- /**
2425
- * An array containing the name of each step.
2426
- */
2427
- stepNames: string[];
2428
- /**
2429
- * The orientation of the indicator.
2430
- *
2431
- * @defaultValue `"horizontal"`
2432
- */
2433
- direction?: 'horizontal' | 'vertical';
2434
- /**
2435
- * The size of the indicator circles.
2436
- *
2437
- * @defaultValue `"small"`
2438
- */
2439
- circleSize?: AllSizes;
2440
- /**
2441
- * The currently active step. Steps are 0-based.
2442
- */
2443
- currentStep?: number;
2444
- /**
2445
- * The visual style of the component.
2446
- *
2447
- * - default: default spacing.
2448
- * - compact: only shows the title of the currently active step.
2449
- * - flush: only shows the title of the currently active step and removes left and right margins.
2450
- *
2451
- * @defaultValue `"default"`
2452
- */
2453
- variant?: 'default' | 'compact' | 'flush';
2454
- /**
2455
- * A function that will be invoked when a step in the indicator is clicked. The function receives the current step index as an argument (zero-based). Use this to update the currently active step.
2456
- *
2457
- * @event
2458
- */
2459
- onClick?: (stepIndex: number) => void;
2585
+ /** @ignore */
2586
+ export interface CrmAssociationPropertyListProps {
2587
+ objectTypeId: string;
2588
+ properties: Array<string>;
2589
+ associationLabels?: Array<string>;
2590
+ filters?: Array<CrmSearchFilter>;
2591
+ sort?: Array<CrmSortDescriptor>;
2460
2592
  }
2461
- /**
2462
- * The props type for {@link !components.Accordion}.
2463
- *
2464
- * @category Component Props
2465
- */
2466
- export interface AccordionProps {
2467
- /**
2468
- * The title text for the accordion.
2469
- *
2470
- */
2471
- title: string;
2472
- /**
2473
- * The main content of the accordion when it opens.
2474
- *
2475
- */
2476
- children: ReactNode;
2477
- /**
2478
- * Defines default open behavior on page load. When set to `true`, the accordion will be open by default on initial load.
2479
- *
2480
- * @defaultValue `false`
2481
- */
2482
- defaultOpen?: boolean;
2483
- /**
2484
- * When set to `true`, the accordion's open state cannot be changed.
2485
- *
2486
- * @defaultValue `false`
2487
- */
2488
- disabled?: boolean;
2489
- /**
2490
- * For controlling the accordion's open state programmatically. When set to `true`, the accordion will open. Takes precedence over `defaultOpen`.
2491
- *
2492
- */
2493
- open?: boolean;
2494
- /**
2495
- * The size of the accordion title.
2496
- *
2497
- * @defaultValue `"small"`
2498
- */
2499
- size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
2500
- /**
2501
- * A function that will be invoked when the title is clicked. It receives no arguments and its return value is ignored.
2502
- *
2503
- * @event
2504
- */
2505
- onClick?: () => void;
2593
+ /** @ignore */
2594
+ interface ObjectCoordinates {
2595
+ objectTypeId: string;
2596
+ objectId: number;
2506
2597
  }
2507
- /**
2508
- * The props type for {@link !components.List}.
2509
- *
2510
- * @category Component Props
2511
- */
2512
- export interface ListProps {
2513
- /**
2514
- * The content of the list. Each child will be wrapped in an `li` tag.
2515
- */
2516
- children: ReactNode;
2517
- /**
2518
- * The type of list to render.
2519
- *
2520
- * @defaultValue `"unordered"`
2521
- */
2522
- variant?: 'unordered' | 'unordered-styled' | 'ordered' | 'ordered-styled' | 'inline' | 'inline-divided';
2598
+ /** @ignore */
2599
+ interface OpenRecordAssociationFormArgs {
2600
+ objectTypeId: string;
2601
+ association: {
2602
+ objectTypeId: string;
2603
+ objectId: number;
2604
+ };
2523
2605
  }
2524
- /**
2525
- * The props type for {@link !components.Toggle}.
2526
- *
2527
- * @category Component Props
2528
- */
2529
- export interface ToggleProps {
2530
- /**
2531
- * The current status of the input.
2532
- */
2533
- checked?: boolean;
2534
- /**
2535
- * When set to `true`, the option cannot be selected.
2536
- */
2537
- readonly?: boolean;
2538
- /**
2539
- * The unique identifier for the toggle element.
2540
- */
2541
- name?: string;
2542
- /**
2543
- * The size variation of the toggle.
2544
- *
2545
- * @defaultValue `"medium"`
2546
- */
2547
- size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'] | 'default';
2548
- /**
2549
- * A function that is called when the `checked` input status changes.
2550
- *
2551
- * @event
2552
- */
2553
- onChange?: (checked: boolean) => void;
2554
- /**
2555
- * When set to `true`, the option will be selected by default. Use it to
2556
- * set the default `checked` state when the component is **uncontrolled**.
2557
- */
2558
- initialIsChecked?: boolean;
2559
- /**
2560
- * The companion text of for Toggle. It can be displayed on top,
2561
- * inline, or hidden. When hidden, it will remain usable for screen readers.
2562
- */
2563
- label: string;
2564
- /**
2565
- * Controls the display setting of the label prop.
2566
- *
2567
- * @defaultValue `"inline"`
2568
- */
2569
- labelDisplay?: 'inline' | 'top' | 'hidden';
2570
- /**
2571
- * The text that appears on the Toggle when `checked={true}`.
2572
- *
2573
- * @defaultValue `"ON"`
2574
- */
2575
- textChecked?: string;
2576
- /**
2577
- * The text that appears on the Toggle when `checked={false}`.
2578
- *
2579
- * @defaultValue `"ON"`
2580
- */
2581
- textUnchecked?: string;
2606
+ /** @ignore */
2607
+ interface ActivityCreatorActionArgs {
2608
+ objectTypeId: string;
2609
+ objectId: number;
2610
+ windowVariant?: 'windowed' | 'fullscreen';
2611
+ }
2612
+ /** @ignore */
2613
+ interface EngagementAppLinkArgs {
2614
+ objectId: number | string;
2615
+ objectTypeId: string;
2616
+ engagementId: number | string;
2617
+ external?: boolean;
2618
+ }
2619
+ /** @ignore */
2620
+ interface RecordAppLinkArgs {
2621
+ includeEschref?: boolean;
2622
+ objectId: number;
2623
+ objectTypeId: string;
2624
+ external?: boolean;
2625
+ }
2626
+ /** @ignore */
2627
+ interface PageAppLinkArgs {
2628
+ path: string;
2629
+ external?: boolean;
2630
+ }
2631
+ /** @ignore */
2632
+ interface ExternalUrlArgs {
2633
+ href: string;
2582
2634
  }
2583
- export interface PanelProps {
2584
- /**
2585
- * Accessibility label.
2586
- *
2587
- */
2588
- 'aria-label'?: string;
2589
- /**
2590
- * The main content of the panel when it opens.
2591
- *
2592
- */
2593
- children?: React.ReactNode;
2594
- /**
2595
- * A unique ID for the panel
2596
- *
2597
- */
2598
- id: string;
2599
- /**
2600
- * A function that will be invoked when the panel has finished opening.
2601
- *
2602
- */
2603
- onOpen?: () => void;
2604
- /**
2605
- * A function that will be invoked when the panel has finished closing.
2606
- *
2607
- */
2608
- onClose?: () => void;
2609
- /**
2610
- * The width of the panel
2611
- *
2612
- * @defaultValue `"sm"`
2613
- */
2614
- width?: TShirtSizes['sm'] | TShirtSizes['md'] | TShirtSizes['lg'];
2615
- /**
2616
- * The title of the panel
2617
- *
2618
- */
2619
- title?: string;
2620
- /**
2621
- * The variant of the panel
2622
- *
2623
- * @defaultValue `"default"`
2624
- */
2625
- variant?: 'modal' | 'default';
2635
+ /** @ignore */
2636
+ interface OpenRecordCreatorFormArgs {
2637
+ objectTypeId: string;
2626
2638
  }
2627
- export interface PanelSectionProps {
2628
- /**
2629
- * When set to `true`, the section will have no bottom margin
2630
- *
2631
- * @defaultValue `false`
2632
- */
2633
- flush?: boolean;
2634
- /**
2635
- * The main content of the section
2636
- *
2637
- */
2638
- children: React.ReactNode;
2639
+ /** @ignore */
2640
+ interface ActionArgs {
2641
+ PREVIEW_OBJECT: ObjectCoordinates;
2642
+ ADD_NOTE: ActivityCreatorActionArgs;
2643
+ ADD_TASK: ActivityCreatorActionArgs;
2644
+ SEND_EMAIL: ActivityCreatorActionArgs;
2645
+ SCHEDULE_MEETING: ActivityCreatorActionArgs;
2646
+ OPEN_RECORD_CREATOR_FORM: OpenRecordCreatorFormArgs;
2647
+ OPEN_RECORD_ASSOCIATION_FORM: OpenRecordAssociationFormArgs;
2648
+ ENGAGEMENT_APP_LINK: EngagementAppLinkArgs;
2649
+ RECORD_APP_LINK: RecordAppLinkArgs;
2650
+ PAGE_APP_LINK: PageAppLinkArgs;
2651
+ EXTERNAL_URL: ExternalUrlArgs;
2652
+ OPEN_WORKFLOW_ENROLLMENT_MODAL: ObjectCoordinates;
2639
2653
  }
2640
- export interface ModalProps {
2641
- /**
2642
- * Accessibility label.
2643
- *
2644
- */
2645
- 'aria-label'?: string;
2646
- /**
2647
- * The main content of the modal when it opens.
2648
- *
2649
- */
2650
- children?: React.ReactNode;
2651
- /**
2652
- * A unique ID for the modal
2653
- *
2654
- */
2655
- id: string;
2656
- /**
2657
- * A function that will be invoked when the modal has finished opening.
2658
- *
2659
- */
2660
- onOpen?: () => void;
2661
- /**
2662
- * A function that will be invoked when the modal has finished closing.
2663
- *
2664
- */
2665
- onClose?: () => void;
2666
- /**
2667
- * The width of the modal
2668
- *
2669
- * @defaultValue `"sm"`
2670
- */
2671
- width?: TShirtSizes['sm'] | TShirtSizes['md'] | TShirtSizes['lg'];
2672
- /**
2673
- * The title of the modal
2674
- *
2675
- */
2676
- title?: string;
2677
- /**
2678
- * The variant of the modal
2679
- *
2680
- * @defaultValue `"default"`
2681
- */
2682
- variant?: 'danger' | 'default';
2654
+ /** @ignore */
2655
+ export type ArgsFor<SpecificActionType extends ActionType> = ActionArgs[SpecificActionType];
2656
+ export type ActionType = 'PREVIEW_OBJECT' | 'ADD_NOTE' | 'ADD_TASK' | 'SEND_EMAIL' | 'SCHEDULE_MEETING' | 'OPEN_RECORD_CREATOR_FORM' | 'OPEN_RECORD_ASSOCIATION_FORM' | 'ENGAGEMENT_APP_LINK' | 'RECORD_APP_LINK' | 'PAGE_APP_LINK' | 'EXTERNAL_URL' | 'OPEN_WORKFLOW_ENROLLMENT_MODAL';
2657
+ /** @ignore */
2658
+ interface BaseActionComponent {
2659
+ children: ReactNode;
2660
+ actionType: ActionType;
2661
+ actionContext: ArgsFor<ActionType>;
2662
+ onError?: (errors: string[]) => void;
2683
2663
  }
2684
- export interface ModalBodyProps {
2685
- /**
2686
- * The main content of the modal
2687
- *
2688
- */
2689
- children: React.ReactNode;
2664
+ /** @ignore */
2665
+ export interface CrmActionButtonProps extends BaseActionComponent {
2666
+ variant?: 'primary' | 'secondary' | 'destructive';
2667
+ type?: 'button' | 'reset' | 'submit';
2668
+ size?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
2669
+ onClick?: () => void;
2690
2670
  }
2691
- export interface ModalFooterProps {
2692
- /**
2693
- * The footer of the modal
2694
- *
2695
- */
2696
- children: React.ReactNode;
2671
+ /** @ignore */
2672
+ export interface CrmActionLinkProps extends BaseActionComponent {
2673
+ variant?: 'primary' | 'light' | 'dark' | 'destructive';
2697
2674
  }
2698
- export interface PanelBodyProps {
2699
- /**
2700
- * The main content of the body
2701
- *
2702
- */
2703
- children: React.ReactNode;
2675
+ /** @ignore */
2676
+ export interface ActionLibraryButtonCardActionConfig<SpecificActionType extends ActionType = ActionType> {
2677
+ type: 'action-library-button';
2678
+ actionType: SpecificActionType;
2679
+ actionContext: ArgsFor<SpecificActionType>;
2680
+ label?: string;
2681
+ disabled?: boolean;
2682
+ tooltipText?: string;
2704
2683
  }
2705
- export interface PanelFooterProps {
2706
- /**
2707
- * The main content of the footer
2708
- *
2709
- */
2710
- children: React.ReactNode;
2684
+ /** @ignore */
2685
+ export type DropdownCardActionConfigOptions = [
2686
+ ActionLibraryButtonCardActionConfig,
2687
+ ...ActionLibraryButtonCardActionConfig[]
2688
+ ];
2689
+ /** @ignore */
2690
+ export interface DropdownCardActionConfig {
2691
+ type: 'dropdown';
2692
+ options: DropdownCardActionConfigOptions;
2693
+ label?: string;
2694
+ disabled?: boolean;
2695
+ tooltipText?: string;
2696
+ }
2697
+ /** @ignore */
2698
+ type ErrorHandler = (errors: string[]) => void;
2699
+ /** @ignore */
2700
+ type CardActionConfig = ActionLibraryButtonCardActionConfig | DropdownCardActionConfig;
2701
+ /** @ignore */
2702
+ export type CrmCardActionsProps = {
2703
+ actionConfigs: Array<CardActionConfig>;
2704
+ onError?: ErrorHandler;
2705
+ };
2706
+ /** @ignore */
2707
+ export type ExtensionPointAction = (...args: any[]) => Promise<any> | void;
2708
+ /** @ignore */
2709
+ export interface ExtensionPointContract {
2710
+ actions?: {
2711
+ [k: string]: ExtensionPointAction;
2712
+ } | {};
2713
+ context: BaseContext;
2714
+ customComponents: Record<string, ComponentType<any>>;
2715
+ }
2716
+ /** @ignore */
2717
+ export interface StandardCrmExtensionPoint extends ExtensionPointContract {
2718
+ actions: CrmHostActions & UiePlatformActions;
2719
+ context: CrmContext;
2720
+ customComponents: {
2721
+ CrmPropertyList: ComponentType<CrmPropertyListProps>;
2722
+ CrmAssociationTable: ComponentType<CrmAssociationTableProps>;
2723
+ CrmDataHighlight: ComponentType<CrmDataHighlightProps>;
2724
+ CrmReport: ComponentType<CrmReportProps>;
2725
+ CrmAssociationPivot: ComponentType<CrmAssociationPivotProps>;
2726
+ CrmAssociationPropertyList: ComponentType<CrmAssociationPropertyListProps>;
2727
+ CrmAssociationStageTracker?: ComponentType<CrmAssociationStageTrackerProps>;
2728
+ CrmSimpleDeadline?: ComponentType<CrmSimpleDeadlineProps>;
2729
+ CrmRelativeTimeline?: ComponentType<CrmRelativeTimelineProps>;
2730
+ CrmStageTracker: ComponentType<CrmStageTrackerProps>;
2731
+ CrmStatistics?: ComponentType<CrmStatisticsProps>;
2732
+ CrmActionButton?: ComponentType<CrmActionButtonProps>;
2733
+ CrmActionLink?: ComponentType<CrmActionLinkProps>;
2734
+ CrmCardActions?: ComponentType<CrmCardActionsProps>;
2735
+ };
2736
+ }
2737
+ /** @deprecated this interface has been replaced by StandardCrmExtensionPoint */
2738
+ export interface CrmMiddleExtensionPoint extends ExtensionPointContract {
2739
+ actions: CrmHostActions;
2740
+ context: CrmContext;
2741
+ customComponents: {
2742
+ CrmPropertyList: ComponentType<CrmPropertyListProps>;
2743
+ CrmAssociationTable: ComponentType<CrmAssociationTableProps>;
2744
+ CrmDataHighlight: ComponentType<CrmDataHighlightProps>;
2745
+ CrmReport: ComponentType<CrmReportProps>;
2746
+ CrmAssociationPivot: ComponentType<CrmAssociationPivotProps>;
2747
+ CrmAssociationPropertyList: ComponentType<CrmAssociationPropertyListProps>;
2748
+ CrmAssociationStageTracker?: ComponentType<CrmAssociationStageTrackerProps>;
2749
+ CrmSimpleDeadline?: ComponentType<CrmSimpleDeadlineProps>;
2750
+ CrmRelativeTimeline?: ComponentType<CrmRelativeTimelineProps>;
2751
+ CrmStageTracker: ComponentType<CrmStageTrackerProps>;
2752
+ CrmStatistics?: ComponentType<CrmStatisticsProps>;
2753
+ CrmActionButton?: ComponentType<CrmActionButtonProps>;
2754
+ CrmActionLink?: ComponentType<CrmActionLinkProps>;
2755
+ CrmCardActions?: ComponentType<CrmCardActionsProps>;
2756
+ };
2757
+ }
2758
+ /** @ignore */
2759
+ export interface CrmSidebarExtensionPoint extends ExtensionPointContract {
2760
+ actions: CrmHostActions & UiePlatformActions;
2761
+ context: CrmContext;
2762
+ customComponents: {
2763
+ CrmActionButton?: ComponentType<CrmActionButtonProps>;
2764
+ CrmActionLink?: ComponentType<CrmActionLinkProps>;
2765
+ };
2766
+ }
2767
+ /** @ignore */
2768
+ export interface SettingsExtensionPoint extends ExtensionPointContract {
2769
+ actions: SettingsActions & UiePlatformActions;
2770
+ context: SettingsContext;
2771
+ }
2772
+ export interface ExampleCrmComponentProps {
2773
+ name: string;
2774
+ size: 'sm' | 'md' | 'lg';
2775
+ count: number;
2776
+ }
2777
+ /** @ignore */
2778
+ interface RemotePlaygroundExtensionPoint extends ExtensionPointContract {
2779
+ actions: {
2780
+ warn: () => void;
2781
+ };
2782
+ context: GenericContext;
2783
+ customComponents: {
2784
+ ExampleCrmComponent: ComponentType<ExampleCrmComponentProps>;
2785
+ };
2711
2786
  }
2712
- export interface DropdownOption {
2713
- /**
2714
- * Text to be displayed as the menu item text.
2715
- *
2716
- */
2717
- label: string;
2718
- /**
2719
- * A function that will be invoked when the item is clicked.
2720
- * It receives no arguments and its return value is ignored.
2721
- *
2722
- * @event
2723
- */
2724
- onClick?: () => void;
2787
+ export declare const EXTENSION_POINT_LOCATIONS: readonly ["crm.preview", "crm.record.sidebar", "crm.record.tab", "helpdesk.sidebar", "uie.playground.middle", "settings"];
2788
+ export type ExtensionPointLocation = TypesOfReadOnlyArray<typeof EXTENSION_POINT_LOCATIONS>;
2789
+ /** @ignore */
2790
+ interface LocationToExtensionPoint {
2791
+ 'uie.playground.middle': RemotePlaygroundExtensionPoint;
2792
+ 'crm.record.tab': StandardCrmExtensionPoint;
2793
+ 'crm.preview': StandardCrmExtensionPoint;
2794
+ 'crm.record.sidebar': CrmSidebarExtensionPoint;
2795
+ 'helpdesk.sidebar': StandardCrmExtensionPoint;
2796
+ settings: SettingsExtensionPoint;
2725
2797
  }
2726
2798
  /**
2727
- * The props type for {@link !components.Dropdown}.
2728
- *
2729
- * @category Component Props
2799
+ * While this resolves to the same result as LocationToExtensionPoint, it ensures that every location
2800
+ * from ExtensionPointLocation is explicitly included. This way, EXTENSION_POINT_LOCATIONS becomes
2801
+ * the single source of truth for defining all locations.
2730
2802
  */
2731
- export interface DropdownProps {
2732
- /**
2733
- * The list of options to be rendered within the dropdown menu.
2734
- * Each option represents an entry in the Dropdown.
2735
- */
2736
- options: DropdownOption[];
2737
- /**
2738
- * Controls the appearance of the dropdown button
2739
- *
2740
- * @defaultValue `"secondary"`
2741
- */
2742
- variant?: 'primary' | 'secondary' | 'transparent';
2743
- /**
2744
- * Sets the content for the dropdown button.
2745
- *
2746
- * @defaultValue `"More"`
2747
- */
2748
- buttonText?: string;
2749
- /**
2750
- * Sets the size of the dropdown button.
2751
- *
2752
- * @defaultValue `"md"`
2753
- */
2754
- buttonSize?: TShirtSizes['xs'] | TShirtSizes['sm'] | TShirtSizes['md'];
2755
- /**
2756
- * Disables the ability to focus and click-to-expand of the dropdown button
2757
- *
2758
- * @defaultValue `false`
2759
- */
2760
- disabled?: boolean;
2803
+ type _ExtensionPoints = {
2804
+ [key in ExtensionPointLocation]: LocationToExtensionPoint[key];
2805
+ };
2806
+ export interface ExtensionPoints extends _ExtensionPoints {
2807
+ }
2808
+ /** @ignore */
2809
+ export interface ExtensionPointApi<ExtensionPointName extends keyof ExtensionPoints> {
2810
+ runServerlessFunction: ServerlessFuncRunner;
2811
+ actions: ExtensionPoints[ExtensionPointName]['actions'];
2812
+ context: ExtensionPoints[ExtensionPointName]['context'];
2761
2813
  }
2762
2814
  export interface HubSpotFetchOptions {
2763
2815
  method?: 'GET' | 'POST' | 'PUT' | 'DELETE' | 'PATCH';
@@ -2773,111 +2825,107 @@ export type ProxyMetadata = {
2773
2825
  userId?: number;
2774
2826
  portalId?: number;
2775
2827
  };
2776
- export interface TabsProps {
2777
- /**
2778
- * Sets the content that will render inside the component.
2779
- */
2780
- children?: ReactNode;
2781
- /**
2782
- * Callback when the selected tab changes.
2783
- */
2784
- onSelectedChange?: ((selectedId: string) => void) | ((selectedId: number) => void) | ((selectedId: number | string) => void);
2828
+ /**
2829
+ * @category Serverless
2830
+ */
2831
+ export interface ServerlessRunnerParams {
2785
2832
  /**
2786
- * The initially selected tab ID.
2833
+ * Name of the serverless function
2787
2834
  */
2788
- defaultSelected?: string | number;
2835
+ name: string;
2789
2836
  /**
2790
- * The currently selected tab ID (controlled component).
2837
+ * Names of CRM object properties to be retrieved and supplied to the function as `context.propertiesToSend`
2791
2838
  */
2792
- selected?: string | number;
2839
+ propertiesToSend?: string[];
2793
2840
  /**
2794
- * Visual style variant of the tabs.
2795
- * @defaultValue 'default'
2841
+ * Additional parameters to be supplied to the function as `context.parameters`
2796
2842
  */
2797
- variant?: 'default' | 'enclosed';
2843
+ parameters?: JsonValue;
2798
2844
  /**
2799
- * Whether the tab should fill available space.
2845
+ * @deprecated Optional payload supplied to the function as `context.event.payload`.
2846
+ * Support for this param may be removed in the future. Use `parameters` instead.
2800
2847
  */
2801
- fill?: boolean;
2848
+ payload?: JsonValue;
2802
2849
  }
2803
- export interface TabProps {
2804
- /**
2805
- * Whether the tab is disabled.
2806
- */
2807
- disabled?: boolean;
2808
- /**
2809
- * Unique identifier for the tab.
2810
- */
2811
- tabId?: string | number;
2812
- /**
2813
- * The title text of the tab.
2814
- */
2815
- title?: string;
2816
- /**
2817
- * The content to display when this tab is selected.
2818
- */
2819
- children?: ReactNode;
2820
- /**
2821
- * The tooltip text of the tab.
2822
- */
2823
- tooltip?: string;
2824
- /**
2825
- * The tab's tooltip placement
2826
- * @defaultValue 'top'
2827
- */
2828
- tooltipPlacement?: 'top' | 'bottom' | 'left' | 'right';
2850
+ /**
2851
+ * @category Serverless
2852
+ */
2853
+ export declare enum ServerlessExecutionStatus {
2854
+ Success = "SUCCESS",
2855
+ Error = "ERROR"
2829
2856
  }
2830
2857
  /**
2831
- * The props type for {@link !components.Illustration}.
2832
- *
2833
- * @category Component Props
2858
+ * @category Serverless
2834
2859
  */
2835
- export interface IllustrationProps {
2836
- name: IllustrationNames;
2837
- alt: string;
2838
- width?: number;
2839
- height?: number;
2860
+ export type ServerlessExecutionResult = {
2861
+ status: ServerlessExecutionStatus.Success;
2862
+ response: JsonValue;
2863
+ } | {
2864
+ status: ServerlessExecutionStatus.Error;
2865
+ message: string;
2866
+ };
2867
+ /**
2868
+ * @category Serverless
2869
+ */
2870
+ export type ServerlessFuncRunner = (params: ServerlessRunnerParams) => Promise<ServerlessExecutionResult>;
2871
+ /**
2872
+ * @ignore
2873
+ * @category Serverless
2874
+ */
2875
+ export interface ServerlessExecutionRequest {
2876
+ appId: number;
2877
+ extensibleCardId: number;
2878
+ serverlessFunction: string;
2879
+ location: keyof ExtensionPoints;
2880
+ objectQuery?: {
2881
+ objectId: number;
2882
+ objectTypeId: string;
2883
+ objectPropertyNames: string[];
2884
+ };
2885
+ parameters?: JsonValue;
2886
+ event?: {
2887
+ type: 'SERVERLESS_ACTION_HOOK';
2888
+ payload: JsonValue;
2889
+ };
2890
+ objectId?: number;
2891
+ objectTypeId?: string;
2840
2892
  }
2841
- export declare const illustrationNames: {
2842
- readonly lock: "lock";
2843
- readonly unlock: "unlock";
2844
- readonly electronicSignature: "electronic-signature";
2845
- readonly electronicSignatureEmptyState: "electronic-signature-empty-state";
2846
- readonly callingSetUp: "calling-set-up";
2847
- readonly companies: "companies";
2848
- readonly contacts: "contacts";
2849
- readonly multipleObjects: "multiple-objects";
2850
- readonly object: "object";
2851
- readonly task: "task";
2852
- readonly deals: "deals";
2853
- readonly registration: "registration";
2854
- readonly developerSecurityUpdate: "developer-security-update";
2855
- readonly social: "social";
2856
- readonly leads: "leads";
2857
- readonly target: "target";
2858
- readonly emailConfirmation: "email-confirmation";
2859
- readonly successfullyConnectedEmail: "successfully-connected-email";
2860
- readonly contentStrategy: "content-strategy";
2861
- readonly addOnReporting: "add-on-reporting";
2862
- readonly productsShoppingCart: "products-shopping-cart";
2863
- readonly store: "store";
2864
- readonly storeDisabled: "store-disabled";
2865
- readonly customerSupport: "customer-support";
2866
- readonly customerExperience: "customer-experience";
2867
- readonly api: "api";
2868
- readonly integrations: "integrations";
2869
- readonly sandboxAddOn: "sandbox-add-on";
2870
- readonly customObjects: "custom-objects";
2871
- readonly paymentsButton: "payments-button";
2872
- readonly automatedTesting: "automated-testing";
2873
- readonly middlePaneCards: "middle-pane-cards";
2874
- readonly propertiesSidebar: "properties-sidebar";
2875
- readonly emptyStateCharts: "empty-state-charts";
2876
- readonly meetings: "meetings-small";
2877
- readonly tickets: "ticket-small";
2878
- readonly sidebar: "settings-sidebar";
2879
- readonly errorGeneral: "errors/general";
2880
- readonly errorHourglass: "errors/hourglass";
2893
+ /**
2894
+ * @category Serverless
2895
+ */
2896
+ export interface ServerlessExecutionResponse {
2897
+ logId: string;
2898
+ response?: JsonValue;
2899
+ }
2900
+ /**
2901
+ * @category Serverless
2902
+ */
2903
+ export interface ServerlessErrorResponse {
2904
+ responseJSON?: {
2905
+ message: string;
2906
+ correlationId: string;
2907
+ category: string;
2908
+ subCategory?: string;
2909
+ errors?: {
2910
+ message: string;
2911
+ subCategory: string;
2912
+ }[];
2913
+ };
2914
+ status: number;
2915
+ }
2916
+ export type JsonValue = string | number | boolean | null | JsonValue[] | {
2917
+ [key: string]: JsonValue;
2881
2918
  };
2882
- export type IllustrationNames = keyof typeof illustrationNames;
2919
+ /** @ignore */
2920
+ export type PanelAction = (panelId: string) => void;
2921
+ /** @ignore */
2922
+ export type ModalAction = (modalId: string) => void;
2923
+ /** @ignore */
2924
+ export interface Reactions {
2925
+ openPanel: PanelAction;
2926
+ closePanel: PanelAction;
2927
+ openModal: ModalAction;
2928
+ closeModal: ModalAction;
2929
+ }
2930
+ export type ReactionsHandler<T> = (event: T, reactions: Reactions) => void | Promise<void>;
2883
2931
  export {};