@atlaskit/smart-card 23.14.2 → 23.14.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. package/dist/cjs/extractors/block/index.js +4 -3
  2. package/dist/cjs/extractors/common/actions/extractPreviewAction.js +5 -2
  3. package/dist/cjs/extractors/common/meta/extractIsSupportTheming.js +11 -0
  4. package/dist/cjs/extractors/constants.js +6 -2
  5. package/dist/cjs/extractors/embed/index.js +3 -1
  6. package/dist/cjs/extractors/flexible/actions/extract-preview-action.js +4 -1
  7. package/dist/cjs/version.json +1 -1
  8. package/dist/cjs/view/BlockCard/views/ResolvedView.js +2 -1
  9. package/dist/cjs/view/EmbedCard/views/ResolvedView.js +10 -2
  10. package/dist/cjs/view/EmbedModal/index.js +10 -2
  11. package/dist/cjs/view/FlexibleCard/components/actions/action/preview-action/index.js +4 -2
  12. package/dist/es2019/extractors/block/index.js +4 -3
  13. package/dist/es2019/extractors/common/actions/extractPreviewAction.js +5 -2
  14. package/dist/es2019/extractors/common/meta/extractIsSupportTheming.js +4 -0
  15. package/dist/es2019/extractors/constants.js +4 -1
  16. package/dist/es2019/extractors/embed/index.js +3 -1
  17. package/dist/es2019/extractors/flexible/actions/extract-preview-action.js +4 -1
  18. package/dist/es2019/version.json +1 -1
  19. package/dist/es2019/view/BlockCard/views/ResolvedView.js +2 -1
  20. package/dist/es2019/view/EmbedCard/views/ResolvedView.js +11 -2
  21. package/dist/es2019/view/EmbedModal/index.js +11 -2
  22. package/dist/es2019/view/FlexibleCard/components/actions/action/preview-action/index.js +4 -2
  23. package/dist/esm/extractors/block/index.js +4 -3
  24. package/dist/esm/extractors/common/actions/extractPreviewAction.js +5 -2
  25. package/dist/esm/extractors/common/meta/extractIsSupportTheming.js +4 -0
  26. package/dist/esm/extractors/constants.js +4 -1
  27. package/dist/esm/extractors/embed/index.js +3 -1
  28. package/dist/esm/extractors/flexible/actions/extract-preview-action.js +4 -1
  29. package/dist/esm/version.json +1 -1
  30. package/dist/esm/view/BlockCard/views/ResolvedView.js +2 -1
  31. package/dist/esm/view/EmbedCard/views/ResolvedView.js +10 -2
  32. package/dist/esm/view/EmbedModal/index.js +10 -2
  33. package/dist/esm/view/FlexibleCard/components/actions/action/preview-action/index.js +4 -2
  34. package/dist/types/extractors/block/index.d.ts +1 -1
  35. package/dist/types/extractors/common/actions/extractPreviewAction.d.ts +2 -1
  36. package/dist/types/extractors/common/meta/extractIsSupportTheming.d.ts +2 -0
  37. package/dist/types/extractors/constants.d.ts +1 -0
  38. package/dist/types/state/flexible-ui-context/types.d.ts +1 -0
  39. package/dist/types/view/BlockCard/actions/PreviewAction.d.ts +1 -0
  40. package/dist/types/view/BlockCard/views/ResolvedView.d.ts +3 -1
  41. package/dist/types/view/EmbedCard/views/ResolvedView.d.ts +1 -0
  42. package/dist/types/view/EmbedModal/index.d.ts +1 -0
  43. package/dist/types/view/EmbedModal/types.d.ts +1 -0
  44. package/dist/types/view/FlexibleCard/components/actions/action/preview-action/types.d.ts +1 -0
  45. package/package.json +1 -1
  46. package/tmp/api-report-tmp.d.ts +0 -870
@@ -1,870 +0,0 @@
1
- ## API Report File for "@atlaskit/smart-card"
2
-
3
- > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
-
5
- ```ts
6
-
7
- /// <reference types="react" />
8
-
9
- import { APIError } from '@atlaskit/linking-common';
10
- import { Appearance } from '@atlaskit/button/types';
11
- import { BlockCardAdf } from '@atlaskit/linking-common';
12
- import { CardAdf } from '@atlaskit/linking-common';
13
- import { CardAppearance } from '@atlaskit/linking-common';
14
- import { CardContext } from '@atlaskit/link-provider';
15
- import { CardPlatform } from '@atlaskit/linking-common';
16
- import { CardType } from '@atlaskit/linking-common';
17
- import { CardClient as Client } from '@atlaskit/link-provider';
18
- import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
19
- import { EditorCardProvider } from '@atlaskit/link-provider';
20
- import { editorCardProvider } from '@atlaskit/link-provider';
21
- import { EmbedCardAdf } from '@atlaskit/linking-common';
22
- import { ErrorInfo } from 'react';
23
- import { GasPayload } from '@atlaskit/analytics-gas-types';
24
- import { InlineCardAdf } from '@atlaskit/linking-common';
25
- import { JsonLd } from 'json-ld-types';
26
- import { MessageDescriptor } from 'react-intl-next';
27
- import { SmartCardProvider as Provider } from '@atlaskit/link-provider';
28
- import { ProviderProps } from '@atlaskit/link-provider';
29
- import { default as React_2 } from 'react';
30
- import { ReactChild } from 'react';
31
- import { Ref } from 'react';
32
- import { SerializedStyles } from '@emotion/react';
33
- import { SmartCardContext } from '@atlaskit/link-provider';
34
- import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
35
- import { WithContextProps } from '@atlaskit/analytics-next';
36
- import { WithIntlProps } from 'react-intl-next';
37
- import { WrappedComponentProps } from 'react-intl-next';
38
-
39
- // @public (undocumented)
40
- export type ActionItem = CustomActionItem | NamedActionItem | NamedDataActionItem;
41
-
42
- // @public
43
- export enum ActionName {
44
- // (undocumented)
45
- CustomAction = "CustomAction",
46
- // (undocumented)
47
- DeleteAction = "DeleteAction",
48
- // (undocumented)
49
- DownloadAction = "DownloadAction",
50
- // (undocumented)
51
- EditAction = "EditAction",
52
- // (undocumented)
53
- PreviewAction = "PreviewAction",
54
- // (undocumented)
55
- ViewAction = "ViewAction"
56
- }
57
-
58
- // @public (undocumented)
59
- type ActionProps = {
60
- size?: SmartLinkSize;
61
- content?: React.ReactNode;
62
- appearance?: Appearance;
63
- onClick: () => any;
64
- icon?: ReactChild;
65
- iconPosition?: 'after' | 'before';
66
- tooltipMessage?: React.ReactNode;
67
- asDropDownItem?: boolean;
68
- overrideCss?: SerializedStyles;
69
- testId?: string;
70
- };
71
-
72
- // @public (undocumented)
73
- export type AnalyticsAction = 'authStarted' | 'chunkLoadFailed' | 'clicked' | 'closed' | 'connectFailed' | 'connectSucceeded' | 'connected' | 'created' | 'dismissed' | 'dwelled' | 'focused' | 'inserted' | 'renderFailed' | 'renderSuccess' | 'renderWithStatus' | 'resolved' | 'unresolved' | 'updated' | 'viewed';
74
-
75
- // @public (undocumented)
76
- export type AnalyticsActionSubject = 'applicationAccount' | 'button' | 'consentModal' | 'embedPreviewModal' | 'hoverCard' | 'link' | 'modal' | 'smartLink' | 'smartLinkAction' | 'smartLinkIframe';
77
-
78
- // @public (undocumented)
79
- type AnalyticsFacade = ReturnType<typeof useSmartLinkAnalytics>;
80
-
81
- // @public (undocumented)
82
- export type AnalyticsHandler = (event: AnalyticsPayload) => void;
83
-
84
- // @public (undocumented)
85
- type AnalyticsName = 'embedPreviewModal';
86
-
87
- // @public (undocumented)
88
- export type AnalyticsPayload = GasPayload & {
89
- action?: AnalyticsAction;
90
- actionSubject: AnalyticsActionSubject;
91
- attributes: GasPayload['attributes'] & {
92
- display?: CardInnerAppearance;
93
- };
94
- };
95
-
96
- // @public (undocumented)
97
- type AnchorTarget = '_blank' | '_parent' | '_self' | '_top';
98
-
99
- export { APIError }
100
-
101
- // @public
102
- type AttachmentCount = {
103
- name: ElementName.AttachmentCount;
104
- };
105
-
106
- // @public
107
- type AuthorGroup = {
108
- name: ElementName.AuthorGroup;
109
- };
110
-
111
- // @public
112
- type BaseActionItem = {
113
- hideContent?: boolean;
114
- hideIcon?: boolean;
115
- name: ActionName;
116
- onClick: () => any;
117
- overrideCss?: SerializedStyles;
118
- size?: SmartLinkSize;
119
- testId?: string;
120
- };
121
-
122
- // @public
123
- type BaseDataActionItem = {
124
- hideContent?: boolean;
125
- hideIcon?: boolean;
126
- name: ActionName;
127
- onClick?: () => any;
128
- overrideCss?: SerializedStyles;
129
- size?: SmartLinkSize;
130
- testId?: string;
131
- };
132
-
133
- export { BlockCardAdf }
134
-
135
- // @public (undocumented)
136
- export const blockCardContentClassName = "block-card-content";
137
-
138
- // @public (undocumented)
139
- export const blockCardContentHeaderClassName = "block-card-content-header";
140
-
141
- // @public (undocumented)
142
- export const blockCardContentHeaderNameClassName = "block-card-content-header-name";
143
-
144
- // @public (undocumented)
145
- export const blockCardErroredViewClassName = "block-card-errored-view";
146
-
147
- // @public (undocumented)
148
- export const blockCardForbiddenViewClassName = "block-card-forbidden-view";
149
-
150
- // @public (undocumented)
151
- export const blockCardForbiddenViewLinkClassName = "block-card-forbidden-view-link";
152
-
153
- // @public (undocumented)
154
- export const blockCardIconImageClassName = "block-card-icon-image";
155
-
156
- // @public (undocumented)
157
- export const blockCardNotFoundViewClassName = "block-card-not-found-view";
158
-
159
- // @public (undocumented)
160
- export const blockCardResolvedViewByClassName = "block-card-resolved-view-by";
161
-
162
- // @public (undocumented)
163
- export const blockCardResolvedViewClassName = "block-card-resolved-view";
164
-
165
- // @public (undocumented)
166
- export const blockCardResolvingViewClassName = "block-card-resolving-view";
167
-
168
- // @public (undocumented)
169
- type BlockProps = {
170
- direction?: SmartLinkDirection;
171
- overrideCss?: SerializedStyles;
172
- size?: SmartLinkSize;
173
- status?: SmartLinkStatus;
174
- testId?: string;
175
- blockRef?: Ref<HTMLDivElement>;
176
- onRender?: () => void;
177
- onTransitionEnd?: () => void;
178
- };
179
-
180
- // @public (undocumented)
181
- export const Card: React_2.ForwardRefExoticComponent<Pick<Omit<React_2.PropsWithChildren<WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof WithAnalyticsEventsProps> & React_2.RefAttributes<any> & WithContextProps, "analyticsContext" | "analyticsEvents" | "appearance" | "children" | "container" | "data" | "embedIframeRef" | "forwardedRef" | "id" | "importer" | "inheritDimensions" | "inlinePreloaderStyle" | "isFrameVisible" | "isSelected" | "key" | "onClick" | "onError" | "onResolve" | "placeholder" | "platform" | "showActions" | "showAuthTooltip" | "showHoverPreview" | "testId" | "ui" | "url"> & React_2.RefAttributes<any>>;
182
-
183
- export { CardAdf }
184
-
185
- export { CardAppearance }
186
-
187
- export { CardContext }
188
-
189
- // @public (undocumented)
190
- type CardInnerAppearance = 'embedPreview' | 'flexible' | 'hoverCardPreview' | CardAppearance;
191
-
192
- export { CardPlatform }
193
-
194
- // @public (undocumented)
195
- export interface CardProps extends WithAnalyticsEventsProps {
196
- // (undocumented)
197
- analyticsEvents?: AnalyticsFacade;
198
- // (undocumented)
199
- appearance: CardAppearance;
200
- // (undocumented)
201
- children?: React.ReactNode;
202
- // (undocumented)
203
- container?: HTMLElement;
204
- // (undocumented)
205
- data?: any;
206
- // (undocumented)
207
- embedIframeRef?: React.Ref<HTMLIFrameElement>;
208
- // (undocumented)
209
- id?: string;
210
- // (undocumented)
211
- importer?: (target: any) => void;
212
- // (undocumented)
213
- inheritDimensions?: boolean;
214
- // (undocumented)
215
- inlinePreloaderStyle?: InlinePreloaderStyle;
216
- // (undocumented)
217
- isFrameVisible?: boolean;
218
- // (undocumented)
219
- isSelected?: boolean;
220
- // (undocumented)
221
- onClick?: React.EventHandler<React.KeyboardEvent | React.MouseEvent>;
222
- // (undocumented)
223
- onError?: OnErrorCallback;
224
- // (undocumented)
225
- onResolve?: OnResolveCallback;
226
- // (undocumented)
227
- placeholder?: string;
228
- // (undocumented)
229
- platform?: CardPlatform;
230
- // (undocumented)
231
- showActions?: boolean;
232
- // (undocumented)
233
- showAuthTooltip?: boolean;
234
- // (undocumented)
235
- showHoverPreview?: boolean;
236
- // (undocumented)
237
- testId?: string;
238
- // (undocumented)
239
- ui?: FlexibleUiOptions;
240
- // (undocumented)
241
- url?: string;
242
- }
243
-
244
- export { CardType }
245
-
246
- // @public
247
- type ChecklistProgress = {
248
- name: ElementName.ChecklistProgress;
249
- };
250
-
251
- export { Client }
252
-
253
- // @public
254
- type CollaboratorGroup = {
255
- name: ElementName.CollaboratorGroup;
256
- };
257
-
258
- // @public
259
- type CommentCount = {
260
- name: ElementName.CommentCount;
261
- };
262
-
263
- // @public (undocumented)
264
- interface CommonEventProps {
265
- // (undocumented)
266
- definitionId?: string;
267
- // (undocumented)
268
- destinationProduct?: DestinationProduct | string;
269
- // (undocumented)
270
- destinationSubproduct?: DestinationSubproduct | string;
271
- // (undocumented)
272
- extensionKey?: string;
273
- // (undocumented)
274
- id?: string;
275
- // (undocumented)
276
- location?: string;
277
- // (undocumented)
278
- resourceType?: string;
279
- }
280
-
281
- // @public (undocumented)
282
- type ConnectFailedEventProps = CommonEventProps & {
283
- id?: string;
284
- reason?: string;
285
- };
286
-
287
- // @public (undocumented)
288
- type ConnectSucceededEventProps = CommonEventProps & {
289
- id?: string;
290
- };
291
-
292
- // @public (undocumented)
293
- export const contentFooterClassName = "smart-link-content-footer";
294
-
295
- // @public
296
- type CreatedBy = {
297
- name: ElementName.CreatedBy;
298
- };
299
-
300
- // @public
301
- type CreatedOn = {
302
- name: ElementName.CreatedOn;
303
- text?: string;
304
- };
305
-
306
- // @public
307
- type CustomActionItem = BaseActionItem & {
308
- name: ActionName.CustomAction;
309
- } & (((Required<Pick<ActionProps, 'content'>> & Pick<ActionProps, 'icon' | 'iconPosition'>) & Pick<ActionProps, 'tooltipMessage'>) | (Required<Pick<ActionProps, 'icon' | 'iconPosition'>> & Pick<ActionProps, 'content'>));
310
-
311
- // @public (undocumented)
312
- type DestinationProduct = 'bitbucket' | 'confluence' | 'jira' | 'trello';
313
-
314
- // @public (undocumented)
315
- type DestinationSubproduct = 'core' | 'servicedesk' | 'software';
316
-
317
- // @public
318
- type DueOn = {
319
- name: ElementName.DueOn;
320
- };
321
-
322
- export { EditorCardProvider }
323
-
324
- export { editorCardProvider }
325
-
326
- // @public
327
- export type ElementItem = {
328
- overrideCss?: SerializedStyles;
329
- size?: SmartLinkSize;
330
- testId?: string;
331
- } & ElementItemProps;
332
-
333
- // @public
334
- type ElementItemProps = AttachmentCount | AuthorGroup | ChecklistProgress | CollaboratorGroup | CommentCount | CreatedBy | CreatedOn | DueOn | LatestCommit | LinkIcon | ModifiedBy | ModifiedOn | Preview | Priority | ProgrammingLanguage | Provider_2 | ReactCount | Snippet | SourceBranch | State_2 | SubscriberCount | TargetBranch | Title | ViewCount | VoteCount;
335
-
336
- // @public
337
- export enum ElementName {
338
- // (undocumented)
339
- AttachmentCount = "AttachmentCount",
340
- // (undocumented)
341
- AuthorGroup = "AuthorGroup",
342
- // (undocumented)
343
- ChecklistProgress = "ChecklistProgress",
344
- // (undocumented)
345
- CollaboratorGroup = "CollaboratorGroup",
346
- // (undocumented)
347
- CommentCount = "CommentCount",
348
- // (undocumented)
349
- CreatedBy = "CreatedBy",
350
- // (undocumented)
351
- CreatedOn = "CreatedOn",
352
- // (undocumented)
353
- DueOn = "DueOn",
354
- // (undocumented)
355
- LatestCommit = "LatestCommit",
356
- // (undocumented)
357
- LinkIcon = "LinkIcon",
358
- // (undocumented)
359
- ModifiedBy = "ModifiedBy",
360
- // (undocumented)
361
- ModifiedOn = "ModifiedOn",
362
- // (undocumented)
363
- Preview = "Preview",
364
- // (undocumented)
365
- Priority = "Priority",
366
- // (undocumented)
367
- ProgrammingLanguage = "ProgrammingLanguage",
368
- // (undocumented)
369
- Provider = "Provider",
370
- // (undocumented)
371
- ReactCount = "ReactCount",
372
- // (undocumented)
373
- Snippet = "Snippet",
374
- // (undocumented)
375
- SourceBranch = "SourceBranch",
376
- // (undocumented)
377
- State = "State",
378
- // (undocumented)
379
- SubscriberCount = "SubscriberCount",
380
- // (undocumented)
381
- TargetBranch = "TargetBranch",
382
- // (undocumented)
383
- Title = "Title",
384
- // (undocumented)
385
- ViewCount = "ViewCount",
386
- // (undocumented)
387
- VoteCount = "VoteCount"
388
- }
389
-
390
- export { EmbedCardAdf }
391
-
392
- // @public (undocumented)
393
- export const embedHeaderHeight = 32;
394
-
395
- // @public (undocumented)
396
- export class EmbedResizeMessageListener extends React_2.Component<Props, State> {
397
- // (undocumented)
398
- componentDidMount(): void;
399
- // (undocumented)
400
- componentWillUnmount(): void;
401
- // (undocumented)
402
- render(): React_2.ReactNode;
403
- }
404
-
405
- // @public (undocumented)
406
- type ErrorCardType = 'errored' | 'fallback' | 'forbidden' | 'not_found' | 'unauthorized';
407
-
408
- // @public (undocumented)
409
- type FlexibleUiOptions = {
410
- clickableContainer?: boolean;
411
- hideElevation?: boolean;
412
- hidePadding?: boolean;
413
- hideBackground?: boolean;
414
- size?: SmartLinkSize;
415
- theme?: SmartLinkTheme;
416
- };
417
-
418
- // @public
419
- export const FooterBlock: React_2.FC<FooterBlockProps>;
420
-
421
- // @public (undocumented)
422
- type FooterBlockProps = {
423
- actions?: ActionItem[];
424
- onActionMenuOpenChange?: (options: OnActionMenuOpenChangeOptions) => void;
425
- } & BlockProps;
426
-
427
- export { InlineCardAdf }
428
-
429
- // @public (undocumented)
430
- type InlinePreloaderStyle = 'on-left-with-skeleton' | 'on-right-without-skeleton';
431
-
432
- // @public (undocumented)
433
- type InstrumentEventProps = CommonEventProps & {
434
- error?: APIError;
435
- status: CardType;
436
- id: string;
437
- };
438
-
439
- // @public (undocumented)
440
- type InvokeFailedEventProps = CommonEventProps & {
441
- id: string;
442
- actionType: string;
443
- display: CardInnerAppearance;
444
- reason: string;
445
- };
446
-
447
- // @public (undocumented)
448
- type InvokeSucceededEventProps = CommonEventProps & {
449
- id: string;
450
- actionType: string;
451
- display: CardInnerAppearance;
452
- };
453
-
454
- // @public (undocumented)
455
- type InvokeType = 'client' | 'server';
456
-
457
- // @public
458
- type LatestCommit = {
459
- name: ElementName.LatestCommit;
460
- };
461
-
462
- // @public
463
- type LinkIcon = {
464
- name: ElementName.LinkIcon;
465
- };
466
-
467
- // @public (undocumented)
468
- export const loadingPlaceholderClassName = "smart-link-loading-placeholder";
469
-
470
- // @public (undocumented)
471
- export enum MediaPlacement {
472
- // (undocumented)
473
- Left = "left",
474
- // (undocumented)
475
- Right = "right"
476
- }
477
-
478
- // @public
479
- export const MetadataBlock: React_2.FC<MetadataBlockProps>;
480
-
481
- // @public (undocumented)
482
- type MetadataBlockProps = {
483
- maxLines?: number;
484
- primary?: ElementItem[];
485
- secondary?: ElementItem[];
486
- } & BlockProps;
487
-
488
- // @public (undocumented)
489
- export const metadataListClassName = "smart-link-metadata-list";
490
-
491
- // @public
492
- type ModifiedBy = {
493
- name: ElementName.ModifiedBy;
494
- };
495
-
496
- // @public
497
- type ModifiedOn = {
498
- name: ElementName.ModifiedOn;
499
- text?: string;
500
- };
501
-
502
- // @public
503
- type NamedActionItem = BaseActionItem & {
504
- name: ActionName.DeleteAction | ActionName.EditAction;
505
- };
506
-
507
- // @public
508
- type NamedDataActionItem = BaseDataActionItem & {
509
- name: ActionName.DownloadAction | ActionName.PreviewAction | ActionName.ViewAction;
510
- };
511
-
512
- // @public (undocumented)
513
- export type OnActionMenuOpenChangeOptions = {
514
- isOpen: boolean;
515
- };
516
-
517
- // @public (undocumented)
518
- type OnErrorCallback = (data: {
519
- status: Extract<CardType, ErrorCardType>;
520
- url: string;
521
- }) => void;
522
-
523
- // @public (undocumented)
524
- type OnResolveCallback = (data: {
525
- url?: string;
526
- title?: string;
527
- aspectRatio?: number;
528
- }) => void;
529
-
530
- // @public
531
- type Preview = {
532
- name: ElementName.Preview;
533
- };
534
-
535
- // @public
536
- export const PreviewBlock: React_2.FC<PreviewBlockProps>;
537
-
538
- // @public (undocumented)
539
- type PreviewBlockProps = {
540
- ignoreContainerPadding?: boolean;
541
- onError?: () => void;
542
- placement?: MediaPlacement;
543
- } & BlockProps;
544
-
545
- // @public (undocumented)
546
- type PreviewDisplay = 'card' | 'embed';
547
-
548
- // @public (undocumented)
549
- type PreviewInvokeMethod = 'keyboard' | 'mouse_click' | 'mouse_hover';
550
-
551
- // @public
552
- type Priority = {
553
- name: ElementName.Priority;
554
- };
555
-
556
- // @public
557
- type ProgrammingLanguage = {
558
- name: ElementName.ProgrammingLanguage;
559
- };
560
-
561
- // @public (undocumented)
562
- interface Props {
563
- // (undocumented)
564
- embedIframeRef: React_2.RefObject<HTMLIFrameElement>;
565
- // (undocumented)
566
- onHeightUpdate: (height: number) => void;
567
- }
568
-
569
- export { Provider }
570
-
571
- // @public
572
- type Provider_2 = {
573
- name: ElementName.Provider;
574
- };
575
-
576
- export { ProviderProps }
577
-
578
- // @public
579
- type ReactCount = {
580
- name: ElementName.ReactCount;
581
- };
582
-
583
- // @public (undocumented)
584
- export type ResolveResponse = JsonLd.Response;
585
-
586
- // @public
587
- type RetryOptions = {
588
- descriptor?: MessageDescriptor;
589
- onClick?: ((e: React.MouseEvent<HTMLElement>) => void) | undefined;
590
- values?: Record<string, string>;
591
- };
592
-
593
- // @public (undocumented)
594
- type ScreenAuthPopupEventProps = CommonEventProps;
595
-
596
- export { SmartCardContext as Context }
597
- export { SmartCardContext }
598
-
599
- // @public
600
- export enum SmartLinkDirection {
601
- // (undocumented)
602
- Horizontal = "horizontal",
603
- // (undocumented)
604
- Vertical = "vertical"
605
- }
606
-
607
- // @public (undocumented)
608
- export class SmartLinkEvents {
609
- // (undocumented)
610
- insertSmartLink(url: string, type: CardInnerAppearance, createAnalyticsEvent?: CreateUIAnalyticsEvent): void;
611
- }
612
-
613
- // @public
614
- export enum SmartLinkPosition {
615
- // (undocumented)
616
- Center = "center",
617
- // (undocumented)
618
- Top = "top"
619
- }
620
-
621
- // @public
622
- export enum SmartLinkSize {
623
- // (undocumented)
624
- Large = "large",
625
- // (undocumented)
626
- Medium = "medium",
627
- // (undocumented)
628
- Small = "small",
629
- // (undocumented)
630
- XLarge = "xlarge"
631
- }
632
-
633
- // @public
634
- enum SmartLinkStatus {
635
- // (undocumented)
636
- Errored = "errored",
637
- // (undocumented)
638
- Fallback = "fallback",
639
- // (undocumented)
640
- Forbidden = "forbidden",
641
- // (undocumented)
642
- NotFound = "not_found",
643
- // (undocumented)
644
- Pending = "pending",
645
- // (undocumented)
646
- Resolved = "resolved",
647
- // (undocumented)
648
- Resolving = "resolving",
649
- // (undocumented)
650
- Unauthorized = "unauthorized"
651
- }
652
-
653
- // @public
654
- export enum SmartLinkTheme {
655
- // (undocumented)
656
- Black = "black",
657
- // (undocumented)
658
- Link = "link"
659
- }
660
-
661
- // @public
662
- type Snippet = {
663
- name: ElementName.Snippet;
664
- };
665
-
666
- // @public
667
- export const SnippetBlock: React_2.FC<SnippetBlockProps>;
668
-
669
- // @public (undocumented)
670
- type SnippetBlockProps = {
671
- maxLines?: number;
672
- } & BlockProps;
673
-
674
- // @public
675
- type SourceBranch = {
676
- name: ElementName.SourceBranch;
677
- };
678
-
679
- // @public (undocumented)
680
- interface State {
681
- }
682
-
683
- // @public
684
- type State_2 = {
685
- name: ElementName.State;
686
- };
687
-
688
- // @public
689
- type SubscriberCount = {
690
- name: ElementName.SubscriberCount;
691
- };
692
-
693
- // @public
694
- type TargetBranch = {
695
- name: ElementName.TargetBranch;
696
- };
697
-
698
- // @public
699
- type Title = {
700
- name: ElementName.Title;
701
- };
702
-
703
- // @public
704
- export const TitleBlock: React_2.FC<TitleBlockProps>;
705
-
706
- // @public (undocumented)
707
- type TitleBlockProps = {
708
- actions?: ActionItem[];
709
- anchorTarget?: AnchorTarget;
710
- hideTitleTooltip?: boolean;
711
- maxLines?: number;
712
- metadata?: ElementItem[];
713
- onActionMenuOpenChange?: (options: OnActionMenuOpenChangeOptions) => void;
714
- position?: SmartLinkPosition;
715
- onClick?: React_2.EventHandler<React_2.KeyboardEvent | React_2.MouseEvent>;
716
- retry?: RetryOptions;
717
- hideRetry?: boolean;
718
- showActionOnHover?: boolean;
719
- subtitle?: ElementItem[];
720
- text?: string;
721
- theme?: SmartLinkTheme;
722
- } & BlockProps;
723
-
724
- // @public (undocumented)
725
- type TrackAppAccountConnectedProps = CommonEventProps;
726
-
727
- // @public (undocumented)
728
- type UiActionClickedEventProps = CommonEventProps & {
729
- id: string;
730
- display: CardInnerAppearance;
731
- actionType: string;
732
- invokeType?: InvokeType;
733
- };
734
-
735
- // @public (undocumented)
736
- type UiAuthAlternateAccountEventProps = CommonEventProps & {
737
- display: CardInnerAppearance;
738
- };
739
-
740
- // @public (undocumented)
741
- type UiAuthEventProps = CommonEventProps & {
742
- display: CardInnerAppearance;
743
- };
744
-
745
- // @public (undocumented)
746
- type UiCardClickedEventProps = CommonEventProps & {
747
- id: string;
748
- display: CardInnerAppearance;
749
- status: CardType;
750
- isModifierKeyPressed?: boolean;
751
- actionSubjectId?: string;
752
- };
753
-
754
- // @public (undocumented)
755
- type UiClosedAuthEventProps = CommonEventProps & {
756
- display: CardInnerAppearance;
757
- };
758
-
759
- // @public (undocumented)
760
- type UiHoverCardDismissedEventProps = CommonEventProps & {
761
- previewDisplay: PreviewDisplay;
762
- hoverTime: number;
763
- previewInvokeMethod?: PreviewInvokeMethod;
764
- status: CardType;
765
- };
766
-
767
- // @public (undocumented)
768
- type UiHoverCardOpenLinkClickedEventProps = CommonEventProps & {
769
- previewDisplay: PreviewDisplay;
770
- previewInvokeMethod?: PreviewInvokeMethod;
771
- };
772
-
773
- // @public (undocumented)
774
- type UiHoverCardViewedEventProps = CommonEventProps & {
775
- previewDisplay: PreviewDisplay;
776
- previewInvokeMethod?: PreviewInvokeMethod;
777
- status: CardType;
778
- };
779
-
780
- // @public (undocumented)
781
- type UiIframeDwelledEventProps = CommonEventProps & {
782
- id: string;
783
- display: CardInnerAppearance;
784
- status: CardType;
785
- dwellTime: number;
786
- dwellPercentVisible: number;
787
- };
788
-
789
- // @public (undocumented)
790
- type UiIframeFocusedEventProps = CommonEventProps & {
791
- id: string;
792
- display: CardInnerAppearance;
793
- status: CardType;
794
- };
795
-
796
- // @public (undocumented)
797
- type UiRenderFailedEventProps = CommonEventProps & {
798
- display: CardInnerAppearance;
799
- error: Error;
800
- errorInfo: ErrorInfo;
801
- };
802
-
803
- // @public (undocumented)
804
- type UiRenderSuccessEventProps = CommonEventProps & {
805
- display: CardInnerAppearance;
806
- status: CardType;
807
- };
808
-
809
- // @public
810
- export const useSmartLinkAnalytics: (url: string, dispatchAnalytics: AnalyticsHandler, id?: string | undefined, defaultLocation?: string | undefined) => {
811
- ui: {
812
- authEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiAuthEventProps) => void;
813
- authAlternateAccountEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiAuthAlternateAccountEventProps) => void;
814
- buttonClickedEvent: (data: Partial<AnalyticsPayload> & {
815
- actionSubjectId: Required<string>;
816
- }) => void;
817
- cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => void;
818
- iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: UiIframeDwelledEventProps) => void;
819
- iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: UiIframeFocusedEventProps) => void;
820
- actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
821
- hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardOpenLinkClickedEventProps) => void;
822
- closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiClosedAuthEventProps) => void;
823
- modalClosedEvent: (data: Partial<AnalyticsPayload> & {
824
- actionSubjectId: Required<string>;
825
- }) => void;
826
- renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiRenderSuccessEventProps) => void;
827
- renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => void;
828
- hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: UiHoverCardViewedEventProps) => void;
829
- hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: UiHoverCardDismissedEventProps) => void;
830
- learnMoreClickedEvent: () => void;
831
- };
832
- operational: {
833
- invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeSucceededEventProps) => void;
834
- invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => void;
835
- connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ConnectSucceededEventProps) => void;
836
- connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ConnectFailedEventProps) => void;
837
- instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: InstrumentEventProps) => void;
838
- chunkloadFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => void;
839
- };
840
- track: {
841
- appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: TrackAppAccountConnectedProps) => void;
842
- appAccountAuthStarted: ({ extensionKey, location, }: TrackAppAccountConnectedProps) => void;
843
- linkUpdated: (props: CommonEventProps & {
844
- [key: string]: any;
845
- }) => void;
846
- };
847
- screen: {
848
- authPopupEvent: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ScreenAuthPopupEventProps) => void;
849
- modalViewedEvent: (data: Partial<AnalyticsPayload> & {
850
- name: Extract<AnalyticsName, 'embedPreviewModal'>;
851
- }) => void;
852
- };
853
- };
854
-
855
- // @public (undocumented)
856
- export function useSmartLinkEvents(): SmartLinkEvents;
857
-
858
- // @public
859
- type ViewCount = {
860
- name: ElementName.ViewCount;
861
- };
862
-
863
- // @public
864
- type VoteCount = {
865
- name: ElementName.VoteCount;
866
- };
867
-
868
- // (No @packageDocumentation comment for this package)
869
-
870
- ```