@hubspot/ui-extensions 0.8.51 → 0.8.53

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